| OrbbecSDK 1.5.7 OrbbecSDK: Software-Development-Kit for Orbbec 3D-Sensor devices

- 首页
- 命名空间
- 类
- 文件

- 文件列表
- 文件成员

Context.hpp
浏览该文件的文档.
1
11 #pragma once
12
13 #include "Types.hpp"
14
15 #include <functional>
16 #include <memory>
17
18 struct ContextImpl;
19
20 namespace ob {
21 class Device;
22 class DeviceInfo;
23 class DeviceList;
24
25 class OB_EXTENSION_API Context {
26 private:
27 std::unique_ptr<ContextImpl> impl_;
28
29 public:
40 Context(const char *configPath = "");
41 virtual ~Context() noexcept;
42
54 std::shared_ptr<DeviceList> queryDeviceList();
55
63 std::shared_ptr<Device> createNetDevice(const char *address, uint16_t port);
64
65 using DeviceChangedCallback = std::function<void(std::shared_ptr<DeviceList> removedList, std::shared_ptr<DeviceList> addedList)>;
77 void setDeviceChangedCallback(DeviceChangedCallback callback);
78
90 void enableMultiDeviceSync(uint64_t repeatInterval);
91
103 static void setLoggerSeverity(OBLogSeverity severity);
104
118 static void setLoggerToFile(OBLogSeverity severity, const char *directory);
119
131 static void setLoggerToConsole(OBLogSeverity severity);
132 };
133 } // namespace ob
ob
Definition: Context.hpp:20
ob::Device
Definition: Device.hpp:33
ob::Context::DeviceChangedCallback
std::function< void(std::shared_ptr< DeviceList > removedList, std::shared_ptr< DeviceList > addedList)> DeviceChangedCallback
Definition: Context.hpp:65
OBLogSeverity
OBLogSeverity
log 等级, 等级越高 Log 过滤力度越大
Definition: ObTypes.h:99
Types.hpp
提供SDK的结构体、枚举常量定义（依赖libobsensor/h/ObTypes.h）
ob::DeviceInfo
描述设备信息的类，代表一个RGBD相机的名称，id，序列号等其他设备自身基本信息。
Definition: Device.hpp:726
ob::DeviceList
Definition: Device.hpp:894
ob::Context
Definition: Context.hpp:25
OB_EXTENSION_API
#define OB_EXTENSION_API
Definition: ObTypes.h:25