|
ADTF
|
#include <test_writer.h>
Inherited by adtf::filter::testing::penguin::cTestWriterWithSubStreams.
Public Member Functions | |
| 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. | |
| 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. | |
| ~cTestWriter () | |
| Destroy the c Test Writer object. | |
| void | ChangeType (const filter::flash::cStreamTypeHelper &oType) |
| Emulates a stream type change during writing. Usually this happens if the content for the samples changes. | |
| 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. | |
| 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. | |
| 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. | |
| 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. | |
| void | WriteSample (const ucom::ant::iobject_ptr< const streaming::ant::ISample > &pSample) |
| Writes the given sample into the writing stream. | |
| void | ManualTrigger (base::flash::tNanoSeconds tmActivationTime=base::flash::tNanoSeconds{-1}) |
| Sends a manual trigger call into the runner pipe of the. | |
| 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. | |
Protected Member Functions | |
| base::flash::tNanoSeconds | GetCurrentStreamTime () const |
| Gets the current stream time (if any clock is present within the _runtime singleton). | |
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 will be connected to the filters data and trigger pipe.
| adtf::filter::testing::giant::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.
| 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) |
| adtf::filter::testing::giant::cTestWriter::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.
| 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) |
| fnRequest | callback that is invoked while the filter requests a substream |
| fnCancel | callback that is invoked while the filter cancels/resets the request of a substream |
| void adtf::filter::testing::giant::cTestWriter::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. |
|
protected |
Gets the current stream time (if any clock is present within the _runtime singleton).
| void adtf::filter::testing::giant::cTestWriter::ManualTrigger | ( | base::flash::tNanoSeconds | tmActivationTime = base::flash::tNanoSeconds{-1} | ) |
Sends a manual trigger call into the runner pipe of the.
| tmActivationTime | The time for the trigger. (if set to default the current stream time will be used) |
| void adtf::filter::testing::giant::cTestWriter::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.
| fnRequest | callback that is invoked while the filter requests a substream |
| fnCancel | callback that is invoked while the filter cancels/resets the request of a substream |
|
inline |
Writes one sample with the sample buffer content of T into the writing stream.
| T | the type of the sample buffers content |
| tmTimeStamp | the time for the sample |
| xValue | the value to write to the sample buffer |
| bTrigger | indicates wether a manual trigger will be send or not |
|
inline |
Writes one sample with the sample buffer content of T into the writing stream.
| T | the type of the sample buffers content |
| xValue | the value to write to the sample buffer |
| bTrigger | indicates wether a manual trigger will be send or not |
| void adtf::filter::testing::giant::cTestWriter::WriteSample | ( | const ucom::ant::iobject_ptr< const streaming::ant::ISample > & | pSample | ) |
Writes the given sample into the writing stream.
| pSample | the sample to write |
|
inline |
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.
| T | the type of the sample buffers content |
| tmTimeStamp | the time for the sample |
| xValue | the value to write to the sample buffer |
| bTrigger | indicates wether a manual trigger will be send or not |
|
inline |
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.
| T | the type of the sample buffers content |
| xValue | the value to write to the sample buffer |
| bTrigger | indicates wether a manual trigger will be send or not |