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

- Main Page
- Namespaces
- Classes
- Files

- File List
- File Members

Functions
Device.h File Reference

Device-related functions, including operations such as obtaining and creating a device, setting and obtaining device property, and obtaining sensors. More...

`#include "ObTypes.h"`
`#include "Property.h"`

Go to the source code of this file.

## Functions
uint32_t | ob_device_list_device_count (ob_device_list *list, ob_error **error)
| Get the number of devices. More...
const char * | ob_device_list_get_device_name (ob_device_list *list, uint32_t index, ob_error **error)
| Get device name (DEPRECATED) More...
int | ob_device_list_get_device_pid (ob_device_list *list, uint32_t index, ob_error **error)
| Get the pid of the specified device. More...
int | ob_device_list_get_device_vid (ob_device_list *list, uint32_t index, ob_error **error)
| Get the vid of the specified device. More...
const char * | ob_device_list_get_device_uid (ob_device_list *list, uint32_t index, ob_error **error)
| Get the uid of the specified device. More...
const char * | ob_device_list_get_device_serial_number (ob_device_list *list, uint32_t index, ob_error **error)
| Get the serial number of the specified device. More...
ob_device * | ob_device_list_get_device (ob_device_list *list, uint32_t index, ob_error **error)
| Create device. More...
ob_device * | ob_device_list_get_device_by_serial_number (ob_device_list *list, const char *serial_number, ob_error **error)
| Create device. More...
ob_device * | ob_device_list_get_device_by_uid (ob_device_list *list, const char *uid, ob_error **error)
| Create device. More...
void | ob_delete_device (ob_device *device, ob_error **error)
| Delete device. More...
void | ob_delete_device_info (ob_device_info *info, ob_error **error)
| Delete device information. More...
void | ob_delete_device_list (ob_device_list *list, ob_error **error)
| Delete device list. More...
ob_device_info * | ob_device_get_device_info (ob_device *device, ob_error **error)
| Get device information. More...
ob_sensor_list * | ob_device_get_sensor_list (ob_device *device, ob_error **error)
| List all sensors. More...
ob_sensor * | ob_device_get_sensor (ob_device *device, ob_sensor_type type, ob_error **error)
| Get the device's sensors. More...
void | ob_device_set_int_property (ob_device *device, ob_property_id property_id, int32_t property, ob_error **error)
| Set int type of device property. More...
int32_t | ob_device_get_int_property (ob_device *device, ob_property_id property_id, ob_error **error)
| Get int type of device property. More...
void | ob_device_set_float_property (ob_device *device, ob_property_id property_id, float property, ob_error **error)
| Set float type of device property. More...
float | ob_device_get_float_property (ob_device *device, ob_property_id property_id, ob_error **error)
| Get float type of device property. More...
void | ob_device_set_bool_property (ob_device *device, ob_property_id property_id, bool property, ob_error **error)
| Set bool type of device property. More...
bool | ob_device_get_bool_property (ob_device *device, ob_property_id property_id, ob_error **error)
| Get bool type of device property. More...
void | ob_device_set_structured_data (ob_device *device, ob_property_id property_id, const void *data, uint32_t data_size, ob_error **error)
| Set structured type. More...
void | ob_device_get_structured_data (ob_device *device, ob_property_id property_id, void *data, uint32_t *data_size, ob_error **error)
| Get structured type. More...
void | ob_device_set_structured_data_ext (ob_device *device, ob_property_id property_id, ob_data_bundle *data_bundle, ob_set_data_callback cb, void *user_data, ob_error **error)
| Set property struct data. More...
ob_data_bundle * | ob_device_get_structured_data_ext (ob_device *device, ob_property_id property_id, ob_error **error)
| Get property struct data. More...
void | ob_device_set_raw_data (ob_device *device, ob_property_id property_id, void *data, uint32_t data_size, ob_set_data_callback cb, bool async, void *user_data, ob_error **error)
| Set raw data type of device property. More...
void | ob_device_get_raw_data (ob_device *device, ob_property_id property_id, ob_get_data_callback cb, bool async, void *user_data, ob_error **error)
| Get raw data type of device property. More...
ob_protocol_version | ob_device_get_protocol_version (ob_device *device, ob_error **error)
| Get the property protocol version. More...
ob_cmd_version | ob_device_get_cmd_version (ob_device *device, ob_property_id property_id, ob_error **error)
| Get cmdVersion of property. More...
uint32_t | ob_device_get_supported_property_count (ob_device *device, ob_error **error)
| Get supported device properties count. More...
ob_property_item | ob_device_get_supported_property (ob_device *device, uint32_t index, ob_error **error)
| Get supported device properties. More...
bool | ob_device_is_property_supported (ob_device *device, ob_property_id property_id, ob_permission_type permission, ob_error **error)
| Check if device property permission is supported. More...
ob_int_property_range | ob_device_get_int_property_range (ob_device *device, ob_property_id property_id, ob_error **error)
| Get int type of device property range. More...
ob_float_property_range | ob_device_get_float_property_range (ob_device *device, ob_property_id property_id, ob_error **error)
| Get float type of device property range. More...
ob_bool_property_range | ob_device_get_bool_property_range (ob_device *device, ob_property_id property_id, ob_error **error)
| Get the bool type of device property range. More...
void | ob_device_write_ahb (ob_device *device, uint32_t reg, uint32_t mask, uint32_t value, ob_error **error)
| ahb write register More...
void | ob_device_read_ahb (ob_device *device, uint32_t reg, uint32_t mask, uint32_t *value, ob_error **error)
| Read ahb register. More...
void | ob_device_write_i2c (ob_device *device, uint32_t module_id, uint32_t reg, uint32_t mask, uint32_t value, ob_error **error)
| Write i2c register. More...
void | ob_device_read_i2c (ob_device *device, uint32_t module_id, uint32_t reg, uint32_t mask, uint32_t *value, ob_error **error)
| Read i2c register. More...
void | ob_device_write_flash (ob_device *device, uint32_t offset, const void *data, uint32_t data_size, ob_set_data_callback cb, bool async, void *user_data, ob_error **error)
| Set the properties of writing to Flash [Asynchronous Callback]. More...
void | ob_device_read_flash (ob_device *device, uint32_t offset, uint32_t data_size, ob_get_data_callback cb, bool async, void *user_data, ob_error **error)
| Read Flash properties [asynchronous callback]. More...
uint64_t | ob_device_sync_device_time (ob_device *device, ob_error **error)
| Synchronize the device time (time to the device, synchronize the local system time to the device) More...
void | ob_device_upgrade (ob_device *device, const char *path, ob_device_upgrade_callback callback, bool async, void *user_data, ob_error **error)
| Device firmware upgrade. More...
ob_device_state | ob_device_get_device_state (ob_device *device, ob_error **error)
| Get current device status. More...
void | ob_device_state_changed (ob_device *device, ob_device_state_callback callback, void *user_data, ob_error **error)
| Monitor device state change. More...
void | ob_device_send_file_to_destination (ob_device *device, const char *file_path, const char *dst_path, ob_file_send_callback callback, bool async, void *user_data, ob_error **error)
| Send files to the specified path of the device. More...
bool | ob_device_activate_authorization (ob_device *device, const char *auth_code, ob_error **error)
| Verify device authorization code. More...
void | ob_device_write_authorization_code (ob_device *device, const char *auth_code, ob_error **error)
| Write device authorization code. More...
ob_camera_param_list * | ob_device_get_calibration_camera_param_list (ob_device *device, ob_error **error)
| Get the original parameter list of camera calibration saved in the device. The parameters in the list do not correspond to the current open-stream configuration. You need to select the parameters according to the actual situation, and may need to do scaling, mirroring and other processing. Non-professional users are recommended to use the ob_pipeline_get_camera_param() interface. More...
ob_depth_work_mode | ob_device_get_current_depth_work_mode (ob_device *device, ob_error **error)
| Get current depth work mode. More...
ob_status | ob_device_switch_depth_work_mode (ob_device *device, const ob_depth_work_mode *work_mode, ob_error **error)
| Switch depth work mode by ob_depth_work_mode. Prefer invoke ob_device_switch_depth_work_mode_by_name to switch depth mode when known the complete name of depth work mode. More...
ob_status | ob_device_switch_depth_work_mode_by_name (ob_device *device, const char *mode_name, ob_error **error)
| Switch depth work mode by work mode name. More...
ob_depth_work_mode_list * | ob_device_get_depth_work_mode_list (ob_device *device, ob_error **error)
| Request support depth work mode list. More...
void | ob_device_reboot (ob_device *device, ob_error **error)
| Device reboot. More...
ob_device_sync_config | ob_device_get_sync_config (ob_device *device, ob_error **error)
| 获取当前设备同步配置 More...
void | ob_device_set_sync_config (ob_device *device, ob_device_sync_config device_sync_config, ob_error **error)
| 设置设备同步配置 More...
const char * | ob_device_info_name (ob_device_info *info, ob_error **error)
| Get device name. More...
int | ob_device_info_pid (ob_device_info *info, ob_error **error)
| Get device pid. More...
int | ob_device_info_vid (ob_device_info *info, ob_error **error)
| Get device vid. More...
const char * | ob_device_info_uid (ob_device_info *info, ob_error **error)
| Get device uid. More...
const char * | ob_device_info_serial_number (ob_device_info *info, ob_error **error)
| Get device serial number. More...
const char * | ob_device_info_firmware_version (ob_device_info *info, ob_error **error)
| Get the firmware version number. More...
const char * | ob_device_info_usb_type (ob_device_info *info, ob_error **error)
| Get usb connection type (DEPRECATED) More...
const char * | ob_device_info_connection_type (ob_device_info *info, ob_error **error)
| Get device connection type. More...
const char * | ob_device_info_hardware_version (ob_device_info *info, ob_error **error)
| Get hardware version number. More...
const char * | ob_device_info_supported_min_sdk_version (ob_device_info *info, ob_error **error)
| Get the minimum SDK version number supported by the device. More...
const char * | ob_device_info_asicName (ob_device_info *info, ob_error **error)
| Get chip name. More...
ob_device_type | ob_device_info_device_type (ob_device_info *info, ob_error **error)
| Get device type. More...
uint32_t | ob_camera_param_list_count (ob_camera_param_list *param_list, ob_error **error)
| Get the number of camera parameter lists. More...
ob_camera_param | ob_camera_param_list_get_param (ob_camera_param_list *param_list, uint32_t index, ob_error **error)
| Get camera parameters from camera parameter list. More...
void | ob_delete_camera_param_list (ob_camera_param_list *param_list, ob_error **error)
| Delete camera parameter list. More...
uint32_t | ob_depth_work_mode_list_count (ob_depth_work_mode_list *work_mode_list, ob_error **error)
| Get the depth work mode count that ob_depth_work_mode_list hold. More...
ob_depth_work_mode | ob_depth_work_mode_list_get_item (ob_depth_work_mode_list *work_mode_list, uint32_t index, ob_error **error)
| Get the index target of ob_depth_work_mode from work_mode_list. More...
void | ob_delete_depth_work_mode_list (ob_depth_work_mode_list *work_mode_list, ob_error **error)
| Free resource of ob_depth_work_mode_list. More...
void | ob_delete_data_bundle (ob_data_bundle *data_bundle, ob_error **error)
| Free resource of data_bundle which come from OrbbecSDK's API. More...

