Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
include
librealsense2-net
rs_net.hpp
Go to the documentation of this file.
1
// License: Apache 2.0. See LICENSE file in root directory.
2
// Copyright(c) 2020 Intel Corporation. All Rights Reserved.
3
4
#ifndef LIBREALSENSE_RS2_NET_HPP
5
#define LIBREALSENSE_RS2_NET_HPP
6
7
#include <
librealsense2/rs.hpp
>
8
#include "
rs_net.h
"
9
10
#include <memory>
11
12
namespace
rs2
13
{
14
class
net_device
:
public
rs2::device
15
{
16
public
:
17
net_device
(
const
std::string
&
address
) :
rs2
::
device
(
init
(address)) { }
18
26
void
add_to
(
context
&
ctx
)
27
{
28
rs2_error
*
e
=
nullptr
;
29
rs2_context_add_software_device
(((std::shared_ptr<rs2_context>)ctx).
get
(),
_dev
.get(), &
e
);
30
error::handle
(e);
31
}
32
33
34
private
:
35
std::shared_ptr<rs2_device>
init
(
const
std::string
&
address
)
36
{
37
rs2_error
*
e
=
nullptr
;
38
auto
dev
= std::shared_ptr<rs2_device>(
39
rs2_create_net_device
(
RS2_API_VERSION
, address.c_str(), &
e
),
40
rs2_delete_device
);
41
error::handle
(e);
42
43
return
dev
;
44
}
45
};
46
}
47
#endif // LIBREALSENSE_RS2_NET_HPP
rs2::net_device::add_to
void add_to(context &ctx)
Definition:
rs_net.hpp:26
RS2_API_VERSION
#define RS2_API_VERSION
Definition:
rs.h:41
rs2::net_device
Definition:
rs_net.hpp:14
rs2::net_device::net_device
net_device(const std::string &address)
Definition:
rs_net.hpp:17
test-bad-conditions.dev
dev
Definition:
test-bad-conditions.py:16
rs2_delete_device
void rs2_delete_device(rs2_device *device)
Definition:
rs.cpp:301
rs2_error
Definition:
rs.cpp:139
rs.hpp
rs2
Definition:
cah-model.h:10
string
GLsizei const GLchar *const * string
Definition:
glad/glad/glad.h:2862
test-got-playback-frames.ctx
ctx
Definition:
test-got-playback-frames.py:165
rs2_create_net_device
rs2_device * rs2_create_net_device(int api_version, const char *address, rs2_error **error)
Definition:
ip_device.cpp:403
rmse.e
e
Definition:
rmse.py:177
rs2::context
Definition:
rs_context.hpp:96
rs2::net_device::init
std::shared_ptr< rs2_device > init(const std::string &address)
Definition:
rs_net.hpp:35
rs2::device::_dev
std::shared_ptr< rs2_device > _dev
Definition:
rs_device.hpp:146
rs2::error::handle
static void handle(rs2_error *e)
Definition:
rs_types.hpp:144
rs2_context_add_software_device
void rs2_context_add_software_device(rs2_context *ctx, rs2_device *dev, rs2_error **error)
Definition:
rs.cpp:1529
address
GLuint GLuint64EXT address
Definition:
glext.h:11417
rs2::device
Definition:
rs_device.hpp:18
rs_net.h
librealsense2
Author(s): Sergey Dorodnicov
, Doron Hirshberg
, Mark Horn
, Reagan Lopez
, Itay Carpis
autogenerated on Mon May 3 2021 02:47:40