ADTF  3.18.3
connect_pins.h
Go to the documentation of this file.
1 
7 #pragma once
12 
13 namespace adtf
14 {
15 namespace streaming
16 {
17 namespace testing
18 {
19 namespace ant
20 {
21  tResult connect_pin(const adtf::ucom::ant::iobject_ptr<IOutPin>& pOutPin,
23  bool bSync);
24  tResult connect_pin(const adtf::ucom::ant::iobject_ptr<IOutPin>& pOutPin,
26  bool bSync);
27 
28  tResult connect_pin(const adtf::ucom::ant::iobject_ptr<IInPin>& pInPin,
30  bool bSync);
31  tResult connect_pin(const adtf::ucom::ant::iobject_ptr<IInPin>& pInPin,
33  bool bSync);
34 
35  tResult connect_pins(const adtf::ucom::ant::iobject_ptr<IOutPin>& pOutPin,
37  bool bSync);
38  tResult connect_pins(const adtf::ucom::ant::iobject_ptr<IOutPin>& pOutPin,
41  bool bSync);
42  tResult connect_pins(const adtf::ucom::ant::iobject_ptr<ISampleStream>& pForcedSampleStream,
45  bool bSync);
46 
47 
48 
50  {
51  protected:
54 
55  public:
56  cSampleWriterTester() = default;
57  virtual ~cSampleWriterTester();
58 
59  tResult ConnectToPin(adtf::streaming::ant::IDataBinding& oDataBinding, const char* strPinName, bool bSync);
60  tResult Disconnect();
61 
62  tResult Write(tTimeStamp tmTime, const void* pData, size_t szData);
63  tResult RunTrigger(tTimeStamp tmTime);
64 
66 
67  tResult PrintTriggerPipe();
68 
69  tResult GetStreamError();
70  };
71 
73  {
74  public:
75  std::vector<adtf::ucom::object_ptr<const adtf::streaming::ant::ISample>> m_oSamples;
76  std::vector<adtf::ucom::object_ptr<const adtf::streaming::ant::IStreamType>> m_oTypes;
77  std::vector<tTimeStamp> m_oTriggers;
78 
79  private:
81 
82  public:
84  tResult Connect(adtf::streaming::ant::IDataBinding& oDataBinding, const char* strPinName);
86  tResult Push(const adtf::streaming::ant::IStreamItem& oItem, tTimeStamp tsTime) override;
87 
88  };
89 
90 } //namespace ant
91 
92 namespace flash
93 {
94 
96 {
97  public:
98  using ant::cSampleWriterTester::Write;
99  using ant::cSampleWriterTester::RunTrigger;
100 
101  tResult Write(base::flash::tNanoSeconds tmTime, const void* pData, size_t szData);
102  tResult RunTrigger(base::flash::tNanoSeconds tmTime);
103 };
104 
105 }
106 
107 namespace penguin
108 {
109 
122  const char* strOutputPin,
124  const char* strInputPin,
125  bool bSync = true);
126 
132 {
133  public:
140  const char* strPinName);
141 
147 
153 
159 
160  cDisconnector(cDisconnector&&) = default;
161  cDisconnector& operator=(cDisconnector&&) = default;
162 
167 
168  private:
170 };
171 
172 }
173 
174 using ant::connect_pin;
175 using ant::connect_pins;
180 
181 } //namespace testing
182 } //namespace streaming
183 } //namespace adtf
The IDataBinding interfaces provides methods for retrive information of the Pins published.
The IStreamItem interface is the base type for all object which are passed through a stream.
This base implementation of a sample writer is able to write to one Sample Stream which is connected ...
Definition: samplewriter.h:35
A Possible Sample Reader of a Trigger Function! Sample reader with a internal queue,...
Definition: samplereader.h:778
Utility class that can be used to disconnect a pin via RAII.
Definition: connect_pins.h:132
cDisconnector(const adtf::ucom::ant::iobject_ptr< adtf::streaming::ant::IOutPin > &pPin)
Overload for construction with a pin instance.
cDisconnector(const adtf::ucom::ant::iobject_ptr< adtf::streaming::ant::IPin > &pPin)
Overload for construction with a pin instance.
cDisconnector(const adtf::ucom::ant::iobject_ptr< adtf::streaming::ant::IInPin > &pPin)
Overload for construction with a pin instance.
~cDisconnector()
This will disconnect the pin.
cDisconnector(const adtf::ucom::ant::iobject_ptr< adtf::ucom::ant::IObject > &pObject, const char *strPinName)
This will retrieve the pin from the given object.
Base object pointer to realize binary compatible reference counting in interface methods.
Object pointer implementation used for reference counting on objects of type IObject.
Definition: object_ptr.h:163
Implementation of a weak pointer for usage with iobject_ptr and object_ptr.
Copyright © Audi Electronics Venture GmbH.
tResult connect_pins(const adtf::ucom::ant::iobject_ptr< adtf::ucom::ant::IObject > &pSource, const char *strOutputPin, const adtf::ucom::ant::iobject_ptr< adtf::ucom::ant::IObject > &pDestination, const char *strInputPin, bool bSync=true)
Connect the given output pin with the given input pin.
Namespace for entire ADTF SDK.
Copyright © Audi Electronics Venture GmbH.
Copyright © Audi Electronics Venture GmbH.
Copyright © Audi Electronics Venture GmbH.