## Detailed Description

Device-related functions, including operations such as obtaining and creating a device, setting and obtaining device property, and obtaining sensors.

Definition in file Device.h.

## Function Documentation

uint32_t ob_device_list_device_count | ( | ob_device_list * | list,
|  | ob_error ** | error
| ) |  |

Get the number of devices.

Parameters

  [in] | list | Device list object
  [out] | error | Log error messages

Returns
  uint32_t returns the number of devices

const char* ob_device_list_get_device_name | ( | ob_device_list * | list,
|  | uint32_t | index,
|  | ob_error ** | error
| ) |  |

Get device name (DEPRECATED)

Parameters

  [in] | list | Device list object
  [in] | index | Device index
  [out] | error | Log error messages

Returns
  const char* returns device name

int ob_device_list_get_device_pid | ( | ob_device_list * | list,
|  | uint32_t | index,
|  | ob_error ** | error
| ) |  |

Get the pid of the specified device.

Parameters

  [in] | list | Device list object
  [in] | index | Device index
  [out] | error | Log error messages

Returns
  int returns the device pid

int ob_device_list_get_device_vid | ( | ob_device_list * | list,
|  | uint32_t | index,
|  | ob_error ** | error
| ) |  |

Get the vid of the specified device.

Parameters

  [in] | list | Device list object
  [in] | index | Device index
  [out] | error | Log error messages

