-
Notifications
You must be signed in to change notification settings - Fork 50
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
CF_CFDP_SendEotPkt sent with incorrect CC value #325
Comments
Looking into this issue today, but there is a bit of a deeper design problem here, related to the "EOT" telemetry message. The problem is that the condition code represented by While in some cases there is a code that simply needs to be set (e.g. Note that condition codes only appear in the CFDP protocol when sending the FIN/ACK/EOF PDUs, which only occur after successful protocol interaction to get to that point. That means the The problem only occurs with the the "EOT" telemetry packet because it sent for every transaction that ends and this value is included in the TLM, even when the CFDP protocol had not yet set it to something relevant. Basically, EOT is an extension of CFDP, but the condition codes where not extended accordingly. Possible resolution would be to define a separate "transaction status" which can represent the full set of conditions for which CFDP might reset a transaction. This would be a superset of the condition codes defined in CFDP. Because a transaction status is a superset, it can be translated to a CFDP CC, but not vice versa. Thus it can still serve the same purpose for generating the FIN/ACK/EOF PDU, but also express more failure conditions that are not part of that set. |
Adds a new concept of "transaction status" to replace use of CFDP condition code to indicate the result of a transaction. To aid in transition this is equivalent in numeric value to the defined CFDP CC values but is extended with additional values for other conditions that can occur in the implementation but do not necessarily result in sending a FIN/EOF PDU. This also adds setting of Transaction Status for some off-nominal cases where no CFDP CC was set.
Adds a new concept of "transaction status" to replace use of CFDP condition code to indicate the result of a transaction. To aid in transition this is equivalent in numeric value to the defined CFDP CC values but is extended with additional values for other conditions that can occur in the implementation but do not necessarily result in sending a FIN/EOF PDU. This also adds setting of Transaction Status for some off-nominal cases where no CFDP CC was set.
Adds a new concept of "transaction status" to replace use of CFDP condition code to indicate the result of a transaction. To aid in transition this is equivalent in numeric value to the defined CFDP CC values but is extended with additional values for other conditions that can occur in the implementation but do not necessarily result in sending a FIN/EOF PDU. This also adds setting of Transaction Status for some off-nominal cases where no CFDP CC was set.
Fix #325, add more concise transaction status code
Fix #325, update requirements for more concise transaction status code
Checklist (Please check before submitting)
Describe the bug
A call to CF_CFDP_SendEotPkt() was added to the CF_CFDP_ResetTransaction() function to give feedback on successful file transmission. However, It is sent every time the transaction is discarded regardless of the cause. I believe it was the intent that the t->history->cc could then be used to determine if it was successful.
However, it is unclear if t->history->cc is being correctly set on on every possible condition that calls CF_CFDP_ResetTransaction(). Particularly with the CFDP send control loop, it appears that there are cases where the the sending transaction is reset without setting t->history->cc which is used by CF_CFDP_SendEotPkt(). i.e. The CF_EotPacket telemetry would indicate success when it in fact did not complete successfully.
Before CF_CFDP_SendEotPkt() was added to CF_CFDP_ResetTransaction(), it did not matter if t->history->cc was set before calling CF_CFDP_ResetTransaction() since it wasn't used in the function before freeing the transaction.
To Reproduce
Steps to reproduce the behavior:
example -Let CFPD Send t->inactivity_timer timeout before completing the transaction.
Expected behavior
t->history->cc must be set correctly for all possible cases before calling CF_CFDP_ResetTransaction().
Canceling a transaction or an error condition that leads to resetting the transaction must set t->history->cc to a value other than CF_CFDP_ConditionCode_NO_ERROR.
Unit tests for function that have an error condition that leads to resetting the transaction should verify that t->history->cc is also set to an error condition.
Code snips
void CF_CFDP_SendEotPkt(CF_Transaction_t *t)
{
...
PktBuf->eot.cc = t->history->cc;
...
}
System observed on:
Additional context
Add any other context about the problem here.
Reporter Info
Nathan Lynch JSC-ER611
The text was updated successfully, but these errors were encountered: