13 #define CID_ADTF_KERNEL "kernel.service.adtf.cid"
93 const uint8_t* pProcessorAffinity =
nullptr,
94 size_t nProcessorAffinityByteCount = 0):
98 if (pProcessorAffinity ==
nullptr)
121 ADTF_IID(
IScheduling,
"scheduling.ant.kernel.services.adtf.iid");
149 ADTF_IID(
IThread,
"thread.ant.kernel.services.adtf.iid");
182 ADTF_IID(
ITimer,
"timer.ant.kernel.services.adtf.iid");
211 ADTF_IID(
ISignal,
"signal.ant.kernel.services.adtf.iid");
283 const void* pUserData =
nullptr,
284 size_t nUserDataSize = 0,
286 uint32_t ui32Flags = tThreadFlags::THF_None) = 0;
313 const void* pUserData =
nullptr,
314 size_t nUserDataSize = 0,
317 uint32_t ui32Flags = tTimerFlags::TIF_None) = 0;
424 const void* pUserData =
nullptr,
425 size_t nUserDataSize = 0,
428 uint32_t ui32Flags = tTimerFlags::TIF_None) = 0;
Copyright © Audi Electronics Venture GmbH.
tInt64 tTimeStamp
type definition for a time value.
A common result class usable as return value throughout.
The Runnable interface defines common methods for a running component.
The IString interface provides methods for getting and setting strings through abstract interfaces.
IObject based version of IRunnable.
~IKernelRunnable()=default
Protected destructor.
Interface for retrieving and setting of scheduling options.
~IScheduling()=default
Protected destructor --> Use implemented Destroy() instead of delete!
virtual tResult GetScheduling(tSchedulingInfo &sScheduling) const =0
Get the current scheduling settings.
virtual tResult SetScheduling(const tSchedulingInfo &sScheduling)=0
Update the scheduling settings.
Interface for signal handlers.
~ISignalHandler()=default
Protected destructor.
virtual tResult HandleKernelSignal(const adtf::ucom::iobject_ptr< ISignal > &pSignal)=0
Called when a signal is transmitted.
virtual int32_t GetCode() const =0
~ISignal()=default
Protected destructor --> Use implemented Destroy() instead of delete!
virtual int32_t GetClass() const =0
~IThread()=default
Protected destructor --> Use implemented Destroy() instead of delete!
virtual tResult Detach()=0
Detaches the thread, which can then no longer be modified via this interface.
virtual bool IsCurrent() const =0
Returns whether this thread is the current thread of execution.
virtual tResult Join(tTimeStamp nTimeout=-1)=0
Blocks the current thread until this thread has exited.
~ITimer()=default
Protected destructor --> Use implemented Destroy() instead of delete!
virtual tResult Stop()=0
Stops the timer.
Kernel interface for thread, timer and signal handling.
virtual tResult GetObjects(adtf::ucom::iobject_enum< IObject > &oObjects)=0
Returns a list of all kernel primitives.
tSchedulingClass
Enum for different scheduling schemes.
@ Default
The kernel may choose what it (or the user) likes.
@ Normal
Basic non-realtime scheduling.
@ RealTime
Realtime scheduling.
tSignalFlags
Enum for signal options.
@ SIG_None
No special behaviour.
@ SIG_Async
Transmit signal asynchronously.
ADTF_IID(IKernel, "kernel.ant.services.adtf.iid")
Interface ID for the kernel interface.
virtual tResult SignalRegister(ISignalHandler &oHandler, uint32_t ui32Flags=tSignalFlags::SIG_None)=0
Registers a new signal handler.
tThreadFlags
Flags for thread creation.
@ THF_Detached
Create a detached thread, the pThread handle is not set, so you cannot modify this thread after creat...
@ THF_None
No special behaviour.
virtual tResult SignalUnregister(ISignalHandler &oHandler)=0
Unregisters a signal handler.
tTimerFlags
Flags for time creation.
@ TIF_None
No special behaviour.
@ TIF_ErrorStop
Default error handling action for deadline and start instant misses is set to @adtf::base::elasto::IE...
@ TIF_Drop
Drop missed timer calls and wait until the next valid point in time that matches the interval....
@ TIF_ErrorLog
Default error handling action for deadline and start instant misses is set to @adtf::base::elasto::IE...
@ TIF_Reschedule
Reschedule timer interval in case of a missed start instant. Mutally exclusive with TIF_Drop....
tTimerClock
Enum for different time sources for timers.
@ Monotonic
Realtime monotonic clock.
@ RealTime
Realtime clock.
~IKernel()=default
Protected destructor --> Use implemented Destroy() instead of delete!
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
Creates a new timer, that periodically calls the Run method of the given runnable.
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
Creates a new thread of execution that executes the Run method of the given runnable.
virtual tResult SignalSend(const adtf::ucom::iobject_ptr< ISignal > &pSignal, uint32_t ui32Flags=tSignalFlags::SIG_None)=0
Transmits a signal to all registered signal handlers.
Interface for kernel objects that have names (threads/timer)
Kernel interface for thread, timer and signal handling.
ADTF_IID(IKernel, "kernel.devil.services.adtf.iid")
Interface ID for the kernel interface.
Kernel interface for thread, timer and signal handling.
ADTF_IID(IKernel, "kernel.penguin.services.adtf.iid")
Interface ID for the kernel interface.
virtual tResult TimerCreate(adtf::ucom::iobject_ptr< ITimer > &pTimer, const char *strTimerName, tTimeStamp nPeriod, tTimeStamp nInitialDelay, tTimeStamp nMaximumExecutionTime, 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
Creates a new timer, that periodically calls the Run method of the given runnable.
Base class for every interface type within the uCOM.
Interface definition for a container of objects.
Base object pointer to realize binary compatible reference counting in interface methods.
Namespace for entire ADTF SDK.
Copyright © Audi Electronics Venture GmbH.
Copyright © Audi Electronics Venture GmbH.
Struct for defining scheduling settings of a thread or timer.
tSchedulingClass eSchedulingClass
The scheduling class.
uint8_t aProcessorAffinity[128]
The processor affinity (bitmask).
float fPriority
The priority [0.0, 1.0].
tSchedulingInfo(tSchedulingClass eSchedulingClass=tSchedulingClass::Default, float fPriority=-1.0, const uint8_t *pProcessorAffinity=nullptr, size_t nProcessorAffinityByteCount=0)
Constructor.