Rework no message buffer error reporting to not spam

Open
#378 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
35/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Stale
Tech stack
c
Domain
embedded-iot

Research direction

Start with fsw/src/cf_cfdp_sbintf.c around the linked pre-#377 code and review the related semaphore-timeout and message-buffer handling. Compare the proposed transition or HK-cycle event behavior, then verify that both counters are reported in HK without repeated error-event flooding.

Written by the indexing model from the issue text.

Description

enhancement

Checklist (Please check before submitting)

  • I reviewed the Contributing Guide.
  • I reviewed the CF README.md file to see if the feature is in the major future work.
  • I performed a cursory search to see if the feature request is relevant, not redundant, nor in conflict with other tickets.

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

  • Related to bug #377

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

Dominant language
C
Stars
123
Forks
82
Avg merge
2d 22h
Merged PRs (30d)
2

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from nasa/CF

All issues in nasa/CF

Similar issues

More C issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.