Midnight Sun Firmware
Loading...
Searching...
No Matches
FotaDatagramHeaderPacketPayload

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
 

Detailed Description

Structure representing the datagram header (In the payload)

Datagram Header Payload Format (20 bytes total):

+----------------—+-------------—+------------------------------------------------------------—+ | Field | Size (bytes) | Description | +----------------—+-------------—+------------------------------------------------------------—+ | target_node_id | 1 | Target node ID (0 = RF Board, 1,2... = CAN Bootloader board) | | type | 1 | Type of datagram (enum FotaDatagramType) | | num_packets | 2 | Number of data packets in this datagram (excluding header) | | datagram_id | 4 | Unique identifier for this datagram | | total_length | 4 | Total length of the datagram data | | datagram_crc32 | 4 | CRC32 of the entire datagram data | | packet_crc32 | 4 | CRC32 of this header packet payload | +----------------—+-------------—+------------------------------------------------------------—+

All fields are encoded in little-endian format.

Member Data Documentation

◆ datagram_crc32

uint32_t datagram_crc32

CRC of the entire datagram for verification

◆ datagram_id

uint32_t datagram_id

Unique ID for this datagram

◆ num_packets

uint16_t num_packets

Number of packets in this datagram excluding the header packet

◆ packet_crc32

uint32_t packet_crc32

CRC of the header packet

◆ target_node_id

uint8_t target_node_id

Target node ID

◆ total_length

uint32_t total_length

Total length of datagram content

◆ type

Type of datagram


The documentation for this struct was generated from the following file: