37 #ifndef LibMultiSense_details_wire_protocol 38 #define LibMultiSense_details_wire_protocol 42 #include "../utility/Portability.hh" 45 namespace multisense {
52 #ifdef SENSORPOD_FIRMWARE 53 #define WIRE_HEADER_ATTRIBS_ __attribute__ ((__packed__)) 55 #define WIRE_HEADER_ATTRIBS_ 56 #endif // SENSORPOD_FIRMWARE 77 #if defined (_MSC_VER) 106 uint16_t sequenceIdentifier;
111 uint32_t messageLength;
119 #if defined (_MSC_VER) 235 SOURCE_LUMA_RECT_LEFT |
236 SOURCE_LUMA_RECT_RIGHT |
238 SOURCE_CHROMA_RIGHT |
239 SOURCE_DISPARITY_LEFT |
240 SOURCE_DISPARITY_RIGHT |
241 SOURCE_DISPARITY_COST |
248 #define MSG_ID(x) ((wire::IdType)(x)) 249 #define MSG_VER(x) ((wire::VersionType)(x)) 251 #define SER_ARRAY_1(a_,n_) \ 252 for(uint32_t i_=0; i_<(n_); i_++) \ 253 message & (a_)[i_]; \ 255 #define SER_ARRAY_2(a_,n_,m_) \ 256 for(uint32_t i_=0; i_<(n_); i_++) \ 257 for(uint32_t j_=0; j_<(m_); j_++) \ 258 message & (a_)[(i_)][(j_)]; \ 260 #define CPY_ARRAY_1(d_,s_,n_) \ 261 for(uint32_t i_=0; i_<(n_); i_++) \ 262 (d_)[i_] = (s_)[i_]; \ 264 #define CPY_ARRAY_2(d_,s_,n_,m_) \ 265 for(uint32_t i_=0; i_<(n_); i_++) \ 266 for(uint32_t j_=0; j_<(m_); j_++) \ 267 (d_)[i_][j_] = (s_)[i_][j_]; \ static CRL_CONSTEXPR IdType ID_CMD_SYS_GET_CAMERA_CAL
static CRL_CONSTEXPR IdType ID_CMD_CAM_GET_HISTORY
static CRL_CONSTEXPR IdType ID_DATA_LED_STATUS
static CRL_CONSTEXPR IdType ID_CMD_STREAM_CONTROL
static CRL_CONSTEXPR SourceType SOURCE_DISPARITY
struct __attribute__((__packed__))
static CRL_CONSTEXPR IdType ID_CMD_LIDAR_SET_MOTOR
static CRL_CONSTEXPR IdType ID_CMD_CAM_CONTROL
static CRL_CONSTEXPR IdType ID_DATA_SYS_TEST_MTU_RESPONSE
static CRL_CONSTEXPR IdType ID_DATA_IMAGE
static CRL_CONSTEXPR IdType ID_CMD_SYS_SET_TRANSMIT_DELAY
static CRL_CONSTEXPR SourceType SOURCE_DISPARITY_RIGHT
static CRL_CONSTEXPR IdType ID_DATA_IMU
static CRL_CONSTEXPR IdType ID_CMD_IMU_GET_INFO
static CRL_CONSTEXPR IdType ID_CMD_LED_GET_SENSOR_STATUS
static CRL_CONSTEXPR IdType ID_DATA_STATUS
static CRL_CONSTEXPR IdType ID_DATA_SYS_EXTERNAL_CAL
static CRL_CONSTEXPR IdType ID_DATA_SYS_DIRECTED_STREAMS
static CRL_CONSTEXPR SourceType SOURCE_IMAGES
static CRL_CONSTEXPR IdType ID_DATA_IMU_INFO
static CRL_CONSTEXPR IdType ID_CMD_SYS_GET_LIDAR_CAL
static CRL_CONSTEXPR IdType ID_DATA_SYS_SENSOR_CAL
static CRL_CONSTEXPR uint8_t COMBINED_HEADER_LENGTH
static CRL_CONSTEXPR SourceType SOURCE_LUMA_LEFT
static CRL_CONSTEXPR IdType ID_CMD_GET_STATUS
static CRL_CONSTEXPR IdType ID_CMD_SYS_GET_SENSOR_CAL
static CRL_CONSTEXPR SourceType SOURCE_DISPARITY_LEFT
static CRL_CONSTEXPR IdType ID_DATA_CAM_HISTORY
static CRL_CONSTEXPR IdType ID_CMD_SYS_GET_DIRECTED_STREAMS
static CRL_CONSTEXPR IdType ID_DATA_SYS_DEVICE_INFO
static CRL_CONSTEXPR uint16_t HEADER_VERSION
static CRL_CONSTEXPR IdType ID_DATA_DISPARITY
static CRL_CONSTEXPR IdType ID_CMD_CAM_GET_CONFIG
static CRL_CONSTEXPR SourceType SOURCE_CHROMA_RIGHT
static CRL_CONSTEXPR IdType ID_CMD_CAM_SET_HDR
static CRL_CONSTEXPR IdType ID_DATA_LED_SENSOR_STATUS
static CRL_CONSTEXPR IdType ID_CMD_LIDAR_GET_CONFIG
static CRL_CONSTEXPR SourceType SOURCE_LUMA_RECT_RIGHT
static CRL_CONSTEXPR IdType ID_DATA_JPEG_IMAGE
static CRL_CONSTEXPR IdType ID_CMD_SYS_GET_EXTERNAL_CAL
static CRL_CONSTEXPR IdType ID_DATA_CAM_CONFIG
static CRL_CONSTEXPR IdType ID_DATA_VERSION
static CRL_CONSTEXPR IdType ID_CMD_SYS_FLASH_OP
static CRL_CONSTEXPR IdType ID_DATA_IMU_CONFIG
static CRL_CONSTEXPR SourceType SOURCE_CHROMA_LEFT
static CRL_CONSTEXPR SourceType SOURCE_UNKNOWN
static CRL_CONSTEXPR SourceType SOURCE_RAW_RIGHT
static CRL_CONSTEXPR IdType ID_DATA_IMAGE_META
static CRL_CONSTEXPR IdType ID_CMD_SYS_GET_DEVICE_MODES
static CRL_CONSTEXPR IdType ID_CMD_GET_VERSION
static CRL_CONSTEXPR SourceType SOURCE_IMU
static CRL_CONSTEXPR IdType ID_CMD_LED_GET_STATUS
static CRL_CONSTEXPR IdType ID_DATA_SYS_DEVICE_MODES
static CRL_CONSTEXPR SourceType SOURCE_LUMA_RECT_LEFT
static CRL_CONSTEXPR uint16_t HEADER_MAGIC
static CRL_CONSTEXPR SourceType SOURCE_DISPARITY_COST
static CRL_CONSTEXPR IdType ID_CMD_CAM_SET_RESOLUTION
static CRL_CONSTEXPR IdType ID_DATA_SYS_PPS
static CRL_CONSTEXPR SourceType SOURCE_RGB_LEFT
static CRL_CONSTEXPR IdType ID_CMD_SYS_GET_NETWORK
static CRL_CONSTEXPR IdType ID_CMD_SYS_GET_MTU
static CRL_CONSTEXPR IdType ID_ACK
static CRL_CONSTEXPR IdType ID_CMD_CAM_SET_TRIGGER_SOURCE
static CRL_CONSTEXPR IdType ID_DATA_SYS_CAMERA_CAL
static CRL_CONSTEXPR IdType ID_CMD_LED_SET
static CRL_CONSTEXPR uint16_t HEADER_GROUP
static CRL_CONSTEXPR IdType ID_DATA_LIDAR_SCAN
static CRL_CONSTEXPR IdType ID_CMD_SYS_TEST_MTU
static CRL_CONSTEXPR SourceType SOURCE_RAW_LEFT
static CRL_CONSTEXPR SourceType SOURCE_LIDAR_SCAN
static CRL_CONSTEXPR SourceType SOURCE_PPS
static CRL_CONSTEXPR SourceType SOURCE_LUMA_RIGHT
static CRL_CONSTEXPR IdType ID_CMD_IMU_GET_CONFIG
static CRL_CONSTEXPR IdType ID_CMD_SYS_GET_DEVICE_INFO
static CRL_CONSTEXPR IdType ID_DATA_LIDAR_CONFIG
static CRL_CONSTEXPR IdType ID_DATA_SYS_LIDAR_CAL
static CRL_CONSTEXPR IdType ID_DATA_SYS_FLASH_RESPONSE
static CRL_CONSTEXPR IdType ID_CMD_SYS_MTU
static CRL_CONSTEXPR SourceType SOURCE_JPEG_LEFT
static CRL_CONSTEXPR IdType ID_CMD_SYS_GET_TRANSMIT_DELAY
static CRL_CONSTEXPR IdType ID_CMD_SYS_SET_NETWORK