OrbbecSDK  1.5.7
OrbbecSDK: Software-Development-Kit for Orbbec 3D-Sensor devices
Context.hpp
Go to the documentation of this file.
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 
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
Definition: Context.hpp:20
std::function< void(std::shared_ptr< DeviceList > removedList, std::shared_ptr< DeviceList > addedList)> DeviceChangedCallback
Definition: Context.hpp:65
OBLogSeverity
log level, the higher the level, the stronger the log filter
Definition: ObTypes.h:99
Provide SDK structure and enumeration constant definition (depending on libobsensor/h/ObTypes.h)
A class describing device information, representing the name, id, serial number and other basic infor...
Definition: Device.hpp:726
#define OB_EXTENSION_API
Definition: ObTypes.h:25