[QNX 6.21PE]
The size of this structure is 24 bytes. It should be 20.
The offset of the last field, m_valuecount, is 18 bytes.
This is plain data, no constructor, no member functions.
Why is there padding?
Adding a “uint32_t” at the end, to round it up to a
multiple of 8 bytes, makes it even bigger. It’s not a
rounding issue.
Compile options are
/usr/bin/qcc -Vgcc_ntox86 -lang-c++ -g
John Nagle
Team Overbot
struct LidarScanLineHeader {
uint64_t m_timestamp; float m_tilt;
uint8_t m_sensorid; uint8_t m_statusByte; uint8_t
m_scanIndex; uint8_t m_unused1; uint16_t
m_unused2; uint16_t m_valueCount; };