OrbbecSDK  1.5.7
OrbbecSDK: Software-Development-Kit for Orbbec 3D-Sensor devices
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_deviceob_device_list_get_device (ob_device_list *list, uint32_t index, ob_error **error)
 Create device. More...
 
ob_deviceob_device_list_get_device_by_serial_number (ob_device_list *list, const char *serial_number, ob_error **error)
 Create device. More...
 
ob_deviceob_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_infoob_device_get_device_info (ob_device *device, ob_error **error)
 Get device information. More...
 
ob_sensor_listob_device_get_sensor_list (ob_device *device, ob_error **error)
 List all sensors. More...
 
ob_sensorob_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_bundleob_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_listob_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_listob_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]listDevice list object
[out]errorLog 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]listDevice list object
[in]indexDevice index
[out]errorLog 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]listDevice list object
[in]indexDevice index
[out]errorLog 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]listDevice list object
[in]indexDevice index
[out]errorLog 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]listDevice list object
[in]indexDevice index
[out]errorLog 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]listDevice list object
[in]indexDevice index
[out]errorLog 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]listDevice list object
indexCreat index of the device
[out]errorLog 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]listDevice list object
indexCreat the serial number of the device
[out]errorLog 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]listDevice list object
indexCreat the uid of the device
[out]errorLog error messages
Returns
ob_device* returns the created device
void ob_delete_device ( ob_device device,
ob_error **  error 
)

Delete device.

Parameters
[in]deviceDevice to be deleted
[out]errorLog error messages
void ob_delete_device_info ( ob_device_info info,
ob_error **  error 
)

Delete device information.

Parameters
[in]infoDevice information to be deleted
[out]errorLog error messages
void ob_delete_device_list ( ob_device_list list,
ob_error **  error 
)

Delete device list.

Parameters
[in]listDevice list object to be deleted
[out]errorLog error messages
ob_device_info* ob_device_get_device_info ( ob_device device,
ob_error **  error 
)

Get device information.

Parameters
[in]deviceDevice to obtain information
[out]errorLog 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]deviceDevice object
[out]errorLog 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]deviceDevice object
[in]typeType of sensor to get
[out]errorLog 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]deviceDevice object
[in]property_idThe id of the property to be set
[in]propertyProperty value to be set
[out]errorLog 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]deviceDevice object
[in]property_idProperty id
[out]errorLog 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]deviceDevice object
[in]property_idThe id of the property to be set
[in]propertyProperty value to be set
[out]errorLog 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]deviceDevice object
[in]property_idProperty id
[out]errorLog 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]deviceDevice object
[in]property_idThe id of the property to be set
[in]propertyProperty value to be set
[out]errorLog 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]deviceDevice object
[in]property_idProperty id
[out]errorLog 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]deviceDevice object
[in]property_idThe id of the property to be set
[in]dataProperty data to be set
[in]data_sizeThe size of the property to be set
[out]errorLog 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]deviceDevice object
[in]property_idId of the property
[out]dataProperty data obtained
[out]data_sizeGet the size of the property
[out]errorLog 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]deviceDevice object
[in]property_idId of the property
[in]data_bundleTarget data to set
[in]Setdata callback
[in]user_dataUser-defined data will be returned in the callback
[out]errorLog 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]deviceDevice object
[in]property_idId of the property
[out]errorLog 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]deviceDevice object
[in]property_idThe id of the property to be set
[in]dataProperty data to be set
[in]data_sizeThe size of the property to be set
[in]cbSet data callback
[in]asyncWhether to execute asynchronously
[in]user_dataUser-defined data will be returned in the callback
[out]errorLog 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]deviceDevice object
[in]property_idProperty id
[in]cbGet data callback
[in]asyncWhether to execute asynchronously
[in]user_dataUser-defined data will be returned in the callback
[out]errorLog error messages
ob_protocol_version ob_device_get_protocol_version ( ob_device device,
ob_error **  error 
)

Get the property protocol version.

