Skip to content

Add args to CmdSeqIn#4962

Merged
LeStarch merged 11 commits intonasa:develfrom
FireflySpace:Lex-ari-CmdSeqIn-args
Apr 27, 2026
Merged

Add args to CmdSeqIn#4962
LeStarch merged 11 commits intonasa:develfrom
FireflySpace:Lex-ari-CmdSeqIn-args

Conversation

@Lex-ari
Copy link
Copy Markdown
Contributor

@Lex-ari Lex-ari commented Apr 7, 2026

Related Issue(s) #4942 #4662 #4181 fpy#27 fpy#30
Has Unit Tests (y/n) n
Documentation Included (y/n) n
Generative AI was used in this contribution (y/n) y

Change Description

Add a U8 array to CmdSeqIn to allow pass through arguments from SeqDisp to CmdSequencer / FpySequencer / etc

Rationale

This is a feature to pass through arguments from the SequenceDispatcher to Sequencers (current and future) that support it.

Testing/Review Recommendations

Ensure SequenceDispatch functionality is working, both on fprime and fpy side.
These changes should not break / altar core functionality.

Future Work

This is a chain of pull requests to support arguments in sequences. Future work includes:

  • Creating a tool to pass arguments to the GDS to start a sequence with arguments
  • Fpy#30 Future Work: Replacing arguments onto the Fpy stack
  • Discussion on call syntax for sequence with arguments within sequences
  • Documentation

AI Usage (see policy)

Claude Code v2.1.92 sonnet used to autocomplete and find instances where CmdSeqIn changes were required.
FPP coding was done by hand and claude was used to autocomplete C++ calls.
All lines of code were human reviewed.

@LeStarch @zimri-leisher

Comment thread default/config/AcConstants.fpp
Comment thread Svc/CmdSequencer/CmdSequencerImpl.cpp Outdated
Comment thread Svc/SeqDispatcher/SeqDispatcher.cpp Outdated
@zimri-leisher
Copy link
Copy Markdown
Collaborator

So is modifying the RUN going to be a separate PR? Why not just do it in this PR, I think they are related. New RUN_ARGS cmd for SeqDispatcher and update existing RUN cmd for FpySeq

Comment thread Svc/Seq/Seq.fpp
Comment thread Svc/FpySequencer/FpySequencer.cpp Outdated
Comment thread Svc/SeqDispatcher/SeqDispatcher.cpp Outdated
Comment thread Svc/FpySequencer/FpySequencer.cpp Outdated
Comment thread Svc/FpySequencer/FpySequencerStateMachine.fppi Outdated
Comment thread default/config/AcConstants.fpp Outdated
Comment thread Svc/FpySequencer/FpySequencerCommands.fppi
Comment thread Svc/FpySequencer/FpySequencerStateMachine.cpp Outdated
@LeStarch
Copy link
Copy Markdown
Collaborator

Port buffers approved.

Comment thread default/config/AcConstants.fpp Outdated
Copy link
Copy Markdown
Collaborator

@zimri-leisher zimri-leisher left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Spectacular work! Let's merge it.

@Lex-ari Lex-ari requested a review from LeStarch April 16, 2026 14:50
LeStarch
LeStarch previously approved these changes Apr 23, 2026
Copy link
Copy Markdown
Collaborator

@LeStarch LeStarch left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me.

Comment thread default/config/AcConstants.fpp
Copy link
Copy Markdown

@github-advanced-security github-advanced-security AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CodeQL found more than 20 potential problems in the proposed changes. Check the Files changed tab for more details.

this->RUN_ARGS_cmdHandler(opCode, cmdSeq, fileName, block, Svc::SeqArgs{0, 0});
}

void FpySequencer ::RUN_ARGS_cmdHandler(

//! Handler implementation for command VALIDATE_ARGS
//!
//! Loads and validates a sequence with arguments
Comment thread Svc/SeqDispatcher/SeqDispatcher.cpp Fixed
}

// RUN_ARGS command dispatches a sequence with optional arguments to the first available sequencer
void SeqDispatcher ::RUN_ARGS_cmdHandler(const FwOpcodeType opCode,
@zimri-leisher zimri-leisher requested a review from LeStarch April 24, 2026 22:03
}

void SeqDispatcher::runSequence(FwIndexType sequencerIdx, const Fw::ConstStringBase& fileName, Fw::Wait block) {
void SeqDispatcher::runSequence(FwIndexType sequencerIdx,
this->m_dispatchedCount++;
this->tlmWrite_dispatchedCount(this->m_dispatchedCount);
this->seqRunOut_out(sequencerIdx, this->m_entryTable[sequencerIdx].sequenceRunning);
this->seqRunOut_out(sequencerIdx, this->m_entryTable[sequencerIdx].sequenceRunning, args);
const Fw::StringBase& fileName, //!< The sequence file name
const Svc::SeqArgs& args //!< Sequence arguments (not currently used)
) {
(void)args; // Suppress unused parameter warning
Svc_FpySequencer_SequencerStateMachine::Signal signal,
const Svc::FpySequencer_SequenceExecutionArgs& value) {
this->m_sequenceArgs = value.get_buffer();
}
Svc_FpySequencer_SequencerStateMachine::Signal signal,
const Svc::FpySequencer_SequenceExecutionArgs& value) {
this->m_sequenceArgs = value.get_buffer();
}
// Args must be serialized in F' big-endian format by the caller before being sent
this->sequencer_sendSignal_cmd_RUN(
FpySequencer_SequenceExecutionArgs(filename, FpySequencer_BlockState::NO_BLOCK, args));
}

void CmdSequencerComponentImpl::seqRunIn_handler(FwIndexType portNum, const Fw::StringBase& filename) {
void CmdSequencerComponentImpl::seqRunIn_handler(FwIndexType portNum,
const Fw::StringBase& filename,
FpySequencer_BlockState block //!< Return command status when complete or not
) {
// Empty args and delegate to RUN_ARGS handler
this->RUN_ARGS_cmdHandler(opCode, cmdSeq, fileName, block, Svc::SeqArgs{0, 0});
FpySequencer_BlockState block //!< Return command status when complete or not
) {
// Empty args and delegate to RUN_ARGS handler
this->RUN_ARGS_cmdHandler(opCode, cmdSeq, fileName, block, Svc::SeqArgs{0, 0});
}

this->sequencer_sendSignal_cmd_RUN(FpySequencer_SequenceExecutionArgs(fileName, block));
// Store args for pushArgsToStack action
}

this->sequencer_sendSignal_cmd_RUN(FpySequencer_SequenceExecutionArgs(fileName, block));
// Store args for pushArgsToStack action
// Args must be serialized in F' big-endian format by the caller before being sent
this->sequencer_sendSignal_cmd_RUN(
FpySequencer_SequenceExecutionArgs(filename, FpySequencer_BlockState::NO_BLOCK, args));
}
@LeStarch LeStarch merged commit 5843907 into nasa:devel Apr 27, 2026
56 of 57 checks passed
@github-project-automation github-project-automation Bot moved this from Review to Done in F´ Development Apr 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

4 participants