ADTF
Loading...
Searching...
No Matches
adtf::system::testing::cTestLogger Class Reference

#include <test_logger.h>

Classes

struct  tMessage
 
struct  tMessages
 

Public Member Functions

 cTestLogger ()
 
 ~cTestLogger ()
 
tMessages GetCurrentMessages (bool bClear=true)
 
bool WaitForMessage (base::flash::tNanoSeconds tmTimeout=base::flash::tNanoSeconds{-1})
 

Detailed Description

Utility class to record all log messages in an ADTF System during tests.

Constructor & Destructor Documentation

◆ cTestLogger()

adtf::system::testing::lucky::cTestLogger::cTestLogger ( )

Constructor. This registers this logger at the logging service.

◆ ~cTestLogger()

adtf::system::testing::lucky::cTestLogger::~cTestLogger ( )

Destructor.

Member Function Documentation

◆ GetCurrentMessages()

tMessages adtf::system::testing::lucky::cTestLogger::GetCurrentMessages ( bool bClear = true)

Returns all messages currently received.

Parameters
[in]bClearThe internal message buffer is cleared.
Returns
The set of log messages.

◆ WaitForMessage()

bool adtf::system::testing::lucky::cTestLogger::WaitForMessage ( base::flash::tNanoSeconds tmTimeout = base::flash::tNanoSeconds{-1})

This blocks the calling context until either a message was received or the given timeout expired.

Parameters
[in]tmTimeoutThe timeout, -1 => wait indefinitely.
Returns
true if a message is available, false if the timeout expired.

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