Definition at line 75 of file dwSensorDrainerTemplate.hpp.
Public Types | |
using | OnDataDropped = dw::core::Function< void(dwTime_t const)> |
Public Member Functions | |
virtual dwStatus | drainProcessedData (ProcessedDataType *processedOutput, dwTime_t ×tampOutput, dwTime_t &nextTimestampOutput, dwTime_t virtualSyncTime) |
dwBaseDrainerTemplate (dwSensorDrainerParams params, std::unique_ptr< ReadProcessedDataFunc > readProcessedDataFunc, DataSourceType dataSource) | |
virtual dwStatus | getNextData (ProcessedDataType *outFrame, dwTime_t timeout) |
virtual dwStatus | getNextTimestamp (dwTime_t ×tamp, dwTime_t timeout) |
virtual dwTime_t | getReadTimeout () const |
virtual void | isLockstepDataAvailable (dwStatus &status, dwTime_t &readTimeout) |
virtual bool | isVirtualDataReady (dwTime_t dataTime, dwTime_t timeout) |
void | populateNextTimestamp (dwTime_t &nextTimestampOutput) |
dwStatus | readNextWithFrameMask (dwTime_t timeout) |
virtual dwStatus | readProcessedData (ProcessedDataType *outFrame, dwTime_t &latestTimestamp, dwTime_t timeout, bool isDroppingData=false)=0 |
virtual dwStatus | reset () |
virtual void | setLockstepDeterministicMode (bool enable) |
void | setOnDataDropped (OnDataDropped onDataDropped) |
virtual void | setVirtualSyncTime (dwTime_t virtualSyncTime) |
virtual dwStatus | tryRead (ProcessedDataType *outFrame, dwTime_t &latestTimestamp, dwTime_t timeout, bool isDroppingData=false) |
Static Public Attributes | |
static constexpr int32_t | DRAIN_SENSOR_DATA_COUNT_MAX = 50 |
static constexpr char | LOG_TAG [] = "dwBaseDrainerTemplate" |
Protected Attributes | |
dwTime_t | m_blockingTimeout = 60000 |
DataSourceType | m_dataSource |
bool | m_dropStaleData = false |
FixedString< 32 > | m_frameReadMask |
bool | m_frameSkipEnabled = false |
uint32_t | m_framesRead = 0 |
bool | m_isLockstep = false |
bool | m_isVirtual = false |
bool | m_lockstepDeterministicMode = false |
Node::Name_t | m_name {} |
bool | m_nextDataReady = false |
dwTime_t | m_nonBlockingTimeout = 100 |
OnDataDropped | m_onDataDropped {} |
bool | m_outputAvailable = false |
std::unique_ptr< ReadProcessedDataFunc > | m_readProcessedDataFunc |
dwTime_t | m_stashedNextTime = -1 |
dwTime_t | m_virtualSyncTime = 0 |
bool | m_waitForNewData = false |
Static Protected Attributes | |
static constexpr dwTime_t | REPLAY_SENSOR_READ_TIMEOUT = 10000000 |
using dw::framework::dwBaseDrainerTemplate< ProcessedDataType, ReadProcessedDataFunc, DataSourceType >::OnDataDropped = dw::core::Function<void(dwTime_t const)> |
Definition at line 82 of file dwSensorDrainerTemplate.hpp.
|
inlineexplicit |
Definition at line 84 of file dwSensorDrainerTemplate.hpp.
References dw::framework::dwBaseDrainerTemplate< ProcessedDataType, ReadProcessedDataFunc, DataSourceType >::m_frameReadMask, and dw::framework::dwBaseDrainerTemplate< ProcessedDataType, ReadProcessedDataFunc, DataSourceType >::m_frameSkipEnabled.
|
inlinevirtual |
Reimplemented in dw::framework::dwVehicleStateDrainer, and dw::framework::dwVehicleStateChannelDrainer.
Definition at line 320 of file dwSensorDrainerTemplate.hpp.
References dw::framework::dwBaseDrainerTemplate< ProcessedDataType, ReadProcessedDataFunc, DataSourceType >::DRAIN_SENSOR_DATA_COUNT_MAX, dw::framework::dwBaseDrainerTemplate< ProcessedDataType, ReadProcessedDataFunc, DataSourceType >::getReadTimeout(), dw::framework::dwBaseDrainerTemplate< ProcessedDataType, ReadProcessedDataFunc, DataSourceType >::isLockstepDataAvailable(), dw::framework::dwBaseDrainerTemplate< ProcessedDataType, ReadProcessedDataFunc, DataSourceType >::m_dropStaleData, dw::framework::dwBaseDrainerTemplate< ProcessedDataType, ReadProcessedDataFunc, DataSourceType >::m_name, dw::framework::dwBaseDrainerTemplate< ProcessedDataType, ReadProcessedDataFunc, DataSourceType >::m_nonBlockingTimeout, dw::framework::dwBaseDrainerTemplate< ProcessedDataType, ReadProcessedDataFunc, DataSourceType >::m_outputAvailable, dw::framework::dwBaseDrainerTemplate< ProcessedDataType, ReadProcessedDataFunc, DataSourceType >::m_virtualSyncTime, dw::framework::dwBaseDrainerTemplate< ProcessedDataType, ReadProcessedDataFunc, DataSourceType >::m_waitForNewData, dw::framework::dwBaseDrainerTemplate< ProcessedDataType, ReadProcessedDataFunc, DataSourceType >::populateNextTimestamp(), and dw::framework::dwBaseDrainerTemplate< ProcessedDataType, ReadProcessedDataFunc, DataSourceType >::readProcessedData().
|
inlinevirtual |
Definition at line 136 of file dwSensorDrainerTemplate.hpp.
References dw::framework::dwBaseDrainerTemplate< ProcessedDataType, ReadProcessedDataFunc, DataSourceType >::m_dataSource, dw::framework::dwBaseDrainerTemplate< ProcessedDataType, ReadProcessedDataFunc, DataSourceType >::m_frameSkipEnabled, dw::framework::dwBaseDrainerTemplate< ProcessedDataType, ReadProcessedDataFunc, DataSourceType >::m_framesRead, dw::framework::dwBaseDrainerTemplate< ProcessedDataType, ReadProcessedDataFunc, DataSourceType >::m_nextDataReady, dw::framework::dwBaseDrainerTemplate< ProcessedDataType, ReadProcessedDataFunc, DataSourceType >::m_readProcessedDataFunc, and dw::framework::dwBaseDrainerTemplate< ProcessedDataType, ReadProcessedDataFunc, DataSourceType >::readNextWithFrameMask().
Referenced by dw::framework::dwBaseDrainerTemplate< ProcessedDataType, ReadProcessedDataFunc, DataSourceType >::tryRead().
|
inlinevirtual |
Reimplemented in dw::framework::dwSensorDrainerTemplate< ProcessedDataType, ReadProcessedDataFunc >, and dw::framework::dwSensorDrainerTemplate< dwVehicleIOState, vio::ReadProcessedData >.
Definition at line 107 of file dwSensorDrainerTemplate.hpp.
References dw::framework::dwBaseDrainerTemplate< ProcessedDataType, ReadProcessedDataFunc, DataSourceType >::m_dataSource, dw::framework::dwBaseDrainerTemplate< ProcessedDataType, ReadProcessedDataFunc, DataSourceType >::m_frameSkipEnabled, dw::framework::dwBaseDrainerTemplate< ProcessedDataType, ReadProcessedDataFunc, DataSourceType >::m_framesRead, dw::framework::dwBaseDrainerTemplate< ProcessedDataType, ReadProcessedDataFunc, DataSourceType >::m_nextDataReady, dw::framework::dwBaseDrainerTemplate< ProcessedDataType, ReadProcessedDataFunc, DataSourceType >::m_readProcessedDataFunc, and dw::framework::dwBaseDrainerTemplate< ProcessedDataType, ReadProcessedDataFunc, DataSourceType >::readNextWithFrameMask().
Referenced by dw::framework::dwBaseDrainerTemplate< ProcessedDataType, ReadProcessedDataFunc, DataSourceType >::populateNextTimestamp(), and dw::framework::dwBaseDrainerTemplate< ProcessedDataType, ReadProcessedDataFunc, DataSourceType >::tryRead().
|
inlinevirtual |
Definition at line 247 of file dwSensorDrainerTemplate.hpp.
References dw::framework::dwBaseDrainerTemplate< ProcessedDataType, ReadProcessedDataFunc, DataSourceType >::m_blockingTimeout, dw::framework::dwBaseDrainerTemplate< ProcessedDataType, ReadProcessedDataFunc, DataSourceType >::m_isLockstep, dw::framework::dwBaseDrainerTemplate< ProcessedDataType, ReadProcessedDataFunc, DataSourceType >::m_nonBlockingTimeout, and dw::framework::dwBaseDrainerTemplate< ProcessedDataType, ReadProcessedDataFunc, DataSourceType >::m_waitForNewData.
Referenced by dw::framework::dwBaseDrainerTemplate< ProcessedDataType, ReadProcessedDataFunc, DataSourceType >::drainProcessedData().
|
inlinevirtual |
Definition at line 369 of file dwSensorDrainerTemplate.hpp.
Referenced by dw::framework::dwBaseDrainerTemplate< ProcessedDataType, ReadProcessedDataFunc, DataSourceType >::drainProcessedData().
|
inlinevirtual |
Definition at line 265 of file dwSensorDrainerTemplate.hpp.
References dw::framework::dwBaseDrainerTemplate< ProcessedDataType, ReadProcessedDataFunc, DataSourceType >::m_blockingTimeout, dw::framework::dwBaseDrainerTemplate< ProcessedDataType, ReadProcessedDataFunc, DataSourceType >::m_lockstepDeterministicMode, and dw::framework::dwBaseDrainerTemplate< ProcessedDataType, ReadProcessedDataFunc, DataSourceType >::m_virtualSyncTime.
Referenced by dw::framework::dwBaseDrainerTemplate< ProcessedDataType, ReadProcessedDataFunc, DataSourceType >::tryRead().
|
inline |
Definition at line 371 of file dwSensorDrainerTemplate.hpp.
References dw::framework::dwBaseDrainerTemplate< ProcessedDataType, ReadProcessedDataFunc, DataSourceType >::getNextTimestamp(), dw::framework::dwBaseDrainerTemplate< ProcessedDataType, ReadProcessedDataFunc, DataSourceType >::m_blockingTimeout, dw::framework::dwBaseDrainerTemplate< ProcessedDataType, ReadProcessedDataFunc, DataSourceType >::m_isVirtual, dw::framework::dwBaseDrainerTemplate< ProcessedDataType, ReadProcessedDataFunc, DataSourceType >::m_lockstepDeterministicMode, and dw::framework::dwBaseDrainerTemplate< ProcessedDataType, ReadProcessedDataFunc, DataSourceType >::m_name.
Referenced by dw::framework::dwBaseDrainerTemplate< ProcessedDataType, ReadProcessedDataFunc, DataSourceType >::drainProcessedData().
|
inline |
Definition at line 166 of file dwSensorDrainerTemplate.hpp.
References dw::framework::dwBaseDrainerTemplate< ProcessedDataType, ReadProcessedDataFunc, DataSourceType >::m_dataSource, dw::framework::dwBaseDrainerTemplate< ProcessedDataType, ReadProcessedDataFunc, DataSourceType >::m_frameReadMask, dw::framework::dwBaseDrainerTemplate< ProcessedDataType, ReadProcessedDataFunc, DataSourceType >::m_framesRead, dw::framework::dwBaseDrainerTemplate< ProcessedDataType, ReadProcessedDataFunc, DataSourceType >::m_nextDataReady, and dw::framework::dwBaseDrainerTemplate< ProcessedDataType, ReadProcessedDataFunc, DataSourceType >::m_readProcessedDataFunc.
Referenced by dw::framework::dwBaseDrainerTemplate< ProcessedDataType, ReadProcessedDataFunc, DataSourceType >::getNextData(), and dw::framework::dwBaseDrainerTemplate< ProcessedDataType, ReadProcessedDataFunc, DataSourceType >::getNextTimestamp().
|
pure virtual |
Implemented in dw::framework::dwChannelDrainerTemplate< dwVehicleIOState, vio::ReadProcessedVehicleStateDataFromChannel >, dw::framework::dwSensorDrainerTemplate< dwVehicleIOState, vio::ReadProcessedData >, dw::framework::dwChannelDrainerTemplate< OutputProcessedDataType, ReadProcessedDataFunc, InputProcessedDataType >, and dw::framework::dwSensorDrainerTemplate< ProcessedDataType, ReadProcessedDataFunc >.
Referenced by dw::framework::dwBaseDrainerTemplate< ProcessedDataType, ReadProcessedDataFunc, DataSourceType >::drainProcessedData().
|
inlinevirtual |
Reimplemented in dw::framework::dwChannelDrainerTemplate< OutputProcessedDataType, ReadProcessedDataFunc, InputProcessedDataType >, dw::framework::dwChannelDrainerTemplate< dwVehicleIOState, vio::ReadProcessedVehicleStateDataFromChannel >, dw::framework::dwSensorDrainerTemplate< ProcessedDataType, ReadProcessedDataFunc >, and dw::framework::dwSensorDrainerTemplate< dwVehicleIOState, vio::ReadProcessedData >.
Definition at line 239 of file dwSensorDrainerTemplate.hpp.
References dw::framework::dwBaseDrainerTemplate< ProcessedDataType, ReadProcessedDataFunc, DataSourceType >::m_nextDataReady, dw::framework::dwBaseDrainerTemplate< ProcessedDataType, ReadProcessedDataFunc, DataSourceType >::m_readProcessedDataFunc, and dw::framework::dwBaseDrainerTemplate< ProcessedDataType, ReadProcessedDataFunc, DataSourceType >::m_virtualSyncTime.
|
inlinevirtual |
Definition at line 257 of file dwSensorDrainerTemplate.hpp.
References dw::framework::enable, and dw::framework::dwBaseDrainerTemplate< ProcessedDataType, ReadProcessedDataFunc, DataSourceType >::m_lockstepDeterministicMode.
|
inline |
Definition at line 102 of file dwSensorDrainerTemplate.hpp.
|
inlinevirtual |
Definition at line 252 of file dwSensorDrainerTemplate.hpp.
|
inlinevirtual |
Definition at line 184 of file dwSensorDrainerTemplate.hpp.
References dw::framework::dwBaseDrainerTemplate< ProcessedDataType, ReadProcessedDataFunc, DataSourceType >::getNextData(), dw::framework::dwBaseDrainerTemplate< ProcessedDataType, ReadProcessedDataFunc, DataSourceType >::getNextTimestamp(), dw::framework::dwBaseDrainerTemplate< ProcessedDataType, ReadProcessedDataFunc, DataSourceType >::isVirtualDataReady(), dw::framework::dwBaseDrainerTemplate< ProcessedDataType, ReadProcessedDataFunc, DataSourceType >::m_isVirtual, dw::framework::dwBaseDrainerTemplate< ProcessedDataType, ReadProcessedDataFunc, DataSourceType >::m_lockstepDeterministicMode, dw::framework::dwBaseDrainerTemplate< ProcessedDataType, ReadProcessedDataFunc, DataSourceType >::m_name, dw::framework::dwBaseDrainerTemplate< ProcessedDataType, ReadProcessedDataFunc, DataSourceType >::m_nextDataReady, dw::framework::dwBaseDrainerTemplate< ProcessedDataType, ReadProcessedDataFunc, DataSourceType >::m_onDataDropped, dw::framework::dwBaseDrainerTemplate< ProcessedDataType, ReadProcessedDataFunc, DataSourceType >::m_outputAvailable, and dw::framework::dwBaseDrainerTemplate< ProcessedDataType, ReadProcessedDataFunc, DataSourceType >::m_stashedNextTime.
Referenced by dw::framework::dwChannelDrainerTemplate< OutputProcessedDataType, ReadProcessedDataFunc, InputProcessedDataType >::readProcessedData().
|
staticconstexpr |
Definition at line 81 of file dwSensorDrainerTemplate.hpp.
Referenced by dw::framework::dwBaseDrainerTemplate< ProcessedDataType, ReadProcessedDataFunc, DataSourceType >::drainProcessedData().
|
staticconstexpr |
Definition at line 78 of file dwSensorDrainerTemplate.hpp.
|
protected |
Definition at line 390 of file dwSensorDrainerTemplate.hpp.
Referenced by dw::framework::dwBaseDrainerTemplate< ProcessedDataType, ReadProcessedDataFunc, DataSourceType >::getReadTimeout(), dw::framework::dwBaseDrainerTemplate< ProcessedDataType, ReadProcessedDataFunc, DataSourceType >::isVirtualDataReady(), and dw::framework::dwBaseDrainerTemplate< ProcessedDataType, ReadProcessedDataFunc, DataSourceType >::populateNextTimestamp().
|
protected |
Definition at line 386 of file dwSensorDrainerTemplate.hpp.
Referenced by dw::framework::dwBaseDrainerTemplate< ProcessedDataType, ReadProcessedDataFunc, DataSourceType >::getNextData(), dw::framework::dwBaseDrainerTemplate< ProcessedDataType, ReadProcessedDataFunc, DataSourceType >::getNextTimestamp(), and dw::framework::dwBaseDrainerTemplate< ProcessedDataType, ReadProcessedDataFunc, DataSourceType >::readNextWithFrameMask().
|
protected |
Definition at line 398 of file dwSensorDrainerTemplate.hpp.
Referenced by dw::framework::dwBaseDrainerTemplate< ProcessedDataType, ReadProcessedDataFunc, DataSourceType >::drainProcessedData().
|
protected |
Definition at line 402 of file dwSensorDrainerTemplate.hpp.
Referenced by dw::framework::dwBaseDrainerTemplate< ProcessedDataType, ReadProcessedDataFunc, DataSourceType >::dwBaseDrainerTemplate(), and dw::framework::dwBaseDrainerTemplate< ProcessedDataType, ReadProcessedDataFunc, DataSourceType >::readNextWithFrameMask().
|
protected |
Definition at line 400 of file dwSensorDrainerTemplate.hpp.
Referenced by dw::framework::dwBaseDrainerTemplate< ProcessedDataType, ReadProcessedDataFunc, DataSourceType >::dwBaseDrainerTemplate(), dw::framework::dwBaseDrainerTemplate< ProcessedDataType, ReadProcessedDataFunc, DataSourceType >::getNextData(), and dw::framework::dwBaseDrainerTemplate< ProcessedDataType, ReadProcessedDataFunc, DataSourceType >::getNextTimestamp().
|
protected |
Definition at line 401 of file dwSensorDrainerTemplate.hpp.
Referenced by dw::framework::dwBaseDrainerTemplate< ProcessedDataType, ReadProcessedDataFunc, DataSourceType >::getNextData(), dw::framework::dwBaseDrainerTemplate< ProcessedDataType, ReadProcessedDataFunc, DataSourceType >::getNextTimestamp(), and dw::framework::dwBaseDrainerTemplate< ProcessedDataType, ReadProcessedDataFunc, DataSourceType >::readNextWithFrameMask().
|
protected |
Definition at line 403 of file dwSensorDrainerTemplate.hpp.
Referenced by dw::framework::dwBaseDrainerTemplate< ProcessedDataType, ReadProcessedDataFunc, DataSourceType >::getReadTimeout().
|
protected |
Definition at line 397 of file dwSensorDrainerTemplate.hpp.
Referenced by dw::framework::dwBaseDrainerTemplate< ProcessedDataType, ReadProcessedDataFunc, DataSourceType >::populateNextTimestamp(), and dw::framework::dwBaseDrainerTemplate< ProcessedDataType, ReadProcessedDataFunc, DataSourceType >::tryRead().
|
protected |
Definition at line 404 of file dwSensorDrainerTemplate.hpp.
Referenced by dw::framework::dwBaseDrainerTemplate< ProcessedDataType, ReadProcessedDataFunc, DataSourceType >::isVirtualDataReady(), dw::framework::dwBaseDrainerTemplate< ProcessedDataType, ReadProcessedDataFunc, DataSourceType >::populateNextTimestamp(), dw::framework::dwBaseDrainerTemplate< ProcessedDataType, ReadProcessedDataFunc, DataSourceType >::setLockstepDeterministicMode(), and dw::framework::dwBaseDrainerTemplate< ProcessedDataType, ReadProcessedDataFunc, DataSourceType >::tryRead().
|
protected |
Definition at line 394 of file dwSensorDrainerTemplate.hpp.
Referenced by dw::framework::dwBaseDrainerTemplate< ProcessedDataType, ReadProcessedDataFunc, DataSourceType >::drainProcessedData(), dw::framework::dwBaseDrainerTemplate< ProcessedDataType, ReadProcessedDataFunc, DataSourceType >::populateNextTimestamp(), and dw::framework::dwBaseDrainerTemplate< ProcessedDataType, ReadProcessedDataFunc, DataSourceType >::tryRead().
|
protected |
Definition at line 396 of file dwSensorDrainerTemplate.hpp.
Referenced by dw::framework::dwBaseDrainerTemplate< ProcessedDataType, ReadProcessedDataFunc, DataSourceType >::getNextData(), dw::framework::dwBaseDrainerTemplate< ProcessedDataType, ReadProcessedDataFunc, DataSourceType >::getNextTimestamp(), dw::framework::dwBaseDrainerTemplate< ProcessedDataType, ReadProcessedDataFunc, DataSourceType >::readNextWithFrameMask(), dw::framework::dwBaseDrainerTemplate< ProcessedDataType, ReadProcessedDataFunc, DataSourceType >::reset(), and dw::framework::dwBaseDrainerTemplate< ProcessedDataType, ReadProcessedDataFunc, DataSourceType >::tryRead().
|
protected |
Definition at line 391 of file dwSensorDrainerTemplate.hpp.
Referenced by dw::framework::dwBaseDrainerTemplate< ProcessedDataType, ReadProcessedDataFunc, DataSourceType >::drainProcessedData(), and dw::framework::dwBaseDrainerTemplate< ProcessedDataType, ReadProcessedDataFunc, DataSourceType >::getReadTimeout().
|
protected |
Definition at line 406 of file dwSensorDrainerTemplate.hpp.
Referenced by dw::framework::dwBaseDrainerTemplate< ProcessedDataType, ReadProcessedDataFunc, DataSourceType >::setOnDataDropped(), and dw::framework::dwBaseDrainerTemplate< ProcessedDataType, ReadProcessedDataFunc, DataSourceType >::tryRead().
|
protected |
Definition at line 395 of file dwSensorDrainerTemplate.hpp.
Referenced by dw::framework::dwBaseDrainerTemplate< ProcessedDataType, ReadProcessedDataFunc, DataSourceType >::drainProcessedData(), and dw::framework::dwBaseDrainerTemplate< ProcessedDataType, ReadProcessedDataFunc, DataSourceType >::tryRead().
|
protected |
Definition at line 388 of file dwSensorDrainerTemplate.hpp.
Referenced by dw::framework::dwBaseDrainerTemplate< ProcessedDataType, ReadProcessedDataFunc, DataSourceType >::getNextData(), dw::framework::dwBaseDrainerTemplate< ProcessedDataType, ReadProcessedDataFunc, DataSourceType >::getNextTimestamp(), dw::framework::dwBaseDrainerTemplate< ProcessedDataType, ReadProcessedDataFunc, DataSourceType >::readNextWithFrameMask(), and dw::framework::dwBaseDrainerTemplate< ProcessedDataType, ReadProcessedDataFunc, DataSourceType >::reset().
|
protected |
Definition at line 393 of file dwSensorDrainerTemplate.hpp.
Referenced by dw::framework::dwBaseDrainerTemplate< ProcessedDataType, ReadProcessedDataFunc, DataSourceType >::tryRead().
|
protected |
Definition at line 392 of file dwSensorDrainerTemplate.hpp.
Referenced by dw::framework::dwBaseDrainerTemplate< ProcessedDataType, ReadProcessedDataFunc, DataSourceType >::drainProcessedData(), dw::framework::dwBaseDrainerTemplate< ProcessedDataType, ReadProcessedDataFunc, DataSourceType >::isVirtualDataReady(), dw::framework::dwBaseDrainerTemplate< ProcessedDataType, ReadProcessedDataFunc, DataSourceType >::reset(), and dw::framework::dwBaseDrainerTemplate< ProcessedDataType, ReadProcessedDataFunc, DataSourceType >::setVirtualSyncTime().
|
protected |
Definition at line 399 of file dwSensorDrainerTemplate.hpp.
Referenced by dw::framework::dwBaseDrainerTemplate< ProcessedDataType, ReadProcessedDataFunc, DataSourceType >::drainProcessedData(), and dw::framework::dwBaseDrainerTemplate< ProcessedDataType, ReadProcessedDataFunc, DataSourceType >::getReadTimeout().
|
staticconstexprprotected |
Definition at line 408 of file dwSensorDrainerTemplate.hpp.