Imt.Base C++ API V4.1.1.0
Loading...
Searching...
No Matches
imt::base::dff::activeparts::test::TestLoggerAP Class Referencefinal

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>

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

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.
 
- Public Member Functions inherited from imt::base::dff::activeparts::ActivePartAbs
 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).
 
- Public Member Functions inherited from imt::base::dff::runtime::ExecutableIfc
 ExecutableIfc (ExecutableIfc const &)=delete
 
 ExecutableIfc (ExecutableIfc &&)=delete
 
ExecutableIfcoperator= (ExecutableIfc const &) &=delete
 
ExecutableIfcoperator= (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.
 
- Public Member Functions inherited from imt::base::dff::runtime::TimerServiceIfc
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().
 
- Protected Member Functions inherited from imt::base::dff::runtime::ExecutableIfc
 ExecutableIfc () noexcept=default
 Default constructor.
 
- Protected Member Functions inherited from imt::base::dff::runtime::TimerServiceIfc
 TimerServiceIfc () noexcept=default
 
 TimerServiceIfc (TimerServiceIfc const &) noexcept=delete
 
 TimerServiceIfc (TimerServiceIfc &&) noexcept=delete
 
 ~TimerServiceIfc () noexcept=default
 
TimerServiceIfcoperator= (TimerServiceIfc const &) &noexcept=delete
 
TimerServiceIfcoperator= (TimerServiceIfc &&) &noexcept=delete
 

Additional Inherited Members

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

Detailed Description

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.

Constructor & Destructor Documentation

◆ TestLoggerAP()

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

Constructor.

Member Function Documentation

◆ execute()

void imt::base::dff::activeparts::test::TestLoggerAP::execute ( uint16_t const  protocolIdentifier,
::imt::base::core::serialization::Deserializer buffer 
)
finalvirtual

◆ getLogCount()

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

Returns the currently available log entries count.

Returns
uint32_t: log entries count

◆ getLogEntries()

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

Returns the log entries buffer.

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

◆ hasLogs()

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

Check if at least one log entry is available.

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

◆ onInitialize()

void imt::base::dff::activeparts::test::TestLoggerAP::onInitialize ( )
finalprotectedvirtual

◆ onStart()

void imt::base::dff::activeparts::test::TestLoggerAP::onStart ( )
finalprotectedvirtual

◆ popLogEntry()

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

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


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