5 #include "../include/librealsense2/hpp/rs_internal.hpp" 10 py::class_<rs2_video_stream> video_stream(m,
"video_stream",
"All the parameters" 11 " required to define a video stream.");
12 video_stream.def(py::init<>())
23 py::class_<rs2_motion_stream> motion_stream(m,
"motion_stream",
"All the parameters" 24 " required to define a motion stream.");
25 motion_stream.def(py::init<>())
33 py::class_<rs2_pose_stream> pose_stream(m,
"pose_stream",
"All the parameters" 34 " required to define a pose stream.");
35 pose_stream.def(py::init<>())
42 py::class_<rs2_software_video_frame> software_video_frame(m,
"software_video_frame",
"All the parameters " 43 "required to define a video frame.");
48 size_t size = fmt_to_value<itemsize>(vp.format());
49 size_t upp =
self.bpp /
size;
51 return BufData(
self.
pixels, size, fmt_to_value<fmtstring>(vp.format()), 2,
54 return BufData(
self.
pixels, size, fmt_to_value<fmtstring>(vp.format()), 3,
57 if (
self.deleter)
self.deleter(
self.
pixels);
61 self.deleter = [](
void* ptr){
delete[] ptr; };
71 py::class_<rs2_software_motion_frame> software_motion_frame(m,
"software_motion_frame",
"All the parameters " 72 "required to define a motion frame.");
75 auto data =
reinterpret_cast<const float*
>(
self.data);
78 if (
self.deleter)
self.deleter(
self.
data);
79 self.data =
new float[3];
80 float *dptr =
reinterpret_cast<float*
>(
self.data);
84 self.deleter = [](
void* ptr){
delete[] ptr; };
92 py::class_<rs2_software_pose_frame> software_pose_frame(m,
"software_pose_frame",
"All the parameters " 93 "required to define a pose frame.");
96 return *
reinterpret_cast<const rs2_pose*
>(
self.data);
98 if (
self.deleter)
self.deleter(
self.
data);
100 self.deleter = [](
void* ptr){
delete[] ptr; };
108 py::class_<rs2_software_notification> software_notification(m,
"software_notification",
"All the parameters " 109 "required to define a sensor notification.");
110 software_notification.def(py::init<>())
120 py::class_<rs2::software_sensor> software_sensor(m,
"software_sensor");
122 "video_stream"_a,
"is_default"_a=
false)
124 "motion_stream"_a,
"is_default"_a =
false)
126 "pose_stream"_a,
"is_default"_a =
false)
132 "will be supported by the sensor",
"option"_a,
"val"_a)
134 "read-only option",
"option"_a,
"val"_a)
136 "option"_a,
"range"_a,
"is_writable"_a=
true)
140 py::class_<rs2::software_device> software_device(m,
"software_device");
141 software_device.def(py::init<>())
143 "to the software device.",
"name"_a)
145 "Register destruction callback",
"callback"_a)
147 "Any future queries on the context will return this device.\n" 148 "This operation cannot be undone (except for destroying the context)",
"ctx"_a)
157 py::class_<rs2::firmware_log_message> firmware_log_message(m,
"firmware_log_message");
165 py::class_<rs2::firmware_log_parsed_message> firmware_log_parsed_message(m,
"firmware_log_parsed_message");
175 py::class_<rs2::firmware_logger, rs2::device> firmware_logger(m,
"firmware_logger");
176 firmware_logger.def(py::init<rs2::device>(),
"device"_a)
187 py::class_<rs2::terminal_parser> terminal_parser(m,
"terminal_parser");
188 terminal_parser.def(py::init<const std::string&>(),
"xml_content"_a)
unsigned int get_number_of_fw_logs() const
rs2::firmware_log_message create_message()
stream_profile add_pose_stream(rs2_pose_stream pose_stream, bool is_default=false)
rs2_log_severity get_severity() const
std::vector< uint8_t > parse_command(const std::string &command)
void register_info(rs2_camera_info info, const std::string &val)
bool get_firmware_log(rs2::firmware_log_message &msg) const
void on_video_frame(rs2_software_video_frame frame)
void set_metadata(rs2_frame_metadata_value value, rs2_metadata_type type)
All the parameters required to define a pose frame.
std::string parse_response(const std::string &command, const std::vector< uint8_t > &response)
void on_motion_frame(rs2_software_motion_frame frame)
software_sensor add_sensor(std::string name)
uint32_t timestamp() const
rs2_timestamp_domain domain
uint32_t get_timestamp() const
const char * serialized_data
stream_profile add_motion_stream(rs2_motion_stream motion_stream, bool is_default=false)
rs2_timestamp_domain domain
void set_read_only_option(rs2_option option, float val)
std::string severity() const
bool parse_log(const rs2::firmware_log_message &msg, const rs2::firmware_log_parsed_message &parsed_msg)
GLenum GLuint GLenum GLsizei const GLchar * buf
rs2::firmware_log_parsed_message create_parsed_message()
uint32_t sequence_id() const
std::string thread_name() const
rs2_log_severity severity
rs2_notification_category category
std::string message() const
void update_info(rs2_camera_info info, const std::string &val)
GLint GLint GLsizei GLint GLenum GLenum const void * pixels
std::string get_severity_str() const
bool get_flash_log(rs2::firmware_log_message &msg) const
void set_destruction_callback(T callback) const
void on_notification(rs2_software_notification notif)
void add_to(context &ctx)
3D vector in Euclidean coordinate space
void on_pose_frame(rs2_software_pose_frame frame)
All the parameters required to define a motion frame.
rs2_timestamp_domain domain
rs2_motion_device_intrinsic intrinsics
void add_option(rs2_option option, const option_range &range, bool is_writable=true)
bool init_parser(const std::string &xml_content)
void add_read_only_option(rs2_option option, float val)
std::string file_name() const
rs2_intrinsics intrinsics
All the parameters required to define a video frame.
stream_profile add_video_stream(rs2_video_stream video_stream, bool is_default=false)
std::vector< uint8_t > data() const
void init_internal(py::module &m)