mirror of
https://git.rwth-aachen.de/acs/public/villas/node/
synced 2025-03-09 00:00:00 +01:00
Merge remote-tracking branch 'rwth/fix-msg-format' into develop
This commit is contained in:
commit
dd1e47338a
1 changed files with 8 additions and 2 deletions
|
@ -62,11 +62,17 @@
|
|||
**/
|
||||
struct msg
|
||||
{
|
||||
#if BYTE_ORDER == LITTLE_ENDIAN
|
||||
unsigned rsvd1 : 2; /**< Reserved bits */
|
||||
unsigned type : 2; /**< Data or control message (see MSG_TYPE_*) */
|
||||
unsigned version: 4; /**< Specifies the format of the remaining message (see MGS_VERSION) */
|
||||
#elif BYTE_ORDER == BIG_ENDIAN
|
||||
unsigned version: 4; /**< Specifies the format of the remaining message (see MGS_VERSION) */
|
||||
unsigned type : 2; /**< Data or control message (see MSG_TYPE_*) */
|
||||
unsigned rsvd1 : 2; /**< Reserved bits */
|
||||
unsigned rsvd2 : 8; /**< Reserved bits */
|
||||
#endif
|
||||
|
||||
uint8_t rsvd2; /**< Reserved bits */
|
||||
uint16_t length; /**< The number of values in msg::data[]. */
|
||||
uint32_t sequence; /**< The sequence number is incremented by one for consecutive messages. */
|
||||
|
||||
|
@ -81,4 +87,4 @@ struct msg
|
|||
float f; /**< Floating point values. */
|
||||
uint32_t i; /**< Integer values. */
|
||||
} data[];
|
||||
} __attribute__((packed));
|
||||
} __attribute__((packed));
|
||||
|
|
Loading…
Add table
Reference in a new issue