Repository navigation
Mirror F Prime events into cFE EVS: explicit AppID + Os_Task_Cfs (cFE ES child tasks) - #23
Merged
LeStarch merged 4 commits intoAug 14, 2026
Conversation
…captured at init CFE_EVS_SendEvent resolves the calling task's application context, but the TextLogger handler runs on F Prime threads with no ES task record, so every mirrored event failed with CFE_EVS_APP_ILLEGAL_APP_ID. Capture the app ID on the app's main task in an init() override and send with it instead. Also sync the ComCfg override with fprime devel (saIndex, FW_PACKET_PARAM) and update the SchAppDriver UT for the new Fw::Buffer setData semantics. Co-Authored-By: michael.d.starch <michael.d.starch@jpl.nasa.gov>
F Prime tasks were raw pthreads unknown to cFE ES, so any cFE API resolving the calling task's app context failed (e.g. EVS filtering dropped mirrored events). Os_Task_Cfs creates tasks via CFE_ES_CreateChildTask so every F Prime task has an ES record. CfsCore subtopology priorities move to cFS/OSAL semantics (lower = more urgent). Co-Authored-By: michael.d.starch <michael.d.starch@jpl.nasa.gov>
lestarch-autobot
marked this pull request as ready for review
August 13, 2026 23:28
With Os_Task_Cfs, F Prime tasks are ES-registered child tasks, so EVS resolves the calling task's app context and the explicit-AppID capture is no longer needed. Co-Authored-By: michael.d.starch <michael.d.starch@jpl.nasa.gov>
Pass the (offset) name pointer directly to CFE_ES_CreateChildTask instead of copying into a local buffer. Co-Authored-By: michael.d.starch <michael.d.starch@jpl.nasa.gov>
LeStarch
approved these changes
Aug 14, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
F Prime events mirrored by
EvsMirrornever reached cFE EVS: F Prime tasks are raw pthreads with no cFE ES task record, soCFE_EVS_SendEventfailed withCFE_EVS_APP_ILLEGAL_APP_ID(0xc2000003) — and even an explicit-AppID workaround was silently dropped, becauseEVS_IsFiltered->CFE_EVS_GetTypeEnablere-resolves the calling task viaCFE_ES_GetAppID. Fix the root cause instead:New
Os_Task_Cfsimplementation (FPrimeCfs/Os/Cfs/): F Prime tasks are created viaCFE_ES_CreateChildTaskinstead of pthreads, so every F Prime task has an ES record and cFE APIs — including plainCFE_EVS_SendEvent— resolve the calling task's app context.EvsMirroris unchanged from devel. Select per deployment withfprime_target_implementations("<deployment>" Os_Task_Cfs). Key design points (full SDD inFPrimeCfs/Os/Cfs/docs/sdd.md):start()blocks (bounded, 10 s) until the child consumes its pair.CfsCoreConfigsubtopology priorities move to cFS semantics accordingly (cmdDisp 140, health 150, events 160, tlmSend 170).OS_MAX_API_NAME - 1chars (with a warning) to satisfy OSAL limits.join()pollsCFE_ES_GetTaskInfo(cFE has no native join); child tasks exit viaCFE_ES_ExitChildTask();suspend()/resume()assert (no cFE API; matches Posix behavior).CFE_ES_CreateChildTaskmay only be called from the app's main task — F Prime topology setup runs there, so active-component starts satisfy it.Also syncs the ComCfg override with fprime devel (saIndex, FW_PACKET_PARAM) and updates the SchAppDriver UT for new Fw::Buffer semantics.
Companion PR: fprime-community/fprime_app#14 (selects
Os_Task_Cfsand updates topology priorities).Testing
FPrimeCfs_Os_Cfs_Task_ut_exe); full fprime_cfs suite 141/141 passing.cmdDisp.CMD_NO_OPprints mirroredFPRIME_APPlines on the cFS console via plainCFE_EVS_SendEvent(OpCodeDispatched/NoOpReceived/OpCodeCompleted); zero mirror errors; F Prime GDS, cFS GroundSystem, and the fprime-cfs helper all regression-tested clean.Note: the residual cFE behavior (
CFE_EVS_GetTypeEnableignoring an explicitly supplied AppID'sAppDataPtr) resembles but is distinct from nasa/cFE#2663; the ES child-task approach sidesteps it entirely.