nasa / nasa/CS

Standardization of Command Responses

Open
#95 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
C
Stars
36
Forks
41
Avg merge
11d 19h
Merged PRs (30d)
2

Description

Checklist (Please check before submitting)

  • I reviewed the Contributing Guide.
  • I reviewed the README 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.
cFS should have standardized command responses for commands that set a state/mode like enable/disable, on/off, true/false, start/stop/pause/resume, etc.

For those commands, the app should respond as describe below:

If the current setting is not in that commanded state,
    If the commanded state can be set successfully,
    a. Increment the command counter
    b. Send an INFO event that says command successfully executed
    otherwise,
    a. Increment the command error counter
    b. Send an ERROR event that says failed to execute the command

If the current setting is already in that commanded state,
    Increment the command counter, not command error counter
    Send an INFO event that says already in that state

The following command response does not align with the standard:

Successful events are debug type:

CS_ONESHOT_STARTED_DBG_EID
CS_RECOMPUTE_CFECORE_STARTED_DBG_EID
CS_RECOMPUTE_OS_STARTED_DBG_EID
CS_RECOMPUTE_EEPROM_STARTED_DBG_EID

Debug events are issued when a command addresses an empty table state 

CS_ENABLE_EEPROM_DEF_EMPTY_DBG_EID
CS_ENABLE_MEMORY_DEF_EMPTY_DBG_EID
CS_DISABLE_MEMORY_DEF_EMPTY_DBG_EID
CS_ENABLE_TABLE_DEF_NOT_FOUND_DBG_EID
CS_DISABLE_TABLE_DEF_NOT_FOUND_DBG_EID
CS_ENABLE_APP_DEF_NOT_FOUND_DBG_EID
CS_DISABLE_APP_DEF_NOT_FOUND_DBG_EID

Describe the solution you'd like
Update logic to align with the standard.

Requester Info
Dan Knutsen
NASA Goddard

Contributor guide

Open the contributing guide

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.

Research direction

Start by locating the command handlers associated with the listed event IDs, including CS_ONESHOT_STARTED_DBG_EID and the CS_ENABLE or CS_DISABLE empty-table events. Compare their current counters and event types with the requested standard. Done means the affected state-changing commands consistently report successful, failed, or already-in-state outcomes as specified.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.