37 #ifndef LibMultiSense_details_wire_protocol 38 #define LibMultiSense_details_wire_protocol 42 #include "../utility/Portability.hh" 45 #ifndef MULTISENSE_WIRE_BITS_PER_PIXEL 46 #define MULTISENSE_WIRE_BITS_PER_PIXEL (12) 49 #ifndef MULTISENSE_API_BITS_PER_PIXEL 50 #define MULTISENSE_API_BITS_PER_PIXEL (16) 54 namespace multisense {
61 #ifdef SENSORPOD_FIRMWARE 62 #define WIRE_HEADER_ATTRIBS_ __attribute__ ((__packed__)) 64 #define WIRE_HEADER_ATTRIBS_ 65 #endif // SENSORPOD_FIRMWARE 86 #if defined (_MSC_VER) 115 uint16_t sequenceIdentifier;
120 uint32_t messageLength;
128 #if defined (_MSC_VER) 256 SOURCE_LUMA_RECT_LEFT |
257 SOURCE_LUMA_RECT_RIGHT |
258 SOURCE_LUMA_RECT_AUX |
260 SOURCE_CHROMA_RIGHT |
262 SOURCE_CHROMA_RECT_AUX |
263 SOURCE_DISPARITY_LEFT |
264 SOURCE_DISPARITY_RIGHT |
265 SOURCE_DISPARITY_COST |
266 SOURCE_DISPARITY_AUX |
273 #define MSG_ID(x) ((wire::IdType)(x)) 274 #define MSG_VER(x) ((wire::VersionType)(x)) 276 #define SER_ARRAY_1(a_,n_) \ 277 for(uint32_t i_=0; i_<(n_); i_++) \ 278 message & (a_)[i_]; \ 280 #define SER_ARRAY_2(a_,n_,m_) \ 281 for(uint32_t i_=0; i_<(n_); i_++) \ 282 for(uint32_t j_=0; j_<(m_); j_++) \ 283 message & (a_)[(i_)][(j_)]; \ 285 #define CPY_ARRAY_1(d_,s_,n_) \ 286 for(uint32_t i_=0; i_<(n_); i_++) \ 287 (d_)[i_] = (s_)[i_]; \ 289 #define CPY_ARRAY_2(d_,s_,n_,m_) \ 290 for(uint32_t i_=0; i_<(n_); i_++) \ 291 for(uint32_t j_=0; j_<(m_); j_++) \ 292 (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_LUMA_RECT_AUX
static CRL_CONSTEXPR SourceType SOURCE_LUMA_AUX
static CRL_CONSTEXPR SourceType SOURCE_DISPARITY
struct __attribute__((__packed__))
static CRL_CONSTEXPR SourceType SOURCE_SLB_MOTOR
static CRL_CONSTEXPR SourceType SOURCE_RAW_AUX
static CRL_CONSTEXPR IdType ID_CMD_LIDAR_SET_MOTOR
static CRL_CONSTEXPR IdType ID_CMD_CAM_CONTROL
static CRL_CONSTEXPR SourceType SOURCE_DISPARITY_AUX
static CRL_CONSTEXPR IdType ID_DATA_SYS_TEST_MTU_RESPONSE
static CRL_CONSTEXPR SourceType SOURCE_CHROMA_RECT_AUX
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 IdType ID_CMD_SYS_MOTOR_POLL
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_SYS_MOTOR_POLL
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 SourceType SOURCE_CHROMA_AUX
static CRL_CONSTEXPR IdType ID_CMD_SYS_SET_PTP
static CRL_CONSTEXPR IdType ID_CMD_SYS_SET_NETWORK