nasa / CF

The Core Flight System (cFS) CFDP application.
Apache License 2.0
76 stars 45 forks source link

Rework no message buffer error reporting to not spam #378

Open skliper opened 1 year ago

skliper commented 1 year ago

Checklist (Please check before submitting)

Is your feature request related to a problem? Please describe.

Fix for #377 only addressed removal of error event on nominal semaphore timeout (flow control). When a message buffer isn't available, this error event will flood when silent is false since every wakeup CF will try to resend the PDU. Note silent is set to false on all non-file data PDUs.

I didn't see any justification for why the code was implemented this way (no event for file data PDUs, events on the rest).

This is the snip before the fix for #377. https://github.com/nasa/CF/blob/b0269effd3c0c3f8120bba1abbdd50abcaf53e59/fsw/src/cf_cfdp_sbintf.c#L91-L116

Describe the solution you'd like I think it would be more useful to know it happened and a count of how often. Consider adding a counter for both semaphore timeouts and no message buffer available. Only send an event on the HK cycle when "no message buffer" counter increments, and report both in HK.

Describe alternatives you've considered Could just send the event once when the no message buffer available count transitions to non-zero.

Additional context None

Requester Info Jacob Hageman - NASA/GSFC