ApparatusFramework::BufferLog Class Reference
[Diagnostic Services]

#include <DiagnosticServices/current/include/BufferLog.h>

Inheritance diagram for ApparatusFramework::BufferLog:
ApparatusFramework::DeferredLogger

List of all members.

Public Member Functions

void initialize ()
void startup ()
virtual void doLog (const TaskId taskId, const uint16 event, Msg *pMsg)
bool dumpBufferEntries (uint16 start=0, uint16 number=0)

Static Public Member Functions

static BufferLogCreate ()
static BufferLogDefault ()
static bool IsCreated ()

Protected Member Functions

 BufferLog ()
 BufferLog (const BufferLog &lValue)
virtual ~BufferLog ()
BufferLogoperator= (const BufferLog &lvalue)

Detailed Description

Logs system events into a buffer. The buffer is implemented as an overwrite queue, the oldest event is replaced by a new one. The entries in the buffer can be dumped to a debug output at any time. Please refer to the Logger class to see what events can be logged.

Definition at line 69 of file BufferLog.h.


Constructor & Destructor Documentation

ApparatusFramework::BufferLog::BufferLog (  )  [protected]

Constructors, Destructors Default constructor. Constructs a new object of this class.

ApparatusFramework::BufferLog::BufferLog ( const BufferLog lValue  )  [protected]

Copy constructor. Memberwise copy of one object into the other object.

Parameters:
lValue Reference of the object to copied
virtual ApparatusFramework::BufferLog::~BufferLog (  )  [protected, virtual]

Default destructor. Destroys the object and releases all used resources.


Member Function Documentation

static BufferLog* ApparatusFramework::BufferLog::Create (  )  [static]

singleton methods Creates an instance of the singleton if none exists yet. The object is created in static memory.

Returns:
A pointer to the created singleton instance.
static BufferLog* ApparatusFramework::BufferLog::Default (  )  [static]

References an instance that has been previously created.

Returns:
A pointer to the singleton instance.
virtual void ApparatusFramework::BufferLog::doLog ( const TaskId  taskId,
const uint16  event,
Msg pMsg 
) [virtual]

Deferred Logging Traces the event generated by the task with the given task identifier. This method is only called if the filter configuration allows it.

Parameters:
taskId Identifier of the task.
event Event on which the logger did react.
pMsg Message used when the event was generated.

Implements ApparatusFramework::DeferredLogger.

bool ApparatusFramework::BufferLog::dumpBufferEntries ( uint16  start = 0,
uint16  number = 0 
)

Prints the specified number of entries onto the log device.

Parameters:
start Start of the dump (default 0).
number Number of entries to be dumped. If set to 0, all entries from start to the end of the buffer are dumped (default).
Returns:
True if the request could be executed, false if the parameters are out of range.
void ApparatusFramework::BufferLog::initialize (  ) 

Factory Startup Initializes the buffer log according to the factory startup pattern. Registers this object with the logger.

static bool ApparatusFramework::BufferLog::IsCreated (  )  [static]

States whether an instance of this singleton has been created.

Returns:
True if an instance has been created, false otherwise.
BufferLog& ApparatusFramework::BufferLog::operator= ( const BufferLog lvalue  )  [protected]

Operators Assignment operator.

Parameters:
lvalue Reference to the object to be copied
Returns:
Reference to the copied object
void ApparatusFramework::BufferLog::startup (  ) 

Starts up the buffer log according to the factory startup pattern.

© 2004-2010 bbv Software Services AG / Apparatus Services