fprime/Svc/CmdDispatcher
Thomas Boyer-Chammard 728a022e9c
Add support for CCSDS TC/TM and SpacePacket protocols (#3684)
* First pass at Svc + TcpClient implementation

* Tmp work

* Revert FileUplink changes

* Add copy (with allocation/deallocation) to FprimeRouter to simplify buffer management

* Update FprimeRouter UTs

* Update FprimeDeframer UTs

* Update FrameAccumulator UTs

* Update ComStub UTs

* Update missing Drv and UTs

* Update ComInterface to use ComDataWithContext on output

* Update Ref/RPI topology

* Fix spelling

* Fix test typo

* Update Udp component and UTs

* Rename data ports and standardize "Return" naming pattern

* Fix variable name

* Adapt UTs

* Update Communication Adapter Interface docs

* Full SDD updates

* Spelling &  nits and details

* Put formatting back to original

* Added SpacePacket, TC and TM framers/deframers + Ref topology. Working with GDS wohooo

* TODOs and code cleanup

* Add APID enum to ComCfg.fpp and route based on received APID

* Increment counts per frame/apid

* Remove duplicate files

* Document and implement services/functions provided by the TCDeframer

* Add events, todos and notes

* fill TM frame with idle packet

* Add ApidMapper component and map APID - FwPacketDescriptor

* Refactor to new CMake API

* Update Types and Add TCDeframer tests

* Update type usage namespacing

* Finish TCDeframer UTs

* Add TMFramer tests and refine VcId handling

* Tests and code cleanup

* Define ComPacketType in FPP

* Map FW_PACKET_FILE to downlink specific APID

* Remove sequence number check

* Add packet loss notification to space packet

* Tests WIP

* WIP

* Use SpacePacket header type in TMFramer idle packet

* SpacePacketDeframer tests and untracked APID detection

* Add APID (=PacketDescriptor) extraction to FprimeDeframer

* Use ApidManager on uplink to validate seq count (is central authority for APID - SeqCount)

* Code cleanup

* Much cleaner ApidManager as a service, not in the middle of framing

* Even better ApidManager

* Add SpacePacketFramer UTs

* Set up rule based testing for ApidManager

* Code cleanup and fix TMFramer UT

* First pass at SDDs and stuff

* SDD fixes

* ApidManager Rule-based testing

* Improve TMFramer code coverage, docs and comments

* Types cleanup

* Add CRC check to CcsdsTCFrameDetector

* Add unit tests for CcsdsTCFrameDetector

* Fix Ref topology

* Fix old PacketType usage

* Fix ComQueue UTs

* Fix CI warnings

* Add test for CRC corruption in frame detector

* Spelling

* Remove ApidDemo component from topology

* Fix more static analysis

* Clean up ApidManager tests and fix static analysis warnings

* Fix UTs on RHEL8

* Fix SDD links

* Fix more static analysis on UTs

* More spelling fixes

* Improve SDDs and comments

* Update metadata

check-spelling run (pull_request_target) for ccsds-protocols

Signed-off-by: check-spelling-bot <check-spelling-bot@users.noreply.github.com>
on-behalf-of: @check-spelling <check-spelling-bot@check-spelling.dev>

* More SDD updates

* Attempt UT fixes

* First pass of review comments

* Fix length token is minus 1 inconsistency

* Review recs: static assert frame size, docs, TM buffer asserts

* Add fprime-gds.yml to Ref for GDS with framing selection

* Update requirements.txt for GDS 4.0.0a3 (CCSDS protocols)

* Update UTs to reflect last update

* Drop Python 3.8 support

* Update FprimeRouter UTs for new APID routing

* Fix spelling and RHEL8 cast warnings

* Fix spelling again...

* Deserialize APID in FprimeDeframer only if it is valid

* Fix googletest warning??

* static casting that u8 yall

* Use width FPP constants

* Add SDD links

* Switch TMFramer/TCDeframer capitalization to TmFramer/TcDeframer

* Use git mv to rename files and directory

* oops forgot rename a test file

* review changes: add annotations on all FPP ports

---------

Signed-off-by: check-spelling-bot <check-spelling-bot@users.noreply.github.com>
Co-authored-by: Thomas Boyer-Chammard <thomas-bc@users.noreply.github.com>
2025-06-11 11:04:38 -07:00
..
2021-06-22 15:14:07 -07:00

This directory contains the CmdDispatcher component. This component takes incoming Com packets that have commands encoded in them and decodes them. 
It looks up opcodes in a table build by component registrations. It also handles completions, passing the status back to the sender of the packet.

CommandDispatcherComponentAi.xml - Command dispatcher component specification
CommandDispatcherImpl.hpp(.cpp) - Command dispatcher implementation
CommandDispatcherImplCfg.hpp - Command dispatcher configuration