diff options
author | christian mueller <christian.ei.mueller@bmw.de> | 2012-03-06 20:11:13 +0100 |
---|---|---|
committer | christian mueller <christian.ei.mueller@bmw.de> | 2012-03-06 20:11:13 +0100 |
commit | f23f9c3ecf40636f176107f6098c308f72fdbd5d (patch) | |
tree | 56343b3086da79c629ee58655a7f6886f1f85676 /include/shared/CAmDltWrapper.h | |
parent | e553e5bc869df63d2e8d3fa0c581b3798db9b439 (diff) | |
download | audiomanager-f23f9c3ecf40636f176107f6098c308f72fdbd5d.tar.gz |
* removed all documentation to new place
* removed GENIVI copyright from headers
* [GDLT-41] changed DLT dependency to 2.5.0
Diffstat (limited to 'include/shared/CAmDltWrapper.h')
-rw-r--r-- | include/shared/CAmDltWrapper.h | 91 |
1 files changed, 44 insertions, 47 deletions
diff --git a/include/shared/CAmDltWrapper.h b/include/shared/CAmDltWrapper.h index f3d39cc..19f5257 100644 --- a/include/shared/CAmDltWrapper.h +++ b/include/shared/CAmDltWrapper.h @@ -1,5 +1,5 @@ -/** Copyright (c) 2012 GENIVI Alliance - * Copyright (c) 2012 BMW +/** + * Copyright (C) 2012, BMW AG * * \author Christian Mueller, christian.ei.mueller@bmw.de BMW 2011,2012 * @@ -24,63 +24,60 @@ #ifdef WITH_DLT #include <dlt/dlt.h> +namespace am +{ #else - -#include <cstdint> +#include <stdint.h> #include <sstream> -namespace am +#define DLT_USER_BUF_MAX_SIZE 2048 + +/** + * This structure is used for every context used in an application. + */ +typedef struct { + char contextID[4]; /**< context id */ + int32_t log_level_pos; /**< offset in user-application context field */ +} DltContext; -#define DLT_USER_BUF_MAX_SIZE 2048 +/** + * Definitions of DLT log level + */ +typedef enum +{ + DLT_LOG_DEFAULT = -1, /**< Default log level */ + DLT_LOG_OFF = 0x00, /**< Log level off */ + DLT_LOG_FATAL = 0x01, /**< fatal system error */ + DLT_LOG_ERROR = 0x02, /**< error with impact to correct functionality */ + DLT_LOG_WARN = 0x03, /**< warning, correct behaviour could not be ensured */ + DLT_LOG_INFO = 0x04, /**< informational */ + DLT_LOG_DEBUG = 0x05, /**< debug */ + DLT_LOG_VERBOSE = 0x06 /**< highest grade of information */ +} DltLogLevelType; - /** - * This structure is used for every context used in an application. - */ - typedef struct - { - char contextID[4]; /**< context id */ - int32_t log_level_pos; /**< offset in user-application context field */ - }DltContext; - - /** - * Definitions of DLT log level - */ - typedef enum - { - DLT_LOG_DEFAULT = -1, /**< Default log level */ - DLT_LOG_OFF = 0x00, /**< Log level off */ - DLT_LOG_FATAL = 0x01, /**< fatal system error */ - DLT_LOG_ERROR = 0x02, /**< error with impact to correct functionality */ - DLT_LOG_WARN = 0x03, /**< warning, correct behaviour could not be ensured */ - DLT_LOG_INFO = 0x04, /**< informational */ - DLT_LOG_DEBUG = 0x05, /**< debug */ - DLT_LOG_VERBOSE = 0x06 /**< highest grade of information */ - }DltLogLevelType; - - /** - * This structure is used for context data used in an application. - */ - typedef struct - { - DltContext *handle; /**< pointer to DltContext */ - std::stringstream buffer; /**< buffer for building log message*/ - int32_t log_level; /**< log level */ - int32_t trace_status; /**< trace status */ - int32_t args_num; /**< number of arguments for extended header*/ - uint8_t mcnt; /**< message counter */ - char* context_description; /**< description of context */ - }DltContextData; +/** + * This structure is used for context data used in an application. + */ +typedef struct +{ + DltContext *handle; /**< pointer to DltContext */ + std::stringstream buffer; /**< buffer for building log message*/ + int32_t log_level; /**< log level */ + int32_t trace_status; /**< trace status */ + int32_t args_num; /**< number of arguments for extended header*/ + uint8_t mcnt; /**< message counter */ + char* context_description; /**< description of context */ +} DltContextData; #define DLT_DECLARE_CONTEXT(CONTEXT) \ DltContext CONTEXT; #define DLT_IMPORT_CONTEXT(CONTEXT) \ extern DltContext CONTEXT; - -#endif // WITH_DLT namespace am { +#endif // WITH_DLT /** * Wraps around the dlt. This class is instantiated as a singleton and offers a default @@ -114,8 +111,8 @@ public: private: CAmDltWrapper(const bool enableNoDLTDebug); //is private because of singleton pattern #ifndef WITH_DLT - template<class T> void appendNoDLT(T value); - bool mEnableNoDLTDebug; + template<class T> void appendNoDLT(T value); + bool mEnableNoDLTDebug; #endif DltContext mDltContext; //!< the default context DltContextData mDltContextData; //!< contextdata |