AudioManager  7.6.6
Native Application Runtime Environment
am::CAmDltWrapper Class Reference

Wraps around the dlt. More...

#include <CAmDltWrapper.h>

Classes

struct  NoDltContextData
 This structure is used for context data used in an application. More...
 

Public Types

enum  logDestination { DAEMON =0, COMMAND_LINE =1, FILE_OUT =2 }
 

Public Member Functions

void registerContext (DltContext &handle, const char *contextid, const char *description)
 register a context More...
 
void registerContext (DltContext &handle, const char *contextid, const char *description, const DltLogLevelType level, const DltTraceStatusType status)
 
void unregisterContext (DltContext &handle)
 
bool getEnabled ()
 
 ~CAmDltWrapper ()
 
bool init (DltLogLevelType loglevel, DltContext *context=NULL)
 
bool checkLogLevel (DltLogLevelType logLevel)
 
void deinit ()
 
void send ()
 
void append (const int8_t value)
 
void append (const uint8_t value)
 
void append (const int16_t value)
 
void append (const uint16_t value)
 
void append (const int32_t value)
 
void append (const uint32_t value)
 
void append (const uint64_t value)
 
void append (const int64_t value)
 
void append (const std::string &value)
 
void append (const bool value)
 
void append (const std::vector< uint8_t > &data)
 
template<class T >
void appendNoDLT (T value)
 
template<typename T = const char*>
void append (const char *value)
 
template<typename T = const am_Error_e>
void append (const am_Error_e value)
 
template<typename T = const am_SourceState_e>
void append (const am_SourceState_e value)
 
template<typename T = const am_MuteState_e>
void append (const am_MuteState_e value)
 
template<typename T = const am_DomainState_e>
void append (const am_DomainState_e value)
 
template<typename T = const am_ConnectionState_e>
void append (const am_ConnectionState_e value)
 
template<typename T = const am_Availability_e>
void append (const am_Availability_e value)
 
template<typename T = const am_InterruptState_e>
void append (const am_InterruptState_e value)
 
template<typename T = const am_Handle_e>
void append (const am_Handle_e value)
 
template<typename T = const am_Handle_s>
void append (const am_Handle_s value)
 
template<typename T = const am_NotificationStatus_e>
void append (const am_NotificationStatus_e value)
 
template<typename T >
void append (T *value)
 
template<typename T >
void append (T value)
 
void append (void)
 
template<typename T , typename... TArgs>
void append (T value, TArgs...args)
 

Static Public Member Functions

static CAmDltWrapperinstanctiateOnce (const char *appid, const char *description, const bool debugEnabled=true, const logDestination logDest=logDestination::DAEMON, const std::string Filename="", bool onlyError=false)
 Instanciate the Dlt Wrapper. More...
 
static CAmDltWrapperinstance ()
 get the Wrapper Instance More...
 

Detailed Description

Wraps around the dlt.

This class is instantiated as a singleton and offers a default context (maincontext) that is registered to log to. Logging under the default context can simply be done with the logInfo/logError templates with up to 10 values at a time. For logging with a different context, you can use the log template. First register a context with registerContext.

Definition at line 106 of file CAmDltWrapper.h.

Member Enumeration Documentation

Enumerator
DAEMON 

logging with the DLT daemon

COMMAND_LINE 

logging with commandline

FILE_OUT 

logging into a file

Definition at line 127 of file CAmDltWrapper.h.

Constructor & Destructor Documentation

am::CAmDltWrapper::~CAmDltWrapper ( )

Definition at line 585 of file CAmDltWrapper.cpp.

Member Function Documentation

void am::CAmDltWrapper::append ( const int8_t  value)

Definition at line 643 of file CAmDltWrapper.cpp.

void am::CAmDltWrapper::append ( const uint8_t  value)

Definition at line 648 of file CAmDltWrapper.cpp.

void am::CAmDltWrapper::append ( const int16_t  value)

Definition at line 653 of file CAmDltWrapper.cpp.

void am::CAmDltWrapper::append ( const uint16_t  value)

Definition at line 658 of file CAmDltWrapper.cpp.

void am::CAmDltWrapper::append ( const int32_t  value)

Definition at line 663 of file CAmDltWrapper.cpp.

void am::CAmDltWrapper::append ( const uint32_t  value)

Definition at line 668 of file CAmDltWrapper.cpp.

void am::CAmDltWrapper::append ( const uint64_t  value)

Definition at line 688 of file CAmDltWrapper.cpp.

void am::CAmDltWrapper::append ( const int64_t  value)

Definition at line 683 of file CAmDltWrapper.cpp.

void am::CAmDltWrapper::append ( const std::string &  value)

Definition at line 673 of file CAmDltWrapper.cpp.

void am::CAmDltWrapper::append ( const bool  value)

Definition at line 678 of file CAmDltWrapper.cpp.

void am::CAmDltWrapper::append ( const std::vector< uint8_t > &  data)