Parameters
[in]deviceDevice object
[out]errorLog 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]deviceDevice object
[in]propertyIdProperty id
[out]errorLog 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]deviceDevice object
[out]errorLog 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]deviceDevice object
[in]indexProperty index
[out]errorLog 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]deviceDevice object
[in]property_idProperty id
[in]permissionThe type of permission that needs to be interpreted
[out]errorLog 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]deviceDevice object
[in]property_idProperty id
[out]errorLog 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]deviceDevice object
[in]property_idProperty id
[out]errorLog 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]deviceDevice object
[in]property_idProperty id
[out]errorLog 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]deviceDevice object
regRegister to be written
maskMask
valueThe value to be written
[out]errorLog 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]deviceDevice object
regRegister to be read
maskMask
valueThe value to be read
[out]errorLog 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]deviceDevice object
module_idI2c module id to be written
regRegister to be written
maskMask
valueThe value to be written
[out]errorLog 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]deviceDevice object
module_idThe id of the i2c module to be read
regRegister to be read
maskMask
valueThe value to be read
[out]errorLog 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]deviceDevice object
offsetflash offset address
dataProperty data to be written
data_sizeThe size of the property to be written
cbSet data callback
[in]asyncWhether to execute asynchronously
[in]user_dataUser-defined data will be returned in the callback
[out]errorLog 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]deviceDevice object
offsetflash offset address
data_sizeThe size of the data to be read
cbRead flash data and progress callback
[in]asyncWhether to execute asynchronously
[in]user_dataUser-defined data will be returned in the callback
[out]errorLog 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]deviceDevice object
[out]uint64_tCommand round trip time (rtt)
[out]errorLog 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]deviceDevice object
[in]pathFirmwarepath
[in]callbackFirmware upgrade progress callback
[in]asyncWhether to execute asynchronously
[in]user_dataUser-defined data will be returned in the callback
[out]errorLog error messages
ob_device_state ob_device_get_device_state ( ob_device device,
ob_error **  error 
)

Get current device status.

Parameters
[out]errorLog 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]deviceDevice object
[in]callbackCallback when the device status changes
[in]user_dataUser-defined data will be returned in the callback
[out]errorLog 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]deviceDevice object
[in]file_pathSource file path
[in]dst_pathSpecify the device-side file acceptance path
[in]callbackFile sending progress callback
[in]asyncWhether to execute asynchronously
[in]user_dataUser-defined data will be returned in the callback
[out]errorLog error messages
bool ob_device_activate_authorization ( ob_device device,
const char *  auth_code,
ob_error **  error 
)

Verify device authorization code.

Parameters
[in]deviceDevice object
[in]auth_codeAuthorization code
[out]errorLog 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]deviceDevice object
[in]auth_codeAuthorization code
[out]errorLog 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]deviceDevice object
[out]errorLog 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]deviceDevice object
[out]errorLog 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]deviceDevice object
[in]work_modeDepth work mode come from ob_depth_work_mode_list which return by ob_device_get_depth_work_mode_list
[out]errorLog 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]deviceDevice object
[in]modename Depth work mode name which equals to ob_depth_work_mode.name
[out]errorLog 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]deviceDevice object
[out]errorLog 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]deviceDevice object
[out]errorLog 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]infoDevice Information
[out]errorLog 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]infoDevice Information
[out]errorLog 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]infoDevice Information
[out]errorLog 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]infoDevice Information
[out]errorLog 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]infoDevice Information
[out]errorLog 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]infoDevice Information
[out]errorLog 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]infoDevice Information
[out]errorLog 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]infoDevice Information
[out]errorLog 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]infoDevice Information
[out]errorLog 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]infoDevice Information
[out]errorLog 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]infoDevice Information
[out]errorLog 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]infoDevice Information
[out]errorLog 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_listCamera parameter list
errorLog 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_listCamera parameter list
indexParameter index
errorLog 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_listCamera parameter list
errorLog 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_listdata struct contain list of ob_depth_work_mode
[out]errorLog 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_listdata struct contain list of ob_depth_work_mode
[in]indexindex of target ob_depth_work_mode
[out]errorLog 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_listdata struct contain list of ob_depth_work_mode
[out]errorLog 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_bundleData bundle
[out]errorLog error messages