RuntimeCore defines the basic Application Interface (API) to the core part of the event-based run to completion (RTC) kernel.
More...
#include <Imt.Base.Dff.Runtime/inc/Imt.Base.Dff.Runtime/RuntimeCore.h>
|
using | CoreHandle = int16_t |
| A CoreHandle is used to identify an executable with a unique number (similar to a phone number).
|
|
RuntimeCore defines the basic Application Interface (API) to the core part of the event-based run to completion (RTC) kernel.
Executables can be registered with RuntimeCore::create and can be identified with a CoreHandle. This CoreHandle is then used in RuntimeCore::sendEvent to identify the receiver. The event is then dispatched by the runtime back to the application with the ExecutableIfc based on the priority of the executable.
Definition at line 56 of file RuntimeCore.h.
◆ CoreHandle
A CoreHandle is used to identify an executable with a unique number (similar to a phone number).
Invalid handles have the identifier COREHANDLE_INVALID.
Definition at line 64 of file RuntimeCore.h.
◆ create()
Register the given executable in the core.
A handle is returned, which can be used as an identifier for the RuntimeCore::sendEvent function. This function must be called at initialization phase with interrupts disabled.
- Note
- Returns COREHANDLE_INVALID if there are no more handles available (increase EXECUTABLES_MAX).
- Parameters
-
executable | Object which implements the executable interface. |
- Returns
- CoreHandle Unique identifier for the given executable.
◆ init()
Initialize the core.
- Note
- The core can process the messages faster if there is no pEventPoolCapacityCallback set.
- Parameters
-
pIdleCallback | Optional idle callback, can be nullptr. |
pEventPoolCapacityCallback | Optional event pool capacity callback, can be null. |
◆ sendEvent()
Send an event to the given receiver (the scheduler will determinate when the event will be processed based on the priority of the receiver).
- Parameters
-
receiverHandle | Unique identifier of the executable which receives the event. |
protocolIdentifier | Unique identifier of protocol (is required for the receiver to encode the event data). |
pEventData | Pointer to the event data, which can be deserialized based on the protocol identifier (can also be nullptr). |
eventDataSizeBytes | Size in bytes of the serialized event data. |
◆ start()
static void imt::base::dff::runtime::RuntimeCore::start |
( |
| ) |
|
|
static |
Start the core.
- Note
- If an idle callback has been provided in the RuntimeCore::init function, this function will never return.
◆ stop()
static void imt::base::dff::runtime::RuntimeCore::stop |
( |
| ) |
|
|
static |
Stops the core.
This will abort the execution of all active parts causing the data flow application to stop its execution.
◆ COREHANDLE_INVALID
constexpr CoreHandle imt::base::dff::runtime::RuntimeCore::COREHANDLE_INVALID {-1} |
|
staticconstexpr |
Constant which represents an invalid CoreHandle.
Definition at line 69 of file RuntimeCore.h.
The documentation for this class was generated from the following file:
- C:/src/imt/Imt.Base-cpp/Imt.Base/Imt.Base.Dff.Runtime/inc/Imt.Base.Dff.Runtime/RuntimeCore.h