ADTF
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
triggerpipe_intf.h
Go to the documentation of this file.
1
7#pragma once
10
11namespace adtf
12{
13namespace streaming
14{
15namespace ant
16{
17 class ITriggerPipeItem;
26 {
27 protected:
30 public:
32 ADTF_IID(ITriggerPipeSource, "trigger_pipe_source.ant.streaming.adtf.iid");
33 public:
36 enum tPriority : uint32_t
37 {
41 Lowest = 1,
43 Lower = 30,
47 Normal = 50,
51 Higher = 70,
53 Highest = 100
54 };
55
56 public:
67 tPriority ui32Prio) = 0;
76
86 tPriority ui32Prio) = 0;
95 };
96
101 public ITriggerPipeSource
102 {
103 protected:
105 ~ITriggerPipeItem() = default;
106 public:
108 ADTF_IID(ITriggerPipeItem, "trigger_pipe_item.ant.streaming.adtf.iid");
109 };
110
118 {
119 protected:
121 ~ITriggerPipe() = default;
122 public:
124 ADTF_IID(ITriggerPipe, "trigger_pipe.ant.streaming.adtf.iid");
125 public:
126
135
141 virtual tResult Open() = 0;
142
147 virtual tResult Close() = 0;
148
154 virtual tResult GetName(adtf::base::ant::IString&& strName) const = 0;
155 };
156
157
158} //namespace ant
159
160namespace quiet
161{
162
167{
168 protected:
171 public:
173 ADTF_IID(ITriggerPipeHierachy, "trigger_pipe_hierachy.quiet.streaming.adtf.iid");
174
181
188
195};
196
197}
198
199namespace riddler
200{
201
208template <typename ObjectType>
209inline bool has_trigger_parent(const ObjectType* pChild)
210{
212 if (!pHierachy)
213 {
214 THROW_ERROR_DESC(ERR_NO_INTERFACE, "Object does not implement the trigger pipe hierachy interface.");
215 }
216
217 bool bHasParent = false;
218 pHierachy->GetTriggerParents(adtf::ucom::make_function([&](const ant::ITriggerPipeSource*) -> tResult { bHasParent = true; RETURN_ERROR(ERR_CANCELED);}));
219 return bHasParent;
220}
221
222}
223
225using ant::ITriggerPipeSource;
227using ant::ITriggerPipeItem;
229using ant::ITriggerPipe;
231using quiet::ITriggerPipeHierachy;
233using riddler::has_trigger_parent;
234
235} //namespace streaming
236} // namespace adtf
Copyright © Audi Electronics Venture GmbH.
Copyright © Audi Electronics Venture GmbH.
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.
The IString interface provides methods for getting and setting strings through abstract interfaces.
Definition string_intf.h:28
virtual tResult Open()=0
Opens and register every added pipe items.
virtual tResult GetFirstItem(adtf::ucom::ant::iobject_ptr< const ITriggerPipeSource > &pSubRu) const =0
Retrieves the first source item of the defined Trigger Pipe.
ADTF_IID(ITriggerPipe, "trigger_pipe.ant.streaming.adtf.iid")
Definiton of interface id.
~ITriggerPipe()=default
not destructable
virtual tResult Close()=0
Close and unregister every pipe item from its ITriggerPipeSource.
virtual tResult GetName(adtf::base::ant::IString &&strName) const =0
Gets the name of the Pipe.
Interface for objects which can participate a ITriggerPipe.
~ITriggerPipeItem()=default
not destructable
ADTF_IID(ITriggerPipeItem, "trigger_pipe_item.ant.streaming.adtf.iid")
Definition of interface ID.
Interface that defines a TriggerPipeSource, which is able to send a Run (RUN::TIrgger) call to the re...
virtual tResult ChangePriority(const adtf::ucom::ant::iobject_ptr< ITriggerPipeItem > &pSubRun, tPriority ui32Prio)=0
Changes the priority of the pSubRun.
virtual tResult RegisterSubItem(const adtf::ucom::ant::iobject_ptr< ITriggerPipeItem > &pSubRun, tPriority ui32Prio)=0
Registers the pSubRun as SubItem of the source.
virtual tResult GetSubItems(adtf::ucom::ant::iobject_enum< const ITriggerPipeItem > &lstSubItems) const =0
Retrieves a list of the registered Items.
virtual tResult UnregisterSubItem(const adtf::ucom::ant::iobject_ptr< ITriggerPipeItem > &pSubRun)=0
Unregisters the pSubRun from the source.
~ITriggerPipeSource()=default
not destructable
ADTF_IID(ITriggerPipeSource, "trigger_pipe_source.ant.streaming.adtf.iid")
definiton of interface id
tPriority
Priority used for the order of ITriggerPipeItem::Run calls.
Interface for accessing the parent of a trigger pipe item.
virtual tResult GetTriggerParents(const ucom::nitro::ifunction< tResult(const ant::ITriggerPipeSource *)> &fnCallback) const =0
Retrieve all trigger pipe parents of this item.
virtual tResult UnregisterTriggerParent(const ant::ITriggerPipeSource *pParent)=0
Unregisters the given trigger pipe source that is no longer a parent of this item;.
virtual tResult RegisterTriggerParent(const ant::ITriggerPipeSource *pParent)=0
Registers the given trigger pipe source as a parent of this item;.
ADTF_IID(ITriggerPipeHierachy, "trigger_pipe_hierachy.quiet.streaming.adtf.iid")
Definition of interface ID.
~ITriggerPipeHierachy()=default
not destructable
Base class for every interface type within the uCOM.
Definition object_intf.h:33
Interface definition for a container of objects.
Definition object_list.h:22
Base object pointer to realize binary compatible reference counting in interface methods.
Interface for functions that can be passed via IObject interfaces.
Namespace for all functionality of the ADTF Streaming SDK provided since v3.0.
Namespace for all functionality of the ADTF Streaming SDK provided since v3.16.
Namespace for the ADTF Streaming SDK.
function_wrapper< Signature > make_function(Callable &&fnCallback)
creates a ucom_function object for the given callable.
InterfacePointerType ucom_cast(ObjectPointerType i_pObject)
Alias always bringing the latest version of ucom_cast() into scope.
Definition ucom_cast.h:126
Namespace for entire ADTF SDK.
bool has_trigger_parent(const ObjectType *pChild)
Checks whether the object has a parent trigger item or not.
#define THROW_ERROR_DESC(_code,...)
throws a tResult exception