OrbbecSDK  1.0.0
Public 类型 | Public 成员函数 | 所有成员列表
ob::Context类 参考

Public 类型

using DeviceChangedCallback = std::function< void(std::shared_ptr< DeviceList > removedList, std::shared_ptr< DeviceList > addedList) >
 

Public 成员函数

 Context ()
 context是描述SDK的runtime一个管理类,负责SDK的资源申请与释放 context具备多设备的管理能力,负责枚举设备,监听设备回调,启用多设备同步等功能
 
std::shared_ptr< DeviceList > queryDeviceList ()
 获取枚举到设备列表 更多...
 
void setDeviceChangedCallback (DeviceChangedCallback callback)
 设置设备插拔回调函数 更多...
 
void setLoggerServerity (OBLogServerity log)
 设置日志的输出等级 更多...
 
void setLoggerToFile (OBLogServerity log, const char *fileName)
 设置日志输出到文件 更多...
 
void setLoggerToConsole (OBLogServerity log)
 设置日志输出到终端 更多...
 
void enableMultiDeviceSync (uint64_t repeatInterval)
 启动多设备同步功能,同步已创建设备的时钟(需要使用的设备支持该功能) 更多...
 

详细描述

在文件 Context.hpp 第 20 行定义.

成员函数说明

void ob::Context::enableMultiDeviceSync ( uint64_t  repeatInterval)

启动多设备同步功能,同步已创建设备的时钟(需要使用的设备支持该功能)

参数
repeatInterval定时同步时间间隔(单位ms;如果repeatInterval=0,表示只同步一次,不再定时执行)
std::shared_ptr< DeviceList > ob::Context::queryDeviceList ( )

获取枚举到设备列表

返回
std::shared_ptr<DeviceList>返回设备列表类的指针
void ob::Context::setDeviceChangedCallback ( DeviceChangedCallback  callback)

设置设备插拔回调函数

参数
callback设备插拔时触发的回调函数
void ob::Context::setLoggerServerity ( OBLogServerity  log)

设置日志的输出等级

参数
loglog的输出等级
void ob::Context::setLoggerToConsole ( OBLogServerity  log)

设置日志输出到终端

参数
log日志的输出等级
void ob::Context::setLoggerToFile ( OBLogServerity  log,
const char *  fileName 
)

设置日志输出到文件

参数
log日志的输出等级
fileName输出的文件名

该类的文档由以下文件生成: