ADTF  3.18.2
cOutputRecorder

Test Helper class that records triggers, types and samples created by a graph object. More...

Classes

class  cOutput
 Helper class that stores the output of a specific instant. More...
 

Public Member Functions

 cOutputRecorder (const ucom::ant::iobject_ptr< ucom::ant::IObject > &pObject, const char *strPinName)
 Connects to the given output pin of a graph object. More...
 
 cOutputRecorder (cOutputRecorder &&oOther)
 Move constructor. More...
 
 ~cOutputRecorder ()
 Destructor.
 
cOutputRecorderoperator= (cOutputRecorder &&oOther)
 Move assignment operator. More...
 
bool WaitForTrigger (adtf::base::flash::tNanoSeconds tmTimeout=base::flash::tNanoSeconds{-1})
 This blocks the calling context until either a trigger occured or the given timeout expired. More...
 
cOutput GetCurrentOutput (bool bClear=true)
 Returns the current output data. More...
 
ucom::ant::object_ptr< const streaming::ant::IStreamTypeGetCurrentType () const
 Returns the current stream type.
 
void RequestSamples (const char *strSubStreamName, const std::unordered_map< std::string, std::string > &oProperties={})
 Try to request samples of a given Substream. More...
 
tResult UnrequestSamples (const char *strSubStreamName)
 Try to unrequest samples of a given Substream. More...
 
 cOutputRecorder (const cOutputRecorder &)=delete
 
cOutputRecorderoperator= (const cOutputRecorder &)=delete
 

Private Attributes

std::unique_ptr< cImplementation > m_pImplementation
 

Detailed Description

Test Helper class that records triggers, types and samples created by a graph object.

Definition at line 33 of file output_recorder.h.

Constructor & Destructor Documentation

◆ cOutputRecorder() [1/2]

cOutputRecorder ( const ucom::ant::iobject_ptr< ucom::ant::IObject > &  pObject,
const char *  strPinName 
)

Connects to the given output pin of a graph object.

Parameters
[in]pObjectThe graph object.
[in]strPinNameThe name of the output Pin.

◆ cOutputRecorder() [2/2]

Move constructor.

Parameters
[in]oOtherThe instance that should be moved.

Member Function Documentation

◆ GetCurrentOutput()

cOutput GetCurrentOutput ( bool  bClear = true)

Returns the current output data.

Parameters
[in]bClearIf true, the internal output storage will be cleared.
Returns
The output.

◆ operator=()

cOutputRecorder& operator= ( cOutputRecorder &&  oOther)

Move assignment operator.

Parameters
[in]oOtherThe instance that should be moved.
Returns
Reference to this.

◆ RequestSamples()

void RequestSamples ( const char *  strSubStreamName,
const std::unordered_map< std::string, std::string > &  oProperties = {} 
)

Try to request samples of a given Substream.

Parameters
[in]strSubStreamNameThe name of the Substream.
[in]oPropertiesA set of request Properties (name/value pairs).

◆ UnrequestSamples()

tResult UnrequestSamples ( const char *  strSubStreamName)

Try to unrequest samples of a given Substream.

Parameters
[in]strSubStreamNameThe name of the Substream.
Returns
ERR_NOT_FOUND if you are not registered to the substream

◆ WaitForTrigger()

bool WaitForTrigger ( adtf::base::flash::tNanoSeconds  tmTimeout = base::flash::tNanoSeconds{-1})

This blocks the calling context until either a trigger occured or the given timeout expired.

Parameters
[in]tmTimeoutThe timeout, -1 => wait indefinitely.
Returns
True if a trigger occured, false if the timeout expired.