LibMultiSense
LibMultiSense Documentation
Protocol.hh File Reference
#include <stdint.h>
#include "../utility/Portability.hh"
Include dependency graph for Protocol.hh:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

 crl
 
 crl::multisense
 
 crl::multisense::details
 
 crl::multisense::details::wire
 

Macros

#define MULTISENSE_WIRE_BITS_PER_PIXEL   (12)
 
#define MULTISENSE_API_BITS_PER_PIXEL   (16)
 
#define WIRE_HEADER_ATTRIBS_
 
#define MSG_ID(x)   ((wire::IdType)(x))
 
#define MSG_VER(x)   ((wire::VersionType)(x))
 
#define SER_ARRAY_1(a_, n_)
 
#define SER_ARRAY_2(a_, n_, m_)
 
#define CPY_ARRAY_1(d_, s_, n_)
 
#define CPY_ARRAY_2(d_, s_, n_, m_)
 

Typedefs

typedef uint16_t crl::multisense::details::wire::IdType
 
typedef uint16_t crl::multisense::details::wire::VersionType
 
typedef uint64_t crl::multisense::details::wire::SourceType
 

Functions

struct crl::multisense::details::wire::__attribute__ ((__packed__))
 

Variables

static CRL_CONSTEXPR uint8_t crl::multisense::details::wire::COMBINED_HEADER_LENGTH = 60
 
static CRL_CONSTEXPR uint16_t crl::multisense::details::wire::HEADER_MAGIC = 0xadad
 
static CRL_CONSTEXPR uint16_t crl::multisense::details::wire::HEADER_VERSION = 0x0100
 
static CRL_CONSTEXPR uint16_t crl::multisense::details::wire::HEADER_GROUP = 0x0001
 
 crl::multisense::details::wire::Header
 
static CRL_CONSTEXPR IdType crl::multisense::details::wire::ID_ACK = 0x0001
 
static CRL_CONSTEXPR IdType crl::multisense::details::wire::ID_CMD_GET_VERSION = 0x0002
 
static CRL_CONSTEXPR IdType crl::multisense::details::wire::ID_CMD_GET_STATUS = 0x0003
 
static CRL_CONSTEXPR IdType crl::multisense::details::wire::ID_CMD_CAM_GET_CONFIG = 0x0004
 
static CRL_CONSTEXPR IdType crl::multisense::details::wire::ID_CMD_CAM_CONTROL = 0x0007
 
static CRL_CONSTEXPR IdType crl::multisense::details::wire::ID_CMD_CAM_GET_HISTORY = 0x0008
 
static CRL_CONSTEXPR IdType crl::multisense::details::wire::ID_CMD_CAM_SET_HDR = 0x000b
 
static CRL_CONSTEXPR IdType crl::multisense::details::wire::ID_CMD_CAM_SET_RESOLUTION = 0x000c
 
static CRL_CONSTEXPR IdType crl::multisense::details::wire::ID_CMD_LIDAR_GET_CONFIG = 0x000d
 
static CRL_CONSTEXPR IdType crl::multisense::details::wire::ID_CMD_LIDAR_SET_MOTOR = 0x0010
 
static CRL_CONSTEXPR IdType crl::multisense::details::wire::ID_CMD_LED_GET_STATUS = 0x0012
 
static CRL_CONSTEXPR IdType crl::multisense::details::wire::ID_CMD_LED_SET = 0x0013
 
static CRL_CONSTEXPR IdType crl::multisense::details::wire::ID_CMD_SYS_MTU = 0x0014
 
static CRL_CONSTEXPR IdType crl::multisense::details::wire::ID_CMD_SYS_FLASH_OP = 0x0015
 
static CRL_CONSTEXPR IdType crl::multisense::details::wire::ID_CMD_SYS_SET_NETWORK = 0x0016
 
static CRL_CONSTEXPR IdType crl::multisense::details::wire::ID_CMD_SYS_GET_DEVICE_INFO = 0x0017
 
