update SDK to v1.7.1

This commit is contained in:
Joe Dong
2023-09-05 16:20:26 +08:00
parent 0d79cfe098
commit 99e1baee8d
21 changed files with 621 additions and 71 deletions
@@ -46,6 +46,20 @@ void ob_delete_context(ob_context *context, ob_error **error);
*/
ob_device_list *ob_query_device_list(ob_context *context, ob_error **error);
/**
* @brief Enable or disable network device enumeration
* @brief After enabling, the network device will be automatically discovered and can be retrieved through @ref ob_query_device_list. The default state can be
* set in the configuration file.
*
* @attention Network device enumeration is performed through the GVCP protocol. If the device is not in the same subnet as the host, it will be discovered but
* cannot be connected.
*
* @param[in] context Pointer to the context object
* @param[in] enable true to enable, false to disable
* @param[out] error Pointer to an error object that will be populated if an error occurs.
*/
void ob_enable_net_device_enumeration(ob_context *context, bool enable, ob_error **error);
/**
* @brief Create a network device object
*
@@ -69,14 +83,14 @@ ob_device *ob_create_net_device(ob_context *context, const char *address, uint16
void ob_set_device_changed_callback(ob_context *context, ob_device_changed_callback callback, void *user_data, ob_error **error);
/**
* @brief Activate the multi-device synchronization function to synchronize the clock of the created device (the device needs to support this function)
* @brief Activates device clock synchronization to synchronize the clock of the host and all created devices (if supported).
*
* @param[in] context Pointer to the context object
* @param[in] repeatInterval Synchronization time interval in milliseconds. If repeatInterval=0, synchronization will only occur once and will not be
* executed regularly.
* @param[out] error Pointer to an error object that will be populated if an error occurs during multi-device synchronization activation
* @param[in] repeatInterval The interval for auto-repeated synchronization, in milliseconds. If the value is 0, synchronization is performed only once.
* @param[out] error Pointer to an error object that will be populated if an error occurs during execution
*/
void ob_enable_multi_device_sync(ob_context *context, uint64_t repeatInterval, ob_error **error);
void ob_enable_device_clock_sync(ob_context *context, uint64_t repeatInterval, ob_error **error);
#define ob_enable_multi_device_sync ob_enable_device_clock_sync
/**
* @brief Free idle memory from the internal frame memory pool
@@ -10,6 +10,7 @@ extern "C" {
#include "ObTypes.h"
#include "Property.h"
#include "MultipleDevices.h"
/**
* @brief Get the number of devices
@@ -70,6 +71,29 @@ const char *ob_device_list_get_device_uid(ob_device_list *list, uint32_t index,
*/
const char *ob_device_list_get_device_serial_number(ob_device_list *list, uint32_t index, ob_error **error);
/**
* @brief Get device connection type
*
* @param[in] list Device list object
* @param[in] index Device index
* @param[out] error Log error messages
* @return const char* returns the device connection typecurrently supports"USB", "USB1.0", "USB1.1", "USB2.0", "USB2.1", "USB3.0", "USB3.1", "USB3.2",
* "Ethernet"
*/
const char *ob_device_list_get_device_connection_type(ob_device_list *list, uint32_t index, ob_error **error);
/**
* @brief Get device ip address
*
* @attention Only valid for network devices, otherwise it will return "0.0.0.0".
*
* @param list Device list object
* @param index Device index
* @param error Log error messages
* @return const char* returns the device ip addresssuch as "192.168.1.10"
*/
const char *ob_device_list_get_device_ip_address(ob_device_list *list, uint32_t index, ob_error **error);
/**
* @brief Create a device.
*
@@ -79,6 +103,7 @@ const char *ob_device_list_get_device_serial_number(ob_device_list *list, uint32
* @param[in] index The index of the device to create.
* @param[out] error Log error messages.
* @return ob_device* The created device.
*
*/
ob_device *ob_device_list_get_device(ob_device_list *list, uint32_t index, ob_error **error);
@@ -466,16 +491,6 @@ void ob_device_write_customer_data(ob_device *device, const void *data, uint32_t
*/
void ob_device_read_customer_data(ob_device *device, void *data, uint32_t *data_size, ob_error **error);
/**
* @brief Synchronize the device time (sets the device time to the local system time).
*
* @param[in] device The device object.
* @param[out] error Log error messages.
*
* @return uint64_t The command round trip time (rtt).
*/
uint64_t ob_device_sync_device_time(ob_device *device, ob_error **error);
/**
* @brief Upgrade the device firmware.
*
@@ -488,6 +503,20 @@ uint64_t ob_device_sync_device_time(ob_device *device, ob_error **error);
*/
void ob_device_upgrade(ob_device *device, const char *path, ob_device_upgrade_callback callback, bool async, void *user_data, ob_error **error);
/**
* @brief Upgrade the device firmware.
*
* @param[in] device The device object.
* @param[in] file_data The firmware file data.
* @param[in] file_size The firmware file size.
* @param[in] callback The firmware upgrade progress callback.
* @param[in] async Whether to execute asynchronously.
* @param[in] user_data User-defined data that will be returned in the callback.
* @param[out] error Log error messages.
*/
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);
/**
* @brief Get the current device status.
*
@@ -544,9 +573,10 @@ void ob_device_write_authorization_code(ob_device *device, const char *auth_code
/**
* @brief Get the original parameter list of camera calibration saved on the device.
* The parameters in the list do not correspond to the current open-stream configuration.
* You need to select the parameters according to the actual situation, and may need to do scaling, mirroring and other processing.
* Non-professional users are recommended to use the ob_pipeline_get_camera_param() interface.
*
* @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.
*
* @param[in] device The device object.
* @param[out] error Log error messages.
@@ -700,10 +730,21 @@ const char *ob_device_info_usb_type(ob_device_info *info, ob_error **error);
*
* @param[in] info Device Information
* @param[out] error Log error messages
* @return const char* The connection type
* @return const char* The connection typecurrently supports"USB", "USB1.0", "USB1.1", "USB2.0", "USB2.1", "USB3.0", "USB3.1", "USB3.2", "Ethernet"
*/
const char *ob_device_info_connection_type(ob_device_info *info, ob_error **error);
/**
* @brief Get the device IP address
*
* @attention Only valid for network devices, otherwise it will return "0.0.0.0"
*
* @param info Device Information
* @param error Log error messages
* @return const char* The IP addresssuch as "192.168.1.10"
*/
const char *ob_device_info_ip_address(ob_device_info *info, ob_error **error);
/**
* @brief Get the hardware version number
*
@@ -768,9 +809,18 @@ ob_camera_param ob_camera_param_list_get_param(ob_camera_param_list *param_list,
void ob_delete_camera_param_list(ob_camera_param_list *param_list, ob_error **error);
/**
* @brief Get the number of depth work modes that ob_depth_work_mode_list holds
* @brief Get Imu data.
*
* @param[in] work_mode_list Data structure containing a list of ob_depth_work_mode
* @param[in] device Device object
* @param[in] cb data callback
* @param[out] error Log error messages
*/
void ob_device_get_imu_data_ext(ob_device *device, ob_get_imu_data_callback cb, ob_error **error);
/**
* \if English
* @brief Get the depth work mode count that ob_depth_work_mode_list hold
* @param[in] work_mode_list data struct contain list of ob_depth_work_mode
* @param[out] error Log error messages
* @return The total number contained in ob_depth_work_mode_list
*
@@ -0,0 +1,124 @@
/**
* @file MultipleDevices.h
* @brief This file contains the multiple devices related API witch is used to control the synchronization between multiple devices and the synchronization
* between different sensor within single device.
* @brief The synchronization between multiple devices is complex, and different models have different synchronization modes and limitations. please refer to
* the product manual for details.
* @brief As the Depth and Infrared are the same sensor physically, the behavior of the Infrared is same as the Depth in the synchronization mode.
*/
#pragma once
#ifdef __cplusplus
extern "C" {
#endif
#include "ObTypes.h"
#include "Device.h"
/**
* @brief Get the supported multi device sync mode bitmap of the device.
* @brief For example, if the return value is 0b00001100, it means the device supports @ref OB_MULTI_DEVICE_SYNC_MODE_PRIMARY and @ref
* OB_MULTI_DEVICE_SYNC_MODE_SECONDARY. User can check the supported mode by the code:
* ```c
* if(supported_mode_bitmap & OB_MULTI_DEVICE_SYNC_MODE_FREE_RUN){
* //support OB_MULTI_DEVICE_SYNC_MODE_FREE_RUN
* }
* if(supported_mode_bitmap & OB_MULTI_DEVICE_SYNC_MODE_STANDALONE){
* //support OB_MULTI_DEVICE_SYNC_MODE_STANDALONE
* }
* // and so on
* ```
* @param[in] device The device handle.
* @param[out] error The error information.
* @return uint16_t return the supported multi device sync mode bitmap of the device.
*/
uint16_t ob_device_get_supported_multi_device_sync_mode_bitmap(ob_device *device, ob_error **error);
/**
* @brief set the multi device sync configuration of the device.
*
* @param[in] device The device handle.
* @param[in] config The multi device sync configuration.
* @param[out] error The error information.
*/
void ob_device_set_multi_device_sync_config(ob_device *device, const ob_multi_device_sync_config *config, ob_error **error);
/**
* @brief get the multi device sync configuration of the device.
*
* @param[in] device The device handle.
* @param[out] error The error information.
* @return ob_multi_device_sync_config return the multi device sync configuration of the device.
*/
ob_multi_device_sync_config ob_device_get_multi_device_sync_config(ob_device *device, ob_error **error);
/**
* @brief send the capture command to the device.
* @brief The device will start one time image capture after receiving the capture command when it is in the @ref OB_MULTI_DEVICE_SYNC_MODE_SOFTWARE_TRIGGERING
*
* @attention The frequency of the user call this function multiplied by the number of frames per trigger should be less than the frame rate of the stream. The
* number of frames per trigger can be set by @ref framesPerTriggerForTriggeringMode.
* @attention For some modelsreceive and execute the capture command will have a certain delay and performance consumption, so the frequency of calling this
* function should not be too high, please refer to the product manual for the specific supported frequency.
* @attention If the device is not in the @ref OB_MULTI_DEVICE_SYNC_MODE_HARDWARE_TRIGGERING mode, device will ignore the capture command.
*
* @param[in] device The device handle.
* @param[out] error The error information.
*/
void ob_device_trigger_capture(ob_device *device, ob_error **error);
/**
* @brief set the timestamp reset configuration of the device.
*
* @param[in] device The device handle.
* @param[in] config The timestamp reset configuration.
* @param[out] error The error information.
*/
void ob_device_set_timestamp_reset_config(ob_device *device, const ob_device_timestamp_reset_config *config, ob_error **error);
/**
* @brief get the timestamp reset configuration of the device.
*
* @param[in] device The device handle.
* @param[out] error The error information.
* @return ob_device_timestamp_reset_config return the timestamp reset configuration of the device.
*/
ob_device_timestamp_reset_config ob_device_get_timestamp_reset_config(ob_device *device, ob_error **error);
/**
* @brief send the timestamp reset command to the device.
* @brief The device will reset the timer for calculating the timestamp for output frames to 0 after receiving the timestamp reset command when the timestamp
* reset function is enabled. The timestamp reset function can be enabled by call @ref ob_device_set_timestamp_reset_config.
*
* @attention If the stream of the device is started, the timestamp of the continuous frames output by the stream will jump once after the timestamp reset.
* @attention Due to the timer of device is not high-accuracy, the timestamp of the continuous frames output by the stream will drift after a long time. User
* can call this function periodically to reset the timer to avoid the timestamp drift, the recommended interval time is 60 minutes.
*
* @param[in] device The device handle.
* @param[out] error The error information.
*/
void ob_device_timestamp_reset(ob_device *device, ob_error **error);
/**
* @brief Alias for @ref ob_device_timestamp_reset since it is more accurate.
*/
#define ob_device_timer_reset ob_device_timestamp_reset
/**
* @brief synchronize the timer of the device with the host.
* @brief After calling this function, the timer of the device will be synchronized with the host. User can call this function to multiple devices to
* synchronize all timers of the devices.
*
* @attention If the stream of the device is started, the timestamp of the continuous frames output by the stream will may jump once after the timer sync.
* @attention Due to the timer of device is not high-accuracy, the timestamp of the continuous frames output by the stream will drift after a long time. User
* can call this function periodically to synchronize the timer to avoid the timestamp drift, the recommended interval time is 60 minutes.
*
* @param[in] device The device handle.
* @param[out] error The error information.
*/
void ob_device_timer_sync_with_host(ob_device *device, ob_error **error);
#ifdef __cplusplus
} // extern "C"
#endif
+193 -21
View File
@@ -68,6 +68,17 @@ typedef struct RecorderImpl ob_recorder;
typedef struct PlaybackImpl ob_playback;
typedef struct OBDepthWorkModeListImpl ob_depth_work_mode_list;
/**
* @brief senddata or recdata return status type
*/
typedef enum {
HP_STATUS_OK = 0, /**< success*/
HP_STATUS_NO_DEVICE_FOUND = 1, /**< No device found*/
HP_STATUS_CONTROL_TRANSFER_FAILED = 2, /**< Transfer failed*/
HP_STATUS_UNKNOWN_ERROR = 0xffff, /**< Unknown error*/
} OBHPStatusCode,
ob_hp_status_code;
/**
* @brief the permission type of api or property
*/
@@ -210,7 +221,8 @@ typedef enum {
OB_FORMAT_Y14 = 24, /**< Y14 format, single channel 14-bit depth (SDK will unpack into Y16 by default) */
OB_FORMAT_BGRA = 25, /**< BGRA format */
OB_FORMAT_COMPRESSED = 26, /**< Compression format */
OB_FORMAT_UNKNOWN = 0xff, /**< Unknown format */
OB_FORMAT_RVL = 27, /**< RVL pressure test format (SDK will be unpacked into Y16 by default) */
OB_FORMAT_UNKNOWN = 0xff, /**< unknown format */
} OBFormat,
ob_format;
@@ -639,6 +651,7 @@ typedef struct {
/**
* @brief Sync mode
* @deprecated This define is deprecated, please use @ref ob_multi_device_sync_mode instead
*/
typedef enum {
/**
@@ -711,16 +724,9 @@ typedef enum {
} OBSyncMode,
ob_sync_mode, OB_SYNC_MODE;
// DEPRECATED: for compatibility, will be removed in the future
#define OB_SYNC_STOP OB_SYNC_MODE_CLOSE
#define OB_SYNC_SINGLE_MODE OB_SYNC_MODE_STANDALONE
#define OB_SYNC_ONLINE_HOST_MODE OB_SYNC_MODE_PRIMARY
#define OB_SYNC_ONLINE_SLAVE_MODE OB_SYNC_MODE_SECONDARY
#define OB_SYNC_ONLY_MCU_MODE OB_SYNC_MODE_PRIMARY_MCU_TRIGGER
#define OB_SYNC_ONLY_IR_MODE OB_SYNC_MODE_PRIMARY_IR_TRIGGER
/**
* @brief Device synchronization configuration
* @deprecated This structure is deprecated, please use @ref ob_multi_device_sync_config instead
*/
typedef struct {
/**
@@ -773,19 +779,8 @@ typedef struct {
* @brief Device number. Users can mark the device with this number
*/
uint16_t deviceId;
} OBDeviceSyncConfig, ob_device_sync_config, OB_DEVICE_SYNC_CONFIG;
// DEPRECATED: for compatibility will be removed in the future
#define OBMultiDeviceSyncConfig OBDeviceSyncConfig
#define ob_multi_device_sync_config ob_device_sync_config
#define OB_MULTI_DEVICE_SYNC_CONFIG OB_DEVICE_SYNC_CONFIG
// #define tofPhaseDelay irTriggerSignalInDelay
// #define rgbPhaseDelay rgbTriggerSignalInDelay
// #define outPhaseDelay deviceTriggerSignalOutDelay
// #define outOCPolarity deviceTriggerSignalOutPolarity
// #define mcuHostFps mcuTriggerFrequency
// #define curDevId deviceId
/**
* @brief Depth work mode
*/
@@ -1016,6 +1011,181 @@ typedef enum {
} OB_DEVICE_DEVELOPMENT_MODE,
OBDeviceDevelopmentMode, ob_device_development_mode;
/**
* @brief The synchronization mode of the device.
*/
typedef enum {
/**
* @brief free run mode
* @brief The device does not synchronize with other devices,
* @brief The Color and Depth can be set to different frame rates.
*/
OB_MULTI_DEVICE_SYNC_MODE_FREE_RUN = 1 << 0,
/**
* @brief standalone mode
* @brief The device does not synchronize with other devices.
* @brief The Color and Depth should be set to same frame rates, the Color and Depth will be synchronized.
*/
OB_MULTI_DEVICE_SYNC_MODE_STANDALONE = 1 << 1,
/**
* @brief primary mode
* @brief The device is the primary device in the multi-device system, it will output the trigger signal via VSYNC_OUT pin on synchronization port by
* default.
* @brief The Color and Depth should be set to same frame rates, the Color and Depth will be synchronized and can be adjusted by @ref colorDelayUs, @ref
* depthDelayUs or @ref trigger2ImageDelayUs.
*/
OB_MULTI_DEVICE_SYNC_MODE_PRIMARY = 1 << 2,
/**
* @brief secondary mode
* @brief The device is the secondary device in the multi-device system, it will receive the trigger signal via VSYNC_IN pin on synchronization port. It
* will out the trigger signal via VSYNC_OUT pin on synchronization port by default.
* @brief The Color and Depth should be set to same frame rates, the Color and Depth will be synchronized and can be adjusted by @ref colorDelayUs, @ref
* depthDelayUs or @ref trigger2ImageDelayUs.
* @brief After starting the stream, the device will wait for the trigger signal to start capturing images, and will stop capturing images when the trigger
* signal is stopped.
*
* @attention The frequency of the trigger signal should be same as the frame rate of the stream profile which is set when starting the stream.
*/
OB_MULTI_DEVICE_SYNC_MODE_SECONDARY = 1 << 3,
/**
* @brief secondary synced mode
* @brief The device is the secondary device in the multi-device system, it will receive the trigger signal via VSYNC_IN pin on synchronization port. It
* will out the trigger signal via VSYNC_OUT pin on synchronization port by default.
* @brief The Color and Depth should be set to same frame rates, the Color and Depth will be synchronized and can be adjusted by @ref colorDelayUs, @ref
* depthDelayUs or @ref trigger2ImageDelayUs.
* @brief After starting the stream, the device will be immediately start capturing images, and will adjust the capture time when the trigger signal is
* received to synchronize with the primary device. If the trigger signal is stopped, the device will still capture images.
*
* @attention The frequency of the trigger signal should be same as the frame rate of the stream profile which is set when starting the stream.
*/
OB_MULTI_DEVICE_SYNC_MODE_SECONDARY_SYNCED = 1 << 4,
/**
* @brief software triggering mode
* @brief The device will start one time image capture after receiving the capture command and will output the trigger signal via VSYNC_OUT pin by default.
* The capture command can be sent form host by call @ref ob_device_trigger_capture. The number of images captured each time can be set by @ref
* framesPerTriggerForTriggeringMode.
* @brief The Color and Depth should be set to same frame rates, the Color and Depth will be synchronized and can be adjusted by @ref colorDelayUs, @ref
* depthDelayUs or @ref trigger2ImageDelayUs.
*
* @brief The frequency of the user call @ref ob_device_trigger_capture to send the capture command multiplied by the number of frames per trigger should be
* less than the frame rate of the stream profile which is set when starting the stream.
*/
OB_MULTI_DEVICE_SYNC_MODE_SOFTWARE_TRIGGERING = 1 << 5,
/**
* @brief hardware triggering mode
* @brief The device will start one time image capture after receiving the trigger signal via VSYNC_IN pin on synchronization port and will output the
* trigger signal via VSYNC_OUT pin by default. The number of images captured each time can be set by @ref framesPerTriggerForTriggeringMode.
* @brief The Color and Depth should be set to same frame rates, the Color and Depth will be synchronized and can be adjusted by @ref colorDelayUs, @ref
* depthDelayUs or @ref trigger2ImageDelayUs.
*
* @attention The frequency of the trigger signal multiplied by the number of frames per trigger should be less than the frame rate of the stream profile
* which is set when starting the stream.
* @attention The trigger signal input via VSYNC_IN pin on synchronization port should be ouput by other device via VSYNC_OUT pin in hardware triggering
* mode or software triggering mode.
* @attention Due to different models may have different signal input requirements, please do not use different models to output trigger
* signal as input-trigger signal.
*/
OB_MULTI_DEVICE_SYNC_MODE_HARDWARE_TRIGGERING = 1 << 6,
} ob_multi_device_sync_mode,
OBMultiDeviceSyncMode;
/**
* @brief The synchronization configuration of the device.
*/
typedef struct {
/**
* @brief The sync mode of the device.
*
*/
ob_multi_device_sync_mode syncMode;
/**
* @brief The delay time of the depth image capture after receiving the capture command or trigger signal in microseconds.
*
* @attention This parameter is only valid for some models please refer to the product manual for details.
*/
int depthDelayUs;
/**
* @brief The delay time of the color image capture after receiving the capture command or trigger signal in microseconds.
*
* @attention This parameter is only valid for some models please refer to the product manual for details.
*/
int colorDelayUs;
/**
* @brief The delay time of the image capture after receiving the capture command or trigger signal in microseconds.
* @brief The depth and color images are captured synchronously as the product design and can not change the delay between the depth and color images.
*
* @attention This parameter is only valid for some models to replace @ref depthDelayUs and @ref colorDelayUs, please refer to the product manual for
* details.
*/
int trigger2ImageDelayUs;
/**
* @brief Trigger signal output enable flag.
* @brief After the trigger signal output is enabled, the trigger signal will be output when the capture command or trigger signal is received. User can
* adjust the delay time of the trigger signal output by @ref triggerSignalOutputDelayUs.
*
* @attention For some models, the trigger signal output is always enabled and cannot be disabled in some modes.
* @attention If device is in the @ref OB_MULTI_DEVICE_SYNC_MODE_FREE_RUN or @ref OB_MULTI_DEVICE_SYNC_MODE_STANDALONE mode, the trigger signal output is
* always disabled. Set this parameter to true will not take effect.
*/
bool triggerSignalOutputEnable;
/**
* @brief The delay time of the trigger signal output after receiving the capture command or trigger signal in microseconds.
*
*/
int triggerSignalOutputDelayUs;
/**
* @brief The number of frames per trigger in the triggering mode.
*
* @attention This parameter is only valid when the triggering mode is set to @ref OB_MULTI_DEVICE_SYNC_MODE_HARDWARE_TRIGGERING or @ref
* OB_MULTI_DEVICE_SYNC_MODE_SOFTWARE_TRIGGERING.
* @attention The trigger frequency multiplied by the number of frames per trigger cannot exceed the maximum frame rate of the stream profile which is set
* when starting the stream.
*/
int framesPerTriggerForTriggeringMode;
} ob_multi_device_sync_config, OBMultiDeviceSyncConfig;
/**
* @brief The timestamp reset configuration of the device.
*
*/
typedef struct {
/**
* @brief Whether to enable the timestamp reset function.
* @brief If the timestamp reset function is enabled, the timer for calculating the timestamp for output frames will be reset to 0 when the timestamp reset
* command or timestamp reset signal is received, and one timestamp reset signal will be output via TIMER_SYNC_OUT pin on synchronization port by default.
* The timestamp reset signal is input via TIMER_SYNC_IN pin on the synchronization port.
*
* @attention For some models, the timestamp reset function is always enabled and cannot be disabled.
*/
bool enable;
/**
* @brief The delay time of executing the timestamp reset function after receiving the command or signal in microseconds.
*/
int timestamp_reset_delay_us;
/**
* @brief the timestamp reset signal output enable flag.
*
* @attention For some models, the timestamp reset signal output is always enabled and cannot be disabled.
*/
bool timestamp_reset_signal_output_enable;
} ob_device_timestamp_reset_config, OBDeviceTimestampResetConfig;
/**
* @brief Callback for file transfer
*
@@ -1118,6 +1288,8 @@ typedef void(ob_frame_destroy_callback)(void *buffer, void *user_data);
*/
typedef void(ob_log_callback)(ob_log_severity severity, const char *message, void *user_data);
typedef void(ob_get_imu_data_callback)(const uint8_t *data, uint32_t dataLen);
/**
* @brief Check if sensor_type is an IR sensor
*
@@ -157,9 +157,23 @@ void ob_pipeline_switch_config(ob_pipeline *pipeline, ob_config *config, ob_erro
/**
* @brief Get the current camera parameters
*
* @attention If D2C is enabled, it will return the camera parameters after D2C. Otherwise, it will return the default parameters.
* @param[in] pipeline pipeline object
* @param[in] colorWidth color width
* @param[in] colorHeight color height
* @param[in] depthWidth depth width
* @param[in] depthHeight depth height
* @param[out] error Log error messages
* @return ob_camera_param returns camera internal parameters
*/
ob_camera_param ob_pipeline_get_camera_param_with_profile(ob_pipeline *pipeline, uint32_t colorWidth, uint32_t colorHeight, uint32_t depthWidth,
uint32_t depthHeight, ob_error **error);
/**
* \if English
* @brief Get current camera parameters
* @attention If D2C is enabled, it will return the camera parameters after D2C, if not, it will return to the default parameters
*
* @param[in] pipeline The pipeline object
* @param[in] pipeline pipeline object
* @param[out] error Log error messages
* @return ob_camera_param The camera internal parameters
*/
@@ -359,6 +359,11 @@ typedef enum {
*/
OB_PROP_CAPTURE_IMAGE_NUMBER_INTERVAL_INT = 136,
/*
* @brief Timer reset function enable
*/
OB_PROP_TIMER_RESET_ENABLE_BOOL = 140,
/**
* @brief Enable switch for USB3.0 repeated recognition on the device.
*/
@@ -429,6 +434,14 @@ typedef enum {
*/
OB_STRUCT_DEPTH_PRECISION_SUPPORT_LIST = 1045,
/**
* @brief Device network static ip config record
* @brief Using for get last static ip configwitch is record in device flash when user set static ip config
*
* @attention read only
*/
OB_STRUCT_DEVICE_STATIC_IP_CONFIG_RECORD = 1053,
/**
* @brief Color camera auto exposure
*/
@@ -540,7 +553,7 @@ typedef enum {
OB_PROP_IR_GAIN_INT = 2027,
/**
* @brief Select Infrared camera data source channel. If not support throw exception. 0 : IR stream from IR Left sensor; 1 : IR stream from IR Left sensor;
* @brief Select Infrared camera data source channel. If not support throw exception. 0 : IR stream from IR Left sensor; 1 : IR stream from IR Right sensor;
*/
OB_PROP_IR_CHANNEL_DATA_SOURCE_INT = 2028,
@@ -38,6 +38,17 @@ public:
*/
std::shared_ptr<DeviceList> queryDeviceList();
/**
* @brief enable or disable net device enumeration.
* @brief after enable, the net device will be discovered automatically and can be retrieved by @ref queryDeviceList. The default state can be set in the
* configuration file.
*
* @attention Net device enumeration by gvcp protocol, if the device is not in the same subnet as the host, it will be discovered but cannot be connected.
*
* @param[out] enable true to enable, false to disable
*/
void enableNetDeviceEnumeration(bool enable);
/**
* @brief Creates a network device object.
*
@@ -65,12 +76,12 @@ public:
void setDeviceChangedCallback(DeviceChangedCallback callback);
/**
* @brief Activates the multi-device synchronization function to synchronize the clock of the created device (the device needs to support this function).
* @brief Activates device clock synchronization to synchronize the clock of the host and all created devices (if supported).
*
* @param repeatInterval The synchronization time interval (unit: ms; if repeatInterval=0, it means that it will only be synchronized once and will not be
* executed regularly).
* @param repeatInterval The interval for auto-repeated synchronization, in milliseconds. If the value is 0, synchronization is performed only once.
*/
void enableMultiDeviceSync(uint64_t repeatInterval);
void enableDeviceClockSync(uint64_t repeatInterval);
#define enableMultiDeviceSync enableDeviceClockSync
/**
* @brief Frees idle memory from the internal frame memory pool.
@@ -299,13 +299,6 @@ public:
*/
bool isPropertySupported(OBPropertyID propertyId, OBPermissionType permission);
/**
* @brief Synchronize the device time (synchronize local system time to device)
*
* @return The command (round trip time, rtt)
*/
uint64_t syncDeviceTime();
/**
* @brief Upgrade the device firmware
*
@@ -315,6 +308,17 @@ public:
*/
void deviceUpgrade(const char *filePath, DeviceUpgradeCallback callback, bool async = true);
/**
* \if English
* @brief Upgrade the device firmware
*
* @param fileData Firmware file data
* @param fileSize Firmware file size
* @param callback Firmware upgrade progress and status callback
* @param async Whether to execute asynchronously
*/
void deviceUpgradeFromData(const char *fileData, uint32_t fileSize, DeviceUpgradeCallback callback, bool async = true);
/**
* @brief Send files to the specified path on the device side [Asynchronouscallback]
*
@@ -354,9 +358,11 @@ public:
void writeAuthorizationCode(const char *authCodeStr);
/**
* @brief Get the original parameter list of camera calibration saved in the device. The parameters in the list do not correspond to the current
* open-current 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 Pipeline::getCameraParam() interface.
* @brief Get the original parameter list of camera calibration saved in the device.
*
* @attention The parameters in the list do not correspond to the current open-current 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
* Pipeline::getCameraParam() interface.
*
* @return std::shared_ptr<CameraParamList> camera parameter list
*/
@@ -406,25 +412,123 @@ public:
*/
void reboot(uint32_t delayMs);
/**
* @brief Synchronize the device time (synchronize local system time to device)
* @deprecated This interface is deprecated, please use @ref timerSyncWithHost instead.
* @return The command (round trip time, rtt)
*/
DEPRECATED uint64_t syncDeviceTime();
/**
* @brief get the current device synchronization configuration
* @brief Device synchronization: including exposure synchronization function and multi-camera synchronization function of different sensors within a single
* machine
*
* @deprecated This interface is deprecated, please use @ref getMultiDeviceSyncConfig instead.
*
* @return OBDeviceSyncConfig return the device synchronization configuration
*/
OBDeviceSyncConfig getSyncConfig();
DEPRECATED OBDeviceSyncConfig getSyncConfig();
/**
* @brief Set the device synchronization configuration
* @brief Used to configure the exposure synchronization function and multi-camera synchronization function of different sensors in a single machine
*
* @deprecated This interface is deprecated, please use @ref setMultiDeviceSyncConfig instead.
*
* @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.
*
* @param deviceSyncConfig Device synchronization configuration
*/
void setSyncConfig(const OBDeviceSyncConfig &deviceSyncConfig);
DEPRECATED void setSyncConfig(const OBDeviceSyncConfig &deviceSyncConfig);
/**
* @brief Get the supported multi device sync mode bitmap of the device.
* @brief For example, if the return value is 0b00001100, it means the device supports @ref OB_MULTI_DEVICE_SYNC_MODE_PRIMARY and @ref
* OB_MULTI_DEVICE_SYNC_MODE_SECONDARY. User can check the supported mode by the code:
* ```c
* if(supported_mode_bitmap & OB_MULTI_DEVICE_SYNC_MODE_FREE_RUN){
* //support OB_MULTI_DEVICE_SYNC_MODE_FREE_RUN
* }
* if(supported_mode_bitmap & OB_MULTI_DEVICE_SYNC_MODE_STANDALONE){
* //support OB_MULTI_DEVICE_SYNC_MODE_STANDALONE
* }
* // and so on
* ```
* @return uint16_t return the supported multi device sync mode bitmap of the device.
*/
uint16_t getSupportedMultiDeviceSyncModeBitmap();
/**
* @brief set the multi device sync configuration of the device.
*
* @param[in] config The multi device sync configuration.
*/
void setMultiDeviceSyncConfig(const OBMultiDeviceSyncConfig &config);
/**
* @brief get the multi device sync configuration of the device.
*
* @return OBMultiDeviceSyncConfig return the multi device sync configuration of the device.
*/
OBMultiDeviceSyncConfig getMultiDeviceSyncConfig();
/**
* @brief send the capture command to the device.
* @brief The device will start one time image capture after receiving the capture command when it is in the @ref
* OB_MULTI_DEVICE_SYNC_MODE_SOFTWARE_TRIGGERING
*
* @attention The frequency of the user call this function multiplied by the number of frames per trigger should be less than the frame rate of the stream.
* The number of frames per trigger can be set by @ref framesPerTriggerForTriggeringMode.
* @attention For some modelsreceive and execute the capture command will have a certain delay and performance consumption, so the frequency of calling
* this function should not be too high, please refer to the product manual for the specific supported frequency.
* @attention If the device is not in the @ref OB_MULTI_DEVICE_SYNC_MODE_HARDWARE_TRIGGERING mode, device will ignore the capture command.
*/
void triggerCapture();
/**
* @brief set the timestamp reset configuration of the device.
*/
void setTimestampResetConfig(const OBDeviceTimestampResetConfig &config);
/**
* @brief get the timestamp reset configuration of the device.
*
* @return OBDeviceTimestampResetConfig return the timestamp reset configuration of the device.
*/
OBDeviceTimestampResetConfig getTimestampResetConfig();
/**
* @brief send the timestamp reset command to the device.
* @brief The device will reset the timer for calculating the timestamp for output frames to 0 after receiving the timestamp reset command when the
* timestamp reset function is enabled. The timestamp reset function can be enabled by call @ref ob_device_set_timestamp_reset_config.
* @brief Before calling this function, user should call @ref ob_device_set_timestamp_reset_config to disable the timestamp reset function (It is not
* required for some models, but it is still recommended to do so for code compatibility).
*
* @attention If the stream of the device is started, the timestamp of the continuous frames output by the stream will jump once after the timestamp reset.
* @attention Due to the timer of device is not high-accuracy, the timestamp of the continuous frames output by the stream will drift after a long time.
* User can call this function periodically to reset the timer to avoid the timestamp drift, the recommended interval time is 60 minutes.
*/
void timestampReset();
/**
* @brief Alias for @ref timestampReset since it is more accurate.
*/
#define timerReset timestampReset
/**
* @brief synchronize the timer of the device with the host.
* @brief After calling this function, the timer of the device will be synchronized with the host. User can call this function to multiple devices to
* synchronize all timers of the devices.
*
* @attention If the stream of the device is started, the timestamp of the continuous frames output by the stream will may jump once after the timer
* sync.
* @attention Due to the timer of device is not high-accuracy, the timestamp of the continuous frames output by the stream will drift after a long time.
* User can call this function periodically to synchronize the timer to avoid the timestamp drift, the recommended interval time is 60 minutes.
*
*/
void timerSyncWithHost();
friend class Pipeline;
friend class Recorder;
@@ -493,10 +597,20 @@ public:
/**
* @brief Get the connection type of the device
*
* @return const char* the connection type of the device
* @return const char* the connection type of the devicecurrently supports"USB", "USB1.0", "USB1.1", "USB2.0", "USB2.1", "USB3.0", "USB3.1", "USB3.2",
* "Ethernet"
*/
const char *connectionType();
/**
* @brief Get the IP address of the device
*
* @attention Only valid for network devices, otherwise it will return "0.0.0.0".
*
* @return const char* the IP address of the device, such as "192.168.1.10"
*/
const char *ipAddress();
/**
* @brief Get the version number of the hardware
*
@@ -512,7 +626,14 @@ public:
const char *supportedMinSdkVersion();
/**
* @brief Get the chip type name
* @brief Get the minimum version number of the SDK supported by the device
*
* @return const char* returns the minimum SDK version number supported by the device
*/
const char *extensionInfo();
/**
* @brief Get chip type name
*
* @return const char* the chip type name
*/
@@ -588,6 +709,24 @@ public:
*/
const char *serialNumber(uint32_t index);
/**
* @brief Get device connection type
*
* @param index device index
* @return const char* returns connection typecurrently supports"USB", "USB1.0", "USB1.1", "USB2.0", "USB2.1", "USB3.0", "USB3.1", "USB3.2", "Ethernet"
*/
const char *connectionType(uint32_t index);
/**
* @brief get the ip address of the device at the specified index
*
* @attention Only valid for network devices, otherwise it will return "0.0.0.0".
*
* @param index the index of the device
* @return const char* the ip address of the device
*/
const char *ipAddress(uint32_t index);
/**
* @brief Get the device object at the specified index
*
@@ -679,9 +818,9 @@ public:
* @brief Get the name of the depth work mode at the specified index
*
* @param index the index of the depth work mode
* @return std::string the name of the depth work mode
* @return const char* the name of the depth work mode
*/
std::string getName(uint32_t index);
const char *getName(uint32_t index);
/**
* @brief Get the OBDepthWorkMode object at the specified index
@@ -132,6 +132,19 @@ public:
*/
OBCameraParam getCameraParam();
/**
* @brief Get camera parameters by entering color and depth resolution
* @attention If D2C is enabled, it will return the camera parameters after D2C, if not, it will return to the default parameters
*
* @param colorWidth Width of color resolution
* @param colorHeight High of color resolution
* @param depthWidth Width of depth resolution
* @param depthHeight High of depth resolution
*
* @return OBCameraParam returns camera parameters
*/
OBCameraParam getCameraParamWithProfile(uint32_t colorWidth, uint32_t colorHeight, uint32_t depthWidth, uint32_t depthHeight);
/**
* @brief Return a list of D2C-enabled depth sensor resolutions corresponding to the input color sensor resolution
*
+1 -1
View File
@@ -1 +1 @@
libOrbbecSDK.so.1.6
libOrbbecSDK.so.1.7
@@ -1 +0,0 @@
libOrbbecSDK.so.1.6.3
+1
View File
@@ -0,0 +1 @@
libOrbbecSDK.so.1.7.1
+1 -1
View File
@@ -1 +1 @@
libOrbbecSDK.so.1.6
libOrbbecSDK.so.1.7
@@ -1 +0,0 @@
libOrbbecSDK.so.1.6.3
+1
View File
@@ -0,0 +1 @@
libOrbbecSDK.so.1.7.1
+1 -1
View File
@@ -1 +1 @@
libOrbbecSDK.so.1.6
libOrbbecSDK.so.1.7
@@ -1 +0,0 @@
libOrbbecSDK.so.1.6.3
+1
View File
@@ -0,0 +1 @@
libOrbbecSDK.so.1.7.1