ADTF  3.13.0
graph_object.h
Go to the documentation of this file.
1 
7 #pragma once
8 #include "stream_type_helper.h"
9 
10 #include <adtfbase/configuration.h>
29 
30 #include <memory>
31 #include <functional>
32 
33 namespace adtf
34 {
35 namespace filter
36 {
37 namespace flash
38 {
39 
42 
44 template <typename DATA_TYPE>
46 
49 
51 template<tTimeStamp TIME_RANGE, tBool STORELASTSAMPLE = true>
53 
55 template<tSize MAX_SIZE, tBool STORELASTSAMPLE = true>
57 
64 template <typename Interface>
66 {
67  public:
69  interface_client() = default;
70 
76  m_pClient(pClient)
77  {}
78 
79  interface_client(const interface_client&) = default;
81  interface_client& operator=(const interface_client&) = default;
82  interface_client& operator=(interface_client&&) = default;
83 
88  {
89  if (m_pInterface)
90  {
91  return true;
92  }
93 
94  if (!m_pClient ||
95  IS_FAILED(m_pClient->GetServerObject(m_pInterface)))
96  {
97  return false;
98  }
99  m_pClient.Reset();
100  return true;
101  }
102 
106  Interface& Get() const
107  {
108  if (m_pInterface)
109  {
110  return *m_pInterface;
111  }
112 
113  if (!m_pClient)
114  {
115  THROW_ERROR_DESC(ERR_NOT_INITIALIZED, "interface client has not been created");
116  }
117 
118  auto nResult = m_pClient->GetServerObject(m_pInterface);
119  if (IS_FAILED(nResult))
120  {
121  std::string strName;
122  m_pClient->GetName(adtf_string_intf(strName));
123  THROW_IF_FAILED_DESC(nResult,
124  "Unable to aquire server object for client '%s' with interface '%s'.",
125  strName.c_str(),
126  adtf::ucom::get_iid<Interface>());
127  }
128 
129  m_pClient.Reset();
130  return *m_pInterface;
131  }
132 
133  Interface* operator->() const
134  {
135  return &Get();
136  }
137 
138  private:
140  mutable ucom::ant::object_ptr<Interface> m_pInterface;
141 
142 };
143 
183 {
184  public:
185 
191  {
192  public:
193  virtual ~cTriggerHint() = default;
194  };
195 
200  {
201  };
202 
207  {
208  public:
214  cThreadTriggerHint(tBool bCyclic = true):
215  m_bCyclic(bCyclic)
216  {
217  }
218 
222  tBool GetCyclic() const
223  {
224  return m_bCyclic;
225  }
226 
227  private:
228  tBool m_bCyclic;
229  };
230 
235  {
236  public:
242  m_tmInterval(tmInterval)
243  {
244  }
245 
251  m_tmInterval(base::flash::duration_cast<base::flash::tNanoSeconds>(tmInterval))
252  {
253  }
254 
259  {
260  return m_tmInterval;
261  }
262 
263  private:
264  base::flash::tNanoSeconds m_tmInterval;
265  };
266 
271  {
272  public:
277  cDataTriggerHint(const tChar* strInputName):
278  m_strInputName(strInputName)
279  {
280  }
281 
285  const tChar* GetInputName() const
286  {
287  return m_strInputName.c_str();
288  }
289 
290  private:
291  std::string m_strInputName;
292  };
293 
294  public:
296  cGraphObject();
297 
299  ~cGraphObject() override;
300 
301  public:
322  virtual tResult Process(base::flash::tNanoSeconds tmTrigger,
323  streaming::ant::IRunner* pRunner);
324 
361 
387 
407  base::flash::tNanoSeconds tmSample,
408  const tVoid* pSampleData,
409  tSize nSampleDataSize);
410 
424  template <typename ReaderType = cPinReader>
425  ReaderType* CreateInputPin(const tChar* strName,
426  tBool bDataInTrigger = true,
427  tBool bForwardTriggerViaOutputPins = true);
428 
443  template <typename ReaderType = cPinReader>
444  ReaderType* CreateInputPin(const tChar* strName,
445  const cStreamTypeHelper& oType,
446  tBool bDataInTrigger = true,
447  tBool bForwardTriggerViaOutputPins = true);
448 
466  template <typename ReaderType = cPinReader>
467  ReaderType* CreateInputPinWithCallback(const tChar* strName,
468  const cStreamTypeHelper& oType,
469  std::function<tResult(base::flash::tNanoSeconds)> fnTriggerCallback,
470  tBool bForwardTriggerViaOutputPins = true);
471 
490  template <typename ReaderType = cPinReader>
491  ReaderType* CreateInputPinWithCallback(const tChar* strName,
492  const cStreamTypeHelper& oType,
493  std::function<tResult(const ucom::ant::iobject_ptr<const streaming::ant::ISample>&)> fnSampleCallback,
494  tBool bForwardTriggerViaOutputPins = true);
495 
514  template <typename ReaderType = cPinReader>
515  ReaderType* CreateInputPinWithCallback(const tChar* strName,
516  const cStreamTypeHelper& oType,
517  std::function<tResult(base::flash::tNanoSeconds, const tVoid*, tSize)> fnSampleDataCallback,
518  tBool bForwardTriggerViaOutputPins = true);
519 
539  template <typename Type, typename ReaderType = cPinReader>
540  ReaderType* CreateInputPinWithCallback(const tChar* strName,
541  const cStreamTypeHelper& oType,
542  std::function<tResult(base::flash::tNanoSeconds, const Type&)> fnDataCallback,
543  tBool bForwardTriggerViaOutputPins = true);
544 
571  template <typename WriterType = cPinWriter>
572  WriterType* CreateOutputPin(const tChar* strName);
573 
586  template <typename WriterType = cPinWriter>
587  WriterType* CreateOutputPin(const tChar* strName, const cStreamTypeHelper& oType);
588 
606  const cTriggerHint& oTriggerHint = cNoTriggerHint(),
607  tBool bForwardTriggerViaOutputPins = true);
608 
628  std::function<tResult(base::flash::tNanoSeconds)> fnRunFunction,
629  const cTriggerHint& oTriggerHint = cNoTriggerHint(),
630  tBool bForwardTriggerViaOutputPins = true);
631 
650  template <typename Interface, typename Instance>
652 
664  template <typename Interface>
665  tVoid CreateInterfaceServer(const tChar* strName, const ucom::ant::iobject_ptr<Interface>& pInstance);
666 
678  template <typename Interface>
680 
693  template <typename ReaderType = cPinReader>
694  std::shared_ptr<ReaderType> CreateReader(const tChar* strName,
695  const cStreamTypeHelper& oType);
696 
709  template <typename WriterType = cPinWriter>
710  std::shared_ptr<WriterType> CreateWriter(const tChar* strName,
711  const cStreamTypeHelper& oType);
712 
713  using cRuntimeBehaviour::RegisterRunner;
714 
726 
732 
737  tResult RegisterRunner(const tChar* strName, base::flash::IRunnable& oRunnable);
738 
743  tResult RegisterRunner(const tChar* strName, adtf::base::ant::IRunnable& oRunnable) override;
744 
749  tResult ConfigureDataInTrigger(const tChar* strRunnerName, const tChar* strPinName);
750 
755  tResult ConfigureDataOutTrigger(const tChar* strRunnerName, const tChar* strPinName);
756 
761  tResult ConfigureTimerTrigger(const tChar* strRunnerName, tTimeStamp tmPeriod);
762 
767  tResult ConfigureThreadTrigger(const tChar* strRunnerName, tBool bCallCyclic);
768 
769  public:
782  virtual tResult RequestDynamicInputPin(const tChar* strName,
784 
797  virtual tResult RequestDynamicOutputPin(const tChar* strName,
799 
812  virtual tResult RequestDynamicInterfaceClient(const tChar* strName,
814 
827  virtual tResult RequestDynamicInterfaceServer(const tChar* strName,
829 
830  public:
832  tResult RequestPin(const tChar* strName,
835 
837  tResult RequestPin(const tChar* strName,
840 
842  tResult RequestBindingObject(const tChar* strName,
845 
847  tResult RequestBindingObject(const tChar* strName,
850 
851  public:
862  tVoid RegisterPropertyVariable(const tChar* strName,
863  base::ant::cPropertyVariable& oPropertyVariable);
864 
875  tVoid SetDescription(const tChar* strDescription);
876 
891  tVoid SetEditor(const tChar* strName, const tChar* strUrl);
892 
893  protected:
904  tVoid SetupStreamer(std::shared_ptr<streaming::flash::ISampleStreamer> pStreamer,
905  const tChar* strName,
907 
912  tVoid CreateInputPin(std::shared_ptr<streaming::flash::ISampleReader> pReader,
913  tBool bDataInTrigger = true,
914  tBool bForwardTriggerViaOutputPins = true);
915 
919  tVoid CreateInputPin(std::shared_ptr<streaming::flash::ISampleReader> pReader,
920  std::function<tResult(base::flash::tNanoSeconds)> fnTriggerCallback,
921  tBool bForwardTriggerViaOutputPins = true);
922 
926  tVoid CreateInputPin(std::shared_ptr<streaming::flash::ISampleReader> pReader,
927  std::function<tResult(const ucom::ant::iobject_ptr<const streaming::ant::ISample>&)> fnSampleCallback,
928  tBool bForwardTriggerViaOutputPins = true);
929 
933  tVoid CreateInputPin(std::shared_ptr<streaming::flash::ISampleReader> pReader,
934  std::function<tResult(base::flash::tNanoSeconds, const tVoid*, tSize)> fnSampleDataCallback,
935  tBool bForwardTriggerViaOutputPins = true);
936 
940  tVoid CreateOutputPin(std::shared_ptr<streaming::flash::ISampleWriter> pWriter);
941 
942  protected:
943 
953 
954  protected:
955  class cImplementation;
956  std::unique_ptr<cImplementation> m_pImplementation;
957 };
958 
959 template <typename ReaderType>
960 ReaderType* cGraphObject::CreateInputPin(const tChar* strName,
961  tBool bDataInTrigger,
962  tBool bForwardTriggerViaOutputPins)
963 {
964  return CreateInputPin<ReaderType>(strName,
966  bDataInTrigger, bForwardTriggerViaOutputPins);
967 }
968 
969 template <typename ReaderType>
970 ReaderType* cGraphObject::CreateInputPin(const tChar* strName,
971  const cStreamTypeHelper& oType,
972  tBool bDataInTrigger,
973  tBool bForwardTriggerViaOutputPins)
974 {
975  auto pReader = CreateReader<ReaderType>(strName, oType);
976  CreateInputPin(pReader, bDataInTrigger, bForwardTriggerViaOutputPins);
977  return pReader.get();
978 }
979 
980 template <typename ReaderType>
982  const cStreamTypeHelper& oType,
983  std::function<tResult(base::flash::tNanoSeconds)> fnTriggerCallback,
984  tBool bForwardTriggerViaOutputPins)
985 {
986  auto pReader = CreateReader<ReaderType>(strName, oType);
987  CreateInputPin(pReader, fnTriggerCallback, bForwardTriggerViaOutputPins);
988  return pReader.get();
989 }
990 
991 template <typename ReaderType>
993  const cStreamTypeHelper& oType,
994  std::function<tResult(const ucom::ant::iobject_ptr<const streaming::ant::ISample>&)> fnSampleCallback,
995  tBool bForwardTriggerViaOutputPins)
996 {
997  auto pReader = CreateReader<ReaderType>(strName, oType);
998  CreateInputPin(pReader, fnSampleCallback, bForwardTriggerViaOutputPins);
999  return pReader.get();
1000 }
1001 
1002 template<typename ReaderType>
1004  const cStreamTypeHelper& oType,
1005  std::function<tResult (base::flash::tNanoSeconds, const tVoid*, tSize)> fnSampleDataCallback,
1006  tBool bForwardTriggerViaOutputPins)
1007 {
1008  auto pReader = CreateReader<ReaderType>(strName, oType);
1009  CreateInputPin(pReader, fnSampleDataCallback, bForwardTriggerViaOutputPins);
1010  return pReader.get();
1011 }
1012 
1013 
1014 template <typename Type, typename ReaderType>
1016  const cStreamTypeHelper& oType,
1017  std::function<tResult(base::flash::tNanoSeconds, const Type&)> fnDataCallback,
1018  tBool bForwardTriggerViaOutputPins)
1019 {
1020  return CreateInputPinWithCallback<ReaderType>(strName, oType, [fnDataCallback](const ucom::ant::iobject_ptr<const streaming::ant::ISample>& pSample) -> tResult
1021  {
1023  RETURN_IF_FAILED(pSample->Lock(pBuffer));
1024  if (pBuffer->GetSize() < sizeof(Type))
1025  {
1026  RETURN_ERROR_DESC(ERR_INVALID_ARG, "Invalid sample received, its too small for the requested type");
1027  }
1028  return fnDataCallback(streaming::get_sample_time(pSample), *static_cast<const Type*>(pBuffer->GetPtr()));
1029  },
1030  bForwardTriggerViaOutputPins);
1031 }
1032 
1033 template <typename WriterType>
1034 WriterType* cGraphObject::CreateOutputPin(const tChar* strName)
1035 {
1036  return CreateOutputPin<WriterType>(strName, cStreamTypeHelper(nullptr));
1037 }
1038 
1039 template <typename WriterType>
1040 WriterType* cGraphObject::CreateOutputPin(const tChar* strName, const cStreamTypeHelper& oType)
1041 {
1042  auto pWriter = CreateWriter<WriterType>(strName, oType);
1043  CreateOutputPin(pWriter);
1044  return pWriter.get();
1045 }
1046 
1047 template <typename Interface, typename Instance>
1049 {
1050  auto pInstancePointer = pInstance->object_ptr_from_this();
1051  if (!pInstancePointer)
1052  {
1053  THROW_ERROR_DESC(ERR_NOT_INITIALIZED, "Unable to add interface server '%s', object_ptr_from_this has not been initialized. "
1054  "This AddInterfaceServer overload cannot be called from within the constructor.",
1055  strName);
1056  }
1057  using namespace adtf::ucom::ant;
1058  using namespace adtf::streaming::ant;
1059  object_ptr<IBindingServer> pBindingServer = make_object_ptr<streaming::elasto::cWeakBindingServer>(strName,
1060  object_ptr<const IBindingType>(make_object_ptr<binding_type<Interface>>()),
1061  ucom_object_ptr_cast<IObject>(pInstancePointer));
1062  THROW_IF_FAILED(RegisterBindingObject(pBindingServer));
1063 }
1064 
1065 template <typename Interface>
1067 {
1068  using namespace adtf::ucom::ant;
1069  using namespace adtf::streaming::ant;
1070  object_ptr<IBindingServer> pBindingServer = make_object_ptr<cBindingServer>(strName,
1071  object_ptr<const IBindingType>(make_object_ptr<binding_type<Interface>>()),
1072  ucom_object_ptr_cast<IObject>(pInstance));
1073  THROW_IF_FAILED(RegisterBindingObject(pBindingServer));
1074 }
1075 
1076 template <typename Interface>
1078 {
1080  ucom::ant::make_object_ptr<streaming::ant::cBindingClient>(strName,
1081  ucom::ant::object_ptr<const streaming::ant::IBindingType>(ucom::ant::make_object_ptr<streaming::ant::binding_type<Interface>>()));
1082  THROW_IF_FAILED(RegisterBindingObject(pBindingClient));
1083  return pBindingClient;
1084 }
1085 
1086 template <typename ReaderType>
1087 std::shared_ptr<ReaderType> cGraphObject::CreateReader(const tChar* strName,
1088  const cStreamTypeHelper& oType)
1089 {
1090  auto pReader = std::make_shared<ReaderType>();
1091  SetupStreamer(pReader, strName, oType.GetStreamType());
1092  pReader->SetAcceptTypeCallback([pReader = pReader.get(), this](const ucom::ant::iobject_ptr<const streaming::ant::IStreamType>& pType) -> tResult
1093  {
1094  return AcceptType(pReader, pType);
1095  });
1096  return pReader;
1097 }
1098 
1099 template <typename WriterType>
1100 std::shared_ptr<WriterType> cGraphObject::CreateWriter(const tChar* strName,
1101  const cStreamTypeHelper& oType)
1102 {
1103  auto pWriter = std::make_shared<WriterType>();
1104  SetupStreamer(pWriter, strName, oType.GetStreamType());
1105  return pWriter;
1106 }
1107 
1108 }
1109 
1110 namespace hollow
1111 {
1112 
1117 {
1118  public:
1135  template <typename RequestableWriterType = streaming::requestable_writer<>>
1136  RequestableWriterType* CreateRequestableOutputPin(const tChar* strName,
1138 
1148  virtual tResult EnableSubStream(streaming::flash::ISampleWriter* pWriter,
1149  tUInt32 nSubStreamId,
1150  const base::ant::IProperties* pRequestProperties = nullptr);
1151 
1159  virtual tVoid DisableSubStream(streaming::flash::ISampleWriter* pWriter, tUInt32 nSubStreamId);
1160 
1170  tVoid SetHelpLink(const tChar* strUrl);
1171 
1180  tVoid SetDescription(const tChar* strItem, const tChar* strDescription);
1182 
1183  private:
1184  tVoid LockedCallEnableSubStream(streaming::flash::ISampleWriter* pWriter,
1185  tUInt32 nSubStreamId,
1186  const base::ant::IProperties* pRequestProperties);
1187  tVoid LockedCallDisableSubStream(streaming::flash::ISampleWriter* pWriter, tUInt32 nSubStreamId);
1188 };
1189 
1190 template <typename RequestableWriterType>
1191 RequestableWriterType* cGraphObject::CreateRequestableOutputPin(const tChar* strName, const cStreamTypeHelper& oType)
1192 {
1193  auto pWriter = CreateWriter<RequestableWriterType>(strName, oType);
1195  pWriter->SetCallbacks(std::bind(&cGraphObject::LockedCallEnableSubStream, this, pWriter.get(), std::placeholders::_1, std::placeholders::_2),
1196  std::bind(&cGraphObject::LockedCallDisableSubStream, this, pWriter.get(), std::placeholders::_1));
1197  return pWriter.get();
1198 }
1199 
1200 }
1201 
1202 using flash::cPinReader;
1203 using flash::cPinWriter;
1204 using flash::pin_writer;
1208 
1209 } //namespace filter
1210 } //namespace adtf
1211 
tVoid SetupStreamer(std::shared_ptr< streaming::flash::ISampleStreamer > pStreamer, const tChar *strName, const ucom::ant::iobject_ptr< const streaming::ant::IStreamType > &pType)
Used by the templated CreateInputPin() and CreateOutputPin() methods.
Object pointer implementation used for reference counting on objects of type IObject.
Definition: object_ptr.h:157
No hint on which Active Runner to use.
Definition: graph_object.h:199
The cFilter class implements a basic filter that supports the IFilter and IPinEventSink interfaces...
Definition: data_binding.h:24
Helper class that wraps different objects into an adtf::streaming::ant::IStreamType.
interface_client(const ucom::ant::iobject_ptr< streaming::ant::IBindingClient > &pClient)
/// initializes the object with an existing binding client.
Definition: graph_object.h:75
virtual tResult ProcessInput(base::flash::tNanoSeconds tmTrigger, streaming::flash::ISampleReader *pReader)
Default method to process input data.
object_ptr< T > object_ptr_from_this()
Retrieve an object_ptr with *this being the shared resource.
Base class for hints that give information on which Active Runner should be connected to a newly crea...
Definition: graph_object.h:190
Copyright © Audi Electronics Venture GmbH.
A common result class usable as return value throughout.
Definition: result.h:23
cDataTriggerHint(const tChar *strInputName)
Create a new hint.
Definition: graph_object.h:277
object_ptr< T > ucom_object_ptr_cast(const iobject_ptr< U > &i_oOther)
Create an object_ptr with a already shared resource of implicitly convertible type.
streaming::ant::IRunner * CreateRunner(const tChar *strName, const cTriggerHint &oTriggerHint=cNoTriggerHint(), tBool bForwardTriggerViaOutputPins=true)
Creates a new Runner that can be triggered by an Active Runner.
Namespace for all functionality provided since v3.0.
tResult RequestBindingObject(const tChar *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().
#define RETURN_ERROR_DESC(_code,...)
Same as RETURN_ERROR(_error) using a printf like parameter list for detailed error description...
Definition: error.h:47
Copyright © Audi Electronics Venture GmbH.
Reads and stores Samples within the given queue implementation INTERNAL_QUEUE.
#define THROW_ERROR_DESC(_code,...)
throws a tResult exception
Implements all functionality required by ant::IConfiguration.
Default implemementation of a property_variable.
Definition: configuration.h:66
Use this Stream Meta Type only if no property should be set and you do not share and record these dat...
Namespace for entire ADTF SDK.
interface_client()=default
default constructor that initializes the object to an invalid state.
Copyright © Audi Electronics Venture GmbH.
WriterType * CreateOutputPin(const tChar *strName)
Creates a new output pin without an initial stream type.
Copyright © Audi Electronics Venture GmbH.
Hint that a Data-In trigger should be created to trigger a Runner.
Definition: graph_object.h:270
adtf::streaming::flash::cSampleWriter cPinWriter
use cSampleWriter as cPinWriter
Definition: graph_object.h:41
Interface for sample writers that write to sample streams via output pins.
a timestamp with nanosecond precision
Definition: chrono.h:19
Copyright © Audi Electronics Venture GmbH.
Copyright © Audi Electronics Venture GmbH.
virtual tResult RequestDynamicInterfaceServer(const tChar *strName, const ucom::ant::iobject_ptr< const streaming::ant::IBindingType > &pType)
Called whenever a new dynamic interface server binding object is requested.
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 ...
Definition: graph_object.h:56
This base implementation of a sample writer is samples and types to the given pin set at adtf::stream...
Definition: samplewriter.h:367
Defintion of a property set container interface.
uint32_t tUInt32
type definition for unsigned integer values (32bit) (platform and compiler independent type)...
tResult ConfigureDataOutTrigger(const tChar *strRunnerName, const tChar *strPinName)
This is here for compatibility reasons.
The Interface defines a runnable item of the GraphObjects providing a IRuntimeBehaviour.
Definition: runner_intf.h:22
Implementation for a shared lock guard.
tResult ConfigureDataInTrigger(const tChar *strRunnerName, const tChar *strPinName)
This is here for compatibility reasons.
~cGraphObject() override
Destructor.
Safely retrieve a valid object_ptr<> instance to *this when all we have is *this. ...
Default implementation for the IRuntimeBehaviour.
Base class for adtf::filter::flash::cFilter, adtf::filter::flash::cSampleStreamingSource and adtf::fi...
base::flash::tNanoSeconds GetInterval() const
Definition: graph_object.h:258
std::shared_ptr< ReaderType > CreateReader(const tChar *strName, const cStreamTypeHelper &oType)
Creates and intializes a new sample reader.
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 ...
Definition: graph_object.h:52
ucom::ant::object_ptr< services::ant::IReferenceClock > _clock
A reference to the clock service.
Definition: graph_object.h:952
virtual tResult Process(base::flash::tNanoSeconds tmTrigger, streaming::ant::IRunner *pRunner)
The default Runner function of the graph object.
#define adtf_string_intf(__string__)
The adtf_string_intf Macro helps to easily create a rvalue reference of a adtf::util::cString.
Definition: string_intf.h:285
Copyright © Audi Electronics Venture GmbH.
#define IS_FAILED(s)
Check if result is failed.
Definition: error.h:23
Copyright © Audi Electronics Venture GmbH.
sample_reader< ant::cDynamicSampleReaderQueue > cDynamicSampleReader
The cDynamicSampleReader will create a sample reader which will create a internal sample queue with u...
Hint that a timer Active Runner should be used to trigger a Runner.
Definition: graph_object.h:234
A_UTILS_NS::cResult tResult
For backwards compatibility and to bring latest version into scope.
Definition: result.h:513
bool tBool
The tBool defines the type for the Values tTrue and tFalse (platform and compiler dependent)...
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 (streaming::a...
tVoid RegisterPropertyVariable(const tChar *strName, base::ant::cPropertyVariable &oPropertyVariable)
Registers a new property variable which will always reflect the value of a property.
ucom::ant::object_ptr< const streaming::ant::IStreamType > GetStreamType() const
Base class for every interface type within the uCOM.
Definition: object_intf.h:30
interface_client< Interface > CreateInterfaceClient(const tChar *strName)
Creates an interface client binding object.
virtual tResult RequestDynamicInputPin(const tChar *strName, const ucom::ant::iobject_ptr< const streaming::ant::IStreamType > &pType)
Called whenever a new dynamic input pin is requested.
cGraphObject()
Default Constructor.
base::flash::tNanoSeconds get_sample_time(const ucom::ant::iobject_ptr< const ant::ISample > &pSample)
Returns the sample time stamp with nanosecond precision.
Specialized Sample Writer to write data of a given type DATA_TYPE.
Definition: samplewriter.h:450
Copyright © Audi Electronics Venture GmbH.
Default IInterfaceBinding implementation.
Hint that a thread Active Runner should be used to trigger a Runner.
Definition: graph_object.h:206
The Runnable interface defines common methods for a running component.
Definition: runnable_intf.h:25
tResult ConfigureThreadTrigger(const tChar *strRunnerName, tBool bCallCyclic)
This is here for compatibility reasons.
Copyright © Audi Electronics Venture GmbH.
tResult ConfigureTimerTrigger(const tChar *strRunnerName, tTimeStamp tmPeriod)
This is here for compatibility reasons.
virtual tResult RegisterBindingObject(const ucom::ant::iobject_ptr< IBindingObject > &pBindingObject)
RegisterBindingObject will register the given pBindingObject within the internal registry.
char tChar
The tChar defines the type for platform character set (platform and compiler dependent type)...
Interface for sample reads that read from sample streams via input pins.
virtual tResult RequestDynamicInterfaceClient(const tChar *strName, const ucom::ant::iobject_ptr< const streaming::ant::IBindingType > &pType)
Called whenever a new dynamic interface client binding object is requested.
cTimerTriggerHint(tTimeStamp tmInterval)
Constructor that initializes the hint with the prefered timer interval.
Definition: graph_object.h:250
Copyright © Audi Electronics Venture GmbH.
tVoid SetDescription(const tChar *strDescription)
Sets the description information that tools can display.
Copyright © Audi Electronics Venture GmbH.
Base object pointer to realize binary compatible reference counting in interface methods.
cThreadTriggerHint(tBool bCyclic=true)
Constructor that initializes the hint with the information if the thread runner should be cyclic or n...
Definition: graph_object.h:214
Copyright © Audi Electronics Venture GmbH.
#define THROW_IF_FAILED_DESC(s,...)
throws if the expression returns a failed tResult and ammends the error message.
Copyright © Audi Electronics Venture GmbH.
#define THROW_IF_FAILED(s)
throws if the expression returns a failed tResult
#define RETURN_IF_FAILED(s)
returns if the expression returns a failed tResult or throws an exception.
Namespace for all functionality of the ADTF Streaming SDK provided since v3.0.
Copyright © Audi Electronics Venture GmbH.
Helper class that wraps a streaming::ant::IBindingClient.
Definition: graph_object.h:65
tResult RequestPin(const tChar *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().
adtf::streaming::flash::cDynamicSampleReader cPinReader
use cSampleReader as cPinReader
Definition: graph_object.h:48
ReaderType * CreateInputPinWithCallback(const tChar *strName, const cStreamTypeHelper &oType, std::function< tResult(base::flash::tNanoSeconds)> fnTriggerCallback, tBool bForwardTriggerViaOutputPins=true)
Creates a new input pin with a given stream type.
Definition: graph_object.h:981
tVoid CreateInterfaceServer(const tChar *strName, ucom::ant::enable_object_ptr_from_this< Instance > *pInstance)
Creates an interface server binding object.
virtual tResult RequestDynamicOutputPin(const tChar *strName, const ucom::ant::iobject_ptr< const streaming::ant::IStreamType > &pType)
Called whenever a new dynamic output pin is requested.
Copyright © Audi Electronics Venture GmbH.
Copyright © Audi Electronics Venture GmbH.
cTimerTriggerHint(base::flash::tNanoSeconds tmInterval)
Constructor that initializes the hint with the prefered timer interval.
Definition: graph_object.h:241
adtf::streaming::flash::sample_writer< DATA_TYPE > pin_writer
Specialized Sample Writer to write DATA of type DATA_TYPE.
Definition: graph_object.h:45
tVoid SetEditor(const tChar *strName, const tChar *strUrl)
Sets the editor information that tools can use to edit the objects properties, pins etc...
Copyright © Audi Electronics Venture GmbH.
std::shared_ptr< WriterType > CreateWriter(const tChar *strName, const cStreamTypeHelper &oType)
Creates and intializes a new sample reader.
Copyright © Audi Electronics Venture GmbH.
Copyright © Audi Electronics Venture GmbH.
ReaderType * CreateInputPin(const tChar *strName, tBool bDataInTrigger=true, tBool bForwardTriggerViaOutputPins=true)
Creates a new input pin with an anonymous stream type.
Definition: graph_object.h:960
ucom::ant::object_ptr< streaming::ant::IRunner > RegisterRunner(const tChar *strName, std::function< tResult(base::flash::tNanoSeconds)> fnRunMethod)
Creates and registers a new Runner.
Base class for adtf::filter::flash::cFilter, adtf::filter::flash::cSampleStreamingSource and adtf::fi...
Definition: graph_object.h:177

Copyright © Audi Electronics Venture GmbH. All rights reserved. (Generated on Tue Sep 28 2021 by doxygen 1.8.14)