Skip to content

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

Open
devin-ai-integration[bot] wants to merge 10 commits into
develfrom
devin/1784747000-sch-app
Open

devin-ai-integration[bot] wants to merge 10 commits into
develfrom
devin/1784747000-sch-app

Conversation

@devin-ai-integration

@devin-ai-integration devin-ai-integration Bot commented Jul 23, 2026 •

Copy link
Copy Markdown

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::subscribeCfsCommand(), which subscribes to a cFS command message ID (type + sec-hdr bits) for a given APID. Upstream PR: Add CfsBridge::subscribeCfs for subscribing to cFS command or telemetry messages fprime-community/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-community/fprime_app#6. The submodule URL temporarily points at the PR fork (lestarch-autobot/fprime_app) and should be reverted to fprime-community/fprime_app once Bump fprime_cfs to latest devel (SDDs, unit tests, CI workflow) fprime-community/fprime_cfs_reference#6 is merged.
  5. Reference glue — sch added to cpu1_APPLIST and the cFE startup script (priority 10).

Update (latest push): rebased onto the newly merged upstream fixes —

  • libs/fprime bumped to nasa/fprime devel head (35d4c0e8).
  • apps/fprime_app SchAppDriver commit rebased onto fprime-community/fprime_app devel 4032403 ("Migrate rate group configure to ContextArray interface"), so the rate-group configure now uses the ContextArray interface.

This branch builds on devin/1784790000-final-submodule-bump (submodule bump to the CfsRouter architecture), which is included in the diff.

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.
  6. After the rebase onto the updated submodules: full rebuild + cFS run + all 5 GDS integration tests pass again. Fresh clone + git submodule update verified against the new fprime_app URL.

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

lestarch-autobot and others added 6 commits July 7, 2026 11:37
* Add basic integration tests

Co-Authored-By: michael.d.starch <michael.d.starch@jpl.nasa.gov>

* Replace inherited cFS bundle CI with F Prime build-and-test workflow

Co-Authored-By: michael.d.starch <michael.d.starch@jpl.nasa.gov>

* Remove custom ZMQ transport from integration test workflow

Co-Authored-By: michael.d.starch <michael.d.starch@jpl.nasa.gov>

---------

Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Co-authored-by: michael.d.starch <michael.d.starch@jpl.nasa.gov>
* Add CMake compatibility shim for building against cFE draco-rc5

Co-Authored-By: michael.d.starch <michael.d.starch@jpl.nasa.gov>

* Include cfs_compat.cmake from fprime_cfs instead of local copy

Co-Authored-By: michael.d.starch <michael.d.starch@jpl.nasa.gov>

* Set CMAKE_MODULE_PATH to fprime_cfs cmake modules instead of direct include

Co-Authored-By: michael.d.starch <michael.d.starch@jpl.nasa.gov>

* Bump fprime to latest nasa/fprime devel and sub-app pins to merged devel

Co-Authored-By: michael.d.starch <michael.d.starch@jpl.nasa.gov>

---------

Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Co-authored-by: michael.d.starch <michael.d.starch@jpl.nasa.gov>
- 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>
@devin-ai-integration

Copy link
Copy Markdown
Author
Original prompt from michael.d.starch

We've just done a bunch of work on fprime-cfs-reference. Would you please edit that reference to include the sched app (not the lab, the real one). Configure it to dispatch messages at 1Hz. Then test and make sure the F Prime GDS -> fprime_app in cFS works and is reporting telemetry on the rategroup?

Then make a PR for any changes

@devin-ai-integration

Copy link
Copy Markdown
Author

🤖 Devin AI Engineer

I'll be helping with this pull request! Here's what you should know:

✅ I will automatically:

  • Address comments on this PR that start with 'DevinAI' or '@devin'.
  • Look at CI failures and help fix them

Note: I can only respond to comments from users who have write access to this repository.

⚙️ Control Options:

  • Disable automatic comment, CI, and merge conflict monitoring

- 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>
devin-ai-integration Bot and others added 3 commits July 23, 2026 21:36
…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>
@lestarch-autobot

Copy link
Copy Markdown

Superseded by fprime-community#9 (same content, targeting the upstream repository).

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