OrbbecSDK  1.5.7
OrbbecSDK: Software-Development-Kit for Orbbec 3D-Sensor devices
Device.h
Go to the documentation of this file.
1 
10 #pragma once
11 
12 #ifdef __cplusplus
13 extern "C" {
14 #endif
15 
16 #include "ObTypes.h"
17 #include "Property.h"
18 
34 uint32_t ob_device_list_device_count(ob_device_list *list, ob_error **error);
35 
53 const char *ob_device_list_get_device_name(ob_device_list *list, uint32_t index, ob_error **error);
54 
72 int ob_device_list_get_device_pid(ob_device_list *list, uint32_t index, ob_error **error);
73 
91 int ob_device_list_get_device_vid(ob_device_list *list, uint32_t index, ob_error **error);
92 
110 const char *ob_device_list_get_device_uid(ob_device_list *list, uint32_t index, ob_error **error);
111 
129 const char *ob_device_list_get_device_serial_number(ob_device_list *list, uint32_t index, ob_error **error);
130 
150 ob_device *ob_device_list_get_device(ob_device_list *list, uint32_t index, ob_error **error);
151 
171 ob_device *ob_device_list_get_device_by_serial_number(ob_device_list *list, const char *serial_number, ob_error **error);
172 
192 ob_device *ob_device_list_get_device_by_uid(ob_device_list *list, const char *uid, ob_error **error);
193 
207 void ob_delete_device(ob_device *device, ob_error **error);
208 
222 void ob_delete_device_info(ob_device_info *info, ob_error **error);
223 
237 void ob_delete_device_list(ob_device_list *list, ob_error **error);
238 
255 
272 
308 void ob_device_set_int_property(ob_device *device, ob_property_id property_id, int32_t property, ob_error **error);
309 
327 int32_t ob_device_get_int_property(ob_device *device, ob_property_id property_id, ob_error **error);
328 
346 void ob_device_set_float_property(ob_device *device, ob_property_id property_id, float property, ob_error **error);
347 
365 float ob_device_get_float_property(ob_device *device, ob_property_id property_id, ob_error **error);
366 
384 void ob_device_set_bool_property(ob_device *device, ob_property_id property_id, bool property, ob_error **error);
385 
403 bool ob_device_get_bool_property(ob_device *device, ob_property_id property_id, ob_error **error);
404 
424 void ob_device_set_structured_data(ob_device *device, ob_property_id property_id, const void *data, uint32_t data_size, ob_error **error);
425 
445 void ob_device_get_structured_data(ob_device *device, ob_property_id property_id, void *data, uint32_t *data_size, ob_error **error);
446 
470 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,
471  ob_error **error);
472 
489 
515 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,
516  ob_error **error);
517 
539 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);
540 
559 
578 
595 
613 ob_property_item ob_device_get_supported_property(ob_device *device, uint32_t index, ob_error **error);
614 
634 bool ob_device_is_property_supported(ob_device *device, ob_property_id property_id, ob_permission_type permission, ob_error **error);
635 
654 
672 
691 
711 void ob_device_write_ahb(ob_device *device, uint32_t reg, uint32_t mask, uint32_t value, ob_error **error);
712 
732 void ob_device_read_ahb(ob_device *device, uint32_t reg, uint32_t mask, uint32_t *value, ob_error **error);
733 
755 void ob_device_write_i2c(ob_device *device, uint32_t module_id, uint32_t reg, uint32_t mask, uint32_t value, ob_error **error);
756 
778 void ob_device_read_i2c(ob_device *device, uint32_t module_id, uint32_t reg, uint32_t mask, uint32_t *value, ob_error **error);
779 
805 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,
806  ob_error **error);
807 
831 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);
832 
848 uint64_t ob_device_sync_device_time(ob_device *device, ob_error **error);
849 
871 void ob_device_upgrade(ob_device *device, const char *path, ob_device_upgrade_callback callback, bool async, void *user_data, ob_error **error);
872 
885 
903 void ob_device_state_changed(ob_device *device, ob_device_state_callback callback, void *user_data, ob_error **error);
904 
928 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,
929  void *user_data, ob_error **error);
930 
948 bool ob_device_activate_authorization(ob_device *device, const char *auth_code, ob_error **error);
949 
965 void ob_device_write_authorization_code(ob_device *device, const char *auth_code, ob_error **error);
966 
986 
1001 
1019 
1036 ob_status ob_device_switch_depth_work_mode_by_name(ob_device *device, const char *mode_name, ob_error **error);
1037 
1052 
1070 void ob_device_reboot(ob_device *device, ob_error **error);
1071 
1081 
1092 void ob_device_set_sync_config(ob_device *device, ob_device_sync_config device_sync_config, ob_error **error);
1093 
1109 const char *ob_device_info_name(ob_device_info *info, ob_error **error);
1110 
1126 int ob_device_info_pid(ob_device_info *info, ob_error **error);
1127 
1143 int ob_device_info_vid(ob_device_info *info, ob_error **error);
1144 
1160 const char *ob_device_info_uid(ob_device_info *info, ob_error **error);
1161 
1177 const char *ob_device_info_serial_number(ob_device_info *info, ob_error **error);
1178 
1194 const char *ob_device_info_firmware_version(ob_device_info *info, ob_error **error);
1195 
1211 const char *ob_device_info_usb_type(ob_device_info *info, ob_error **error);
1212 
1228 const char *ob_device_info_connection_type(ob_device_info *info, ob_error **error);
1229 
1245 const char *ob_device_info_hardware_version(ob_device_info *info, ob_error **error);
1246 
1261 
1275 const char *ob_device_info_asicName(ob_device_info *info, ob_error **error);
1276 
1291 
1307 uint32_t ob_camera_param_list_count(ob_camera_param_list *param_list, ob_error **error);
1308 
1326 ob_camera_param ob_camera_param_list_get_param(ob_camera_param_list *param_list, uint32_t index, ob_error **error);
1327 
1341 void ob_delete_camera_param_list(ob_camera_param_list *param_list, ob_error **error);
1342 
1357 uint32_t ob_depth_work_mode_list_count(ob_depth_work_mode_list *work_mode_list, ob_error **error);
1358 
1376 
1389 void ob_delete_depth_work_mode_list(ob_depth_work_mode_list *work_mode_list, ob_error **error);
1390 
1403 void ob_delete_data_bundle(ob_data_bundle *data_bundle, ob_error **error);
1404 
1405 #ifdef __cplusplus
1406 }
1407 #endif
int ob_device_list_get_device_pid(ob_device_list *list, uint32_t index, ob_error **error)
Get the pid of the specified device.
const char * ob_device_info_name(ob_device_info *info, ob_error **error)
Get device name.
ob_cmd_version ob_device_get_cmd_version(ob_device *device, ob_property_id property_id, ob_error **error)
Get cmdVersion of property.
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.
void ob_delete_device_list(ob_device_list *list, ob_error **error)
Delete device list.
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.
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.
const char * ob_device_info_asicName(ob_device_info *info, ob_error **error)
Get chip name.
void ob_delete_data_bundle(ob_data_bundle *data_bundle, ob_error **error)
Free resource of data_bundle which come from OrbbecSDK's API.
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.
ob_device_type ob_device_info_device_type(ob_device_info *info, ob_error **error)
Get device type.
struct SensorImpl ob_sensor
Definition: ObTypes.h:52
int32_t ob_device_get_int_property(ob_device *device, ob_property_id property_id, ob_error **error)
Get int type of device property.
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) ...
ob_depth_work_mode ob_device_get_current_depth_work_mode(ob_device *device, ob_error **error)
Get current depth work mode.
void ob_delete_device(ob_device *device, ob_error **error)
Delete device.
void ob_device_set_sync_config(ob_device *device, ob_device_sync_config device_sync_config, ob_error **error)
设置设备同步配置
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].
enum OBPropertyID ob_property_id
ob_device_sync_config ob_device_get_sync_config(ob_device *device, ob_error **error)
获取当前设备同步配置
const char * ob_device_info_serial_number(ob_device_info *info, ob_error **error)
Get device serial number.
uint32_t ob_camera_param_list_count(ob_camera_param_list *param_list, ob_error **error)
Get the number of camera parameter lists.
Float range structure.
Definition: ObTypes.h:358
const char * ob_device_info_uid(ob_device_info *info, ob_error **error)
Get device uid.
const char * ob_device_info_hardware_version(ob_device_info *info, ob_error **error)
Get hardware version number.
Control command property list maintenance.
void ob_delete_camera_param_list(ob_camera_param_list *param_list, ob_error **error)
Delete camera parameter list.
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.
enum OBSensorType ob_sensor_type
Command version of device property.
Definition: ObTypes.h:1083
ob_device * ob_device_list_get_device(ob_device_list *list, uint32_t index, ob_error **error)
Create device.
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.
ob_sensor * ob_device_get_sensor(ob_device *device, ob_sensor_type type, ob_error **error)
Get the device's sensors.
Provide structs commonly used in the SDK, enumerating constant definitions.
struct DeviceListImpl ob_device_list
Definition: ObTypes.h:50
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.
ob_sensor_list * ob_device_get_sensor_list(ob_device *device, ob_error **error)
List all sensors.
const char * ob_device_info_connection_type(ob_device_info *info, ob_error **error)
Get device connection type.
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.
struct DeviceImpl ob_device
Definition: ObTypes.h:48
const char * ob_device_info_usb_type(ob_device_info *info, ob_error **error)
Get usb connection type (DEPRECATED)
uint32_t ob_device_list_device_count(ob_device_list *list, ob_error **error)
Get the number of devices.
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.
void ob_delete_device_info(ob_device_info *info, ob_error **error)
Delete device information.
float ob_device_get_float_property(ob_device *device, ob_property_id property_id, ob_error **error)
Get float type of device property.
Camera parameters.
Definition: ObTypes.h:434
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.
int ob_device_list_get_device_vid(ob_device_list *list, uint32_t index, ob_error **error)
Get the vid of the specified device.
void(* ob_device_state_callback)(ob_device_state state, const char *message, void *user_data)
device status callback
Definition: ObTypes.h:1335
uint64_t ob_device_state
Definition: ObTypes.h:624
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.
void ob_device_read_ahb(ob_device *device, uint32_t reg, uint32_t mask, uint32_t *value, ob_error **error)
Read ahb register.
uint32_t ob_device_get_supported_property_count(ob_device *device, ob_error **error)
Get supported device properties count.
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_upgrade_callback)(ob_upgrade_state state, const char *message, uint8_t percent, void *user_data)
Firmware upgrade callback.
Definition: ObTypes.h:1320
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.
ob_device_info * ob_device_get_device_info(ob_device *device, ob_error **error)
Get device information.
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.
void ob_device_reboot(ob_device *device, ob_error **error)
Device reboot.
const char * ob_device_list_get_device_name(ob_device_list *list, uint32_t index, ob_error **error)
Get device name (DEPRECATED)
Depth work mode.
Definition: ObTypes.h:1070
struct DeviceInfoImpl ob_device_info
Definition: ObTypes.h:49
bool ob_device_get_bool_property(ob_device *device, ob_property_id property_id, ob_error **error)
Get bool type of device property.
ob_depth_work_mode_list * ob_device_get_depth_work_mode_list(ob_device *device, ob_error **error)
Request support depth work mode list.
ob_property_item ob_device_get_supported_property(ob_device *device, uint32_t index, ob_error **error)
Get supported device properties.
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.
struct SensorListImpl ob_sensor_list
Definition: ObTypes.h:53
ob_protocol_version ob_device_get_protocol_version(ob_device *device, ob_error **error)
Get the property protocol version.
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...
void ob_device_state_changed(ob_device *device, ob_device_state_callback callback, void *user_data, ob_error **error)
Monitor device state change.
enum OBPermissionType ob_permission_type
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.
const char * ob_device_info_firmware_version(ob_device_info *info, ob_error **error)
Get the firmware version number.
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.
void ob_device_write_ahb(ob_device *device, uint32_t reg, uint32_t mask, uint32_t value, ob_error **error)
ahb write register
enum OB_CMD_VERSION ob_cmd_version
bool ob_device_activate_authorization(ob_device *device, const char *auth_code, ob_error **error)
Verify device authorization code.
ob_data_bundle * ob_device_get_structured_data_ext(ob_device *device, ob_property_id property_id, ob_error **error)
Get property struct data.
void(* ob_get_data_callback)(ob_data_tran_state state, ob_data_chunk *dataChunk, void *user_data)
read data callback
Definition: ObTypes.h:1365
Used to describe the characteristics of each property.
Definition: Property.h:189
int ob_device_info_pid(ob_device_info *info, ob_error **error)
Get device pid.
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.
struct CameraParamListImpl ob_camera_param_list
Definition: ObTypes.h:51
void(* ob_set_data_callback)(ob_data_tran_state state, uint8_t percent, void *user_data)
Callback for writing data.
Definition: ObTypes.h:1350
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.
Boolean-scoped structure.
Definition: ObTypes.h:373
void ob_device_write_authorization_code(ob_device *device, const char *auth_code, ob_error **error)
Write device authorization code.
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.
void(* ob_file_send_callback)(ob_file_tran_state state, const char *message, uint8_t percent, void *user_data)
file transfer callback
Definition: ObTypes.h:1304
ob_device * ob_device_list_get_device_by_serial_number(ob_device_list *list, const char *serial_number, ob_error **error)
Create device.
ob_device_state ob_device_get_device_state(ob_device *device, ob_error **error)
Get current device status.
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.
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.
Device synchronization configuration.
Definition: ObTypes.h:959
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.
enum OBDeviceType ob_device_type
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_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.
struct OBDepthWorkModeListImpl ob_depth_work_mode_list
Definition: ObTypes.h:62
enum OBStatus ob_status
The error class exposed by the SDK, users can get detailed error information according to the erro...
Definition: ObTypes.h:142
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 ...
ob_device * ob_device_list_get_device_by_uid(ob_device_list *list, const char *uid, ob_error **error)
Create device.
int ob_device_info_vid(ob_device_info *info, ob_error **error)
Get device vid.
Int range structure.
Definition: ObTypes.h:343