Returns
  int return device vid

const char* ob_device_list_get_device_uid | ( | ob_device_list * | list,
|  | uint32_t | index,
|  | ob_error ** | error
| ) |  |

Get the uid of the specified device.

Parameters

  [in] | list | Device list object
  [in] | index | Device index
  [out] | error | Log error messages

Returns
  const char* returns the device uid

const char* ob_device_list_get_device_serial_number | ( | ob_device_list * | list,
|  | uint32_t | index,
|  | ob_error ** | error
| ) |  |

Get the serial number of the specified device.

Parameters

  [in] | list | Device list object
  [in] | index | Device index
  [out] | error | Log error messages

Returns
  const char* returns the device uid

ob_device* ob_device_list_get_device | ( | ob_device_list * | list,
|  | uint32_t | index,
|  | ob_error ** | error
| ) |  |

Create device.

Attention
  If the device has been acquired and created elsewhere, repeated acquisitions will return an error

Parameters

  [in] | list | Device list object
  | index | Creat index of the device
  [out] | error | Log error messages

Returns
  ob_device* returns the created device

ob_device* ob_device_list_get_device_by_serial_number | ( | ob_device_list * | list,
|  | const char * | serial_number,
|  | ob_error ** | error
| ) |  |

Create device.

Attention
  If the device has been acquired and created elsewhere, repeated acquisitions will return an error

Parameters

  [in] | list | Device list object
  | index | Creat the serial number of the device
  [out] | error | Log error messages

Returns
  ob_device* returns the created device

ob_device* ob_device_list_get_device_by_uid | ( | ob_device_list * | list,
|  | const char * | uid,
|  | ob_error ** | error
| ) |  |

