OrbbecSDK 1.10.18
OrbbecSDK: Software-Development-Kit for Orbbec 3D Cameras
Loading...
Searching...
No Matches
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"
#include "MultipleDevices.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.
 
const char * ob_device_list_get_device_name (ob_device_list *list, uint32_t index, ob_error **error)
 Get device name (DEPRECATED)
 
int ob_device_list_get_device_pid (ob_device_list *list, uint32_t index, ob_error **error)
 Get the pid of the specified device.
 
int ob_device_list_get_device_vid (ob_device_list *list, uint32_t index, ob_error **error)
 Get the vid of the specified device.
 
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.
 
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.
 
const char * ob_device_list_get_device_connection_type (ob_device_list *list, uint32_t index, ob_error **error)
 Get device connection type.
 
const char * ob_device_list_get_device_ip_address (ob_device_list *list, uint32_t index, ob_error **error)
 Get device ip address.
 
const char * ob_device_list_get_extension_info (ob_device_list *list, uint32_t index, ob_error **error)
 Get the device extension information.
 
ob_deviceob_device_list_get_device (ob_device_list *list, uint32_t index, ob_error **error)
 Create a device.
 
ob_deviceob_device_list_get_device_by_serial_number (ob_device_list *list, const char *serial_number, ob_error **error)
 Create a device.
 
ob_deviceob_device_list_get_device_by_uid (ob_device_list *list, const char *uid, ob_error **error)
 Create device by uid.
 
void ob_delete_device (ob_device *device, ob_error **error)
 Delete a device.
 
void ob_delete_device_info (ob_device_info *info, ob_error **error)
 Delete device information.
 
void ob_delete_device_list (ob_device_list *list, ob_error **error)
 Delete a device list.
 
ob_device_infoob_device_get_device_info (ob_device *device, ob_error **error)
 Get device information.
 
ob_sensor_listob_device_get_sensor_list (ob_device *device, ob_error **error)
 List all sensors.
 
ob_sensorob_device_get_sensor (ob_device *device, ob_sensor_type type, ob_error **error)
 Get a device's sensor.
 
void ob_device_set_int_property (ob_device *device, ob_property_id property_id, int32_t property, ob_error **error)
 Set an integer type of device property.
 
int32_t ob_device_get_int_property (ob_device *device, ob_property_id property_id, ob_error **error)
 Get an integer type of device property.
 
void ob_device_set_float_property (ob_device *device, ob_property_id property_id, float property, ob_error **error)
 Set a float type of device property.
 
float ob_device_get_float_property (ob_device *device, ob_property_id property_id, ob_error **error)
 Get a float type of device property.
 
void ob_device_set_bool_property (ob_device *device, ob_property_id property_id, bool property, ob_error **error)
 Set a boolean type of device property.
 
bool ob_device_get_bool_property (ob_device *device, ob_property_id property_id, ob_error **error)
 Get a boolean type of device property.
 
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 data.
 
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 data of a device property.
 
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 structured data of a device property.
 
ob_data_bundleob_device_get_structured_data_ext (ob_device *device, ob_property_id property_id, ob_error **error)
 Get structured data of a device property.
 
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 of a device property.
 
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 of a device property.
 
ob_protocol_version ob_device_get_protocol_version (ob_device *device, ob_error **error)
 Get the protocol version of the device.
 
ob_cmd_version ob_device_get_cmd_version (ob_device *device, ob_property_id property_id, ob_error **error)
 Get the cmdVersion of a property.
 
uint32_t ob_device_get_supported_property_count (ob_device *device, ob_error **error)
 Get 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 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 a device property permission is supported.
 
ob_int_property_range ob_device_get_int_property_range (ob_device *device, ob_property_id property_id, ob_error **error)
 Get the integer type of device property range.
 
ob_float_property_range ob_device_get_float_property_range (ob_device *device, ob_property_id property_id, ob_error **error)
 Get the float type of device 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 boolean type of device property range.
 
void ob_device_write_ahb (ob_device *device, uint32_t reg, uint32_t mask, uint32_t value, ob_error **error)
 Write to an AHB register.
 
void ob_device_read_ahb (ob_device *device, uint32_t reg, uint32_t mask, uint32_t *value, ob_error **error)
 Read an AHB register.
 
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 to an I2C register.
 
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 an I2C register.
 
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].
 
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].
 
void ob_device_write_customer_data (ob_device *device, const void *data, uint32_t data_size, ob_error **error)
 Set customer data.
 
void ob_device_read_customer_data (ob_device *device, void *data, uint32_t *data_size, ob_error **error)
 Get customer data of a device property.
 
void ob_device_upgrade (ob_device *device, const char *path, ob_device_upgrade_callback callback, bool async, void *user_data, ob_error **error)
 Upgrade the device firmware.
 
void ob_device_upgrade_from_data (ob_device *device, const char *file_data, uint32_t file_size, ob_device_upgrade_callback callback, bool async, void *user_data, ob_error **error)
 Upgrade the device firmware.
 
ob_device_state ob_device_get_device_state (ob_device *device, ob_error **error)
 Get the current device status.
 
void ob_device_state_changed (ob_device *device, ob_device_state_callback callback, void *user_data, ob_error **error)
 Monitor device state changes.
 
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 on the device.
 
bool ob_device_activate_authorization (ob_device *device, const char *auth_code, ob_error **error)
 Verify the device authorization code.
 
void ob_device_write_authorization_code (ob_device *device, const char *auth_code, ob_error **error)
 Write the device authorization code.
 
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 on the device.
 
ob_depth_work_mode ob_device_get_current_depth_work_mode (ob_device *device, ob_error **error)
 Get the 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 the depth work mode by ob_depth_work_mode. Prefer to use ob_device_switch_depth_work_mode_by_name to switch depth mode when the complete name of the depth work mode is known.
 
ob_status ob_device_switch_depth_work_mode_by_name (ob_device *device, const char *mode_name, ob_error **error)
 Switch the depth work mode by work mode name.
 
ob_depth_work_mode_listob_device_get_depth_work_mode_list (ob_device *device, ob_error **error)
 Request the list of supported depth work modes.
 
void ob_device_reboot (ob_device *device, ob_error **error)
 Device reboot.
 
ob_device_sync_config ob_device_get_sync_config (ob_device *device, ob_error **error)
 Get the current device synchronization configuration.
 
void ob_device_set_sync_config (ob_device *device, ob_device_sync_config device_sync_config, ob_error **error)
 Set the device synchronization configuration.
 
const char * ob_device_info_name (ob_device_info *info, ob_error **error)
 Get device name.
 
int ob_device_info_pid (ob_device_info *info, ob_error **error)
 Get device pid.
 
int ob_device_info_vid (ob_device_info *info, ob_error **error)
 Get device vid.
 
const char * ob_device_info_uid (ob_device_info *info, ob_error **error)
 Get device uid.
 
const char * ob_device_info_serial_number (ob_device_info *info, ob_error **error)
 Get device serial number.
 
const char * ob_device_info_firmware_version (ob_device_info *info, ob_error **error)
 Get the firmware version number.
 
const char * ob_device_info_usb_type (ob_device_info *info, ob_error **error)
 Get the USB connection type (DEPRECATED)
 
const char * ob_device_info_connection_type (ob_device_info *info, ob_error **error)
 Get the device connection type.
 
const char * ob_device_info_ip_address (ob_device_info *info, ob_error **error)
 Get the device IP address.
 
const char * ob_device_info_hardware_version (ob_device_info *info, ob_error **error)
 Get the hardware version number.
 
const char * ob_device_info_get_extension_info (ob_device_info *info, ob_error **error)
 Get the device extension information.
 
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.
 
const char * ob_device_info_asicName (ob_device_info *info, ob_error **error)
 Get the chip name.
 
ob_device_type ob_device_info_device_type (ob_device_info *info, ob_error **error)
 Get the 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.
 
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 the camera parameter list.
 
void ob_delete_camera_param_list (ob_camera_param_list *param_list, ob_error **error)
 Delete the camera parameter list.
 
uint32_t ob_depth_work_mode_list_count (ob_depth_work_mode_list *work_mode_list, ob_error **error)
 
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.
 
void ob_delete_depth_work_mode_list (ob_depth_work_mode_list *work_mode_list, ob_error **error)
 Free the resources of ob_depth_work_mode_list.
 
