Solaris Software
Loading...
Searching...
No Matches
packet.h File Reference

Solaris Packet Protocol (SPP) packet structure definitions. More...

#include "spp/core/types.h"
Include dependency graph for packet.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define K_SPP_PKT_VERSION   (1U)
 Current SPP protocol version embedded in each packet.
#define K_SPP_PKT_PAYLOAD_MAX   (50U)
 Maximum payload size in bytes per packet.
#define K_SPP_TOTAL_PACKET_SIZE   (64U)
#define K_SPP_APID_LOG   (0x0001U)
 APID reserved for SPP log message packets.

Functions

struct __attribute__ ((packed))
 Primary header — routing and framing information.

Variables

 SPP_PacketPrimary_t
 SPP_PacketSecondary_t
 SPP_Packet_t

Detailed Description

Solaris Packet Protocol (SPP) packet structure definitions.

Defines the on-wire layout of an SPP packet, inspired by the ECSS Space Packet Protocol standard. Every sensor reading or telemetry message in the system is transported as an SPP_Packet_t.

Naming conventions used in this file:

  • Constants/macros: K_SPP_PKT_*
  • Types: SPP_Packet*_t

Definition in file packet.h.

Macro Definition Documentation

◆ K_SPP_PKT_VERSION

#define K_SPP_PKT_VERSION   (1U)

Current SPP protocol version embedded in each packet.

Definition at line 24 of file packet.h.

Referenced by SPP_SERVICES_DATABANK_packetData().

◆ K_SPP_PKT_PAYLOAD_MAX

#define K_SPP_PKT_PAYLOAD_MAX   (50U)

Maximum payload size in bytes per packet.

Definition at line 27 of file packet.h.

Referenced by SPP_SERVICES_DATABANK_packetData().

◆ K_SPP_TOTAL_PACKET_SIZE

#define K_SPP_TOTAL_PACKET_SIZE   (64U)

Total packet size in bytes. Multiple of 8 bytes.

Definition at line 29 of file packet.h.

Referenced by SPP_SERVICES_DATALOGGER_consumeData(), and SPP_SERVICES_SX1262_consumeData().

◆ K_SPP_APID_LOG

#define K_SPP_APID_LOG   (0x0001U)

APID reserved for SPP log message packets.

Definition at line 36 of file packet.h.

Function Documentation

◆ __attribute__()

struct __attribute__ ( (packed) )

Primary header — routing and framing information.

Complete SPP packet.

Secondary header — timing and reliability metadata.

Producers obtain packets from the databank and publish them through PUBSUB. PUBSUB copies each packet into its internal buffer and immediately returns the original to the databank. Consumers receive copies through their mailboxes.

< Protocol version (= K_SPP_PKT_VERSION).

< Application Process Identifier.

< Packet sequence counter (wraps at UINT16_MAX).

< Length of the payload field in bytes.

< System timestamp at packet creation (ms).

< Number of packets dropped since last reset.

< Routing / framing header.

< Timing / metadata header.

< Raw payload bytes.

< CRC-16 over all preceding packet bytes, excluding this field.

Definition at line 1 of file packet.h.

Variable Documentation

◆ SPP_PacketPrimary_t

SPP_PacketPrimary_t

Definition at line 51 of file packet.h.

◆ SPP_PacketSecondary_t

SPP_PacketSecondary_t

Definition at line 60 of file packet.h.

◆ SPP_Packet_t