AudioManager  7.5.11
Native Application Runtime Environment
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
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)
 
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 575 of file CAmDltWrapper.cpp.

Member Function Documentation

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

Definition at line 633 of file CAmDltWrapper.cpp.

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

Definition at line 638 of file CAmDltWrapper.cpp.

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

Definition at line 643 of file CAmDltWrapper.cpp.

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

Definition at line 648 of file CAmDltWrapper.cpp.

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

Definition at line 653 of file CAmDltWrapper.cpp.

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

Definition at line 658 of file CAmDltWrapper.cpp.

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

Definition at line 678 of file CAmDltWrapper.cpp.

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

Definition at line 673 of file CAmDltWrapper.cpp.

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

Definition at line 663 of file CAmDltWrapper.cpp.

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

Definition at line 668 of file CAmDltWrapper.cpp.

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

Definition at line 683 of file CAmDltWrapper.cpp.

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

Definition at line 181 of file CAmDltWrapper.h.

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

Definition at line 212 of file CAmDltWrapper.h.

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

Definition at line 224 of file CAmDltWrapper.h.

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

Definition at line 236 of file CAmDltWrapper.h.

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

Definition at line 247 of file CAmDltWrapper.h.

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

Definition at line 258 of file CAmDltWrapper.h.

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

Definition at line 269 of file CAmDltWrapper.h.

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

Definition at line 280 of file CAmDltWrapper.h.

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

Definition at line 291 of file CAmDltWrapper.h.

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

Definition at line 302 of file CAmDltWrapper.h.

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

Definition at line 308 of file CAmDltWrapper.h.

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

Definition at line 320 of file CAmDltWrapper.h.

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

Definition at line 328 of file CAmDltWrapper.h.

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

Definition at line 336 of file CAmDltWrapper.h.

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

Definition at line 337 of file CAmDltWrapper.h.

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

Definition at line 175 of file CAmDltWrapper.h.

void am::CAmDltWrapper::deinit ( )

Definition at line 586 of file CAmDltWrapper.cpp.

bool am::CAmDltWrapper::getEnabled ( )

Definition at line 163 of file CAmDltWrapper.cpp.

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

Definition at line 615 of file CAmDltWrapper.cpp.

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

get the Wrapper Instance

Definition at line 158 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 149 of file CAmDltWrapper.cpp.

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

register a context

Definition at line 589 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 602 of file CAmDltWrapper.cpp.

void am::CAmDltWrapper::send ( )

Definition at line 621 of file CAmDltWrapper.cpp.

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

Definition at line 583 of file CAmDltWrapper.cpp.


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