Monado OpenXR Runtime
Loading...
Searching...
No Matches
rs_source Struct Reference

RealSense source of camera and IMU data. More...

Inheritance diagram for rs_source:
Collaboration diagram for rs_source:

Data Fields

struct xrt_fs xfs
 
struct xrt_frame_node node
 
enum u_logging_level log_level
 Log level.
 
struct xrt_frame_sink left_sink
 Intermediate sink for left camera frames.
 
struct xrt_frame_sink right_sink
 Intermediate sink for right camera frames.
 
struct xrt_imu_sink imu_sink
 Intermediate sink for IMU samples.
 
struct xrt_slam_sinks in_sinks
 Pointers to intermediate sinks.
 
struct xrt_slam_sinks out_sinks
 Pointers to downstream sinks.
 
struct u_sink_debug ui_left_sink
 Sink to display left frames in UI.
 
struct u_sink_debug ui_right_sink
 Sink to display right frames in UI.
 
struct m_ff_vec3_f32gyro_ff
 Queue of gyroscope data to display in UI.
 
struct m_ff_vec3_f32accel_ff
 Queue of accelerometer data to display in UI.
 
bool ui_autoexposure
 Autoexposure value to set.
 
struct u_var_draggable_f32 ui_exposure
 Exposure value to set.
 
struct u_var_draggable_f32 ui_gain
 Gain value to set.
 
struct u_var_button ui_btn_apply
 Apply changes button.
 
struct rs_container rsc
 Container of RealSense API objects.
 
bool stereo
 Indicates whether to use one or two cameras.
 
rs2_format video_format
 Indicates desired frame color format.
 
enum xrt_format xrt_video_format
 corresponding format for video_format
 
int video_width
 Indicates desired frame width.
 
int video_height
 Indicates desired frame height.
 
int video_fps
 Indicates desired fps.
 
bool video_change_exposure
 Indicates whether to overwrite external device exposure settings.
 
bool video_autoexposure
 Indicates whether to enable autoexposure or use provided values.
 
int video_exposure
 Indicates desired exposure time in microseconds.
 
int video_gain
 Indicates desired gain (16-248)
 
int gyro_fps
 Indicates desired gyroscope samples per second.
 
int accel_fps
 Indicates desired accelerometer samples per second.
 
rs2_stream stream_type
 Indicates desired stream type for the cameras.
 
int stream1_index
 Indicates desired stream index for first stream.
 
int stream2_index
 Indicates desired stream index for second stream.
 
bool is_running
 Whether the device is streaming.
 
struct { 
 
   struct os_mutex   mutex 
 Gyro and accel come from separate threads. More...
 
   struct xrt_vec3   accel 
 Last received accelerometer values. More...
 
   struct xrt_vec3   gyro 
 Last received gyroscope values. More...
 
partial_imu_sample 
 Very simple struct to merge the two acc/gyr streams into one IMU stream.
 
- Data Fields inherited from xrt_fs
char name [512]
 Name of the frame server source, from the subsystem.
 
char product [32]
 Frame server product identifier, matches the prober device.
 
char manufacturer [32]
 Frame server manufacturer, matches the prober device.
 
char serial [32]
 Frame server serial number, matches the prober device.
 
uint64_t source_id
 All frames produced by this frameserver are tagged with this id.
 
bool(* enumerate_modes )(struct xrt_fs *xfs, struct xrt_fs_mode **out_modes, uint32_t *out_count)
 Enumerate all available modes that this frameserver supports.
 
bool(* configure_capture )(struct xrt_fs *xfs, struct xrt_fs_capture_parameters *cp)
 Set the capture parameters, may not be supported on all capture devices.
 
bool(* stream_start )(struct xrt_fs *xfs, struct xrt_frame_sink *xs, enum xrt_fs_capture_type capture_type, uint32_t descriptor_index)
 Start the capture stream.
 
bool(* slam_stream_start )(struct xrt_fs *xfs, struct xrt_slam_sinks *sinks)
 Setup SLAM sinks for all the sensors a SLAM implementation may supports and start the frame server stream.
 
bool(* stream_stop )(struct xrt_fs *xfs)
 Stop the capture stream.
 
bool(* is_running )(struct xrt_fs *xfs)
 Is the capture stream running.
 
- Data Fields inherited from xrt_frame_node
struct xrt_frame_nodenext
 
void(* break_apart )(struct xrt_frame_node *node)
 Called first in when the graph is being destroyed, remove any references frames and other objects and stop threads.
 
void(* destroy )(struct xrt_frame_node *node)
 Do the actual freeing of the objects.
 

Additional Inherited Members

- Static Public Member Functions inherited from xrt_fs
static bool xrt_fs_enumerate_modes (struct xrt_fs *xfs, struct xrt_fs_mode **out_modes, uint32_t *out_count)
 Enumerate all available modes that this frameserver supports.
 
static bool xrt_fs_configure_capture (struct xrt_fs *xfs, struct xrt_fs_capture_parameters *cp)
 Set the capture parameters, may not be supported on all capture devices.
 
static bool xrt_fs_stream_start (struct xrt_fs *xfs, struct xrt_frame_sink *xs, enum xrt_fs_capture_type capture_type, uint32_t descriptor_index)
 Start the capture stream.
 
static bool xrt_fs_slam_stream_start (struct xrt_fs *xfs, struct xrt_slam_sinks *sinks)
 Setup SLAM sinks for all the sensors a SLAM implementation may supports and start the frame server stream.
 
static bool xrt_fs_stream_stop (struct xrt_fs *xfs)
 Stop the capture stream.
 
static bool xrt_fs_is_running (struct xrt_fs *xfs)
 Is the capture stream running.
 

Detailed Description

RealSense source of camera and IMU data.

Field Documentation

◆ accel

struct xrt_vec3 rs_source::accel

Last received accelerometer values.

Referenced by partial_imu_sample_push().

◆ accel_ff

struct m_ff_vec3_f32* rs_source::accel_ff

Queue of accelerometer data to display in UI.

Referenced by rs_source_create().

◆ accel_fps

int rs_source::accel_fps

Indicates desired accelerometer samples per second.

Referenced by check_global_time(), partial_imu_sample_push(), and rs_source_create().

◆ gyro

struct xrt_vec3 rs_source::gyro

Last received gyroscope values.

Referenced by partial_imu_sample_push().

◆ gyro_ff

struct m_ff_vec3_f32* rs_source::gyro_ff

Queue of gyroscope data to display in UI.

Referenced by rs_source_create().

◆ gyro_fps

int rs_source::gyro_fps

Indicates desired gyroscope samples per second.

Referenced by check_global_time(), partial_imu_sample_push(), and rs_source_create().

◆ imu_sink

struct xrt_imu_sink rs_source::imu_sink

Intermediate sink for IMU samples.

Referenced by rs_source_create().

◆ in_sinks

struct xrt_slam_sinks rs_source::in_sinks

Pointers to intermediate sinks.

Referenced by partial_imu_sample_push(), and rs_source_create().

◆ is_running

bool rs_source::is_running

Whether the device is streaming.

◆ left_sink

struct xrt_frame_sink rs_source::left_sink

Intermediate sink for left camera frames.

Referenced by receive_left_frame(), and rs_source_create().

◆ log_level

enum u_logging_level rs_source::log_level

Log level.

Referenced by rs_source_create().

◆ mutex

struct os_mutex rs_source::mutex

Gyro and accel come from separate threads.

Referenced by partial_imu_sample_push(), and rs_source_create().

◆ out_sinks

struct xrt_slam_sinks rs_source::out_sinks

Pointers to downstream sinks.

Referenced by receive_left_frame().

◆ [struct]

struct { ... } rs_source::partial_imu_sample

Very simple struct to merge the two acc/gyr streams into one IMU stream.

It just pushes on every gyro sample and reuses the latest acc sample.

Referenced by partial_imu_sample_push(), and rs_source_create().

◆ right_sink

struct xrt_frame_sink rs_source::right_sink

Intermediate sink for right camera frames.

Referenced by rs_source_create().

◆ rsc

struct rs_container rs_source::rsc

Container of RealSense API objects.

Referenced by rs_source_create(), and set_option_in_all_sensors().

◆ stereo

bool rs_source::stereo

Indicates whether to use one or two cameras.

Referenced by rs_source_create().

◆ stream1_index

int rs_source::stream1_index

Indicates desired stream index for first stream.

Referenced by rs_source_create().

◆ stream2_index

int rs_source::stream2_index

Indicates desired stream index for second stream.

Referenced by rs_source_create().

◆ stream_type

rs2_stream rs_source::stream_type

Indicates desired stream type for the cameras.

Referenced by rs_source_create().

◆ ui_autoexposure

bool rs_source::ui_autoexposure

Autoexposure value to set.

Referenced by rs_source_create().

◆ ui_btn_apply

struct u_var_button rs_source::ui_btn_apply

Apply changes button.

Referenced by rs_source_create().

◆ ui_exposure

struct u_var_draggable_f32 rs_source::ui_exposure

Exposure value to set.

Referenced by rs_source_create().

◆ ui_gain

struct u_var_draggable_f32 rs_source::ui_gain

Gain value to set.

Referenced by rs_source_create().

◆ ui_left_sink

struct u_sink_debug rs_source::ui_left_sink

Sink to display left frames in UI.

Referenced by receive_left_frame(), and rs_source_create().

◆ ui_right_sink

struct u_sink_debug rs_source::ui_right_sink

Sink to display right frames in UI.

Referenced by rs_source_create().

◆ video_autoexposure

bool rs_source::video_autoexposure

Indicates whether to enable autoexposure or use provided values.

Referenced by rs_source_create(), and update_options().

◆ video_change_exposure

bool rs_source::video_change_exposure

Indicates whether to overwrite external device exposure settings.

Referenced by rs_source_create().

◆ video_exposure

int rs_source::video_exposure

Indicates desired exposure time in microseconds.

Referenced by rs_source_create(), and update_options().

◆ video_format

rs2_format rs_source::video_format

Indicates desired frame color format.

Referenced by rs_source_create().

◆ video_fps

int rs_source::video_fps

Indicates desired fps.

Referenced by rs_source_create().

◆ video_gain

int rs_source::video_gain

Indicates desired gain (16-248)

Referenced by rs_source_create(), and update_options().

◆ video_height

int rs_source::video_height

Indicates desired frame height.

Referenced by rs2xrt_frame(), rs_source_create(), and rs_source_enumerate_modes().

◆ video_width

int rs_source::video_width

Indicates desired frame width.

Referenced by rs2xrt_frame(), rs_source_create(), and rs_source_enumerate_modes().

◆ xrt_video_format

enum xrt_format rs_source::xrt_video_format

corresponding format for video_format

Referenced by rs2xrt_frame(), and rs_source_enumerate_modes().


The documentation for this struct was generated from the following file: