diff --git a/CMakeLists.txt b/CMakeLists.txt index 0986683c..9171b944 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,5 +1,5 @@ cmake_minimum_required(VERSION 3.1.15) -project(OrbbecSDK VERSION 1.9.4 LANGUAGES C CXX) +project(OrbbecSDK VERSION 1.9.5 LANGUAGES C CXX) # Determine host platform include(${CMAKE_CURRENT_SOURCE_DIR}/cmake/DetermineHostPlatform.cmake) diff --git a/README.md b/README.md index d501a785..c0fc2c10 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # Orbbec SDK -![stability](https://img.shields.io/badge/stability-stable-green) ![version](https://img.shields.io/badge/version-1.9.4-green) +![stability](https://img.shields.io/badge/stability-stable-green) ![version](https://img.shields.io/badge/version-1.9.5-green) The Orbbec 3D camera product software development kit fully supports UVC, enabling driver-free plug-and-play. It provides both low-level and high-level APIs that are simple and easy to use, allowing developers to use it flexibly in different scenarios. @@ -19,38 +19,38 @@ If you are a user in China, it is recommended to use Gitee([gitee Repo](https:// ## Platform support -| Operating system | Requirement | Description | -| --- | --- | --- | -| Windows | - Windows 10 April 2018 (version 1803, operating system build 17134) release (x64) or higher
| The generation of the VS project depends on the installation of the VS version and the cmake version, and supports VS2015/vs2017/vs2019 | -| Linux | - Linux Ubuntu 16.04/18.04/20.04 (x64)
|Support GCC 7.5| -| Arm32|- Linux Ubuntu 16.04/18.04/20.04
| Support GCC 7.5 | -| Arm64 |- Linux Ubuntu 18.04/20.04
| Support GCC 7.5 | -| MacOS |- M series chip, 11.0 and above、intel x86 chip, 10.15 and above.
| supported hardware products: Gemini 2, Gemini 2 L, Astra 2,Gemini 2 XL, Femto Mega | +| Operating system | Requirement | Description | +|------------------|----------------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------| +| Windows | - Windows 10 April 2018 (version 1803, operating system build 17134) release (x64) or higher
| The generation of the VS project depends on the installation of the VS version and the cmake version, and supports VS2015/vs2017/vs2019 | +| Linux | - Linux Ubuntu 16.04/18.04/20.04 (x64)
| Support GCC 7.5 | +| Arm32 | - Linux Ubuntu 16.04/18.04/20.04
| Support GCC 7.5 | +| Arm64 | - Linux Ubuntu 18.04/20.04
| Support GCC 7.5 | +| MacOS | - M series chip, 11.0 and above、intel x86 chip, 10.15 and above.
| supported hardware products: Gemini 2, Gemini 2 L, Astra 2,Gemini 2 XL, Femto Mega | * Note: supported Arm platforms: jestson nano (arm64)、 AGX Orin(arm64)、Orin NX (arm64)、Orin Nano(arm64)、A311D (arm64), Raspberry Pi 4 (arm64), Raspberry Pi 3 (arm32), rk3399 (arm64), other Arm systems, may need to Cross-compile. * Windows 11, Ubuntu 22.04 and other Linux platforms may also be supported, but have not been fully tested. ## Product support -| **Products List** | **Firmware Version** | -| --- | --- | -| Femto Bolt | 1.0.6/1.0.9 | -| Femto Mega | 1.1.7/1.2.7 | -| Gemini 2 XL | Obox: V1.2.5 VL:1.4.54 | -| Astra 2 | 2.8.20 | -| Gemini 2 L | 1.4.32 | -| Gemini 2 | 1.4.60 /1.4.76 | -| Astra+ | 1.0.22/1.0.21/1.0.20/1.0.19 | -| Femto | 1.6.7 | -| Femto W | 1.1.8 | -| DaBai | 2436 | -| DaBai DCW | 2460 | -| DaBai DW | 2606 | -| Astra Mini Pro | 1007 | -| Gemini E | 3460 | -| Gemini E Lite | 3606 | -| Gemini | 3.0.18 | -| Astra Mini S Pro | 1.0.05 | +| **Products List** | **Firmware Version** | +|-------------------|-----------------------------| +| Femto Bolt | 1.0.6/1.0.9 | +| Femto Mega | 1.1.7/1.2.7 | +| Gemini 2 XL | Obox: V1.2.5 VL:1.4.54 | +| Astra 2 | 2.8.20 | +| Gemini 2 L | 1.4.32 | +| Gemini 2 | 1.4.60 /1.4.76 | +| Astra+ | 1.0.22/1.0.21/1.0.20/1.0.19 | +| Femto | 1.6.7 | +| Femto W | 1.1.8 | +| DaBai | 2436 | +| DaBai DCW | 2460 | +| DaBai DW | 2606 | +| Astra Mini Pro | 1007 | +| Gemini E | 3460 | +| Gemini E Lite | 3606 | +| Gemini | 3.0.18 | +| Astra Mini S Pro | 1.0.05 | @@ -118,7 +118,7 @@ Notes: On MacOS, sudo privileges are required. ``` bash # MacOS cd OrbbecSDK/build/bin # build output dir -sudo ./OBMultiStream +sudo ./OBMultiStream ``` The following image is the result of running MultiStream on the Gemini2 device. Other Devices run result maybe different. diff --git a/README_CN.md b/README_CN.md index 0bfdadf1..d0a1a90a 100644 --- a/README_CN.md +++ b/README_CN.md @@ -1,6 +1,6 @@ # OrbbecSDK -![stability](https://img.shields.io/badge/stability-stable-green) ![version](https://img.shields.io/badge/version-1.9.4-green) +![stability](https://img.shields.io/badge/stability-stable-green) ![version](https://img.shields.io/badge/version-1.9.5-green) Orbbec 3D 相机产品软件开发套件,全面支持 UVC,实现免驱动即插即用,提供低层和高层简单易用的 API,帮助开发者在不同场景下灵活使用。 @@ -18,13 +18,13 @@ Orbbec 3D 相机产品软件开发套件,全面支持 UVC,实现免驱动即 ## 支持平台 -| Operating system | Requirement | Description | -| --- | --- | --- | -| Windows | - Windows 10 April 2018 (version 1803, operating system build 17134) release (x64) or higher
| The generation of the VS project depends on the installation of the VS version and the cmake version, and supports VS2015/vs2017/vs2019 | -| Linux | - Linux Ubuntu 16.04/18.04/20.04 (x64)
|Support GCC 7.5| -| Arm32|- Linux Ubuntu 16.04/18.04/20.04
| Support GCC 7.5 | -| Arm64 |- Linux Ubuntu 18.04/20.04
| Support GCC 7.5 | -| MacOS |- M series chip, 11.0 and above、intel x86 chip, 10.15 and above.
| supported hardware products: Gemini 2, Gemini 2 L, Astra 2,Gemini 2 XL, Femto Mega | +| Operating system | Requirement | Description | +|------------------|----------------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------| +| Windows | - Windows 10 April 2018 (version 1803, operating system build 17134) release (x64) or higher
| The generation of the VS project depends on the installation of the VS version and the cmake version, and supports VS2015/vs2017/vs2019 | +| Linux | - Linux Ubuntu 16.04/18.04/20.04 (x64)
| Support GCC 7.5 | +| Arm32 | - Linux Ubuntu 16.04/18.04/20.04
| Support GCC 7.5 | +| Arm64 | - Linux Ubuntu 18.04/20.04
| Support GCC 7.5 | +| MacOS | - M series chip, 11.0 and above、intel x86 chip, 10.15 and above.
| supported hardware products: Gemini 2, Gemini 2 L, Astra 2,Gemini 2 XL, Femto Mega | * 注: 当前版本支持的Arm平台:jestson nano(arm64)、AGX Orin(arm64)、Orin NX (arm64)、Orin Nano(arm64)、A311D(arm64)、树莓派4(arm64)、树莓派3(arm32)、rk3399(arm64), 其它Arm系统,可能需要重新交叉编译。 @@ -32,14 +32,14 @@ Orbbec 3D 相机产品软件开发套件,全面支持 UVC,实现免驱动即 ## 支持产品 -| **产品列表** | **固件版本** | -| --- | --- | -| Femto Bolt | 1.0.6/1.0.9 | -| Femto Mega | 1.1.7/1.2.7 | -| Gemini 2 XL | Obox: V1.2.5 VL:1.4.54 | -| Astra 2 | 2.8.20 | -| Gemini 2 L | 1.4.32 | -| Gemini 2 | 1.4.60 /1.4.76 | +| **产品列表** | **固件版本** | +|------------------|-----------------------------| +| Femto Bolt | 1.0.6/1.0.9 | +| Femto Mega | 1.1.7/1.2.7 | +| Gemini 2 XL | Obox: V1.2.5 VL:1.4.54 | +| Astra 2 | 2.8.20 | +| Gemini 2 L | 1.4.32 | +| Gemini 2 | 1.4.60 /1.4.76 | | Astra+ | 1.0.22/1.0.21/1.0.20/1.0.19 | | Femto | 1.6.7 | | Femto W | 1.1.8 | diff --git a/doc/api/Chinese/Context_8h.html b/doc/api/Chinese/Context_8h.html index bc43a479..b32c0901 100755 --- a/doc/api/Chinese/Context_8h.html +++ b/doc/api/Chinese/Context_8h.html @@ -1,9 +1,10 @@ - - + + - - + + + OrbbecSDK: header_cn/libobsensor/h/Context.h 文件参考 @@ -11,9 +12,6 @@ - @@ -21,11 +19,10 @@
- + - @@ -34,41 +31,23 @@
-
OrbbecSDK -  1.9.4 +
+
OrbbecSDK 1.9.5
OrbbecSDK: 奥比中光 3D 相机开发套件
- + - - + + + +
- +
+
+
+
+
载入中...
+
搜索中...
+
未找到
+
+
+
@@ -103,65 +88,67 @@

浏览源代码.

-

+

宏定义

#define ob_enable_multi_device_sync   ob_enable_device_clock_sync
 
- - - - - - - + + + + + + - + - - - + + + - + - - - + + + - + - + - + - - + + - - + + - - + + - - + + - + - +

+

函数

ob_contextob_create_context (ob_error **error)
 创建上下文对象 更多...
 
ob_contextob_create_context_with_config (const char *config_path, ob_error **error)
 创建具有指定配置文件的上下文对象 更多...
 
ob_contextob_create_context (ob_error **error)
 创建上下文对象
 
ob_contextob_create_context_with_config (const char *config_path, ob_error **error)
 创建具有指定配置文件的上下文对象
 
void ob_delete_context (ob_context *context, ob_error **error)
 删除上下文对象 更多...
 删除上下文对象
 
ob_device_listob_query_device_list (ob_context *context, ob_error **error)
 获取枚举设备列表 更多...
 
ob_device_listob_query_device_list (ob_context *context, ob_error **error)
 获取枚举设备列表
 
void ob_enable_net_device_enumeration (ob_context *context, bool enable, ob_error **error)
 启用或禁用网络设备枚举 更多...
 启用或禁用网络设备枚举
 
ob_deviceob_create_net_device (ob_context *context, const char *address, uint16_t port, ob_error **error)
 创建网络设备对象 更多...
 