void ob_delete_data_bundle (ob_data_bundle *data_bundle, ob_error **error)
 Free the resources of data_bundle which come from OrbbecSDK's API.
 
bool ob_device_is_global_timestamp_supported (ob_device *device, ob_error **error)
 Check if the device supports global timestamp.
 
void ob_device_load_depth_filter_config (ob_device *device, const char *file_path, ob_error **error)
 Load depth filter config from file.
 
void ob_device_reset_default_depth_filter_config (ob_device *device, ob_error **error)
 Reset depth filter config to device default define.
 
const char * ob_device_get_current_preset_name (ob_device *device, ob_error **error)
 The preset mean a set of parameters or configurations that can be applied to the device to achieve a specific effect or function.
 
void ob_device_load_preset (ob_device *device, const char *preset_name, ob_error **error)
 Get the available preset list.
 
void ob_device_load_preset_from_json_file (ob_device *device, const char *json_file_path, ob_error **error)
 Load preset from json string.
 
void ob_device_export_current_settings_as_preset_json_file (ob_device *device, const char *json_file_path, ob_error **error)
 Export current settings as a preset json file.
 
ob_device_preset_listob_device_get_available_preset_list (ob_device *device, ob_error **error)
 Get the available preset list.
 
void ob_delete_preset_list (ob_device_preset_list *preset_list, ob_error **error)
 Delete the available preset list.
 
uint32_t ob_device_preset_list_count (ob_device_preset_list *preset_list, ob_error **error)
 Get the number of preset in the preset list.
 
const char * ob_device_preset_list_get_name (ob_device_preset_list *preset_list, uint32_t index, ob_error **error)
 Get the name of the preset in the preset list.
 
bool ob_device_preset_list_has_preset (ob_device_preset_list *preset_list, const char *preset_name, ob_error **error)
 Check if the preset list has the preset.
 

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

◆ ob_device_list_device_count()

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 return the number of devices

◆ ob_device_list_get_device_name()

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* return device name

◆ ob_device_list_get_device_pid()

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 return the device pid

◆ ob_device_list_get_device_vid()

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

◆ ob_device_list_get_device_uid()

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* return the device uid

◆ ob_device_list_get_device_serial_number()

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* The device UID.

◆ ob_device_list_get_device_connection_type()

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

Get device connection type.

Parameters
[in]listDevice list object
[in]indexDevice index
[out]errorLog error messages
Returns
const char* returns the device connection type,currently supports:"USB", "USB1.0", "USB1.1", "USB2.0", "USB2.1", "USB3.0", "USB3.1", "USB3.2", "Ethernet"

◆ ob_device_list_get_device_ip_address()

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

Get device ip address.

Attention
Only valid for network devices, otherwise it will return "0.0.0.0".
Parameters
listDevice list object
indexDevice index
errorLog error messages
Returns
const char* returns the device ip address,such as "192.168.1.10"

◆ ob_device_list_get_extension_info()

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

Get the device extension information.

Parameters
[in]listDevice list object
[in]indexDevice index
[out]errorLog error messages
Returns
const char* The device extension information

◆ ob_device_list_get_device()

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

Create a device.

Attention
If the device has already been acquired and created elsewhere, repeated acquisitions will return an error.
Parameters
[in]listDevice list object.
[in]indexThe index of the device to create.
[out]errorLog error messages.
Returns
ob_device* The created device.

◆ ob_device_list_get_device_by_serial_number()

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

Create a device.

Attention
If the device has already been acquired and created elsewhere, repeated acquisitions will return an error.
Parameters
[in]listDevice list object.
[in]serial_numberThe serial number of the device to create.
[out]errorLog error messages.
Returns
ob_device* The created device.

◆ ob_device_list_get_device_by_uid()

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

Create device by uid.

On Linux platform, the uid of the device is composed of bus-port-dev, for example 1-1.2-1. But the SDK will remove the dev number and only keep the bus-port as the uid to create the device, for example 1-1.2, so that we can create a device connected to the specified USB port. Similarly, users can also directly pass in bus-port as uid to create device.

Attention
If the device has already been acquired and created elsewhere, repeated acquisitions will return an error.
Parameters
[in]listDevice list object.
[in]uidThe UID of the device to create.
[out]errorLog error messages.
Returns
ob_device* The created device.

