mirror of
https://github.com/nasa/fprime.git
synced 2025-12-10 00:44:37 -06:00
* Add aggregator component * Add com aggregator to subtopology * Fix aggregator issues * Format and SDD * Add basic UTs * Fix not-empty check, test * sp * Fix author tag * Bump GDS for aggregation; timeout aggregator * Bump comQueue event size * Increase timeout for integration tests * Update Fw/Buffer/Buffer.hpp Co-authored-by: Thomas Boyer-Chammard <49786685+thomas-bc@users.noreply.github.com> * Update Svc/ComAggregator/CMakeLists.txt Co-authored-by: Thomas Boyer-Chammard <49786685+thomas-bc@users.noreply.github.com> * Update Svc/ComAggregator/docs/sdd.md Co-authored-by: Thomas Boyer-Chammard <49786685+thomas-bc@users.noreply.github.com> * Update Svc/ComAggregator/docs/sdd.md Co-authored-by: Thomas Boyer-Chammard <49786685+thomas-bc@users.noreply.github.com> * Remove unused variable 'good' in action doClear * A usage note about APID. --------- Co-authored-by: Thomas Boyer-Chammard <49786685+thomas-bc@users.noreply.github.com>
53 lines
2.6 KiB
Fortran
53 lines
2.6 KiB
Fortran
# ======================================================================
|
|
# FPP file for configuration of the communications stack
|
|
#
|
|
# The only reason to modify these definitions is if you are writing your own
|
|
# Framer/Deframer implementations and need more contextual data than what is
|
|
# defined
|
|
# ======================================================================
|
|
|
|
@ The width of packet descriptors when they are serialized by the framework
|
|
type FwPacketDescriptorType = U16
|
|
|
|
module ComCfg {
|
|
|
|
# Needed in dictionary:
|
|
# - spacecraftId
|
|
# - TmFrameFixedSize
|
|
# - potentially APID enum ?
|
|
constant SpacecraftId = 0x0044 # Spacecraft ID (10 bits)
|
|
constant TmFrameFixedSize = 1024 # Needs to be at least COM_BUFFER_MAX_SIZE + (2 * SpacePacketHeaderSize) + 1
|
|
constant AggregationSize = TmFrameFixedSize - 6 - 6 - 1 - 2 # 2 header (6) + 1 idle byte + 2 trailer bytes
|
|
|
|
@ APIDs are 11 bits in the Space Packet protocol, so we use U16. Max value 7FF
|
|
enum Apid : FwPacketDescriptorType {
|
|
# APIDs prefixed with FW are reserved for F Prime and need to be present
|
|
# in the enumeration. Their values can be changed
|
|
FW_PACKET_COMMAND = 0x0000 @< Command packet type - incoming
|
|
FW_PACKET_TELEM = 0x0001 @< Telemetry packet type - outgoing
|
|
FW_PACKET_LOG = 0x0002 @< Log type - outgoing
|
|
FW_PACKET_FILE = 0x0003 @< File type - incoming and outgoing
|
|
FW_PACKET_PACKETIZED_TLM = 0x0004 @< Packetized telemetry packet type
|
|
FW_PACKET_DP = 0x0005 @< Data Product packet type
|
|
FW_PACKET_IDLE = 0x0006 @< F Prime idle
|
|
FW_PACKET_HAND = 0x00FE @< F Prime handshake
|
|
FW_PACKET_UNKNOWN = 0x00FF @< F Prime unknown packet
|
|
SPP_IDLE_PACKET = 0x07FF @< Per Space Packet Standard, all 1s (11bits) is reserved for Idle Packets
|
|
INVALID_UNINITIALIZED = 0x0800 @< Anything equal or higher value is invalid and should not be used
|
|
} default INVALID_UNINITIALIZED
|
|
|
|
@ Type used to pass context info between components during framing/deframing
|
|
struct FrameContext {
|
|
comQueueIndex: FwIndexType @< Queue Index used by the ComQueue, other components shall not modify
|
|
apid: Apid @< 11 bits APID in CCSDS
|
|
sequenceCount: U16 @< 14 bit Sequence count - sequence count is incremented per APID
|
|
vcId: U8 @< 6 bit Virtual Channel ID - used for TC and TM
|
|
} default {
|
|
comQueueIndex = 0
|
|
apid = Apid.FW_PACKET_UNKNOWN
|
|
sequenceCount = 0
|
|
vcId = 1
|
|
}
|
|
|
|
}
|