Program Listing for File rs_context.h

Return to documentation for file (/tmp/ws/src/librealsense2/include/librealsense2/h/rs_context.h)

/* License: Apache 2.0. See LICENSE file in root directory.
   Copyright(c) 2017 Intel Corporation. All Rights Reserved. */

#ifndef LIBREALSENSE_RS2_CONTEXT_H
#define LIBREALSENSE_RS2_CONTEXT_H

#ifdef __cplusplus
extern "C" {
#endif
#include "rs_types.h"

rs2_context* rs2_create_context(int api_version, rs2_error** error);

void rs2_delete_context(rs2_context* context);

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);

rs2_device* rs2_context_add_device(rs2_context* ctx, const char* file, rs2_error** error);

void rs2_context_add_software_device(rs2_context* ctx, rs2_device* dev, rs2_error** error);

void rs2_context_remove_device(rs2_context* ctx, const char* file, rs2_error** error);

void rs2_context_unload_tracking_module(rs2_context* ctx, rs2_error** error);

rs2_device_list* rs2_query_devices(const rs2_context* context, rs2_error** error);

#define RS2_PRODUCT_LINE_ANY            0xff
#define RS2_PRODUCT_LINE_ANY_INTEL      0xfe
#define RS2_PRODUCT_LINE_NON_INTEL      0x01
#define RS2_PRODUCT_LINE_D400           0x02
#define RS2_PRODUCT_LINE_SR300          0x04
#define RS2_PRODUCT_LINE_L500           0x08
#define RS2_PRODUCT_LINE_T200           0x10
#define RS2_PRODUCT_LINE_DEPTH      (RS2_PRODUCT_LINE_L500 | RS2_PRODUCT_LINE_SR300 | RS2_PRODUCT_LINE_D400)
#define RS2_PRODUCT_LINE_TRACKING   RS2_PRODUCT_LINE_T200

rs2_device_list* rs2_query_devices_ex(const rs2_context* context, int product_mask, rs2_error** error);

rs2_device_hub* rs2_create_device_hub(const rs2_context* context, rs2_error** error);

void rs2_delete_device_hub(const rs2_device_hub* hub);

rs2_device* rs2_device_hub_wait_for_device(const rs2_device_hub* hub, rs2_error** error);

int rs2_device_hub_is_device_connected(const rs2_device_hub* hub, const rs2_device* device, rs2_error** error);


#ifdef __cplusplus
}
#endif
#endif