Difference between revisions of "Messages Alignment"

From PaparazziUAV
Jump to navigation Jump to search
m
m
 
(One intermediate revision by the same user not shown)
Line 3: Line 3:
e.g.  
e.g.  
   32bits -->  [    8    ][    16    ][    24    ][    32    ]
   32bits -->  [    8    ][    16    ][    24    ][    32    ]
CORRECT


   PAYLOAD = { [  char  ][        uint16        ][  int8  ]
   PAYLOAD = { [  char  ][        uint16        ][  int8  ]
Line 10: Line 12:
               [      uint16[](1)    ][      uint16[](2)    ]
               [      uint16[](1)    ][      uint16[](2)    ]
               [      uint16[](3)    ]...
               [      uint16[](3)    ]...
INCORRECT
  PAYLOAD = { [  char  ][        uint16        ][        ...
              ...          uint32                ][  int8  ]

Latest revision as of 04:28, 4 May 2012

Alignment for uplink/datalink messages:

e.g.

 32bits -->  [     8    ][    16    ][    24    ][    32    ]

CORRECT

 PAYLOAD = { [   char   ][        uint16        ][   int8   ]
             [                    uint32                    ]
             [   uint8  ][ uint8[0] ][ uint8[1] ][ uint8[2] ]
             [ uint8[3] ][        int16         ][  length  ]
             [       uint16[](1)    ][       uint16[](2)    ]
             [       uint16[](3)    ]...

INCORRECT

 PAYLOAD = { [   char   ][        uint16        ][        ...
             ...          uint32                ][   int8   ]