Commit Graph

23 Commits

Author SHA1 Message Date
Jakob Meier 9731dc1e61 space packet bug fix 2022-04-29 07:47:23 +02:00
Robin Müller ddcac2bbac
reapply clang format 2022-02-02 10:29:30 +01:00
Robin Müller 5907f8ee9d
Added CFDP packet stack
This PR adds the packet stack for the CCSDS File Delivery Protocol.
It also refactors the existing TMTC infastructure to allow sending
of CFDP packets to the CCSDS handlers.

This includes the whole PDU (Protocol Data Unit) stack:

- File Data PDUs

and all file directive PDUs

- ACK PDU
- NAK PDU
- Metadata PDU
- Finished PDU
- Prompt PDU
- Keep Alive PDU
- EOF PDU

The PR includes a full set of unittests for the packet stack
with a coverage of 90+ %.

The refactoring of the existing TMTC infastructure includes non-ideal
solutions like diamond inheritance.
Avoiding this solution would require refactoring the packet stack.
This would be a good idea anyway because the existing stack is tightly
coupled to the FSFW, making reuse more difficult if only the stack is
planned to be used without the store functionalities etc.

The PDU implementation provided here is only weakly coupled to the FSFW,
only using components like returnvalues or the Serialization modules.
There are dedicated serializers and deserializers, which also helps in
creating small focused modules which are easy to test.

Some of the modules here were provied by Matthias Tompert.
2021-12-03 15:37:49 +01:00
Robin Müller 05c4f4fadc
Bugfix for Packet ID getters
- Also added related unittests
2021-11-18 19:56:24 +01:00
Robin Müller 7122c37511
updated function names 2021-10-18 18:26:03 +02:00
Robin Müller 84cd010a25 Merge branch 'mueller/tcp-keep-open-pr' of https://egit.irs.uni-stuttgart.de/eive/fsfw into mueller/tcp-keep-open-pr 2021-10-18 15:07:11 +02:00
Robin Müller a077a1b587
improved constexpr macros 2021-10-18 15:07:00 +02:00
Robin Müller b23ed11c7e Merge branch 'development' into mueller/tcp-keep-open-pr 2021-10-18 14:44:26 +02:00
Ulrich Mohr cee42f9b70 one } was on the wrong side of an #endif 2021-10-18 14:34:11 +02:00
Robin Müller 4924da1667
Merge remote-tracking branch 'upstream/development' into mueller/tcp-keep-open-pr 2021-10-11 18:52:52 +02:00
Robin Müller 08926f9b70
Merge remote-tracking branch 'upstream/master' into mueller/tm-stack-robustness-cherry-picked 2021-10-11 17:57:33 +02:00
Robin Müller d2371b3e71 removed unneeded static constexpr 2021-10-11 16:47:57 +02:00
Robin Müller ffa38a81b7 using pus version enum now 2021-10-11 16:47:37 +02:00
Robin Müller ae689408f3 using correct version number now 2021-10-11 16:47:28 +02:00
Robin Müller 155432663b moved store failure to separate function 2021-10-11 16:37:14 +02:00
Robin Müller ecdbf98ca4 added printouts for PUS A 2021-10-11 16:37:04 +02:00
Robin Müller 54a6c1b0aa bugfix for PUS A 2021-10-11 16:36:49 +02:00
Robin Müller 9efe9e78d8 Increased TM stack robustness
1. More nullptr check
2. returnvalue for inititalize function which can fail
2021-10-11 16:36:28 +02:00
Robin Müller cffd77ed32
put functions in namespace 2021-09-28 17:42:29 +02:00
Robin Müller bf02f14772 C++11 adaptions 2021-09-28 16:33:20 +02:00
Robin Müller 09299802f0
TCP refactoring
This refactoring keeps the TCP connection opened until the client closes
it. It also increased the robustness of the TCP reception.

Because TCP is stream based and usually applied to newline separated
data, a special way to handle binary space packets is required.

The new SpacePacketParser class takes care of this by taking TC packet
IDs as as optional start markers to parse for space packets in a given
buffer.

The refactored TCP server uses a ring buffer, a reception buffer and the
new parser to extract space packets from a stream in a safer way.
2021-09-28 15:01:01 +02:00
Robin Müller d4f5c31881
optional module handling complete 2021-07-19 18:26:54 +02:00
Robin Müller d47906e833
trying to fuse header / inc 2021-07-19 16:25:51 +02:00