ADTF  3.18.2
samplestreamoutport.h
Go to the documentation of this file.
1 
7 #pragma once
8 
9 #include "samplestream.h"
10 #include "streaming_graph_intf.h"
11 #include "samplestreamport_intf.h"
12 
13 namespace adtf
14 {
15 namespace streaming
16 {
17 namespace ant
18 {
26  public ucom::catwo::object<IStreamingPort,
27  IStreamingOutPort,
28  sample_stream<ISampleStreamOutPort>>
29  {
30  public:
33  "default_sample_stream_out_port.streaming.adtf.cid",
34  "Sample Stream Outport");
35 
36  protected:
45 
47  cSampleStreamOutPort() = default;
48  public:
49 
51  cSampleStreamOutPort(const char* strName, const char* strPortID)
52  {
53  SetName(strName);
54  m_strPortID = strPortID;
55  }
57  virtual ~cSampleStreamOutPort() = default;
58 
59  public:
60  tResult GetPortID(adtf::base::ant::IString&& strID)
61  {
62  return strID.Set(m_strPortID);
63  }
64  private:
65  adtf_util::cString m_strPortID;
66  };
67 
68 
69 } //namespace ant
70 
71 namespace flash
72 {
73 
74 class cSampleStreamOutPort: public ucom::catwo::object<base::ant::IRunnable,
75  ant::ITriggerPipeSource,
76  ant::ITriggerPipeItem,
77  ant::INamedGraphObject,
78  ant::ISampleStream,
79  ant::IStreamingPort,
80  ant::IStreamingOutPort,
81  ant::ISampleStreamOutPort,
82  base::flash::IRunnable>
83 {
84  public:
86  cSampleStreamOutPort(const char* strName, const char* strPortId);
87 
88  public:
89  tResult Run(tTimeStamp tmTimeofActivation,
90  base::ant::IRunnable::tActivationType ui32ActivationType,
91  const void* pvUserData,
92  size_t nUserDataSize) override;
93 
94  tResult Run(base::flash::tNanoSeconds tmTimeofActivation,
95  base::ant::IRunnable::tActivationType ui32ActivationType,
96  const void* pvUserData,
97  size_t nUserDataSize) override;
98 
99  public:
100  tResult RegisterSubItem(const ucom::ant::iobject_ptr<ant::ITriggerPipeItem>& pSubRun,
101  ant::ITriggerPipeSource::tPriority ui32Prio) override;
102  tResult UnregisterSubItem(const ucom::ant::iobject_ptr<ant::ITriggerPipeItem>& pSubRun) override;
103 
104  tResult ChangePriority(const ucom::ant::iobject_ptr<ant::ITriggerPipeItem>& pSubRun,
105  ant::ITriggerPipeSource::tPriority ui32Prio) override;
106  tResult GetSubItems(ucom::ant::iobject_enum<const ant::ITriggerPipeItem>& lstSubItems) const override;
107 
108  public:
109  tResult GetName(base::ant::IString&& strName) const override;
110  tResult SetName(const char* strName) override;
111  tResult SetParent(const ucom::ant::IObject* oParentObject) override;
112  tResult GetParent(const ucom::ant::IObject*& poParentObject) const override;
113 
114  public:
115  tResult GetStreamError();
116  tResult GetType(ucom::ant::iobject_ptr<const ant::IStreamType>& pStreamType) const override;
117  tTimeStamp GetTime() const override;
118  tResult SetStreamError(const tResult& oError) override;
119  tResult AttachRouting(const ucom::ant::iobject_ptr<ant::ISampleStream>& pSampleStreamTo) override;
120  tResult DetachRouting(const ucom::ant::iobject_ptr<ant::ISampleStream>& pSampleStreamTo) override;
121  tResult Open(const char* strName,
123  const ucom::ant::iobject_ptr<const ant::IStreamType>& pInitialAcceptedStreamType,
126  size_t szQueueSize) override;
127  tResult Open(const char* strName,
130  size_t szQueueSize) override;
131  public:
132  tResult GetPortID(adtf::base::ant::IString&& strID) override;
133 
134  protected:
135  ~cSampleStreamOutPort() override;
136 
137  protected:
138  class cImplementation;
139  std::unique_ptr<cImplementation> m_pImplementation;
140 };
141 
142 }
143 
144 namespace quiet
145 {
146 
147 class cSampleStreamOutPort: public ucom::catwo::object<flash::cSampleStreamOutPort,
148  ITriggerPipeHierachy>
149 {
150  public:
152  cSampleStreamOutPort(const char* strName, const char* strPortId);
153  ~cSampleStreamOutPort() override;
154 
155  ADTF_QUIET_TRIGGER_PIPE_ITEM_METHOD_DECLARATIONS
156 };
157 
158 }
159 
162 } //namespace streaming
163 } //namespace adtf
tActivationType
Enumeration of the possible activation types to set a component in running state.
Definition: runnable_intf.h:44
The IString interface provides methods for getting and setting strings through abstract interfaces.
Definition: string_intf.h:28
tPriority
Priority used for the order of ITriggerPipeItem::Run calls.
The Default implementation of the ISampleStream interface.
virtual ~cSampleStreamOutPort()=default
DTOR.
cSampleStreamOutPort(cSampleStreamOutPort &&)=delete
deleted move CTOR
ADTF_CLASS_ID_NAME(cSampleStreamOutPort, "default_sample_stream_out_port.streaming.adtf.cid", "Sample Stream Outport")
Implements adtf::ucom::IClassInfo.
cSampleStreamOutPort & operator=(cSampleStreamOutPort &&)=delete
deleted move operator
cSampleStreamOutPort(const char *strName, const char *strPortID)
CTOR initializes the name of the stream.
cSampleStreamOutPort(const cSampleStreamOutPort &)=delete
deleted copy CTOR
cSampleStreamOutPort & operator=(const cSampleStreamOutPort &)=delete
deleted copy operator
Base class for every interface type within the uCOM.
Definition: object_intf.h:31
Interface definition for a container of objects.
Definition: object_list.h:22
Base object pointer to realize binary compatible reference counting in interface methods.
Use this template if you want to implement an ucom::ant::IObject based Interface and/or subclass an e...
Definition: object.h:379
string_base< cStackString > cString
cString implementation for a stack string which works on stack if string is lower than A_UTILS_DEFAUL...
Definition: string.h:2778
Namespace for entire ADTF SDK.
Copyright © Audi Electronics Venture GmbH.
Copyright © Audi Electronics Venture GmbH.
Copyright © Audi Electronics Venture GmbH.