Create device.

Attention
  If the device has been acquired and created elsewhere, repeated acquisitions will return an error

Parameters

  [in] | list | Device list object
  | index | Creat the uid of the device
  [out] | error | Log error messages

Returns
  ob_device* returns the created device

void ob_delete_device | ( | ob_device * | device,
|  | ob_error ** | error
| ) |  |

Delete device.

Parameters

  [in] | device | Device to be deleted
  [out] | error | Log error messages

void ob_delete_device_info | ( | ob_device_info * | info,
|  | ob_error ** | error
| ) |  |

Delete device information.

Parameters

  [in] | info | Device information to be deleted
  [out] | error | Log error messages

void ob_delete_device_list | ( | ob_device_list * | list,
|  | ob_error ** | error
| ) |  |

Delete device list.

Parameters

  [in] | list | Device list object to be deleted
  [out] | error | Log error messages

ob_device_info* ob_device_get_device_info | ( | ob_device * | device,
|  | ob_error ** | error
| ) |  |

Get device information.

Parameters

  [in] | device | Device to obtain information
  [out] | error | Log error messages

Returns
  ob_device_info* returns device information

ob_sensor_list* ob_device_get_sensor_list | ( | ob_device * | device,
|  | ob_error ** | error
| ) |  |

List all sensors.

Parameters

  [in] | device | Device object
  [out] | error | Log error messages

Returns
  ob_sensor_list* returns the list of all sensors

ob_sensor* ob_device_get_sensor | ( | ob_device * | device,
|  | ob_sensor_type | type,
|  | ob_error ** | error
| ) |  |

Get the device's sensors.

Parameters

  [in] | device | Device object
  [in] | type | Type of sensor to get
  [out] | error | Log error messages

Returns
  ob_sensor* returns the acquired sensor

void ob_device_set_int_property | ( | ob_device * | device,
|  | ob_property_id | property_id,
|  | int32_t | property,
|  | ob_error ** | error
| ) |  |

Set int type of device property.

Parameters

  [in] | device | Device object
  [in] | property_id | The id of the property to be set
  [in] | property | Property value to be set
  [out] | error | Log error messages

int32_t ob_device_get_int_property | ( | ob_device * | device,
|  | ob_property_id | property_id,
|  | ob_error ** | error
| ) |  |

Get int type of device property.

Parameters

  [in] | device | Device object
  [in] | property_id | Property id
  [out] | error | Log error messages

Returns
  int32_t returns the property value

void ob_device_set_float_property | ( | ob_device * | device,
|  | ob_property_id | property_id,
|  | float | property,
|  | ob_error ** | error
| ) |  |

Set float type of device property.

Parameters

  [in] | device | Device object
  [in] | property_id | The id of the property to be set
  [in] | property | Property value to be set
  [out] | error | Log error messages

float ob_device_get_float_property | ( | ob_device * | device,
|  | ob_property_id | property_id,
|  | ob_error ** | error
| ) |  |

Get float type of device property.

Parameters

  [in] | device | Device object
  [in] | property_id | Property id
  [out] | error | Log error messages

Returns
  int32_t returns the property value

void ob_device_set_bool_property | ( | ob_device * | device,
|  | ob_property_id | property_id,
|  | bool | property,
|  | ob_error ** | error
| ) |  |

Set bool type of device property.

Parameters

  [in] | device | Device object
  [in] | property_id | The id of the property to be set
  [in] | property | Property value to be set
  [out] | error | Log error messages

bool ob_device_get_bool_property | ( | ob_device * | device,
|  | ob_property_id | property_id,
|  | ob_error ** | error
| ) |  |

Get bool type of device property.

Parameters

  [in] | device | Device object
  [in] | property_id | Property id
  [out] | error | Log error messages

Returns
  bool returns the property value

void ob_device_set_structured_data | ( | ob_device * | device,
|  | ob_property_id | property_id,
|  | const void * | data,
|  | uint32_t | data_size,
|  | ob_error ** | error
| ) |  |

Set structured type.

Parameters

  [in] | device | Device object
  [in] | property_id | The id of the property to be set
  [in] | data | Property data to be set
  [in] | data_size | The size of the property to be set
  [out] | error | Log error messages

void ob_device_get_structured_data | ( | ob_device * | device,
|  | ob_property_id | property_id,
|  | void * | data,
|  | uint32_t * | data_size,
|  | ob_error ** | error
| ) |  |

Get structured type.

Parameters

  [in] | device | Device object
  [in] | property_id | Id of the property
  [out] | data | Property data obtained
  [out] | data_size | Get the size of the property
  [out] | error | Log error messages

void ob_device_set_structured_data_ext | ( | ob_device * | device,
|  | ob_property_id | property_id,
|  | ob_data_bundle * | data_bundle,
|  | ob_set_data_callback | cb,
|  | void * | user_data,
|  | ob_error ** | error
| ) |  |

Set property struct data.

Parameters

  [in] | device | Device object
  [in] | property_id | Id of the property
  [in] | data_bundle | Target data to set
  [in] | Set | data callback
  [in] | user_data | User-defined data will be returned in the callback
  [out] | error | Log error messages

ob_data_bundle* ob_device_get_structured_data_ext | ( | ob_device * | device,
|  | ob_property_id | property_id,
|  | ob_error ** | error
| ) |  |

Get property struct data.

Parameters

  [in] | device | Device object
  [in] | property_id | Id of the property
  [out] | error | Log error messages

Returns
  ob_data_dundle, NOTE: ob_data_dundle must free by ob_delete_data_bundle() because it come from OrbbecSDK's API

void ob_device_set_raw_data | ( | ob_device * | device,
|  | ob_property_id | property_id,
|  | void * | data,
|  | uint32_t | data_size,
|  | ob_set_data_callback | cb,
|  | bool | async,
|  | void * | user_data,
|  | ob_error ** | error
| ) |  |

Set raw data type of device property.

Parameters

  [in] | device | Device object
  [in] | property_id | The id of the property to be set
  [in] | data | Property data to be set
  [in] | data_size | The size of the property to be set
  [in] | cb | Set data callback
  [in] | async | Whether to execute asynchronously
  [in] | user_data | User-defined data will be returned in the callback
  [out] | error | Log error messages

void ob_device_get_raw_data | ( | ob_device * | device,
|  | ob_property_id | property_id,
|  | ob_get_data_callback | cb,
|  | bool | async,
|  | void * | user_data,
|  | ob_error ** | error
| ) |  |

Get raw data type of device property.

Parameters

  [in] | device | Device object
  [in] | property_id | Property id
  [in] | cb | Get data callback
  [in] | async | Whether to execute asynchronously
  [in] | user_data | User-defined data will be returned in the callback
  [out] | error | Log error messages

ob_protocol_version ob_device_get_protocol_version | ( | ob_device * | device,
|  | ob_error ** | error
| ) |  |

Get the property protocol version.

Parameters

  [in] | device | Device object
  [out] | error | Log error messages

Returns
  ob_protocol_version

ob_cmd_version ob_device_get_cmd_version | ( | ob_device * | device,
|  | ob_property_id | property_id,
|  | ob_error ** | error
| ) |  |

Get cmdVersion of property.

Parameters

  [in] | device | Device object
  [in] | propertyId | Property id
  [out] | error | Log error messages

Returns
  ob_cmd_version

uint32_t ob_device_get_supported_property_count | ( | ob_device * | device,
|  | ob_error ** | error
| ) |  |

Get supported device properties count.

Parameters

  [in] | device | Device object
  [out] | error | Log error messages

Returns
  uint32_t returns the number of properties supported by the device

ob_property_item ob_device_get_supported_property | ( | ob_device * | device,
|  | uint32_t | index,
|  | ob_error ** | error
| ) |  |

Get supported device properties.

Parameters

  [in] | device | Device object
  [in] | index | Property index
  [out] | error | Log error messages

Returns
  ob_global_unified_property_item returns the type of property supported by the device

bool ob_device_is_property_supported | ( | ob_device * | device,
|  | ob_property_id | property_id,
|  | ob_permission_type | permission,
|  | ob_error ** | error
| ) |  |

Check if device property permission is supported.

Parameters

  [in] | device | Device object
  [in] | property_id | Property id
  [in] | permission | The type of permission that needs to be interpreted
  [out] | error | Log error messages

Returns
  bool returns whether it is supported

ob_int_property_range ob_device_get_int_property_range | ( | ob_device * | device,
|  | ob_property_id | property_id,
|  | ob_error ** | error
| ) |  |

Get int type of device property range.

Parameters

  [in] | device | Device object
  [in] | property_id | Property id
  [out] | error | Log error messages

Returns
  ob_int_property_range returns the property range

ob_float_property_range ob_device_get_float_property_range | ( | ob_device * | device,
|  | ob_property_id | property_id,
|  | ob_error ** | error
| ) |  |

Get float type of device property range.

Parameters

  [in] | device | Device object
  [in] | property_id | Property id
  [out] | error | Log error messages

Returns
  ob_float_property_range returns the property range

ob_bool_property_range ob_device_get_bool_property_range | ( | ob_device * | device,
|  | ob_property_id | property_id,
|  | ob_error ** | error
| ) |  |

Get the bool type of device property range.

Parameters

  [in] | device | Device object
  [in] | property_id | Property id
  [out] | error | Log error messages

Returns
  ob_bool_property_range returns the property range

void ob_device_write_ahb | ( | ob_device * | device,
|  | uint32_t | reg,
|  | uint32_t | mask,
|  | uint32_t | value,
|  | ob_error ** | error
| ) |  |