static CRL_CONSTEXPR IdType crl::multisense::details::wire::ID_CMD_SYS_GET_CAMERA_CAL = 0x0018
 
static CRL_CONSTEXPR IdType crl::multisense::details::wire::ID_CMD_SYS_GET_LIDAR_CAL = 0x0019
 
static CRL_CONSTEXPR IdType crl::multisense::details::wire::ID_CMD_SYS_GET_MTU = 0x001a
 
static CRL_CONSTEXPR IdType crl::multisense::details::wire::ID_CMD_SYS_GET_NETWORK = 0x001b
 
static CRL_CONSTEXPR IdType crl::multisense::details::wire::ID_CMD_STREAM_CONTROL = 0x001c
 
static CRL_CONSTEXPR IdType crl::multisense::details::wire::ID_CMD_SYS_GET_DEVICE_MODES = 0x001d
 
static CRL_CONSTEXPR IdType crl::multisense::details::wire::ID_CMD_CAM_SET_TRIGGER_SOURCE = 0x001e
 
static CRL_CONSTEXPR IdType crl::multisense::details::wire::ID_CMD_IMU_GET_INFO = 0x001f
 
static CRL_CONSTEXPR IdType crl::multisense::details::wire::ID_CMD_IMU_GET_CONFIG = 0x0020
 
static CRL_CONSTEXPR IdType crl::multisense::details::wire::ID_CMD_SYS_TEST_MTU = 0x0021
 
static CRL_CONSTEXPR IdType crl::multisense::details::wire::ID_CMD_SYS_GET_DIRECTED_STREAMS = 0x0022
 
static CRL_CONSTEXPR IdType crl::multisense::details::wire::ID_CMD_SYS_GET_SENSOR_CAL = 0x0023
 
static CRL_CONSTEXPR IdType crl::multisense::details::wire::ID_CMD_SYS_GET_EXTERNAL_CAL = 0x0024
 
static CRL_CONSTEXPR IdType crl::multisense::details::wire::ID_CMD_LED_GET_SENSOR_STATUS = 0x0025
 
static CRL_CONSTEXPR IdType crl::multisense::details::wire::ID_CMD_SYS_SET_TRANSMIT_DELAY = 0x0026
 
static CRL_CONSTEXPR IdType crl::multisense::details::wire::ID_CMD_SYS_GET_TRANSMIT_DELAY = 0x0027
 
static CRL_CONSTEXPR IdType crl::multisense::details::wire::ID_CMD_SYS_MOTOR_POLL = 0x0028
 
static CRL_CONSTEXPR IdType crl::multisense::details::wire::ID_CMD_SYS_SET_PTP = 0x0029
 
static CRL_CONSTEXPR IdType crl::multisense::details::wire::ID_CMD_CAM_AUX_CONTROL = 0x002a
 
static CRL_CONSTEXPR IdType crl::multisense::details::wire::ID_CMD_CAM_GET_AUX_CONFIG = 0x002b
 
static CRL_CONSTEXPR IdType crl::multisense::details::wire::ID_CMD_REMOTE_HEAD_GET_CONFIG = 0x002c
 
static CRL_CONSTEXPR IdType crl::multisense::details::wire::ID_CMD_REMOTE_HEAD_CONTROL = 0x002d
 
static CRL_CONSTEXPR IdType crl::multisense::details::wire::ID_CMD_GET_PTP_STATUS = 0x002e
 
static CRL_CONSTEXPR IdType crl::multisense::details::wire::ID_CMD_SYS_SET_PACKET_DELAY = 0x002f
 
static CRL_CONSTEXPR IdType crl::multisense::details::wire::ID_CMD_SYS_GET_PACKET_DELAY = 0x0030
 
static CRL_CONSTEXPR IdType crl::multisense::details::wire::ID_CMD_SECONDARY_APP_GET_CONFIG = 0x0031
 
static CRL_CONSTEXPR IdType crl::multisense::details::wire::ID_CMD_SECONDARY_APP_CONTROL = 0x0032
 
static CRL_CONSTEXPR IdType crl::multisense::details::wire::ID_CMD_SECONDARY_APP_GET_REGISTERED_APPS = 0x0033
 
static CRL_CONSTEXPR IdType crl::multisense::details::wire::ID_CMD_SECONDARY_APP_ACTIVATE = 0x0034
 
static CRL_CONSTEXPR IdType crl::multisense::details::wire::ID_DATA_VERSION = 0x0102
 
static CRL_CONSTEXPR IdType crl::multisense::details::wire::ID_DATA_STATUS = 0x0103
 
static CRL_CONSTEXPR IdType crl::multisense::details::wire::ID_DATA_CAM_CONFIG = 0x0104
 
static CRL_CONSTEXPR IdType crl::multisense::details::wire::ID_DATA_CAM_HISTORY = 0x0105
 
static CRL_CONSTEXPR IdType crl::multisense::details::wire::ID_DATA_LIDAR_CONFIG = 0x0108
 
static CRL_CONSTEXPR IdType crl::multisense::details::wire::ID_DATA_LIDAR_SCAN = 0x0109
 
static CRL_CONSTEXPR IdType crl::multisense::details::wire::ID_DATA_LED_STATUS = 0x010a
 
static CRL_CONSTEXPR IdType crl::multisense::details::wire::ID_DATA_SYS_FLASH_RESPONSE = 0x010b
 
static CRL_CONSTEXPR IdType crl::multisense::details::wire::ID_DATA_SYS_DEVICE_INFO = 0x010c
 
static CRL_CONSTEXPR IdType crl::multisense::details::wire::ID_DATA_SYS_CAMERA_CAL = 0x010d
 
static CRL_CONSTEXPR IdType crl::multisense::details::wire::ID_DATA_SYS_LIDAR_CAL = 0x010e
 
static CRL_CONSTEXPR IdType crl::multisense::details::wire::ID_DATA_IMAGE_META = 0x010f
 
static CRL_CONSTEXPR IdType crl::multisense::details::wire::ID_DATA_IMAGE = 0x0110
 
static CRL_CONSTEXPR IdType crl::multisense::details::wire::ID_DATA_DISPARITY = 0x0111
 
static CRL_CONSTEXPR IdType crl::multisense::details::wire::ID_DATA_SYS_DEVICE_MODES = 0x0112
 
static CRL_CONSTEXPR IdType crl::multisense::details::wire::ID_DATA_SYS_PPS = 0x0113
 
static CRL_CONSTEXPR IdType crl::multisense::details::wire::ID_DATA_IMU = 0x0114
 
static CRL_CONSTEXPR IdType crl::multisense::details::wire::ID_DATA_IMU_INFO = 0x0115
 
static CRL_CONSTEXPR IdType crl::multisense::details::wire::ID_DATA_IMU_CONFIG = 0x0116
 
static CRL_CONSTEXPR IdType crl::multisense::details::wire::ID_DATA_SYS_TEST_MTU_RESPONSE = 0x0117
 
static CRL_CONSTEXPR IdType crl::multisense::details::wire::ID_DATA_JPEG_IMAGE = 0x0118
 
static CRL_CONSTEXPR IdType crl::multisense::details::wire::ID_DATA_SYS_DIRECTED_STREAMS = 0x0119
 
static CRL_CONSTEXPR IdType crl::multisense::details::wire::ID_DATA_SYS_SENSOR_CAL = 0x011a
 
static CRL_CONSTEXPR IdType crl::multisense::details::wire::ID_DATA_SYS_EXTERNAL_CAL = 0x011b
 
static CRL_CONSTEXPR IdType crl::multisense::details::wire::ID_DATA_LED_SENSOR_STATUS = 0x011c
 
static CRL_CONSTEXPR IdType crl::multisense::details::wire::ID_DATA_SYS_MOTOR_POLL = 0x011d
 
static CRL_CONSTEXPR IdType crl::multisense::details::wire::ID_DATA_EXPOSURE_CONFIG = 0x011e
 
static CRL_CONSTEXPR IdType crl::multisense::details::wire::ID_DATA_GROUND_SURFACE_SPLINE_DATA_MESSAGE = 0x011f
 
static CRL_CONSTEXPR IdType crl::multisense::details::wire::ID_DATA_COMPRESSED_IMAGE = 0x0120
 
static CRL_CONSTEXPR IdType crl::multisense::details::wire::ID_DATA_SYS_GROUND_SURFACE_PARAM = 0x0121
 
static CRL_CONSTEXPR IdType crl::multisense::details::wire::ID_DATA_APRILTAG_DETECTIONS_MESSAGE = 0x0122
 
static CRL_CONSTEXPR IdType crl::multisense::details::wire::ID_DATA_SYS_APRILTAG_PARAM = 0x0123
 
static CRL_CONSTEXPR IdType crl::multisense::details::wire::ID_DATA_CAM_AUX_CONFIG = 0x0124
 
static CRL_CONSTEXPR IdType crl::multisense::details::wire::ID_CMD_REMOTE_HEAD_CONFIG = 0x0125
 
static CRL_CONSTEXPR IdType crl::multisense::details::wire::ID_DATA_PTP_STATUS = 0x0126
 
static CRL_CONSTEXPR IdType crl::multisense::details::wire::ID_DATA_SYS_PACKET_DELAY = 0x0127
 
static CRL_CONSTEXPR IdType crl::multisense::details::wire::ID_DATA_SECONDARY_APP_META = 0x0128
 
static CRL_CONSTEXPR IdType crl::multisense::details::wire::ID_DATA_SECONDARY_APP = 0x0129
 
static CRL_CONSTEXPR IdType crl::multisense::details::wire::ID_DATA_SECONDARY_APP_CONFIG = 0x012A
 
static CRL_CONSTEXPR IdType crl::multisense::details::wire::ID_DATA_SECONDARY_APP_REGISTERED_APPS = 0x012B
 
static CRL_CONSTEXPR SourceType crl::multisense::details::wire::SOURCE_UNKNOWN = 0
 
static CRL_CONSTEXPR SourceType crl::multisense::details::wire::SOURCE_RAW_LEFT = (1ull<<0)
 
static CRL_CONSTEXPR SourceType crl::multisense::details::wire::SOURCE_RAW_RIGHT = (1ull<<1)
 
static CRL_CONSTEXPR SourceType crl::multisense::details::wire::SOURCE_LUMA_LEFT = (1ull<<2)
 
static CRL_CONSTEXPR SourceType crl::multisense::details::wire::SOURCE_LUMA_RIGHT = (1ull<<3)
 
static CRL_CONSTEXPR SourceType crl::multisense::details::wire::SOURCE_LUMA_RECT_LEFT = (1ull<<4)
 
static CRL_CONSTEXPR SourceType crl::multisense::details::wire::SOURCE_LUMA_RECT_RIGHT = (1ull<<5)
 
static CRL_CONSTEXPR SourceType crl::multisense::details::wire::SOURCE_CHROMA_LEFT = (1ull<<6)
 
static CRL_CONSTEXPR SourceType crl::multisense::details::wire::SOURCE_CHROMA_RIGHT = (1ull<<7)
 
static CRL_CONSTEXPR SourceType crl::multisense::details::wire::SOURCE_CHROMA_RECT_AUX = (1ull<<8)
 
static CRL_CONSTEXPR SourceType crl::multisense::details::wire::SOURCE_DISPARITY = (1ull<<10)
 
static CRL_CONSTEXPR SourceType crl::multisense::details::wire::SOURCE_DISPARITY_LEFT = (1ull<<10)
 
static CRL_CONSTEXPR SourceType crl::multisense::details::wire::SOURCE_DISPARITY_RIGHT = (1ull<<11)
 
