#include <samplestream.h>
Inherits adtf::ucom::ant::enable_object_ptr_from_this< ISampleStream >, and adtf::streaming::hollow::IStreamTypeHandler.
Inherited by adtf::streaming::sample_stream<>, adtf::streaming::sample_stream< IStreamingPort, IStreamingInPort, ISampleStreamInPort >, adtf::streaming::sample_stream< IStreamingPort, IStreamingOutPort, ISampleStreamOutPort >, and adtf::streaming::sample_stream< INTERFACES >.
The implementation of a sample stream, shared by adtf::streaming::cSampleStream and the sample stream ports. It is not a ucom object itself, so that every adtf::streaming::sample_stream can bring its own set of interfaces while they all fold into each other.
A stream that is attached to another one hands its sinks over to it, so that the writer of the first stream of a chain pushes directly to the readers of the last one and a single trigger runs the sub items of the whole chain in the order the nested trigger pipe items would have run them.
◆ cSampleStreamBase()
| adtf::streaming::detail::cSampleStreamBase::cSampleStreamBase |
( |
cTriggerPipeItemBase & | oPipeItem, |
|
|
ISampleStream & | oSelf ) |
|
noexcept |
- Parameters
-
| [in] | oPipeItem | The trigger pipe item of the sample stream, which runs the sinks. |
| [in] | oSelf | The sample stream itself, used for its name and as the trigger pipe source. |
◆ AttachRouting()
Attaches a SampleStream where to route the Write / Flush and Run calls to.
This will automatically opens one writer of pSampleStreamTo and forwards the writers queue.
- Parameters
-
| [in] | pSampleStreamTo | SampleStream where to root the writer queue to. |
- Returns
- Standard Result Code.
◆ BlockSampleStreaming()
| void adtf::streaming::detail::cSampleStreamBase::BlockSampleStreaming |
( |
bool | bBlock | ) |
|
|
noexcept |
Blocks the streaming of samples if bBlock is set to true.
- Parameters
-
| [in] | bBlock | false: Samples and corresponding triggers will be forwarded. true: Samples and corresponding triggers will not be forwarded and dropped, only stream types and their triggers are forwarded. |
◆ DetachRouting()
Detaches a SampleStream where the routing was set by AttachRouting.
- Parameters
-
| [in] | pSampleStreamTo | SampleStream to detach. |
- Returns
- Standard Result Code.
- Return values
-
| ERR_NOT_FOUND | The SampleStream given by pSampleStreamTo is not attached. |
◆ EnableSampleSizeStatistics()
| void adtf::streaming::detail::cSampleStreamBase::EnableSampleSizeStatistics |
( |
bool | bEnable | ) |
|
|
noexcept |
Enables/disables the tracking of sample size statistics. For better performance this can be turned off.
- Parameters
-
| [in] | bEnable | Whether to enable sample size statistics. |
◆ GetInternalBindingProxy()
Retrieve the internal binding proxy.
- Parameters
-
| [out] | pBindingProxy | This will be updated to point to the proxy. |
- Returns
- Standard result.
◆ GetStatistics()
Calculates and retrieves the statistical information.
- Returns
- Statistic information object.
◆ GetType()
Retrieves the current type of the stream. This is only a information interface. The current type of the stream is always part of the Queues of ISampleStreamReader or ISampleStreamWriter. It will only return the last written IStreamType.
- Parameters
-
| [in,out] | pStreamType | object_ptr to set the type reference to. |
- Returns
- Standard Result Code
◆ IsSampleStreamingBlocked()
| bool adtf::streaming::detail::cSampleStreamBase::IsSampleStreamingBlocked |
( |
| ) |
const |
|
noexcept |
Indicates wether sample streaming is blocked or not.
- Return values
-
| true | sample stream is blocking samples and their corresponding triggers. |
| false | sample stream is not blocked. |
◆ Open() [1/2]
Opens the sample stream for reading access, see ant::ISampleStream.
- Parameters
-
| [in,out] | pInStream | object_ptr where to put the in stream reference to. |
| [in] | pPushEventSink | Reference to a PushRead EventSink. Both supported modes require it, and it has to exist until the reader closes. |
| [in] | ui32Mode | Mode to open, see ISampleStreamAccess::tMode. This implementation only supports ISampleStreamAccess::tMode::Push and ISampleStreamAccess::tMode::PushRead. |
| [in] | szQueueSize | QueueSize of the reader. This implementation only supports 0, its readers have no internal queue. |
- Returns
- Standard Result Code, ERR_NOT_SUPPORTED for any other mode or queue size and ERR_INVALID_ARG without an event sink.
◆ Open() [2/2]
Opens the sample stream for writing access, see ant::ISampleStream.
- Parameters
-
| [in,out] | pOutStream | object_ptr where to put the out stream reference to. |
| [in] | ui32Mode | Mode to open, see ISampleStreamAccess::tMode. This implementation only supports ISampleStreamAccess::tMode::PushRead. |
| [in] | szQueueSize | QueueSize of the out stream. This implementation only supports 0, its writers have no internal queue. |
- Returns
- Standard Result Code, ERR_NOT_SUPPORTED for any other mode or queue size and ERR_DEVICE_IN_USE if the stream already has a writer or is attached to another one.
◆ RegisterSubItem()
Registers the pSubRun as SubItem of the source. The source will forward a Run call to every registered ITriggerPipeItem in order of ui32Prio.
- Parameters
-
| [in] | pSubRun | TriggerPipeItem to register. |
| [in] | ui32Prio | Priority of Run call. |
- Returns
- Standard Result Code.
◆ ResetStatistics()
| void adtf::streaming::detail::cSampleStreamBase::ResetStatistics |
( |
| ) |
|
|
noexcept |
Resets statistical information.
◆ SetForwardAllTriggers()
| void adtf::streaming::detail::cSampleStreamBase::SetForwardAllTriggers |
( |
bool | bForwardAll | ) |
|
|
noexcept |
If set, every trigger is forwarded to the sub items, otherwise only those that brought new items.
◆ SetStreamError()
| tResult adtf::streaming::detail::cSampleStreamBase::SetStreamError |
( |
const tResult & | oError | ) |
|
|
noexcept |
Sets and forwards a StreamError to the readers. Depending on the implementation and error type this may stop the streaming!
- Parameters
-
- Returns
- Standard Result Code.
◆ SetSubStreamFilter()
| void adtf::streaming::detail::cSampleStreamBase::SetSubStreamFilter |
( |
const char * | strSubStream | ) |
|
|
noexcept |
Selects the substream everything below this stream gets to see, an empty name lets all of them pass. If set, every trigger is forwarded to the sub items, otherwise only those that brought new items.
◆ UnregisterSubItem()
Unregisters the pSubRun from the source.
- Parameters
-
| [in] | pSubRun | TriggerPipeItem to unregister. |
- Returns
- Standard Result Code.
The documentation for this class was generated from the following file: