Dataflow Runtime API  3.1.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::am3354::I2CTransactionHandlerAP imt::base::dff::activeparts::stm32f103hd::i2c::I2CTransactionHandlerAP imt::base::dff::activeparts::test::TestLoggerAP

Public Member Functions

 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...
 
virtual void execute (const uint16_t 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 (void)
 Destructor. More...
 

Public Attributes

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

Protected Member Functions

virtual void onInitialize (void)=0
 1st step = called by initialize(). More...
 
virtual void onStart (void)=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 ( const imt::base::dff::runtime::RuntimePriority::Id  priority,
const imt::base::dff::runtime::ExecutableConfiguration  executableConfiguration = imt::base::dff::runtime::ExecutableConfiguration() 
)
explicit

Constructor.

Parameters
priorityPriority of the active part.
executableConfigurationExecutable configuration

◆ ~ActivePartAbs()

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

Destructor.

Member Function Documentation

◆ getExecutableConfiguration()

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

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

◆ getPriority()

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

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

◆ initialize()

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

Initialize the active part.

Register in runtime and create internal connections.

◆ isInitialized()

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

Check if active part is initialized.

Returns
True if active part is initialized.

◆ isStarted()

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

Implements imt::base::dff::runtime::TimerServiceIfc.

◆ onInitialize()

virtual void imt::base::dff::activeparts::ActivePartAbs::onInitialize ( void  )
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, imt::base::dff::activeparts::stm32f103hd::i2c::I2CTransactionHandlerAP, and imt::base::dff::activeparts::am3354::I2CTransactionHandlerAP.

◆ onStart()

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

◆ start()

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

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,
const uint32_t  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.

Implements imt::base::dff::runtime::TimerServiceIfc.

◆ startPeriodicTimer()

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

Implements imt::base::dff::runtime::TimerServiceIfc.

Member Data Documentation

◆ PortIn

const PortInput& 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: