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/RuntimeCore.h>
|
typedef int16_t | CoreHandle |
| A CoreHandle is used to identify an executable with a unique number (similar to a phone number). More...
|
|
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.
◆ 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.
◆ 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 eventPoolCapacityCallback set.
- Parameters
-
idleCallback | Optional idle callback, can be NULL. |
eventPoolCapacityCallback | 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 NULL). |
eventDataSizeBytes | Size in bytes of the serialized event data. |
◆ start()
static void imt::base::dff::runtime::RuntimeCore::start |
( |
void |
| ) |
|
|
static |
Start the core.
- Note
- If an idle callback has been provided in the RuntimeCore::init function, this function will never return.
◆ COREHANDLE_INVALID
const CoreHandle imt::base::dff::runtime::RuntimeCore::COREHANDLE_INVALID = -1 |
|
static |
Constant which represents an invalid CoreHandle.
The documentation for this class was generated from the following file: