| OrbbecSDK 1.5.7 OrbbecSDK: Software-Development-Kit for Orbbec 3D-Sensor devices

- Main Page
- Namespaces
- Classes
- Files

- File List
- File Members

Functions
Sensor.h File Reference

Sensor related types, used to obtain stream configuration, open and close streams, set and get sensor properties. More...

`#include "ObTypes.h"`

Go to the source code of this file.

## Functions
ob_sensor_type | ob_sensor_get_type (ob_sensor *sensor, ob_error **error)
| Get sensor type. More...
ob_stream_profile_list * | ob_sensor_get_stream_profile_list (ob_sensor *sensor, ob_error **error)
| Get all supported stream profiles. More...
void | ob_sensor_start (ob_sensor *sensor, ob_stream_profile *profile, ob_frame_callback callback, void *user_data, ob_error **error)
| Open the current sensor, and set the callback data frame. More...
void | ob_sensor_stop (ob_sensor *sensor, ob_error **error)
| Stop sensor stream. More...
void | ob_sensor_switch_profile (ob_sensor *sensor, ob_stream_profile *profile, ob_error **error)
| Dynamically switch resolutions. More...
void | ob_delete_sensor_list (ob_sensor_list *sensor_list, ob_error **error)
| Delete sensor object list. More...
uint32_t | ob_sensor_list_get_sensor_count (ob_sensor_list *sensor_list, ob_error **error)
| Get the number of sensors in the sensor list. More...
ob_sensor_type | ob_sensor_list_get_sensor_type (ob_sensor_list *sensor_list, uint32_t index, ob_error **error)
| Get the sensor types. More...
ob_sensor * | ob_sensor_list_get_sensor_by_type (ob_sensor_list *sensor_list, ob_sensor_type sensorType, ob_error **error)
| Get sensor by sensor type. More...
ob_sensor * | ob_sensor_list_get_sensor (ob_sensor_list *sensor_list, uint32_t index, ob_error **error)
| Get Sensor by index number. More...
void | ob_delete_sensor (ob_sensor *sensor, ob_error **error)
| Delete sensor object. More...

## Detailed Description

Sensor related types, used to obtain stream configuration, open and close streams, set and get sensor properties.

Definition in file Sensor.h.

## Function Documentation

ob_sensor_type ob_sensor_get_type | ( | ob_sensor * | sensor,
|  | ob_error ** | error
| ) |  |

Get sensor type.

Parameters

  [in] | sensor | Sensor object
  [out] | error | Log error messages

Returns
  ob_sensor_type returns the sensor type

ob_stream_profile_list* ob_sensor_get_stream_profile_list | ( | ob_sensor * | sensor,
|  | ob_error ** | error
| ) |  |

Get all supported stream profiles.

Parameters

  [in] | sensor | Sensor object
  [out] | error | Log error messages

Returns
  ob_stream_profile_list* returns a list of stream profiles

void ob_sensor_start | ( | ob_sensor * | sensor,
|  | ob_stream_profile * | profile,
|  | ob_frame_callback | callback,
|  | void * | user_data,
|  | ob_error ** | error
| ) |  |

Open the current sensor, and set the callback data frame.

Parameters

  [in] | sensor | Sensor object
  [in] | profile | Stream configuration information
  [in] | callback | Callback function triggered when frame data arrives
  [in] | user_data | pass in any user data and get it from the callback
  [out] | error | Log error messages

void ob_sensor_stop | ( | ob_sensor * | sensor,
|  | ob_error ** | error
| ) |  |

Stop sensor stream.

Parameters

  [in] | sensor | sensor object
  [out] | error | Log error messages

void ob_sensor_switch_profile | ( | ob_sensor * | sensor,
|  | ob_stream_profile * | profile,
|  | ob_error ** | error
| ) |  |

Dynamically switch resolutions.

Parameters

  [in] | sensor | Sensor object
  [in] | profile | Stream configuration information
  [out] | error | Log error messages

void ob_delete_sensor_list | ( | ob_sensor_list * | sensor_list,
|  | ob_error ** | error
| ) |  |

Delete sensor object list.

Parameters

  [in] | sensor_list | List of sensor objects to delete
  [out] | error | Log error messages

uint32_t ob_sensor_list_get_sensor_count | ( | ob_sensor_list * | sensor_list,
|  | ob_error ** | error
| ) |  |

Get the number of sensors in the sensor list.

Parameters

  [in] | sensor_list | List of sensor objects to delete
  [in] | count | Number of sensors
  [out] | error | Log error messages

ob_sensor_type ob_sensor_list_get_sensor_type | ( | ob_sensor_list * | sensor_list,
|  | uint32_t | index,
|  | ob_error ** | error
| ) |  |

Get the sensor types.

Parameters

  index | Sensor index

Returns
  OBSensorType returns the Sensor type

ob_sensor* ob_sensor_list_get_sensor_by_type | ( | ob_sensor_list * | sensor_list,
|  | ob_sensor_type | sensorType,
|  | ob_error ** | error
| ) |  |

Get sensor by sensor type.

/**

Parameters

  sensor_list | Get the returned sensor list through device
  sensorType | Sensor type to be obtained

Returns
  Return the Sensor pointer, if the specified type of Sensor does not exist, it will return null

ob_sensor* ob_sensor_list_get_sensor | ( | ob_sensor_list * | sensor_list,
|  | uint32_t | index,
|  | ob_error ** | error
| ) |  |

Get Sensor by index number.

Parameters

  sensor_list | Get the returned sensor list through device
  index | To create a device cable, the range is [0, count-1], if the index exceeds the range, an exception will be thrown

Returns
  std::shared_ptr<Sensor> returns the Sensor object

void ob_delete_sensor | ( | ob_sensor * | sensor,
|  | ob_error ** | error
| ) |  |

Delete sensor object.

Parameters

  [in] | sensor | The sensor object to delete
  [out] | error | Log error messages