![]() |
OrbbecSDK
1.5.7
OrbbecSDK: Software-Development-Kit for Orbbec 3D-Sensor devices
|
#include <Context.hpp>
Public 类型 | |
using | DeviceChangedCallback = std::function< void(std::shared_ptr< DeviceList > removedList, std::shared_ptr< DeviceList > addedList)> |
Public 成员函数 | |
Context (const char *configPath="") | |
context是描述SDK的runtime一个管理类,负责SDK的资源申请与释放 context具备多设备的管理能力,负责枚举设备,监听设备回调,启用多设备同步等功能 更多... | |
virtual | ~Context () noexcept |
std::shared_ptr< DeviceList > | queryDeviceList () |
获取枚举到设备列表 更多... | |
std::shared_ptr< Device > | createNetDevice (const char *address, uint16_t port) |
创建网络设备对象 更多... | |
void | setDeviceChangedCallback (DeviceChangedCallback callback) |
设置设备插拔回调函数 更多... | |
void | enableMultiDeviceSync (uint64_t repeatInterval) |
启动多设备同步功能,同步已创建设备的时钟(需要使用的设备支持该功能) 更多... | |
静态 Public 成员函数 | |
static void | setLoggerSeverity (OBLogSeverity severity) |
设置全局日志的等级,会同时作用于输出到终端和输出到文件的日志等级 更多... | |
static void | setLoggerToFile (OBLogSeverity severity, const char *directory) |
设置日志输出到文件 更多... | |
static void | setLoggerToConsole (OBLogSeverity severity) |
设置日志输出到终端 更多... | |
在文件 Context.hpp 第 25 行定义.
using ob::Context::DeviceChangedCallback = std::function<void(std::shared_ptr<DeviceList> removedList, std::shared_ptr<DeviceList> addedList)> |
在文件 Context.hpp 第 65 行定义.
ob::Context::Context | ( | const char * | configPath = "" | ) |
context是描述SDK的runtime一个管理类,负责SDK的资源申请与释放 context具备多设备的管理能力,负责枚举设备,监听设备回调,启用多设备同步等功能
|
virtualnoexcept |
std::shared_ptr<DeviceList> ob::Context::queryDeviceList | ( | ) |
获取枚举到设备列表
std::shared_ptr<Device> ob::Context::createNetDevice | ( | const char * | address, |
uint16_t | port | ||
) |
创建网络设备对象
address | ip 地址 |
port | 端口号 |
void ob::Context::setDeviceChangedCallback | ( | DeviceChangedCallback | callback | ) |
设置设备插拔回调函数
callback | 设备插拔时触发的回调函数 |
void ob::Context::enableMultiDeviceSync | ( | uint64_t | repeatInterval | ) |
启动多设备同步功能,同步已创建设备的时钟(需要使用的设备支持该功能)
repeatInterval | 定时同步时间间隔(单位ms;如果repeatInterval=0,表示只同步一次,不再定时执行) |
|
static |
设置全局日志的等级,会同时作用于输出到终端和输出到文件的日志等级
severity | 日志输出等级 |
|
static |
设置日志输出到文件
severity | 输出到文件的日志等级 |
directory | 日志文件输出路径,如果路径为空,则继续使用已有设置(已有配置也为空则不输出日志到文件) |
|
static |
设置日志输出到终端
severity | 输出到终端的日志等级 |