AGX Dynamics 2.42.2.1
Loading...
Searching...
No Matches
agxSensor::ISensorOutput Class Referenceabstract

Common interface for sensor output data. More...

#include <SensorOutput.h>

+ Inheritance diagram for agxSensor::ISensorOutput:

Public Member Functions

 ISensorOutput ()=default
 Default constructor.
 
virtual const BinaryOutputBuffergetData ()=0
 Returns access to the sensor output data.
 
virtual size_t getElementSize () const =0
 "Element size" is the summed data size of the currently added sensor output fields.
 
virtual bool hasUnreadData (bool markAsRead=true)=0
 
template<typename T >
BinaryOutputView< T > view ()
 View over data.
 

Static Public Member Functions

template<typename T >
static bool verifySize (size_t elementSize)
 Checks whether sizeof(T) == elementSize and issues a warning if it is not.
 

Detailed Description

Common interface for sensor output data.

Definition at line 26 of file SensorOutput.h.

Constructor & Destructor Documentation

◆ ISensorOutput()

agxSensor::ISensorOutput::ISensorOutput ( )
default

Default constructor.

Member Function Documentation

◆ getData()

virtual const BinaryOutputBuffer & agxSensor::ISensorOutput::getData ( )
pure virtual

Returns access to the sensor output data.

This call blocks until the sensor data is fully assembled and available.

Returns
sensor output data as a pure binary buffer

Implemented in agxSensor::CameraColorOutput, agxSensor::CameraDepthOutput, agxSensor::EncoderOutput, agxSensor::IMUOutput, agxSensor::OdometerOutput, agxSensor::RtOutput, agxSensor::TriaxialOutput, and agxSensor::ICameraOutput.

◆ getElementSize()

virtual size_t agxSensor::ISensorOutput::getElementSize ( ) const
pure virtual

"Element size" is the summed data size of the currently added sensor output fields.

Returns
the current, summed, data size of the added fields

Implemented in agxSensor::CameraColorOutput, agxSensor::CameraDepthOutput, agxSensor::EncoderOutput, agxSensor::IMUOutput, agxSensor::OdometerOutput, agxSensor::RtOutput, agxSensor::TriaxialOutput, and agxSensor::ICameraOutput.

◆ hasUnreadData()

virtual bool agxSensor::ISensorOutput::hasUnreadData ( bool  markAsRead = true)
pure virtual
Parameters
markAsRead- true to reset unread state, resulting in hasUnreadData returning false until new data is available. False to not mark the current data as read.
Returns
true when the data has been updated but not read/used/fetched by the user, false if the data has been read

Implemented in agxSensor::CameraColorOutput, agxSensor::CameraDepthOutput, agxSensor::EncoderOutput, agxSensor::IMUOutput, agxSensor::OdometerOutput, agxSensor::RtOutput, agxSensor::TriaxialOutput, and agxSensor::ICameraOutput.

◆ verifySize()

template<typename T >
bool agxSensor::ISensorOutput::verifySize ( size_t  elementSize)
static

Checks whether sizeof(T) == elementSize and issues a warning if it is not.

Returns
true if the size matches, otherwise false

Definition at line 81 of file SensorOutput.h.

References LOGGER_ENDL, and LOGGER_WARNING.

◆ view()

template<typename T >
BinaryOutputView< T > agxSensor::ISensorOutput::view

View over data.

The size of type T has to match the element size of the added sensor output fields. If the size doesn't match, an empty view is returned. This call blocks until the sensor data is fully assembled and available.

Returns
view of data as type T

Definition at line 93 of file SensorOutput.h.


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