13#define CID_ADTF_KERNEL "kernel.service.adtf.cid"
93 const uint8_t* pProcessorAffinity =
nullptr,
94 size_t nProcessorAffinityByteCount = 0):
98 if (pProcessorAffinity ==
nullptr)
283 const void* pUserData =
nullptr,
284 size_t nUserDataSize = 0,
313 const void* pUserData =
nullptr,
314 size_t nUserDataSize = 0,
424 const void* pUserData =
nullptr,
425 size_t nUserDataSize = 0,
#define ADTF_IID(_interface, _striid)
Common macro to enable correct treatment of interface classes by the adtf::ucom::ucom_cast<>
Copyright © Audi Electronics Venture GmbH.
tInt64 tTimeStamp
type definition for a time value.
A_UTILS_NS::cResult tResult
For backwards compatibility and to bring latest version into scope.
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 --> Only the final implementation can be destroyed!
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 --> Only the final implementation can be destroyed!
virtual int32_t GetClass() const =0
~IThread()=default
Protected destructor --> Only the final implementation can be destroyed!
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 --> Only the final implementation can be destroyed!
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 @adtfbase::elasto::IErr...
@ 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 @adtfbase::elasto::IErr...
@ 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.
~IKernel()=default
Protected destructor --> Only the final implementation can be destroyed!
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.
Namespace for all service interfaces provided since v3.3.
Namespace for all service interfaces provided since v3.15.
ant::iobject_ptr< T > iobject_ptr
Alias always bringing the latest version of ant::iobject_ptr into scope.
ant::IObject IObject
Alias always bringing the latest version of ant::IObject into scope.
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.