◆ ob_delete_device()

void ob_delete_device ( ob_device device,
ob_error **  error 
)

Delete a device.

Parameters
[in]deviceThe device to be deleted.
[out]errorLog error messages.

◆ ob_delete_device_info()

void ob_delete_device_info ( ob_device_info info,
ob_error **  error 
)

Delete device information.

Parameters
[in]infoThe device information to be deleted.
[out]errorLog error messages.

◆ ob_delete_device_list()

void ob_delete_device_list ( ob_device_list list,
ob_error **  error 
)

Delete a device list.

Parameters
[in]listThe device list object to be deleted.
[out]errorLog error messages.

◆ ob_device_get_device_info()

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

Get device information.

Parameters
[in]deviceThe device to obtain information from.
[out]errorLog error messages.
Returns
ob_device_info* The device information.

◆ ob_device_get_sensor_list()

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

List all sensors.

Parameters
[in]deviceThe device object.
[out]errorLog error messages.
Returns
ob_sensor_list* The list of all sensors.

◆ ob_device_get_sensor()

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

Get a device's sensor.

Parameters
[in]deviceThe device object.
[in]typeThe type of sensor to get.
[out]errorLog error messages.
Returns
ob_sensor* The acquired sensor.

◆ ob_device_set_int_property()

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

Set an integer type of device property.

Parameters
[in]deviceThe device object.
[in]property_idThe ID of the property to be set.
[in]propertyThe property value to be set.
[out]errorLog error messages.

◆ ob_device_get_int_property()

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

Get an integer type of device property.

Parameters
[in]deviceThe device object.
[in]property_idThe property ID.
[out]errorLog error messages.
Returns
int32_t The property value.

◆ ob_device_set_float_property()

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

Set a float type of device property.

Parameters
[in]deviceThe device object.
[in]property_idThe ID of the property to be set.
[in]propertyThe property value to be set.
[out]errorLog error messages.

◆ ob_device_get_float_property()

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

Get a float type of device property.

Parameters
[in]deviceThe device object.
[in]property_idThe property ID.
[out]errorLog error messages.
Returns
float The property value.

◆ ob_device_set_bool_property()

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

Set a boolean type of device property.

Parameters
[in]deviceThe device object.
[in]property_idThe ID of the property to be set.
[in]propertyThe property value to be set.
[out]errorLog error messages.

◆ ob_device_get_bool_property()

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

Get a boolean type of device property.

Parameters
[in]deviceThe device object.
[in]property_idThe property ID.
[out]errorLog error messages.
Returns
bool The property value.

◆ ob_device_set_structured_data()

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 data.

Parameters
[in]deviceThe device object.
[in]property_idThe ID of the property to be set.
[in]dataThe property data to be set.
[in]data_sizeThe size of the property to be set.
[out]errorLog error messages.

◆ ob_device_get_structured_data()

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 data of a device property.

Parameters
[in]deviceThe device object.
[in]property_idThe ID of the property.
[out]dataThe obtained property data.
[out]data_sizeThe size of the obtained property data.
[out]errorLog error messages.

◆ ob_device_set_structured_data_ext()

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 structured data of a device property.

Parameters
[in]deviceThe device object.
[in]property_idThe ID of the property.
[in]data_bundleThe target data to set.
[in]cbThe data callback.
[in]user_dataUser-defined data that will be returned in the callback.
[out]errorLog error messages.

◆ ob_device_get_structured_data_ext()

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

Get structured data of a device property.

Parameters
[in]deviceThe device object.
[in]property_idThe ID of the property.
[out]errorLog error messages.
Returns
ob_data_bundle. NOTE: ob_data_bundle must be freed by ob_delete_data_bundle() because it comes from OrbbecSDK's API.

◆ ob_device_set_raw_data()

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 of a device property.

Parameters
[in]deviceThe device object.
[in]property_idThe ID of the property to be set.
[in]dataThe property data to be set.
[in]data_sizeThe size of the property data to be set.
[in]cbThe set data callback.
[in]asyncWhether to execute asynchronously.
[in]user_dataUser-defined data that will be returned in the callback.
[out]errorLog error messages.

◆ ob_device_get_raw_data()

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 of a device property.

Parameters
[in]deviceThe device object.
[in]property_idThe ID of the property.
[in]cbThe get data callback.
[in]asyncWhether to execute asynchronously.
[in]user_dataUser-defined data that will be returned in the callback.
[out]errorLog error messages.

◆ ob_device_get_protocol_version()

ob_protocol_version ob_device_get_protocol_version ( ob_device device,
ob_error **  error 
)

Get the protocol version of the device.

Parameters
[in]deviceThe device object.
[out]errorLog error messages.
Returns
The protocol version of the device.

◆ ob_device_get_cmd_version()

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

Get the cmdVersion of a property.

Parameters
[in]deviceThe device object.
[in]property_idThe property id.
[out]errorLog error messages.
Returns
The cmdVersion of the property.

◆ ob_device_get_supported_property_count()

uint32_t ob_device_get_supported_property_count ( ob_device device,
ob_error **  error 
)

Get the number of properties supported by the device.

Parameters
[in]deviceThe device object.
[out]errorLog error messages.
Returns
The number of properties supported by the device.

◆ ob_device_get_supported_property()

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

Get the type of property supported by the device.

Parameters
[in]deviceThe device object.
[in]indexThe property index.
[out]errorLog error messages.
Returns
The type of property supported by the device.

◆ ob_device_is_property_supported()

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

Check if a device property permission is supported.

Parameters
[in]deviceThe device object.
[in]property_idThe property id.
[in]permissionThe type of permission that needs to be interpreted.
[out]errorLog error messages.
Returns
Whether the property permission is supported.

◆ ob_device_get_int_property_range()

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

Get the integer type of device property range.

Parameters
[in]deviceThe device object.
[in]property_idThe property id.
[out]errorLog error messages.
Returns
The property range.

◆ ob_device_get_float_property_range()

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

Get the float type of device property range.

Parameters
[in]deviceThe device object.
[in]property_idThe property id.
[out]errorLog error messages.
Returns
The property range.

◆ ob_device_get_bool_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 boolean type of device property range.

Parameters
[in]deviceThe device object.
[in]property_idThe property id.
[out]errorLog error messages.
Returns
The property range.

◆ ob_device_write_ahb()

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

Write to an AHB register.

Parameters
[in]deviceThe device object.
regThe register to be written.
maskThe mask.
valueThe value to be written.
[out]errorLog error messages.

◆ ob_device_read_ahb()

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

Read an AHB register.

Parameters
[in]deviceThe device object.
regThe register to be read.
maskThe mask.
valueThe value to be read.
[out]errorLog error messages.

◆ ob_device_write_i2c()

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 to an I2C register.

Parameters
[in]deviceThe device object.
module_idThe I2C module id to be written.
regThe register to be written.
maskThe mask.
valueThe value to be written.
[out]errorLog error messages.

◆ ob_device_read_i2c()

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 an I2C register.

Parameters
[in]deviceThe device object.
module_idThe id of the I2C module to be read.
regThe register to be read.
maskThe mask.
valueThe value to be read.
[out]errorLog error messages.

◆ ob_device_write_flash()

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]deviceThe device object.
offsetThe flash offset address.
dataThe property data to be written.
data_sizeThe size of the property to be written.
cbThe set data callback.
[in]asyncWhether to execute asynchronously.
[in]user_dataUser-defined data that will be returned in the callback.
[out]errorLog error messages.

◆ ob_device_read_flash()

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]deviceThe device object.
offsetThe flash offset address.
data_sizeThe size of the data to be read.
cbThe read flash data and progress callback.
[in]asyncWhether to execute asynchronously.
[in]user_dataUser-defined data that will be returned in the callback.
[out]errorLog error messages.

◆ ob_device_write_customer_data()

void ob_device_write_customer_data ( ob_device device,
const void *  data,
uint32_t  data_size,
ob_error **  error 
)

Set customer data.

Parameters
[in]deviceThe device object.
[in]dataThe property data to be set.
[in]data_sizeThe size of the property to be set,the maximum length cannot exceed 65532 bytes.
[out]errorLog error messages.

◆ ob_device_read_customer_data()

void ob_device_read_customer_data ( ob_device device,
void *  data,
uint32_t *  data_size,
ob_error **  error 
)

Get customer data of a device property.

Parameters
[in]deviceThe device object.
[out]dataThe obtained property data.
[out]data_sizeThe size of the obtained property data.
[out]errorLog error messages.

◆ ob_device_upgrade()

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

Upgrade the device firmware.

Parameters
[in]deviceThe device object.
[in]pathThe firmware path.
[in]callbackThe firmware upgrade progress callback.
[in]asyncWhether to execute asynchronously.
[in]user_dataUser-defined data that will be returned in the callback.
[out]errorLog error messages.

◆ ob_device_upgrade_from_data()

void ob_device_upgrade_from_data ( ob_device device,
const char *  file_data,
uint32_t  file_size,
ob_device_upgrade_callback  callback,
bool  async,
void *  user_data,
ob_error **  error 
)

Upgrade the device firmware.

Parameters
[in]deviceThe device object.
[in]file_dataThe firmware file data.
[in]file_sizeThe firmware file size.
[in]callbackThe firmware upgrade progress callback.
[in]asyncWhether to execute asynchronously.
[in]user_dataUser-defined data that will be returned in the callback.
[out]errorLog error messages.

◆ ob_device_get_device_state()

ob_device_state ob_device_get_device_state ( ob_device device,
ob_error **  error 
)

Get the current device status.

Parameters
[in]deviceThe device object.
[out]errorLog error messages.
Returns
ob_device_state The device state information.

◆ ob_device_state_changed()

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

Monitor device state changes.

Parameters
[in]deviceThe device object.
[in]callbackThe callback function to be called when the device status changes.
[in]user_dataUser-defined data that will be returned in the callback.
[out]errorLog error messages.

◆ ob_device_send_file_to_destination()

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 on the device.

Parameters
[in]deviceThe device object.
[in]file_pathThe source file path.
[in]dst_pathThe destination path on the device.
[in]callbackThe file sending progress callback.
[in]asyncWhether to execute asynchronously.
[in]user_dataUser-defined data that will be returned in the callback.
[out]errorLog error messages.

◆ ob_device_activate_authorization()

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

Verify the device authorization code.

Parameters
[in]deviceThe device object.
[in]auth_codeThe authorization code.
[out]errorLog error messages.
Returns
bool Whether the activation is successful.

◆ ob_device_write_authorization_code()

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

Write the device authorization code.

Parameters
[in]deviceThe device object.
[in]auth_codeThe authorization code.
[out]errorLog error messages.

◆ ob_device_get_calibration_camera_param_list()

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 on the device.

Attention
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]deviceThe device object.
[out]errorLog error messages.
Returns
ob_camera_param_list The camera parameter list.

◆ ob_device_get_current_depth_work_mode()

ob_depth_work_mode ob_device_get_current_depth_work_mode ( ob_device device,
ob_error **  error 
)

Get the current depth work mode.

Parameters
[in]deviceThe device object.
[out]errorLog error messages.
Returns
ob_depth_work_mode The current depth work mode.

◆ ob_device_switch_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 the depth work mode by ob_depth_work_mode. Prefer to use ob_device_switch_depth_work_mode_by_name to switch depth mode when the complete name of the depth work mode is known.

Parameters
[in]deviceThe device object.
[in]work_modeThe depth work mode from ob_depth_work_mode_list which is returned by ob_device_get_depth_work_mode_list.
[out]errorLog error messages.
Returns
ob_status The switch result. OB_STATUS_OK: success, other failed.

◆ ob_device_switch_depth_work_mode_by_name()

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

Switch the depth work mode by work mode name.

Parameters
[in]deviceThe device object.
[in]mode_nameThe depth work mode name which is equal to ob_depth_work_mode.name.
[out]errorLog error messages.
Returns
ob_status The switch result. OB_STATUS_OK: success, other failed.

◆ ob_device_get_depth_work_mode_list()

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

Request the list of supported depth work modes.

Parameters
[in]deviceThe device object.
[out]errorLog error messages.
Returns
ob_depth_work_mode_list The list of ob_depth_work_mode.

◆ ob_device_reboot()

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_get_sync_config()

ob_device_sync_config ob_device_get_sync_config ( ob_device device,
ob_error **  error 
)

Get the current device synchronization configuration.

Device synchronization: including exposure synchronization function and multi-camera synchronization function of different sensors within a single machine

Parameters
[in]deviceDevice object
[out]errorLog error messages
Returns
ob_device_sync_config Return the device synchronization configuration

◆ ob_device_set_sync_config()

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

Set the device synchronization configuration.

Used to configure the exposure synchronization function and multi-camera synchronization function of different sensors in a single machine

Attention
Calling this function will directly write the configuration to the device Flash, and it will still take effect after the device restarts. To avoid affecting the Flash lifespan, do not update the configuration frequently.
Parameters
[in]deviceDevice object
[out]device_sync_configDevice synchronization configuration
[out]errorLog error messages

◆ ob_device_info_name()

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* return the device name

◆ ob_device_info_pid()

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 return the device pid

◆ ob_device_info_vid()

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 return device vid

◆ ob_device_info_uid()

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* return device uid

◆ ob_device_info_serial_number()

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* return device serial number

◆ ob_device_info_firmware_version()

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 return the firmware version number

◆ ob_device_info_usb_type()

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

Get the USB connection type (DEPRECATED)

Parameters
[in]infoDevice Information
[out]errorLog error messages
Returns
const char* The USB connection type

◆ ob_device_info_connection_type()

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

Get the device connection type.

Parameters
[in]infoDevice Information
[out]errorLog error messages
Returns
const char* The connection type,currently supports:"USB", "USB1.0", "USB1.1", "USB2.0", "USB2.1", "USB3.0", "USB3.1", "USB3.2", "Ethernet"

◆ ob_device_info_ip_address()

const char * ob_device_info_ip_address ( ob_device_info info,
ob_error **  error 
)

Get the device IP address.

Attention
Only valid for network devices, otherwise it will return "0.0.0.0"
Parameters
infoDevice Information
errorLog error messages
Returns
const char* The IP address,such as "192.168.1.10"

◆ ob_device_info_hardware_version()

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

Get the hardware version number.

Parameters
[in]infoDevice Information
[out]errorLog error messages
Returns
const char* The hardware version number

◆ ob_device_info_get_extension_info()

const char * ob_device_info_get_extension_info ( ob_device_info info,
ob_error **  error 
)

Get the device extension information.

Parameters
[in]infoDevice Information
[out]errorLog error messages
Returns
const char* The device extension information

◆ ob_device_info_supported_min_sdk_version()

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* The minimum SDK version number supported by the device

◆ ob_device_info_asicName()

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

Get the chip name.

Parameters
[in]infoDevice Information
[out]errorLog error messages
Returns
const char* The ASIC name

◆ ob_device_info_device_type()

ob_device_type ob_device_info_device_type ( ob_device_info info,
ob_error **  error 
)

Get the device type.

Parameters
[in]infoDevice Information
[out]errorLog error messages
Returns
ob_device_type The device type

◆ ob_camera_param_list_count()

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 The number of lists

◆ ob_camera_param_list_get_param()

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 the camera parameter list.

Parameters
param_listCamera parameter list
indexParameter index
errorLog error messages
Returns
ob_camera_param The camera parameters. Since it returns the structure object directly, there is no need to provide a delete interface.

◆ ob_delete_camera_param_list()

void ob_delete_camera_param_list ( ob_camera_param_list param_list,
ob_error **  error 
)

Delete the camera parameter list.

Parameters
param_listCamera parameter list
errorLog error messages

◆ ob_depth_work_mode_list_count()

uint32_t ob_depth_work_mode_list_count ( ob_depth_work_mode_list work_mode_list,
ob_error **  error 
)

◆ ob_depth_work_mode_list_get_item()

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 structure containing a list of ob_depth_work_mode
[in]indexIndex of the target ob_depth_work_mode
[out]errorLog error messages
Returns
ob_depth_work_mode

◆ ob_delete_depth_work_mode_list()

void ob_delete_depth_work_mode_list ( ob_depth_work_mode_list work_mode_list,
ob_error **  error 
)

Free the resources of ob_depth_work_mode_list.

Parameters
[in]work_mode_listData structure containing a list of ob_depth_work_mode
[out]errorLog error messages

◆ ob_delete_data_bundle()

void ob_delete_data_bundle ( ob_data_bundle data_bundle,
ob_error **  error 
)

