Dataflow Runtime API
4.0.1.0
|
Abstract base class for an ActivePart. More...
#include <Imt.Base.Dff.ActiveParts/ActivePartAbs.h>
Public Member Functions | |
ActivePartAbs (::imt::base::dff::runtime::RuntimePriority const priority, ::imt::base::dff::runtime::ExecutableConfiguration const executableConfiguration=::imt::base::dff::runtime::ExecutableConfiguration()) | |
Constructor. More... | |
virtual | ~ActivePartAbs () |
Destructor. More... | |
virtual ::imt::base::dff::runtime::ExecutableConfiguration const & | getExecutableConfiguration () const |
virtual ::imt::base::dff::runtime::RuntimePriority | getPriority () const |
void | initialize () |
Initialize the active part. More... | |
void | start () |
Start the active part. More... | |
bool | isInitialized () const |
Check if active part is initialized. More... | |
bool | isStarted () const |
Check if active part is started. More... | |
virtual void | startOneShotTimer (::imt::base::dff::runtime::RuntimeTimer::TimerHandle &timerToStart, uint32_t const 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, uint32_t const 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 () |
Destructor. More... | |
virtual void | execute (uint16_t const protocolIdentifier, ::imt::base::core::serialization::Deserializer &deserializer)=0 |
One-Shot function which is called once a message is ready to be processed. More... | |
Public Member Functions inherited from imt::base::dff::runtime::TimerServiceIfc | |
virtual | ~TimerServiceIfc () |
Destructor. More... | |
virtual void | startOneShotTimer (RuntimeTimer::TimerHandle &timerToStart, uint32_t const timerTicksMs) const =0 |
Starts or restarts the given one shot timer for this ActivePart. More... | |
virtual void | startPeriodicTimer (RuntimeTimer::TimerHandle &timerToStart, uint32_t const intervalMs) const =0 |
Start a periodic timer for this ActivePart. More... | |
virtual void | killTimer (RuntimeTimer::TimerHandle &timerToKill) const =0 |
Kill an existing timer. More... | |
Public Attributes | |
PortInput const & | PortIn |
Input Port of the active part (as a public visible read-only reference). More... | |
Protected Member Functions | |
virtual void | onInitialize ()=0 |
1st step = called by initialize(). More... | |
virtual void | onStart ()=0 |
2nd step = called by start(). More... | |
Abstract base class for an ActivePart.
ActiveParts are objects which encapsulate their private state, behavior and data. They communicate to each other solely by exchanging messages.
|
explicit |
Constructor.
priority | Priority of the active part. |
executableConfiguration | Executable configuration |
|
virtual |
Destructor.
|
virtual |
Implements imt::base::dff::runtime::ExecutableIfc.
|
virtual |
Implements imt::base::dff::runtime::ExecutableIfc.
void imt::base::dff::activeparts::ActivePartAbs::initialize | ( | ) |
Initialize the active part.
Register in runtime and create internal connections.
bool imt::base::dff::activeparts::ActivePartAbs::isInitialized | ( | ) | const |
Check if active part is initialized.
bool imt::base::dff::activeparts::ActivePartAbs::isStarted | ( | ) | const |
Check if active part is started.
|
virtual |
Kill the given timer (if required).
timerToKill | Handle of the timer to be killed. |
|
protectedpure virtual |
1st step = called by initialize().
Initialize the active part and if necessary the hardware peripherals. No messages should be sent at this stage, use onStart() function!
Implemented in imt::base::dff::activeparts::test::TestLoggerAP.
|
protectedpure virtual |
2nd step = called by start().
Starts the active part and send all initialization messages.
Implemented in imt::base::dff::activeparts::test::TestLoggerAP.
void imt::base::dff::activeparts::ActivePartAbs::start | ( | ) |
Start the active part.
Here is the correct place to send the initialization messages.
|
virtual |
Starts or restarts the given one shot timer for this active part.
In case of invalid parameters, timerToStart is set to an invalid time handle.
timerToStart | Timer to be started. |
timerTicksMs | Timer delay in milliseconds. |
|
virtual |
Start a periodic timer for this active part.
In case of invalid parameters, an invalid time handle is returned.
timerToStart | Timer to be started. |
intervalMs | Timer period in milliseconds. |
PortInput const& imt::base::dff::activeparts::ActivePartAbs::PortIn |
Input Port of the active part (as a public visible read-only reference).