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 (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.

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: