LibMultiSense
LibMultiSense Documentation
crl::multisense::Channel Class Referenceabstract

Class which manages all communications with a MultiSense device. More...

#include <MultiSenseChannel.hh>

Public Member Functions

virtual ~Channel ()
 Destructor. More...
 
virtual Status addIsolatedCallback (image::Callback callback, DataSource imageSourceMask, void *userDataP=NULL)=0
 Add a user defined callback attached to the image streams specified by imageSourceMask. More...
 
virtual Status addIsolatedCallback (lidar::Callback callback, void *userDataP=NULL)=0
 Add a user defined callback attached to a lidar stream. More...
 
virtual Status addIsolatedCallback (pps::Callback callback, void *userDataP=NULL)=0
 Add a user defined callback attached to a pulse per-second (PPS) stream. More...
 
virtual Status addIsolatedCallback (imu::Callback callback, void *userDataP=NULL)=0
 Add a user defined callback attached to the IMU stream. More...
 
virtual Status addIsolatedCallback (compressed_image::Callback callback, DataSource imageSourceMask, void *userDataP=NULL)=0
 Add a user defined callback attached to compressed image streams. More...
 
virtual Status addIsolatedCallback (ground_surface::Callback callback, void *userDataP=NULL)=0
 Add a user defined callback attached to the Ground Surface result stream. More...
 
virtual Status addIsolatedCallback (apriltag::Callback callback, void *userDataP=NULL)=0
 Add a user defined callback attached to the AprilTag result stream. More...
 
virtual Status addIsolatedCallback (feature_detector::Callback callback, void *userDataP=NULL)=0
 Add a user defined callback attached to the feature detector stream. More...
 
virtual Status removeIsolatedCallback (image::Callback callback)=0
 Unregister a user defined image::Callback. More...
 
virtual Status removeIsolatedCallback (lidar::Callback callback)=0
 Unregister a user defined lidar::Callback. More...
 
virtual Status removeIsolatedCallback (pps::Callback callback)=0
 Unregister a user defined pps::Callback. More...
 
virtual Status removeIsolatedCallback (imu::Callback callback)=0
 Unregister a user defined imu::Callback. More...
 
virtual Status removeIsolatedCallback (compressed_image::Callback callback)=0
 Unregister a user defined compressed_image::Callback. More...
 
virtual Status removeIsolatedCallback (ground_surface::Callback callback)=0
 Unregister a user defined ground_surface::Callback. More...
 
virtual Status removeIsolatedCallback (apriltag::Callback callback)=0
 Unregister a user defined apriltag::Callback. More...
 
virtual Status removeIsolatedCallback (feature_detector::Callback callback)=0
 Unregister a user defined feature_detector::Callback. More...
 
virtual void * reserveCallbackBuffer ()=0
 Reserve image or lidar data within a isolated callback so it is available after the callback returns. More...
 
virtual Status releaseCallbackBuffer (void *referenceP)=0
 Release image or lidar data reserved within a isolated callback. More...
 
virtual Status networkTimeSynchronization (bool enabled)=0
 Enable or disable local network-based time synchronization. More...
 
virtual Status ptpTimeSynchronization (bool enabled)=0
 Enable or disable PTP synchronization to an external PTP master. More...
 
virtual Status startStreams (DataSource mask)=0
 Start streaming various DataSources from the sensor. More...
 
virtual Status stopStreams (DataSource mask)=0
 Stop specific data streams from the sensor. More...
 
virtual Status getEnabledStreams (DataSource &mask)=0
 Get the current data streams which are enabled on the sensor. More...
 
virtual Status setTriggerSource (TriggerSource s)=0
 Set a new image trigger source. More...
 
virtual Status setMotorSpeed (float rpm)=0
 Set the laser spindle rotation speed. More...
 
virtual Status getLightingConfig (lighting::Config &c)=0
 Query the on-board lighting configuration. More...
 
virtual Status setLightingConfig (const lighting::Config &c)=0
 Set the on-board lighting configuration. More...
 
virtual Status getLightingSensorStatus (lighting::SensorStatus &status)=0
 Get the status of the sensors attached to the external lighting platform. More...
 
virtual Status getSensorVersion (VersionType &version)=0
 Get the API version of the sensor firmware. More...
 
virtual Status getApiVersion (VersionType &version)=0
 Get the API version of LibMultiSense. More...
 
virtual Status getVersionInfo (system::VersionInfo &v)=0
 Get the version info for the sensor and LibMultiSense. More...
 
virtual Status getImageConfig (image::Config &c)=0
 Query the image configuration. More...
 
virtual Status setImageConfig (const image::Config &c)=0
 Set the image configuration. More...
 
virtual Status setRemoteHeadConfig (const image::RemoteHeadConfig &c)=0
 Set the current Remote Head Config. More...
 
virtual Status getRemoteHeadConfig (image::RemoteHeadConfig &c)=0
 Set the current Remote Head Config. More...
 
virtual Status getAuxImageConfig (image::AuxConfig &c)=0
 Query the aux image configuration. More...
 
virtual Status setAuxImageConfig (const image::AuxConfig &c)=0
 Set the aux image configuration. More...
 
virtual Status getImageCalibration (image::Calibration &c)=0
 Query the current camera calibration. More...
 
virtual Status setImageCalibration (const image::Calibration &c)=0
 Set the current camera calibration. More...
 
virtual Status getTransmitDelay (image::TransmitDelay &c)=0
 Query the current device network delay. More...
 
virtual Status setTransmitDelay (const image::TransmitDelay &c)=0
 Set the devices network delay (in ms). More...
 
virtual Status getPacketDelay (image::PacketDelay &c)=0
 Query the current device udp packet delay. More...
 
virtual Status setPacketDelay (const image::PacketDelay &c)=0
 Enable the camera udp packet delay. More...
 
virtual Status getLidarCalibration (lidar::Calibration &c)=0
 Query the current laser calibration. More...
 
virtual Status setLidarCalibration (const lidar::Calibration &c)=0
 Set the current laser calibration. More...
 
virtual Status getImageHistogram (int64_t frameId, image::Histogram &histogram)=0
 Get the image histogram for the image corresponding to a specified frameId. More...
 
virtual Status getPtpStatus (system::PtpStatus &ptpStatus)=0
 Get PTP status information (updates at 1Hz) More...
 
virtual Status getDeviceModes (std::vector< system::DeviceMode > &m)=0
 Query the available sensor device modes. More...
 
virtual Status getMtu (int32_t &mtu)=0
 Query the current sensor's MTU configuration. More...
 
virtual Status getMotorPos (int32_t &mtu)=0
 Query the maxon or SLB motor for its current encoder position in microradians. More...
 
virtual Status setMtu (int32_t mtu)=0
 Set the current sensor's MTU. More...
 
virtual Status getNetworkConfig (system::NetworkConfig &c)=0
 Query the current sensor's network configuration. More...
 
virtual Status setNetworkConfig (const system::NetworkConfig &c)=0
 Set the current sensor's network configuration. More...
 
virtual Status getDeviceInfo (system::DeviceInfo &info)=0
 Query the current sensor's device information. More...
 
virtual Status setDeviceInfo (const std::string &key, const system::DeviceInfo &i)=0
 Set the current sensor's device information. More...
 
virtual Status getDeviceStatus (system::StatusMessage &status)=0
 Get the current status of the device. More...
 
virtual Status getExternalCalibration (system::ExternalCalibration &calibration)=0
 Get the external calibration associated with the MultiSense device. More...
 
virtual Status setExternalCalibration (const system::ExternalCalibration &calibration)=0
 Set the external calibration associated with the MultiSense device. More...
 
virtual Status setGroundSurfaceParams (const system::GroundSurfaceParams &params)=0
 Set the ground surface parameters associated with the MultiSense device. More...
 
virtual Status setApriltagParams (const system::ApriltagParams &params)=0
 Set the apriltag parameters associated with the MultiSense device. More...
 
virtual Status setFeatureDetectorConfig (const system::FeatureDetectorConfig &params)=0
 Set the feature detector config associated with the MultiSense device. More...
 
virtual Status getFeatureDetectorConfig (system::FeatureDetectorConfig &params)=0
 Get the feature detector parameters associated with the MultiSense device. More...
 
virtual Status flashBitstream (const std::string &file)=0
 Flash a new FPGA bitstream file to the sensor. More...
 
virtual Status flashFirmware (const std::string &file)=0
 Flash a new firmware file to the sensor. More...
 
virtual Status verifyBitstream (const std::string &file)=0
 Verify that the current bitstream in the sensor's flash is the same as the bitstream specified by file. More...
 
virtual Status verifyFirmware (const std::string &file)=0
 Verify the current firmware in the sensor's flash is the same as the firmware specified by file. More...
 
virtual Status getImuInfo (uint32_t &maxSamplesPerMesage, std::vector< imu::Info > &info)=0
 Query detailed information about the current sensor's IMU. More...
 
virtual Status getImuConfig (uint32_t &samplesPerMessage, std::vector< imu::Config > &c)=0
 Query the current IMU configuration. More...
 
virtual Status setImuConfig (bool storeSettingsInFlash, uint32_t samplesPerMessage, const std::vector< imu::Config > &c)=0
 Set a new IMU configuration. More...
 
virtual Status getLargeBufferDetails (uint32_t &bufferCount, uint32_t &bufferSize)=0
 Query the suggested number and size of the image buffers. More...
 
virtual Status setLargeBuffers (const std::vector< uint8_t * > &buffers, uint32_t bufferSize)=0
 Set user allocated large buffer. More...
 
virtual Status getLocalUdpPort (uint16_t &port)=0
 Query the system-assigned local UDP port. More...
 
virtual system::ChannelStatistics getStats ()=0
 Query the statistics of the channel object. More...
 

Static Public Member Functions

static ChannelCreate (const std::string &sensorAddress)
 Create a Channel instance, used to manage all communications with a sensor. More...
 
static ChannelCreate (const std::string &sensorAddress, const RemoteHeadChannel &cameraId)
 Create a Channel instance, used to manage all communications with a sensor. More...
 
static ChannelCreate (const std::string &sensorAddress, const std::string &interfaceName)
 
static ChannelCreate (const std::string &sensorAddress, const RemoteHeadChannel &cameraId, const std::string &interfaceName)
 
static void Destroy (Channel *instanceP)
 Destroy a channel instance that was created using the static member function Channel::Create(). More...
 
static const char * statusString (Status status)
 Helper method used to get a string describing a specific status code. More...
 

Detailed Description

Class which manages all communications with a MultiSense device.

Example code to instantiate and destroy a Channel

//
// Instantiate a channel connecting to a sensor at the factory default
// IP address
channel = crl::multisense::Channel::Create("10.66.171.21");
//
// Query and send data to the sensor...
//
// Destroy the channel instance

Definition at line 69 of file MultiSenseChannel.hh.

Constructor & Destructor Documentation

◆ ~Channel()

virtual crl::multisense::Channel::~Channel ( )
inlinevirtual

Destructor.

Definition at line 143 of file MultiSenseChannel.hh.

Member Function Documentation

◆ addIsolatedCallback() [1/8]

virtual Status crl::multisense::Channel::addIsolatedCallback ( apriltag::Callback  callback,
void *  userDataP = NULL 
)
pure virtual

Add a user defined callback attached to the AprilTag result stream.

Each callback will create a unique internal thread dedicated to servicing the callback.

AprilTag data is queued per-callback. For each AprilTag callback the maximum queue depth is 5 AprilTag messages.

Adding multiple callbacks subscribing to the same AprilTag data is allowed.

AprilTag data is stored on the heap and released after returning from the callback

Parameters
callbackA user defined apriltag::Callback to send Ground Surface data to
userDataPA pointer to arbitrary user data.
Returns
A crl::multisense::Status indicating if the callback registration succeeded or failed

◆ addIsolatedCallback() [2/8]

virtual Status crl::multisense::Channel::addIsolatedCallback ( compressed_image::Callback  callback,
DataSource  imageSourceMask,
void *  userDataP = NULL 
)
pure virtual

Add a user defined callback attached to compressed image streams.

Each callback will create a unique internal thread dedicated to servicing the callback.

Adding multiple callbacks subscribing to the same compressed image data is allowed.

Compressed image data is queued per-callback. For each compressed image callback the maximum queue depth is 6 images.

Parameters
callbackA user defined compressed_image::Callback to send compressed image data to
userDataPA pointer to arbitrary user data.
Returns
A crl::multisense::Status indicating if the callback registration succeeded or failed

◆ addIsolatedCallback() [3/8]

virtual Status crl::multisense::Channel::addIsolatedCallback ( feature_detector::Callback  callback,
void *  userDataP = NULL 
)
pure virtual

Add a user defined callback attached to the feature detector stream.

Each callback will create a unique internal thread dedicated to servicing the callback.

Parameters
callbackA user defined feature_detector::Callback to send Ground Surface data to
userDataPA pointer to arbitrary user data.
Returns
A crl::multisense::Status indicating if the callback registration succeeded or failed

◆ addIsolatedCallback() [4/8]

virtual Status crl::multisense::Channel::addIsolatedCallback ( ground_surface::Callback  callback,
void *  userDataP = NULL 
)
pure virtual

Add a user defined callback attached to the Ground Surface result stream.

Each callback will create a unique internal thread dedicated to servicing the callback.

Ground Surface data is queued per-callback. For each Ground Surface callback the maximum queue depth is 5 Ground Surface messages.

Adding multiple callbacks subscribing to the same Ground Surface data is allowed.

Ground Surface data is stored on the heap and released after returning from the callback

Parameters
callbackA user defined ground_surface::Callback to send Ground Surface data to
userDataPA pointer to arbitrary user data.
Returns
A crl::multisense::Status indicating if the callback registration succeeded or failed

◆ addIsolatedCallback() [5/8]

virtual Status crl::multisense::Channel::addIsolatedCallback ( image::Callback  callback,
DataSource  imageSourceMask,
void *  userDataP = NULL 
)
pure virtual

Add a user defined callback attached to the image streams specified by imageSourceMask.

Each callback will create a unique internal thread dedicated to servicing the callback.

The image data passed to the callback are valid only until the callback returns. To reserve image data so that it persists longer than that, see member function reserveCallbackBuffer() below.

Image data is queued per-callback. For each image callback the internal queue depth is 5 images, but see member functions getLargeBufferDetails() and setLargeBuffers().

Adding multiple callbacks subscribing to the same image data is allowed. The same instance of image data will be presented to each callback with no copying done.

Multiple image types may be subscribed to simultaneously in a single callback by using an imageSourceMask argument that is the bitwise or of the appropriate DataSource values.

Multiple callbacks of differing types may be added in order to isolate image processing by thread.

Parameters
callbackA user defined image::Callback to which image data will be sent.
imageSourceMaskThe specific image types to stream to the user defined callback. Multiple image sources may be combined using the bitwise OR operator.
userDataPA pointer to arbitrary user data. This typically is a pointer to the instance of the object where the callback is defined. See image::Header for a example of this usage
Returns
A crl::multisense::Status indicating if the callback registration succeeded or failed

◆ addIsolatedCallback() [6/8]

virtual Status crl::multisense::Channel::addIsolatedCallback ( imu::Callback  callback,
void *  userDataP = NULL 
)
pure virtual

Add a user defined callback attached to the IMU stream.

Each callback will create a unique internal thread dedicated to servicing the callback.

IMU data is queued per-callback. For each IMU callback the maximum queue depth is 50 IMU messages.

Adding multiple callbacks subscribing to the same IMU data is allowed.

IMU data is stored on the heap and released after returning from the callback

Each imu::Header contains multiple IMU samples to reduce the number of UDP packets sent from the sensor.

Parameters
callbackA user defined imu::Callback to send IMU data to
userDataPA pointer to arbitrary user data.
Returns
A crl::multisense::Status indicating if the callback registration succeeded or failed

◆ addIsolatedCallback() [7/8]

virtual Status crl::multisense::Channel::addIsolatedCallback ( lidar::Callback  callback,
void *  userDataP = NULL 
)
pure virtual

Add a user defined callback attached to a lidar stream.

Each callback will create a unique internal thread dedicated to servicing the callback.

The lidar data passed to the callback are valid only until the callback returns. To reserve image data so that it persists longer than that, see member function reserveCallbackBuffer() below.

Lidar data is queued per-callback. For each lidar callback the maximum queue depth is 20 lidar scans.

Adding multiple callbacks subscribing to the same lidar data is allowed. The same instance of lidar data will be presented to each callback with no copying done.

Parameters
callbackA user defined lidar::Callback to send lidar data to
userDataPA pointer to arbitrary user data.
Returns
A crl::multisense::Status indicating if the callback registration succeeded or failed

◆ addIsolatedCallback() [8/8]

virtual Status crl::multisense::Channel::addIsolatedCallback ( pps::Callback  callback,
void *  userDataP = NULL 
)
pure virtual

Add a user defined callback attached to a pulse per-second (PPS) stream.

This PPS stream corresponds to the pulse on the OPTO-TX line.

Each callback will create a unique internal thread dedicated to servicing the callback.

PPS data is queued per-callback. For each PPS callback the maximum queue depth is 2 pps events.

Adding multiple callbacks subscribing to the same PPS data is allowed.

PPS data is stored on the heap and released after returning from the callback

Parameters
callbackA user defined pps::Callback to send PPS data to
userDataPA pointer to arbitrary user data.
Returns
A crl::multisense::Status indicating if the callback registration succeeded or failed

◆ Create() [1/4]

static Channel* crl::multisense::Channel::Create ( const std::string &  sensorAddress)
static

Create a Channel instance, used to manage all communications with a sensor.

The resulting pointer must be explicitly destroyed using the static member function Channel::Destroy().

Parameters
sensorAddressThe device IPv4 address which can be a dotted-quad, or any hostname resolvable by gethostbyname().

return A pointer to a new Channel instance

◆ Create() [2/4]

static Channel* crl::multisense::Channel::Create ( const std::string &  sensorAddress,
const RemoteHeadChannel cameraId 
)
static

Create a Channel instance, used to manage all communications with a sensor.

The resulting pointer must be explicitly destroyed using the static member function Channel::Destroy().

Parameters
sensorAddressThe device IPv4 address which can be a dotted-quad, or any hostname resolvable by gethostbyname().
cameraIdThe ID of the remote camera to connect to. This is used for newer remote head based systems which have multiple stereo cameras connected to a single FPGA for stereo processing

return A pointer to a new Channel instance

◆ Create() [3/4]

static Channel* crl::multisense::Channel::Create ( const std::string &  sensorAddress,
const RemoteHeadChannel cameraId,
const std::string &  interfaceName 
)
static
Note
(Linux only!) Create a Channel instance, used to manage all communications with a sensor. The resulting pointer must be explicitly destroyed using the static member function Channel::Destroy().
Parameters
sensorAddressThe device IPv4 address which can be a dotted-quad, or any hostname resolvable by gethostbyname().
cameraIdThe ID of the remote camera to connect to. This is used for newer remote head based systems which have multiple stereo cameras connected to a single FPGA for stereo processing
interfaceNameThe name of the network interface to bind to use for this connection. Set using the socket option SO_BINDTODEVICE
Returns
A pointer to a new Channel instance

◆ Create() [4/4]

static Channel* crl::multisense::Channel::Create ( const std::string &  sensorAddress,
const std::string &  interfaceName 
)
static
Note
(Linux only!) Create a Channel instance, used to manage all communications with a sensor. The resulting pointer must be explicitly destroyed using the static member function Channel::Destroy().
Parameters
sensorAddressThe device IPv4 address which can be a dotted-quad, or any hostname resolvable by gethostbyname().
interfaceNameThe name of the network interface to bind to using the SO_BINDTODEVICE option
Returns
A pointer to a new Channel instance

◆ Destroy()

static void crl::multisense::Channel::Destroy ( Channel instanceP)
static

Destroy a channel instance that was created using the static member function Channel::Create().

This operation should be done before exiting

Parameters
instancePA pointer to a Channel instance to be destroyed

◆ flashBitstream()

virtual Status crl::multisense::Channel::flashBitstream ( const std::string &  file)
pure virtual

Flash a new FPGA bitstream file to the sensor.

WARNING: This member should not be used directly. Improper usage can result in the sensor being inoperable. Use the MultiSenseUpdater script to update the sensor's firmware/bitstream

Parameters
fileThe path to the file containing the new sensor bitstream
Returns
A crl::multisense::Status indicating if the new bitstream was successfully flashed

◆ flashFirmware()

virtual Status crl::multisense::Channel::flashFirmware ( const std::string &  file)
pure virtual

Flash a new firmware file to the sensor.

WARNING: This member should not be used directly. Improper usage can result in the sensor being inoperable. Use the MultiSenseUpdater script to update the sensor's firmware/bitstream

Parameters
fileThe path to the file containing the new sensor firmware
Returns
A crl::multisense::Status indicating if the new firmware was successfully flashed

◆ getApiVersion()

virtual Status crl::multisense::Channel::getApiVersion ( VersionType version)
pure virtual

Get the API version of LibMultiSense.

Parameters
versionThe API version of LibMultiSense, returned by reference
Returns
A crl::multisense::Status indicating if the LibMultiSense API version query succeeded

◆ getAuxImageConfig()

virtual Status crl::multisense::Channel::getAuxImageConfig ( image::AuxConfig c)
pure virtual

Query the aux image configuration.

See image::AuxConfig for a usage example

Parameters
cThe aux image configuration returned by reference from the query
Returns
A crl::multisense::Status indicating if the image configuration query succeeded

◆ getDeviceInfo()

virtual Status crl::multisense::Channel::getDeviceInfo ( system::DeviceInfo info)
pure virtual

Query the current sensor's device information.

See system::DeviceInfo for a usage example

Parameters
infoA DeviceInfo returned by reference containing the device information for the current sensor
Returns
A crl::multisense::Status indicating if the device information query was successful

◆ getDeviceModes()

virtual Status crl::multisense::Channel::getDeviceModes ( std::vector< system::DeviceMode > &  m)
pure virtual

Query the available sensor device modes.

See system::DeviceMode for a usage example

Parameters
mA vector of possible device modes returned by reference from the sensor
Returns
A crl::multisense::Status indicating if the device mode query was successful

◆ getDeviceStatus()

virtual Status crl::multisense::Channel::getDeviceStatus ( system::StatusMessage status)
pure virtual

Get the current status of the device.

Status is updated at 1Hz and should not be queried at a higher frequency.

Parameters
statusThe status of the attached device returned by reference
Returns
A crl::multisense::Status indicating if the status was successfully queried

◆ getEnabledStreams()

virtual Status crl::multisense::Channel::getEnabledStreams ( DataSource mask)
pure virtual

Get the current data streams which are enabled on the sensor.

Parameters
maskThe current data streams which are enabled. These are returned by reference in mask
Returns
A crl::multisense::Status indicating if the getEnabledStreams query succeeded.

◆ getExternalCalibration()

virtual Status crl::multisense::Channel::getExternalCalibration ( system::ExternalCalibration calibration)
pure virtual

Get the external calibration associated with the MultiSense device.

Parameters
calibrationThe external calibration object to query from non-volatile flash
Returns
A crl::multisense::Status indicating if the calibration was successfully queried