ob_deviceob_create_net_device (ob_context *context, const char *address, uint16_t port, ob_error **error)
 创建网络设备对象
 
void ob_set_device_changed_callback (ob_context *context, ob_device_changed_callback callback, void *user_data, ob_error **error)
 设置设备插拔回调函数 更多...
 设置设备插拔回调函数
 
void ob_enable_device_clock_sync (ob_context *context, uint64_t repeatInterval, ob_error **error)
 使能设备时钟同步以同步主机和所有已创建设备的时钟(如果支持)。 更多...
 使能设备时钟同步以同步主机和所有已创建设备的时钟(如果支持)。
 
void ob_free_idle_memory (ob_context *context, ob_error **error)
 从内部帧内存池中释放空闲内存 更多...
 从内部帧内存池中释放空闲内存
 
void ob_set_logger_severity (ob_log_severity severity, ob_error **error)
 设置全局日志等级 更多...
void ob_set_logger_severity (ob_log_severity severity, ob_error **error)
 设置全局日志等级
 
void ob_set_logger_to_file (ob_log_severity severity, const char *directory, ob_error **error)
 将日志输出设置为文件 更多...
void ob_set_logger_to_file (ob_log_severity severity, const char *directory, ob_error **error)
 将日志输出设置为文件
 
void ob_set_logger_callback (ob_log_severity severity, ob_log_callback callback, void *user_data, ob_error **error)
 设置日志的回调函数 更多...
void ob_set_logger_callback (ob_log_severity severity, ob_log_callback callback, void *user_data, ob_error **error)
 设置日志的回调函数
 
void ob_set_logger_to_console (ob_log_severity severity, ob_error **error)
 设置日志输出到控制台 更多...
void ob_set_logger_to_console (ob_log_severity severity, ob_error **error)
 设置日志输出到控制台
 
void ob_load_license (const char *filePath, const char *key, ob_error **error)
 加载 license 更多...
 加载 license
 
void ob_load_license_from_data (const char *data, uint32_t dataLen, const char *key, ob_error **error)
 从数据加载 license 更多...
 从数据加载 license
 

详细描述

context 是描述 SDK 的 runtime 一个管理类,负责 SDK 的资源申请与释放。 context 具备多设备的管理能力,负责枚举设备,监听设备回调,启用多设备同步等功能。

-

在文件 Context.h 中定义.

+

在文件 Context.h 中定义.

宏定义说明

- + +

◆ ob_enable_multi_device_sync

+
@@ -171,17 +158,19 @@
-

在文件 Context.h90 行定义.

+

在文件 Context.h90 行定义.

函数说明

- + +

◆ ob_create_context()

+
- + @@ -201,12 +190,14 @@

函数说明

- + +

◆ ob_create_context_with_config()

+
ob_context* ob_create_context ob_context * ob_create_context ( ob_error **  error)
- + @@ -237,7 +228,9 @@

函数说明

- + +

◆ ob_delete_context()

+
ob_context* ob_create_context_with_config ob_context * ob_create_context_with_config ( const char *  config_path,
@@ -272,12 +265,14 @@

函数说明

- + +

◆ ob_query_device_list()

+
- + @@ -308,7 +303,9 @@

函数说明

- + +

◆ ob_enable_net_device_enumeration()

+
ob_device_list* ob_query_device_list ob_device_list * ob_query_device_list ( ob_context context,
@@ -339,7 +336,7 @@

函数说明

启用或禁用网络设备枚举

-

启用后,网络设备将自动被发现,并且可以通过 ob_query_device_list 获取。默认状态可以在配置文件中设置。

+

启用后,网络设备将自动被发现,并且可以通过 ob_query_device_list 获取。默认状态可以在配置文件中设置。

注意
网络设备枚举通过 gvcp 协议,如果设备和主机不在同一子网,将被发现但无法连接。
参数
@@ -352,12 +349,14 @@

函数说明

- + +

◆ ob_create_net_device()

+
- + @@ -402,7 +401,9 @@

函数说明

- + +

◆ ob_set_device_changed_callback()

+
ob_device* ob_create_net_device ob_device * ob_create_net_device ( ob_context context,
@@ -452,7 +453,9 @@

函数说明

- + +

◆ ob_enable_device_clock_sync()

+
@@ -494,7 +497,9 @@

函数说明

- + +

◆ ob_free_idle_memory()

+
@@ -529,14 +534,16 @@

函数说明

- + +

◆ ob_set_logger_severity()

+
- + @@ -565,14 +572,16 @@

函数说明

- + +

◆ ob_set_logger_to_file()

+
void ob_set_logger_severity (ob_log_severity ob_log_severity  severity,
- + @@ -607,20 +616,22 @@

函数说明

- + +

◆ ob_set_logger_callback()

+
void ob_set_logger_to_file (ob_log_severity ob_log_severity  severity,
- + - + @@ -656,14 +667,16 @@

函数说明

- + +

◆ ob_set_logger_to_console()

+
void ob_set_logger_callback (ob_log_severity ob_log_severity  severity,
ob_log_callback ob_log_callback  callback,
- + @@ -691,7 +704,9 @@

函数说明

- + +

◆ ob_load_license()

+
void ob_set_logger_to_console (ob_log_severity ob_log_severity  severity,
@@ -733,7 +748,9 @@

函数说明

- + +

◆ ob_load_license_from_data()

+
@@ -785,9 +802,7 @@

函数说明

diff --git a/doc/api/Chinese/Context_8h_source.html b/doc/api/Chinese/Context_8h_source.html index 1e355f23..2dc40a78 100755 --- a/doc/api/Chinese/Context_8h_source.html +++ b/doc/api/Chinese/Context_8h_source.html @@ -1,9 +1,10 @@ - - + + - - + + +OrbbecSDK: header_cn/libobsensor/h/Context.h 源文件 @@ -11,9 +12,6 @@ - @@ -21,11 +19,10 @@
- + - @@ -34,41 +31,23 @@
-
OrbbecSDK -  1.9.4 +
+
OrbbecSDK 1.9.5
OrbbecSDK: 奥比中光 3D 相机开发套件
- + - - + + + +
- +
+
+
+
+
载入中...
+
搜索中...
+
未找到
+
+
+
-
-
Context.h
+
Context.h
-浏览该文件的文档.
1 
6 #pragma once
7 
8 #ifdef __cplusplus
9 extern "C" {
10 #endif
11 
12 #include "ObTypes.h"
13 
21 
29 ob_context *ob_create_context_with_config(const char *config_path, ob_error **error);
30 
37 void ob_delete_context(ob_context *context, ob_error **error);
38 
47 
58 void ob_enable_net_device_enumeration(ob_context *context, bool enable, ob_error **error);
59 
69 ob_device *ob_create_net_device(ob_context *context, const char *address, uint16_t port, ob_error **error);
70 
80 void ob_set_device_changed_callback(ob_context *context, ob_device_changed_callback callback, void *user_data, ob_error **error);
81 
89 void ob_enable_device_clock_sync(ob_context *context, uint64_t repeatInterval, ob_error **error);
90 #define ob_enable_multi_device_sync ob_enable_device_clock_sync
91 
98 void ob_free_idle_memory(ob_context *context, ob_error **error);
99 
108 void ob_set_logger_severity(ob_log_severity severity, ob_error **error);
109 
118 void ob_set_logger_to_file(ob_log_severity severity, const char *directory, ob_error **error);
119 
128 void ob_set_logger_callback(ob_log_severity severity, ob_log_callback callback, void *user_data, ob_error **error);
129 
136 void ob_set_logger_to_console(ob_log_severity severity, ob_error **error);
137 
145 void ob_load_license(const char *filePath, const char *key, ob_error **error);
146 
155 void ob_load_license_from_data(const char *data, uint32_t dataLen, const char *key, ob_error **error);
156 
157 #ifdef __cplusplus
158 }
159 #endif
void ob_set_logger_to_file(ob_log_severity severity, const char *directory, ob_error **error)
将日志输出设置为文件
-
void ob_enable_device_clock_sync(ob_context *context, uint64_t repeatInterval, ob_error **error)
使能设备时钟同步以同步主机和所有已创建设备的时钟(如果支持)。
-
void ob_load_license_from_data(const char *data, uint32_t dataLen, const char *key, ob_error **error)
从数据加载 license
-
ob_context * ob_create_context_with_config(const char *config_path, ob_error **error)
创建具有指定配置文件的上下文对象
-
void ob_load_license(const char *filePath, const char *key, ob_error **error)
加载 license
-
ob_device_list * ob_query_device_list(ob_context *context, ob_error **error)
获取枚举设备列表
-
void ob_enable_net_device_enumeration(ob_context *context, bool enable, ob_error **error)
启用或禁用网络设备枚举
-
提供 SDK 中常用的结构体,枚举常量定义。
-
ob_context * ob_create_context(ob_error **error)
创建上下文对象
-
struct DeviceListImpl ob_device_list
Definition: ObTypes.h:54
-
struct DeviceImpl ob_device
Definition: ObTypes.h:52
-
void(* ob_device_changed_callback)(ob_device_list *removed, ob_device_list *added, void *user_data)
设备变化(上下线)回调
Definition: ObTypes.h:1224
-
void ob_set_logger_to_console(ob_log_severity severity, ob_error **error)
设置日志输出到控制台
-
struct ContextImpl ob_context
Definition: ObTypes.h:51
-
void ob_delete_context(ob_context *context, ob_error **error)
删除上下文对象
-
void ob_set_logger_severity(ob_log_severity severity, ob_error **error)
设置全局日志等级
-
void ob_free_idle_memory(ob_context *context, ob_error **error)
从内部帧内存池中释放空闲内存
-
void ob_set_device_changed_callback(ob_context *context, ob_device_changed_callback callback, void *user_data, ob_error **error)
设置设备插拔回调函数
-
void( ob_log_callback)(ob_log_severity severity, const char *message, void *user_data)
接收日志回调
Definition: ObTypes.h:1262
-
void ob_set_logger_callback(ob_log_severity severity, ob_log_callback callback, void *user_data, ob_error **error)
设置日志的回调函数
-
ob_device * ob_create_net_device(ob_context *context, const char *address, uint16_t port, ob_error **error)
创建网络设备对象
-
enum OBLogSeverity ob_log_severity
-
SDK 暴露的错误类,用户可以根据该错误类,获取详细的错误信息
Definition: ObTypes.h:139
+浏览该文件的文档.
1
+
6#pragma once
+
7
+
8#ifdef __cplusplus
+
9extern "C" {
+
10#endif
+
11
+
12#include "ObTypes.h"
+
13
+ +
21
+
29ob_context *ob_create_context_with_config(const char *config_path, ob_error **error);
+
30
+
37void ob_delete_context(ob_context *context, ob_error **error);
+
38
+ +
47
+
58void ob_enable_net_device_enumeration(ob_context *context, bool enable, ob_error **error);
+
59
+
69ob_device *ob_create_net_device(ob_context *context, const char *address, uint16_t port, ob_error **error);
+
70
+
80void ob_set_device_changed_callback(ob_context *context, ob_device_changed_callback callback, void *user_data, ob_error **error);
+
81
+
89void ob_enable_device_clock_sync(ob_context *context, uint64_t repeatInterval, ob_error **error);
+
90#define ob_enable_multi_device_sync ob_enable_device_clock_sync
+
91
+
98void ob_free_idle_memory(ob_context *context, ob_error **error);
+
99
+ +
109
+
118void ob_set_logger_to_file(ob_log_severity severity, const char *directory, ob_error **error);
+
119
+
128void ob_set_logger_callback(ob_log_severity severity, ob_log_callback callback, void *user_data, ob_error **error);
+
129
+ +
137
+
145void ob_load_license(const char *filePath, const char *key, ob_error **error);
+
146
+
155void ob_load_license_from_data(const char *data, uint32_t dataLen, const char *key, ob_error **error);
+
156
+
157#ifdef __cplusplus
+
158}
+
159#endif
+
void ob_free_idle_memory(ob_context *context, ob_error **error)
从内部帧内存池中释放空闲内存
+
void ob_set_logger_callback(ob_log_severity severity, ob_log_callback callback, void *user_data, ob_error **error)
设置日志的回调函数
+
ob_device * ob_create_net_device(ob_context *context, const char *address, uint16_t port, ob_error **error)
创建网络设备对象
+
ob_context * ob_create_context_with_config(const char *config_path, ob_error **error)
创建具有指定配置文件的上下文对象
+
void ob_set_logger_to_console(ob_log_severity severity, ob_error **error)
设置日志输出到控制台
+
void ob_load_license(const char *filePath, const char *key, ob_error **error)
加载 license
+
void ob_set_logger_severity(ob_log_severity severity, ob_error **error)
设置全局日志等级
+
ob_device_list * ob_query_device_list(ob_context *context, ob_error **error)
获取枚举设备列表
+
ob_context * ob_create_context(ob_error **error)
创建上下文对象
+
void ob_set_logger_to_file(ob_log_severity severity, const char *directory, ob_error **error)
将日志输出设置为文件
+
void ob_load_license_from_data(const char *data, uint32_t dataLen, const char *key, ob_error **error)
从数据加载 license
+
void ob_set_device_changed_callback(ob_context *context, ob_device_changed_callback callback, void *user_data, ob_error **error)
设置设备插拔回调函数
+
void ob_delete_context(ob_context *context, ob_error **error)
删除上下文对象
+
void ob_enable_device_clock_sync(ob_context *context, uint64_t repeatInterval, ob_error **error)
使能设备时钟同步以同步主机和所有已创建设备的时钟(如果支持)。
+
void ob_enable_net_device_enumeration(ob_context *context, bool enable, ob_error **error)
启用或禁用网络设备枚举
+
提供 SDK 中常用的结构体,枚举常量定义。
+
void(* ob_device_changed_callback)(ob_device_list *removed, ob_device_list *added, void *user_data)
设备变化(上下线)回调
Definition ObTypes.h:1224
+
struct DeviceImpl ob_device
Definition ObTypes.h:52
+
enum OBLogSeverity ob_log_severity
+
void() ob_log_callback(ob_log_severity severity, const char *message, void *user_data)
接收日志回调
Definition ObTypes.h:1262
+
struct DeviceListImpl ob_device_list
Definition ObTypes.h:54
+
struct ContextImpl ob_context
Definition ObTypes.h:51
+
SDK 暴露的错误类,用户可以根据该错误类,获取详细的错误信息
Definition ObTypes.h:139
diff --git a/doc/api/Chinese/Context_8hpp.html b/doc/api/Chinese/Context_8hpp.html index ebaad7eb..d19f7aae 100755 --- a/doc/api/Chinese/Context_8hpp.html +++ b/doc/api/Chinese/Context_8hpp.html @@ -1,9 +1,10 @@ - - + + - - + + + OrbbecSDK: header_cn/libobsensor/hpp/Context.hpp 文件参考 @@ -11,9 +12,6 @@ - @@ -21,11 +19,10 @@
- + - @@ -34,41 +31,23 @@
-
OrbbecSDK -  1.9.4 +
+
OrbbecSDK 1.9.5
OrbbecSDK: 奥比中光 3D 相机开发套件
- + + + + - - +
- +
+
+
+
+
载入中...
+
搜索中...
+
未找到
+
+
+
-
-
Context.hpp 文件参考
+
Context.hpp 文件参考
@@ -106,18 +91,18 @@

浏览源代码.

- - +

+

class  ob::Context
 定义 Context 类, 用于获取设备列表,处理设备的回调,日志等级的设置操作 更多...
 定义 Context 类, 用于获取设备列表,处理设备的回调,日志等级的设置操作 更多...
 
- - +

+

命名空间

 ob
namespace  ob
 
- @@ -125,9 +110,11 @@

详细描述

SDK Context 类,底层 SDK 的入口,用于获取设备列表,处理设备的回调,日志等级的设置操作

-

在文件 Context.hpp 中定义.

+

在文件 Context.hpp 中定义.

宏定义说明

- + +

◆ enableMultiDeviceSync

+

+

宏定义

#define enableMultiDeviceSync   enableDeviceClockSync
 
@@ -137,16 +124,14 @@
-

在文件 Context.hpp83 行定义.

+

在文件 Context.hpp83 行定义.

diff --git a/doc/api/Chinese/Context_8hpp_source.html b/doc/api/Chinese/Context_8hpp_source.html index 42daaab2..c9b6d0b8 100755 --- a/doc/api/Chinese/Context_8hpp_source.html +++ b/doc/api/Chinese/Context_8hpp_source.html @@ -1,9 +1,10 @@ - - + + - - + + + OrbbecSDK: header_cn/libobsensor/hpp/Context.hpp 源文件 @@ -11,9 +12,6 @@ - @@ -21,11 +19,10 @@
- + - @@ -34,41 +31,23 @@
-
OrbbecSDK -  1.9.4 +
+
OrbbecSDK 1.9.5
OrbbecSDK: 奥比中光 3D 相机开发套件
- + - - + + + +
- +
+
+
+
+
载入中...
+
搜索中...
+
未找到
+
+
+
-
-
Context.hpp
+
Context.hpp
-浏览该文件的文档.
1 
5 #pragma once
6 
7 #include "Types.hpp"
8 
9 #include <functional>
10 #include <memory>
11 
12 struct ContextImpl;
13 
14 namespace ob {
15 class Device;
16 class DeviceInfo;
17 class DeviceList;
18 
24 private:
25  std::unique_ptr<ContextImpl> impl_;
26 
27 public:
32  Context(const char *configPath = "");
33  virtual ~Context() noexcept;
34 
40  std::shared_ptr<DeviceList> queryDeviceList();
41 
50  void enableNetDeviceEnumeration(bool enable);
51 
58  std::shared_ptr<Device> createNetDevice(const char *address, uint16_t port);
59 
66  void changeNetDeviceIpConfig(const char *deviceUid, const OBNetIpConfig &config);
67 
68  using DeviceChangedCallback = std::function<void(std::shared_ptr<DeviceList> removedList, std::shared_ptr<DeviceList> addedList)>;
69 
75  void setDeviceChangedCallback(DeviceChangedCallback callback);
76 
82  void enableDeviceClockSync(uint64_t repeatInterval);
83 #define enableMultiDeviceSync enableDeviceClockSync
84 
88  void freeIdleMemory();
89 
95  static void setLoggerSeverity(OBLogSeverity severity);
96 
103  static void setLoggerToFile(OBLogSeverity severity, const char *directory);
104 
110  static void setLoggerToConsole(OBLogSeverity severity);
111 
117  using LogCallback = std::function<void(OBLogSeverity severity, const char *logMsg)>;
118 
125  static void setLoggerToCallback(OBLogSeverity severity, LogCallback callback);
126 
133  static void loadLicense(const char *filePath, const char *key = OB_DEFAULT_DECRYPT_KEY);
134 
142  static void loadLicenseFromData(const char *data, uint32_t dataLen, const char *key = OB_DEFAULT_DECRYPT_KEY);
143 };
144 } // namespace ob
Definition: Context.hpp:14
-
定义 Device 类
Definition: Device.hpp:30
-
std::function< void(std::shared_ptr< DeviceList > removedList, std::shared_ptr< DeviceList > addedList)> DeviceChangedCallback
Definition: Context.hpp:68
-
OBLogSeverity
日志等级,等级越高,日志过滤越强
Definition: ObTypes.h:109
-
std::function< void(OBLogSeverity severity, const char *logMsg)> LogCallback
日志回调函数
Definition: Context.hpp:117
-
提供 SDK 的结构体、枚举常量定义(依赖 libobsensor/h/ObTypes.h)
-
网络设备的 IP 地址配置(IPv4)
Definition: ObTypes.h:880
-
描述设备信息的类,如设备名称,id,序列号等信息。
Definition: Device.hpp:552
-
表示设备列表的类
Definition: Device.hpp:667
-
定义 Context 类, 用于获取设备列表,处理设备的回调,日志等级的设置操作
Definition: Context.hpp:23
-
#define OB_DEFAULT_DECRYPT_KEY
默认解密密钥
Definition: ObTypes.h:1290
-
#define OB_EXTENSION_API
Definition: ObTypes.h:25
+浏览该文件的文档.
1
+
5#pragma once
+
6
+
7#include "Types.hpp"
+
8
+
9#include <functional>
+
10#include <memory>
+
11
+
12struct ContextImpl;
+
13
+
14namespace ob {
+
15class Device;
+
16class DeviceInfo;
+
17class DeviceList;
+
18
+ +
24private:
+
25 std::unique_ptr<ContextImpl> impl_;
+
26
+
27public:
+
32 Context(const char *configPath = "");
+
33 virtual ~Context() noexcept;
+
34
+
40 std::shared_ptr<DeviceList> queryDeviceList();
+
41
+
50 void enableNetDeviceEnumeration(bool enable);
+
51
+
58 std::shared_ptr<Device> createNetDevice(const char *address, uint16_t port);
+
59
+
66 void changeNetDeviceIpConfig(const char *deviceUid, const OBNetIpConfig &config);
+
67
+
68 using DeviceChangedCallback = std::function<void(std::shared_ptr<DeviceList> removedList, std::shared_ptr<DeviceList> addedList)>;
+
69
+
75 void setDeviceChangedCallback(DeviceChangedCallback callback);
+
76
+
82 void enableDeviceClockSync(uint64_t repeatInterval);
+
83#define enableMultiDeviceSync enableDeviceClockSync
+
84
+ +
89
+
95 static void setLoggerSeverity(OBLogSeverity severity);
+
96
+
103 static void setLoggerToFile(OBLogSeverity severity, const char *directory);
+
104
+
110 static void setLoggerToConsole(OBLogSeverity severity);
+
111
+
117 using LogCallback = std::function<void(OBLogSeverity severity, const char *logMsg)>;
+
118
+
125 static void setLoggerToCallback(OBLogSeverity severity, LogCallback callback);
+
126
+
133 static void loadLicense(const char *filePath, const char *key = OB_DEFAULT_DECRYPT_KEY);
+
134
+
142 static void loadLicenseFromData(const char *data, uint32_t dataLen, const char *key = OB_DEFAULT_DECRYPT_KEY);
+
143};
+
144} // namespace ob
+
#define OB_DEFAULT_DECRYPT_KEY
默认解密密钥
Definition ObTypes.h:1290
+
#define OB_EXTENSION_API
Definition ObTypes.h:25
+
OBLogSeverity
日志等级,等级越高,日志过滤越强
Definition ObTypes.h:109
+
提供 SDK 的结构体、枚举常量定义(依赖 libobsensor/h/ObTypes.h)
+
定义 Context 类, 用于获取设备列表,处理设备的回调,日志等级的设置操作
Definition Context.hpp:23
+
static void setLoggerSeverity(OBLogSeverity severity)
设置全局日志的等级,会同时作用于输出到终端和输出到文件的日志等级
+
static void setLoggerToConsole(OBLogSeverity severity)
设置日志输出到终端
+
virtual ~Context() noexcept
+
static void loadLicense(const char *filePath, const char *key=OB_DEFAULT_DECRYPT_KEY)
加载 license 文件
+
static void setLoggerToCallback(OBLogSeverity severity, LogCallback callback)
设置日志回调
+
std::function< void(std::shared_ptr< DeviceList > removedList, std::shared_ptr< DeviceList > addedList)> DeviceChangedCallback
Definition Context.hpp:68
+
std::function< void(OBLogSeverity severity, const char *logMsg)> LogCallback
日志回调函数
Definition Context.hpp:117
+
void freeIdleMemory()
从内部数据帧内存池中释放空闲内存
+
Context(const char *configPath="")
context 是描述 SDK 的 runtime 一个管理类,负责 SDK 的资源申请与释放 context 具备多设备的管理能力,负责枚举设备,监听设备回调,启用多设备同步等功能
+
static void loadLicenseFromData(const char *data, uint32_t dataLen, const char *key=OB_DEFAULT_DECRYPT_KEY)
加载 license 数据
+
static void setLoggerToFile(OBLogSeverity severity, const char *directory)
设置日志输出到文件
+
描述设备信息的类,如设备名称,id,序列号等信息。
Definition Device.hpp:552
+
表示设备列表的类
Definition Device.hpp:667
+
定义 Device 类
Definition Device.hpp:30
+
Definition Context.hpp:14
+
网络设备的 IP 地址配置(IPv4)
Definition ObTypes.h:880
diff --git a/doc/api/Chinese/Device_8h.html b/doc/api/Chinese/Device_8h.html index ccfa7ced..87fe2ca3 100755 --- a/doc/api/Chinese/Device_8h.html +++ b/doc/api/Chinese/Device_8h.html @@ -1,9 +1,10 @@ - - + + - - + + + OrbbecSDK: header_cn/libobsensor/h/Device.h 文件参考 @@ -11,9 +12,6 @@ - @@ -21,11 +19,10 @@
- + - @@ -34,41 +31,23 @@
-
OrbbecSDK -  1.9.4 +
+
OrbbecSDK 1.9.5
OrbbecSDK: 奥比中光 3D 相机开发套件
- + + + + - - +
- +
+
+
+
+
载入中...
+
搜索中...
+
未找到
+
+
+