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

- Main Page
- Namespaces
- Classes
- Files

- File List
- File Members

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
254 ob_device_info *ob_device_get_device_info(ob_device *device, ob_error **error);
255
271 ob_sensor_list *ob_device_get_sensor_list(ob_device *device, ob_error **error);
272
290 ob_sensor *ob_device_get_sensor(ob_device *device, ob_sensor_type type, ob_error **error);
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
488 ob_data_bundle *ob_device_get_structured_data_ext(ob_device *device, ob_property_id property_id, ob_error **error);
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
558 ob_protocol_version ob_device_get_protocol_version(ob_device *device, ob_error **error);
559
577 ob_cmd_version ob_device_get_cmd_version(ob_device *device, ob_property_id property_id, ob_error **error);
578
594 uint32_t ob_device_get_supported_property_count(ob_device *device, ob_error **error);
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
653 ob_int_property_range ob_device_get_int_property_range(ob_device *device, ob_property_id property_id, ob_error **error);
654
671 ob_float_property_range ob_device_get_float_property_range(ob_device *device, ob_property_id property_id, ob_error **error);
672
690 ob_bool_property_range ob_device_get_bool_property_range(ob_device *device, ob_property_id property_id, ob_error **error);
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
884 ob_device_state ob_device_get_device_state(ob_device *device, ob_error **error);
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
985 ob_camera_param_list *ob_device_get_calibration_camera_param_list(ob_device *device, ob_error **error);
986
1000 ob_depth_work_mode ob_device_get_current_depth_work_mode(ob_device *device, ob_error **error);
1001
1018 ob_status ob_device_switch_depth_work_mode(ob_device *device, const ob_depth_work_mode *work_mode, ob_error **error);
1019
1036 ob_status ob_device_switch_depth_work_mode_by_name(ob_device *device, const char *mode_name, ob_error **error);
1037
1051 ob_depth_work_mode_list *ob_device_get_depth_work_mode_list(ob_device *device, ob_error **error);
1052
1070 void ob_device_reboot(ob_device *device, ob_error **error);
1071
1080 ob_device_sync_config ob_device_get_sync_config(ob_device *device, ob_error **error);
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
1260 const char *ob_device_info_supported_min_sdk_version(ob_device_info *info, ob_error **error);
1261
1275 const char *ob_device_info_asicName(ob_device_info *info, ob_error **error);
1276
1290 ob_device_type ob_device_info_device_type(ob_device_info *info, ob_error **error);
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
1375 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);
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
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.
ob_device_info_name
const char * ob_device_info_name(ob_device_info *info, ob_error **error)
Get device name.
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 cmdVersion of property.
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 i2c register.
ob_delete_device_list
void ob_delete_device_list(ob_device_list *list, ob_error **error)
Delete device list.
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 int type of device property range.
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 bool type of device property.
ob_device_info_asicName
const char * ob_device_info_asicName(ob_device_info *info, ob_error **error)
Get chip name.
ob_delete_data_bundle
void ob_delete_data_bundle(ob_data_bundle *data_bundle, ob_error **error)
Free resource of data_bundle which come from OrbbecSDK&#39;s API.
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 type.
ob_device_info_device_type
ob_device_type ob_device_info_device_type(ob_device_info *info, ob_error **error)
Get device type.
ob_sensor
struct SensorImpl ob_sensor
Definition: ObTypes.h:52
ob_device_get_int_property
int32_t ob_device_get_int_property(ob_device *device, ob_property_id property_id, ob_error **error)
Get int type of device property.
ob_device_sync_device_time
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_device_get_current_depth_work_mode
ob_depth_work_mode ob_device_get_current_depth_work_mode(ob_device *device, ob_error **error)
Get current depth work mode.
ob_delete_device
void ob_delete_device(ob_device *device, ob_error **error)
Delete device.
ob_device_set_sync_config
void ob_device_set_sync_config(ob_device *device, ob_device_sync_config device_sync_config, ob_error **error)
设置设备同步配置
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].
ob_property_id
enum OBPropertyID ob_property_id
ob_device_get_sync_config
ob_device_sync_config ob_device_get_sync_config(ob_device *device, ob_error **error)
获取当前设备同步配置
ob_device_info_serial_number
const char * ob_device_info_serial_number(ob_device_info *info, ob_error **error)
Get device serial number.
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.
OBFloatPropertyRange
Float range structure.
Definition: ObTypes.h:358
ob_device_info_uid
const char * ob_device_info_uid(ob_device_info *info, ob_error **error)
Get device uid.
ob_device_info_hardware_version
const char * ob_device_info_hardware_version(ob_device_info *info, ob_error **error)
Get hardware version number.
Property.h
Control command property list maintenance.
ob_delete_camera_param_list
void ob_delete_camera_param_list(ob_camera_param_list *param_list, ob_error **error)
Delete camera parameter list.
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.
ob_sensor_type
enum OBSensorType ob_sensor_type
OBProtocolVersion
Command version of device property.
Definition: ObTypes.h:1083
ob_device_list_get_device
ob_device * ob_device_list_get_device(ob_device_list *list, uint32_t index, ob_error **error)
Create device.
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 depth work mode by work mode name.
ob_device_get_sensor
ob_sensor * ob_device_get_sensor(ob_device *device, ob_sensor_type type, ob_error **error)
Get the device&#39;s sensors.
ObTypes.h
Provide structs commonly used in the SDK, enumerating constant definitions.
ob_device_list
struct DeviceListImpl ob_device_list
Definition: ObTypes.h:50
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 type of device property.
ob_device_get_sensor_list
ob_sensor_list * ob_device_get_sensor_list(ob_device *device, ob_error **error)
List all sensors.
ob_device_info_connection_type
const char * ob_device_info_connection_type(ob_device_info *info, ob_error **error)
Get device connection type.
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 float type of device property.
ob_device
struct DeviceImpl ob_device
Definition: ObTypes.h:48
ob_device_info_usb_type
const char * ob_device_info_usb_type(ob_device_info *info, ob_error **error)
Get usb connection type (DEPRECATED)
ob_device_list_device_count
uint32_t ob_device_list_device_count(ob_device_list *list, ob_error **error)
Get the number of devices.
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)
Get the depth work mode count that ob_depth_work_mode_list hold.
ob_delete_device_info
void ob_delete_device_info(ob_device_info *info, ob_error **error)
Delete device information.
ob_device_get_float_property
float ob_device_get_float_property(ob_device *device, ob_property_id property_id, ob_error **error)
Get float type of device property.
OBCameraParam
Camera parameters.
Definition: ObTypes.h:434
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.
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.
ob_device_state_callback
void(* ob_device_state_callback)(ob_device_state state, const char *message, void *user_data)
device status callback
Definition: ObTypes.h:1335
ob_device_state
uint64_t ob_device_state
Definition: ObTypes.h:624
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 bool type of device property range.
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 ahb register.
ob_device_get_supported_property_count
uint32_t ob_device_get_supported_property_count(ob_device *device, ob_error **error)
Get supported device properties count.
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].
ob_device_upgrade_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
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.
ob_device_get_device_info
ob_device_info * ob_device_get_device_info(ob_device *device, ob_error **error)
Get device information.
OBDataBundle
Definition: ObTypes.h:1139
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 type of device property.
ob_device_reboot
void ob_device_reboot(ob_device *device, ob_error **error)
Device reboot.
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)
OBDepthWorkMode
Depth work mode.
Definition: ObTypes.h:1070
ob_device_info
struct DeviceInfoImpl ob_device_info
Definition: ObTypes.h:49
ob_device_get_bool_property
bool ob_device_get_bool_property(ob_device *device, ob_property_id property_id, ob_error **error)
Get bool type of device property.
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 support depth work mode list.
ob_device_get_supported_property
ob_property_item ob_device_get_supported_property(ob_device *device, uint32_t index, ob_error **error)
Get supported device properties.
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 int type of device property.
ob_sensor_list
struct SensorListImpl ob_sensor_list
Definition: ObTypes.h:53
ob_device_get_protocol_version
ob_protocol_version ob_device_get_protocol_version(ob_device *device, ob_error **error)
Get the property protocol version.
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 in the device. The parameters in the list...
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 change.
ob_permission_type
enum OBPermissionType ob_permission_type
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 device property permission is supported.
ob_device_info_firmware_version
const char * ob_device_info_firmware_version(ob_device_info *info, ob_error **error)
Get the firmware version number.
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 type.
ob_device_write_ahb
void ob_device_write_ahb(ob_device *device, uint32_t reg, uint32_t mask, uint32_t value, ob_error **error)
ahb write register
ob_cmd_version
enum OB_CMD_VERSION ob_cmd_version
ob_device_activate_authorization
bool ob_device_activate_authorization(ob_device *device, const char *auth_code, ob_error **error)
Verify device authorization code.
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 property struct data.
ob_get_data_callback
void(* ob_get_data_callback)(ob_data_tran_state state, ob_data_chunk *dataChunk, void *user_data)
read data callback
Definition: ObTypes.h:1365
OBPropertyItem
Used to describe the characteristics of each property.
Definition: Property.h:189
ob_device_info_pid
int ob_device_info_pid(ob_device_info *info, ob_error **error)
Get device pid.
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 resource of ob_depth_work_mode_list.
ob_camera_param_list
struct CameraParamListImpl ob_camera_param_list
Definition: ObTypes.h:51
ob_set_data_callback
void(* ob_set_data_callback)(ob_data_tran_state state, uint8_t percent, void *user_data)
Callback for writing data.
Definition: ObTypes.h:1350
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 of the device.
OBBoolPropertyRange
Boolean-scoped structure.
Definition: ObTypes.h:373
ob_device_write_authorization_code
void ob_device_write_authorization_code(ob_device *device, const char *auth_code, ob_error **error)
Write device authorization code.
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 i2c register.
ob_file_send_callback
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_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 device.
ob_device_get_device_state
ob_device_state ob_device_get_device_state(ob_device *device, ob_error **error)
Get current device status.
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)
Device firmware upgrade.
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 camera parameter list.
OBDeviceSyncConfig
Device synchronization configuration.
Definition: ObTypes.h:959
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 float type of device property range.
ob_device_type
enum OBDeviceType ob_device_type
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.
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 property struct data.
ob_depth_work_mode_list
struct OBDepthWorkModeListImpl ob_depth_work_mode_list
Definition: ObTypes.h:62
ob_status
enum OBStatus ob_status
ob_error
The error class exposed by the SDK, users can get detailed error information according to the erro...
Definition: ObTypes.h:142
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 depth work mode by ob_depth_work_mode. Prefer invoke ob_device_switch_depth_work_mode_by_name ...
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.
ob_device_info_vid
int ob_device_info_vid(ob_device_info *info, ob_error **error)
Get device vid.
OBIntPropertyRange
Int range structure.
Definition: ObTypes.h:343