pyrs_net.cpp
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 #include <pybind11/pybind11.h>
5 
6 // convenience functions
7 #include <pybind11/operators.h>
8 
10 
11 #define NAME pyrealsense2_net
12 #define SNAME "pyrealsense2_net"
13 
14 namespace py = pybind11;
15 using namespace pybind11::literals;
16 
17 auto device = (py::object) py::module::import("pyrealsense2").attr("device");
18 
20  m.doc() = "Wrapper for the librealsense ethernet device extension module";
21 
22  py::class_<rs2::net_device> net_device(m, "net_device", device);
23  net_device.def(py::init<std::string>(), "address"_a)
24  .def("add_to", &rs2::net_device::add_to, "Add net device to existing context.\n"
25  "Any future queries on the context will return this device.\n"
26  "This operation cannot be undone (except for destroying the context)", "ctx"_a);
27 }
void add_to(context &ctx)
Definition: rs_net.hpp:26
const GLfloat * m
Definition: glext.h:6814
#define NAME
Definition: pyrs_net.cpp:11
PYBIND11_MODULE(NAME, m)
Definition: pyrs_net.cpp:19
std::array< point3d, 4 > object
auto device
Definition: pyrs_net.cpp:17


librealsense2
Author(s): Sergey Dorodnicov , Doron Hirshberg , Mark Horn , Reagan Lopez , Itay Carpis
autogenerated on Mon May 3 2021 02:47:39