![]() |
OrbbecSDK
1.5.7
OrbbecSDK: Software-Development-Kit for Orbbec 3D-Sensor devices
|
Context is a management class that describes the runtime of the SDK and is responsible for resource application and release of the SDK. Context has the ability to manage multiple devices. It is responsible for enumerating devices, monitoring device callbacks, and enabling multi device synchronization. More...
#include "ObTypes.h"
Go to the source code of this file.
Functions | |
ob_context * | ob_create_context (ob_error **error) |
create context api More... | |
ob_context * | ob_create_context_with_config (const char *config_path, ob_error **error) |
create context with config More... | |
void | ob_delete_context (ob_context *context, ob_error **error) |
Delete context. More... | |
ob_device_list * | ob_query_device_list (ob_context *context, ob_error **error) |
Get the list of enumerated devices. More... | |
ob_device * | ob_create_net_device (ob_context *context, const char *address, uint16_t port, ob_error **error) |
创建网络设备 More... | |
void | ob_set_device_changed_callback (ob_context *context, ob_device_changed_callback callback, void *user_data, ob_error **error) |
Set device plug-in callback function. More... | |
void | ob_enable_multi_device_sync (ob_context *context, uint64_t repeatInterval, ob_error **error) |
Activate the multi-device synchronization function to synchronize the clock of the created device(the device needs to support this function) More... | |
void | ob_set_logger_severity (ob_log_severity severity, ob_error **error) |
Set the global log level and this will affect both the log level output to the console and the log output to the file. More... | |
void | ob_set_logger_to_file (ob_log_severity severity, const char *directory, ob_error **error) |
Set output log to file. More... | |
void | ob_set_logger_to_console (ob_log_severity severity, ob_error **error) |
Set the output log to the console. More... | |
Context is a management class that describes the runtime of the SDK and is responsible for resource application and release of the SDK. Context has the ability to manage multiple devices. It is responsible for enumerating devices, monitoring device callbacks, and enabling multi device synchronization.
Definition in file Context.h.
ob_context* ob_create_context | ( | ob_error ** | error | ) |
create context api
[out] | error | record the error information |
ob_context* ob_create_context_with_config | ( | const char * | config_path, |
ob_error ** | error | ||
) |
create context with config
[in] | config_path | Configure the path of the file, and return null if the default path is used. |
[out] | error | Log error messages |
void ob_delete_context | ( | ob_context * | context, |
ob_error ** | error | ||
) |
Delete context.
[in] | context | The context to delete |
[out] | error | Log error messages |
ob_device_list* ob_query_device_list | ( | ob_context * | context, |
ob_error ** | error | ||
) |
Get the list of enumerated devices.
[in] | context | Context |
[out] | error | Log error messages |
ob_device* ob_create_net_device | ( | ob_context * | context, |
const char * | address, | ||
uint16_t | port, | ||
ob_error ** | error | ||
) |
创建网络设备
[in] | context | 上下文环境 |
[in] | address | 设备ip地址 |
[in] | port | 设备端口 |
[out] | error | 记录错误信息 |
void ob_set_device_changed_callback | ( | ob_context * | context, |
ob_device_changed_callback | callback, | ||
void * | user_data, | ||
ob_error ** | error | ||
) |
Set device plug-in callback function.
[in] | context | Context |
[in] | callback | Callback triggered when the device is plugged and unplugged |
[in] | user_data | You can pass in any user data and get it from the callback |
[out] | error | Log error messages |
void ob_enable_multi_device_sync | ( | ob_context * | context, |
uint64_t | repeatInterval, | ||
ob_error ** | error | ||
) |
Activate the multi-device synchronization function to synchronize the clock of the created device(the device needs to support this function)
[in] | context | Context |
[in] | repeatInterval | synchronization time interval (unit: ms; if repeatInterval=0, itmeans that it will only be synchronized once and will not be executedregularly) |
[out] | error | Log error messages |
void ob_set_logger_severity | ( | ob_log_severity | severity, |
ob_error ** | error | ||
) |
Set the global log level and this will affect both the log level output to the console and the log output to the file.
[in] | severity | Output log level |
[out] | error | Log error messages |
void ob_set_logger_to_file | ( | ob_log_severity | severity, |
const char * | directory, | ||
ob_error ** | error | ||
) |
Set output log to file.
[in] | severity | log level output to file |
[in] | 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) |
[out] | error | Log error messages |
void ob_set_logger_to_console | ( | ob_log_severity | severity, |
ob_error ** | error | ||
) |
Set the output log to the console.
/**
[in] | log | Log level |
[out] | error | Log error messages |