![]() |
ErrorLib 1.0.8-master SHA: 810228da25
|
Logmessage Plugin for Hermes PC-Tool. More...
#include <stdint.h>#include <stdbool.h>Go to the source code of this file.
Macros | |
| #define | LOGMESSAGE_OPTION_NONE 0x00000000 |
| No option is added to the logmessage. More... | |
| #define | LOGMESSAGE_OPTION_TIMESTAMP 0x00000100 |
| A timestamp is added to this message. This flag is added to all ordinary messages. A timestamp data field is added. More... | |
| #define | LOGMESSAGE_OPTION_CONTAINS_DATA 0x00000200 |
| This message contains additional data, wghich is added to the buffer. More... | |
| #define | LOGMESSAGE_OPTION_ALERT 0x00000400 |
| This message results into an alert message-box on PC. More... | |
| #define | LOGMESSAGE_OPTION_DEBUG 0x00000800 |
| This message is only for debug purposes. The user can fadeout this messages if not required. More... | |
| #define | LOGMESSAGE_OPTION_UNDEFINED1 0x00001000 |
| Not defined in this version. More... | |
| #define | LOGMESSAGE_OPTION_UNDEFINED2 0x00002000 |
| Not defined in this version. More... | |
| #define | LOGMESSAGE_OPTION_UNDEFINED3 0x00004000 |
| Not defined in this version. More... | |
| #define | LOGMESSAGE_OPTION_UNDEFINED4 0x00008000 |
| Not defined in this version. More... | |
| #define | USER_LOGMESSAGE_OPTIONS (LOGMESSAGE_OPTION_ALERT | LOGMESSAGE_OPTION_DEBUG) |
| These Flags can be used by user, the other flags are used by the error-system himself. More... | |
| #define | CONCATENATE_DETAIL(x, y) x##y |
| Helper-macro to concat two strings. More... | |
| #define | CONCATENATE(x, y) CONCATENATE_DETAIL(x, y) |
| Helper-macro to concat two strings. More... | |
| #define | MAKE_UNIQUE(x) CONCATENATE(x, __LINE__) |
| Helper-macro to make the string unique. Add the linenumber of source-code to the name. More... | |
| #define | MSG(message) |
| Print a simple message without any options. More... | |
| #define | LogMessage(message, Options) |
| Print a message with defined options. More... | |
| #define | LogMessageAlert(message) |
| Print a message and show this message immediately in a messagebox on all connected PCs. More... | |
| #define | LogMessageAppendLine(message) |
| Add a message to the last printed message. More... | |
| #define | LogMessageDyn(message, Options) DynamicString(message, ((Options) & USER_LOGMESSAGE_OPTIONS) | LOGMESSAGE_OPTION_TIMESTAMP) |
| Print a string located in RAM. More... | |
| #define | LogMessageDyn_appendLine(message) DynamicString(message, LOGMESSAGE_OPTION_NONE) |
| Add a message located in RAM to the last printed message. More... | |
| #define | LogMessageData1(message, dat1, Options) |
| Print a message with defined options and one data-field. More... | |
| #define | LogMessageData2(message, dat1, dat2, Options) |
| Print a message with defined options and two data-fields. More... | |
| #define | LogMessageData3(message, dat1, dat2, dat3, Options) |
| Print a message with defined options and three data-fields. More... | |
| #define | LogMessageData4(message, dat1, dat2, dat3, dat4, Options) |
| Print a message with defined options and four data-fields. More... | |
Functions | |
| void | _LogMessage (const char str[], uint32_t ui32Options) |
| Add a static String to the Message Buffer. More... | |
| void | _LogmessageData (const char *Message, uint32_t ui32Options, uint32_t ui32DataCount,...) |
| Add a const String to the Message Buffer and adds additional Data. More... | |
| void | LogMessage_Init (void) |
| Init the Logmessage System. More... | |
| void | DynamicString (char *str, uint32_t ui32Options) |
| Add a dynamic String to the Message Buffer. More... | |
Variables | |
| uint32_t | g_ui32LogmessageBufferPosition |
| Actual position in the logmessage buffer. More... | |
| uint32_t | g_ui32LogmessageBufferOverflowCounter |
| Number of overflows of the logmessage buffer. More... | |
| uint32_t | g_pui32LogmessageBuffer [] |
| Buffer for storing the logmessages. More... | |
| uint32_t | g_ui32LogmessageAlertAddress |
| Address of an alert message. More... | |
| const uint32_t | cui32_LogmessageBufferSize |
| Size of the Logmessage buffer. More... | |
Logmessage Plugin for Hermes PC-Tool.
© Copyright 2017-2022 Copyright: Retostronik GmbH Stütingstraße 30 58285 Gevelsberg
| #define CONCATENATE | ( | x, | |
| y | |||
| ) | CONCATENATE_DETAIL(x, y) |
Helper-macro to concat two strings.
| #define CONCATENATE_DETAIL | ( | x, | |
| y | |||
| ) | x##y |
Helper-macro to concat two strings.
| #define LogMessage | ( | message, | |
| Options | |||
| ) |
Print a message with defined options.
| message | Text to print. Must be a constant string. |
| Options | Additional options |
| #define LOGMESSAGE_OPTION_ALERT 0x00000400 |
This message results into an alert message-box on PC.
| #define LOGMESSAGE_OPTION_CONTAINS_DATA 0x00000200 |
This message contains additional data, wghich is added to the buffer.
| #define LOGMESSAGE_OPTION_DEBUG 0x00000800 |
This message is only for debug purposes. The user can fadeout this messages if not required.
| #define LOGMESSAGE_OPTION_NONE 0x00000000 |
No option is added to the logmessage.
| #define LOGMESSAGE_OPTION_TIMESTAMP 0x00000100 |
A timestamp is added to this message. This flag is added to all ordinary messages. A timestamp data field is added.
| #define LOGMESSAGE_OPTION_UNDEFINED1 0x00001000 |
Not defined in this version.
| #define LOGMESSAGE_OPTION_UNDEFINED2 0x00002000 |
Not defined in this version.
| #define LOGMESSAGE_OPTION_UNDEFINED3 0x00004000 |
Not defined in this version.
| #define LOGMESSAGE_OPTION_UNDEFINED4 0x00008000 |
Not defined in this version.
| #define LogMessageAlert | ( | message | ) |
Print a message and show this message immediately in a messagebox on all connected PCs.
| message | Text to print. Must be a constant string. |
| #define LogMessageAppendLine | ( | message | ) |
Add a message to the last printed message.
It is used to print multiline messages.
| message | Text to add to the last message. Must be a constant string. |
| #define LogMessageData1 | ( | message, | |
| dat1, | |||
| Options | |||
| ) |
Print a message with defined options and one data-field.
| message | Text to print. Must be a constant string. |
| dat1 | Data to append |
| Options | Additional options |
| #define LogMessageData2 | ( | message, | |
| dat1, | |||
| dat2, | |||
| Options | |||
| ) |
Print a message with defined options and two data-fields.
| message | Text to print. Must be a constant string. |
| dat1 | Data to append |
| dat2 | Data to append |
| Options | Additional options |
| #define LogMessageData3 | ( | message, | |
| dat1, | |||
| dat2, | |||
| dat3, | |||
| Options | |||
| ) |
Print a message with defined options and three data-fields.
| message | Text to print. Must be a constant string. |
| dat1 | Data to append |
| dat2 | Data to append |
| dat3 | Data to append |
| Options | Additional options |
| #define LogMessageData4 | ( | message, | |
| dat1, | |||
| dat2, | |||
| dat3, | |||
| dat4, | |||
| Options | |||
| ) |
Print a message with defined options and four data-fields.
| message | Text to print. Must be a constant string. |
| dat1 | Data to append |
| dat2 | Data to append |
| dat3 | Data to append |
| dat4 | Data to append |
| Options | Additional options |
| #define LogMessageDyn | ( | message, | |
| Options | |||
| ) | DynamicString(message, ((Options) & USER_LOGMESSAGE_OPTIONS) | LOGMESSAGE_OPTION_TIMESTAMP) |
Print a string located in RAM.
| message | Text to print. Must be a string located in RAM. |
| Options | Additional options |
| #define LogMessageDyn_appendLine | ( | message | ) | DynamicString(message, LOGMESSAGE_OPTION_NONE) |
Add a message located in RAM to the last printed message.
It is used to print multiline messages.
| message | Text to add to the last message. Must be a string located in RAM. |
| #define MAKE_UNIQUE | ( | x | ) | CONCATENATE(x, __LINE__) |
Helper-macro to make the string unique. Add the linenumber of source-code to the name.
| #define MSG | ( | message | ) |
Print a simple message without any options.
| message | Text to print. Must be a constant string. |
| #define USER_LOGMESSAGE_OPTIONS (LOGMESSAGE_OPTION_ALERT | LOGMESSAGE_OPTION_DEBUG) |
These Flags can be used by user, the other flags are used by the error-system himself.
| void _LogMessage | ( | const char | str[], |
| uint32_t | ui32Options | ||
| ) |
Add a static String to the Message Buffer.
| str | String to Add. The String must be a const String located in flash |
| ui32Options | Options flags LOGMESSAGE_OPTION_ALERT, LOGMESSAGE_OPTION_DEBUG, LOGMESSAGE_OPTION_TIMESTAMP |
| void _LogmessageData | ( | const char * | Message, |
| uint32_t | ui32Options, | ||
| uint32_t | ui32DataCount, | ||
| ... | |||
| ) |
Add a const String to the Message Buffer and adds additional Data.
A Timestamp is added to this message. Repeated Messages counter is not used.
| Message | String to Add. The String must be a const String located in flash. |
| ui32Options | Options flags if required. |
| ui32DataCount | Count of added Data pointers |
| ... | additional Pointers to Data. Each Pointer can be any datatype up to 32 Bit length. |
| void DynamicString | ( | char * | str, |
| uint32_t | ui32Options | ||
| ) |
Add a dynamic String to the Message Buffer.
The dynamic string must be located in memory.
| str | String to Add. This can be a local Variable. The String is copied to the Message Buffer |
| ui32Options | Options flags LOGMESSAGE_OPTION_TIMESTAMP if required. |
| void LogMessage_Init | ( | void | ) |
Init the Logmessage System.
Must be called before usage of all other functions in this library.
|
extern |
Size of the Logmessage buffer.
|
extern |
Buffer for storing the logmessages.
|
extern |
Address of an alert message.
|
extern |
Number of overflows of the logmessage buffer.
|
extern |
Actual position in the logmessage buffer.