ADTF  3.18.2
samplestreamer_intf.h
Go to the documentation of this file.
1 
7 #pragma once
8 #include "streamtype_intf.h"
9 #include "samplestream_intf.h"
10 #include "streamitem_intf.h"
11 #include "sample_intf.h"
12 
13 #include <adtfucom3/adtf_ucom3.h>
14 #include <adtfbase/string_intf.h>
15 
16 namespace adtf
17 {
18 namespace streaming
19 {
20 namespace ant
21 {
29  {
30 
31  protected:
33  ~ISampleStreamer() = default;
34 
35  public:
40  virtual tResult EndStreaming() = 0;
47 
48  };
49 
55  {
56 
57  protected:
59  ~ISampleReader() = default;
60 
61  public:
67  virtual tResult BeginStreaming(ISampleStream& pStream) = 0;
68 
69  };
70 
76  {
77 
78  protected:
80  ~ISampleWriter() = default;
81 
82  public:
88  virtual tResult BeginStreaming(ISampleStream& pStream) = 0;
89 
90  };
91 
96  {
97  public:
103  virtual tResult Push(const IStreamItem& oStreamItem, tTimeStamp tmTime) = 0;
104 
108  virtual void Clear() = 0;
109 
115  virtual tResult Pop(IStreamItem& oStreamItem) = 0;
116 
117  };
118 
119 } //namespace ant
120 
121 namespace flash
122 {
123 
124 class IStreamerPin;
125 
130 {
131 
132  protected:
133  virtual ~ISampleStreamer() = default;
134 
135  public:
140  virtual void SetName(const char* strName) = 0;
141 
147  virtual tResult GetName(base::ant::IString&& strName) = 0;
148 
155 
162 
169 
174  virtual tResult EndStreaming() = 0;
175 
182 };
183 
188 {
189  public:
196 
208 
215 
221  virtual tResult SetStreamError(tResult oError) = 0;
222 
228 };
229 
234 {
235  public:
242 
249 
254  virtual tResult Flush() = 0;
255 
262  virtual tResult SetStreamError(tResult oError) = 0;
263 
271 };
272 
273 }
274 
276 using flash::ISampleStreamer;
278 using flash::ISampleReader;
280 using flash::ISampleWriter;
282 using ant::ISampleReaderQueue;
283 
284 } //namespace streaming
285 } //namespace adtf
Copyright © Audi Electronics Venture GmbH.
The IString interface provides methods for getting and setting strings through abstract interfaces.
Definition: string_intf.h:28
Sample Reader interface is to opens a Sample Stream for reading.
~ISampleReader()=default
not destructable
virtual tResult BeginStreaming(ISampleStream &pStream)=0
BeginStreaming will open the given Sample Stream for Reading while a connection is establishing.
Interface to create a sample reader buffer.
virtual tResult Pop(IStreamItem &oStreamItem)=0
Returns the next sample from the queue.
virtual void Clear()=0
clears the local queue of the reader either only EndStreaming or incoming event ISampleInStream::IQue...
virtual tResult Push(const IStreamItem &oStreamItem, tTimeStamp tmTime)=0
Push a new value to the internal sample queue.
Interface of the SampleStream.
Local Sample Streamer Interface.
virtual tResult EndStreaming()=0
Sample Stream disconnected.
virtual tResult GetType(ucom::ant::iobject_ptr< const IStreamType > &pStreamType) const =0
Retrievs the Stream Type of the streamer.
~ISampleStreamer()=default
not destructable
Sample Wiriter interface is to opens a Sample Stream for writing.
virtual tResult BeginStreaming(ISampleStream &pStream)=0
BeginStreaming will open the given Sample Stream for Writing while a connection is establishing.
~ISampleWriter()=default
not destructable
The IStreamItem interface is the base type for all object which are passed through a stream.
Interface for sample reads that read from sample streams via input pins.
virtual tResult GetLastSample(ucom::ant::iobject_ptr< const ant::ISample > &pSample)=0
Reads the latest available sample from the associated sample stream.
virtual tResult GetNextSample(ucom::ant::iobject_ptr< const ant::ISample > &pSample)=0
Reads the next available sample from the associated sample stream.
virtual tResult GetLastType(ucom::ant::iobject_ptr< const IStreamType > &pType)=0
Returns the last stream type that was read from the sample stream.
virtual tResult ReadAllAvailableItems()=0
Reads all available items from the sample stream into internal queues.
virtual tResult SetStreamError(tResult oError)=0
Sets an error on the associated sample stream.
Base interface for sample readers and writers.
virtual tResult GetName(base::ant::IString &&strName)=0
Retrieves the name of the streamer.
virtual tResult GetType(ucom::ant::iobject_ptr< const ant::IStreamType > &pStreamType) const =0
Returns the initial stream type of the streamer.
virtual tResult EndStreaming()=0
End streaming.
virtual void SetName(const char *strName)=0
Sets the name of the streamer.
virtual tResult SetType(const ucom::ant::iobject_ptr< const ant::IStreamType > &pStreamType)=0
Sets the initial stream type of a streamer.
virtual tResult BeginStreaming(ant::ISampleStream &pStream)=0
Begin streaming on the given sample stream.
virtual tResult SetStreamerPin(const ucom::ant::iobject_ptr< flash::IStreamerPin > &pStreamerPin)=0
Sets the pin that the streamer is associated with.
Interface for sample writers that write to sample streams via output pins.
virtual tResult ManualTrigger(base::flash::tNanoSeconds tmActivationTime=base::flash::tNanoSeconds{-1})=0
Calls all connected runners synchronously in this call.
virtual tResult ChangeType(const ucom::ant::iobject_ptr< const ant::IStreamType > &pType)=0
Communicates a type change for all following samples.
virtual tResult Flush()=0
Flushes the writer.
virtual tResult Write(const ucom::ant::iobject_ptr< const ant::ISample > &pSample)=0
Writes a sample to the connected sample stream.
virtual tResult SetStreamError(tResult oError)=0
Reports and handles an error via the sample stream.
Base object pointer to realize binary compatible reference counting in interface methods.
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.