Intel® RealSense™ Cross Platform API  2.13.0
Intel Realsense Cross-platform API
rs_context.h
Go to the documentation of this file.
1 /* License: Apache 2.0. See LICENSE file in root directory.
2  Copyright(c) 2017 Intel Corporation. All Rights Reserved. */
3 
9 #ifndef LIBREALSENSE_RS2_CONTEXT_H
10 #define LIBREALSENSE_RS2_CONTEXT_H
11 
12 #ifdef __cplusplus
13 extern "C" {
14 #endif
15 #include "rs_types.h"
16 
23 rs2_context* rs2_create_context(int api_version, rs2_error** error);
24 
29 void rs2_delete_context(rs2_context* context);
30 
39 
47 void rs2_set_devices_changed_callback(const rs2_context* context, rs2_devices_changed_callback_ptr callback, void* user, rs2_error** error);
48 
56 rs2_device* rs2_context_add_device(rs2_context* ctx, const char* file, rs2_error** error);
57 
64 void rs2_context_remove_device(rs2_context* ctx, const char* file, rs2_error** error);
65 
72 rs2_device_list* rs2_query_devices(const rs2_context* context, rs2_error** error);
73 
81 
86 void rs2_delete_device_hub(const rs2_device_hub* hub);
87 
97 
105 int rs2_device_hub_is_device_connected(const rs2_device_hub* hub, const rs2_device* device, rs2_error** error);
106 
107 
108 #ifdef __cplusplus
109 }
110 #endif
111 #endif
rs2_device_list * rs2_query_devices(const rs2_context *context, rs2_error **error)
rs2_device_hub * rs2_create_device_hub(const rs2_context *context, rs2_error **error)
Creates RealSense device_hub .
rs2_context * rs2_create_context(int api_version, rs2_error **error)
Creates RealSense context that is required for the rest of the API.
struct rs2_context rs2_context
Definition: rs_types.h:167
void rs2_delete_context(rs2_context *context)
Frees the relevant context object.
rs2_device * rs2_context_add_device(rs2_context *ctx, const char *file, rs2_error **error)
struct rs2_device_hub rs2_device_hub
Definition: rs_types.h:168
Exposes RealSense structs.
int rs2_device_hub_is_device_connected(const rs2_device_hub *hub, const rs2_device *device, rs2_error **error)
void rs2_delete_device_hub(const rs2_device_hub *hub)
Frees the relevant device hub object.
void(* rs2_devices_changed_callback_ptr)(rs2_device_list *, rs2_device_list *, void *)
Definition: rs_types.h:176
rs2_device * rs2_device_hub_wait_for_device(rs2_context *ctx, const rs2_device_hub *hub, rs2_error **error)
struct rs2_device rs2_device
Definition: rs_types.h:148
void rs2_set_devices_changed_callback_cpp(rs2_context *context, rs2_devices_changed_callback *callback, rs2_error **error)
void rs2_set_devices_changed_callback(const rs2_context *context, rs2_devices_changed_callback_ptr callback, void *user, rs2_error **error)
void rs2_context_remove_device(rs2_context *ctx, const char *file, rs2_error **error)
struct rs2_device_list rs2_device_list
Definition: rs_types.h:156
Definition: rs_types.hpp:53
struct rs2_error rs2_error
Definition: rs_types.h:149