| OrbbecSDK 1.10.18 OrbbecSDK: Software-Development-Kit for Orbbec 3D Cameras

Loading...
Searching...
No Matches
Public Member Functions | List of all members
ob::SensorList Class Reference

`#include <Sensor.hpp>`

## Public Member Functions
| SensorList (std::unique_ptr< SensorListImpl > impl)
virtual | ~SensorList () noexcept
uint32_t | count ()
| Get the number of sensors.
OBSensorType | type (uint32_t index)
| Get the type of the specified sensor.
std::shared_ptr< Sensor > | getSensor (uint32_t index)
| Get a sensor by index number.
std::shared_ptr< Sensor > | getSensor (OBSensorType sensorType)
| Get a sensor by sensor type.

## Detailed Description

Definition at line 80 of file Sensor.hpp.

## Constructor & Destructor Documentation

## ◆ SensorList()

ob::SensorList::SensorList | ( | std::unique_ptr< SensorListImpl > | impl | ) |

## ◆ ~SensorList()

virtual ob::SensorList::~SensorList | ( |  | ) |
| virtual noexcept

## Member Function Documentation

## ◆ count()

uint32_t ob::SensorList::count | ( |  | ) |

Get the number of sensors.

Returns
  uint32_t The number of sensors.

## ◆ type()

OBSensorType ob::SensorList::type | ( | uint32_t | index | ) |

Get the type of the specified sensor.

Parameters

  index | The sensor index.

Returns
  OBSensorType The sensor type.

## ◆ getSensor() [1/2]

std::shared_ptr< Sensor > ob::SensorList::getSensor | ( | uint32_t | index | ) |

Get a sensor by index number.

Parameters

  index | The sensor index. The range is [0, count-1]. If the index exceeds the range, an exception will be thrown.

Returns
  std::shared_ptr<Sensor> The sensor object.

## ◆ getSensor() [2/2]

std::shared_ptr< Sensor > ob::SensorList::getSensor | ( | OBSensorType | sensorType | ) |

Get a sensor by sensor type.

Parameters

  sensorType | The sensor type to obtain.

Returns
  std::shared_ptr<Sensor> A sensor object. If the specified sensor type does not exist, it will return empty.

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

- E:/Projects/Jenkins/workspace/OrbbecSDK/libobsensor/include/libobsensor/hpp/Sensor.hpp