![]() |
Midnight Sun Firmware
|
Structure representing the datagram header (In the payload) More...
#include <fota_datagram.h>
Public Attributes | |
uint8_t | target_node_id |
FotaDatagramType | type |
uint16_t | num_packets |
uint32_t | datagram_id |
uint32_t | total_length |
uint32_t | datagram_crc32 |
uint32_t | packet_crc32 |
Structure representing the datagram header (In the payload)
Datagram Header Payload Format (10 bytes total):
+----------------—+-------------—+------------------------------------------------------------—+ | Field | Size (bytes) | Description | +----------------—+-------------—+------------------------------------------------------------—+ | total_length | 4 | Total length of datagram | | num_packets | 2 | Number of data packets | | node ID | 2 | Target node ID (0 = RF Board, 1,2... = CAN Bootloader board) | | datagram_crc32 | 4 | CRC32 of datagram data | +----------------—+-------------—+------------------------------------------------------------—+
All fields are encoded in little-endian format.
uint32_t datagram_crc32 |
CRC of the entire datagram for verification
uint32_t datagram_id |
Unique ID for this datagram
uint16_t num_packets |
Number of packets in this datagram excluding the header packet
uint32_t packet_crc32 |
CRC of the header packet
uint8_t target_node_id |
Target node ID
uint32_t total_length |
Total length of datagram content
FotaDatagramType type |
Type of datagram