Compute Graph Framework SDK Reference  5.18
dw::framework::ISensorNode Class Referenceabstract

Detailed Description

Definition at line 313 of file Node.hpp.

Inheritance diagram for dw::framework::ISensorNode:

Classes

struct  DataEvent
 

Public Types

using DataEventReadCallback = dw::core::Function< bool(DataEvent &)>
 
enum class  DataEventType {
  PRODUCE ,
  DROP ,
  NONE
}
 
using DataEventWriteCallback = dw::core::Function< void(DataEvent)>
 

Public Member Functions

virtual dwStatus getNextTimestamp (dwTime_t &nextTimestamp)=0
 Get the next timestamp of the sensor. More...
 
virtual dwStatus isEnabled (bool &isEnabled)=0
 Whether or not the node is enabled. More...
 
virtual dwStatus isVirtual (bool *isVirtualBool)=0
 distinguishes between a live and virtual sensor More...
 
virtual dwStatus setAffinityMask (uint)=0
 Sets the affinity mask of the sensor. More...
 
virtual dwStatus setDataEventReadCallback (DataEventReadCallback cb)=0
 Set read timestamp function for dataset replay. Timestamps not in the sequence returned by the callback will be dropped. More...
 
virtual dwStatus setDataEventWriteCallback (DataEventWriteCallback cb)=0
 Set write timestamp function for live case. Each timestamp of data output from the node will be passed to this callback. More...
 
virtual dwStatus setEndTime (dwTime_t)=0
 Set end timestamp for dataset replay. More...
 
virtual dwStatus setLockstepDeterministicMode (bool enable)=0
 Set whether replay is running in lockstep deterministic mode. More...
 
virtual dwStatus setStartTime (dwTime_t)=0
 Set start timestamp for dataset replay. More...
 
virtual dwStatus setThreadPriority (int)=0
 Sets the thread priority of the sensor. More...
 
virtual dwStatus start ()=0
 Start the sensor. More...
 
virtual dwStatus stop ()=0
 Stop the sensor. More...
 

Class Documentation

◆ dw::framework::ISensorNode::DataEvent

struct dw::framework::ISensorNode::DataEvent
Class Members
DataEventType dataEventType

The type of event

dwStatus status

The status of the node-run. invalid if dataEventType is DROP DW_SUCCESS if the node-run produced data. DW_TIME_OUT, DW_NOT_AVAILABLE, etc, sensor had not data for node-run. DW_END_OF_STREAM if sensor reached end of stream.

dwTime_t timestamp

The timestamp of involved data. invalid if dataEventType is NONE.

Member Typedef Documentation

◆ DataEventReadCallback

Definition at line 389 of file Node.hpp.

◆ DataEventWriteCallback

Definition at line 398 of file Node.hpp.

Member Enumeration Documentation

◆ DataEventType

Enumerator
PRODUCE 
DROP 
NONE 

Definition at line 358 of file Node.hpp.

Member Function Documentation

◆ getNextTimestamp()

virtual dwStatus dw::framework::ISensorNode::getNextTimestamp ( dwTime_t &  nextTimestamp)
pure virtual

Get the next timestamp of the sensor.

Parameters
nextTimestampOutput timestamp
Returns
DW_SUCCESS

Implemented in dw::framework::ExceptionSafeSensorNode.

◆ isEnabled()

virtual dwStatus dw::framework::ISensorNode::isEnabled ( bool &  isEnabled)
pure virtual

Whether or not the node is enabled.

Parameters
isEnabledOutput enabled
Returns
DW_SUCCESS

Implemented in dw::framework::ExceptionSafeSensorNode.

◆ isVirtual()

virtual dwStatus dw::framework::ISensorNode::isVirtual ( bool *  isVirtualBool)
pure virtual

distinguishes between a live and virtual sensor

Returns
DW_SUCCESS, DW_FAILURE

Implemented in dw::framework::ExceptionSafeSensorNode.

◆ setAffinityMask()

virtual dwStatus dw::framework::ISensorNode::setAffinityMask ( uint  )
pure virtual

Sets the affinity mask of the sensor.

Returns
DW_SUCCESS, DW_FAILURE

Implemented in dw::framework::ExceptionSafeSensorNode.

◆ setDataEventReadCallback()

virtual dwStatus dw::framework::ISensorNode::setDataEventReadCallback ( DataEventReadCallback  cb)
pure virtual

Set read timestamp function for dataset replay. Timestamps not in the sequence returned by the callback will be dropped.

Returns
DW_SUCCESS, DW_FAILURE

Implemented in dw::framework::ExceptionSafeSensorNode.

◆ setDataEventWriteCallback()

virtual dwStatus dw::framework::ISensorNode::setDataEventWriteCallback ( DataEventWriteCallback  cb)
pure virtual

Set write timestamp function for live case. Each timestamp of data output from the node will be passed to this callback.

Returns
DW_SUCCESS, DW_FAILURE

Implemented in dw::framework::ExceptionSafeSensorNode.

◆ setEndTime()

virtual dwStatus dw::framework::ISensorNode::setEndTime ( dwTime_t  )
pure virtual

Set end timestamp for dataset replay.

Returns
DW_SUCCESS, DW_FAILURE

Implemented in dw::framework::ExceptionSafeSensorNode.

◆ setLockstepDeterministicMode()

virtual dwStatus dw::framework::ISensorNode::setLockstepDeterministicMode ( bool  enable)
pure virtual

Set whether replay is running in lockstep deterministic mode.

Parameters
enableenables replay in lockstep deterministic mode
Returns
DW_SUCCESS

Implemented in dw::framework::ExceptionSafeSensorNode.

◆ setStartTime()

virtual dwStatus dw::framework::ISensorNode::setStartTime ( dwTime_t  )
pure virtual

Set start timestamp for dataset replay.

Returns
DW_SUCCESS, DW_FAILURE

Implemented in dw::framework::ExceptionSafeSensorNode.

◆ setThreadPriority()

virtual dwStatus dw::framework::ISensorNode::setThreadPriority ( int  )
pure virtual

Sets the thread priority of the sensor.

Returns
DW_SUCCESS, DW_FAILURE

Implemented in dw::framework::ExceptionSafeSensorNode.

◆ start()

virtual dwStatus dw::framework::ISensorNode::start ( )
pure virtual

Start the sensor.

Returns
DW_SUCCESS, DW_FAILURE

Implemented in dw::framework::ExceptionSafeSensorNode.

◆ stop()

virtual dwStatus dw::framework::ISensorNode::stop ( )
pure virtual

Stop the sensor.

Returns
DW_SUCCESS, DW_FAILURE

Implemented in dw::framework::ExceptionSafeSensorNode.


The documentation for this class was generated from the following file: