ADTF  3.18.2
output_recorder.h
Go to the documentation of this file.
1 
7 #pragma once
8 #include <adtfucom3/adtf_ucom3.h>
12 #include <string>
13 #include <memory>
14 #include <map>
15 #include <unordered_map>
16 #include <utility>
17 
18 namespace adtf
19 {
20 
21 namespace filter
22 {
23 
24 namespace testing
25 {
26 
27 namespace giant
28 {
29 
34 {
35  public:
42  const char* strPinName);
43 
49 
54 
61 
68 
72  class cOutput
73  {
74  public:
75  typedef std::multimap<base::flash::tNanoSeconds,
76  std::vector<std::pair<ucom::ant::object_ptr<const streaming::ant::IStreamType>,
78  public:
79  std::vector<ucom::ant::object_ptr<const streaming::ant::IStreamType>> GetTypes() const;
80  std::vector<ucom::ant::object_ptr<const streaming::ant::ISample>> GetSamples() const;
81 
82  const tTriggerData& GetTrigger() const;
83 
84  private:
85  friend class cOutputRecorder;
86  tTriggerData m_oTrigger;
87  };
88 
94  cOutput GetCurrentOutput(bool bClear = true);
95 
100 
107  void RequestSamples(const char* strSubStreamName,
108  const std::unordered_map<std::string, std::string>& oProperties = {});
109 
117  tResult UnrequestSamples(const char* strSubStreamName);
118 
119  cOutputRecorder(const cOutputRecorder&) = delete;
120  cOutputRecorder& operator=(const cOutputRecorder&) = delete;
121 
122  private:
123  class cImplementation;
124  std::unique_ptr<cImplementation> m_pImplementation;
125 };
126 }
127 
129 
130 }
131 }
132 }
Copyright © Audi Electronics Venture GmbH.
Helper class that stores the output of a specific instant.
Test Helper class that records triggers, types and samples created by a graph object.
cOutputRecorder & operator=(cOutputRecorder &&oOther)
Move assignment operator.
cOutputRecorder(cOutputRecorder &&oOther)
Move constructor.
void RequestSamples(const char *strSubStreamName, const std::unordered_map< std::string, std::string > &oProperties={})
Try to request samples of a given Substream.
tResult UnrequestSamples(const char *strSubStreamName)
Try to unrequest samples of a given Substream.
cOutputRecorder(const ucom::ant::iobject_ptr< ucom::ant::IObject > &pObject, const char *strPinName)
Connects to the given output pin of a graph object.
bool WaitForTrigger(adtf::base::flash::tNanoSeconds tmTimeout=base::flash::tNanoSeconds{-1})
This blocks the calling context until either a trigger occured or the given timeout expired.
cOutput GetCurrentOutput(bool bClear=true)
Returns the current output data.
ucom::ant::object_ptr< const streaming::ant::IStreamType > GetCurrentType() const
Returns the current stream type.
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
Copyright © Audi Electronics Venture GmbH.
Namespace for entire ADTF SDK.
Copyright © Audi Electronics Venture GmbH.
Copyright © Audi Electronics Venture GmbH.