Free the resources of data_bundle which come from OrbbecSDK's API.

Parameters
data_bundleData bundle
[out]errorLog error messages

◆ ob_device_is_global_timestamp_supported()

bool ob_device_is_global_timestamp_supported ( ob_device device,
ob_error **  error 
)

Check if the device supports global timestamp.

Parameters
[in]deviceThe device object.
[out]errorLog error messages.
Returns
bool Whether the device supports global timestamp.

◆ ob_device_load_depth_filter_config()

void ob_device_load_depth_filter_config ( ob_device device,
const char *  file_path,
ob_error **  error 
)

Load depth filter config from file.

Parameters
[in]deviceThe device object.
[in]file_pathPath of the config file.
[out]errorLog error messages.

◆ ob_device_reset_default_depth_filter_config()

void ob_device_reset_default_depth_filter_config ( ob_device device,
ob_error **  error 
)

Reset depth filter config to device default define.

Parameters
[in]deviceThe device object.
[out]errorLog error messages.

◆ ob_device_get_current_preset_name()

const char * ob_device_get_current_preset_name ( ob_device device,
ob_error **  error 
)

The preset mean a set of parameters or configurations that can be applied to the device to achieve a specific effect or function.

@breif Get the current preset name.

Parameters
deviceThe device object.
errorLog error messages.
Returns
The current preset name, it should be one of the preset names returned by ob_device_get_available_preset_list.

◆ ob_device_load_preset()

void ob_device_load_preset ( ob_device device,
const char *  preset_name,
ob_error **  error 
)

Get the available preset list.

Attention
After loading the preset, the settings in the preset will set to the device immediately. Therefore, it is recommended to re-read the device settings to update the user program temporarily.
Parameters
deviceThe device object.
preset_nameLog error messages. The name should be one of the preset names returned by ob_device_get_available_preset_list.
errorLog error messages.

◆ ob_device_load_preset_from_json_file()

void ob_device_load_preset_from_json_file ( ob_device device,
const char *  json_file_path,
ob_error **  error 
)

Load preset from json string.

After loading the custom preset, the settings in the custom preset will set to the device immediately.

After loading the custom preset, the available preset list will be appended with the custom preset and named as the file name.

Parameters
deviceThe device object.
json_file_pathThe json file path.
errorLog error messages.

◆ ob_device_export_current_settings_as_preset_json_file()

void ob_device_export_current_settings_as_preset_json_file ( ob_device device,
const char *  json_file_path,
ob_error **  error 
)

Export current settings as a preset json file.

After exporting the custom preset, the available preset list will be appended with the custom preset and named as the file name.

Parameters
deviceThe device object.
json_file_pathThe json file path.
errorLog error messages.

◆ ob_device_get_available_preset_list()

ob_device_preset_list * ob_device_get_available_preset_list ( ob_device device,
ob_error **  error 
)

Get the available preset list.

Parameters
deviceThe device object.
errorLog error messages.
Returns
The available preset list.

◆ ob_delete_preset_list()

void ob_delete_preset_list ( ob_device_preset_list preset_list,
ob_error **  error 
)

Delete the available preset list.

Parameters
preset_listThe available preset list.
errorLog error messages.

◆ ob_device_preset_list_count()

uint32_t ob_device_preset_list_count ( ob_device_preset_list preset_list,
ob_error **  error 
)

Get the number of preset in the preset list.

Parameters
preset_listThe available preset list.
errorLog error messages.
Returns
The number of preset in the preset list.

◆ ob_device_preset_list_get_name()

const char * ob_device_preset_list_get_name ( ob_device_preset_list preset_list,
uint32_t  index,
ob_error **  error 
)

Get the name of the preset in the preset list.

Parameters
preset_listThe available preset list.
indexThe index of the preset in the preset list.
errorLog error messages.
Returns
The name of the preset in the preset list.

◆ ob_device_preset_list_has_preset()

bool ob_device_preset_list_has_preset ( ob_device_preset_list preset_list,
const char *  preset_name,
ob_error **  error 
)

Check if the preset list has the preset.

Parameters
preset_listThe available preset list.
preset_nameThe name of the preset.
errorLog error messages.
Returns
Whether the preset list has the preset. If true, the preset list has the preset. If false, the preset list does not have the preset.