Skip to content

Fix 2868 fix time send cmd on client - #2882

Merged
alanc-gsfc merged 2 commits into
nasa:devfrom
alanc-gsfc:fix-2868-fix-time-send-cmd-on-client
Oct 29, 2026
Merged

alanc-gsfc merged 2 commits into
nasa:devfrom
alanc-gsfc:fix-2868-fix-time-send-cmd-on-client

Conversation

@alanc-gsfc

@alanc-gsfc alanc-gsfc commented Oct 23, 2026 •

Copy link
Copy Markdown
Contributor

name: FSW Code Change
about: Flight Software code changes
labels: fsw

Description of Change

This changes the cFE TIME client configuration to not initialize or send the SEND_CMD_MID packet from the 1hz tone ISR. This is sent from both the server (correct) and any client (incorrect) when the TIME FAKE TONE option is also selected.

It is an obscure bug that only occurs if:

  • TIME is configured as a client
  • The FAKE TONE option is on (default)
  • There are is a TIME Server and one or more TIME clients communicating over the Software Bus Network.

If the client is running in without a server for some reason, it will send out the SEND_CMD_MID packet but not be received by any component (the client does not subscribe)

Linked Issue

Closes #2868

Requirements Impact

  • Requirement ID(s):
  • Requirements updated as necessary
  • Existing requirements are still satisfied by this change

Testing Evidence

I added a debug OS_printf statement when the cFE TIME server receives the SEND_CMD_MID packet.
The first log is when the cpu1 executable was started, run for a little while, then the cpu2 executable was started.
The cpu2 executable is configured as a TIME client.

TIME Server received SEND_CMD_MID: Seconds: 3400278
TIME Server received SEND_CMD_MID: Seconds: 3400279
TIME Server received SEND_CMD_MID: Seconds: 3400280
TIME Server received SEND_CMD_MID: Seconds: 3400281
TIME Server received SEND_CMD_MID: Seconds: 3400282
.TIME Server received SEND_CMD_MID: Seconds: 3400283
TIME Server received SEND_CMD_MID: Seconds: 3400284
TIME Server received SEND_CMD_MID: Seconds: 3400285
TIME Server received SEND_CMD_MID: Seconds: 3400286
TIME Server received SEND_CMD_MID: Seconds: 3400287
TIME Server received SEND_CMD_MID: Seconds: 3400288
.EVS Port1 1980-012-14:03:37.70912 66/1/SBN 259: connecting to peer 66:2
EVS Port1 1980-012-14:03:37.70953 66/1/SBN 5: Created peer pipe 'SBN_2_66_Pipe'
EVS Port1 1980-012-14:03:37.70956 66/1/SBN 5: Peer 66:2 connected.
EVS Port1 1980-012-14:03:37.90907 66/1/SBN 1: SBN protocol version match with peer 66:2
TIME Server received SEND_CMD_MID: Seconds: 3400289
TIME Server received SEND_CMD_MID: Seconds: 3400290
TIME Server received SEND_CMD_MID: Seconds: 3400290
TIME Server received SEND_CMD_MID: Seconds: 3400291
TIME Server received SEND_CMD_MID: Seconds: 3400291
TIME Server received SEND_CMD_MID: Seconds: 3400292
TIME Server received SEND_CMD_MID: Seconds: 3400292
TIME Server received SEND_CMD_MID: Seconds: 3400293
TIME Server received SEND_CMD_MID: Seconds: 3400293
TIME Server received SEND_CMD_MID: Seconds: 3400294
TIME Server received SEND_CMD_MID: Seconds: 3400294
.TIME Server received SEND_CMD_MID: Seconds: 3400295
TIME Server received SEND_CMD_MID: Seconds: 3400295
TIME Server received SEND_CMD_MID: Seconds: 3400296
TIME Server received SEND_CMD_MID: Seconds: 3400296

You can see that after the cpu2 peer connects, the server receives two SEND_CMD_MID packets per second, because the client is sending the packet as well. If we had 4 clients, it would receive 5 of these packets per second.

This log is from after the fix:

TIME Server received SEND_CMD_MID: Seconds: 3399893
TIME Server received SEND_CMD_MID: Seconds: 3399894
TIME Server received SEND_CMD_MID: Seconds: 3399895
TIME Server received SEND_CMD_MID: Seconds: 3399896
.TIME Server received SEND_CMD_MID: Seconds: 3399897
TIME Server received SEND_CMD_MID: Seconds: 3399898
EVS Port1 1980-012-14:03:58.08914 66/1/SBN 259: connecting to peer 66:2
EVS Port1 1980-012-14:03:58.08927 66/1/SBN 5: Created peer pipe 'SBN_2_66_Pipe'
EVS Port1 1980-012-14:03:58.08930 66/1/SBN 5: Peer 66:2 connected.
EVS Port1 1980-012-14:03:58.28909 66/1/SBN 1: SBN protocol version match with peer 66:2
TIME Server received SEND_CMD_MID: Seconds: 3399899
TIME Server received SEND_CMD_MID: Seconds: 3399900
TIME Server received SEND_CMD_MID: Seconds: 3399901
TIME Server received SEND_CMD_MID: Seconds: 3399902
.TIME Server received SEND_CMD_MID: Seconds: 3399903
TIME Server received SEND_CMD_MID: Seconds: 3399904
TIME Server received SEND_CMD_MID: Seconds: 3399905
TIME Server received SEND_CMD_MID: Seconds: 3399906
TIME Server received SEND_CMD_MID: Seconds: 3399907
TIME Server received SEND_CMD_MID: Seconds: 3399908
.TIME Server received SEND_CMD_MID: Seconds: 3399909

You can see that after the cpu2 peer connects via SBN, the TIME Server continues to receive only one SEND_CMD_MID packet per second.

Unit Tests (UT Assert)

Unit tests are updated so the time subsystem coverage tests pass when configured as a client.
TIME Server (default) tests are unchanged.

COSMOS Test Suite

N/A - no relevant changes

Areas of Expertise Touched

  • ASTRO
  • CI/CD
  • COSMOS
  • Cybersecurity
  • Docker
  • EDS
  • Git
  • PSPs
  • SBN
  • SMP
  • Tables
  • TSN
  • Unit Tests
  • Other

Author Checklist

  • Linked GitHub issue is referenced above
  • Code has been formatted with .clang-format
  • Static analysis workflows ran and passed
  • Unit tests (UT Assert) updated/added to cover code changes
  • Unit test workflows ran and passed
  • COSMOS test suite was run; tests updated/added if relevant changes were made
  • Requirements have been reviewed; updated or confirmed still satisfied (see above)
  • Testing evidence is included above
  • Self-review of the diff completed

Reviewer Checklist

  • Code logic is correct and matches the stated intent
  • Code is readable, maintainable, and follows project conventions (ask your lead if you are unsure of where to find these conventions)
  • .clang-format has been applied
  • Static analysis results reviewed and acceptable
  • The change has been exercised by the unit tests (not just that tests pass — the new/changed code paths are actually covered)
  • COSMOS test suite was executed against this change and results reviewed (or confirmed N/A with justification)
  • Reviewer has independently verified the change behaves as described (e.g., by running the tests locally, reviewing CI output in detail, or performing additional ad-hoc testing as warranted)
  • Memory safety reviewed (allocation, bounds, lifetime, stack usage)
  • Requirements impact reviewed and appropriate
  • Error handling is appropriate
  • Appropriate Expert areas have been reviewed

Reviewer Testing Notes

@alanc-gsfc alanc-gsfc self-assigned this Oct 23, 2026
@alanc-gsfc
alanc-gsfc force-pushed the fix-2868-fix-time-send-cmd-on-client branch from f1b3860 to aa809f4 Compare October 27, 2026 13:04
@alanc-gsfc
alanc-gsfc merged commit 3673163 into nasa:dev Oct 29, 2026
17 checks passed
@alanc-gsfc
alanc-gsfc deleted the fix-2868-fix-time-send-cmd-on-client branch October 30, 2026 16:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

cFE Time sends CFE_TIME_SEND_CMD_MID command as client when FAKE_TONE is selected

2 participants