static CRL_CONSTEXPR SourceType crl::multisense::details::wire::SOURCE_DISPARITY_COST = (1ull<<12)
 
static CRL_CONSTEXPR SourceType crl::multisense::details::wire::SOURCE_JPEG_LEFT = (1ull<<16)
 
static CRL_CONSTEXPR SourceType crl::multisense::details::wire::SOURCE_RGB_LEFT = (1ull<<17)
 
static CRL_CONSTEXPR SourceType crl::multisense::details::wire::SOURCE_GROUND_SURFACE_SPLINE_DATA = (1ull<<20)
 
static CRL_CONSTEXPR SourceType crl::multisense::details::wire::SOURCE_GROUND_SURFACE_CLASS_IMAGE = (1ull<<22)
 
static CRL_CONSTEXPR SourceType crl::multisense::details::wire::SOURCE_APRILTAG_DETECTIONS = (1ull<<21)
 
static CRL_CONSTEXPR SourceType crl::multisense::details::wire::SOURCE_SLB_MOTOR = (1ull<<23)
 
static CRL_CONSTEXPR SourceType crl::multisense::details::wire::SOURCE_LIDAR_SCAN = (1ull<<24)
 
static CRL_CONSTEXPR SourceType crl::multisense::details::wire::SOURCE_IMU = (1ull<<25)
 
static CRL_CONSTEXPR SourceType crl::multisense::details::wire::SOURCE_PPS = (1ull<<26)
 
static CRL_CONSTEXPR SourceType crl::multisense::details::wire::SOURCE_RAW_AUX = (1ull<<27)
 
static CRL_CONSTEXPR SourceType crl::multisense::details::wire::SOURCE_LUMA_AUX = (1ull<<28)
 
static CRL_CONSTEXPR SourceType crl::multisense::details::wire::SOURCE_LUMA_RECT_AUX = (1ull<<29)
 
static CRL_CONSTEXPR SourceType crl::multisense::details::wire::SOURCE_CHROMA_AUX = (1ull<<30)
 
static CRL_CONSTEXPR SourceType crl::multisense::details::wire::SOURCE_DISPARITY_AUX = (1ull<<31)
 
static CRL_CONSTEXPR SourceType crl::multisense::details::wire::SOURCE_COMPRESSED_LEFT = (1ull<<9)
 
static CRL_CONSTEXPR SourceType crl::multisense::details::wire::SOURCE_COMPRESSED_RIGHT = (1ull<<13)
 
static CRL_CONSTEXPR SourceType crl::multisense::details::wire::SOURCE_COMPRESSED_AUX = (1ull<<14)
 
static CRL_CONSTEXPR SourceType crl::multisense::details::wire::SOURCE_COMPRESSED_RECTIFIED_LEFT = (1ull<<15)
 
static CRL_CONSTEXPR SourceType crl::multisense::details::wire::SOURCE_COMPRESSED_RECTIFIED_RIGHT = (1ull<<16)
 
static CRL_CONSTEXPR SourceType crl::multisense::details::wire::SOURCE_COMPRESSED_RECTIFIED_AUX = (1ull<<17)
 
static CRL_CONSTEXPR SourceType crl::multisense::details::wire::SOURCE_SECONDARY_APP_DATA_0 = (1ull<<18)
 
static CRL_CONSTEXPR SourceType crl::multisense::details::wire::SOURCE_SECONDARY_APP_DATA_1 = (1ull<<19)
 
static CRL_CONSTEXPR SourceType crl::multisense::details::wire::SOURCE_SECONDARY_APP_DATA_2 = (1ull<<32)
 
static CRL_CONSTEXPR SourceType crl::multisense::details::wire::SOURCE_SECONDARY_APP_DATA_3 = (1ull<<33)
 
static CRL_CONSTEXPR SourceType crl::multisense::details::wire::SOURCE_SECONDARY_APP_DATA_4 = (1ull<<34)
 
static CRL_CONSTEXPR SourceType crl::multisense::details::wire::SOURCE_SECONDARY_APP_DATA_5 = (1ull<<35)
 