◆ getFeatureDetectorConfig()

virtual Status crl::multisense::Channel::getFeatureDetectorConfig ( system::FeatureDetectorConfig params)
pure virtual

Get the feature detector parameters associated with the MultiSense device.

Parameters
paramsThe feature detector parameters to send to the on-camera feature detector application
Returns
A crl::multisense::Status indicating if the params were successfully set

◆ getImageCalibration()

virtual Status crl::multisense::Channel::getImageCalibration ( image::Calibration c)
pure virtual

Query the current camera calibration.

See image::Calibration for a usage example

Parameters
cA image calibration returned by reference from getImageCalibration()
Returns
A crl::multisense::Status indicating if the image calibration was successfully queried

◆ getImageConfig()

virtual Status crl::multisense::Channel::getImageConfig ( image::Config c)
pure virtual

Query the image configuration.

See image::Config for a usage example

Parameters
cThe image configuration returned by reference from the query
Returns
A crl::multisense::Status indicating if the image configuration query succeeded

◆ getImageHistogram()

virtual Status crl::multisense::Channel::getImageHistogram ( int64_t  frameId,
image::Histogram histogram 
)
pure virtual

Get the image histogram for the image corresponding to a specified frameId.

See image::Histogram for a usage example

Parameters
frameIdThe frameId of the corresponding left image to query a histogram for. Histograms can only be queried for images with frameIds fewer than 20 frameIds from the most recent image's frameId.
histogramA histogram returned by reference
Returns
A crl::multisense::Status indicating if the histogram query was successful

◆ getImuConfig()

virtual Status crl::multisense::Channel::getImuConfig ( uint32_t &  samplesPerMessage,
std::vector< imu::Config > &  c 
)
pure virtual

Query the current IMU configuration.

See imu::Config for a usage example

Parameters
samplesPerMessageThe number of samples (aggregate from all IMU types) that the sensor will queue internally before putting on the wire. Note that low settings combined with high IMU sensor rates may interfere with the acquisition and transmission of image and lidar data.
cThe current imu configuration returned by reference
Returns
A crl::multisense::Status indicating if the IMU configuration was successfully queried

◆ getImuInfo()

virtual Status crl::multisense::Channel::getImuInfo ( uint32_t &  maxSamplesPerMesage,
std::vector< imu::Info > &  info 
)
pure virtual

Query detailed information about the current sensor's IMU.

See imu::Info for a usage example

Parameters
maxSamplesPerMesageThe maximum number of IMU samples which can be aggregated in a single IMU message
infoA vector of imu::Info returned by reference. This contains all the possible configurations for each IMU sensor
Returns
A crl::multisense::Status indicating if the IMU info was successfully queried

◆ getLargeBufferDetails()

virtual Status crl::multisense::Channel::getLargeBufferDetails ( uint32_t &  bufferCount,
uint32_t &  bufferSize 
)
pure virtual

Query the suggested number and size of the image buffers.

NOTe: Other number/size can be used but it is not recommended

The channel maintains and recycles a set of large buffers used for image storage and dispatching.

Parameters
bufferCountThe number of buffers returned by reference
bufferSizeThe size of a single buffer returned by reference
Returns
A crl::multisense::Status indicating if the buffer details were successfully queried

◆ getLidarCalibration()

virtual Status crl::multisense::Channel::getLidarCalibration ( lidar::Calibration c)
pure virtual

Query the current laser calibration.

See lidar::Calibration for a usage example

Parameters
cA laser calibration returned by reference from getLidarCalibration()
Returns
A crl::multisense::Status indicating if the laser calibration was successfully queried

◆ getLightingConfig()

virtual Status crl::multisense::Channel::getLightingConfig ( lighting::Config c)
pure virtual

Query the on-board lighting configuration.

See lighting::Config for a usage example

Parameters
cA lighting configuration returned by reference
Returns
A crl::multisense::Status indicating if the lighting configuration query succeeded

◆ getLightingSensorStatus()

virtual Status crl::multisense::Channel::getLightingSensorStatus ( lighting::SensorStatus status)
pure virtual

Get the status of the sensors attached to the external lighting platform.

Parameters
statusThe status of the external lighting sensors returned by reference

◆ getLocalUdpPort()

virtual Status crl::multisense::Channel::getLocalUdpPort ( uint16_t &  port)
pure virtual

Query the system-assigned local UDP port.

Parameters
portThe local system UDP port returned by reference
Returns
A crl::multisense::Status indicating if the local UDP port was successfully queried

◆ getMotorPos()

virtual Status crl::multisense::Channel::getMotorPos ( int32_t &  mtu)
pure virtual

Query the maxon or SLB motor for its current encoder position in microradians.

Parameters
mtuAn int32_t returned by reference containing the current motor encoder position in microradians
Returns
A crl::multisense::Status indicating success if a motor was found and could report its encoder position, or fail if no motor is present.

◆ getMtu()

virtual Status crl::multisense::Channel::getMtu ( int32_t &  mtu)
pure virtual

Query the current sensor's MTU configuration.

The MTU setting controls the maximum size of the UDP packets that will be transmitted from the sensor via Ethernet. In general, larger MTU settings are preferred, but the MTU value must not exceed the MTU setting of the network interface to which the MultiSense unit is sending data.

Parameters
mtuAn int32_t returned by reference containing the current MTU setting
Returns
A crl::multisense::Status indicating if the mtu query was successful

◆ getNetworkConfig()

virtual Status crl::multisense::Channel::getNetworkConfig ( system::NetworkConfig c)
pure virtual

Query the current sensor's network configuration.

See system::NetworkConfig for a usage example

Parameters
cA NetworkConfig returned by reference containing the current sensor's network configuration
Returns
A crl::multisense::Status indicating if the network configuration query was successful

◆ getPacketDelay()

virtual Status crl::multisense::Channel::getPacketDelay ( image::PacketDelay c)
pure virtual

Query the current device udp packet delay.

Parameters
cThe udp packet delay instance which will be returned by reference
Returns
A crl::multisense::Status indicating if the udp packet delay was successfully queried

◆ getPtpStatus()

virtual Status crl::multisense::Channel::getPtpStatus ( system::PtpStatus ptpStatus)
pure virtual

Get PTP status information (updates at 1Hz)

Parameters
ptpStatusA ptpStatus obj returned by reference from the sensor
Returns
A crl::multisense::Status indicating if the PTP status query was successful

◆ getRemoteHeadConfig()

virtual Status crl::multisense::Channel::getRemoteHeadConfig ( image::RemoteHeadConfig c)
pure virtual

Set the current Remote Head Config.

Parameters
cA remoteHeadConfig returned by reference from getRemoteHeadConfig()
Returns
A crl::multisense::Status indicating if the Remote Head Config was successfully queried

◆ getSensorVersion()

virtual Status crl::multisense::Channel::getSensorVersion ( VersionType version)
pure virtual

Get the API version of the sensor firmware.

Parameters
versionThe API version of the sensor firmware, returned by reference
Returns
A crl::multisense::Status indicating if the sensor API version query succeeded

◆ getStats()

virtual system::ChannelStatistics crl::multisense::Channel::getStats ( )
pure virtual

Query the statistics of the channel object.

Returns
A crl::multisense::system::ChannelStatistics object that contains various metrics of this channel object

◆ getTransmitDelay()

virtual Status crl::multisense::Channel::getTransmitDelay ( image::TransmitDelay c)
pure virtual

Query the current device network delay.

Parameters
cThe network delay instance which will be returned by reference
Returns
A crl::multisense::Status indicating if the network delay was successfully queried

◆ getVersionInfo()

virtual Status crl::multisense::Channel::getVersionInfo ( system::VersionInfo v)
pure virtual

Get the version info for the sensor and LibMultiSense.

See system::VersionInfo for a usage example.

Parameters
vThe version information returned by reference
Returns
A crl::multisense::Status indicating if the version information query succeeded

◆ networkTimeSynchronization()

virtual Status crl::multisense::Channel::networkTimeSynchronization ( bool  enabled)
pure virtual

Enable or disable local network-based time synchronization.

Each Channel will keep a continuously updating and filtered offset between the sensor's internal clock and the local system clock.

If enabled, all sensor timestamps will be reported in the local system clock frame, after the offset has been applied.

If disabled, all sensor timestamps will be reported in the frame of the sensor's clock, which is free-running from 0 seconds on power up.

The network-based time synchronization is enabled by default.

Parameters
enabledA boolean flag which enables or disables network time synchronization
Returns
A crl::multisense::Status indicating if the network-based time synchronization was successfully enabled or disabled

◆ ptpTimeSynchronization()

virtual Status crl::multisense::Channel::ptpTimeSynchronization ( bool  enabled)
pure virtual

Enable or disable PTP synchronization to an external PTP master.

This subsumes the networkTimeSynchronization

Each Channel will keep a continuously updating and filtered offset between the sensor's internal clock and the local system clock.

If enabled, all sensor timestamps will be reported with the synchronized PTP time

If disabled, all sensor timestamps will be reported in the timebase determined by the current networkTimeSynchronization setting

The PTP-based time synchronization is disabled by default

Parameters
enabledA boolean flag which enables or disables PTP time synchronization
Returns
A crl::multisense::Status indicating if the PTP time synchronization was successfully enabled or disabled

◆ releaseCallbackBuffer()

virtual Status crl::multisense::Channel::releaseCallbackBuffer ( void *  referenceP)
pure virtual

Release image or lidar data reserved within a isolated callback.

releaseCallbackBuffer() may be called from any thread context.

Parameters
referencePA pointer to the reserved data returned by reserveCallbackBuffer()
Returns
A crl::multisense::Status indicating if the callback data buffer was successfully released

◆ removeIsolatedCallback() [1/8]

virtual Status crl::multisense::Channel::removeIsolatedCallback ( apriltag::Callback  callback)
pure virtual

Unregister a user defined apriltag::Callback.

This stops the callback from receiving ground surface data

Parameters
callbackThe user defined apriltag::Callback to unregister
Returns
A crl::multisense::Status indicating if the callback deregistration succeeded or failed

◆ removeIsolatedCallback() [2/8]

virtual Status crl::multisense::Channel::removeIsolatedCallback ( compressed_image::Callback  callback)
pure virtual

Unregister a user defined compressed_image::Callback.

This stops the callback from receiving imu data

Parameters
callbackThe user defined compressed_image::Callback to unregister
Returns
A crl::multisense::Status indicating if the callback deregistration succeeded or failed

◆ removeIsolatedCallback() [3/8]

virtual Status crl::multisense::Channel::removeIsolatedCallback ( feature_detector::Callback  callback)
pure virtual

Unregister a user defined feature_detector::Callback.

This stops the callback from receiving feature data

Parameters
callbackThe user defined feature_detector::Callback to unregister
Returns
A crl::multisense::Status indicating if the callback deregistration succeeded or failed

◆ removeIsolatedCallback() [4/8]

virtual Status crl::multisense::Channel::removeIsolatedCallback ( ground_surface::Callback  callback)
pure virtual

Unregister a user defined ground_surface::Callback.

This stops the callback from receiving ground surface data

Parameters
callbackThe user defined ground_surface::Callback to unregister
Returns
A crl::multisense::Status indicating if the callback deregistration succeeded or failed

◆ removeIsolatedCallback() [5/8]

virtual Status crl::multisense::Channel::removeIsolatedCallback ( image::Callback  callback)
pure virtual

Unregister a user defined image::Callback.

This stops the callback from receiving image data.

Parameters
callbackThe user defined image::Callback to unregister
Returns
A crl::multisense::Status indicating if the callback deregistration succeeded or failed

◆ removeIsolatedCallback() [6/8]

virtual Status crl::multisense::Channel::removeIsolatedCallback ( imu::Callback  callback)
pure virtual

