Diagnostic Services

Classes

class  ApparatusFramework::ActivityLog
class  ApparatusFramework::BufferLog
class  ApparatusFramework::CmdInter
class  ApparatusFramework::CommonCmds
class  ApparatusFramework::DoubleDeviceLogger
class  ApparatusFramework::DeferredLogger
class  ApparatusFramework::TraceTextMsg
class  ApparatusFramework::Logger
class  ApparatusFramework::LogMsg
class  ApparatusFramework::LogMsgMgr

Typedefs

typedef bool(* ApparatusFramework::CmdInterFp )(const char *)
typedef uint16 ApparatusFramework::CmdInterId

Enumerations

enum  ApparatusFramework::LogLevel { ApparatusFramework::LOG_ERROR = 0, ApparatusFramework::LOG_WARNING = 1, ApparatusFramework::LOG_INFO = 2, ApparatusFramework::LOG_DEBUG = 3 }
enum  ApparatusFramework::LogDevice { ApparatusFramework::ERROR_LOG_DEVICE = 0, ApparatusFramework::DEBUG_LOG_DEVICE = 1 }
enum  ApparatusFramework::CharDeviceRetVal {
  ApparatusFramework::CHAR_DEVICE_SUCCESS = 0, ApparatusFramework::CHAR_DEVICE_GENERIC_FAILURE = -1, ApparatusFramework::CHAR_DEVICE_OPEN_FAILED = -2, ApparatusFramework::CHAR_DEVICE_CLOSE_FAILED = -3,
  ApparatusFramework::CHAR_DEVICE_SEEK_FAILED = -4, ApparatusFramework::CHAR_DEVICE_IOCTL_FAILED = -5, ApparatusFramework::CHAR_DEVICE_WRITE_FAILED = -6, ApparatusFramework::CHAR_DEVICE_READ_FAILED = -7,
  ApparatusFramework::CHAR_DEVICE_NAME_TOO_LONG = -8, ApparatusFramework::CHAR_DEVICE_WRITE_TIMEOUT = -9, ApparatusFramework::CHAR_DEVICE_READ_TIMEOUT = -10, ApparatusFramework::CHAR_DEVICE_NOT_OPEN = -11
}

Variables

const uint16 ApparatusFramework::MAX_BUFFER_LOG_SIZE = BBVPKG_DIAGNOSTICSERVICES_BUFFERLOG_MAX_BUFFER_LOG_SIZE
const uint16 ApparatusFramework::MAX_NR_OF_LOG_FILTER_ITEMS
const uint16 ApparatusFramework::MAX_LOG_BUFFER_SIZE
const uint16 ApparatusFramework::MAX_NR_OF_LOG_MSGS = BBVPKG_DIAGNOSTICSERVICES_LOGMSGMANAGER_MAXNROFLOGMSGS

Detailed Description

The Diagnostic Services package provides classes to log events and interactively execute commands. Logging and command interpretation are vital functions during the development phase of a product and come in handy during the maintenance phase.

Our logging mechanism is highly configurable and can be tailored to the specific needs of a product. Logging can take place directly in the context of the calling task or in the context of a separate background task. Logs can be redirected to any character device, to a file, or to a ring buffer in memory. Logging can be switched on or off during runtime at a task/event level. Many components of the Apparatus Framework take advantage of these capabilities: e.g. the logging of inter-task messages is readily available.

The command interpreter provides interactive listing and executing of commands. The list of commands can be freely extended. Classes can add their own commands to the interpreter during runtime.


Typedef Documentation

typedef bool(* ApparatusFramework::CmdInterFp)(const char *)

Types Creates a type name for a function pointer. The function must have as return value a boolean and as parameter a character arrray.

Definition at line 62 of file CmdInter.h.

Creates a type name for command interpreter id's.

Definition at line 67 of file CmdInter.h.


Enumeration Type Documentation

Defines the return values of any character device function.

Enumerator:
CHAR_DEVICE_SUCCESS 

Operation successfully completed

CHAR_DEVICE_GENERIC_FAILURE 

General device error occured

CHAR_DEVICE_OPEN_FAILED 

Device open failed

CHAR_DEVICE_CLOSE_FAILED 

Device close failed

CHAR_DEVICE_SEEK_FAILED 

Seek operation failed

CHAR_DEVICE_IOCTL_FAILED 

IoCtl function failed

CHAR_DEVICE_WRITE_FAILED 

Write function failed

CHAR_DEVICE_READ_FAILED 

Read function failed

CHAR_DEVICE_NAME_TOO_LONG 

Device name is too long

CHAR_DEVICE_WRITE_TIMEOUT 

Timeout while writing to the device occured

CHAR_DEVICE_READ_TIMEOUT 

Timeout while reading from the device occured

CHAR_DEVICE_NOT_OPEN 

Operation executed even the device is not open

Definition at line 81 of file CharDevice.h.

Enumerator:
ERROR_LOG_DEVICE 

error conditions

DEBUG_LOG_DEVICE 

warning conditions

Definition at line 108 of file DoubleDeviceLogger.h.

This determines the importance of the message. This levels are in order of decreasing importance:

Enumerator:
LOG_ERROR 

error conditions

LOG_WARNING 

warning conditions

LOG_INFO 

informational message

LOG_DEBUG 

debug-level message

Definition at line 99 of file DoubleDeviceLogger.h.


Variable Documentation

const uint16 ApparatusFramework::MAX_BUFFER_LOG_SIZE = BBVPKG_DIAGNOSTICSERVICES_BUFFERLOG_MAX_BUFFER_LOG_SIZE

constants Size of the message queue for the logger, the constant has to be defined in the configuration tool. The define is saved in a constant, because otherwise there is no type check.

Definition at line 60 of file BufferLog.h.

Initial value:

                                   BBVINT_DIAGNOSTICSERVICES_LOGGER_LOGBUFFER_SIZE

Maximal buffer size for the logger, the constant has to be defined in the configuration tool. The define is saved in a constant, because otherwise there is no type check.

Definition at line 117 of file Logger.h.

Initial value:

                                          BBVINT_DIAGNOSTICSERVICES_LOGGER_FILTERLIST_SIZE

constants Maximal number of log filter items, the constant has to be defined in the configuration tool. The define is saved in a constant, because otherwise there is no type check.

Definition at line 105 of file Logger.h.

const uint16 ApparatusFramework::MAX_NR_OF_LOG_MSGS = BBVPKG_DIAGNOSTICSERVICES_LOGMSGMANAGER_MAXNROFLOGMSGS

Maximal number of log messges for the log message manager, the constant has to be defined in the configuration tool. The define is saved in a constant, because otherwise there is no type check.

Definition at line 57 of file LogMsgMgr.h.

© 2004-2010 bbv Software Services AG / Apparatus Services