ADTF  3.18.2
ISampleQueueabstract

The ISampleQueue Interface provides methods for manipulating a queue of samples. More...

Inheritance diagram for ISampleQueue:
[legend]

Public Types

enum  tSampleQueueGetMethod : uint32_t {
  SQG_GetLast = 0 , SQG_GetNearest = 1 , SQG_GetNearestNewer = 2 , SQG_GetNearestOlder = 3 ,
  SQG_GetNewest = 4 , SQG_GetOldest = 5 , SQG_GetUser = 128
}
 This Structure defines GetMethodes for the function ISampleQueue::Get. More...
 
template<typename T >
using iobject_ptr = adtf::ucom::ant::iobject_ptr< T >
 used type for iobject_ptr
 
template<typename T >
using iobject_list = adtf::ucom::ant::iobject_list< T >
 used type for iobject_list
 

Public Member Functions

 ADTF_IID (ISampleQueue, "samplequeue.ant.streaming.adtf.iid")
 definiton of interface id
 
virtual tResult Push (const iobject_ptr< ISample > &pSample)=0
 Push a sample onto the queue Implementations may sort the queue by the timestamps of the sample. More...
 
virtual tResult Pop (iobject_ptr< ISample > &pSample)=0
 Remove the first sample from the queue. More...
 
virtual tResult Pop ()=0
 Remove the first sample from the queue. More...
 
virtual tResult Top (iobject_ptr< ISample > &pSample)=0
 Retrieves the first sample from the queue. More...
 
virtual tResult Clear ()=0
 Removes all samples from the queue. More...
 
virtual size_t GetSize ()=0
 Retrieves the size of the queue. More...
 
virtual bool Empty ()=0
 Checks if the queue is empty. More...
 
virtual tResult Get (iobject_ptr< ISample > &pSample, tTimeStamp tmTimeStamp, tTimeStamp tmDeltaT, uint32_t ui32GetMethod)=0
 Get a sample from the queue. More...
 
virtual tResult GetSettings (tTimeStamp &tmTimeRange, size_t &szSizeRange) const =0
 Returns the current time range and size range of the sample. More...
 
virtual tResult SetSettings (const tTimeStamp tmTimeRange, const size_t szSizeRange)=0
 Sets the current time range and size range of the sample. More...
 
virtual void GetTimes (tTimeStamp &tmFirst, tTimeStamp &tmLast) const =0
 Gets the current time of first and last sample in the queue. More...
 
virtual tResult RegisterQueueEventSink (ISampleQueueEventSink *pQueueEventSink)=0
 Registers a new queue event sink. More...
 
virtual tResult UnregisterQueueEventSink (const ISampleQueueEventSink *pQueueEventSink)=0
 Unregisters a queue event sink. More...
 
- Public Member Functions inherited from IObject
 ADTF_IID (IObject, "object.ant.ucom.adtf.iid")
 Marks the IObject to be castable with the ucom_cast() More...
 

Protected Member Functions

 ~ISampleQueue ()=default
 not destructable
 
- Protected Member Functions inherited from IObject
 ~IObject ()=default
 Protected destructor --> Use implemented Destroy() instead of delete!
 

Detailed Description

The ISampleQueue Interface provides methods for manipulating a queue of samples.

Definition at line 61 of file samplequeue_intf.h.

Member Enumeration Documentation

◆ tSampleQueueGetMethod

enum tSampleQueueGetMethod : uint32_t

This Structure defines GetMethodes for the function ISampleQueue::Get.

Enumerator
SQG_GetLast 

gets the very last sample

SQG_GetNearest 

gets the nearest sample refering to the given time

SQG_GetNearestNewer 

gets the nearest sample refering to the given time, but only returns the newer one

SQG_GetNearestOlder 

gets the nearest sample refering to the given time, but only returns the older one

SQG_GetNewest 

gets the newest sample

SQG_GetOldest 

gets the oldest sample in the queue

