-
Notifications
You must be signed in to change notification settings - Fork 74
Fix #508, Adds complete transaction housekeeping counters #511
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: dev
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -50,6 +50,8 @@ typedef struct CF_HkSent | |
| uint64 file_data_bytes; /**< \brief Sent File data bytes */ | ||
| 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 */ | ||
| } CF_HkSent_t; | ||
|
|
||
| /** | ||
|
|
@@ -66,6 +68,8 @@ typedef struct CF_HkRecv | |
| */ | ||
| 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 */ | ||
|
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. same as above |
||
| } CF_HkRecv_t; | ||
|
|
||
| /** | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -1065,6 +1065,11 @@ void CF_CFDP_R_CheckState(CF_Transaction_t *txn) | |
| txn->flags.rx.send_fin = true; | ||
| break; | ||
| case CF_RxSubState_COMPLETE: | ||
| /* only a transaction that reached this point without error received a complete file */ | ||
| if (CF_CFDP_TxnIsOK(txn)) | ||
|
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 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_AppData.hk.Payload.channel_hk[txn->chan_num].counters.recv.files_recv; | ||
| } | ||
| /* This changes the txn state such that this function is no longer called. */ | ||
| CF_CFDP_FinishTransaction(txn, true); | ||
| break; | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -868,6 +868,11 @@ void CF_CFDP_S_CheckState(CF_Transaction_t *txn) | |
| txn->flags.tx.send_eof = true; | ||
| break; | ||
| case CF_TxSubState_COMPLETE: | ||
| /* only a transaction that reached this point without error sent a complete file */ | ||
| if (CF_CFDP_TxnIsOK(txn)) | ||
|
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 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_AppData.hk.Payload.channel_hk[txn->chan_num].counters.sent.files_sent; | ||
| } | ||
| /* This changes the txn state such that this function is no longer called. */ | ||
| CF_CFDP_FinishTransaction(txn, true); | ||
| break; | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
explicit trailing padding because of 8-byte alignment enforced by the compiler/strictest member being uint64