Skip to content

Add real cFS SCH app driving the F Prime rate groups at 1 Hz - #9

Closed
lestarch-autobot wants to merge 8 commits into
fprime-community:develfrom
JPL-Devin:devin/1784747000-sch-app-upstream
Closed

lestarch-autobot wants to merge 8 commits into
fprime-community:develfrom
JPL-Devin:devin/1784747000-sch-app-upstream

Conversation

@lestarch-autobot

Copy link
Copy Markdown
Contributor

Describe the contribution

Adds the real cFS Scheduler (SCH) application to the reference and uses it to drive the F Prime rate groups at 1 Hz, replacing the Svc.PollingTimer.

Easy summary of the changes, layer by layer:

  1. apps/sch (new, vendored) — the real nasa/SCH app (v2.2.1), ported to current cFE APIs (boolean->bool, CFE_SB_MsgPtr_t->CFE_MSG_Message_t*, CFE_SB_CMD_HDR_SIZE->sizeof(CFE_MSG_CommandHeader_t), CFE_PLATFORM_SB_HIGHEST_VALID_MSGID). Its tables are built with add_cfe_tables and loaded from /cf/.
  2. SCH tables — the message table defines a new "F Prime tick" message: a cFS command with MID 0x1890 (command type bit + secondary-header flag + APID 0x090, function code 0). The schedule table sends it once per second (slot 0, frequency 1).
  3. libs/fprime_cfs pin — adds CfsBridge::subscribeCfs(apid, COMMAND|TELEMETRY) for subscribing to cFS command/telemetry message IDs. Upstream PR: Add CfsBridge::subscribeCfs for subscribing to cFS command or telemetry messages fprime_cfs#11.
  4. apps/fprime_app pin — swaps Svc.PollingTimer for FPrimeCfs.SchAppDriver: the SCH tick arrives via CfsBridge -> SpacePacketDeframer -> CfsRouter (new CFS_COMMAND route for APID 0x090) -> schAppDriver.cfsCommandIn, which emits the rate-group cycle. The main loop no longer polls a timer. Upstream PR: Drive rate groups from cFS scheduler (SCH) ticks via FPrimeCfs.SchAppDriver fprime_app#6.
  5. Reference glue — sch added to cpu1_APPLIST and the cFE startup script (priority 10).

Also bumps libs/fprime to the nasa/fprime devel head (35d4c0e8). The libs/fprime_cfs and apps/fprime_app pins point at the heads of their respective upstream PRs (#11 and #6); once those merge, the pins can be moved to devel.

Supersedes JPL-Devin#3 (same content, now targeting fprime-community).

Testing performed

  1. make SIMULATION=native prep && make && make install
  2. ./core-cpu1 + fprime-gds --ip-client --ip-port 15010 — SCH initializes, fprime_app subscribes to 0x1890, and one tick per second reaches the SchAppDriver.
  3. pytest test/int — all 5 GDS integration tests pass (commands, events, telemetry through GDS -> fprime_app).
  4. Rate-group telemetry observed at ~1 Hz over GDS (ComCcsds.comQueue.comQueueDepth updates once per second; rateGroup1.RgMaxTime reported).
  5. Repeated build + run + integration tests with ./go-draco draco-rc5 and ./go-draco v7.0.1 — all tests pass on both.

Expected behavior changes

  • The F Prime rate group tree is now clocked by the cFS scheduler instead of a polling timer; SCH also issues the standard cFE housekeeping requests.
  • No API change to the reference itself.

System(s) tested on

  • Hardware: PC (x86_64)
  • OS: Ubuntu 22.04 (native simulation)
  • Versions: cFE main (70b8017), cFE draco-rc5, cFE v7.0.1 (with matching osal/psp/tools)

Additional context

SCH free-wheels on its 10 ms minor-frame timer (no external major frame sync), so occasional "Slots skipped" events are normal in the native sim.

Contributor Info
Devin AI, on behalf of Michael Starch (NASA JPL)

Link to Devin session: https://nasa-jpl-demo.devinenterprise.com/sessions/6fed9a7881e24ac18ea71733c54508fa

devin-ai-integration Bot and others added 8 commits July 23, 2026 01:42
- libs/fprime -> fb215957d6 (configurable ComCcsds router, nasa/fprime#5486)
- libs/fprime_cfs -> ea0a8f8 (CfsRouter with Svc.Router interface + FILE route, fprime-community#10)
- apps/fprime_app -> 1e3d751 (core SpacePacketFraming + CfsRouter via config override, #3/#4)
- apps/fprime_gds -> 1d9f7c9 (whole space packet passthrough, #3)

Co-Authored-By: michael.d.starch <michael.d.starch@jpl.nasa.gov>
- Vendor nasa/SCH (2.2.1) under apps/sch, ported to current cFE APIs
- SCH schedule table sends a 1 Hz tick (MID 0x1890) to fprime_app
- fprime_app pin: PollingTimer replaced by FPrimeCfs.SchAppDriver
- fprime_cfs pin: adds CfsBridge::subscribeCfsCommand
- Add sch to cpu1 APPLIST and cFE startup script

Co-Authored-By: michael.d.starch <michael.d.starch@jpl.nasa.gov>
- libs/fprime -> 35d4c0e8 (nasa/fprime devel)
- apps/fprime_app -> 0fcc934 (SchAppDriver change rebased onto ContextArray
  rate group interface, fprime-community/fprime_app devel 4032403)

Co-Authored-By: michael.d.starch <michael.d.starch@jpl.nasa.gov>
…fprime_app#6)

Co-Authored-By: michael.d.starch <michael.d.starch@jpl.nasa.gov>
Co-Authored-By: michael.d.starch <michael.d.starch@jpl.nasa.gov>
Co-Authored-By: michael.d.starch <michael.d.starch@jpl.nasa.gov>
…community#6)

Co-Authored-By: michael.d.starch <michael.d.starch@jpl.nasa.gov>
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.

2 participants