ahb write register

Parameters

  [in] | device | Device object
  | reg | Register to be written
  | mask | Mask
  | value | The value to be written
  [out] | error | Log error messages

void ob_device_read_ahb | ( | ob_device * | device,
|  | uint32_t | reg,
|  | uint32_t | mask,
|  | uint32_t * | value,
|  | ob_error ** | error
| ) |  |

Read ahb register.

Parameters

  [in] | device | Device object
  | reg | Register to be read
  | mask | Mask
  | value | The value to be read
  [out] | error | Log error messages

void ob_device_write_i2c | ( | ob_device * | device,
|  | uint32_t | module_id,
|  | uint32_t | reg,
|  | uint32_t | mask,
|  | uint32_t | value,
|  | ob_error ** | error
| ) |  |

Write i2c register.

Parameters

  [in] | device | Device object
  | module_id | I2c module id to be written
  | reg | Register to be written
  | mask | Mask
  | value | The value to be written
  [out] | error | Log error messages

void ob_device_read_i2c | ( | ob_device * | device,
|  | uint32_t | module_id,
|  | uint32_t | reg,
|  | uint32_t | mask,
|  | uint32_t * | value,
|  | ob_error ** | error
| ) |  |

Read i2c register.

Parameters

  [in] | device | Device object
  | module_id | The id of the i2c module to be read
  | reg | Register to be read
  | mask | Mask
  | value | The value to be read
  [out] | error | Log error messages

void ob_device_write_flash | ( | ob_device * | device,
|  | uint32_t | offset,
|  | const void * | data,
|  | uint32_t | data_size,
|  | ob_set_data_callback | cb,
|  | bool | async,
|  | void * | user_data,
|  | ob_error ** | error
| ) |  |

Set the properties of writing to Flash [Asynchronous Callback].

Parameters

  [in] | device | Device object
  | offset | flash offset address
  | data | Property data to be written
  | data_size | The size of the property to be written
  | cb | Set data callback
  [in] | async | Whether to execute asynchronously
  [in] | user_data | User-defined data will be returned in the callback
  [out] | error | Log error messages

void ob_device_read_flash | ( | ob_device * | device,
|  | uint32_t | offset,
|  | uint32_t | data_size,
|  | ob_get_data_callback | cb,
|  | bool | async,
|  | void * | user_data,
|  | ob_error ** | error
| ) |  |

Read Flash properties [asynchronous callback].

Parameters

  [in] | device | Device object
  | offset | flash offset address
  | data_size | The size of the data to be read
  | cb | Read flash data and progress callback
  [in] | async | Whether to execute asynchronously
  [in] | user_data | User-defined data will be returned in the callback
  [out] | error | Log error messages

uint64_t ob_device_sync_device_time | ( | ob_device * | device,
|  | ob_error ** | error
| ) |  |

Synchronize the device time (time to the device, synchronize the local system time to the device)

Parameters

  [in] | device | Device object
  [out] | uint64_t | Command round trip time (rtt)
  [out] | error | Log error messages

void ob_device_upgrade | ( | ob_device * | device,
|  | const char * | path,
|  | ob_device_upgrade_callback | callback,
|  | bool | async,
|  | void * | user_data,
|  | ob_error ** | error
| ) |  |

Device firmware upgrade.

Parameters

  [in] | device | Device object
  [in] | pathFirmware | path
  [in] | callback | Firmware upgrade progress callback
  [in] | async | Whether to execute asynchronously
  [in] | user_data | User-defined data will be returned in the callback
  [out] | error | Log error messages

ob_device_state ob_device_get_device_state | ( | ob_device * | device,
|  | ob_error ** | error
| ) |  |

Get current device status.

Parameters

  [out] | error | Log error messages

Returns
  ob_device_state device state information

void ob_device_state_changed | ( | ob_device * | device,
|  | ob_device_state_callback | callback,
|  | void * | user_data,
|  | ob_error ** | error
| ) |  |

Monitor device state change.

Parameters

  [in] | device | Device object
  [in] | callback | Callback when the device status changes
  [in] | user_data | User-defined data will be returned in the callback
  [out] | error | Log error messages

void ob_device_send_file_to_destination | ( | ob_device * | device,
|  | const char * | file_path,
|  | const char * | dst_path,
|  | ob_file_send_callback | callback,
|  | bool | async,
|  | void * | user_data,
|  | ob_error ** | error
| ) |  |

Send files to the specified path of the device.

Parameters

  [in] | device | Device object
  [in] | file_path | Source file path
  [in] | dst_path | Specify the device-side file acceptance path
  [in] | callback | File sending progress callback
  [in] | async | Whether to execute asynchronously
  [in] | user_data | User-defined data will be returned in the callback
  [out] | error | Log error messages

