|
ADTF
|
#include <samplestream.h>
Inherits adtf::base::runnable< DEFAULT_ACTIVATION_TYPE, ANT_INTERFACE, flash::IRunnable, CALLABLE >.
Public Member Functions | |
| cSampleStreamBase () | |
| CTOR. | |
| virtual | ~cSampleStreamBase () override |
| DTOR. | |
| tResult | GetStreamError () |
| Getter for the last forwarded stream error. | |
| tResult | Open (const char *strName, adtf::ucom::ant::iobject_ptr< ISampleInStream > &pInStream, const adtf::ucom::ant::iobject_ptr< const IStreamType > &pInitialAcceptedStreamType, ISampleStream::IPushReadEventSink *&pPushEventSink, ISampleStreamAccess::tMode ui32Mode, size_t szQueueSize, adtf::ucom::ant::IObject *pParent) |
| tResult | Open (const char *strName, adtf::ucom::ant::iobject_ptr< ISampleOutStream > &pOutStream, ISampleStreamAccess::tMode ui32Mode, size_t szQueueSize, adtf::ucom::ant::IObject *pParent) |
| tResult | GetType (adtf::ucom::ant::iobject_ptr< const IStreamType > &pStreamType) const |
| tTimeStamp | GetTime () const |
| tResult | SetStreamError (const tResult &oError) |
| tResult | AttachRouting (const adtf::ucom::ant::iobject_ptr< ISampleStream > &pSampleStreamTo) |
| tResult | DetachRouting (const adtf::ucom::ant::iobject_ptr< ISampleStream > &pSampleStreamTo) |
| tResult | SetFullName (const char *strName) |
| tResult | RunTrigger (tTimeStamp tmActivationTime) |
| tResult | GetInternalBindingProxy (ucom::ant::iobject_ptr< ant::IBindingProxy > &pBindingProxy) |
| void | SetSubStreamFilter (const char *strSubStream) |
| uint64_t | GetItemCount () |
| void | BlockSampleStreaming (bool bBlock) |
| bool | IsSampleStreamingBlocked () const |
| ISampleStreamStatistics::tSampleStreamStatistic | GetStatistics () |
| void | EnableSampleSizeStatistics (bool bEnable) |
| void | ResetStatistics () |
| void | LogInputTrigger (tTimeStamp tmTrigger) |
| void | LogOutputTrigger (tTimeStamp tmTrigger) |
Public Member Functions inherited from adtf::base::runnable< DEFAULT_ACTIVATION_TYPE, ANT_INTERFACE, flash::IRunnable, CALLABLE > | |
| runnable ()=delete | |
| CTOR. | |
| runnable (CALLABLE &&fcRunFunc) noexcept | |
| runnable (CALLABLE_WITH_TIMSTAMP &&fcRunFunc) noexcept | |
| runnable (CALLABLE &&fcRunFunc, ant::IRunnable::tActivationType ui32ActivationType) noexcept | |
| ~runnable () override=default | |
| DTOR. | |
| tResult | Run (tTimeStamp tmTimeofActivation, ant::IRunnable::tActivationType ui32ActivationType, const void *pvUserData, size_t nUserDataSize) override |
| tResult | Run (tNanoSeconds tmTimeofActivation, ant::IRunnable::tActivationType ui32ActivationType, const void *pvUserData, size_t nUserDataSize) override |
| ant::IRunnable::tActivationType | GetActivationType () const override |
| runnable ()=delete | |
| CTOR. | |
| runnable (CALLABLE &&fcRunFunc) noexcept | |
| runnable (CALLABLE_WITH_TIMSTAMP &&fcRunFunc) noexcept | |
| runnable (CALLABLE &&fcRunFunc, ant::IRunnable::tActivationType ui32ActivationType) noexcept | |
| ~runnable () override=default | |
| DTOR. | |
| tResult | Run (tTimeStamp tmTimeofActivation, ant::IRunnable::tActivationType ui32ActivationType, const void *pvUserData, size_t nUserDataSize) override |
| tResult | Run (tNanoSeconds tmTimeofActivation, ant::IRunnable::tActivationType ui32ActivationType, const void *pvUserData, size_t nUserDataSize) override |
| ant::IRunnable::tActivationType | GetActivationType () const override |
Public Member Functions inherited from adtf::ucom::catwo::object< Bases > | |
| tResult | GetInterface (const char *i_strIID, void *&o_pInterface) override |
| Query interfaces on an object. | |
| tResult | GetInterface (const char *i_strIID, const void *&o_pInterface) const override |
| Provides const correct interface querying. | |
| void | Destroy () const override |
| Switch from non-virtual destructor to virtual destructor. | |
Public Member Functions inherited from adtf::ucom::ant::IObject | |
| ADTF_IID (IObject, "object.ant.ucom.adtf.iid") | |
Protected Member Functions | |
| cSampleStreamBase (const cSampleStreamBase &)=delete | |
| deleted copy CTOR | |
| cSampleStreamBase (cSampleStreamBase &&)=delete | |
| deleted move CTOR | |
| cSampleStreamBase & | operator= (const cSampleStreamBase &)=delete |
| deleted copy operator | |
| cSampleStreamBase & | operator= (cSampleStreamBase &&)=delete |
| deleted move operator | |
Protected Member Functions inherited from adtf::ucom::ant::IObject | |
| ~IObject ()=default | |
| Protected destructor --> Only the final implementation can be destroyed! | |
Additional Inherited Members | |
Protected Attributes inherited from adtf::base::runnable< DEFAULT_ACTIVATION_TYPE, ANT_INTERFACE, flash::IRunnable, CALLABLE > | |
| std::decay_t< CALLABLE > | m_fcRunFunc |
| given function to call on Run | |
| std::decay_t< CALLABLE > | m_fcRunFunc |
| given function to call on Run | |
The implementation of the ISampleStream base implemenation. For internal use only. Consider sample stream, cSampleStream
| tResult adtf::streaming::ant::detail::cSampleStreamBase::AttachRouting | ( | const adtf::ucom::ant::iobject_ptr< ISampleStream > & | pSampleStreamTo | ) |
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.
| [in] | pSampleStreamTo | SampleStream where to root the writer queue to. |
| void adtf::streaming::ant::detail::cSampleStreamBase::BlockSampleStreaming | ( | bool | bBlock | ) |
Blocks the streaming of samples if bBlocked is set to true.
| [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. |
| tResult adtf::streaming::ant::detail::cSampleStreamBase::DetachRouting | ( | const adtf::ucom::ant::iobject_ptr< ISampleStream > & | pSampleStreamTo | ) |
Detaches a SampleStream where the routing was set by AttachRouting.
| [in] | pSampleStreamTo | SampleStream to detach. |
| ERR_NOT_FOUND | The SampleStream given by pSampleStreamTo is not attached. |
| void adtf::streaming::ant::detail::cSampleStreamBase::EnableSampleSizeStatistics | ( | bool | bEnable | ) |
Enables/disables sample size statistics. Disabling can improve performance.
| [in] | bEnable | Whether to enable the calculation of sample size statistics. |
| tResult adtf::streaming::ant::detail::cSampleStreamBase::GetInternalBindingProxy | ( | ucom::ant::iobject_ptr< ant::IBindingProxy > & | pBindingProxy | ) |
Get the internal Binding Proxy.
| [out] | pBindingProxy | The Binding Proxy, see adtf::streaming::hollow::IInternalBindingProxy. |
| uint64_t adtf::streaming::ant::detail::cSampleStreamBase::GetItemCount | ( | ) |
| ISampleStreamStatistics::tSampleStreamStatistic adtf::streaming::ant::detail::cSampleStreamBase::GetStatistics | ( | ) |
Retrieves the statistical information of the samplestream.
| tResult adtf::streaming::ant::detail::cSampleStreamBase::GetStreamError | ( | ) |
Getter for the last forwarded stream error.
| tTimeStamp adtf::streaming::ant::detail::cSampleStreamBase::GetTime | ( | ) | const |
| tResult adtf::streaming::ant::detail::cSampleStreamBase::GetType | ( | adtf::ucom::ant::iobject_ptr< const IStreamType > & | pStreamType | ) | const |
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.
| [in,out] | pStreamType | object_ptr to set the type reference to. |
| bool adtf::streaming::ant::detail::cSampleStreamBase::IsSampleStreamingBlocked | ( | ) | const |
Indicates wether sample streaming is blocked or not.
| true | is blocked samples and their corresponding triggers are filtered |
| false | is not blocked |
| void adtf::streaming::ant::detail::cSampleStreamBase::LogInputTrigger | ( | tTimeStamp | tmTrigger | ) |
Logs a trigger on the samplestream input.
| [in] | tmTrigger | Timestamp of the trigger. |
| void adtf::streaming::ant::detail::cSampleStreamBase::LogOutputTrigger | ( | tTimeStamp | tmTrigger | ) |
Logs a trigger on the samplstream output.
| [in] | tmTrigger | Timestamp of the trigger. |
| tResult adtf::streaming::ant::detail::cSampleStreamBase::Open | ( | const char * | strName, |
| adtf::ucom::ant::iobject_ptr< ISampleInStream > & | pInStream, | ||
| const adtf::ucom::ant::iobject_ptr< const IStreamType > & | pInitialAcceptedStreamType, | ||
| ISampleStream::IPushReadEventSink *& | pPushEventSink, | ||
| ISampleStreamAccess::tMode | ui32Mode, | ||
| size_t | szQueueSize, | ||
| adtf::ucom::ant::IObject * | pParent ) |
Opens The SampleStream for reading access. To receive data you need to read from given pReader. See also ISampleStreamReader::Read. The pInStream will automatically closes until it is destroyed by its reference counting. Usually you should only keep your private Reader instance to make sure the Reader will safely close !
| [in] | strName | Name of the reader (is not yet relevant in default implementation cSampleStream but may be in future). |
| [in,out] | pInStream | object_ptr where to put the in stream reference to (Recommended: keep it private). |
| [in] | pInitialAcceptedStreamType | The StreamType you want to receive, but this might not be the streamtype you will get from the writers! |
| [in] | pPushEventSink | Reference to a PushRead EventSink. This parameter neead to be valid only if you open in ISampleStreamAccess::tMode::PushRead. Make sure this instance exists until the the Reader closes. (so again ... Recommended: keep your Reader private) |
| [in] | ui32Mode | Mode to open. see ISampleStreamAccess::tMode. |
| [in] | szQueueSize | QueueSize of the Reader. In PushRead this should be 0 because a Reader will not have a real internal queue. |
| [in] | pParent | concreate sample_stream implementation |
| tResult adtf::streaming::ant::detail::cSampleStreamBase::Open | ( | const char * | strName, |
| adtf::ucom::ant::iobject_ptr< ISampleOutStream > & | pOutStream, | ||
| ISampleStreamAccess::tMode | ui32Mode, | ||
| size_t | szQueueSize, | ||
| adtf::ucom::ant::IObject * | pParent ) |
Opens The SampleStream for writing access. To write data you need to write to the given pWriter. See also ISampleOutStream::Write. The pOutStream will automatically closes until it is destroyed by its reference counting. Usually you should only keep your private Writer instance to make sure the Writer will safely close !
| [in] | strName | Name of the reader (is not yet relevant in default implementation cSampleStream but may be in future). |
| [in,out] | pOutStream | object_ptr where to put the out stream reference to (Recommended: keep it private). |
| [in] | ui32Mode | Mode to open. see ISampleStreamAccess::tMode. |
| [in] | szQueueSize | QueueSize of the Writer. In PushRead this should be 0 because a Writer will have an unlimited Queue. If you set a queue size > 0 all QueueContent will be dropped if you do not flush before the maximum queue size is reached. Keep in mind Sample/StreamType/Error are part of the Queue! |
| [in] | pParent | concreate sample_stream implementation |
| void adtf::streaming::ant::detail::cSampleStreamBase::ResetStatistics | ( | ) |
Resets statistical information.
| tResult adtf::streaming::ant::detail::cSampleStreamBase::RunTrigger | ( | tTimeStamp | tmActivationTime | ) |
Internal Run implementation
| tmActivationTime | [in] TimeSTamp of a activation |
| ERR_NOERROR | Succesfully run. |
| tResult adtf::streaming::ant::detail::cSampleStreamBase::SetFullName | ( | const char * | strName | ) |
Set the name which is used for error handling etc.
| [in] | strName | The name. |
Sets and forwards a StreamError to the readers. Depending on the implementation and error type this may stop the streaming!
| [in] | oError | Error to set |
| void adtf::streaming::ant::detail::cSampleStreamBase::SetSubStreamFilter | ( | const char * | strSubStream | ) |
If set, only Stream Types and Samples of the given Substream mwill be forwarded.
| [in] | strSubStream | The name of the Substream. |