Fix #508, Adds complete transaction housekeeping counters - #511
Conversation
| uint32 pdu; /**< \brief Sent PDUs counter */ | ||
| uint32 nak_segment_requests; /**< \brief Sent NAK segment requests counter */ | ||
| uint32 files_sent; /**< \brief Files successfully sent counter */ | ||
| uint8 spare[4]; /**< \brief Alignment spare to avoid implicit padding */ |
There was a problem hiding this comment.
explicit trailing padding because of 8-byte alignment enforced by the compiler/strictest member being uint64
| uint16 dropped; /**< \brief Received PDUs dropped due to a transaction error */ | ||
| uint32 nak_segment_requests; /**< \brief Received NAK segment requests counter */ | ||
| uint32 files_recv; /**< \brief Files successfully received counter */ | ||
| uint8 spare[4]; /**< \brief Alignment spare to avoid implicit padding */ |
| break; | ||
| case CF_RxSubState_COMPLETE: | ||
| /* only a transaction that reached this point without error received a complete file */ | ||
| if (CF_CFDP_TxnIsOK(txn)) |
There was a problem hiding this comment.
We only care about successful completions so guard against a CRC mismatch, file-size error, or inactivity timeout which all land on this line (CF_RxSubState_COMPLETE)
| break; | ||
| case CF_TxSubState_COMPLETE: | ||
| /* only a transaction that reached this point without error sent a complete file */ | ||
| if (CF_CFDP_TxnIsOK(txn)) |
There was a problem hiding this comment.
We only care about successful completions so guard against read failures, filestore rejections, and NAK/ACK-limit failures which all land on this line (CF_TxSubState_COMPLETE)
There was a problem hiding this comment.
this was a bug. it was only ever measuring the first 8 bytes (size of a pointer assuming 64 bit machine). Dropping the & makes it measure the struct itself and actually verify the whole thing
name: Adds complete transaction housekeeping counters
about: Flight Software code changes
labels: fsw
Description of Change
Adds a housekeeping counter for successfully sent and received files. This was included was a valuable feature for ground/operators. It was implemented simply by simply isolating the incrementation to when CF notes a
CF_RxSubState_COMPLETE/CF_TxSubState_COMPLETEand guarding for when that transaction is error prone.Linked Issue
Closes #508
Requirements Impact
Testing Evidence
unit test coverage
Unit Tests (UT Assert)
COSMOS Test Suite
Will require changes in the CF housekeeping structure. Pending feedback on this pr.
Areas of Expertise Touched
Author Checklist
.clang-formatReviewer Checklist
.clang-formathas been appliedReviewer Testing Notes