ADTF
Loading...
Searching...
No Matches
adtf::base::IRunnable Class Reference

bring ant::IRunnable to users scope More...

#include <runnable_intf.h>

Inherited by adtf::services::ant::IApplication::IJob, adtf::services::ant::IKernel::IKernelRunnable, adtf::streaming::ant::ISampleStream::IPushReadEventSink, and adtf::streaming::ant::ITriggerPipeItem.

Public Types

enum  tActivationType : uint32_t {
  RUN_UNSPECIFIED = 0 , RUN_TIMER = 1 , RUN_SIGNAL = 2 , RUN_EXCEPTION = 3 ,
  RUN_MESSAGE = 5 , RUN_THREAD = 6 , RUN_JOB = 7 , RUN_TRIGGER = 8 ,
  RUN_PUSH = 9 , RUN_USER = 0x1000
}
 
typedef std::function< tResult(tTimeStamp)> tRunFunction
 Type definition of the function used to implement Run.
 

Public Member Functions

 ADTF_IID (IRunnable, "runnable.ant.base.adtf.iid")
 defintion of interface id
 
 ADTF3_DEPRECATED ("Use adtf::base::flash::IRunnable::Run(tNanoSeconds tmTimeofActivation, ant::IRunnable::tActivationType " "ui32ActivationType, const void* pvUserData, size_t nUserDataSize) instead.") virtual tResult Run(tTimeStamp tmTimeofActivation
 
virtual tActivationType GetActivationType () const
 

Public Attributes

tActivationType ui32ActivationType
 
tActivationType const void * pvUserData
 
tActivationType const void size_t nUserDataSize = 0
 

Protected Member Functions

 ~IRunnable ()=default
 not destructable
 

Detailed Description

bring ant::IRunnable to users scope

The Runnable interface defines common methods for a running component. Within ADTF the IRunnable interface is the main interface to use for Running objects.

See also
runnable for a base implementation.

Member Enumeration Documentation

◆ tActivationType

Enumeration of the possible activation types to set a component in running state. This activation type is part of the adtf::IRunnable::Run call.

Enumerator
RUN_UNSPECIFIED 

unspecified Run activation type.

RUN_TIMER 

activation code to handle a timer, usually this is sent by a kernel implementation have timer primitives.

RUN_SIGNAL 

activation code to handle a signal event, usually this is sent by a kernel implementation have signal interface.

RUN_EXCEPTION 

activation code to handle a global exception.

RUN_MESSAGE 

activation code to handle a message.

RUN_THREAD 

activation code to handle a thread call, usually this is sent by a kernel implementation have thread primitives.

RUN_JOB 

activation code to handle a job call.

RUN_TRIGGER 

Trigger run call.

RUN_PUSH 

Data Sync Push.

RUN_USER 

activation code offset for user activations.

Member Function Documentation

◆ ADTF3_DEPRECATED()

adtf::base::ant::IRunnable::ADTF3_DEPRECATED ( "Use adtf::base::flash::IRunnable::Run(tNanoSeconds tmTimeofActivation, ant::IRunnable::tActivationType " "ui32ActivationType, const void* pvUserData, size_t nUserDataSize) instead." )

The Run method to set the component in running state. This method will be called to activate the component by a given activation type.

Parameters
[in]tmTimeofActivationTime of activation. Usually this is the StreamTime.
[in]ui32ActivationTypeThe activation type for running.
[in]pvUserDatapointer to a activation structure depending on the activation type.
[in]nUserDataSizeSize of the activation structure. (in byte)
Returns
Standard result code.
Return values
ERR_CANCELEDDepending on the caller (timer, cyclic thread) it will break cyclic running.
Deprecated
Use adtf::base::flash::IRunnable::Run(tNanoSeconds tmTimeofActivation, ant::IRunnable::tActivationType ui32ActivationType, const void* pvUserData, size_t nUserDataSize) instead.

◆ GetActivationType()

virtual tActivationType adtf::base::ant::IRunnable::GetActivationType ( ) const
inlinevirtual

Gets the activation code of the runnable it reacts to.

Returns
The ActivationType the IRunnable react to.

The documentation for this class was generated from the following file: