Dataflow Runtime API  4.0.1.0
Public Member Functions | Public Attributes | Protected Member Functions | List of all members
imt::base::dff::activeparts::ActivePartAbs Class Referenceabstract

Abstract base class for an ActivePart. More...

#include <Imt.Base.Dff.ActiveParts/ActivePartAbs.h>

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

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...
 

Detailed Description

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.

Constructor & Destructor Documentation

◆ ActivePartAbs()

imt::base::dff::activeparts::ActivePartAbs::ActivePartAbs ( ::imt::base::dff::runtime::RuntimePriority const  priority,
::imt::base::dff::runtime::ExecutableConfiguration const  executableConfiguration = ::imt::base::dff::runtime::ExecutableConfiguration() 
)
explicit

Constructor.

Parameters
priorityPriority of the active part.
executableConfigurationExecutable configuration

◆ ~ActivePartAbs()

virtual imt::base::dff::activeparts::ActivePartAbs::~ActivePartAbs ( )
virtual

Destructor.

Member Function Documentation

◆ getExecutableConfiguration()

virtual ::imt::base::dff::runtime::ExecutableConfiguration const& imt::base::dff::activeparts::ActivePartAbs::getExecutableConfiguration ( ) const
virtual
See also
ExecutableIfc

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

◆ getPriority()

virtual ::imt::base::dff::runtime::RuntimePriority imt::base::dff::activeparts::ActivePartAbs::getPriority ( ) const
virtual
See also
ExecutableIfc

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

◆ initialize()

void imt::base::dff::activeparts::ActivePartAbs::initialize ( )

Initialize the active part.

Register in runtime and create internal connections.

◆ isInitialized()

bool imt::base::dff::activeparts::ActivePartAbs::isInitialized ( ) const

Check if active part is initialized.

Returns
True if active part is initialized.

◆ isStarted()

bool imt::base::dff::activeparts::ActivePartAbs::isStarted ( ) const

Check if active part is started.

Returns
True if acrive part is started.

◆ killTimer()

virtual void imt::base::dff::activeparts::ActivePartAbs::killTimer ( ::imt::base::dff::runtime::RuntimeTimer::TimerHandle timerToKill) const
virtual

Kill the given timer (if required).

Parameters
timerToKillHandle of the timer to be killed.

◆ onInitialize()

virtual void imt::base::dff::activeparts::ActivePartAbs::onInitialize ( )
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.

◆ onStart()

virtual void imt::base::dff::activeparts::ActivePartAbs::onStart ( )
protectedpure virtual

2nd step = called by start().

Starts the active part and send all initialization messages.

Implemented in imt::base::dff::activeparts::test::TestLoggerAP.

◆ start()

void imt::base::dff::activeparts::ActivePartAbs::start ( )

Start the active part.

Here is the correct place to send the initialization messages.

◆ startOneShotTimer()

virtual void imt::base::dff::activeparts::ActivePartAbs::startOneShotTimer ( ::imt::base::dff::runtime::RuntimeTimer::TimerHandle timerToStart,
uint32_t const  timerTicksMs 
) const
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.

Parameters
timerToStartTimer to be started.
timerTicksMsTimer delay in milliseconds.

◆ startPeriodicTimer()

virtual void imt::base::dff::activeparts::ActivePartAbs::startPeriodicTimer ( ::imt::base::dff::runtime::RuntimeTimer::TimerHandle timerToStart,
uint32_t const  intervalMs 
) const
virtual

Start a periodic timer for this active part.

In case of invalid parameters, an invalid time handle is returned.

Parameters
timerToStartTimer to be started.
intervalMsTimer period in milliseconds.

Member Data Documentation

◆ PortIn

PortInput const& imt::base::dff::activeparts::ActivePartAbs::PortIn

Input Port of the active part (as a public visible read-only reference).

Note
It is placed at the end because the instance has to be initialized before the reference

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