#include <Context.hpp>
|
| Context (const char *configPath="") |
| Context is a management class that describes the runtime of the SDK. It is responsible for the applying and releasing of resources for the SDK. The context has the ability to manage multiple devices, is responsible for enumerating devices, monitoring device callbacks, and enabling functions such as multi-device synchronization. More...
|
|
virtual | ~Context () noexcept |
|
std::shared_ptr< DeviceList > | queryDeviceList () |
| Query enumerated device list. More...
|
|
std::shared_ptr< Device > | createNetDevice (const char *address, uint16_t port) |
| 创建网络设备对象 More...
|
|
void | setDeviceChangedCallback (DeviceChangedCallback callback) |
| Set device plug-in callback function. More...
|
|
void | enableMultiDeviceSync (uint64_t repeatInterval) |
| Activate the multi-device synchronization function to synchronize the clock of the created device(the device needs support this function) More...
|
|
Definition at line 25 of file Context.hpp.
ob::Context::Context |
( |
const char * |
configPath = "" | ) |
|
Context is a management class that describes the runtime of the SDK. It is responsible for the applying and releasing of resources for the SDK. The context has the ability to manage multiple devices, is responsible for enumerating devices, monitoring device callbacks, and enabling functions such as multi-device synchronization.
virtual ob::Context::~Context |
( |
| ) |
|
|
virtualnoexcept |
std::shared_ptr<DeviceList> ob::Context::queryDeviceList |
( |
| ) |
|
Query enumerated device list.
- Returns
- std::shared_ptr<DeviceList> returns a pointer to the device list class
std::shared_ptr<Device> ob::Context::createNetDevice |
( |
const char * |
address, |
|
|
uint16_t |
port |
|
) |
| |
创建网络设备对象
- Parameters
-
- Returns
- std::shared_ptr<Device> 返回创建好的设备对象
Set device plug-in callback function.
- Parameters
-
callback | function triggered when the device is plugged and unplugged |
void ob::Context::enableMultiDeviceSync |
( |
uint64_t |
repeatInterval | ) |
|
Activate the multi-device synchronization function to synchronize the clock of the created device(the device needs support this function)
- Parameters
-
repeatInterval | synchronization time interval (unit: ms; if repeatInterval=0, it means that it will only be synchronized once and will not be executed regularly) |
static void ob::Context::setLoggerSeverity |
( |
OBLogSeverity |
severity | ) |
|
|
static |
Set the level of the global log will affect both the log level output to the terminal and output to the file.
- Parameters
-
static void ob::Context::setLoggerToFile |
( |
OBLogSeverity |
severity, |
|
|
const char * |
directory |
|
) |
| |
|
static |
Set log output to file.
- Parameters
-
severity | log level output to file |
directory | The log file output path. If the path is empty, the existing settings will continue to be used (if the existing configuration is also empty, the log will not be output to the file) |
static void ob::Context::setLoggerToConsole |
( |
OBLogSeverity |
severity | ) |
|
|
static |
Set log output to terminal.
- Parameters
-
severity | log level output to the terminal |
The documentation for this class was generated from the following file: