ADTF
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
runnable_intf.h
Go to the documentation of this file.
1
7#pragma once
8#include "chrono.h"
11
12#include <functional>
13
14namespace adtf
15{
16namespace base
17{
18namespace ant
19{
20
27{
28 public:
30 ADTF_IID(IRunnable, "runnable.ant.base.adtf.iid");
31
32 protected:
34 ~IRunnable() = default;
35
36 public:
38 typedef std::function<tResult(tTimeStamp)> tRunFunction;
39
68
69 public:
83 ADTF3_DEPRECATED("Use adtf::base::flash::IRunnable::Run(tNanoSeconds tmTimeofActivation, ant::IRunnable::tActivationType ui32ActivationType, const void* pvUserData, size_t nUserDataSize) instead.")
84 virtual tResult Run(tTimeStamp tmTimeofActivation,
85 tActivationType ui32ActivationType,
86 const void* pvUserData,
87 size_t nUserDataSize) = 0;
88
89
96 {
97 return RUN_UNSPECIFIED;
98 }
99};
100} //namespace ant
101
102namespace flash
103{
104
106{
107 public:
109 ADTF_IID(IRunnable, "runnable.flash.base.adtf.iid");
110
111 protected:
113 ~IRunnable() = default;
114
115 public:
117 typedef std::function<tResult(tNanoSeconds)> tRunFunction;
118 typedef ant::IRunnable::tActivationType tActivationType;
119
120 public:
121
134 virtual tResult Run(tNanoSeconds tmTimeofActivation,
135 ant::IRunnable::tActivationType ui32ActivationType,
136 const void* pvUserData,
137 size_t nUserDataSize) = 0;
138};
139
140
141}
142
144using ant::IRunnable;
145
146} //namespace base
147} // namespace adtf
Copyright © Audi Electronics Venture GmbH.
#define ADTF3_DEPRECATED(_depr_message_)
Mark a function or variable as deprecated.
Copyright © Audi Electronics Venture GmbH.
A_UTILS_NS::cResult tResult
For backwards compatibility and to bring latest version into scope.
Copyright © Audi Electronics Venture GmbH.
The Runnable interface defines common methods for a running component.
virtual tResult Run(tTimeStamp tmTimeofActivation, tActivationType ui32ActivationType, const void *pvUserData, size_t nUserDataSize)=0
The Run method to set the component in running state.
tActivationType
Enumeration of the possible activation types to set a component in running state.
@ RUN_USER
activation code offset for user activations.
@ RUN_TIMER
activation code to handle a timer, usually this is sent by a kernel implementation have timer primiti...
@ RUN_SIGNAL
activation code to handle a signal event, usually this is sent by a kernel implementation have signal...
@ RUN_TRIGGER
Trigger run call.
@ RUN_PUSH
Data Sync Push.
@ RUN_EXCEPTION
activation code to handle a global exception.
@ RUN_THREAD
activation code to handle a thread call, usually this is sent by a kernel implementation have thread ...
@ RUN_JOB
activation code to handle a job call.
@ RUN_MESSAGE
activation code to handle a message.
@ RUN_UNSPECIFIED
unspecified Run activation type.
~IRunnable()=default
not destructable
ADTF_IID(IRunnable, "runnable.ant.base.adtf.iid")
defintion of interface id
virtual tActivationType GetActivationType() const
Gets the activation code of the runnable it reacts to.
std::function< tResult(tTimeStamp)> tRunFunction
Type definition of the function used to implement Run.
std::function< tResult(tNanoSeconds)> tRunFunction
Type definition of the function used to implement Run.
~IRunnable()=default
not destructable
ADTF_IID(IRunnable, "runnable.flash.base.adtf.iid")
defintion of interface id
virtual tResult Run(tNanoSeconds tmTimeofActivation, ant::IRunnable::tActivationType ui32ActivationType, const void *pvUserData, size_t nUserDataSize)=0
The Run method to set the component in running state.
Namespace for all functionality of the ADTF Base SDK provided since v3.0.
Namespace for the ADTF Base SDK.
Namespace for entire ADTF SDK.