OrbbecSDK 2.10.6
OrbbecSDK: Software-Development-Kit for Orbbec 3D Cameras
Loading...
Searching...
No Matches
Context.h
Go to the documentation of this file.
1// Copyright (c) Orbbec Inc. All Rights Reserved.
2// Licensed under the MIT License.
3
10#pragma once
11
12#ifdef __cplusplus
13extern "C" {
14#endif
15
16#include "ObTypes.h"
17
26
35OB_EXPORT ob_context *ob_create_context_with_config(const char *config_file_path, ob_error **error);
36
43OB_EXPORT void ob_delete_context(ob_context *context, ob_error **error);
44
54
67OB_EXPORT void ob_enable_net_device_enumeration(ob_context *context, bool enable, ob_error **error);
68
81OB_EXPORT bool ob_force_ip_config(const char *macAddress, ob_net_ip_config config, ob_error **error);
82
95OB_EXPORT bool ob_send_action_command(uint32_t deviceKey, uint32_t groupKey, uint32_t groupMask, const char *destIp, uint64_t scheduledTime, ob_error **error);
96
108OB_EXPORT void ob_set_gvcp_port_scheme(ob_context *context, ob_gvcp_port_scheme scheme, ob_error **error);
109
119
130OB_EXPORT ob_device *ob_create_net_device(ob_context *context, const char *address, uint16_t port, ob_error **error);
131
145OB_EXPORT ob_device *ob_create_net_device_ex(ob_context *context, const char *address, uint16_t port, ob_device_access_mode accessMode, ob_error **error);
146
160OB_EXPORT void ob_set_device_changed_callback(ob_context *context, ob_device_changed_callback callback, void *user_data, ob_error **error);
161
180
190OB_EXPORT void ob_unregister_device_changed_callback(ob_context *context, ob_callback_id callback_id, ob_error **error);
191
199OB_EXPORT void ob_enable_device_clock_sync(ob_context *context, uint64_t repeat_interval_msec, ob_error **error);
200
208OB_EXPORT void ob_sync_device_hardware_pps_time(ob_context *context, uint64_t hardware_pps_time, ob_error **error);
209
216OB_EXPORT void ob_free_idle_memory(ob_context *context, ob_error **error);
217
228OB_EXPORT void ob_set_uvc_backend_type(ob_context *context, ob_uvc_backend_type backend_type, ob_error **error);
229
238OB_EXPORT void ob_set_logger_severity(ob_log_severity severity, ob_error **error);
239
252OB_EXPORT void ob_set_logger_to_file(ob_log_severity severity, const char *directory, ob_error **error);
253
262OB_EXPORT void ob_set_logger_file_name(const char *file_name, ob_error **error);
263
272OB_EXPORT void ob_set_logger_to_callback(ob_log_severity severity, ob_log_callback callback, void *user_data, ob_error **error);
273
280OB_EXPORT void ob_set_logger_to_console(ob_log_severity severity, ob_error **error);
281
293OB_EXPORT void ob_log_external_message(ob_log_severity severity, const char *module, const char *message, const char *file, const char *func, int line,
294 ob_error **error);
295
305OB_EXPORT void ob_set_extensions_directory(const char *directory, ob_error **error);
306
307
319OB_EXPORT void ob_context_set_timestamp_clock_type(ob_context *context, ob_clock_type clock_type, ob_error **error);
320
330
331// The following interfaces are deprecated and are retained here for compatibility purposes.
332#define ob_enable_multi_device_sync ob_enable_device_clock_sync
333#define ob_set_logger_callback ob_set_logger_to_callback
334
335#ifdef __cplusplus
336}
337#endif
OB_EXPORT void ob_set_gvcp_port_scheme(ob_context *context, ob_gvcp_port_scheme scheme, ob_error **error)
Set the GVCP port scheme used for network device discovery and control.
OB_EXPORT void ob_enable_device_clock_sync(ob_context *context, uint64_t repeat_interval_msec, ob_error **error)
Activates device clock synchronization to synchronize the clock of the host and all created devices (...
OB_EXPORT void ob_set_logger_to_callback(ob_log_severity severity, ob_log_callback callback, void *user_data, ob_error **error)
Set the log callback function.
OB_EXPORT ob_clock_type ob_context_get_timestamp_clock_type(const ob_context *context, ob_error **error)
Get the current host-side timestamp clock type for the context.
OB_EXPORT bool ob_force_ip_config(const char *macAddress, ob_net_ip_config config, ob_error **error)
"Force" a static IP address configuration in a device identified by its MAC Address.
OB_EXPORT void ob_set_uvc_backend_type(ob_context *context, ob_uvc_backend_type backend_type, ob_error **error)
For linux, there are two ways to enable the UVC backend: libuvc and v4l2. This function is used to se...
OB_EXPORT ob_context * ob_create_context_with_config(const char *config_file_path, ob_error **error)
Create a context object with a specified configuration file.
OB_EXPORT bool ob_send_action_command(uint32_t deviceKey, uint32_t groupKey, uint32_t groupMask, const char *destIp, uint64_t scheduledTime, ob_error **error)
Send an Action Command to GVCP devices.
OB_EXPORT ob_gvcp_port_scheme ob_get_gvcp_port_scheme(ob_context *context, ob_error **error)
Get the current GVCP port scheme.
OB_EXPORT ob_device * ob_create_net_device_ex(ob_context *context, const char *address, uint16_t port, ob_device_access_mode accessMode, ob_error **error)
Create a network device object.
OB_EXPORT ob_context * ob_create_context(ob_error **error)
Create a context object with the default configuration file.
OB_EXPORT void ob_set_device_changed_callback(ob_context *context, ob_device_changed_callback callback, void *user_data, ob_error **error)
Set a device plug-in callback function.
OB_EXPORT void ob_free_idle_memory(ob_context *context, ob_error **error)
Free idle memory from the internal frame memory pool.
OB_EXPORT void ob_set_logger_to_file(ob_log_severity severity, const char *directory, ob_error **error)
Set the log output to a file.
OB_EXPORT void ob_context_set_timestamp_clock_type(ob_context *context, ob_clock_type clock_type, ob_error **error)
Set the host-side timestamp clock type for the current context.
OB_EXPORT void ob_set_logger_severity(ob_log_severity severity, ob_error **error)
Set the global log level.
OB_EXPORT void ob_unregister_device_changed_callback(ob_context *context, ob_callback_id callback_id, ob_error **error)
Unregister a previously registered device plug-in callback function.
OB_EXPORT ob_device * ob_create_net_device(ob_context *context, const char *address, uint16_t port, ob_error **error)
Create a network device object.
OB_EXPORT void ob_set_logger_to_console(ob_log_severity severity, ob_error **error)
Set the log output to the console.
OB_EXPORT void ob_log_external_message(ob_log_severity severity, const char *module, const char *message, const char *file, const char *func, int line, ob_error **error)
Logs a message with severity, file, function, and line info.
OB_EXPORT void ob_sync_device_hardware_pps_time(ob_context *context, uint64_t hardware_pps_time, ob_error **error)
Synchronize the device time (synchronize hardwarePPS time to all created devices).
OB_EXPORT ob_callback_id ob_register_device_changed_callback(ob_context *context, ob_device_changed_callback callback, void *user_data, ob_error **error)
Register a device plug-in callback function.
OB_EXPORT ob_device_list * ob_query_device_list(ob_context *context, ob_error **error)
Get a list of enumerated devices.
OB_EXPORT void ob_delete_context(ob_context *context, ob_error **error)
Delete a context object.
OB_EXPORT void ob_enable_net_device_enumeration(ob_context *context, bool enable, ob_error **error)
Enable or disable network device enumeration.
OB_EXPORT void ob_set_logger_file_name(const char *file_name, ob_error **error)
Set the log file name for file output.
OB_EXPORT void ob_set_extensions_directory(const char *directory, ob_error **error)
Set the extensions directory.
Provide structs commonly used in the SDK, enumerating constant definitions.
ob_device_access_mode
Device access mode for GVCP device.
Definition ObTypes.h:2055
struct ob_context_t ob_context
Definition ObTypes.h:22
enum OBClockType ob_clock_type
ob_uvc_backend_type
For Linux, there are two ways to access the UVC device, libuvc and v4l2. The backend type is used to ...
Definition ObTypes.h:1997
struct ob_device_t ob_device
Definition ObTypes.h:23
struct OBNetIpConfig ob_net_ip_config
enum OBLogSeverity ob_log_severity
void(*) ob_device_changed_callback(ob_device_list *removed, ob_device_list *added, void *user_data)
Callback for device change.
Definition ObTypes.h:2157
void ob_log_callback(ob_log_severity severity, const char *message, void *user_data)
Callback for receiving log.
Definition ObTypes.h:2195
uint64_t ob_callback_id
Definition ObTypes.h:2216
enum OBGvcpPortScheme ob_gvcp_port_scheme
struct ob_device_list_t ob_device_list
Definition ObTypes.h:25
The error class exposed by the SDK, users can get detailed error information according to the error.
Definition ObTypes.h:162