@@ -39,6 +39,17 @@ void FpySequencer::RUN_cmdHandler(FwOpcodeType opCode, //!< The op
3939 U32 cmdSeq, // !< The command sequence number
4040 const Fw::CmdStringArg& fileName, // !< The name of the sequence file
4141 FpySequencer_BlockState block // !< Return command status when complete or not
42+ ) {
43+ // Empty args and delegate to RUN_ARGS handler
44+ this ->RUN_ARGS_cmdHandler (opCode, cmdSeq, fileName, block, Svc::SeqArgs{0 , 0 });
45+ }
46+
47+ void FpySequencer ::RUN_ARGS_cmdHandler (
48+ FwOpcodeType opCode, // !< The opcode
49+ U32 cmdSeq, // !< The command sequence number
50+ const Fw::CmdStringArg& fileName, // !< The name of the sequence file
51+ Svc::FpySequencer_BlockState block, // !< Return command status when complete or not
52+ Svc::SeqArgs args // !< Arguments to pass to the sequencer
4253) {
4354 // can only run a seq while in idle
4455 if (sequencer_getState () != State::IDLE) {
@@ -53,7 +64,8 @@ void FpySequencer::RUN_cmdHandler(FwOpcodeType opCode, //!< The op
5364 this ->m_savedCmdSeq = cmdSeq;
5465 }
5566
56- this ->sequencer_sendSignal_cmd_RUN (FpySequencer_SequenceExecutionArgs (fileName, block));
67+ // Store args for pushArgsToStack action
68+ this ->sequencer_sendSignal_cmd_RUN (FpySequencer_SequenceExecutionArgs (fileName, block, args));
5769
5870 // only respond if the user doesn't want us to block further execution
5971 if (block == FpySequencer_BlockState::NO_BLOCK) {
@@ -68,6 +80,16 @@ void FpySequencer::VALIDATE_cmdHandler(FwOpcodeType opCode, //!< Th
6880 U32 cmdSeq, // !< The command sequence number
6981 const Fw::CmdStringArg& fileName // !< The name of the sequence file
7082) {
83+ this ->VALIDATE_ARGS_cmdHandler (opCode, cmdSeq, fileName, Svc::SeqArgs{0 , 0 });
84+ }
85+
86+ // ! Handler implementation for command VALIDATE_ARGS
87+ // !
88+ // ! Loads and validates a sequence with arguments
89+ void FpySequencer ::VALIDATE_ARGS_cmdHandler (FwOpcodeType opCode,
90+ U32 cmdSeq,
91+ const Fw::CmdStringArg& fileName,
92+ Svc::SeqArgs buffer) {
7193 // can only validate a seq while in idle
7294 if (sequencer_getState () != State::IDLE) {
7395 this ->log_WARNING_HI_InvalidCommand (static_cast <I32>(sequencer_getState ()));
@@ -80,13 +102,12 @@ void FpySequencer::VALIDATE_cmdHandler(FwOpcodeType opCode, //!< Th
80102 this ->m_savedOpCode = opCode;
81103 this ->m_savedCmdSeq = cmdSeq;
82104
105+ // VALIDATE_ARGS receives args via command interface
106+ // Store args for pushArgsToStack action when RUN_VALIDATED is called
83107 this ->sequencer_sendSignal_cmd_VALIDATE (
84- FpySequencer_SequenceExecutionArgs (fileName, FpySequencer_BlockState::BLOCK));
108+ FpySequencer_SequenceExecutionArgs (fileName, FpySequencer_BlockState::BLOCK, buffer ));
85109}
86110
87- // ! Handler for command RUN_VALIDATED
88- // !
89- // ! Runs a previously validated sequence
90111void FpySequencer::RUN_VALIDATED_cmdHandler (
91112 FwOpcodeType opCode, // !< The opcode
92113 U32 cmdSeq, // !< The command sequence number
@@ -105,7 +126,8 @@ void FpySequencer::RUN_VALIDATED_cmdHandler(
105126 this ->m_savedCmdSeq = cmdSeq;
106127 }
107128
108- this ->sequencer_sendSignal_cmd_RUN_VALIDATED (FpySequencer_SequenceExecutionArgs (this ->m_sequenceFilePath , block));
129+ this ->sequencer_sendSignal_cmd_RUN_VALIDATED (
130+ FpySequencer_SequenceExecutionArgs (this ->m_sequenceFilePath , block, this ->m_sequenceArgs ));
109131
110132 // only respond if the user doesn't want us to block further execution
111133 if (block == FpySequencer_BlockState::NO_BLOCK) {
@@ -367,15 +389,17 @@ void FpySequencer ::seqCancelIn_handler(FwIndexType portNum) {
367389}
368390
369391// ! Handler for input port seqRunIn
370- void FpySequencer::seqRunIn_handler (FwIndexType portNum, const Fw::StringBase& filename) {
392+ void FpySequencer::seqRunIn_handler (FwIndexType portNum, const Fw::StringBase& filename, const Svc::SeqArgs& args ) {
371393 // can only run a seq while in idle
372394 if (sequencer_getState () != State::IDLE) {
373395 this ->log_WARNING_HI_InvalidSeqRunCall (static_cast <I32>(sequencer_getState ()));
374396 return ;
375397 }
376398
377- // seqRunIn is never blocking
378- this ->sequencer_sendSignal_cmd_RUN (FpySequencer_SequenceExecutionArgs (filename, FpySequencer_BlockState::NO_BLOCK));
399+ // seqRunIn is never blocking - store args for pushArgsToStack action
400+ // Args must be serialized in F' big-endian format by the caller before being sent
401+ this ->sequencer_sendSignal_cmd_RUN (
402+ FpySequencer_SequenceExecutionArgs (filename, FpySequencer_BlockState::NO_BLOCK, args));
379403}
380404
381405// ! Handler for input port tlmWrite
0 commit comments