|
1 | 1 | # EmbeddedSpacePacket |
2 | | -Minimum SpacePacket implementation in C for embedded applications |
| 2 | +Minimum CCSDS SpacePacket implementation in C for embedded applications. |
3 | 3 |
|
4 | 4 | Contents |
5 | 5 | - tiny header and implementation in `include/` and `src/` |
|
27 | 27 | in the header stores `payload_len - 1` when serializing and the parser reconstructs |
28 | 28 | `payload_len = header_length + 1`. |
29 | 29 |
|
| 30 | +CCSDS Space Packet (brief) |
| 31 | +- **Primary header (6 bytes):** bytes 0-1 hold version (3 bits), packet type (1 bit), |
| 32 | + secondary header flag (1 bit) and APID (11 bits). Bytes 2-3 are the sequence control |
| 33 | + field: segmentation/sequence flags (2 bits) and packet sequence count (14 bits). Bytes |
| 34 | + 4-5 are the Packet Length field (16 bits) which encodes the length of the Packet Data |
| 35 | + Field minus 1 (i.e., PacketLength = N-1 where N is data-field octets). |
| 36 | +- **Packet Data Field:** follows the primary header and contains an optional secondary |
| 37 | + header (if the secondary header flag is set) followed by user/application data. |
| 38 | +- **Secondary header:** optional, format and semantics are application-dependent (time |
| 39 | + tags, service headers, etc.). The presence is indicated by the secondary header flag. |
| 40 | +- **Segmentation/Sequence Flags:** indicate if the packet is standalone (unsegmented), |
| 41 | + first, continuation or last segment when a logical packet is split over multiple |
| 42 | + sequence counts. |
| 43 | +- **APID (Application Process ID):** identifies the source/consumer application or |
| 44 | + logical stream of packets. |
| 45 | +- **Error control:** CCSDS Space Packet by itself does not mandate a particular CRC in |
| 46 | + the primary header; error control is usually provided in lower or higher layers or |
| 47 | + via application-specific fields. This repository adds an optional CRC covering the |
| 48 | + secondary header and payload as an example. |
| 49 | + |
| 50 | + |
| 51 | +Links: |
| 52 | +- https://ccsds.org/Pubs/133x0b2e2.pdf (CCSDS Space Packet Standard) |
0 commit comments