-
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 #224, support dynamic pdu packets #295
Conversation
ph = &CF_AppData.engine.in.rx_pdudata; | ||
CFE_ES_PerfLogEntry(CF_PERF_ID_PDURCVD(chan_num)); | ||
CFE_MSG_GetSize(&bufptr->Msg, &msg_size); | ||
CF_CFDP_DecodeStart(&CF_AppData.engine.in.decode, bufptr, ph, offsetof(CF_PduRecvMsg_t, ph), msg_size); | ||
CFE_MSG_GetType(&bufptr->Msg, &msg_type); |
Check warning
Code scanning / CodeQL-coding-standard
Unchecked return value
Can you rebase to get rid of that merge commit? |
Add |
CF_Transaction_t *t; /* initialized below */ | ||
uint32 count = 0; | ||
int32 status; | ||
const int chan_num = (c - CF_AppData.engine.channels); |
Check warning
Code scanning / CodeQL-coding-standard
Unchecked function argument
CFE_SB_Buffer_t * bufptr; | ||
CFE_MSG_Size_t msg_size; | ||
CF_Transaction_t *t; /* initialized below */ | ||
uint32 count = 0; |
Check notice
Code scanning / CodeQL-coding-standard
Use of basic integral type
CFE_MSG_Size_t msg_size; | ||
CF_Transaction_t *t; /* initialized below */ | ||
uint32 count = 0; | ||
int32 status; |
Check notice
Code scanning / CodeQL-coding-standard
Use of basic integral type
CF_Transaction_t *t; /* initialized below */ | ||
uint32 count = 0; | ||
int32 status; | ||
const int chan_num = (c - CF_AppData.engine.channels); |
Check notice
Code scanning / CodeQL-coding-standard
Use of basic integral type
int32 status; | ||
const int chan_num = (c - CF_AppData.engine.channels); | ||
CFE_SB_Buffer_t * bufptr; | ||
CFE_MSG_Size_t msg_size; |
Check notice
Code scanning / CodeQL-coding-standard
Use of basic integral type
CCB 3 Aug 2022: Approved pending documentation. |
Information about the CF peer to peer test conducted:
Normally, the SGW app reads PDUs wrapped in telemetry packets from the software bus, sends them to the peer cFS system, and sends the packet data on the SB using a new message ID. This enables the following unmodified CF peer to peer transactions:
With this pull request applied to allow CF to receive PDUs wrapped in TLM packets, I changed the SGW configuration to wrap the PDU data using the same packet type/message ID:
The peer to peer transaction works as expected. |
Checklist (Please check before submitting)
Describe the contribution
Fix #224
In order to support CF peer to peer transactions, this change will allow incoming PDU packets to be either command or telemetry packets. This is handled in the cf_cfdp_sbintf.c file that handles PDUs wrapped in CCSDS packets.
This change required renaming structures:
This rename makes it less confusing if CF receives a PDU wrapped in a TLM packet, for example. In this case, it would not make sense to receive a "Send" type packet.
In addition to renaming these structures, the typedefs were moved to cf_cfdp_sbint.h as a step toward decoupling the PDU send and receive from the software bus.
By allowing incoming PDU packets to be wrapped in command or telemetry CCSDS packets, CF can receive PDUs from the ground wrapped in a command packet, or PDUs from a CF peer wrapped in a telemetry packet.
Testing performed
Expected behavior changes
System(s) tested on
Contributor Info - All information REQUIRED for consideration of pull request
Alan Cudmore / NASA GSFC / Code 582.0