ADTF
Loading...
Searching...
No Matches
runner.h
Go to the documentation of this file.
1
7#pragma once
8
9#include "triggerpipe.h"
10#include "runner_intf.h"
12
14
15namespace adtf
16{
17namespace streaming
18{
19
24class cRunner : public trigger_pipe_item<INamedGraphObject, IRunner>
25{
26public:
29
31 ~cRunner() override;
32
35 cRunner(const char* strName);
36
41 cRunner(const char* strName, base::ant::IRunnable& oRunnable);
42
47 explicit cRunner(const char* strName, base::flash::IRunnable& oRunnable);
48
54 template<typename CALLABLE>
55 cRunner(const char* strName, CALLABLE&& oCallable): cRunner(strName)
56 {
57 SetCallable(std::forward<CALLABLE>(oCallable));
58 }
59
66
73
80
87
95 template<typename CALLABLE>
96 void SetCallable(CALLABLE&& oCallable)
97 {
98 trigger_pipe_item::SetCallable(std::forward<CALLABLE>(oCallable));
99 }
100};
101
114 public trigger_pipe_source<INamedGraphObject,
115 ucom::ant::cClassInfo,
116 base::ant::configuration<>,
117 ant::IActiveRunner,
118 spider::IActiveRunner>
119{
120public:
125
129 ~cActiveRunner() override;
130
132 tResult SetName(const char* strName) override;
134 tResult SetParent(const ucom::ant::IObject* pParentObject) override;
135
139 {
141 }
142
143protected:
151 void Trigger(base::flash::tNanoSeconds tmTimeOfTrigger);
152
159 void Trigger();
160
161private:
162 void CreateErrorHandler();
163
164private:
166 base::cErrorChecker m_oErrorChecker;
167};
168
169} // namespace streaming
170} // namespace adtf
A_UTILS_NS::cResult tResult
For backwards compatibility and to bring latest version into scope.
Definition result.h:736
#define RETURN_NOERROR
Return status ERR_NOERROR, which requires the calling function's return type to be tResult.
Definition result.h:29
Definition runnable_intf.h:27
std::function< tResult(tTimeStamp)> tRunFunction
Type definition of the function used to implement Run.
Definition runnable_intf.h:38
Definition runnable_intf.h:112
std::function< tResult(tNanoSeconds)> tRunFunction
Type definition of the function used to implement Run.
Definition runnable_intf.h:123
Error checker implementation for easy use of the error handler elasto::IErrorHandling::IErrorHandler.
Definition error_handling_intf.h:157
void Trigger(base::flash::tNanoSeconds tmTimeOfTrigger)
tResult SetParent(const ucom::ant::IObject *pParentObject) override
tResult SetName(const char *strName) override
tResult WaitForDeactivation() override
Definition runner.h:138
cRunner(const char *strName, CALLABLE &&oCallable)
Definition runner.h:55
void SetRunnable(base::flash::IRunnable::tRunFunction fcRunFunction)
cRunner(const char *strName)
cRunner(const char *strName, base::ant::IRunnable &oRunnable)
void SetRunnable(base::flash::IRunnable &oRunnable)
~cRunner() override
DTOR.
void SetRunnable(base::ant::IRunnable::tRunFunction fcRunFunction)
void SetCallable(CALLABLE &&oCallable)
Definition runner.h:96
void SetRunnable(base::ant::IRunnable &oRunnable)
cRunner(const char *strName, base::flash::IRunnable &oRunnable)
void SetCallable(CALLABLE &&callable)
Definition triggerpipe.h:318
Definition object_intf.h:33
Definition object_ptr.h:384
Namespace for the ADTF Streaming SDK.
Definition bindingproxyinport.h:14
Namespace for all functionality provided by ADTF and its SDKs.
Definition adtf_client_connector.h:14
A timestamp with nanosecond precision.
Definition chrono.h:23