bool ob_device_activate_authorization | ( | ob_device * | device,
|  | const char * | auth_code,
|  | ob_error ** | error
| ) |  |

Verify device authorization code.

Parameters

  [in] | device | Device object
  [in] | auth_code | Authorization code
  [out] | error | Log error messages

Returns
  bool whether the activation is successful

void ob_device_write_authorization_code | ( | ob_device * | device,
|  | const char * | auth_code,
|  | ob_error ** | error
| ) |  |

Write device authorization code.

Parameters

  [in] | device | Device object
  [in] | auth_code | Authorization code
  [out] | error | Log error messages

ob_camera_param_list* ob_device_get_calibration_camera_param_list | ( | ob_device * | device,
|  | ob_error ** | error
| ) |  |

Get the original parameter list of camera calibration saved in the device. The parameters in the list do not correspond to the current open-stream configuration. You need to select the parameters according to the actual situation, and may need to do scaling, mirroring and other processing. Non-professional users are recommended to use the ob_pipeline_get_camera_param() interface.

Parameters

  [in] | device | Device object
  [out] | error | Log error messages

Returns
  ob_camera_param_list camera parameter list

ob_depth_work_mode ob_device_get_current_depth_work_mode | ( | ob_device * | device,
|  | ob_error ** | error
| ) |  |

Get current depth work mode.

Parameters

  [in] | device | Device object
  [out] | error | Log error messages

Returns
  ob_depth_work_mode Current depth work mode

ob_status ob_device_switch_depth_work_mode | ( | ob_device * | device,
|  | const ob_depth_work_mode * | work_mode,
|  | ob_error ** | error
| ) |  |

Switch depth work mode by ob_depth_work_mode. Prefer invoke ob_device_switch_depth_work_mode_by_name to switch depth mode when known the complete name of depth work mode.

Parameters

  [in] | device | Device object
  [in] | work_mode | Depth work mode come from ob_depth_work_mode_list which return by ob_device_get_depth_work_mode_list
  [out] | error | Log error messages

Returns
  Return switch result. OB_STATUS_OK: success, other failed.

ob_status ob_device_switch_depth_work_mode_by_name | ( | ob_device * | device,
|  | const char * | mode_name,
|  | ob_error ** | error
| ) |  |

Switch depth work mode by work mode name.

Parameters

  [in] | device | Device object
  [in] | mode | name Depth work mode name which equals to ob_depth_work_mode.name
  [out] | error | Log error messages

Returns
  Return switch result. OB_STATUS_OK: success, other failed.

ob_depth_work_mode_list* ob_device_get_depth_work_mode_list | ( | ob_device * | device,
|  | ob_error ** | error
| ) |  |

Request support depth work mode list.

Parameters

  [in] | device | Device object
  [out] | error | Log error messages

Returns
  ob_depth_work_mode_list list of ob_depth_work_mode

void ob_device_reboot | ( | ob_device * | device,
|  | ob_error ** | error
| ) |  |

Device reboot.

Attention
  The device will be disconnected and reconnected. After the device is disconnected, the interface access to the device handle may be abnormal. Please use the ob_delete_device interface to delete the handle directly. After the device is reconnected, it can be obtained again.

Parameters

  [in] | device | Device object
  [out] | error | Log error messages

ob_device_sync_config ob_device_get_sync_config | ( | ob_device * | device,
|  | ob_error ** | error
| ) |  |

获取当前设备同步配置

设备同步：包括单机内的不同 Sensor 的曝光同步功能 和 多机同步功能

Parameters

  [in] | device | 设备对象
  [out] | error | 记录错误信息

Returns
  ob_device_sync_config 返回设备同步配置

void ob_device_set_sync_config | ( | ob_device * | device,
|  | ob_device_sync_config | device_sync_config,
|  | ob_error ** | error
| ) |  |

设置设备同步配置

用于配置 单机内的不同 Sensor 的曝光同步功能 和 多机同步功能

Attention
  调用本函数会直接将配置写入设备Flash，设备重启后依然会生效。为了避免影响Flash寿命，不要频繁更新配置。

Parameters

  [in] | device | 设备对象
  [out] | device_sync_config | 设备同步配置
  [out] | error | 记录错误信息

const char* ob_device_info_name | ( | ob_device_info * | info,
|  | ob_error ** | error
| ) |  |

Get device name.

Parameters

  [in] | info | Device Information
  [out] | error | Log error messages

Returns
  const char* returns the device name

int ob_device_info_pid | ( | ob_device_info * | info,
|  | ob_error ** | error
| ) |  |

Get device pid.

Parameters

  [in] | info | Device Information
  [out] | error | Log error messages

Returns
  int returns the device pid

int ob_device_info_vid | ( | ob_device_info * | info,
|  | ob_error ** | error
| ) |  |

Get device vid.

Parameters

  [in] | info | Device Information
  [out] | error | Log error messages

