SensorDeviceIdentifier Class Reference

Structure containing information about a sensor device (camera or lidar) managed by the Sensors class. More...

Functions

 SensorDeviceIdentifier (std::string sensor_name="", SENSORS_TYPE type=SENSORS_TYPE::CAMERA)
 Default constructor. More...
 
SensorID getID () const
 Returns the unique ID of the sensor. More...
 
uint64_t getSerialNumber () const
 Returns the serial number of the sensor. More...
 
bool operator< (const SensorDeviceIdentifier &other) const
 Comparison operator. More...
 
bool operator== (const SensorDeviceIdentifier &other) const
 Equality operator. More...
 

Attributes

std::string sensor_name
 Custom name of the camera. More...
 
SENSORS_TYPE type
 Type of the sensor. More...
 

Detailed Description

Structure containing information about a sensor device (camera or lidar) managed by the Sensors class.

This underlying SensorID value is set into the SensorDeviceIdentifier by calling the Sensors::add function.
The sensor_name can be configured to add a custom label to the device.

Constructor and Destructor

◆ SensorDeviceIdentifier()

SensorDeviceIdentifier ( std::string  sensor_name = "",
SENSORS_TYPE  type = SENSORS_TYPE::CAMERA 
)

Default constructor.

Parameters
sensor_name: Custom name for the device.
type: Type of the sensor (Camera, Lidar, etc).

Functions

◆ getID()

SensorID getID ( ) const
inline

Returns the unique ID of the sensor.

Returns
The sensor ID.

Referenced by SensorDeviceIdentifier::operator<(), and SensorDeviceIdentifier::operator==().

◆ getSerialNumber()

uint64_t getSerialNumber ( ) const
inline

Returns the serial number of the sensor.

Returns
The serial number.

◆ operator<()

bool operator< ( const SensorDeviceIdentifier other) const
inline

Comparison operator.

◆ operator==()

bool operator== ( const SensorDeviceIdentifier other) const
inline

Equality operator.

Variables

◆ sensor_name

std::string sensor_name

Custom name of the camera.

◆ type

Type of the sensor.

Referenced by SensorDeviceIdentifier::operator==().