Skip to content
Open
Show file tree
Hide file tree
Changes from 250 commits
Commits
Show all changes
276 commits
Select commit Hold shift + click to select a range
8647bf8
CFDP refactor checkpoint
Brian-Campuzano Dec 30, 2025
c4adf59
Playback directory checkpoint
Brian-Campuzano Dec 30, 2025
32cd991
CfdpManager compiles!
Brian-Campuzano Dec 31, 2025
56c0cf2
Added PDU receive data paths/hooks
Brian-Campuzano Jan 2, 2026
7226015
CF -> CFDP file rename
Brian-Campuzano Jan 2, 2026
9e17a3a
CF -> CFDP file rename complete
Brian-Campuzano Jan 2, 2026
fb202c5
Remove header comments
Brian-Campuzano Jan 2, 2026
ad0d8f3
Refactor CFDP variable size types
Brian-Campuzano Jan 5, 2026
00b4042
Refactor default_cf_extern_typedefs.hpp into CfdpTypes.fpp and CfdpTy…
Brian-Campuzano Jan 5, 2026
18de6fb
Refactor default_cf_interface_cfg.hpp to CfdpCfg.hpp
Brian-Campuzano Jan 5, 2026
a682092
Revert history init
Brian-Campuzano Jan 5, 2026
58456d7
Move CFDP types and configs
Brian-Campuzano Jan 5, 2026
caaf6e3
UT skeleton
Brian-Campuzano Jan 5, 2026
e2ff679
Split parameters to separate include file
Brian-Campuzano Jan 5, 2026
a384405
Implemented the SendFile command
Brian-Campuzano Jan 6, 2026
a8b452f
Added CFDP playback directory command
Brian-Campuzano Jan 6, 2026
337449b
Added freeze/thaw command
Brian-Campuzano Jan 6, 2026
0dceef7
Add buffer return for failure to send case
Brian-Campuzano Jan 6, 2026
6df102b
Added polling directory commands
Brian-Campuzano Jan 6, 2026
c673331
Fixed comment offsets
Brian-Campuzano Jan 6, 2026
f84c8cf
Converted CF_WrappedOpenCreate calls to Os::File::open
Brian-Campuzano Jan 6, 2026
6f39d83
Convert CF_WrappedWrite to Os::File::write
Brian-Campuzano Jan 6, 2026
8452564
Replaced CF_WrappedRead with Os::File::Read
Brian-Campuzano Jan 6, 2026
afd3a6a
Replaced CF_WrappedClose with Os::File::close
Brian-Campuzano Jan 6, 2026
5e4b13d
Replaced OS_ObjectIdDefined with Os::File::isOpen
Brian-Campuzano Jan 6, 2026
43dc396
Replaced CF_WrappedLseek with Os::File::seek
Brian-Campuzano Jan 7, 2026
40173f5
Refactor CF_CFDP_MoveFile to Os::FileSystem::moveFile + string refact…
Brian-Campuzano Jan 7, 2026
e375029
Refactored OS_remove to Os::FileSystem::removeFile
Brian-Campuzano Jan 7, 2026
5c3bcbb
Refactored OS_mv to Os::FileSystem::moveFile
Brian-Campuzano Jan 7, 2026
963885a
Replaced OS_DirectoryOpen with Os::Directory::open
Brian-Campuzano Jan 7, 2026
9ef1248
Replaced OS_DirectoryRead with Os::Directory::read
Brian-Campuzano Jan 7, 2026
6a04b4e
Replaced OS_DirectoryClose with Os::Directory::close
Brian-Campuzano Jan 7, 2026
86f81b9
Deleted CfeStubs
Brian-Campuzano Jan 8, 2026
a6fedbe
Remove CfeStubs.hpp includes and add CfdpMaxPduSize constants
Brian-Campuzano Jan 15, 2026
2526962
Data pointer refactor to remove void*
Brian-Campuzano Jan 16, 2026
8edea41
Rework receive init to use Fw::String
Brian-Campuzano Jan 16, 2026
fa6ba24
Fix compilation errors
Brian-Campuzano Jan 16, 2026
e12126e
Made include paths absolute and moved file size type def to config
Brian-Campuzano Jan 21, 2026
b886923
Added separate metadata serailizable
Brian-Campuzano Jan 21, 2026
9126d9d
Rework enums that did not need to serializables
Brian-Campuzano Jan 22, 2026
d47207e
Completed metadata UT
Brian-Campuzano Jan 22, 2026
7173b2c
Split PDUs to separate whitespace
Brian-Campuzano Jan 22, 2026
8491a1c
Added FileData PDU and UTs
Brian-Campuzano Jan 22, 2026
b69f544
Added file data PDU test
Brian-Campuzano Jan 22, 2026
6b31365
Added end-of-file PDU and UTs
Brian-Campuzano Jan 22, 2026
e34d627
Added missing file
Brian-Campuzano Jan 22, 2026
1b913c4
Added end of file PDU UT to CfdpManager
Brian-Campuzano Jan 22, 2026
86ecfb4
Refactor UTs to separate out validation functions
Brian-Campuzano Jan 22, 2026
1a3cd4f
Implemented FinPdu class and UTs
Brian-Campuzano Jan 22, 2026
3f7ee3f
Added CfdpManager FinPdu UT
Brian-Campuzano Jan 22, 2026
630edd9
Added AckPdu implementation and UTs
Brian-Campuzano Jan 22, 2026
8122f25
Added AckPdu UT for CfdpManager
Brian-Campuzano Jan 22, 2026
47fd86d
Added missing CRC check
Brian-Campuzano Jan 22, 2026
f76bb90
Added NakPdu implementaiton and UTs
Brian-Campuzano Jan 22, 2026
f417384
Added CfdpManager NackPdu UT
Brian-Campuzano Jan 22, 2026
8682b3f
Refactor PDU tests to a new file
Brian-Campuzano Jan 22, 2026
db69a31
Refactored test helpers to deserialize and validate PDUs
Brian-Campuzano Jan 22, 2026
d29f007
Added class 1 TX transaction text
Brian-Campuzano Jan 23, 2026
c75e4aa
Added output PDU throttling
Brian-Campuzano Jan 23, 2026
0cf1add
Started a class 2 TX UT and added helper functions for uplinking PDUs
Brian-Campuzano Jan 23, 2026
9c2f3be
Code cleanup
Brian-Campuzano Jan 23, 2026
8ac89bd
Debugging failed chunk allocation for class 2 transactions
Brian-Campuzano Jan 26, 2026
1c05740
Updated class 1 transaction UT to expire the inactivity timer. Also s…
Brian-Campuzano Jan 26, 2026
5507bb6
Updated class 2 TX UT to have correct PDU ordering
Brian-Campuzano Jan 26, 2026
a2b033a
Added CFDP subtopology
Brian-Campuzano Jan 26, 2026
85894f6
Completed TX class 2 transaction UT
Brian-Campuzano Jan 26, 2026
9b564f6
Added class 2 transaction UT with a nack
Brian-Campuzano Jan 26, 2026
5f28945
Refactor UTs to make them more readable
Brian-Campuzano Jan 26, 2026
c12bef5
Added a class 1 RX unit test
Brian-Campuzano Jan 26, 2026
c529efb
Added class 2 RX transaction UT
Brian-Campuzano Jan 27, 2026
b415570
Add RX transaction UT with NAck
Brian-Campuzano Jan 27, 2026
8b78165
Refactored CfdpEngine into child-class of CfdpManager
Brian-Campuzano Jan 27, 2026
be8a0f9
Created CfdpChannel class
Brian-Campuzano Jan 28, 2026
05f9ff3
Refactor CfdpEngineData to be CfdpEngine member variables
Brian-Campuzano Jan 28, 2026
0ab9dc4
Moved CF_Channel_t data into CfdpChannel member variables. There is s…
Brian-Campuzano Jan 28, 2026
4545931
Fixed testMetaDataPdu UT
Brian-Campuzano Jan 28, 2026
49a8617
Updated remaining PDU tests
Brian-Campuzano Jan 28, 2026
d318275
Removed lingering CF_Channel_t references and functions
Brian-Campuzano Jan 28, 2026
e008aa7
Created new CfdpTransaction class and skeletons
Brian-Campuzano Jan 28, 2026
638f222
Ported TX functions to new class
Brian-Campuzano Jan 29, 2026
8a6ca97
Ported RX functions to new Transaciton class
Brian-Campuzano Jan 29, 2026
512c39d
Additional transaction class rework
Brian-Campuzano Jan 29, 2026
aa01ca5
Refactor CfdpTransaction as stepping stone toward struct removal
Brian-Campuzano Jan 29, 2026
fa38677
Moved CF dispatch functions into the CfdpTransaction class
Brian-Campuzano Jan 29, 2026
3f725a6
Completed CfdpTransaction refactor
Brian-Campuzano Jan 29, 2026
6727c94
Rework memory initialization for better encapsulation
Brian-Campuzano Jan 29, 2026
ddfcbcc
Friend class cleanup
Brian-Campuzano Jan 29, 2026
a578909
Refactored CfdpChunk into a C++ class
Brian-Campuzano Jan 29, 2026
8f6e68e
Additional C++ refactor cleanup
Brian-Campuzano Jan 29, 2026
6b1a488
Moved CFDP types and renames Pdu folder to Types folder
Brian-Campuzano Jan 29, 2026
9ff1c6f
Removed internal buffer test pool
Brian-Campuzano Jan 30, 2026
95d2289
Refactored Tx functions to use Pdu classes instead of the CF codec fu…
Brian-Campuzano Jan 30, 2026
41678c5
Refactored Rx functions to use Pdu classes
Brian-Campuzano Jan 30, 2026
1cf859d
Completed deprecated codec removal and fixed UTs
Brian-Campuzano Jan 30, 2026
a4bad8c
Added TLV support and refactor cleanup
Brian-Campuzano Jan 30, 2026
8f60746
Added CF attribution file
Brian-Campuzano Jan 30, 2026
04db475
Removed PDU union wrapper in-favor of PDU class inheritance. Updated …
Brian-Campuzano Feb 3, 2026
1d3627b
Cleanup post class refactor
Brian-Campuzano Feb 3, 2026
6b3ef10
Code cleanup and file size type updates
Brian-Campuzano Feb 5, 2026
9b93a36
Start of CF -> CFDP rename/refactor
Brian-Campuzano Feb 5, 2026
15a8038
Remove last vestigages of CF types
Brian-Campuzano Feb 5, 2026
1202da0
Updated UTs post CF -> CFDP rename
Brian-Campuzano Feb 5, 2026
04738e4
Start of CFDP class addition, starting removal of deprecated CF types
Brian-Campuzano Feb 9, 2026
4505e78
Completed Cfdp namespace addition
Brian-Campuzano Feb 9, 2026
40f24c6
Consolidate Cfdp types to a single file
Brian-Campuzano Feb 9, 2026
3afff4f
Renamed transaction files so they will sort correctly
Brian-Campuzano Feb 9, 2026
f77587a
Cleanup some todos and make comment style consistent
Brian-Campuzano Feb 9, 2026
0c3552b
Added CFDP overview SDD section
Brian-Campuzano Feb 9, 2026
2083482
Added port based file transfer requests similar to FileDownlink
Brian-Campuzano Feb 9, 2026
603f689
Added Tx port based file transfer UT
Brian-Campuzano Feb 9, 2026
39cfdf7
Added additional UTs
Brian-Campuzano Feb 9, 2026
12f49e1
Added ping port and fixed issues from fprime sync
Brian-Campuzano Feb 9, 2026
4db47ab
Added CfdpManager class diagram
Brian-Campuzano Feb 9, 2026
76eb0c0
Fixed component class diagram
Brian-Campuzano Feb 9, 2026
4a9235e
Reworked class diagram
Brian-Campuzano Feb 9, 2026
5827265
Added CfdpManager usage diagram and updated port naming to be consistent
Brian-Campuzano Feb 9, 2026
5c2c4eb
Playing with color themes
Brian-Campuzano Feb 9, 2026
8fd545b
Another theme iteration
Brian-Campuzano Feb 10, 2026
e2b0d4e
Added component design section
Brian-Campuzano Feb 10, 2026
71141cf
Added TX transaction sequence diagrams
Brian-Campuzano Feb 10, 2026
ceacd11
Added class 2 RX sequence diagram
Brian-Campuzano Feb 10, 2026
137536f
Fixed bug in file deletion
Brian-Campuzano Feb 10, 2026
509c441
Added command and telemetry section
Brian-Campuzano Feb 10, 2026
a8f980c
Added proposed telemetry
Brian-Campuzano Feb 10, 2026
e2049e4
Populated requirements section
Brian-Campuzano Feb 10, 2026
1cb19a9
SDD rework and added section numbers
Brian-Campuzano Feb 10, 2026
ecfcab7
Add configuration section to the SDD and took a pass at cleaning up t…
Brian-Campuzano Feb 10, 2026
b1cdf98
First pass a getting the spell check to pass
Brian-Campuzano Feb 10, 2026
902020a
Added new CFDP terms
Brian-Campuzano Feb 10, 2026
3ff66c8
Another spelling iteration. EVS will be removed with F' events are im…
Brian-Campuzano Feb 10, 2026
36a6a48
Fix spelling goofs
Brian-Campuzano Feb 10, 2026
73f55ea
Removed duplicate spelling exceptions
Brian-Campuzano Feb 13, 2026
80af2aa
Replace commented out cFE Events with F' Events
pepepr08 Feb 13, 2026
15413ea
Directly use Cfdp.Class for events
pepepr08 Feb 16, 2026
6499a55
Remove recvAck()
pepepr08 Feb 17, 2026
7f24327
Added TX/RX throttling SDD section and made class, keep, and priority…
Brian-Campuzano Feb 12, 2026
7b7e4fa
Updated class 2 sequence diagrams to make timer values explicit. Also…
Brian-Campuzano Feb 19, 2026
fe1da06
Added transaction management commands
Brian-Campuzano Feb 19, 2026
836f766
Move tmp_dir and fail_dir from global parameters to per-channel param…
Brian-Campuzano Feb 12, 2026
77291aa
Purge the terms configuration table and wakeup which were CF terminology
Brian-Campuzano Feb 12, 2026
d3e06cd
Added Deep Space Timer Configuration section to account for light spe…
Brian-Campuzano Feb 12, 2026
2ddc299
Added documentation on NAK behavior during file data transmission
Brian-Campuzano Feb 12, 2026
0a3a538
Remove AI slop
Brian-Campuzano Feb 12, 2026
ddb5edf
Rewording to make spell checker happy
Brian-Campuzano Feb 19, 2026
ac261f0
Swap SUSPEND and RESUME enum
pepepr08 Mar 26, 2026
44ca18c
Clarify success criteria doesn't care about current state
pepepr08 Mar 26, 2026
31e66ba
Update transaction canceled comment
pepepr08 Mar 26, 2026
9c4e15f
Implement CfdpManager telemetry
pepepr08 Feb 26, 2026
3a39227
Send events when transaction completes successfully
pepepr08 Mar 5, 2026
2e31ecf
Add size to TxFileTransferStarted event
pepepr08 Mar 6, 2026
83089b1
Update cached_pos right after successful file read
pepepr08 Mar 6, 2026
3026504
Rename channel current transaction variable
pepepr08 Mar 12, 2026
94ec81f
Fix issue when reaching max_outgoing_pdus_per_cycle
pepepr08 Mar 12, 2026
f6f1a00
Strip packet type descriptor before reading PDU
pepepr08 Apr 1, 2026
06c5b57
Reset timer during CRC calculation period
pepepr08 Apr 6, 2026
4a8324b
Fix spelling check CI pipeline
pepepr08 Apr 7, 2026
00aee21
Connect CfdpManager directly to ComQueue
pepepr08 Apr 10, 2026
07458dc
Remove duplicate words
pepepr08 Apr 16, 2026
db84bd2
Update defaults to speed up transactions
pepepr08 Apr 30, 2026
974956f
Add README to clarify the CFDP/Checksum usage
pepepr08 May 1, 2026
6fbb8f9
Updating Documentation (port type)
pepepr08 May 1, 2026
6302edd
Spelling check update
pepepr08 May 1, 2026
edc3656
Increase PDU buffer size to include Descriptor
pepepr08 May 4, 2026
0027166
Add helper function for sending PDUs
pepepr08 May 4, 2026
5842ff4
Move PDU Type Enum to FPP
pepepr08 May 5, 2026
d11c062
Assert to nullptr instead of just NULL
pepepr08 May 8, 2026
92ded17
Removed spelling duplicates and sorted
Brian-Campuzano May 11, 2026
38b95fa
Add security considerations to CfdpManager SDD
Brian-Campuzano May 19, 2026
f33b791
Address PR #5138 review comments - code fixes
Brian-Campuzano May 19, 2026
03d0bc4
Fix unit test PDU type enum compilation errors
Brian-Campuzano May 19, 2026
5f5984b
Fix unit tests to handle FW_PACKET_FILE descriptor
Brian-Campuzano May 19, 2026
a9c97ad
Update Svc/Subtopologies/FileHandlingCfdp/FileHandlingCfdp.fpp
Brian-Campuzano May 27, 2026
daec54d
Merge branch 'nasa:devel' into cfdp-merge
Brian-Campuzano May 27, 2026
fa101db
Address CppCheck warnings for CfdpManager
Brian-Campuzano May 27, 2026
922d932
Updated CfdpManager to use the mem allocator pattern
Brian-Campuzano May 27, 2026
4a96401
Refactor EVRs and remove deprecated code
Brian-Campuzano May 27, 2026
b3b894f
Fix RHEL8 implicit conversion warnings
Brian-Campuzano May 27, 2026
39d159b
Fix clang format errors and more conversion warnings
Brian-Campuzano May 27, 2026
2762d98
More assert argument conversion fixes
Brian-Campuzano May 27, 2026
a3b555c
Clang formatting
Brian-Campuzano May 28, 2026
dbe7051
More clang format fixes
Brian-Campuzano May 28, 2026
19e419b
Refactored to remove single deep recursion dispatch and fixed more co…
Brian-Campuzano May 28, 2026
ce05327
More conversion warnings fixes
Brian-Campuzano May 28, 2026
db8965e
More conversion warnings
Brian-Campuzano May 28, 2026
84467b4
More conversion warnings. There has to be a better way to do this.
Brian-Campuzano May 28, 2026
ff39281
More rhel8 fixes
Brian-Campuzano May 28, 2026
28b5dbe
Hopefully last rhel8 compiler warnings
Brian-Campuzano May 28, 2026
75484c9
Clang fixes
Brian-Campuzano May 28, 2026
3325893
Fix the clang ut build errors
Brian-Campuzano May 28, 2026
aa7333d
Merge branch 'devel' into cfdp-merge
Brian-Campuzano May 28, 2026
edf7ab4
Add FileHandlingCfdp subtopology Software Design Document
Brian-Campuzano Jun 5, 2026
fdada8d
Update CfdpManager SDD per review comments
Brian-Campuzano Jun 5, 2026
6ebfc8a
Replaced std:function with function pointers and replaced lambda func…
Brian-Campuzano Jun 5, 2026
947e144
Replace new allocations in the CFDP engine and channel classes with M…
Brian-Campuzano Jun 5, 2026
3715acc
Code style fixes: nullptr, const_cast, and reinterpret_cast comments
Brian-Campuzano Jun 5, 2026
e3cd517
Convert unscoped enums to enum class and #define to constexpr (CPP-26…
Brian-Campuzano Jun 5, 2026
e96798d
Fix unit tests for enum class conversion
Brian-Campuzano Jun 5, 2026
e846277
Fix enum class conversion issues in CfdpManager unit tests
Brian-Campuzano Jun 5, 2026
6adffc7
Fix logic inversion bug in stop polling directory command
Brian-Campuzano Jun 5, 2026
93bf519
Fix ground-reachable assert on zero-length file transfers
Brian-Campuzano Jun 5, 2026
4890368
Fix unsigned integer underflow in FileDataPdu deserialization
Brian-Campuzano Jun 5, 2026
47a4ef0
Replace hardware-reachable asserts with graceful error handling
Brian-Campuzano Jun 5, 2026
ad15d72
Add polling directory keywords to spelling expects
Brian-Campuzano Jun 5, 2026
38054cd
Added missing event and fixed spelling error
Brian-Campuzano Jun 5, 2026
382ebac
Removed hyphen per project style
Brian-Campuzano Jun 5, 2026
ed7aefd
Improve telemetry assertions to use exact counts in single-transactio…
Brian-Campuzano Jun 5, 2026
875120d
Fix Cancel Transaction issues and update events
pepepr08 May 29, 2026
7dc20db
Fix bug where reused chunk list is not clear
pepepr08 Jun 5, 2026
eac0b83
Fix bug where transactions weren't getting properly recycled
pepepr08 Jun 8, 2026
3c1107c
Fix merge/pull conflicts
pepepr08 Jun 8, 2026
9cdbd88
Improve FW_ASSERT debugging info with chanId
pepepr08 Jun 8, 2026
271bef9
Increase class 2 limit parameters
pepepr08 Jun 9, 2026
374b07c
Add Transfer Failed events
pepepr08 Jun 18, 2026
a32bbfb
Canceled transactions are handled differently
pepepr08 Jun 18, 2026
d517685
Reset history for recycled transactions
pepepr08 Jun 18, 2026
abdb991
Update severity of warning events
pepepr08 Jun 19, 2026
adcfba8
Code improvements
pepepr08 Jun 19, 2026
7a6c92f
Update unit tests
pepepr08 Jun 19, 2026
ee02fef
Merge pull request #14 from FireflySpace/cfdp_fix_cancel
pepepr08 Jun 20, 2026
8ee11f0
Adding unit tests for commands
pepepr08 Jun 25, 2026
f26e7fc
Adding unit tests for Ports, Parameters, Events and multi-channel sup…
pepepr08 Jun 25, 2026
9199495
Fix bug where cmd response gets overwritten
pepepr08 Jun 30, 2026
40fd493
Remove unused events
pepepr08 Jun 30, 2026
a15df00
Full transaction testing for suspend/resume/cancel
pepepr08 Jun 30, 2026
62389d0
Test TxFileQueued and file create failure events
pepepr08 Jun 30, 2026
ba1e13e
Assert event count
pepepr08 Jun 30, 2026
704dc3c
Unit tests: improve events coverage
pepepr08 Jul 6, 2026
da2cf33
Fix CFDP double-free guard: tag freed transactions with QueueId::FREE
pepepr08 Jul 7, 2026
a6499bd
Remove dead Cfdp::Status::SEND_PDU_ERROR enum value
pepepr08 Jul 7, 2026
baab7b6
Added unit test for TxSendMetadataFailed
pepepr08 Jul 8, 2026
feb9088
Apply clang-format
pepepr08 Jul 8, 2026
0495e61
Fix check-spelling
pepepr08 Jul 8, 2026
6412660
Fix test wiring, implement parameter tests, honest skips
pepepr08 Jul 8, 2026
5492daa
Standardize CfdpManager UT history reset and event-size guards
pepepr08 Jul 8, 2026
bd7519a
Remove unused event due to future enhancement
pepepr08 Jul 8, 2026
babbdd9
Fix issue where PDUs with invalid Directive code were getting silentl…
pepepr08 Jul 8, 2026
bb31c13
Remove redundant tests
pepepr08 Jul 8, 2026
4f9caaa
Apply clang-format
pepepr08 Jul 8, 2026
cdad441
Add CfdpManager coverage unit tests for helpers and error paths
pepepr08 Jul 8, 2026
3351594
Update events section of CfdpManager SDD
pepepr08 Jul 13, 2026
2e3c832
Update data return UTs to verify buffer deallocation
pepepr08 Jul 13, 2026
854973b
Verify event arguments
pepepr08 Jul 13, 2026
0074012
Verify PDU count on nominal Rx tests
pepepr08 Jul 13, 2026
97ea51c
Merge pull request #15 from FireflySpace/cfdp-ut
pepepr08 Jul 13, 2026
84ed642
Merge remote-tracking branch 'upstream/devel' into cfdp-merge
Brian-Campuzano Jul 13, 2026
f5fb82f
Updated command enums to be constant to match the updated autocoded b…
Brian-Campuzano Jul 13, 2026
f84f05e
Fixed type conveversion during bitshift and made destructor virtual
Brian-Campuzano Jul 13, 2026
92c376a
Two more conversion error fixes in CfdpManager UTs
Brian-Campuzano Jul 13, 2026
72ed023
Only run testTxFileSeekFailedEvent on linux as it relies on a linuxism
Brian-Campuzano Jul 15, 2026
dd11090
Added memset init/reset of union members to prevent access of unitial…
Brian-Campuzano Jul 15, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 25 additions & 0 deletions CFDP/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# CFDP Utilities

