![]() |
Imt.Base C++ API V4.1.1.0
|
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/inc/Imt.Base.Dff.ActiveParts.Test/TestLoggerAP.h>
Classes | |
struct | LogEntryContainer |
Container which stores the received data. More... | |
Public Member Functions | |
TestLoggerAP () | |
Constructor. | |
void | execute (uint16_t const protocolIdentifier, ::imt::base::core::serialization::Deserializer &buffer) final |
bool | hasLogs () const |
Check if at least one log entry is available. | |
uint32_t | getLogCount () const |
Returns the currently available log entries count. | |
std::vector< LogEntryContainer > const & | getLogEntries () const |
Returns the log entries buffer. | |
void | popLogEntry () |
Pops the oldest log entry from the buffer if one is available. | |
![]() | |
ActivePartAbs (::imt::base::dff::runtime::RuntimePriority const priority, ::imt::base::dff::runtime::ExecutableConfiguration const configuration=::imt::base::dff::runtime::ExecutableConfiguration()) | |
Constructor. | |
::imt::base::dff::runtime::ExecutableConfiguration const & | getExecutableConfiguration () const final |
::imt::base::dff::runtime::RuntimePriority | getPriority () const final |
void | initialize () |
Initialize the active part. | |
void | start () |
Start the active part. | |
bool | isInitialized () const |
Check if active part is initialized. | |
bool | isStarted () const |
Check if active part is started. | |
::imt::base::dff::runtime::RuntimeTimer::TimerHandle | startOneShotTimer (::imt::base::dff::runtime::RuntimeTimer::TimerHandle timerToStart, uint32_t const timerTicksMs) const final |
Starts or restarts the given one shot timer for this active part. | |
::imt::base::dff::runtime::RuntimeTimer::TimerHandle | startPeriodicTimer (::imt::base::dff::runtime::RuntimeTimer::TimerHandle timerToStart, uint32_t const intervalMs) const final |
Start a periodic timer for this active part. | |
::imt::base::dff::runtime::RuntimeTimer::TimerHandle | killTimer (::imt::base::dff::runtime::RuntimeTimer::TimerHandle timerToKill) const final |
Kill the given timer (if required). | |
![]() | |
ExecutableIfc (ExecutableIfc const &)=delete | |
ExecutableIfc (ExecutableIfc &&)=delete | |
ExecutableIfc & | operator= (ExecutableIfc const &) &=delete |
ExecutableIfc & | operator= (ExecutableIfc &&) &=delete |
virtual | ~ExecutableIfc ()=default |
Destructor. | |
virtual void | execute (uint16_t const protocolID, ::imt::base::core::serialization::Deserializer &buffer)=0 |
One-Shot function which is called once a message is ready to be processed. | |
virtual ExecutableConfiguration const & | getExecutableConfiguration () const =0 |
Get the executable configuration. | |
virtual RuntimePriority | getPriority () const =0 |
Get a priority. | |
![]() | |
virtual RuntimeTimer::TimerHandle | startOneShotTimer (RuntimeTimer::TimerHandle timerToStart, uint32_t const timerTicksMs) const =0 |
Starts or restarts the given one shot timer for this ActivePart. | |
virtual RuntimeTimer::TimerHandle | startPeriodicTimer (RuntimeTimer::TimerHandle timerToStart, uint32_t const intervalMs) const =0 |
Start a periodic timer for this ActivePart. | |
virtual RuntimeTimer::TimerHandle | killTimer (RuntimeTimer::TimerHandle timerToKill) const =0 |
Kill an existing timer. | |
Protected Member Functions | |
void | onInitialize () final |
void | onStart () final |
virtual void | onInitialize ()=0 |
1st step = called by initialize(). | |
virtual void | onStart ()=0 |
2nd step = called by start(). | |
![]() | |
ExecutableIfc () noexcept=default | |
Default constructor. | |
![]() | |
TimerServiceIfc () noexcept=default | |
TimerServiceIfc (TimerServiceIfc const &) noexcept=delete | |
TimerServiceIfc (TimerServiceIfc &&) noexcept=delete | |
~TimerServiceIfc () noexcept=default | |
TimerServiceIfc & | operator= (TimerServiceIfc const &) &noexcept=delete |
TimerServiceIfc & | operator= (TimerServiceIfc &&) &noexcept=delete |
Additional Inherited Members | |
![]() | |
PortInput const & | PortIn |
Input Port of the active part (as a public visible read-only reference). | |
Test logger for unit test which registers itself as Logger in Runtime and stores the received log entries.
Definition at line 54 of file TestLoggerAP.h.
imt::base::dff::activeparts::test::TestLoggerAP::TestLoggerAP | ( | ) |
Constructor.
|
finalvirtual |
Implements imt::base::dff::runtime::ExecutableIfc.
uint32_t imt::base::dff::activeparts::test::TestLoggerAP::getLogCount | ( | ) | const |
Returns the currently available log entries count.
std::vector< LogEntryContainer > const & imt::base::dff::activeparts::test::TestLoggerAP::getLogEntries | ( | ) | const |
Returns the log entries buffer.
bool imt::base::dff::activeparts::test::TestLoggerAP::hasLogs | ( | ) | const |
Check if at least one log entry is available.
|
finalprotectedvirtual |
Implements imt::base::dff::activeparts::ActivePartAbs.
|
finalprotectedvirtual |
Implements imt::base::dff::activeparts::ActivePartAbs.
void imt::base::dff::activeparts::test::TestLoggerAP::popLogEntry | ( | ) |
Pops the oldest log entry from the buffer if one is available.