Dataflow Runtime API  3.1.1.0
Classes | Public Member Functions | Protected Member Functions | List of all members
imt::base::dff::activeparts::test::TestLoggerAP Class Reference

Test logger for unit test which registers itself as Logger in Runtime and stores the received log entries. More...

#include <Imt.Base.Dff.ActiveParts.Test/TestLoggerAP.h>

Inheritance diagram for imt::base::dff::activeparts::test::TestLoggerAP:
imt::base::dff::activeparts::ActivePartAbs imt::base::dff::runtime::ExecutableIfc imt::base::dff::runtime::TimerServiceIfc

Classes

struct  LogEntryContainer
 Container which stores the received data. More...
 

Public Member Functions

 TestLoggerAP (void)
 Constructor. More...
 
virtual ~TestLoggerAP (void)
 Destructor. More...
 
virtual void execute (const uint16_t protocolIdentifier, imt::base::core::serialization::Deserializer &deserializer)
 
bool hasLogs (void) const
 Check if at least one log entry is available. More...
 
uint32_t getLogCount (void) const
 Returns the currently available log entries count. More...
 
const std::vector< LogEntryContainer > & getLogEntries (void) const
 Returns the log entries buffer. More...
 
void popLogEntry (void)
 Pops the oldest log entry from the buffer if one is available. More...
 
- Public Member Functions inherited from imt::base::dff::activeparts::ActivePartAbs
 ActivePartAbs (const imt::base::dff::runtime::RuntimePriority::Id priority, const imt::base::dff::runtime::ExecutableConfiguration executableConfiguration=imt::base::dff::runtime::ExecutableConfiguration())
 Constructor. More...
 
virtual ~ActivePartAbs (void)
 Destructor. More...
 
virtual const imt::base::dff::runtime::ExecutableConfigurationgetExecutableConfiguration (void) const
 
virtual imt::base::dff::runtime::RuntimePriority::Id getPriority (void) const
 
void initialize (void)
 Initialize the active part. More...
 
void start (void)
 Start the active part. More...
 
bool isInitialized (void) const
 Check if active part is initialized. More...
 
bool isStarted (void) const
 Check if active part is started. More...
 
virtual void startOneShotTimer (imt::base::dff::runtime::RuntimeTimer::TimerHandle &timerToStart, const uint32_t timerTicksMs) const
 Starts or restarts the given one shot timer for this active part. More...
 
virtual void startPeriodicTimer (imt::base::dff::runtime::RuntimeTimer::TimerHandle &timerToStart, const uint32_t intervalMs) const
 Start a periodic timer for this active part. More...
 
virtual void killTimer (imt::base::dff::runtime::RuntimeTimer::TimerHandle &timerToKill) const
 Kill the given timer (if required). More...
 
- Public Member Functions inherited from imt::base::dff::runtime::ExecutableIfc
virtual ~ExecutableIfc (void)
 Destructor. More...
 
- Public Member Functions inherited from imt::base::dff::runtime::TimerServiceIfc
virtual ~TimerServiceIfc (void)
 Destructor. More...
 

Protected Member Functions

virtual void onInitialize (void)
 
virtual void onStart (void)
 

Additional Inherited Members

- Public Attributes inherited from imt::base::dff::activeparts::ActivePartAbs
const PortInputPortIn
 Input Port of the active part (as a public visible read-only reference). More...
 

Detailed Description

Test logger for unit test which registers itself as Logger in Runtime and stores the received log entries.

Constructor & Destructor Documentation

◆ TestLoggerAP()

imt::base::dff::activeparts::test::TestLoggerAP::TestLoggerAP ( void  )
explicit

Constructor.

◆ ~TestLoggerAP()

virtual imt::base::dff::activeparts::test::TestLoggerAP::~TestLoggerAP ( void  )
virtual

Destructor.

Member Function Documentation

◆ execute()

virtual void imt::base::dff::activeparts::test::TestLoggerAP::execute ( const uint16_t  protocolIdentifier,
imt::base::core::serialization::Deserializer deserializer 
)
virtual
See also
ExecutableIfc

Implements imt::base::dff::runtime::ExecutableIfc.

◆ getLogCount()

uint32_t imt::base::dff::activeparts::test::TestLoggerAP::getLogCount ( void  ) const

Returns the currently available log entries count.

Returns
uint32_t: log entries count

◆ getLogEntries()

const std::vector<LogEntryContainer>& imt::base::dff::activeparts::test::TestLoggerAP::getLogEntries ( void  ) const

Returns the log entries buffer.

Returns
const std::vector<LogEntryContainer>&: the log entries

◆ hasLogs()

bool imt::base::dff::activeparts::test::TestLoggerAP::hasLogs ( void  ) const

Check if at least one log entry is available.

Returns
bool: true if a log entry is available, else false

◆ onInitialize()

virtual void imt::base::dff::activeparts::test::TestLoggerAP::onInitialize ( void  )
protectedvirtual

◆ onStart()

virtual void imt::base::dff::activeparts::test::TestLoggerAP::onStart ( void  )
protectedvirtual

◆ popLogEntry()

void imt::base::dff::activeparts::test::TestLoggerAP::popLogEntry ( void  )

Pops the oldest log entry from the buffer if one is available.


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