Definition at line 693 of file CAmDltWrapper.cpp.

template<typename T = const char*>
void am::CAmDltWrapper::append ( const char *  value)
inline

Definition at line 196 of file CAmDltWrapper.h.

template<typename T = const am_Error_e>
void am::CAmDltWrapper::append ( const am_Error_e  value)
inline

Definition at line 227 of file CAmDltWrapper.h.

template<typename T = const am_SourceState_e>
void am::CAmDltWrapper::append ( const am_SourceState_e  value)
inline

Definition at line 239 of file CAmDltWrapper.h.

template<typename T = const am_MuteState_e>
void am::CAmDltWrapper::append ( const am_MuteState_e  value)
inline

Definition at line 251 of file CAmDltWrapper.h.

template<typename T = const am_DomainState_e>
void am::CAmDltWrapper::append ( const am_DomainState_e  value)
inline

Definition at line 262 of file CAmDltWrapper.h.

template<typename T = const am_ConnectionState_e>
void am::CAmDltWrapper::append ( const am_ConnectionState_e  value)
inline

Definition at line 273 of file CAmDltWrapper.h.

template<typename T = const am_Availability_e>
void am::CAmDltWrapper::append ( const am_Availability_e  value)
inline

Definition at line 284 of file CAmDltWrapper.h.

template<typename T = const am_InterruptState_e>
void am::CAmDltWrapper::append ( const am_InterruptState_e  value)
inline

Definition at line 295 of file CAmDltWrapper.h.

template<typename T = const am_Handle_e>
void am::CAmDltWrapper::append ( const am_Handle_e  value)
inline

Definition at line 306 of file CAmDltWrapper.h.

template<typename T = const am_Handle_s>
void am::CAmDltWrapper::append ( const am_Handle_s  value)
inline

Definition at line 317 of file CAmDltWrapper.h.

template<typename T = const am_NotificationStatus_e>
void am::CAmDltWrapper::append ( const am_NotificationStatus_e  value)
inline

Definition at line 323 of file CAmDltWrapper.h.

template<typename T >
void am::CAmDltWrapper::append ( T *  value)
inline

Definition at line 335 of file CAmDltWrapper.h.

template<typename T >
void am::CAmDltWrapper::append ( value)
inline

Definition at line 343 of file CAmDltWrapper.h.

void am::CAmDltWrapper::append ( void  )
inline

Definition at line 351 of file CAmDltWrapper.h.

template<typename T , typename... TArgs>
void am::CAmDltWrapper::append ( value,
TArgs...  args 
)
inline

Definition at line 352 of file CAmDltWrapper.h.

template<class T >
void am::CAmDltWrapper::appendNoDLT ( value)
inline

Definition at line 190 of file CAmDltWrapper.h.

bool am::CAmDltWrapper::checkLogLevel ( DltLogLevelType  logLevel)
inline

Definition at line 160 of file CAmDltWrapper.h.

void am::CAmDltWrapper::deinit ( )

Definition at line 596 of file CAmDltWrapper.cpp.

bool am::CAmDltWrapper::getEnabled ( )

Definition at line 173 of file CAmDltWrapper.cpp.

bool am::CAmDltWrapper::init ( DltLogLevelType  loglevel,
DltContext context = NULL 
)

Definition at line 625 of file CAmDltWrapper.cpp.

CAmDltWrapper * am::CAmDltWrapper::instance ( )
static

get the Wrapper Instance

Definition at line 159 of file CAmDltWrapper.cpp.

CAmDltWrapper * am::CAmDltWrapper::instanctiateOnce ( const char *  appid,
const char *  description,
const bool  debugEnabled = true,
const logDestination  logDest = logDestination::DAEMON,
const std::string  Filename = "",
bool  onlyError = false 
)
static

Instanciate the Dlt Wrapper.

Parameters
appidThe AppID
descriptionA description of the Application
debugEnabledif set to true, debug outputs will be generated, default = true
logDestthe destination, the log should be written
Filenamethe filename with absolute path where the log shall be written. only needed if logDest==FILE_OUT
onlyErrorif set to true, only errors will be logged. just valid for commandline and file logs, default value = false

Definition at line 150 of file CAmDltWrapper.cpp.

void am::CAmDltWrapper::registerContext ( DltContext handle,
const char *  contextid,
const char *  description 
)

register a context

Definition at line 599 of file CAmDltWrapper.cpp.

void am::CAmDltWrapper::registerContext ( DltContext handle,
const char *  contextid,
const char *  description,
const DltLogLevelType  level,
const DltTraceStatusType  status 
)

Definition at line 612 of file CAmDltWrapper.cpp.

void am::CAmDltWrapper::send ( )

Definition at line 631 of file CAmDltWrapper.cpp.

void am::CAmDltWrapper::unregisterContext ( DltContext handle)

Definition at line 593 of file CAmDltWrapper.cpp.


The documentation for this class was generated from the following files: