ADTF
3.18.2
|
Tester helper class to emulate a writing OutPin to InPin connection for sending samples and type to a filters/sample sinks InPin as a stream of samples. More...
Public Member Functions | |
cTestWriterWithSubStreams (const adtf::ucom::ant::iobject_ptr< adtf::ucom::ant::IObject > &pObject, const char *strPinName, const adtf::filter::flash::cStreamTypeHelper &oType=adtf::streaming::stream_meta_type_anonymous()) | |
CTOR. More... | |
void | ChangeType (const filter::flash::cStreamTypeHelper &oType) |
Emulates a stream type change during writing. More... | |
bool | IsSubstreamRequested (uint32_t ui32SubStreamId) const |
Determines if the given ui32SubStreamId was requested. More... | |
std::set< uint32_t > | GetCurrentRequests () const |
Retrieve a copy of the current requested substream ids. More... | |
Public Member Functions inherited from cTestWriter | |
cTestWriter (const ucom::ant::iobject_ptr< ucom::ant::IObject > &pObject, const char *strPinName, const filter::flash::cStreamTypeHelper &oType=streaming::stream_meta_type_anonymous()) | |
Construct a new Test Writer object. More... | |
cTestWriter (const ucom::ant::iobject_ptr< ucom::ant::IObject > &pObject, const char *strPinName, const filter::flash::cStreamTypeHelper &oType, std::function< void(uint32_t, const base::IProperties *)> fnRequest, std::function< void(uint32_t)> fnCancel) | |
Construct a new Test Writer object. More... | |
~cTestWriter () | |
Destroy the c Test Writer object. | |
void | ChangeType (const filter::flash::cStreamTypeHelper &oType) |
Emulates a stream type change during writing. More... | |
template<typename T > | |
void | Write (base::flash::tNanoSeconds tmTimeStamp, const T &xValue, bool bTrigger=false) |
Writes one sample with the sample buffer content of T into the writing stream. More... | |
template<typename T > | |
void | Write (const T &xValue, bool bTrigger=false) |
Writes one sample with the sample buffer content of T into the writing stream. More... | |
template<typename T > | |
void | WriteSubStream (uint32_t nSubStreamId, base::flash::tNanoSeconds tmTimeStamp, const T &xValue, bool bTrigger=false) |
Writes one sample with the sample buffer content of T into the writing stream and mark it as part of the SubStream with ID nSubStreamId . More... | |
template<typename T > | |
void | WriteSubStream (uint32_t nSubStreamId, const T &xValue, bool bTrigger=false) |
Writes one sample with the sample buffer content of T into the writing stream and mark it as part of the SubStream with ID nSubStreamId . More... | |
void | WriteSample (const ucom::ant::iobject_ptr< const streaming::ant::ISample > &pSample) |
Writes the given sample into the writing stream. More... | |
void | ManualTrigger (base::flash::tNanoSeconds tmActivationTime=base::flash::tNanoSeconds{-1}) |
Sends a manual trigger call into the runner pipe of the. More... | |
void | SetRequestCallbacks (std::function< void(uint32_t, const base::IProperties *)> fnRequest, std::function< void(uint32_t)> fnCancel) |
Set the callbacks for the request calls on substreams. More... | |
Private Attributes | |
std::set< uint32_t > | m_setRequestedSubstreams |
std::mutex | m_mxLock |
Additional Inherited Members | |
Protected Member Functions inherited from cTestWriter | |
base::flash::tNanoSeconds | GetCurrentStreamTime () const |
Gets the current stream time (if any clock is present within the _runtime singleton). More... | |
Tester helper class to emulate a writing OutPin to InPin connection for sending samples and type to a filters/sample sinks InPin as a stream of samples.
It is designed for testing the writing streams with substreams as it collects the current request and cancel request calls. Use IsSubstreamRequested or GetCurrentRequests to discover the current requested substream ids.
It will be connected to the filters data and trigger pipe.
Definition at line 208 of file test_writer.h.
cTestWriterWithSubStreams | ( | const adtf::ucom::ant::iobject_ptr< adtf::ucom::ant::IObject > & | pObject, |
const char * | strPinName, | ||
const adtf::filter::flash::cStreamTypeHelper & | oType = adtf::streaming::stream_meta_type_anonymous() |
||
) |
CTOR.
pObject | the filter or sample sink |
strPinName | the pin name of the filter or sample sink to write to |
oType | the initialized stream type for the connection (this emulates the stream type on writing side) |
void ChangeType | ( | const filter::flash::cStreamTypeHelper & | oType | ) |
Emulates a stream type change during writing.
Usually this happens if the content for the samples changes.
oType | the new stream type to write into the stream. |
std::set<uint32_t> GetCurrentRequests | ( | ) | const |
Retrieve a copy of the current requested substream ids.
bool IsSubstreamRequested | ( | uint32_t | ui32SubStreamId | ) | const |
Determines if the given ui32SubStreamId
was requested.
ui32SubStreamId | the substream id to check |