SQG_GetUser 

Offset for user methods.

Definition at line 81 of file samplequeue_intf.h.

Member Function Documentation

◆ Clear()

virtual tResult Clear ( )
pure virtual

Removes all samples from the queue.

Returns
Standard Result Code

◆ Empty()

virtual bool Empty ( )
pure virtual

Checks if the queue is empty.

Return values
truequeue is empty
falsequeue is not empty

◆ Get()

virtual tResult Get ( iobject_ptr< ISample > &  pSample,
tTimeStamp  tmTimeStamp,
tTimeStamp  tmDeltaT,
uint32_t  ui32GetMethod 
)
pure virtual

Get a sample from the queue.

Parameters
pSample[out] object reference that to return a found sample
tmTimeStamp[in] The timestamp of the search for sample
tmDeltaT[in] The maximum timestamp deviation that the sample is allowed to have from tmTime
ui32GetMethod[in] Special params for how to search the sample
See also
tSampleQueueGetMethod. The parameters tmTime and tmDeltaT are ignored if the parameter ui32GetMethod is set to SQG_GetLast, SQG_GetNewest and SQG_GetOldest
Returns
Standard Result Code

◆ GetSettings()

virtual tResult GetSettings ( tTimeStamp tmTimeRange,
size_t &  szSizeRange 
) const
pure virtual

Returns the current time range and size range of the sample.

Parameters
[out]tmTimeRangetime range of the queue
[out]szSizeRangesize range of the queue to return
Returns
Standard Result code

◆ GetSize()

virtual size_t GetSize ( )
pure virtual

Retrieves the size of the queue.

Returns
The Size

◆ GetTimes()

virtual void GetTimes ( tTimeStamp tmFirst,
tTimeStamp tmLast 
) const
pure virtual

Gets the current time of first and last sample in the queue.

Parameters
[out]tmFirsttimestamp of the first sample in queue
[out]tmLasttimestamp of the last sample in queue
Returns
Standard Result code

◆ Pop() [1/2]

virtual tResult Pop ( )
pure virtual

Remove the first sample from the queue.

Returns
Standard Result Code

◆ Pop() [2/2]

virtual tResult Pop ( iobject_ptr< ISample > &  pSample)
pure virtual

Remove the first sample from the queue.

Parameters
pSample[out] An optional pointer to the removed sample
Returns
Standard Result Code

◆ Push()

virtual tResult Push ( const iobject_ptr< ISample > &  pSample)
pure virtual

Push a sample onto the queue Implementations may sort the queue by the timestamps of the sample.

Parameters
pSample[in] The sample
Returns
Standard Result Code

◆ RegisterQueueEventSink()

virtual tResult RegisterQueueEventSink ( ISampleQueueEventSink pQueueEventSink)
pure virtual

Registers a new queue event sink.

Parameters
pQueueEventSink[in] The new queue event sink
Returns
Standard Result Code

◆ SetSettings()

virtual tResult SetSettings ( const tTimeStamp  tmTimeRange,
const size_t  szSizeRange 
)
pure virtual

Sets the current time range and size range of the sample.

Parameters
[in]tmTimeRangetime range of the queue to set (set to -1 set no range)
[in]szSizeRangesize range of the queue to return (set to -1 set no range)
Remarks
Set at least one of the value to a value > 0. Otherwise it fails.
Returns
Standard Result code

◆ Top()

virtual tResult Top ( iobject_ptr< ISample > &  pSample)
pure virtual

Retrieves the first sample from the queue.

Parameters
pSample[out] A pointer that will be filled to point to the first sample
Returns
Standard Result Code

◆ UnregisterQueueEventSink()

virtual tResult UnregisterQueueEventSink ( const ISampleQueueEventSink pQueueEventSink)
pure virtual

Unregisters a queue event sink.

Parameters
pQueueEventSink[in] The queue event sink to unregister
Returns
Standard Result Code