|
ADTF
|
#include <kernel_intf.h>
Inherits adtf::ucom::ant::IObject.
Inherited by adtf::services::devil::IKernel.
Classes | |
| class | IKernelRunnable |
| class | IScheduling |
| class | ISignal |
| class | ISignalHandler |
| class | IThread |
| class | ITimer |
| struct | tSchedulingInfo |
Public Types | |
| enum class | tSchedulingClass : uint32_t { Default = 0 , Normal = 1 , RealTime = 2 } |
| enum | tThreadFlags { THF_None = 0 , THF_Detached = 1 } |
| enum class | tTimerClock : uint32_t { ADTF = 0 , Monotonic = 1 , RealTime = 2 } |
| enum | tTimerFlags : uint8_t { TIF_None = 0 , TIF_Reschedule = 1 , TIF_Drop = 2 , TIF_ErrorLog = 4 , TIF_ErrorStop = 8 } |
| enum | tSignalFlags { SIG_None = 0 , SIG_Async = 1 } |
Public Member Functions | |
| ADTF_IID (IKernel, "kernel.ant.services.adtf.iid") | |
| Interface ID for the kernel interface. | |
| virtual tResult | ThreadCreate (adtf::ucom::iobject_ptr< IThread > &pThread, const char *strThreadName, const adtf::ucom::iobject_ptr< IKernelRunnable > &pKernelRunnable, const void *pUserData=nullptr, size_t nUserDataSize=0, const tSchedulingInfo &sScheduling=tSchedulingInfo(), uint32_t ui32Flags=tThreadFlags::THF_None)=0 |
| virtual tResult | TimerCreate (adtf::ucom::iobject_ptr< ITimer > &pTimer, const char *strTimerName, tTimeStamp nPeriod, tTimeStamp nInitialDelay, const adtf::ucom::iobject_ptr< IKernelRunnable > &pKernelRunnable, const void *pUserData=nullptr, size_t nUserDataSize=0, tTimerClock eClock=tTimerClock::ADTF, const tSchedulingInfo &sScheduling=tSchedulingInfo(), uint32_t ui32Flags=tTimerFlags::TIF_None)=0 |
| virtual tResult | SignalSend (const adtf::ucom::iobject_ptr< ISignal > &pSignal, uint32_t ui32Flags=tSignalFlags::SIG_None)=0 |
| virtual tResult | SignalRegister (ISignalHandler &oHandler, uint32_t ui32Flags=tSignalFlags::SIG_None)=0 |
| virtual tResult | SignalUnregister (ISignalHandler &oHandler)=0 |
| virtual tResult | GetObjects (adtf::ucom::iobject_enum< IObject > &oObjects)=0 |
Public Member Functions inherited from adtf::ucom::ant::IObject | |
| ADTF_IID (IObject, "object.ant.ucom.adtf.iid") | |
Protected Member Functions | |
| ~IKernel ()=default | |
| Protected destructor --> Only the final implementation can be destroyed! | |
Protected Member Functions inherited from adtf::ucom::ant::IObject | |
| ~IObject ()=default | |
| Protected destructor --> Only the final implementation can be destroyed! | |
Kernel interface for thread, timer and signal handling.
|
strong |
|
strong |
| enum adtf::services::ant::IKernel::tTimerFlags : uint8_t |
Flags for time creation
| Enumerator | |
|---|---|
| TIF_None | No special behaviour. |
| TIF_Reschedule | Reschedule timer interval in case of a missed start instant. Mutally exclusive with TIF_Drop. Default is to queue the timer calls. |
| TIF_Drop | Drop missed timer calls and wait until the next valid point in time that matches the interval. Mutally exclusive with TIF_Reschedule. Default is to queue the timer calls. |
| TIF_ErrorLog | Default error handling action for deadline and start instant misses is set to adtf::base::elasto::IErrorHandling::tAction::Log. |
| TIF_ErrorStop | Default error handling action for deadline and start instant misses is set to adtf::base::elasto::IErrorHandling::tAction::Stop. |
|
pure virtual |
Returns a list of all kernel primitives.
| [out] | oObjects | Primitives are stored in this container. |
|
pure virtual |
Registers a new signal handler.
| [in] | oHandler | The handler. |
| [in] | ui32Flags | Flags, see tSignalFlags. |
|
pure virtual |
Transmits a signal to all registered signal handlers.
| [in] | pSignal | The signal. |
| [in] | ui32Flags | Flags, see tSignalFlags. |
| ERR_CANCELED | a signal handler has canceled the processing of the signal. |
|
pure virtual |
Unregisters a signal handler.
| [in] | oHandler | The handler. |
|
pure virtual |
Creates a new thread of execution that executes the Run method of the given runnable. method. Please take a look at the adtf::system::kernel_thread template class, which transparently wraps this interface.
| [out] | pThread | This will be updated with a pointer to the interface of the created thread. |
| [in] | strThreadName | The name of the thread. Has to be unique among all registered kernel primitives. |
| [in] | pKernelRunnable | The runnable that will be called. |
| [in] | pUserData | This is passed on to the runnable. Mind that the data is not stored or copied in any way, so make sure the pointer stays valid long enough. |
| [in] | nUserDataSize | The size of the user data passed to the runnable. |
| [in] | sScheduling | The scheduling settings. |
| [in] | ui32Flags | Thread flags, see tThreadFlags. |
| ERR_FAILED | The scheduling settings are not valid. |
| ERR_RESOURCE_IN_USE | The given name is already used by another kernel primitive. |
|
pure virtual |
Creates a new timer, that periodically calls the Run method of the given runnable. Please take a look at the adtf::system::kernel_timer template class, which transparently wraps this interface.
| [out] | pTimer | This will be updated with a pointer to the interface of the created thread. |
| [in] | strTimerName | The name of the timer. Has to be unique among all registered kernel primitives. |
| [in] | nPeriod | The period of the timer in microseconds. 0 = one-shot timer. |
| [in] | nInitialDelay | The intial delay before the timer expires the first time. |
| [in] | pKernelRunnable | The runnable that will be called. |
| [in] | pUserData | This is passed on to the runnable. Mind that the data is not stored or copied in any way, so make sure the pointer stays valid long enough. |
| [in] | nUserDataSize | The size of the user data passed to the runnable. |
| [in] | eClock | The time source used by the timer. |
| [in] | sScheduling | The scheduling settings. |
| [in] | ui32Flags | Thread flags, see tTimerFlags. |
| ERR_FAILED | The scheduling settings are not valid. |
| ERR_RESOURCE_IN_USE | The given name is already used by another kernel primitive. |