Should not use "HK" packet data elements as active/runtime control values
Nobody has claimed this yet.
- Dominant language
- C
- Stars
- 120
- Forks
- 77
- Avg merge
- 7d 18h
- Merged PRs (30d)
- 3
Description
The cf_hk_packet_t values should be used strictly for reporting housekeeping status of CF out to external entities. However, CF uses some values within this structure for some active control purposes as well.
For example, the hk.channel_hk[c].q_size member is used for checking whether the soft limit is reached yet:
https://github.com/nasa/CF/blob/7b99b91cd50a347f8553fc68ea3b074ff0672251/fsw/src/cf_cfdp.c#L1429
Note that these HK structures are currently marked as "packed" (see #41) so reading/writing from these structs is more costly than normal structures. Furthermore, tracking depth using a single integer can be somewhat error prone (it is possible to "miss" an increment/decrement, and it will never self-correct).
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in fsw/src/cf_cfdp.c around line 1429 and inspect how hk.channel_hk[c].q_size is used for the soft-limit check. Trace the cf_hk_packet_t fields used for active control, then separate those runtime values from housekeeping reporting so the HK structure is used strictly for external status.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- c
- Domain
- embedded-iot
- Issue type
- Refactor
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100