Dataflow Runtime API  3.1.1.0
Public Member Functions | List of all members
imt::base::dff::runtime::ExecutableIfc Class Referenceabstract

Interface of an executable which is called by the runtime once an event has to be processed. More...

#include <Imt.Base.Dff.Runtime/ExecutableIfc.h>

Inheritance diagram for imt::base::dff::runtime::ExecutableIfc:
imt::base::dff::activeparts::ActivePartAbs imt::base::dff::activeparts::am3354::I2CTransactionHandlerAP imt::base::dff::activeparts::stm32f103hd::i2c::I2CTransactionHandlerAP imt::base::dff::activeparts::test::TestLoggerAP

Public Member Functions

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...
 
virtual const ExecutableConfigurationgetExecutableConfiguration (void) const =0
 Get the executable configuration. More...
 
virtual RuntimePriority::Id getPriority (void) const =0
 Get a priority. More...
 

Detailed Description

Interface of an executable which is called by the runtime once an event has to be processed.

Note
The executable has to be registered in RuntimeCore::create in order to receive events.

Constructor & Destructor Documentation

◆ ~ExecutableIfc()

virtual imt::base::dff::runtime::ExecutableIfc::~ExecutableIfc ( void  )
inlinevirtual

Destructor.

Member Function Documentation

◆ execute()

virtual void imt::base::dff::runtime::ExecutableIfc::execute ( const uint16_t  protocolIdentifier,
imt::base::core::serialization::Deserializer deserializer 
)
pure virtual

One-Shot function which is called once a message is ready to be processed.

Behavior: Process the message (run to completion) and return to the runtime.

Example implementation:

switch (protocolIdentifier) {
RuntimeTimerEvent timerEventArgs(deserializer);
handleTimer(timerEventArgs);
break;
}
case ProtocolIdentifier::BUTTON_STATE: {
ButtonStateProtocol message(deserializer);
handleButtonState(message);
break;
}
default:
// Ignore all other protocols
ASSERT_DEBUG1(false, "Unknown protocol in ActivePart.");
break;
}
void ASSERT_DEBUG1(const bool condition, const char_t *const pMessage)
"Assert for debugging only" (ASSERT_DEBUG).
Definition: Diagnostics.h:83
static const uint16_t TIMER
RuntimeTimer Timer.
Definition: RuntimeProtocolIdentifiers.h:60
Parameters
protocolIdentifierIdentifier of the protocol.
deserializerDeserializer for deserialization of the event data.

Implemented in imt::base::dff::activeparts::test::TestLoggerAP, imt::base::dff::activeparts::stm32f103hd::i2c::I2CTransactionHandlerAP, and imt::base::dff::activeparts::am3354::I2CTransactionHandlerAP.

◆ getExecutableConfiguration()

virtual const ExecutableConfiguration& imt::base::dff::runtime::ExecutableIfc::getExecutableConfiguration ( void  ) const
pure virtual

Get the executable configuration.

Returns
ExecutableConfiguration

Implemented in imt::base::dff::activeparts::ActivePartAbs.

◆ getPriority()

virtual RuntimePriority::Id imt::base::dff::runtime::ExecutableIfc::getPriority ( void  ) const
pure virtual

Get a priority.

Returns
RuntimePriority::Id

Implemented in imt::base::dff::activeparts::ActivePartAbs.


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