Unregister a user defined imu::Callback.

This stops the callback from receiving imu data

Parameters
callbackThe user defined imu::Callback to unregister
Returns
A crl::multisense::Status indicating if the callback deregistration succeeded or failed

◆ removeIsolatedCallback() [7/8]

virtual Status crl::multisense::Channel::removeIsolatedCallback ( lidar::Callback  callback)
pure virtual

Unregister a user defined lidar::Callback.

This stops the callback from receiving lidar data

Parameters
callbackThe user defined lidar::Callback to unregister
Returns
A crl::multisense::Status indicating if the callback deregistration succeeded or failed

◆ removeIsolatedCallback() [8/8]

virtual Status crl::multisense::Channel::removeIsolatedCallback ( pps::Callback  callback)
pure virtual

Unregister a user defined pps::Callback.

This stops the callback from receiving pps data

Parameters
callbackThe user defined pps::Callback to unregister
Returns
A crl::multisense::Status indicating if the callback deregistration succeeded or failed

◆ reserveCallbackBuffer()

virtual void* crl::multisense::Channel::reserveCallbackBuffer ( )
pure virtual

Reserve image or lidar data within a isolated callback so it is available after the callback returns.

The memory buffer behind an image or lidar datum within an isolated callback may be reserved by the user. This is useful for performing data processing outside of the channel callback, without having to perform a memory copy of the sensor data.

The channel is guaranteed not to reuse the memory buffer until the user releases it back. Note that there are a limited amount of memory buffers, and care should be taken not to reserve them for too long.

Returns
A valid (non NULL) reference only when called within the context of an image or lidar callback.

◆ setApriltagParams()

virtual Status crl::multisense::Channel::setApriltagParams ( const system::ApriltagParams params)
pure virtual

Set the apriltag parameters associated with the MultiSense device.

Parameters
paramsThe apriltag parameters to send to the on-camera apriltag application
Returns
A crl::multisense::Status indicating if the params were successfully set

◆ setAuxImageConfig()

virtual Status crl::multisense::Channel::setAuxImageConfig ( const image::AuxConfig c)
pure virtual

Set the aux image configuration.

See image::AuxConfig for a usage example

Parameters
cThe new aux image configuration to send to the sensor
Returns
A crl::multisense::Status indicating if the image configuration was successfully received by the sensor

◆ setDeviceInfo()

virtual Status crl::multisense::Channel::setDeviceInfo ( const std::string &  key,
const system::DeviceInfo i 
)
pure virtual

Set the current sensor's device information.

NOTE: This function is intended for use at the factory, and is not publicly supported.

Parameters
keyThe secret key required to write new device information
iThe new DeviceInfo to write to the sensor
Returns
A crl::multisense::Status indicating if the device information was successfully received

◆ setExternalCalibration()

virtual Status crl::multisense::Channel::setExternalCalibration ( const system::ExternalCalibration calibration)
pure virtual

Set the external calibration associated with the MultiSense device.

Parameters
calibrationThe external calibration object to write to non-volatile flash
Returns
A crl::multisense::Status indicating if the calibration was successfully set

◆ setFeatureDetectorConfig()

virtual Status crl::multisense::Channel::setFeatureDetectorConfig ( const system::FeatureDetectorConfig params)
pure virtual

Set the feature detector config associated with the MultiSense device.

Parameters
paramsThe feature detector parameters to send to the on-camera feature detector application
Returns
A crl::multisense::Status indicating if the params were successfully set

◆ setGroundSurfaceParams()

virtual Status crl::multisense::Channel::setGroundSurfaceParams ( const system::GroundSurfaceParams params)
pure virtual

Set the ground surface parameters associated with the MultiSense device.

Parameters
paramsThe ground surface parameters to send to the on-camera ground surface application
Returns
A crl::multisense::Status indicating if the params were successfully set

◆ setImageCalibration()

virtual Status crl::multisense::Channel::setImageCalibration ( const image::Calibration c)
pure virtual

Set the current camera calibration.

See image::Calibration for a usage example

Parameters
cA new image calibration to send to the sensor
Returns
A crl::multisense::Status indicating if the image calibration was successfully received by the sensor

◆ setImageConfig()

virtual Status crl::multisense::Channel::setImageConfig ( const image::Config c)
pure virtual

Set the image configuration.

See image::Config for a usage example

Parameters
cThe new image configuration to send to the sensor
Returns
A crl::multisense::Status indicating if the image configuration was successfully received by the sensor

◆ setImuConfig()

virtual Status crl::multisense::Channel::setImuConfig ( bool  storeSettingsInFlash,
uint32_t  samplesPerMessage,
const std::vector< imu::Config > &  c 
)
pure virtual

Set a new IMU configuration.

See imu::Config for a usage example

IMU streams must be restarted for any configuration changes to be reflected.

Parameters
storeSettingsInFlashA boolean flag which indicated if the configuration saved in non-volatile flash on the sensor head
samplesPerMessageThe new number of IMU samples to aggregate before sending a new IMU message. If the value is zero the sensor will keep its current samplesPerMessage setting
cThe imu configuration that will be sent to the sensor.
Returns
A crl::multisense::Status indicating if the IMU configuration was successfully received

◆ setLargeBuffers()

virtual Status crl::multisense::Channel::setLargeBuffers ( const std::vector< uint8_t * > &  buffers,
uint32_t  bufferSize 
)
pure virtual

Set user allocated large buffer.

This tells the channel to use the supplied buffers in lieu of its automatically allocated internal buffers. The channel's internal buffers will be freed.

All supplied buffers must be of the same size.

Responsibility for freeing the supplied buffers after channel closure is left to the user

Parameters
buffersA vector of new buffers to use for image storage. All buffers in the vector must be of the same size
bufferSizeThe size of one buffer in the buffers vector
Returns
A crl::multisense::Status indicating if the new buffers were successfully received

◆ setLidarCalibration()

