-
Notifications
You must be signed in to change notification settings - Fork 45
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
Fix #274, send packet when transaction resets #302
Conversation
|
||
if (PktBuf != NULL) | ||
{ | ||
CFE_MSG_Init(&PktBuf->eot.tlm_header.Msg, CFE_SB_ValueToMsgId(CF_EOT_TLM_MID), sizeof(*PktBuf)); |
Check warning
Code scanning / CodeQL-coding-standard
Unchecked return value
** Timestamp and send eod of transaction telemetry | ||
*/ | ||
CFE_SB_TimeStampMsg(&PktBuf->eot.tlm_header.Msg); | ||
CFE_SB_TransmitBuffer(&PktBuf->SBBuf, true); |
Check warning
Code scanning / CodeQL-coding-standard
Unchecked return value
* See description in cf_cfdp.h for argument/return detail | ||
* | ||
*-----------------------------------------------------------------*/ | ||
void CF_CFDP_SendEotPkt(CF_Transaction_t *t) |
Check notice
Code scanning / CodeQL-coding-standard
Long function without assertion
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.
Should add a requirement and update design slides (and or coordinate w/ update in progress if @acudmore is working them). Requirement could be done as a follow-on issue/pr.
28922e3
to
b3637b2
Compare
CF_TxnFilenames_t fnames; /**< \brief file names associated with this transaction */ | ||
CF_TxnState_t state; /**< \brief Transaction state */ | ||
CF_CFDP_ConditionCode_t cc; /**< \brief final condition code of operation */ | ||
CF_EntityId_t src_eid; /**< \brief the source eid of the transaction */ |
Check notice
Code scanning / CodeQL-coding-standard
Use of basic integral type
* that compiles with the alignment constraints of a CFE_SB_Buffer_t | ||
*/ | ||
typedef union | ||
{ |
Check notice
Code scanning / CodeQL-coding-standard
AV Rule 153
b3637b2
to
577ed63
Compare
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.
Looks like there were whitespace changes to the requirements. Preference is to use output exactly as provided from JIRA to make tracking changes more manageable. Maybe your editor added them? Also may want to add a requirement as to when the packet gets generated. Testers will need to add verification of this packet on transaction termination.
009c1ac
to
11a111d
Compare
CCB 3 Aug 2022: Approved pending addition of NULL test, verifying no implicit padding, and review. |
11a111d
to
3bdcc57
Compare
3bdcc57
to
7c218d3
Compare
{ | ||
CFE_MSG_Init(&PktBuf->eot.tlm_header.Msg, CFE_SB_ValueToMsgId(CF_EOT_TLM_MID), sizeof(*PktBuf)); | ||
|
||
PktBuf->eot.channel = t->chan_num; |
Check warning
Code scanning / CodeQL-coding-standard
Unchecked function argument
CF_TxnState_t state; /**< \brief Transaction state */ | ||
CF_CFDP_ConditionCode_t cc; /**< \brief final condition code of operation */ | ||
CF_EntityId_t src_eid; /**< \brief the source eid of the transaction */ | ||
CF_EntityId_t peer_eid; /**< \brief peer_eid is always the "other guy", same src_eid for RX */ |
Check notice
Code scanning / CodeQL-coding-standard
Use of basic integral type
6f1c629
to
02f86c7
Compare
{ | ||
CFE_MSG_TelemetryHeader_t tlm_header; /**< \brief Telemetry header */ | ||
CF_TransactionSeq_t seq_num; /**< \brief transaction identifier, stays constant for entire transfer */ | ||
uint32 channel; /**< \brief Channel number */ |
Check notice
Code scanning / CodeQL-coding-standard
Use of basic integral type
typedef struct CF_EotPacket | ||
{ | ||
CFE_MSG_TelemetryHeader_t tlm_header; /**< \brief Telemetry header */ | ||
CF_TransactionSeq_t seq_num; /**< \brief transaction identifier, stays constant for entire transfer */ |
Check notice
Code scanning / CodeQL-coding-standard
Use of basic integral type
02f86c7
to
be6df75
Compare
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.
Minor comments, nothing required to change but possible suggestions if you want.
1. Transaction identifier | ||
2. Channel number | ||
3. Direction of transaction | ||
4. Filenames associated with transaction | ||
5. Transaction state | ||
6. Condition code | ||
7. Source EID of transaction | ||
8. Peer EID of transaction |
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.
Fine in this commit if this was already done in JIRA but in the future I wouldn't update a requirement just to change the order of parameters in a structure. Our requirements shouldn't dictate design/implementation down to that level. The goal is to keep requirements stable (minimize required document updates and all the associated analysis for a "requirements change")
fsw/src/cf_msg.h
Outdated
uint32 fsize; /**< \brief File size */ | ||
CF_Crc_t crc; /**< \brief CRC state object */ | ||
CF_TxnFilenames_t fnames; /**< \brief file names associated with this transaction */ |
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.
Usually strings are at the end? OK as is if there are no gaps... but just surprised to see it before a uint32.
unit-test/cf_cfdp_tests.c
Outdated
/* setup for a call to CFE_SB_AllocateMessageBuffer() */ | ||
PktBufPtr = NULL; | ||
UT_SetDataBuffer(UT_KEY(CFE_SB_AllocateMessageBuffer), &PktBufPtr, sizeof(PktBufPtr), true); |
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.
IIRC if you don't pass in a buffer it'll return NULL anyways, so you probably don't need this.
be6df75
to
954ad2b
Compare
CF_CFDP_ConditionCode_t cc; /**< \brief final condition code of operation */ | ||
CF_EntityId_t src_eid; /**< \brief the source eid of the transaction */ | ||
CF_EntityId_t peer_eid; /**< \brief peer_eid is always the "other guy", same src_eid for RX */ | ||
uint32 fsize; /**< \brief File size */ |
Check notice
Code scanning / CodeQL-coding-standard
Use of basic integral type
CF_EntityId_t src_eid; /**< \brief the source eid of the transaction */ | ||
CF_EntityId_t peer_eid; /**< \brief peer_eid is always the "other guy", same src_eid for RX */ | ||
uint32 fsize; /**< \brief File size */ | ||
uint32 crc_result; /**< \brief CRC result */ |
Check notice
Code scanning / CodeQL-coding-standard
Use of basic integral type
@dzbaker @havencarlson - heads up it looks like I missed the whitespace changes that snuck into the requirements .cvs. I recommend an export from JIRA again and put directly in w/o whitespace changes so the next person doesn't get surprised by the number of changes. |
Checklist (Please check before submitting)
Describe the contribution
Fix #274, when a transaction resets, an information packet is sent
Testing performed
Unit testing
Expected behavior changes
Sending a packet of information on a transaction when it is reset.
System(s) tested on
Contributor Info - All information REQUIRED for consideration of pull request
Haven Carlson - NASA