Classes | Public Types | Public Member Functions | Static Public Member Functions | List of all members
multisense::Channel Class Referenceabstract

#include <MultiSenseChannel.hh>

Inheritance diagram for multisense::Channel:
Inheritance graph
[legend]

Classes

struct  Config
 
struct  ReceiveBufferConfig
 Certain implementations may use a fixed set of internal buffers to manage incoming camera data. For those implementations specify configurations for both small and large buffers. More...
 

Public Types

enum  ChannelImplementation { ChannelImplementation::LEGACY }
 Identifiers for the different Channel implementations. Used for selecting a implementation at runtime. More...
 

Public Member Functions

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...
 
 Channel ()=default
 
 Channel (Channel &&) noexcept=default
 
 Channel (const Channel &)=delete
 
virtual Status connect (const Config &config)=0
 Initialize the connection to the camera. More...
 
virtual void disconnect ()=0
 Disconnect from the camera. More...
 
virtual StereoCalibration get_calibration ()=0
 Get the current stereo calibration. The output calibration will correspond to the full-resolution operating mode of the camera. More...
 
virtual MultiSenseConfig get_config ()=0
 Get the current MultiSense configuration. More...
 
virtual MultiSenseInfo get_info ()=0
 Get the static information associated with 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 std::optional< MultiSenseStatusget_system_status ()=0
 Query the current system status. More...
 
Channeloperator= (Channel &&) noexcept=default
 
Channeloperator= (const Channel &)=delete
 
virtual Status set_calibration (const StereoCalibration &calibration)=0
 Set the current stereo calibration. The calibration is expected to be or the full-resolution operating mode of the camera. More...
 
virtual Status set_config (const MultiSenseConfig &config)=0
 Get set the current MultiSense configuration. More...
 
virtual Status set_device_info (const MultiSenseInfo::DeviceInfo &device_info, const std::string &key)=0
 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. More...
 
virtual Status set_network_config (const MultiSenseInfo::NetworkInfo &config, const std::optional< std::string > &broadcast_interface)=0
 Update the network configuration of the MultiSense. This will require a hardware reboot of the MultiSense after it's been successfully applied. More...
 
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. An empty collection of sources will stop all sources. More...
 
virtual ~Channel ()=default
 

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 LibMultiSense/include/MultiSense/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 LibMultiSense/include/MultiSense/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.

Implemented in multisense::legacy::LegacyChannel.

◆ 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.

Implemented in multisense::legacy::LegacyChannel.

◆ connect()

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

Initialize the connection to the camera.

Implemented in multisense::legacy::LegacyChannel.

◆ create()

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.

Definition at line 42 of file factory.cc.

◆ disconnect()

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

Disconnect from the camera.

Implemented in multisense::legacy::LegacyChannel.

◆ 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.

Implemented in multisense::legacy::LegacyChannel.

◆ get_config()

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

Get the current MultiSense configuration.

Implemented in multisense::legacy::LegacyChannel.

◆ get_info()

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

Get the static information associated with the camera.

Implemented in multisense::legacy::LegacyChannel.

◆ 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).

Implemented in multisense::legacy::LegacyChannel.

◆ 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).

Implemented in multisense::legacy::LegacyChannel.

◆ get_system_status()

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

Query the current system status.

Implemented in multisense::legacy::LegacyChannel.

◆ 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.

Implemented in multisense::legacy::LegacyChannel.

◆ set_config()

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

Get set the current MultiSense configuration.

Implemented in multisense::legacy::LegacyChannel.

◆ 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.

Implemented in multisense::legacy::LegacyChannel.

◆ set_network_config()

virtual Status multisense::Channel::set_network_config ( const MultiSenseInfo::NetworkInfo config,
const std::optional< std::string > &  broadcast_interface 
)
pure virtual

Update the network configuration of the MultiSense. This will require a hardware reboot of the MultiSense after it's been successfully applied.

Parameters
broadcast_interfaceIf specified a broadcast packet will be sent over the specified interface changing the IP address of all the camera connected to that interface

Implemented in multisense::legacy::LegacyChannel.

◆ 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.

Implemented in multisense::legacy::LegacyChannel.

◆ 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.

Implemented in multisense::legacy::LegacyChannel.


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


multisense_lib
Author(s):
autogenerated on Thu Apr 17 2025 02:49:10