## Overview

This directory contains CFDP utility classes used by the F' Framework.

## Contents

- **Checksum/**: CCSDS CFDP-compliant 32-bit checksum implementation

## Where is CfdpManager?

The main CFDP protocol implementation is located at:

**`Svc/Ccsds/CfdpManager/`**

If you're looking for the CFDP file transfer component, you'll find it there.

## Why is Checksum here?

The Checksum utility is used by the F' Framework's FilePacket class (`Fw/FilePacket/FilePacket.hpp`), which predates the CfdpManager component and supports legacy file transfer components (FileUplink, FileDownlink). To maintain framework independence, Checksum cannot be moved into CfdpManager.

## Future

A long-term solution would be to relocate Checksum to a framework utilities directory (e.g., `Fw/Utils/`), further clarifying the architectural separation.
24 changes: 12 additions & 12 deletions Os/File.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,29 +29,29 @@ struct FileHandle {};
class FileInterface {
public:
enum Mode {
OPEN_NO_MODE, //!< File mode not yet selected
OPEN_READ, //!< Open file for reading
OPEN_NO_MODE, //!< File mode not yet selected
OPEN_READ, //!< Open file for reading
OPEN_CREATE, //!< Open file for writing and truncates file if it exists, ie same flags as creat()
OPEN_WRITE, //!< Open file for writing
OPEN_SYNC_WRITE, //!< Open file for writing; writes don't return until data is on disk
OPEN_WRITE, //!< Open file for writing
OPEN_SYNC_WRITE, //!< Open file for writing; writes don't return until data is on disk
OPEN_APPEND, //!< Open file for appending
MAX_OPEN_MODE //!< Maximum value of mode
};

enum Status {
OP_OK, //!< Operation was successful
DOESNT_EXIST, //!< File doesn't exist (for read)
NO_SPACE, //!< No space left
NO_PERMISSION, //!< No permission to read/write file
BAD_SIZE, //!< Invalid size parameter
NOT_OPENED, //!< file hasn't been opened yet
OP_OK, //!< Operation was successful
DOESNT_EXIST, //!< File doesn't exist (for read)
NO_SPACE, //!< No space left
NO_PERMISSION, //!< No permission to read/write file
BAD_SIZE, //!< Invalid size parameter
NOT_OPENED, //!< file hasn't been opened yet
FILE_EXISTS, //!< file already exist (for CREATE with O_EXCL enabled)
NOT_SUPPORTED, //!< Kernel or file system does not support operation
INVALID_MODE, //!< Mode for file access is invalid for current operation
INVALID_ARGUMENT, //!< Invalid argument passed in
NO_MORE_RESOURCES, //!< No more available resources
OTHER_ERROR, //!< A catch-all for other errors. Have to look in implementation-specific code
OUTSIDE_SANDBOX, //!< Path falls outside the configured sandbox directory
OTHER_ERROR, //!< A catch-all for other errors. Have to look in implementation-specific code
OUTSIDE_SANDBOX, //!< Path falls outside the configured sandbox directory
MAX_STATUS //!< Maximum value of status
};

Expand Down
1 change: 1 addition & 0 deletions Svc/Ccsds/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,5 @@ add_fprime_subdirectory("${CMAKE_CURRENT_LIST_DIR}/TmFramer/")
add_fprime_subdirectory("${CMAKE_CURRENT_LIST_DIR}/AosFramer/")
add_fprime_subdirectory("${CMAKE_CURRENT_LIST_DIR}/AosDeframer/")
add_fprime_subdirectory("${CMAKE_CURRENT_LIST_DIR}/ApidManager/")
add_fprime_subdirectory("${CMAKE_CURRENT_LIST_DIR}/CfdpManager/")
add_fprime_subdirectory("${CMAKE_CURRENT_LIST_DIR}/TestUtils/")
58 changes: 58 additions & 0 deletions Svc/Ccsds/CfdpManager/ATTRIBUTION.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
# CFDP Manager Attribution

This component implements the CCSDS File Delivery Protocol (CFDP) for F-Prime (F'). It includes both ported code from NASA's Core Flight System (cFS) CFDP application and new F' implementations.

## Source Attribution

Portions of this code are derived from the NASA Core Flight System (cFS) CFDP (CF) Application:
- **Repository**: https://github.com/nasa/CF
- **Version**: 3.0.0
- **License**: Apache License 2.0
- **Copyright**: Copyright (c) 2019 United States Government as represented by the Administrator of the National Aeronautics and Space Administration
- **NASA Docket**: GSC-18,447-1

## Files Ported from CF

The following files are ports/adaptations from CF source code and retain the original NASA copyright:

### Core Engine & Transaction Management
- `Engine.hpp` / `.cpp` - from `cf_cfdp.c` / `cf_cfdp.h`
- `Transaction.hpp` - from `cf_cfdp_r.h` / `cf_cfdp_s.h` / `cf_cfdp_dispatch.h`
- `TransactionTx.cpp` - from `cf_cfdp_s.c` / `cf_cfdp_dispatch.c`
- `TransactionRx.cpp` - from `cf_cfdp_r.c` / `cf_cfdp_dispatch.c`

### Data Structures & Utilities
- `Types/Types.hpp` - from `cf_cfdp_types.h`
- `Utils.hpp` / `.cpp` - from `cf_utils.h` / `cf_utils.c`
- `Channel.hpp` / `.cpp` - from channel functions in `cf_cfdp.c` / `cf_utils.c`
- `Chunk.hpp` / `.cpp` - from `cf_chunks.h` / `cf_chunks.c`
- `Clist.hpp` / `.cpp` - from `cf_clist.h` / `cf_clist.c`

Each of these files includes the full NASA copyright notice and Apache 2.0 license text in its header.

## New F-Prime Implementations

The following files are new implementations for F-Prime and do not contain CF-derived code:

### Integration Layer
- `CfdpManager.hpp` / `.cpp` - F-Prime component wrapper
- `Timer.hpp` / `.cpp` - F-Prime timer implementation

### PDU Object-Oriented Implementation
All files in the `Types/` directory are new F' serializable implementations based on the CFDP Blue Book specification (CCSDS 727.0-B-5):
- `Types/PduBase.hpp` - Base class for all PDU types
- `Types/PduHeader.hpp` / `.cpp` - PDU header encoding/decoding
- `Types/MetadataPdu.hpp` / `.cpp` - Metadata PDU
- `Types/FileDataPdu.hpp` / `.cpp` - File Data PDU
- `Types/EofPdu.hpp` / `.cpp` - End of File PDU
- `Types/FinPdu.hpp` / `.cpp` - Finished PDU
- `Types/AckPdu.hpp` / `.cpp` - Acknowledge PDU
- `Types/NakPdu.hpp` / `.cpp` - Negative Acknowledge PDU

These files implement CFDP PDU encoding/decoding based on the specification rather than porting CF's C-style codec.

## License

This component as a whole is licensed under the Apache License 2.0. See the top-level [LICENSE.txt](../../../LICENSE.txt) for the full license text.

The CF-derived portions retain their original NASA copyright and Apache 2.0 license as documented in their file headers.
48 changes: 48 additions & 0 deletions Svc/Ccsds/CfdpManager/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
####
# F Prime CMakeLists.txt:
#
# SOURCES: list of source files (to be compiled)
# AUTOCODER_INPUTS: list of files to be passed to the autocoders
# DEPENDS: list of libraries that this module depends on
#
# More information in the F´ CMake API documentation:
# https://fprime.jpl.nasa.gov/latest/docs/reference/api/cmake/API/
#
####

register_fprime_library(
AUTOCODER_INPUTS
"${CMAKE_CURRENT_LIST_DIR}/CfdpManager.fpp"
SOURCES
"${CMAKE_CURRENT_LIST_DIR}/CfdpManager.cpp"
"${CMAKE_CURRENT_LIST_DIR}/Engine.cpp"
"${CMAKE_CURRENT_LIST_DIR}/Chunk.cpp"
"${CMAKE_CURRENT_LIST_DIR}/Clist.cpp"
"${CMAKE_CURRENT_LIST_DIR}/Utils.cpp"
"${CMAKE_CURRENT_LIST_DIR}/Timer.cpp"
"${CMAKE_CURRENT_LIST_DIR}/Channel.cpp"
"${CMAKE_CURRENT_LIST_DIR}/TransactionTx.cpp"
"${CMAKE_CURRENT_LIST_DIR}/TransactionRx.cpp"
DEPENDS
CFDP_Checksum
Svc_Ccsds_CfdpManager_Types
)

### Subdirectories ###
add_fprime_subdirectory("${CMAKE_CURRENT_LIST_DIR}/Types/")

### Unit Tests ###
register_fprime_ut(
AUTOCODER_INPUTS
"${CMAKE_CURRENT_LIST_DIR}/CfdpManager.fpp"
SOURCES
"${CMAKE_CURRENT_LIST_DIR}/test/ut/CfdpManagerTestMain.cpp"
"${CMAKE_CURRENT_LIST_DIR}/test/ut/CfdpManagerTester.cpp"
"${CMAKE_CURRENT_LIST_DIR}/test/ut/CfdpManagerCommandTests.cpp"
"${CMAKE_CURRENT_LIST_DIR}/test/ut/CfdpManagerParameterTests.cpp"
"${CMAKE_CURRENT_LIST_DIR}/test/ut/CfdpManagerMultiChannelTests.cpp"
"${CMAKE_CURRENT_LIST_DIR}/test/ut/CfdpManagerEventTests.cpp"
"${CMAKE_CURRENT_LIST_DIR}/test/ut/CfdpManagerHelperTests.cpp"
"${CMAKE_CURRENT_LIST_DIR}/test/ut/PduTester.cpp"
UT_AUTO_HELPERS
)
Loading
Loading