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

Detailed Description

Definition at line 234 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 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 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 310 of file Node.hpp.

◆ DataEventWriteCallback

Definition at line 319 of file Node.hpp.

Member Enumeration Documentation

◆ DataEventType

Enumerator
PRODUCE 
DROP 
NONE 

Definition at line 279 of file Node.hpp.

Member Function Documentation

◆ 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::SimpleSensorNode, and dw::framework::ExceptionSafeSensorNode.

Referenced by dw::framework::ExceptionSafeSensorNode::isVirtual().

◆ 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.

Referenced by dw::framework::ExceptionSafeSensorNode::setAffinityMask().

◆ 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, and dw::framework::SimpleSensorNode.

Referenced by dw::framework::ExceptionSafeSensorNode::setDataEventReadCallback().

◆ 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, and dw::framework::SimpleSensorNode.

Referenced by dw::framework::ExceptionSafeSensorNode::setDataEventWriteCallback().

◆ 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.

Referenced by dw::framework::ExceptionSafeSensorNode::setEndTime().

◆ 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.

Referenced by dw::framework::ExceptionSafeSensorNode::setStartTime().

◆ 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.

Referenced by dw::framework::ExceptionSafeSensorNode::setThreadPriority().

◆ start()

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

Start the sensor.

Returns
DW_SUCCESS, DW_FAILURE

Implemented in dw::framework::ExceptionSafeSensorNode, and dw::framework::SimpleSensorNode.

Referenced by dw::framework::ExceptionSafeSensorNode::start().

◆ stop()

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

Stop the sensor.

Returns
DW_SUCCESS, DW_FAILURE

Implemented in dw::framework::ExceptionSafeSensorNode, and dw::framework::SimpleSensorNode.

Referenced by dw::framework::ExceptionSafeSensorNode::stop().


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