LibMultiSense
LibMultiSense Documentation
multisense::Channel Class Referenceabstract

#include <MultiSenseChannel.hh>

Classes

struct  Config
 
struct  ReceiveBufferConfig
 Certain implementations may use a fixed set of internal buffers to manage incoming camera data. More...
 

Public Types

enum  ChannelImplementation { ChannelImplementation::LEGACY }
 Identifiers for the different Channel implementations. More...
 

Public Member Functions

 Channel ()=default
 
 Channel (const Channel &)=delete
 Non-copyable. More...
 
Channeloperator= (const Channel &)=delete
 
 Channel (Channel &&) noexcept=default
 Movable. More...
 
Channeloperator= (Channel &&) noexcept=default
 
virtual ~Channel ()=default
 
virtual Status start_streams (const std::vector< DataSource > &sources)=0
 Start a collection of data sources streaming from the camera. More...
 
virtual Status stop_streams (const std::vector< DataSource > &sources)=0
 Stop specific data sources from streaming from the camera. More...
 
virtual void add_image_frame_callback (std::function< void(const ImageFrame &)> callback)=0
 Setup user callback that will be invoked whenever a new image frame is received. More...
 
virtual void add_imu_frame_callback (std::function< void(const ImuFrame &)> callback)=0
 Setup user callback that will be invoked whenever a new imu frame is received. More...
 
virtual Status connect (const Config &config)=0
 Initialize the connection to the camera. More...
 
virtual void disconnect ()=0
 Disconnect from the camera. More...
 
virtual std::optional< ImageFrameget_next_image_frame ()=0
 A blocking call that waits for one image frame from the camera. More...
 
virtual std::optional< ImuFrameget_next_imu_frame ()=0
 A blocking call that waits for one imu frame from the camera. More...
 
virtual MultiSenseConfig get_config ()=0
 Get the current MultiSense configuration. More...
 
virtual Status set_config (const MultiSenseConfig &config)=0
 Get set the current MultiSense configuration. More...
 
virtual StereoCalibration get_calibration ()=0
 Get the current stereo calibration. More...
 
virtual Status set_calibration (const StereoCalibration &calibration)=0
 Set the current stereo calibration. More...
 
virtual MultiSenseInfo get_info ()=0
 Get the static information associated with the camera. More...
 
virtual Status set_device_info (const MultiSenseInfo::DeviceInfo &device_info, const std::string &key)=0
 Set the camera's device info. More...
 
virtual std::optional< MultiSenseStatusget_system_status ()=0
 Query the current system status. More...
 
virtual Status set_network_config (const MultiSenseInfo::NetworkInfo &config)=0
 Update the network configuration of the MultiSense. More...
 

Static Public Member Functions

static std::unique_ptr< Channelcreate (const Config &config, const ChannelImplementation &impl=ChannelImplementation::LEGACY)
 Factory create function which allows for switching between different channel implementations. More...
 

Detailed Description

Definition at line 46 of file MultiSenseChannel.hh.

Member Enumeration Documentation

◆ ChannelImplementation

Identifiers for the different Channel implementations.

Used for selecting a implementation at runtime

Enumerator
LEGACY 

Use the Legacy MultiSense wire protocol implemented as part of LibMultiSense.

Definition at line 52 of file MultiSenseChannel.hh.

Constructor & Destructor Documentation

◆ Channel() [1/3]

multisense::Channel::Channel ( )
default

◆ Channel() [2/3]

multisense::Channel::Channel ( const Channel )
delete

Non-copyable.

◆ Channel() [3/3]

multisense::Channel::Channel ( Channel &&  )
defaultnoexcept

Movable.

◆ ~Channel()

virtual multisense::Channel::~Channel ( )
virtualdefault

Member Function Documentation

◆ add_image_frame_callback()

virtual void multisense::Channel::add_image_frame_callback ( std::function< void(const ImageFrame &)>  callback)
pure virtual

Setup user callback that will be invoked whenever a new image frame is received.

◆ add_imu_frame_callback()

virtual void multisense::Channel::add_imu_frame_callback ( std::function< void(const ImuFrame &)>  callback)
pure virtual

Setup user callback that will be invoked whenever a new imu frame is received.

◆ connect()

virtual Status multisense::Channel::connect ( const Config config)
pure virtual

Initialize the connection to the camera.

◆ create()

static std::unique_ptr<Channel> multisense::Channel::create ( const Config config,
const ChannelImplementation impl = ChannelImplementation::LEGACY 
)
static

Factory create function which allows for switching between different channel implementations.

◆ disconnect()

virtual void multisense::Channel::disconnect ( )
pure virtual

Disconnect from the camera.

◆ get_calibration()

virtual StereoCalibration multisense::Channel::get_calibration ( )
pure virtual

Get the current stereo calibration.

The output calibration will correspond to the full-resolution operating mode of the camera

◆ get_config()

virtual MultiSenseConfig multisense::Channel::get_config ( )
pure virtual

Get the current MultiSense configuration.

◆ get_info()

virtual MultiSenseInfo multisense::Channel::get_info ( )
pure virtual

Get the static information associated with the camera.

◆ get_next_image_frame()

virtual std::optional<ImageFrame> multisense::Channel::get_next_image_frame ( )
pure virtual

A blocking call that waits for one image frame from the camera.

If you’ve set a receive timeout (via Config), it will block until that timeout expires; otherwise, it blocks indefinitely until data arrives.

Returns
The newly received ImageFrame, or std::nullopt if timed out (and you used a timeout).

◆ get_next_imu_frame()

virtual std::optional<ImuFrame> multisense::Channel::get_next_imu_frame ( )
pure virtual

A blocking call that waits for one imu frame from the camera.

If you’ve set a receive timeout (via Config), it will block until that timeout expires; otherwise, it blocks indefinitely until data arrives.

Returns
The newly received ImuFrame, or std::nullopt if timed out (and you used a timeout).

◆ get_system_status()

virtual std::optional<MultiSenseStatus> multisense::Channel::get_system_status ( )
pure virtual

Query the current system status.

◆ operator=() [1/2]

Channel& multisense::Channel::operator= ( Channel &&  )
defaultnoexcept

◆ operator=() [2/2]

Channel& multisense::Channel::operator= ( const Channel )
delete

◆ set_calibration()

virtual Status multisense::Channel::set_calibration ( const StereoCalibration calibration)
pure virtual

Set the current stereo calibration.

The calibration is expected to be or the full-resolution operating mode of the camera

◆ set_config()

virtual Status multisense::Channel::set_config ( const MultiSenseConfig config)
pure virtual

Get set the current MultiSense configuration.

◆ set_device_info()

virtual Status multisense::Channel::set_device_info ( const MultiSenseInfo::DeviceInfo device_info,
const std::string &  key 
)
pure virtual

Set the camera's device info.

This setting is protected via a key since invalid values in the device info can result in internal camera failures

◆ set_network_config()

virtual Status multisense::Channel::set_network_config ( const MultiSenseInfo::NetworkInfo config)
pure virtual

Update the network configuration of the MultiSense.

This will require a hardware reboot of the MultiSense after it's been succeffully applied

◆ start_streams()

virtual Status multisense::Channel::start_streams ( const std::vector< DataSource > &  sources)
pure virtual

Start a collection of data sources streaming from the camera.

◆ stop_streams()

virtual Status multisense::Channel::stop_streams ( const std::vector< DataSource > &  sources)
pure virtual

Stop specific data sources from streaming from the camera.

An empty collection of sources will stop all sources


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