nasa / CF

The Core Flight System (cFS) CFDP application.
Apache License 2.0
79 stars 45 forks source link

File receive transactions are not canceled when a fault is detected #128

Closed semaldona closed 2 years ago

semaldona commented 2 years ago

Per requirement CF2002.1, CF should cancel the transaction when a fault is detected. Currently when CF detects a fault it will issue an event message an increment the fault counter. However it will continue to retry or closeout the transaction by issuing ACK or NAK PDUs. Some of this behavior appears to be consistent with CFDP Class 2 handling. Either the requirement needs updating or CF should comply and not attempt to continue the transaction when a fault is detected.

skliper commented 2 years ago

It seems like the implementation makes sense per the walk through analysis results below. Recommend requirement update to better capture behavior (doesn't "cancel" the transaction, just closes it out per whatever method is appropriate).

Five cases from CF2002.1.2:

  1. Positive Ack Limit Reached

    • Looks like transaction is reset in this case (class 2 only)
  2. Filestore Rejection

    • Sends FIN to try to close out transaction with the FILESTORE_REJECTION command code (resets for class 1)
  3. File-CRC Mismatch Failure

    • This happens at the end for class 1, just deletes the file. For class 2 it'll send FIN to close out with FILE_CHECKSUM_FILAURE command code
  4. File-Size Error

    • At Eof, sends FIN and close out transaction with FILE_SIZE_ERROR command code
  5. NAK Limit Reached

    • Sends FIN with NAK_LIMIT_REACHED (class 2 only, NA for class 1)
  6. Inactivity Limit Reached

    • Sends FIN with INACTIVITY_DETECTED (resets for class 1)
  7. Suspend Request Received

    • Ignoring for now since it's covered by #127