12#include <shared_mutex>
34 if (pSample.
Get() !=
nullptr && pSampleAdd.
Get() !=
nullptr)
45#define ADTF_SAMPLEQUEUE_CLASS_VERSION_01 0x01
74 cSampleQueue(tTimeStamp tmTimeRange,
size_t szMaxSize,
bool bClearOnTimeJumps =
false);
98 typedef std::multimap<adtf::base::tNanoSeconds, adtf::ucom::ant::object_ptr<ISample>>
tSampleQueue;
102 tResult Push(
const iobject_ptr<ISample>& pSample);
103 tResult Pop(iobject_ptr<ISample>& pSample);
105 tResult Top(iobject_ptr<ISample>& pSample);
110 tResult Get(iobject_ptr<ISample>& pSample,
113 uint32_t ui32GetMethod=SQG_GetLast);
118 tResult GetSettings(tTimeStamp& tmTimeRange,
size_t& szSizeRange)
const;
119 tResult SetSettings(
const tTimeStamp tmTimeRange,
const size_t szSizeRange);
120 void GetTimes(tTimeStamp& tmFirst, tTimeStamp& tmLast)
const;
158 tResult GetNearest2(iobject_ptr<ISample>& pSampleOlder, iobject_ptr<ISample>& pSampleNewer, tTimeStamp tmTime);
211 tResult InternalPop(iobject_ptr<ISample>& pSample);
A_UTILS_NS::cResult tResult
For backwards compatibility and to bring latest version into scope.
Definition result.h:736
Definition samplequeue_intf.h:25
bool m_bTimeStampsInitialized
m_tmFirstTime and m_tmLastTime initialized?
Definition samplequeue.h:86
std::multimap< adtf::base::tNanoSeconds, adtf::ucom::ant::object_ptr< ISample > > tSampleQueue
Sample queue is organized as multi set.
Definition samplequeue.h:98
size_t m_szMaxSize
Maximum size of queue.
Definition samplequeue.h:83
tSampleQueue m_qSamples
The sample queue.
Definition samplequeue.h:99
bool m_bError
Error indicator.
Definition samplequeue.h:84
adtf::base::tNanoSeconds m_tmLastTime
Last timestamp in queue.
Definition samplequeue.h:88
int m_nClearingQueueCount
Clearing queue count.
Definition samplequeue.h:93
std::recursive_mutex m_oEventListLocked
Event list lock - RAII-pattern.
Definition samplequeue.h:90
adtf::ucom::object_ptr< ISample > m_pLastSample
Last sample of the queue.
Definition samplequeue.h:95
tResult FireEvent(uint32_t ui32Event, int nParam1, int nParam2)
bool m_bFireEvents
Fire events?
Definition samplequeue.h:92
tResult SetRanges(tTimeStamp tmTimeRange, size_t szMaxSize=0)
std::list< ISampleQueueEventSink * > m_lstQueueEventReceiver
Event receivers.
Definition samplequeue.h:91
tResult GetNearestNewer(iobject_ptr< ISample > &ppSample, tTimeStamp tmTime, tTimeStamp tmDeltaT)
adtf::base::tNanoSeconds m_tmFirstTime
First timestamp in queue.
Definition samplequeue.h:87
adtf::base::tNanoSeconds m_tmTimeRange
Time range of the samples in the queue.
Definition samplequeue.h:82
cSampleQueue(tTimeStamp tmTimeRange, size_t szMaxSize, bool bClearOnTimeJumps=false)
tResult GetNearestOlder(iobject_ptr< ISample > &pSample, tTimeStamp tmTime, tTimeStamp tmDeltaT)
std::shared_mutex m_oQueueReadWriteLock
Queue lock.
Definition samplequeue.h:96
tResult GetNearest(iobject_ptr< ISample > &pSample, tTimeStamp tmTime, tTimeStamp tmDeltaT)
tResult GetNearest2(iobject_ptr< ISample > &pSampleOlder, iobject_ptr< ISample > &pSampleNewer, tTimeStamp tmTime)
Definition event_source_intf.h:72
virtual T * Get() const =0
Get raw pointer to shared object.
Definition object_ptr.h:384
Namespace for all functionality of the ADTF Streaming SDK provided since v3.0.
Definition bindingproxyoutport.h:16
Namespace for the ADTF Streaming SDK.
Definition bindingproxyinport.h:14
base::flash::tNanoSeconds get_sample_time(const ucom::ant::iobject_ptr< const ant::ISample > &pSample)
ant::iobject_ptr< T > iobject_ptr
Alias always bringing the latest version of ant::iobject_ptr into scope.
Definition object_ptr_intf.h:437
Namespace for all functionality provided by ADTF and its SDKs.
Definition adtf_client_connector.h:14
A timestamp with nanosecond precision.
Definition chrono.h:23
Definition samplequeue.h:25
bool operator()(const adtf::ucom::iobject_ptr< ISample > &pSampleAdd, const adtf::ucom::iobject_ptr< ISample > &pSample) const
Definition samplequeue.h:32