virtual Status crl::multisense::Channel::setLidarCalibration ( const lidar::Calibration c)
pure virtual

Set the current laser calibration.

See lidar::Calibration for a usage example

Parameters
cA new laser calibration to send to the sensor
Returns
A crl::multisense::Status indicating if the laser calibration was successfully received by the sensor

◆ setLightingConfig()

virtual Status crl::multisense::Channel::setLightingConfig ( const lighting::Config c)
pure virtual

Set the on-board lighting configuration.

See lighting::Config for a usage example

Parameters
cA lighting configuration to send to the sensor
Returns
A crl::multisense::Status indicating if the lighting reconfiguration succeeded

◆ setMotorSpeed()

virtual Status crl::multisense::Channel::setMotorSpeed ( float  rpm)
pure virtual

Set the laser spindle rotation speed.

A positive value rotates the laser in the counter-clockwise direction. A negative value rotates the laser in the clockwise direction.

NOTE: Only positive rotations are recommended. Full life-cycle testing has only been done using a positive rotation.

Parameters
rpmThe number of rotations per minute [-50.0, 50.0]
Returns
A crl::multisense::Status indicating if the motor speed change succeeded

◆ setMtu()

virtual Status crl::multisense::Channel::setMtu ( int32_t  mtu)
pure virtual

Set the current sensor's MTU.

Parameters
mtuThe new MTU to configure the sensor with
Returns
A crl::multisense::Status indicating if the mtu configuration was successfully received

◆ setNetworkConfig()

virtual Status crl::multisense::Channel::setNetworkConfig ( const system::NetworkConfig c)
pure virtual

Set the current sensor's network configuration.

See system::NetworkConfig for a usage example

Parameters
cA new network configuration to send to the sensor
Returns
A crl::multisense::Status indicating if the network configuration was successfully received

◆ setPacketDelay()

virtual Status crl::multisense::Channel::setPacketDelay ( const image::PacketDelay c)
pure virtual

Enable the camera udp packet delay.

Enables a small delay approx 65us between udp packets for a large stream object. Recommended for clients with poor network bandwidth. If in doubt set to false (disable)

Parameters
cThe packet delay enable field which will be returned by reference
Returns
A crl::multisense::Status indicating if the packet delay was successfully received by the sensor

◆ setRemoteHeadConfig()

virtual Status crl::multisense::Channel::setRemoteHeadConfig ( const image::RemoteHeadConfig c)
pure virtual

Set the current Remote Head Config.

Parameters
cThe new image remote head config to send to the sensor
Returns
A crl::multisense::Status indicating if the remote head configuration was successfully recieved by the sensor

◆ setTransmitDelay()

virtual Status crl::multisense::Channel::setTransmitDelay ( const image::TransmitDelay c)
pure virtual

Set the devices network delay (in ms).

Default 0ms delay Delay scales down based on a max delay setting driven by the current FPS dynamically

Parameters
cThe desired network delay in ms which will be returned by reference
Returns
A crl::multisense::Status indicating if the transmit delay was successfully received by the sensor

◆ setTriggerSource()

virtual Status crl::multisense::Channel::setTriggerSource ( TriggerSource  s)
pure virtual

Set a new image trigger source.

This is used to specify which source is used to trigger a image capture.

By default Trigger_Internal is used

Parameters
sThe new desired trigger source
Returns
A crl::multisense::Status indicating if the trigger source change succeeded

◆ startStreams()

virtual Status crl::multisense::Channel::startStreams ( DataSource  mask)
pure virtual

Start streaming various DataSources from the sensor.

This is the primary means of stream control. All streams will come to the requestor (i.e., the machine making the request with this API. The server peeks the source address and port from the request UDP packet.)

Multiple streams may be started at once by setting the individual source bits in the mask. Different streams may be started at differing times by calling startStreams() multiple times.

Parameters
maskThe DataSources to start streaming. Multiple streams can be started by performing a bitwise OR operation with various crl::multisense::DataSource definitions
Returns
A crl::multisense::Status indicating if the specified streams were successfully started

◆ statusString()

static const char* crl::multisense::Channel::statusString ( Status  status)
static

Helper method used to get a string describing a specific status code.

Parameters
statusA status code to convert to a string

return A char* corresponding to the input status code

◆ stopStreams()

virtual Status crl::multisense::Channel::stopStreams ( DataSource  mask)
pure virtual

Stop specific data streams from the sensor.

Stop streams may be called to selectively disable streams at any time. (use stopStreams(crl::multisense::Source_All) to disable all streaming.

Parameters
maskThe DataSources to stop streaming. Multiple streams can be stopped by performing a bitwise OR operation with various crl::multisense::DataSource definitions
Returns
A crl::multisense::Status indicating if the specified streams were successfully stopped

◆ verifyBitstream()

virtual Status crl::multisense::Channel::verifyBitstream ( const std::string &  file)
pure virtual

Verify that the current bitstream in the sensor's flash is the same as the bitstream specified by file.

Parameters
fileThe path to the file containing the bitstream to check
Returns
A crl::multisense::Status indicating if the bitstream specified by file is loaded in the sensor's non-volatile flash memory

◆ verifyFirmware()

virtual Status crl::multisense::Channel::verifyFirmware ( const std::string &  file)
pure virtual

Verify the current firmware in the sensor's flash is the same as the firmware specified by file.

Parameters
fileThe path to the file containing the firmware to check
Returns
A crl::multisense::Status indicating if the firmware specified by file is loaded in the sensor's non-volatile flash memory

The documentation for this class was generated from the following file:
crl::multisense::Channel
Class which manages all communications with a MultiSense device.
Definition: MultiSenseChannel.hh:69
crl::multisense::Channel::Destroy
static void Destroy(Channel *instanceP)
Destroy a channel instance that was created using the static member function Channel::Create().
crl::multisense::Channel::Create
static Channel * Create(const std::string &sensorAddress)
Create a Channel instance, used to manage all communications with a sensor.