Skip to content

CFDP SDDs: example ComCcsds CFDP ports don't exist; tmp_dir staging and default timers are wrong #6135

Description

@PaulMRamirez
F´ Version v4.3.0 (also checked: v4.4.0, devel 55f597d)
Affected Component Svc/Subtopologies/FileHandlingCfdp, Svc/Ccsds/CfdpManager (docs)

Problem Description

Found by reading; lines are v4.3.0, code in Svc/Ccsds/CfdpManager/. All three remain in v4.4.0 and devel.

  1. FileHandlingCfdp/docs/sdd.md:78-89 (devel 82-93) connects cfdpManager to ComCcsds.Ports_ComBufferQueue.CFDP, Ports_ComBufferGet.CFDP, cfdpUplinkOut, cfdpUplinkReturnIn, bufferGetIn, bufferDeallocateOut. None exist: Ports_ComBufferQueue has only FILE (Svc/Subtopologies/ComCcsds/ComCcsds.fpp:9-11).
  2. CfdpManager/docs/sdd.md:120 and :618 (devel 621) say received files are written to tmp_dir and moved on completion. The destination is in fact opened once metadata is known (TransactionRx.cpp:368). tmp_dir is used only when a Class 2 transaction starts with file data (Engine.cpp:545-559, TransactionRx.cpp:347-363); that file is moved when the metadata arrives (TransactionRx.cpp:1094-1097).
  3. CfdpManager/docs/sdd.md:625 (devel 628) gives defaults ack_timer=3s, inactivity_timer=30s; Parameters.fppi:44-45 sets 2 and 120.

Seen on v4.3.0: of 26 receives that logged MetadataReceived, 3 first logged RxTempFileCreated (e.g. /tmp/100:23.tmp), all Class 2 uploads whose metadata PDU a lossy test relay dropped (5 % each way once, 50 % uplink twice).

Context / Environment

F´ v4.3.0 (7d8f579), fprime-fpp 3.3.0, Ubuntu 24.04
Stock ComCcsds; ground: Yamcs 5.12.8 CfdpService

How to Reproduce

  1. Search ComCcsds.fpp for the six names in the SDD example.
  2. Drop a Class 2 upload's metadata PDU: only then is RxTempFileCreated logged.
  3. Compare CfdpManager/docs/sdd.md:625 with Parameters.fppi:39-63.

Expected Behavior

The SDDs match the code.

Suggested Fix

  • Add CFDP ports to ComCcsds, or wire the example to existing ports.
  • tmp_dir: "only for a Class 2 receive whose first PDU is file data; moved when the metadata arrives".
  • Give the real defaults (2 s, 120 s).

Workaround

We used comQueue's FILE slot, fprimeRouter.fileOut/fileBufferReturnIn and our own BufferManager. Ref wires FileHandling to those ports, so the two can't share a ComCcsds.

AI Usage

Generative AI was used. Claude Code (Anthropic) found this while integrating CFDP into DoomSat, a hobby flight-software demo: it ran the system and read the F´ sources as described above, and drafted this issue. Type of assistance: investigation and writing. Scope: the whole issue. Level of modification: reviewed by me before filing.


Generated by Claude Code

Activity

  1. ssmurfgg04-gif commented on Oct 16, 2026

    @ssmurfgg04-gif

    Taking this one. I verified all three claims against devel (ComCcsds.fpp only has the FILE queue slot, the router file ports are fileUplinkOut/fileUplinkReturnIn, rInit opens dst_filename directly, Parameters.fppi says 2 s / 120 s) and opened #6209 with the doc corrections. The example wiring was also pointing the buffer deallocate connection backwards, fixed that too.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    CFDPDocumentationDocumentation, Tutorials and References updatesbug

    Type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions