![]() |
OrbbecSDK
1.5.7
OrbbecSDK: Software-Development-Kit for Orbbec 3D-Sensor devices
|
context是描述SDK的runtime一个管理类,负责SDK的资源申请与释放 context具备多设备的管理能力,负责枚举设备,监听设备回调,启用多设备同步等功能 更多...
#include "ObTypes.h"
函数 | |
ob_context * | ob_create_context (ob_error **error) |
创建context的接口函数 更多... | |
ob_context * | ob_create_context_with_config (const char *config_path, ob_error **error) |
创建context的接口函数 更多... | |
void | ob_delete_context (ob_context *context, ob_error **error) |
删除上下文环境 更多... | |
ob_device_list * | ob_query_device_list (ob_context *context, ob_error **error) |
枚举设备列表 更多... | |
ob_device * | ob_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_multi_device_sync (ob_context *context, uint64_t repeatInterval, ob_error **error) |
启动多设备同步功能,同步已创建设备的时钟(需要使用的设备支持该功能) 更多... | |
void | ob_set_logger_severity (ob_log_severity severity, ob_error **error) |
设置全局日志的等级,会同时作用于输出到console和输出到文件的日志等级 更多... | |
void | ob_set_logger_to_file (ob_log_severity severity, const char *directory, ob_error **error) |
设置输出日志到文件 更多... | |
void | ob_set_logger_to_console (ob_log_severity severity, ob_error **error) |
context是描述SDK的runtime一个管理类,负责SDK的资源申请与释放 context具备多设备的管理能力,负责枚举设备,监听设备回调,启用多设备同步等功能
在文件 Context.h 中定义.
ob_context* ob_create_context | ( | ob_error ** | error | ) |
创建context的接口函数
[out] | error | 记录错误信息 |
ob_context* ob_create_context_with_config | ( | const char * | config_path, |
ob_error ** | error | ||
) |
创建context的接口函数
[in] | config_path | 配置文件的路径,如果使用默认路径则传NULL |
[out] | error | 记录错误信息 |
void ob_delete_context | ( | ob_context * | context, |
ob_error ** | error | ||
) |
删除上下文环境
[in] | context | 要删除的上下文环境 |
[out] | error | 记录错误信息 |
ob_device_list* ob_query_device_list | ( | ob_context * | context, |
ob_error ** | error | ||
) |
枚举设备列表
[in] | context | 上下文环境 |
[out] | error | 记录错误信息 |
ob_device* ob_create_net_device | ( | ob_context * | context, |
const char * | address, | ||
uint16_t | port, | ||
ob_error ** | error | ||
) |
创建网络设备
[in] | context | 上下文环境 |
[in] | address | 设备ip地址 |
[in] | port | 设备端口 |
[out] | error | 记录错误信息 |
void ob_set_device_changed_callback | ( | ob_context * | context, |
ob_device_changed_callback | callback, | ||
void * | user_data, | ||
ob_error ** | error | ||
) |
设置设备插拔回调函数
[in] | context | 上下文环境 |
[in] | callback | 设备插拔时触发的回调 |
[in] | user_data | 可以传入任意用户数据,并从回调中获取 |
[out] | error | 记录错误信息 |
void ob_enable_multi_device_sync | ( | ob_context * | context, |
uint64_t | repeatInterval, | ||
ob_error ** | error | ||
) |
启动多设备同步功能,同步已创建设备的时钟(需要使用的设备支持该功能)
[in] | context | 上下文环境 |
[in] | repeatInterval | 定时同步时间间隔(单位ms;如果repeatInterval=0,表示只同步一次,不再定时执行) |
[out] | error | 记录错误信息 |
void ob_set_logger_severity | ( | ob_log_severity | severity, |
ob_error ** | error | ||
) |
设置全局日志的等级,会同时作用于输出到console和输出到文件的日志等级
[in] | severity | 输出日志等级 |
[out] | error | 记录错误信息 |
void ob_set_logger_to_file | ( | ob_log_severity | severity, |
const char * | directory, | ||
ob_error ** | error | ||
) |
设置输出日志到文件
[in] | severity | 输出到文件的日志等级 |
[in] | directory | 日志文件输出路径,如果路径为空,则继续使用已有设置(已有配置也为空则不输出日志到文件) |
[out] | error | 记录错误信息 |
void ob_set_logger_to_console | ( | ob_log_severity | severity, |
ob_error ** | error | ||
) |