OrbbecSDK 1.10.18
OrbbecSDK: Software-Development-Kit for Orbbec 3D Cameras
Loading...
Searching...
No Matches
Device.h
Go to the documentation of this file.
1
5#pragma once
6
7#ifdef __cplusplus
8extern "C" {
9#endif
10
11#include "ObTypes.h"
12#include "Property.h"
13#include "MultipleDevices.h"
14
23
32const char *ob_device_list_get_device_name(ob_device_list *list, uint32_t index, ob_error **error);
33
42int ob_device_list_get_device_pid(ob_device_list *list, uint32_t index, ob_error **error);
43
52int ob_device_list_get_device_vid(ob_device_list *list, uint32_t index, ob_error **error);
53
62const char *ob_device_list_get_device_uid(ob_device_list *list, uint32_t index, ob_error **error);
63
72const char *ob_device_list_get_device_serial_number(ob_device_list *list, uint32_t index, ob_error **error);
73
83const char *ob_device_list_get_device_connection_type(ob_device_list *list, uint32_t index, ob_error **error);
84
95const char *ob_device_list_get_device_ip_address(ob_device_list *list, uint32_t index, ob_error **error);
96
105const char *ob_device_list_get_extension_info(ob_device_list *list, uint32_t index, ob_error **error);
106
119
131
146
153void ob_delete_device(ob_device *device, ob_error **error);
154
162
170
179
188
198
207void ob_device_set_int_property(ob_device *device, ob_property_id property_id, int32_t property, ob_error **error);
208
217int32_t ob_device_get_int_property(ob_device *device, ob_property_id property_id, ob_error **error);
218
227void ob_device_set_float_property(ob_device *device, ob_property_id property_id, float property, ob_error **error);
228
238
247void ob_device_set_bool_property(ob_device *device, ob_property_id property_id, bool property, ob_error **error);
248
258
268void ob_device_set_structured_data(ob_device *device, ob_property_id property_id, const void *data, uint32_t data_size, ob_error **error);
269
279void ob_device_get_structured_data(ob_device *device, ob_property_id property_id, void *data, uint32_t *data_size, ob_error **error);
280
291void 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,
292 ob_error **error);
293
303
316void 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,
317 ob_error **error);
318
329void 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);
330
339
349
358
368
379
389
399
409
419void ob_device_write_ahb(ob_device *device, uint32_t reg, uint32_t mask, uint32_t value, ob_error **error);
420
430void ob_device_read_ahb(ob_device *device, uint32_t reg, uint32_t mask, uint32_t *value, ob_error **error);
431
442void ob_device_write_i2c(ob_device *device, uint32_t module_id, uint32_t reg, uint32_t mask, uint32_t value, ob_error **error);
443
454void ob_device_read_i2c(ob_device *device, uint32_t module_id, uint32_t reg, uint32_t mask, uint32_t *value, ob_error **error);
455
468void 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,
469 ob_error **error);
470
482void 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);
483
492void ob_device_write_customer_data(ob_device *device, const void *data, uint32_t data_size, ob_error **error);
493
502void ob_device_read_customer_data(ob_device *device, void *data, uint32_t *data_size, ob_error **error);
503
514void ob_device_upgrade(ob_device *device, const char *path, ob_device_upgrade_callback callback, bool async, void *user_data, ob_error **error);
515
527void 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,
528 ob_error **error);
529
539
548void ob_device_state_changed(ob_device *device, ob_device_state_callback callback, void *user_data, ob_error **error);
549
561void ob_device_send_file_to_destination(ob_device *device, const char *file_path, const char *dst_path, ob_file_send_callback callback, bool async,
562 void *user_data, ob_error **error);
563
573bool ob_device_activate_authorization(ob_device *device, const char *auth_code, ob_error **error);
574
582void ob_device_write_authorization_code(ob_device *device, const char *auth_code, ob_error **error);
583
597
607
619
630
640
649void ob_device_reboot(ob_device *device, ob_error **error);
650
661
673void ob_device_set_sync_config(ob_device *device, ob_device_sync_config device_sync_config, ob_error **error);
674
682const char *ob_device_info_name(ob_device_info *info, ob_error **error);
683
692
701
709const char *ob_device_info_uid(ob_device_info *info, ob_error **error);
710
719
728
737
746
757
766
775
784
793
802
811
821
829
839
850
859
867
876
883void ob_device_load_depth_filter_config(ob_device *device, const char *file_path, ob_error **error);
884
891
901
911void ob_device_load_preset(ob_device *device, const char *preset_name, ob_error **error);
912
922void ob_device_load_preset_from_json_file(ob_device *device, const char *json_file_path, ob_error **error);
923
932void ob_device_export_current_settings_as_preset_json_file(ob_device *device, const char *json_file_path, ob_error **error);
933
942
950
959
968const char *ob_device_preset_list_get_name(ob_device_preset_list *preset_list, uint32_t index, ob_error **error);
969
978bool ob_device_preset_list_has_preset(ob_device_preset_list *preset_list, const char *preset_name, ob_error **error);
979
980#ifdef __cplusplus
981}
982#endif
void ob_device_write_authorization_code(ob_device *device, const char *auth_code, ob_error **error)
Write the device authorization code.
uint32_t ob_camera_param_list_count(ob_camera_param_list *param_list, ob_error **error)
Get the number of camera parameter lists.
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_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.
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.
uint32_t ob_device_list_device_count(ob_device_list *list, ob_error **error)
Get the number of devices.
void ob_device_state_changed(ob_device *device, ob_device_state_callback callback, void *user_data, ob_error **error)
Monitor device state changes.
const char * ob_device_info_name(ob_device_info *info, ob_error **error)
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)
uint32_t ob_depth_work_mode_list_count(ob_depth_work_mode_list *work_mode_list, ob_error **error)
void ob_device_set_sync_config(ob_device *device, ob_device_sync_config device_sync_config, ob_error **error)
Set the device synchronization configuration.
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_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_device_read_ahb(ob_device *device, uint32_t reg, uint32_t mask, uint32_t *value, ob_error **error)
Read an AHB register.
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.
const char * ob_device_info_uid(ob_device_info *info, ob_error **error)
Get device uid.
ob_device * ob_device_list_get_device_by_uid(ob_device_list *list, const char *uid, ob_error **error)
Create device by uid.
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.
const char * ob_device_list_get_device_ip_address(ob_device_list *list, uint32_t index, ob_error **error)
Get device ip address.
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.
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.
bool ob_device_is_global_timestamp_supported(ob_device *device, ob_error **error)
Check if the device supports global timestamp.
void ob_delete_device_info(ob_device_info *info, ob_error **error)
Delete device information.
const char * ob_device_list_get_device_connection_type(ob_device_list *list, uint32_t index, ob_error **error)
Get device connection type.
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_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.
void ob_delete_camera_param_list(ob_camera_param_list *param_list, ob_error **error)
Delete the camera parameter list.
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.
const char * ob_device_info_serial_number(ob_device_info *info, ob_error **error)
Get device serial number.
ob_device_state ob_device_get_device_state(ob_device *device, ob_error **error)
Get the current device status.
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 ...
bool ob_device_get_bool_property(ob_device *device, ob_property_id property_id, ob_error **error)
Get a boolean type of device property.
bool ob_device_activate_authorization(ob_device *device, const char *auth_code, ob_error **error)
Verify the device authorization code.
int ob_device_info_vid(ob_device_info *info, ob_error **error)
Get device vid.
void ob_device_load_preset_from_json_file(ob_device *device, const char *json_file_path, ob_error **error)
Load preset from json string.
ob_device_preset_list * ob_device_get_available_preset_list(ob_device *device, ob_error **error)
Get the available preset list.
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.
ob_device_info * ob_device_get_device_info(ob_device *device, ob_error **error)
Get device information.
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.
int ob_device_info_pid(ob_device_info *info, ob_error **error)
Get device pid.
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.
const char * ob_device_list_get_extension_info(ob_device_list *list, uint32_t index, ob_error **error)
Get the device extension information.
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_set_int_property(ob_device *device, ob_property_id property_id, int32_t property, ob_error **error)
Set an integer type of 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.
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_info_connection_type(ob_device_info *info, ob_error **error)
Get the device connection type.
const char * ob_device_info_get_extension_info(ob_device_info *info, ob_error **error)
Get the device extension information.
ob_sensor * ob_device_get_sensor(ob_device *device, ob_sensor_type type, ob_error **error)
Get a device's sensor.
void ob_delete_device(ob_device *device, ob_error **error)
Delete a device.
void ob_delete_preset_list(ob_device_preset_list *preset_list, ob_error **error)
Delete the available preset list.
void ob_device_load_preset(ob_device *device, const char *preset_name, ob_error **error)
Get the available preset list.
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_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_read_customer_data(ob_device *device, void *data, uint32_t *data_size, ob_error **error)
Get customer data of a device property.
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.
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_n...
void ob_device_reboot(ob_device *device, ob_error **error)
Device reboot.
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 * ob_device_list_get_device(ob_device_list *list, uint32_t index, ob_error **error)
Create a device.
void ob_device_reset_default_depth_filter_config(ob_device *device, ob_error **error)
Reset depth filter config to device default define.
ob_device * ob_device_list_get_device_by_serial_number(ob_device_list *list, const char *serial_number, ob_error **error)
Create a device.
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.
const char * ob_device_info_hardware_version(ob_device_info *info, ob_error **error)
Get the hardware version number.
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.
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.
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.
void ob_device_write_customer_data(ob_device *device, const void *data, uint32_t data_size, ob_error **error)
Set customer data.
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.
ob_sensor_list * ob_device_get_sensor_list(ob_device *device, ob_error **error)
List all sensors.
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.
int ob_device_list_get_device_pid(ob_device_list *list, uint32_t index, ob_error **error)
Get the pid of the specified device.
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.
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.
ob_device_type ob_device_info_device_type(ob_device_info *info, ob_error **error)
Get the device type.
ob_depth_work_mode ob_device_get_current_depth_work_mode(ob_device *device, ob_error **error)
Get the current depth work mode.
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.
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.
void ob_delete_device_list(ob_device_list *list, ob_error **error)
Delete a device list.
ob_device_sync_config ob_device_get_sync_config(ob_device *device, ob_error **error)
Get the current device synchronization configuration.
void ob_device_load_depth_filter_config(ob_device *device, const char *file_path, ob_error **error)
Load depth filter config from file.
const char * ob_device_info_ip_address(ob_device_info *info, ob_error **error)
Get the device IP address.
const char * ob_device_info_firmware_version(ob_device_info *info, ob_error **error)
Get the firmware version number.
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].
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_info_usb_type(ob_device_info *info, ob_error **error)
Get the USB connection type (DEPRECATED)
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.
const char * ob_device_info_asicName(ob_device_info *info, ob_error **error)
Get the chip name.
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_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_float_property(ob_device *device, ob_property_id property_id, float property, ob_error **error)
Set a float type of device property.
This file contains the multiple devices related API witch is used to control the synchronization betw...
Provide structs commonly used in the SDK, enumerating constant definitions.
void(* ob_get_data_callback)(ob_data_tran_state state, ob_data_chunk *dataChunk, void *user_data)
Callback for reading data.
Definition ObTypes.h:1730
struct DeviceImpl ob_device
Definition ObTypes.h:55
struct DeviceInfoImpl ob_device_info
Definition ObTypes.h:56
enum OBDeviceType ob_device_type
void(* ob_file_send_callback)(ob_file_tran_state state, const char *message, uint8_t percent, void *user_data)
Callback for file transfer.
Definition ObTypes.h:1693
enum OB_CMD_VERSION ob_cmd_version
struct SensorListImpl ob_sensor_list
Definition ObTypes.h:60
void(* ob_device_upgrade_callback)(ob_upgrade_state state, const char *message, uint8_t percent, void *user_data)
Callback for firmware upgrade.
Definition ObTypes.h:1703
struct DevicePresetListImpl ob_device_preset_list
Definition ObTypes.h:72
struct DeviceListImpl ob_device_list
Definition ObTypes.h:57
struct SensorImpl ob_sensor
Definition ObTypes.h:59
uint64_t ob_device_state
Definition ObTypes.h:644
enum OBSensorType ob_sensor_type
struct CameraParamListImpl ob_camera_param_list
Definition ObTypes.h:58
void(* ob_set_data_callback)(ob_data_tran_state state, uint8_t percent, void *user_data)
Callback for writing data.
Definition ObTypes.h:1721
enum OBStatus ob_status
struct OBDepthWorkModeListImpl ob_depth_work_mode_list
Definition ObTypes.h:69
void(* ob_device_state_callback)(ob_device_state state, const char *message, void *user_data)
Callback for device status.
Definition ObTypes.h:1712
enum OBPermissionType ob_permission_type
Control command property list maintenance.
enum OBPropertyID ob_property_id
Structure for boolean range.
Definition ObTypes.h:369
Structure for camera parameters.
Definition ObTypes.h:462
Internal API for future publication.
Definition ObTypes.h:1083
Depth work mode.
Definition ObTypes.h:954
Device synchronization configuration.
Definition ObTypes.h:898
Structure for float range.
Definition ObTypes.h:336
Structure for integer range.
Definition ObTypes.h:325
Used to describe the characteristics of each property.
Definition Property.h:764
Control command protocol version number.
Definition ObTypes.h:1037
The error class exposed by the SDK, users can get detailed error information according to the error.
Definition ObTypes.h:151