static CRL_CONSTEXPR SourceType crl::multisense::details::wire::SOURCE_SECONDARY_APP_DATA
 
static CRL_CONSTEXPR SourceType crl::multisense::details::wire::SOURCE_IMAGES
 
static CRL_CONSTEXPR SourceType crl::multisense::details::wire::Default_Exposure_Source = SOURCE_LUMA_LEFT
 
static CRL_CONSTEXPR float crl::multisense::details::wire::Default_Target_Intensity = 0.5f
 
static CRL_CONSTEXPR float crl::multisense::details::wire::Default_Gamma = 2.0f
 
static CRL_CONSTEXPR float crl::multisense::details::wire::Default_Gain = 1.0f
 
static CRL_CONSTEXPR uint32_t crl::multisense::details::wire::MAX_LIGHTS = 8
 
static CRL_CONSTEXPR float crl::multisense::details::wire::WIRE_IMAGER_GAIN_MAX = 1000.0f
 

Detailed Description

Copyright 2013-2025 Carnegie Robotics, LLC 4501 Hatfield Street, Pittsburgh, PA 15201 http://www.carnegierobotics.com

All rights reserved.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

  • Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
  • Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
  • Neither the name of the Carnegie Robotics, LLC nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL CARNEGIE ROBOTICS, LLC BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

Significant history (date, user, job code, action): 2013-05-07, ekrat.nosp@m.zer@.nosp@m.carne.nosp@m.gier.nosp@m.oboti.nosp@m.cs.c.nosp@m.om, PR1044, Created file. 2024-04-12, hshib.nosp@m.ata@.nosp@m.carne.nosp@m.gier.nosp@m.oboti.nosp@m.cs.c.nosp@m.om, IRAD.2033.1, support mingw64

Definition in file Protocol.hh.

Macro Definition Documentation

◆ CPY_ARRAY_1

#define CPY_ARRAY_1 (   d_,
  s_,
  n_ 
)
Value:
for(uint32_t i_=0; i_<(n_); i_++) \
(d_)[i_] = (s_)[i_]; \

Definition at line 356 of file Protocol.hh.

◆ CPY_ARRAY_2

#define CPY_ARRAY_2 (   d_,
  s_,
  n_,
  m_ 
)
Value:
for(uint32_t i_=0; i_<(n_); i_++) \
for(uint32_t j_=0; j_<(m_); j_++) \
(d_)[i_][j_] = (s_)[i_][j_]; \

Definition at line 360 of file Protocol.hh.

◆ MSG_ID

#define MSG_ID (   x)    ((wire::IdType)(x))

Definition at line 344 of file Protocol.hh.

◆ MSG_VER

#define MSG_VER (   x)    ((wire::VersionType)(x))

Definition at line 345 of file Protocol.hh.

◆ MULTISENSE_API_BITS_PER_PIXEL

#define MULTISENSE_API_BITS_PER_PIXEL   (16)

Definition at line 51 of file Protocol.hh.

◆ MULTISENSE_WIRE_BITS_PER_PIXEL

#define MULTISENSE_WIRE_BITS_PER_PIXEL   (12)

Definition at line 47 of file Protocol.hh.

◆ SER_ARRAY_1

#define SER_ARRAY_1 (   a_,
  n_ 
)
Value:
for(uint32_t i_=0; i_<(n_); i_++) \
message & (a_)[i_]; \

Definition at line 347 of file Protocol.hh.

◆ SER_ARRAY_2

#define SER_ARRAY_2 (   a_,
  n_,
  m_ 
)
Value:
for(uint32_t i_=0; i_<(n_); i_++) \
for(uint32_t j_=0; j_<(m_); j_++) \
message & (a_)[(i_)][(j_)]; \

Definition at line 351 of file Protocol.hh.

◆ WIRE_HEADER_ATTRIBS_

#define WIRE_HEADER_ATTRIBS_

Definition at line 65 of file Protocol.hh.