Returns
  int returns device vid

const char* ob_device_info_uid | ( | ob_device_info * | info,
|  | ob_error ** | error
| ) |  |

Get device uid.

Parameters

  [in] | info | Device Information
  [out] | error | Log error messages

Returns
  const char* returns device uid

const char* ob_device_info_serial_number | ( | ob_device_info * | info,
|  | ob_error ** | error
| ) |  |

Get device serial number.

Parameters

  [in] | info | Device Information
  [out] | error | Log error messages

Returns
  const char* returns device serial number

const char* ob_device_info_firmware_version | ( | ob_device_info * | info,
|  | ob_error ** | error
| ) |  |

Get the firmware version number.

Parameters

  [in] | info | Device Information
  [out] | error | Log error messages

Returns
  int returns the firmware version number

const char* ob_device_info_usb_type | ( | ob_device_info * | info,
|  | ob_error ** | error
| ) |  |

Get usb connection type (DEPRECATED)

Parameters

  [in] | info | Device Information
  [out] | error | Log error messages

Returns
  char* returns usb connection type

const char* ob_device_info_connection_type | ( | ob_device_info * | info,
|  | ob_error ** | error
| ) |  |

Get device connection type.

Parameters

  [in] | info | Device Information
  [out] | error | Log error messages

Returns
  char* returns connection type

const char* ob_device_info_hardware_version | ( | ob_device_info * | info,
|  | ob_error ** | error
| ) |  |

Get hardware version number.

Parameters

  [in] | info | Device Information
  [out] | error | Log error messages

Returns
  const char* returns hardware version number

const char* ob_device_info_supported_min_sdk_version | ( | ob_device_info * | info,
|  | ob_error ** | error
| ) |  |

Get the minimum SDK version number supported by the device.

Parameters

  [in] | info | Device Information
  [out] | error | Log error messages

Returns
  const char* returns the minimum SDK version number supported by the device

const char* ob_device_info_asicName | ( | ob_device_info * | info,
|  | ob_error ** | error
| ) |  |

Get chip name.

Parameters

  [in] | info | Device Information
  [out] | error | Log error messages

Returns
  const char* returns asicName

ob_device_type ob_device_info_device_type | ( | ob_device_info * | info,
|  | ob_error ** | error
| ) |  |

Get device type.

Parameters

  [in] | info | Device Information
  [out] | error | Log error messages

Returns
  ob_device_type returns device type

uint32_t ob_camera_param_list_count | ( | ob_camera_param_list * | param_list,
|  | ob_error ** | error
| ) |  |

Get the number of camera parameter lists.

Parameters

  param_list | Camera parameter list
  error | Log error messages

Returns
  uint32_t returns the number of lists

ob_camera_param ob_camera_param_list_get_param | ( | ob_camera_param_list * | param_list,
|  | uint32_t | index,
|  | ob_error ** | error
| ) |  |

Get camera parameters from camera parameter list.

Parameters

  param_list | Camera parameter list
  index | Parameter index
  error | Log error messages

Returns
  ob_camera_param returns the camera parameters. Since it returns the structure object directly, there is no need to provide a delete interface.

void ob_delete_camera_param_list | ( | ob_camera_param_list * | param_list,
|  | ob_error ** | error
| ) |  |

Delete camera parameter list.

Parameters

  param_list | Camera parameter list
  error | Log error messages

uint32_t ob_depth_work_mode_list_count | ( | ob_depth_work_mode_list * | work_mode_list,
|  | ob_error ** | error
| ) |  |

Get the depth work mode count that ob_depth_work_mode_list hold.

Parameters

  [in] | work_mode_list | data struct contain list of ob_depth_work_mode
  [out] | error | Log error messages

Returns
  The total number contain in ob_depth_work_mode_list

ob_depth_work_mode ob_depth_work_mode_list_get_item | ( | ob_depth_work_mode_list * | work_mode_list,
|  | uint32_t | index,
|  | ob_error ** | error
| ) |  |

Get the index target of ob_depth_work_mode from work_mode_list.

Parameters

  [in] | work_mode_list | data struct contain list of ob_depth_work_mode
  [in] | index | index of target ob_depth_work_mode
  [out] | error | Log error messages

Returns
  ob_depth_work_mode

void ob_delete_depth_work_mode_list | ( | ob_depth_work_mode_list * | work_mode_list,
|  | ob_error ** | error
| ) |  |

Free resource of ob_depth_work_mode_list.

Parameters

  [in] | work_mode_list | data struct contain list of ob_depth_work_mode
  [out] | error | Log error messages

void ob_delete_data_bundle | ( | ob_data_bundle * | data_bundle,
|  | ob_error ** | error
| ) |  |

Free resource of data_bundle which come from OrbbecSDK's API.

Parameters

  | data_bundle | Data bundle
  [out] | error | Log error messages