ADTF
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
graph_object.h
Go to the documentation of this file.
1
7#pragma once
9
29
30#include <memory>
31#include <functional>
32#include <numeric>
33
34namespace adtf
35{
36namespace filter
37{
38namespace flash
39{
40
43
45template <typename DATA_TYPE>
47
50
52template<tTimeStamp TIME_RANGE, bool STORELASTSAMPLE = true>
54
56template<size_t MAX_SIZE, bool STORELASTSAMPLE = true>
58
65template <typename Interface>
67{
68 public:
70 interface_client() = default;
71
79
80 interface_client(const interface_client&) = default;
82 interface_client& operator=(const interface_client&) = default;
83 interface_client& operator=(interface_client&&) = default;
84
88 bool IsValid()
89 {
90 if (m_pInterface)
91 {
92 return true;
93 }
94
95 if (!m_pClient ||
96 IS_FAILED(m_pClient->GetServerObject(m_pInterface)))
97 {
98 return false;
99 }
100 m_pClient.Reset();
101 return true;
102 }
103
107 Interface& Get() const
108 {
109 if (m_pInterface)
110 {
111 return *m_pInterface;
112 }
113
114 if (!m_pClient)
115 {
116 THROW_ERROR_DESC(ERR_NOT_INITIALIZED, "interface client has not been created");
117 }
118
119 auto nResult = m_pClient->GetServerObject(m_pInterface);
120 if (IS_FAILED(nResult))
121 {
122 std::string strName;
123 m_pClient->GetName(adtf_string_intf(strName));
124 THROW_IF_FAILED_DESC(nResult,
125 "Unable to aquire server object for client '%s' with interface '%s'.",
126 strName.c_str(),
128 }
129
130 m_pClient.Reset();
131 return *m_pInterface;
132 }
133
134 Interface* operator->() const
135 {
136 return &Get();
137 }
138
139 private:
141 mutable ucom::ant::object_ptr<Interface> m_pInterface;
142
143};
144
184{
185 public:
186
192 {
193 public:
194 virtual ~cTriggerHint() = default;
195 };
196
201 {
202 };
203
208 {
209 public:
215 cThreadTriggerHint(bool bCyclic = true):
216 m_bCyclic(bCyclic)
217 {
218 }
219
223 bool GetCyclic() const
224 {
225 return m_bCyclic;
226 }
227
228 private:
229 bool m_bCyclic;
230 };
231
236 {
237 public:
243 m_tmInterval(tmInterval)
244 {
245 }
246
252 m_tmInterval(base::flash::duration_cast<base::flash::tNanoSeconds>(tmInterval))
253 {
254 }
255
260 {
261 return m_tmInterval;
262 }
263
264 private:
265 base::flash::tNanoSeconds m_tmInterval;
266 };
267
272 {
273 public:
278 cDataTriggerHint(const char* strInputName):
279 m_strInputName(strInputName)
280 {
281 }
282
287 cDataTriggerHint(const std::vector<std::string>& lstInputNames):
288 m_strInputName(std::accumulate(lstInputNames.begin(),
289 lstInputNames.end(),
290 std::string{},
291 [](const auto& strPrevious, const auto& strNext) { return strPrevious.empty() ? strNext : strPrevious + ";" + strNext; }))
292 {
293 }
294
298 const char* GetInputName() const
299 {
300 return m_strInputName.c_str();
301 }
302
303 private:
304 std::string m_strInputName;
305 };
306
307 public:
310
312 ~cGraphObject() override;
313
314 public:
335 streaming::ant::IRunner* pRunner);
336
377
413
444 const void* pSampleData,
445 size_t nSampleDataSize);
446
460 template <typename ReaderType = cPinReader>
461 ReaderType* CreateInputPin(const char* strName,
462 bool bDataInTrigger = true,
463 bool bForwardTriggerViaOutputPins = true);
464
479 template <typename ReaderType = cPinReader>
480 ReaderType* CreateInputPin(const char* strName,
481 const cStreamTypeHelper& oType,
482 bool bDataInTrigger = true,
483 bool bForwardTriggerViaOutputPins = true);
484
506 template <typename ReaderType = cPinReader>
507 ReaderType* CreateInputPinWithCallback(const char* strName,
508 const cStreamTypeHelper& oType,
509 std::function<tResult(base::flash::tNanoSeconds)> fnTriggerCallback,
510 bool bForwardTriggerViaOutputPins = true);
511
534 template <typename ReaderType = cPinReader>
535 ReaderType* CreateInputPinWithCallback(const char* strName,
536 const cStreamTypeHelper& oType,
537 std::function<tResult(const ucom::ant::iobject_ptr<const streaming::ant::ISample>&)> fnSampleCallback,
538 bool bForwardTriggerViaOutputPins = true);
539
562 template <typename ReaderType = cPinReader>
563 ReaderType* CreateInputPinWithCallback(const char* strName,
564 const cStreamTypeHelper& oType,
565 std::function<tResult(base::flash::tNanoSeconds, const void*, size_t)> fnSampleDataCallback,
566 bool bForwardTriggerViaOutputPins = true);
567
591 template <typename Type, typename ReaderType = cPinReader>
592 ReaderType* CreateInputPinWithCallback(const char* strName,
593 const cStreamTypeHelper& oType,
594 std::function<tResult(base::flash::tNanoSeconds, const Type&)> fnDataCallback,
595 bool bForwardTriggerViaOutputPins = true);
596
625 template <typename WriterType = cPinWriter>
626 WriterType* CreateOutputPin(const char* strName);
627
640 template <typename WriterType = cPinWriter>
641 WriterType* CreateOutputPin(const char* strName, const cStreamTypeHelper& oType);
642
660 const cTriggerHint& oTriggerHint = cNoTriggerHint(),
661 bool bForwardTriggerViaOutputPins = true);
662
684 std::function<tResult(base::flash::tNanoSeconds)> fnRunFunction,
685 const cTriggerHint& oTriggerHint = cNoTriggerHint(),
686 bool bForwardTriggerViaOutputPins = true);
687
706 template <typename Interface, typename Instance>
708
720 template <typename Interface>
721 void CreateInterfaceServer(const char* strName, const ucom::ant::iobject_ptr<Interface>& pInstance);
722
734 template <typename Interface>
736
749 template <typename ReaderType = cPinReader>
750 std::shared_ptr<ReaderType> CreateReader(const char* strName,
751 const cStreamTypeHelper& oType);
752
765 template <typename WriterType = cPinWriter>
766 std::shared_ptr<WriterType> CreateWriter(const char* strName,
767 const cStreamTypeHelper& oType);
768
769 using cRuntimeBehaviour::RegisterRunner;
770
782
788
793 tResult RegisterRunner(const char* strName, base::flash::IRunnable& oRunnable);
794
799 tResult RegisterRunner(const char* strName, adtf::base::ant::IRunnable& oRunnable) override;
800
805 tResult ConfigureDataInTrigger(const char* strRunnerName, const char* strPinName);
806
811 tResult ConfigureDataOutTrigger(const char* strRunnerName, const char* strPinName);
812
817 tResult ConfigureTimerTrigger(const char* strRunnerName, tTimeStamp tmPeriod);
818
823 tResult ConfigureThreadTrigger(const char* strRunnerName, bool bCallCyclic);
824
825 public:
838 virtual tResult RequestDynamicInputPin(const char* strName,
840
853 virtual tResult RequestDynamicOutputPin(const char* strName,
855
868 virtual tResult RequestDynamicInterfaceClient(const char* strName,
870
883 virtual tResult RequestDynamicInterfaceServer(const char* strName,
885
886 public:
888 tResult RequestPin(const char* strName,
891
893 tResult RequestPin(const char* strName,
896
898 tResult RequestBindingObject(const char* strName,
901
903 tResult RequestBindingObject(const char* strName,
906
907 public:
918 void RegisterPropertyVariable(const char* strName,
919 base::ant::cPropertyVariable& oPropertyVariable);
920
931 void SetDescription(const char* strDescription);
932
947 void SetEditor(const char* strName, const char* strUrl);
948
949 protected:
960 void SetupStreamer(std::shared_ptr<streaming::flash::ISampleStreamer> pStreamer,
961 const char* strName,
963
968 void CreateInputPin(std::shared_ptr<streaming::flash::ISampleReader> pReader,
969 bool bDataInTrigger = true,
970 bool bForwardTriggerViaOutputPins = true);
971
975 void CreateInputPin(std::shared_ptr<streaming::flash::ISampleReader> pReader,
976 std::function<tResult(base::flash::tNanoSeconds)> fnTriggerCallback,
977 bool bForwardTriggerViaOutputPins = true);
978
982 void CreateInputPin(std::shared_ptr<streaming::flash::ISampleReader> pReader,
983 std::function<tResult(const ucom::ant::iobject_ptr<const streaming::ant::ISample>&)> fnSampleCallback,
984 bool bForwardTriggerViaOutputPins = true);
985
989 void CreateInputPin(std::shared_ptr<streaming::flash::ISampleReader> pReader,
990 std::function<tResult(base::flash::tNanoSeconds, const void*, size_t)> fnSampleDataCallback,
991 bool bForwardTriggerViaOutputPins = true);
992
996 void CreateOutputPin(std::shared_ptr<streaming::flash::ISampleWriter> pWriter);
997
998 protected:
999
1009
1010 protected:
1011 class cImplementation;
1012 std::unique_ptr<cImplementation> m_pImplementation;
1013};
1014
1015template <typename ReaderType>
1016ReaderType* cGraphObject::CreateInputPin(const char* strName,
1017 bool bDataInTrigger,
1018 bool bForwardTriggerViaOutputPins)
1019{
1020 return CreateInputPin<ReaderType>(strName,
1022 bDataInTrigger, bForwardTriggerViaOutputPins);
1023}
1024
1025template <typename ReaderType>
1026ReaderType* cGraphObject::CreateInputPin(const char* strName,
1027 const cStreamTypeHelper& oType,
1028 bool bDataInTrigger,
1029 bool bForwardTriggerViaOutputPins)
1030{
1031 auto pReader = CreateReader<ReaderType>(strName, oType);
1032 CreateInputPin(pReader, bDataInTrigger, bForwardTriggerViaOutputPins);
1033 return pReader.get();
1034}
1035
1036template <typename ReaderType>
1037ReaderType* cGraphObject::CreateInputPinWithCallback(const char* strName,
1038 const cStreamTypeHelper& oType,
1039 std::function<tResult(base::flash::tNanoSeconds)> fnTriggerCallback,
1040 bool bForwardTriggerViaOutputPins)
1041{
1042 auto pReader = CreateReader<ReaderType>(strName, oType);
1043 CreateInputPin(pReader, fnTriggerCallback, bForwardTriggerViaOutputPins);
1044 return pReader.get();
1045}
1046
1047template <typename ReaderType>
1048ReaderType* cGraphObject::CreateInputPinWithCallback(const char* strName,
1049 const cStreamTypeHelper& oType,
1050 std::function<tResult(const ucom::ant::iobject_ptr<const streaming::ant::ISample>&)> fnSampleCallback,
1051 bool bForwardTriggerViaOutputPins)
1052{
1053 auto pReader = CreateReader<ReaderType>(strName, oType);
1054 CreateInputPin(pReader, fnSampleCallback, bForwardTriggerViaOutputPins);
1055 return pReader.get();
1056}
1057
1058template<typename ReaderType>
1059ReaderType* cGraphObject::CreateInputPinWithCallback(const char* strName,
1060 const cStreamTypeHelper& oType,
1061 std::function<tResult (base::flash::tNanoSeconds, const void*, size_t)> fnSampleDataCallback,
1062 bool bForwardTriggerViaOutputPins)
1063{
1064 auto pReader = CreateReader<ReaderType>(strName, oType);
1065 CreateInputPin(pReader, fnSampleDataCallback, bForwardTriggerViaOutputPins);
1066 return pReader.get();
1067}
1068
1069
1070template <typename Type, typename ReaderType>
1071ReaderType* cGraphObject::CreateInputPinWithCallback(const char* strName,
1072 const cStreamTypeHelper& oType,
1073 std::function<tResult(base::flash::tNanoSeconds, const Type&)> fnDataCallback,
1074 bool bForwardTriggerViaOutputPins)
1075{
1076 return CreateInputPinWithCallback<ReaderType>(strName, oType, [fnDataCallback](const ucom::ant::iobject_ptr<const streaming::ant::ISample>& pSample) -> tResult
1077 {
1079 RETURN_IF_FAILED(pSample->Lock(pBuffer));
1080 if (pBuffer->GetSize() < sizeof(Type))
1081 {
1082 RETURN_ERROR_DESC(ERR_INVALID_ARG, "Invalid sample received, its too small for the requested type");
1083 }
1084 return fnDataCallback(streaming::get_sample_time(pSample), *static_cast<const Type*>(pBuffer->GetPtr()));
1085 },
1086 bForwardTriggerViaOutputPins);
1087}
1088
1089template <typename WriterType>
1090WriterType* cGraphObject::CreateOutputPin(const char* strName)
1091{
1092 return CreateOutputPin<WriterType>(strName, cStreamTypeHelper(nullptr));
1093}
1094
1095template <typename WriterType>
1096WriterType* cGraphObject::CreateOutputPin(const char* strName, const cStreamTypeHelper& oType)
1097{
1098 auto pWriter = CreateWriter<WriterType>(strName, oType);
1099 CreateOutputPin(pWriter);
1100 return pWriter.get();
1101}
1102
1103template <typename Interface, typename Instance>
1105{
1106 auto pInstancePointer = pInstance->object_ptr_from_this();
1107 if (!pInstancePointer)
1108 {
1109 THROW_ERROR_DESC(ERR_NOT_INITIALIZED, "Unable to add interface server '%s', object_ptr_from_this has not been initialized. "
1110 "This AddInterfaceServer overload cannot be called from within the constructor.",
1111 strName);
1112 }
1113 using namespace adtf::ucom::ant;
1114 using namespace adtf::streaming::ant;
1117 ucom_object_ptr_cast<IObject>(pInstancePointer));
1118 THROW_IF_FAILED(RegisterBindingObject(pBindingServer));
1119}
1120
1121template <typename Interface>
1131
1132template <typename Interface>
1141
1142template <typename ReaderType>
1143std::shared_ptr<ReaderType> cGraphObject::CreateReader(const char* strName,
1144 const cStreamTypeHelper& oType)
1145{
1146 auto pReader = std::make_shared<ReaderType>();
1147 SetupStreamer(pReader, strName, oType.GetStreamType());
1148 pReader->SetAcceptTypeCallback([pReader = pReader.get(), this](const ucom::ant::iobject_ptr<const streaming::ant::IStreamType>& pType) -> tResult
1149 {
1150 return AcceptType(pReader, pType);
1151 });
1152 return pReader;
1153}
1154
1155template <typename WriterType>
1156std::shared_ptr<WriterType> cGraphObject::CreateWriter(const char* strName,
1157 const cStreamTypeHelper& oType)
1158{
1159 auto pWriter = std::make_shared<WriterType>();
1160 SetupStreamer(pWriter, strName, oType.GetStreamType());
1161 return pWriter;
1162}
1163
1164}
1165
1166namespace hollow
1167{
1168
1173{
1174 public:
1191 template <typename RequestableWriterType = streaming::requestable_writer<>>
1192 RequestableWriterType* CreateRequestableOutputPin(const char* strName,
1194
1205 uint32_t nSubStreamId,
1206 const base::ant::IProperties* pRequestProperties = nullptr);
1207
1215 virtual void DisableSubStream(streaming::flash::ISampleWriter* pWriter, uint32_t nSubStreamId);
1216
1226 void SetHelpLink(const char* strUrl);
1227
1236 void SetDescription(const char* strItem, const char* strDescription);
1238
1239 private:
1240 void LockedCallEnableSubStream(streaming::flash::ISampleWriter* pWriter,
1241 uint32_t nSubStreamId,
1242 const base::ant::IProperties* pRequestProperties);
1243 void LockedCallDisableSubStream(streaming::flash::ISampleWriter* pWriter, uint32_t nSubStreamId);
1244};
1245
1246template <typename RequestableWriterType>
1247RequestableWriterType* cGraphObject::CreateRequestableOutputPin(const char* strName, const cStreamTypeHelper& oType)
1248{
1249 auto pWriter = CreateWriter<RequestableWriterType>(strName, oType);
1251 pWriter->SetCallbacks(std::bind(&cGraphObject::LockedCallEnableSubStream, this, pWriter.get(), std::placeholders::_1, std::placeholders::_2),
1252 std::bind(&cGraphObject::LockedCallDisableSubStream, this, pWriter.get(), std::placeholders::_1));
1253 return pWriter.get();
1254}
1255
1256}
1257
1258using flash::cPinReader;
1259using flash::cPinWriter;
1260using flash::pin_writer;
1264
1265} //namespace filter
1266} //namespace adtf
1267
A_UTILS_NS::cResult tResult
For backwards compatibility and to bring latest version into scope.
#define RETURN_ERROR_DESC(_code,...)
Same as RETURN_ERROR(_error) using a printf like parameter list for detailed error description.
#define RETURN_IF_FAILED(s)
Return if expression is failed, which requires the calling function's return type to be tResult.
Defintion of a property set container interface.
The Runnable interface defines common methods for a running component.
Default implemementation of a property_variable.
Implements all functionality required by ant::IConfiguration.
cDataTriggerHint(const std::vector< std::string > &lstInputNames)
Create a new hint with a list of inputs.
cDataTriggerHint(const char *strInputName)
Create a new hint.
No hint on which Active Runner to use.
cThreadTriggerHint(bool bCyclic=true)
Constructor that initializes the hint with the information if the thread runner should be cyclic or n...
cTimerTriggerHint(tTimeStamp tmInterval)
Constructor that initializes the hint with the prefered timer interval.
base::flash::tNanoSeconds GetInterval() const
cTimerTriggerHint(base::flash::tNanoSeconds tmInterval)
Constructor that initializes the hint with the prefered timer interval.
Base class for hints that give information on which Active Runner should be connected to a newly crea...
Base class for cFilter, cSampleStreamingSource and adtf::filter::flash::cSampleStreamingSink.
virtual tResult ProcessInput(streaming::flash::ISampleReader *pReader, base::flash::tNanoSeconds tmSample, const void *pSampleData, size_t nSampleDataSize)
Provides access to the sample content of incoming data.
void SetDescription(const char *strDescription)
Sets the description information that tools can display.
void CreateInputPin(std::shared_ptr< streaming::flash::ISampleReader > pReader, std::function< tResult(base::flash::tNanoSeconds, const void *, size_t)> fnSampleDataCallback, bool bForwardTriggerViaOutputPins=true)
The implementation used by CreateInputPin(const char*, const cStreamTypeHelper&, std::function<tResul...
ucom::ant::object_ptr< services::ant::IReferenceClock > _clock
A reference to the clock service.
ReaderType * CreateInputPin(const char *strName, bool bDataInTrigger=true, bool bForwardTriggerViaOutputPins=true)
Creates a new input pin with an anonymous stream type.
~cGraphObject() override
Destructor.
tResult RegisterRunner(const ucom::ant::iobject_ptr< streaming::ant::IRunner > &pRunner) override
This is here for compatibility reasons.
tResult RequestPin(const char *strName, const ucom::ant::iobject_ptr< const streaming::ant::IStreamType > &pType, ucom::ant::iobject_ptr< streaming::ant::IInPin > &pInPin)
For internal use. This will call RequestDynamicInputPin().
tResult ConfigureThreadTrigger(const char *strRunnerName, bool bCallCyclic)
This is here for compatibility reasons.
tResult ConfigureDataInTrigger(const char *strRunnerName, const char *strPinName)
This is here for compatibility reasons.
tResult RequestPin(const char *strName, const ucom::ant::iobject_ptr< const streaming::ant::IStreamType > &pType, ucom::ant::iobject_ptr< streaming::ant::IOutPin > &pOutPin)
For internal use. This will call RequestDynamicOutputPin().
tResult ConfigureTimerTrigger(const char *strRunnerName, tTimeStamp tmPeriod)
This is here for compatibility reasons.
virtual tResult RequestDynamicInterfaceServer(const char *strName, const ucom::ant::iobject_ptr< const streaming::ant::IBindingType > &pType)
Called whenever a new dynamic interface server binding object is requested.
ReaderType * CreateInputPinWithCallback(const char *strName, const cStreamTypeHelper &oType, std::function< tResult(base::flash::tNanoSeconds)> fnTriggerCallback, bool bForwardTriggerViaOutputPins=true)
Creates a new input pin with a given stream type.
tResult RegisterRunner(const char *strName, base::flash::IRunnable &oRunnable)
This is here for compatibility reasons.
ucom::ant::object_ptr< streaming::ant::IRunner > RegisterRunner(const char *strName, std::function< tResult(base::flash::tNanoSeconds)> fnRunMethod)
Creates and registers a new Runner.
WriterType * CreateOutputPin(const char *strName)
Creates a new output pin without an initial stream type.
void CreateInterfaceServer(const char *strName, ucom::ant::enable_object_ptr_from_this< Instance > *pInstance)
Creates an interface server binding object.
streaming::ant::IRunner * CreateRunner(const char *strName, std::function< tResult(base::flash::tNanoSeconds)> fnRunFunction, const cTriggerHint &oTriggerHint=cNoTriggerHint(), bool bForwardTriggerViaOutputPins=true)
Creates a new Runner that can be triggered by an Active Runner.
virtual tResult ProcessInput(streaming::flash::ISampleReader *pReader, const ucom::ant::iobject_ptr< const streaming::ant::ISample > &pSample)
Provides access to the sample of incoming data.
void CreateInputPin(std::shared_ptr< streaming::flash::ISampleReader > pReader, std::function< tResult(base::flash::tNanoSeconds)> fnTriggerCallback, bool bForwardTriggerViaOutputPins=true)
The implementation used by CreateInputPin(const char*, const cStreamTypeHelper&, std::function<tResul...
virtual tResult AcceptType(streaming::flash::ISampleReader *pReader, const ucom::ant::iobject_ptr< const streaming::ant::IStreamType > &pType)
Called whenever a new type is read from a reader that has no other accept type callback (SetAcceptTyp...
tResult RequestBindingObject(const char *strName, const ucom::ant::iobject_ptr< const streaming::ant::IBindingType > &pType, ucom::ant::iobject_ptr< streaming::ant::IBindingClient > &pClient)
For internal use. This will call RequestDynamicInterfaceClient().
void SetupStreamer(std::shared_ptr< streaming::flash::ISampleStreamer > pStreamer, const char *strName, const ucom::ant::iobject_ptr< const streaming::ant::IStreamType > &pType)
Used by the templated CreateInputPin() and CreateOutputPin() methods.
streaming::ant::IRunner * CreateRunner(const char *strName, const cTriggerHint &oTriggerHint=cNoTriggerHint(), bool bForwardTriggerViaOutputPins=true)
Creates a new Runner that can be triggered by an Active Runner.
std::shared_ptr< WriterType > CreateWriter(const char *strName, const cStreamTypeHelper &oType)
Creates and intializes a new sample reader.
virtual tResult Process(base::flash::tNanoSeconds tmTrigger, streaming::ant::IRunner *pRunner)
The default Runner function of the graph object.
tResult RegisterRunner(const char *strName, adtf::base::ant::IRunnable &oRunnable) override
This is here for compatibility reasons.
virtual tResult RequestDynamicOutputPin(const char *strName, const ucom::ant::iobject_ptr< const streaming::ant::IStreamType > &pType)
Called whenever a new dynamic output pin is requested.
virtual tResult RequestDynamicInterfaceClient(const char *strName, const ucom::ant::iobject_ptr< const streaming::ant::IBindingType > &pType)
Called whenever a new dynamic interface client binding object is requested.
interface_client< Interface > CreateInterfaceClient(const char *strName)
Creates an interface client binding object.
void CreateOutputPin(std::shared_ptr< streaming::flash::ISampleWriter > pWriter)
The implementation used by CreateOutputPin(const char*, const cStreamTypeHelper&),...
void RegisterPropertyVariable(const char *strName, base::ant::cPropertyVariable &oPropertyVariable)
Registers a new property variable which will always reflect the value of a property.
std::shared_ptr< ReaderType > CreateReader(const char *strName, const cStreamTypeHelper &oType)
Creates and intializes a new sample reader.
tResult ConfigureDataOutTrigger(const char *strRunnerName, const char *strPinName)
This is here for compatibility reasons.
void CreateInputPin(std::shared_ptr< streaming::flash::ISampleReader > pReader, std::function< tResult(const ucom::ant::iobject_ptr< const streaming::ant::ISample > &)> fnSampleCallback, bool bForwardTriggerViaOutputPins=true)
The implementation used by CreateInputPin(const char*, const cStreamTypeHelper&, std::function<tResul...
cGraphObject()
Default Constructor.
void SetEditor(const char *strName, const char *strUrl)
Sets the editor information that tools can use to edit the objects properties, pins etc.
virtual tResult ProcessInput(base::flash::tNanoSeconds tmTrigger, streaming::flash::ISampleReader *pReader)
Provides access to the reader of incoming data.
tResult RequestBindingObject(const char *strName, const ucom::ant::iobject_ptr< const streaming::ant::IBindingType > &pType, ucom::ant::iobject_ptr< streaming::ant::IBindingServer > &pServer)
For internal use. This will call RequestDynamicInterfaceServer().
virtual tResult RequestDynamicInputPin(const char *strName, const ucom::ant::iobject_ptr< const streaming::ant::IStreamType > &pType)
Called whenever a new dynamic input pin is requested.
void CreateInputPin(std::shared_ptr< streaming::flash::ISampleReader > pReader, bool bDataInTrigger=true, bool bForwardTriggerViaOutputPins=true)
The implementation used by CreateInputPin(const char*, bool, bool) and CreateInputPin(const char*,...
Helper class that wraps different objects into an adtf::streaming::ant::IStreamType.
ucom::ant::object_ptr< const streaming::ant::IStreamType > GetStreamType() const
Helper class that wraps a IBindingClient.
interface_client(const ucom::ant::iobject_ptr< streaming::ant::IBindingClient > &pClient)
/// initializes the object with an existing binding client.
interface_client()=default
default constructor that initializes the object to an invalid state.
void SetHelpLink(const char *strUrl)
Sets the link to the documentation that tools can display.
void SetDescription(const char *strItem, const char *strDescription)
Set the description for a data Pin, an Interface Binding Object or a Runner.
RequestableWriterType * CreateRequestableOutputPin(const char *strName, const cStreamTypeHelper &oType=streaming::ant::stream_meta_type_anonymous())
Creates a new requestable output pin with a given stream type.
virtual void DisableSubStream(streaming::flash::ISampleWriter *pWriter, uint32_t nSubStreamId)
Called when the last consumer cancels its request for the transmission of samples of a given Substrea...
virtual tResult EnableSubStream(streaming::flash::ISampleWriter *pWriter, uint32_t nSubStreamId, const base::ant::IProperties *pRequestProperties=nullptr)
This is called when the first consumer requests the transmission of samples of a given Substream.
The Interface defines a runnable item of the GraphObjects providing a IRuntimeBehaviour.
Definition runner_intf.h:24
Binding type generation template to initialize a BindingType with the information of the INTERFACE ty...
The cFilter class implements a basic filter that supports the IFilter and IPinEventSink interfaces.
Default IInterfaceBinding implementation.
virtual tResult RegisterBindingObject(const ucom::ant::iobject_ptr< IBindingObject > &pBindingObject)
RegisterBindingObject will register the given pBindingObject within the internal registry.
Default implementation for the IRuntimeBehaviour.
Interface for sample reads that read from sample streams via input pins.
Interface for sample writers that write to sample streams via output pins.
This base implementation of a sample writer is samples and types to the given pin set at SetStreamerP...
Specialized Sample Writer to write data of a given type DATA_TYPE (see Supported types for adtf_memor...
Safely retrieve a valid object_ptr<> instance to *this when all we have is *this.
object_ptr< T > object_ptr_from_this()
Retrieve an object_ptr with *this being the shared resource.
Base object pointer to realize binary compatible reference counting in interface methods.
Implementation for a shared lock guard.
Copyright © Audi Electronics Venture GmbH.
Copyright © Audi Electronics Venture GmbH.
Copyright © Audi Electronics Venture GmbH.
Copyright © Audi Electronics Venture GmbH.
Copyright © Audi Electronics Venture GmbH.
Copyright © Audi Electronics Venture GmbH.
Copyright © Audi Electronics Venture GmbH.
Copyright © Audi Electronics Venture GmbH.
Copyright © Audi Electronics Venture GmbH.
Namespace for the ADTF Base SDK.
Namespace for all functionality of the ADTF Filter SDK provided since v3.5.
adtf::streaming::flash::sample_writer< DATA_TYPE > pin_writer
Specialized Sample Writer to write DATA of type DATA_TYPE.
adtf::streaming::flash::time_limited_sample_reader< TIME_RANGE, STORELASTSAMPLE > time_limited_pin_reader
The time_limited_sample_reader will create a sample reader which will create a internal sample queue ...
adtf::streaming::flash::size_limited_sample_reader< MAX_SIZE, STORELASTSAMPLE > size_limited_pin_reader
The size_limited_sample_reader will create a sample reader which will create a internal sample queue ...
adtf::streaming::flash::cDynamicSampleReader cPinReader
use cSampleReader as cPinReader
adtf::streaming::flash::cSampleWriter cPinWriter
use cSampleWriter as cPinWriter
Namespace for all functionality of the ADTF Filter SDK provided since v3.7.
Namespace for the ADTF Filter SDK.
Namespace for all functionality of the ADTF Streaming SDK provided since v3.0.
sample_reader< ant::cDynamicSampleReaderQueue > cDynamicSampleReader
The cDynamicSampleReader will create a sample reader which will create a internal sample queue with u...
sample_reader< ant::time_limited_sample_reader_queue< TIME_RANGE >, STORELASTSAMPLE > time_limited_sample_reader
The time_limited_sample_reader will create a sample reader which will create a internal sample queue ...
sample_reader< ant::size_limited_sample_reader_queue< MAX_SIZE >, STORELASTSAMPLE > size_limited_sample_reader
The size_limited_sample_reader will create a sample reader which will create a internal sample queue ...
base::flash::tNanoSeconds get_sample_time(const ucom::ant::iobject_ptr< const ant::ISample > &pSample)
Returns the sample time stamp with nanosecond precision.
Namespace for all functionality provided since v3.0.
object_ptr< T > ucom_object_ptr_cast(object_ptr< T > oCasted)
Create an object_ptr with an already shared resource of implicitly convertible type.
object_ptr< Implementation > make_object_ptr(Args &&... args)
Create an instance of type object_ptr with Implementation as the shared resource.
const char * get_iid()
Alias bringing the latest version of get_iid() into scope.
Definition adtf_iid.h:434
Namespace for entire ADTF SDK.
Copyright © Audi Electronics Venture GmbH.
Copyright © Audi Electronics Venture GmbH.
Copyright © Audi Electronics Venture GmbH.
Copyright © Audi Electronics Venture GmbH.
Copyright © Audi Electronics Venture GmbH.
Copyright © Audi Electronics Venture GmbH.
Copyright © Audi Electronics Venture GmbH.
Copyright © Audi Electronics Venture GmbH.
Copyright © Audi Electronics Venture GmbH.
Copyright © Audi Electronics Venture GmbH.
#define adtf_string_intf(__string__)
The adtf_string_intf Macro helps to easily create a rvalue reference of a adtf::util::cString.
Use this Stream Meta Type only if no property should be set and you do not share and record these dat...
Copyright © Audi Electronics Venture GmbH.
#define THROW_ERROR_DESC(_code,...)
throws a tResult exception
#define THROW_IF_FAILED_DESC(s,...)
throws if the expression returns a failed tResult and ammends the error message.
#define THROW_IF_FAILED(s)
throws if the expression returns a failed tResult