44 const void* pvUserData,
45 size_t nUserDataSize)
override;
56template<IRunnable::tActivationType TYPE_OF_ACTIVATION = IRunnable::RUN_UNSPECIFIED,
typename Interface = IRunnable>
87 if (ui32ActivationType == TYPE_OF_ACTIVATION
90 tResult nErrorCode = ERR_NOT_INITIALIZED;
105 return TYPE_OF_ACTIVATION;
114template<ant::IRunnable::tActivationType TYPE_OF_ACTIVATION = ant::IRunnable::RUN_UNSPECIFIED,
typename AntInterface = ant::IRunnable,
typename Interface = IRunnable>
146 const void* pvUserData,
147 size_t nUserDataSize)
override
167 if (ui32ActivationType == TYPE_OF_ACTIVATION
170 tResult nErrorCode = ERR_NOT_INITIALIZED;
185 return TYPE_OF_ACTIVATION;
196#define ADTF_RUN_FUNCTION(_fcName_) [this](tTimeStamp tmTime) -> tResult { return _fcName_(tmTime); }
203#define ADTF_RUN_FUNCTION_NS(_fcName_) [this](adtf::base::flash::tNanoSeconds tmTime) -> tResult { return _fcName_(tmTime); }
207using flash::runnable;
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.
#define RETURN_ERROR(code)
Return specific error code, which requires the calling function's return type to be tResult.
The Runnable interface defines common methods for a running component.
tActivationType
Enumeration of the possible activation types to set a component in running state.
@ RUN_UNSPECIFIED
unspecified Run activation type.
std::function< tResult(tTimeStamp)> tRunFunction
Type definition of the function used to implement Run.
cRunnable(cRunnable &&)=delete
no move CTOR
cRunnable & operator=(cRunnable &&)=delete
no move operator
cRunnable(const cRunnable &)=delete
no copy CTOR
tResult Run(tTimeStamp tmTimeofActivation, tActivationType ui32ActivationType, const void *pvUserData, size_t nUserDataSize) override
The Run method to set the component in running state.
virtual ~cRunnable()
DTOR.
cRunnable & operator=(const cRunnable &)=delete
no copy operator
virtual ~runnable()=default
DTOR.
virtual IRunnable::tActivationType GetActivationType() const
Returns the type of activation implemented.
runnable(IRunnable::tRunFunction fcRunOnceFunc)
Main CTOR with callable function.
IRunnable::tRunFunction m_fcRunOnceFunc
tResult Run(tTimeStamp tmTimeofActivation, IRunnable::tActivationType ui32ActivationType, const void *, size_t) override
IRunnable::Run implementation which will call m_fcRunOnceFunc if ui32ActivationType is TYPE_OF_ACTIVA...
std::function< tResult(tNanoSeconds)> tRunFunction
Type definition of the function used to implement Run.
~runnable() override=default
DTOR.
adtf::base::flash::IRunnable::tRunFunction m_fcRunOnceFunc
runnable(adtf::base::flash::IRunnable::tRunFunction fcRunOnceFunc)
Main CTOR with callable function.
ant::IRunnable::tActivationType GetActivationType() const override
Returns the type of activation implemented.
runnable(ant::IRunnable::tRunFunction fcRunOnceFunc)
Compatibility CTOR with callable function.
tResult Run(tNanoSeconds tmTimeofActivation, ant::IRunnable::tActivationType ui32ActivationType, const void *, size_t) override
IRunnable::Run implementation which will call m_fcRunOnceFunc if ui32ActivationType is TYPE_OF_ACTIVA...
Use this template if you want to implement an ucom::ant::IObject based Interface and/or subclass an e...
Namespace for all functionality of the ADTF Base SDK provided since v3.0.
DestinationTimeStamp duration_cast(const SourceTimeStamp &)
Duration cast base template to converted between different time resolution.
Namespace for the ADTF Base SDK.
Namespace for entire ADTF SDK.
Copyright © Audi Electronics Venture GmbH.
A timestamp with nanosecond precision.