7 #ifndef Svc_FpySequencerComponentAc_HPP 8 #define Svc_FpySequencerComponentAc_HPP 22 #if FW_ENABLE_TEXT_LOGGING == 1 278 void action_signalEntered(
283 void action_setSequenceFilePath(
289 void action_setSequenceBlockState(
295 void action_validate(
300 void action_report_seqSucceeded(
305 void action_report_seqCancelled(
310 void action_report_seqFailed(
315 void action_report_seqStarted(
320 void action_setGoalState_RUNNING(
325 void action_setGoalState_VALID(
330 void action_setGoalState_IDLE(
335 void action_sendCmdResponse_OK(
340 void action_sendCmdResponse_EXECUTION_ERROR(
345 void action_clearSequenceFile(
350 void action_clearBreakpoint(
355 void action_checkShouldWake(
360 void action_dispatchStatement(
365 void action_resetRuntime(
370 void action_checkStatementTimeout(
375 void action_incrementSequenceCounter(
380 void action_report_seqBroken(
385 void action_setBreakpoint(
391 void action_setBreakBeforeNextLine(
396 void action_clearBreakBeforeNextLine(
403 bool guard_goalStateIs_RUNNING(
408 bool guard_shouldBreak(
413 bool guard_breakOnce(
514 #if FW_ENABLE_TEXT_LOGGING == 1 517 void set_logTextOut_OutputPort(
590 #if FW_PORT_SERIALIZATION 601 Fw::InputSerializePort* port
607 Fw::InputSerializePort* port
613 Fw::InputSerializePort* port
616 #if FW_ENABLE_TEXT_LOGGING == 1 619 void set_logTextOut_OutputPort(
621 Fw::InputSerializePort* port
629 Fw::InputSerializePort* port
635 Fw::InputSerializePort* port
641 Fw::InputSerializePort* port
646 #if FW_PORT_SERIALIZATION 657 Fw::InputSerializePort* port
663 Fw::InputSerializePort* port
669 Fw::InputSerializePort* port
675 Fw::InputSerializePort* port
710 const char* compName =
"" 797 #if FW_ENABLE_TEXT_LOGGING == 1 802 static constexpr
FwIndexType getNum_logTextOut_OutputPorts() {
911 #if FW_ENABLE_TEXT_LOGGING == 1 916 bool isConnected_logTextOut_OutputPort(
2029 U16 currentSequenceIdx
2042 U8 expectedDirectiveOpcode
2071 I32 internalTimeBase,
2077 I32 internalTimeContext,
2078 I32 otherTimeContext
2366 static void m_p_cmdIn_in(
2381 static void m_p_checkTimers_in(
2388 static void m_p_cmdResponseIn_in(
2397 static void m_p_pingIn_in(
2404 static void m_p_seqRunIn_in(
2411 static void m_p_tlmWrite_in(
2424 void sendSignalStart(
2431 void sequencer_sendSignalFinish(
2447 static void deserializeSmIdAndSignal(
2454 void Svc_FpySequencer_SequencerStateMachine_smDispatch(
2456 Svc_FpySequencer_SequencerStateMachine& sm,
2541 #if FW_ENABLE_TEXT_LOGGING == 1 2591 bool m_first_update_State =
true;
2594 bool m_first_update_SequencesSucceeded =
true;
2597 bool m_first_update_SequencesFailed =
true;
2600 bool m_first_update_SequencesCancelled =
true;
2603 bool m_first_update_StatementsDispatched =
true;
2606 bool m_first_update_StatementsFailed =
true;
2609 bool m_first_update_LastDirectiveError =
true;
2612 bool m_first_update_DirectiveErrorIndex =
true;
2615 bool m_first_update_DirectiveErrorId =
true;
2618 bool m_first_update_SeqPath =
true;
2621 bool m_first_update_Debug_NextStatementOpcode =
true;
2624 bool m_first_update_Debug_NextCmdOpcode =
true;
2627 bool m_first_update_BreakpointIndex =
true;
2630 bool m_first_update_PRM_STATEMENT_TIMEOUT_SECS =
true;
2642 U64 m_last_SequencesSucceeded = {};
2645 U64 m_last_SequencesFailed = {};
2648 U64 m_last_SequencesCancelled = {};
2651 U64 m_last_StatementsDispatched = {};
2654 U64 m_last_StatementsFailed = {};
2660 U64 m_last_DirectiveErrorIndex = {};
2669 U8 m_last_Debug_NextStatementOpcode = {};
2675 U32 m_last_BreakpointIndex = {};
2678 F32 m_last_PRM_STATEMENT_TIMEOUT_SECS = {};
2704 F32 m_STATEMENT_TIMEOUT_SECS;
2709 bool m_FLAG_DEFAULT_EXIT_ON_CMD_FAIL;
2718 Svc_FpySequencer_SequencerStateMachine m_stateMachine_sequencer;
bool isConnected_tlmOut_OutputPort(FwIndexType portNum)
void sequencer_sendSignal_result_dispatchStatement_noMoreStatements()
Send signal result_dispatchStatement_noMoreStatements to state machine sequencer. ...
sets the index of the next directive to execute
void sequencer_sendSignal_result_checkShouldWake_keepSleeping()
Send signal result_checkShouldWake_keepSleeping to state machine sequencer.
virtual void directive_waitRel_internalInterfaceHandler(const Svc::FpySequencer_WaitRelDirective &directive)=0
Internal interface handler for directive_waitRel.
virtual void Svc_FpySequencer_SequencerStateMachine_action_checkStatementTimeout(SmId smId, Svc_FpySequencer_SequencerStateMachine::Signal signal)=0
virtual void Svc_FpySequencer_SequencerStateMachine_action_incrementSequenceCounter(SmId smId, Svc_FpySequencer_SequencerStateMachine::Signal signal)=0
virtual void Svc_FpySequencer_SequencerStateMachine_action_report_seqFailed(SmId smId, Svc_FpySequencer_SequencerStateMachine::Signal signal)=0
Channel ID for PRM_FLAG_DEFAULT_EXIT_ON_CMD_FAIL.
void set_seqStartOut_OutputPort(FwIndexType portNum, Svc::InputCmdSeqInPort *port)
Connect port to seqStartOut[portNum].
void log_WARNING_HI_DirectiveTimedOut(U8 opCode, U32 stmtIdx, const Fw::StringBase &filePath) const
Log event DirectiveTimedOut.
virtual void directive_storeTlmVal_internalInterfaceHandler(const Svc::FpySequencer_StoreTlmValDirective &directive)=0
Internal interface handler for directive_storeTlmVal.
virtual void Svc_FpySequencer_SequencerStateMachine_action_setSequenceFilePath(SmId smId, Svc_FpySequencer_SequencerStateMachine::Signal signal, const Svc::FpySequencer_SequenceExecutionArgs &value)=0
virtual void Svc_FpySequencer_SequencerStateMachine_action_signalEntered(SmId smId, Svc_FpySequencer_SequencerStateMachine::Signal signal)=0
void log_ACTIVITY_HI_SequencePaused(U32 stmtIdx) const
Log event SequencePaused.
virtual void directive_exit_internalInterfaceHandler(const Svc::FpySequencer_ExitDirective &directive)=0
Internal interface handler for directive_exit.
Fw::InputCmdResponsePort * get_cmdResponseIn_InputPort(FwIndexType portNum)
void directive_storePrm_internalInterfaceInvoke(const Svc::FpySequencer_StorePrmDirective &directive)
Internal interface base-class function for directive_storePrm.
FwIdType FwOpcodeType
The type of a command opcode.
void set_cmdOut_OutputPort(FwIndexType portNum, Fw::InputComPort *port)
Connect port to cmdOut[portNum].
Loads, validates and runs a sequence.
branches based off of the top byte of the stack
void directive_pushVal_internalInterfaceInvoke(const Svc::FpySequencer_PushValDirective &directive)
Internal interface base-class function for directive_pushVal.
void tlmWrite_Debug_NextStatementOpcode(U8 arg, Fw::Time _tlmTime=Fw::Time())
virtual void parametersLoaded()
Called whenever parameters are loaded.
Channel ID for SequencesCancelled.
virtual void directive_pushTime_internalInterfaceHandler(const Svc::FpySequencer_PushTimeDirective &directive)=0
Internal interface handler for directive_pushTime.
void log_WARNING_HI_InsufficientBufferSpace(U64 bufferSize, const Fw::StringBase &filePath) const
Log event InsufficientBufferSpace.
static constexpr FwIndexType getNum_seqStartOut_OutputPorts()
void tlmWrite_BreakBeforeNextLine(bool arg, Fw::Time _tlmTime=Fw::Time()) const
PlatformSizeType FwSizeType
the default value of the EXIT_ON_CMD_FAIL sequence flag
Channel ID for SequencesFailed.
void CONTINUE_cmdHandlerBase(FwOpcodeType opCode, U32 cmdSeq, Fw::CmdArgBuffer &args)
void sequencer_sendSignal_cmd_STEP()
Send signal cmd_STEP to state machine sequencer.
void sequencer_sendSignal_result_dispatchStatement_success()
Send signal result_dispatchStatement_success to state machine sequencer.
virtual void cmdResponseIn_handler(FwIndexType portNum, FwOpcodeType opCode, U32 cmdSeq, const Fw::CmdResponse &response)=0
Handler for input port cmdResponseIn.
void directive_stackOp_internalInterfaceInvoke(const Svc::FpySequencer_StackOpDirective &directive)
Internal interface base-class function for directive_stackOp.
void log_WARNING_HI_WrongCRC(U32 expected, U32 actual) const
Log event WrongCRC.
virtual void CLEAR_BREAKPOINT_cmdHandler(FwOpcodeType opCode, U32 cmdSeq)=0
virtual void parameterUpdated(FwPrmIdType id)
Called whenever a parameter is updated.
virtual void directive_stackCmd_internalInterfaceHandler(const Svc::FpySequencer_StackCmdDirective &directive)=0
Internal interface handler for directive_stackCmd.
void sequencer_sendSignal_cmd_SET_BREAKPOINT(const Svc::FpySequencer_BreakpointArgs &value)
Send signal cmd_SET_BREAKPOINT to state machine sequencer.
virtual void Svc_FpySequencer_SequencerStateMachine_action_sendCmdResponse_OK(SmId smId, Svc_FpySequencer_SequencerStateMachine::Signal signal)=0
virtual void tlmWrite_preMsgHook(FwIndexType portNum, U32 context)
Pre-message hook for async input port tlmWrite.
virtual void CLEAR_BREAKPOINT_preMsgHook(FwOpcodeType opCode, U32 cmdSeq)
Pre-message hook for command CLEAR_BREAKPOINT.
static constexpr FwIndexType getNum_cmdIn_InputPorts()
Fw::TlmValid getTlmChan_out(FwIndexType portNum, FwChanIdType id, Fw::Time &timeTag, Fw::TlmBuffer &val)
Invoke output port getTlmChan.
void RUN_cmdHandlerBase(FwOpcodeType opCode, U32 cmdSeq, Fw::CmdArgBuffer &args)
virtual void SET_FLAG_preMsgHook(FwOpcodeType opCode, U32 cmdSeq)
Pre-message hook for command SET_FLAG.
void set_seqDoneOut_OutputPort(FwIndexType portNum, Fw::InputCmdResponsePort *port)
Connect port to seqDoneOut[portNum].
FwIdType FwPrmIdType
The type of a parameter identifier.
void set_tlmOut_OutputPort(FwIndexType portNum, Fw::InputTlmPort *port)
Connect port to tlmOut[portNum].
virtual void directive_store_internalInterfaceHandler(const Svc::FpySequencer_StoreDirective &directive)=0
Internal interface handler for directive_store.
void directive_load_internalInterfaceInvoke(const Svc::FpySequencer_LoadDirective &directive)
Internal interface base-class function for directive_load.
virtual void Svc_FpySequencer_SequencerStateMachine_action_setGoalState_IDLE(SmId smId, Svc_FpySequencer_SequencerStateMachine::Signal signal)=0
virtual void directive_storePrm_internalInterfaceHandler(const Svc::FpySequencer_StorePrmDirective &directive)=0
Internal interface handler for directive_storePrm.
virtual void CANCEL_cmdHandler(FwOpcodeType opCode, U32 cmdSeq)=0
void STEP_cmdHandlerBase(FwOpcodeType opCode, U32 cmdSeq, Fw::CmdArgBuffer &args)
virtual bool Svc_FpySequencer_SequencerStateMachine_guard_breakOnce(SmId smId, Svc_FpySequencer_SequencerStateMachine::Signal signal) const =0
static constexpr FwIndexType getNum_pingIn_InputPorts()
virtual void Svc_FpySequencer_SequencerStateMachine_action_report_seqStarted(SmId smId, Svc_FpySequencer_SequencerStateMachine::Signal signal)=0
pop an opcode and arg buf off the stack, send to cmd dispatcher and await response ...
void sequencer_sendSignal_result_checkShouldWake_wakeup()
Send signal result_checkShouldWake_wakeup to state machine sequencer.
friend class FpySequencerTesterBase
Friend class tester to support autocoded test harness.
virtual void directive_goto_internalInterfaceHandler(const Svc::FpySequencer_GotoDirective &directive)=0
Internal interface handler for directive_goto.
void directive_if_internalInterfaceInvoke(const Svc::FpySequencer_IfDirective &directive)
Internal interface base-class function for directive_if.
void sequencer_sendSignal_result_success()
Send signal result_success to state machine sequencer.
void tlmWrite_Debug_NextStatementReadSuccess(bool arg, Fw::Time _tlmTime=Fw::Time()) const
void cmdResponseIn_handlerBase(FwIndexType portNum, FwOpcodeType opCode, U32 cmdSeq, const Fw::CmdResponse &response)
Handler base-class function for input port cmdResponseIn.
SmId
State machine identifiers.
void sequencer_sendSignal_stmtResponse_success()
Send signal stmtResponse_success to state machine sequencer.
virtual ~FpySequencerComponentBase()
Destroy FpySequencerComponentBase object.
virtual void directive_setFlag_internalInterfaceHandler(const Svc::FpySequencer_SetFlagDirective &directive)=0
Internal interface handler for directive_setFlag.
void log_WARNING_LO_CmdResponseWhileNotRunningSequence(I32 state, FwOpcodeType opcode, Fw::CmdResponse response) const
Log event CmdResponseWhileNotRunningSequence.
virtual void SET_BREAKPOINT_cmdHandler(FwOpcodeType opCode, U32 cmdSeq, U32 stmtIdx, bool breakOnce)=0
virtual void directive_stackOp_internalInterfaceHandler(const Svc::FpySequencer_StackOpDirective &directive)=0
Internal interface handler for directive_stackOp.
void sequencer_sendSignal_cmd_VALIDATE(const Svc::FpySequencer_SequenceExecutionArgs &value)
Send signal cmd_VALIDATE to state machine sequencer.
void directive_noOp_internalInterfaceInvoke(const Svc::FpySequencer_NoOpDirective &directive)
Internal interface base-class function for directive_noOp.
static constexpr FwIndexType getNum_tlmWrite_InputPorts()
Enum representing a command response.
virtual void Svc_FpySequencer_SequencerStateMachine_action_validate(SmId smId, Svc_FpySequencer_SequencerStateMachine::Signal signal)=0
virtual void RUN_VALIDATED_preMsgHook(FwOpcodeType opCode, U32 cmdSeq)
Pre-message hook for command RUN_VALIDATED.
void log_WARNING_HI_FileReadError(Svc::FpySequencer_FileReadStage readStage, const Fw::StringBase &filePath, I32 errorCode) const
Log event FileReadError.
void set_logOut_OutputPort(FwIndexType portNum, Fw::InputLogPort *port)
Connect port to logOut[portNum].
void tlmWrite_BreakpointInUse(bool arg, Fw::Time _tlmTime=Fw::Time()) const
void tlmWrite_State(FwEnumStoreType arg, Fw::Time _tlmTime=Fw::Time())
void tlmWrite_SequencesSucceeded(U64 arg, Fw::Time _tlmTime=Fw::Time())
void log_WARNING_HI_ExtraBytesInSequence(FwSizeType remaining) const
Log event ExtraBytesInSequence.
void directive_store_internalInterfaceInvoke(const Svc::FpySequencer_StoreDirective &directive)
Internal interface base-class function for directive_store.
virtual void Svc_FpySequencer_SequencerStateMachine_action_clearSequenceFile(SmId smId, Svc_FpySequencer_SequencerStateMachine::Signal signal)=0
void directive_allocate_internalInterfaceInvoke(const Svc::FpySequencer_AllocateDirective &directive)
Internal interface base-class function for directive_allocate.
pops bytes off the top of the stack and does nothing with them
static constexpr FwIndexType getNum_timeCaller_OutputPorts()
virtual void directive_waitAbs_internalInterfaceHandler(const Svc::FpySequencer_WaitAbsDirective &directive)=0
Internal interface handler for directive_waitAbs.
virtual void RUN_VALIDATED_cmdHandler(FwOpcodeType opCode, U32 cmdSeq, Svc::FpySequencer_BlockState block)=0
bool isConnected_pingOut_OutputPort(FwIndexType portNum)
virtual void pingIn_preMsgHook(FwIndexType portNum, U32 key)
Pre-message hook for async input port pingIn.
virtual void STEP_cmdHandler(FwOpcodeType opCode, U32 cmdSeq)=0
void directive_pushTlmValAndTime_internalInterfaceInvoke(const Svc::FpySequencer_PushTlmValAndTimeDirective &directive)
Internal interface base-class function for directive_pushTlmValAndTime.
void directive_stackCmd_internalInterfaceInvoke(const Svc::FpySequencer_StackCmdDirective &directive)
Internal interface base-class function for directive_stackCmd.
void log_WARNING_HI_TooManySequenceDirectives(U16 count, U16 max) const
Log event TooManySequenceDirectives.
bool isConnected_seqStartOut_OutputPort(FwIndexType portNum)
void sequencer_sendSignal_stmtResponse_unexpected()
Send signal stmtResponse_unexpected to state machine sequencer.
virtual void RUN_cmdHandler(FwOpcodeType opCode, U32 cmdSeq, const Fw::CmdStringArg &fileName, Svc::FpySequencer_BlockState block)=0
void sequencer_sendSignal_cmd_BREAK()
Send signal cmd_BREAK to state machine sequencer.
void sequencer_sendSignal_result_dispatchStatement_failure()
Send signal result_dispatchStatement_failure to state machine sequencer.
void log_WARNING_HI_DirectiveDeserializeError(U8 opcode, U32 stmtIdx, I32 errorCode, U64 buffLeft, U64 buffLength) const
Log event DirectiveDeserializeError.
virtual void pingIn_handler(FwIndexType portNum, U32 key)=0
Handler for input port pingIn.
void tlmWrite_PRM_FLAG_DEFAULT_EXIT_ON_CMD_FAIL(bool arg, Fw::Time _tlmTime=Fw::Time()) const
Svc::InputSchedPort * get_checkTimers_InputPort(FwIndexType portNum)
virtual void STEP_preMsgHook(FwOpcodeType opCode, U32 cmdSeq)
Pre-message hook for command STEP.
void RUN_VALIDATED_cmdHandlerBase(FwOpcodeType opCode, U32 cmdSeq, Fw::CmdArgBuffer &args)
void tlmWrite_PRM_STATEMENT_TIMEOUT_SECS(F32 arg, Fw::Time _tlmTime=Fw::Time())
void init()
Object initializer.
void set_pingOut_OutputPort(FwIndexType portNum, Svc::InputPingPort *port)
Connect port to pingOut[portNum].
static constexpr FwIndexType getNum_tlmOut_OutputPorts()
void seqStartOut_out(FwIndexType portNum, const Fw::StringBase &filename)
Invoke output port seqStartOut.
virtual void directive_allocate_internalInterfaceHandler(const Svc::FpySequencer_AllocateDirective &directive)=0
Internal interface handler for directive_allocate.
static constexpr FwIndexType getNum_pingOut_OutputPorts()
Channel ID for StatementsFailed.
Svc_FpySequencer_SequencerStateMachine::State sequencer_getState() const
Get the state of state machine instance sequencer.
void set_getTlmChan_OutputPort(FwIndexType portNum, Fw::InputTlmGetPort *port)
Connect port to getTlmChan[portNum].
float F32
32-bit floating point
virtual bool Svc_FpySequencer_SequencerStateMachine_guard_shouldBreak(SmId smId, Svc_FpySequencer_SequencerStateMachine::Signal signal) const =0
virtual void checkTimers_handler(FwIndexType portNum, U32 context)=0
Handler for input port checkTimers.
Channel ID for BreakOnlyOnceOnBreakpoint.
Channel ID for BreakpointInUse.
bool isConnected_timeCaller_OutputPort(FwIndexType portNum)
static constexpr FwIndexType getNum_getParam_OutputPorts()
stores a prm buffer in the lvar array
static constexpr FwIndexType getNum_cmdRegOut_OutputPorts()
void log_WARNING_HI_WrongCmdResponseOpcode(FwOpcodeType opcode, Fw::CmdResponse response, FwOpcodeType expectedOpcode) const
Log event WrongCmdResponseOpcode.
executes a cmd with const args
Opcode to save parameter STATEMENT_TIMEOUT_SECS.
void tlmWrite_StatementsFailed(U64 arg, Fw::Time _tlmTime=Fw::Time())
Channel ID for Debug_ReachedEndOfFile.
Channel ID for BreakpointIndex.
void regCommands()
Register commands with the Command Dispatcher.
F32 paramGet_STATEMENT_TIMEOUT_SECS(Fw::ParamValid &valid)
pop two byte arrays off the top of the stack, call memcmp, push 1 if they were equal, 0 otherwise
void cmdResponse_out(FwOpcodeType opCode, U32 cmdSeq, Fw::CmdResponse response)
Emit command response.
void directive_memCmp_internalInterfaceInvoke(const Svc::FpySequencer_MemCmpDirective &directive)
Internal interface base-class function for directive_memCmp.
Channel ID for Debug_NextStatementReadSuccess.
void directive_pushTime_internalInterfaceInvoke(const Svc::FpySequencer_PushTimeDirective &directive)
Internal interface base-class function for directive_pushTime.
void tlmWrite_DirectiveErrorId(const Svc::Fpy::DirectiveId &arg, Fw::Time _tlmTime=Fw::Time())
static constexpr FwIndexType getNum_cmdResponseIn_InputPorts()
Svc::InputPingPort * get_pingIn_InputPort(FwIndexType portNum)
void tlmWrite_Debug_NextCmdOpcode(FwOpcodeType arg, Fw::Time _tlmTime=Fw::Time())
void tlmWrite_handlerBase(FwIndexType portNum, U32 context)
Handler base-class function for input port tlmWrite.
bool isConnected_prmSet_OutputPort(FwIndexType portNum)
virtual void SET_FLAG_cmdHandler(FwOpcodeType opCode, U32 cmdSeq, Svc::Fpy::FlagId flag, bool value)=0
void directive_storeTlmVal_internalInterfaceInvoke(const Svc::FpySequencer_StoreTlmValDirective &directive)
Internal interface base-class function for directive_storeTlmVal.
virtual void directive_constCmd_internalInterfaceHandler(const Svc::FpySequencer_ConstCmdDirective &directive)=0
Internal interface handler for directive_constCmd.
Fw::InputCmdPort * get_cmdIn_InputPort(FwIndexType portNum)
void pingIn_handlerBase(FwIndexType portNum, U32 key)
Handler base-class function for input port pingIn.
void set_timeCaller_OutputPort(FwIndexType portNum, Fw::InputTimePort *port)
Connect port to timeCaller[portNum].
Channel ID for Debug_NextCmdOpcode.
friend class FpySequencerTester
Test implementation for the enclosing component.
void SET_FLAG_cmdHandlerBase(FwOpcodeType opCode, U32 cmdSeq, Fw::CmdArgBuffer &args)
virtual void Svc_FpySequencer_SequencerStateMachine_action_dispatchStatement(SmId smId, Svc_FpySequencer_SequencerStateMachine::Signal signal)=0
Must be called after VALIDATE. Runs the sequence that was validated.
virtual void directive_pushVal_internalInterfaceHandler(const Svc::FpySequencer_PushValDirective &directive)=0
Internal interface handler for directive_pushVal.
void sequencer_sendSignal_cmd_RUN_VALIDATED(const Svc::FpySequencer_SequenceExecutionArgs &value)
Send signal cmd_RUN_VALIDATED to state machine sequencer.
virtual void Svc_FpySequencer_SequencerStateMachine_action_clearBreakpoint(SmId smId, Svc_FpySequencer_SequencerStateMachine::Signal signal)=0
virtual void BREAK_cmdHandler(FwOpcodeType opCode, U32 cmdSeq)=0
Svc_FpySequencer_SequencerStateMachine(FpySequencerComponentBase &component)
Constructor.
FwIdType FwChanIdType
The type of a telemetry channel identifier.
void log_WARNING_HI_EndOfFileError(Svc::FpySequencer_FileReadStage readStage, const Fw::StringBase &filePath) const
Log event EndOfFileError.
void set_cmdResponseOut_OutputPort(FwIndexType portNum, Fw::InputCmdResponsePort *port)
Connect port to cmdResponseOut[portNum].
void log_WARNING_LO_CmdResponseFromOldSequence(FwOpcodeType opcode, Fw::CmdResponse response, U16 oldSequenceIdx, U16 currentSequenceIdx) const
Log event CmdResponseFromOldSequence.
virtual void directive_getFlag_internalInterfaceHandler(const Svc::FpySequencer_GetFlagDirective &directive)=0
Internal interface handler for directive_getFlag.
FpySequencerComponentBase(const char *compName="")
Construct FpySequencerComponentBase object.
Channel ID for DirectiveErrorId.
virtual void CONTINUE_cmdHandler(FwOpcodeType opCode, U32 cmdSeq)=0
void sequencer_sendSignal_checkTimersIn()
Send signal checkTimersIn to state machine sequencer.
void tlmWrite_StatementsDispatched(U64 arg, Fw::Time _tlmTime=Fw::Time())
void VALIDATE_cmdHandlerBase(FwOpcodeType opCode, U32 cmdSeq, Fw::CmdArgBuffer &args)
virtual void directive_discard_internalInterfaceHandler(const Svc::FpySequencer_DiscardDirective &directive)=0
Internal interface handler for directive_discard.
static constexpr FwIndexType getNum_prmSet_OutputPorts()
virtual void seqRunIn_preMsgHook(FwIndexType portNum, const Fw::StringBase &filename)
Pre-message hook for async input port seqRunIn.
void directive_setFlag_internalInterfaceInvoke(const Svc::FpySequencer_SetFlagDirective &directive)
Internal interface base-class function for directive_setFlag.
bool isConnected_getParam_OutputPort(FwIndexType portNum)
Implementation of state machine Svc_FpySequencer_SequencerStateMachine.
void sequencer_sendSignal_stmtResponse_failure()
Send signal stmtResponse_failure to state machine sequencer.
void CANCEL_cmdHandlerBase(FwOpcodeType opCode, U32 cmdSeq, Fw::CmdArgBuffer &args)
void directive_waitAbs_internalInterfaceInvoke(const Svc::FpySequencer_WaitAbsDirective &directive)
Internal interface base-class function for directive_waitAbs.
void set_cmdRegOut_OutputPort(FwIndexType portNum, Fw::InputCmdRegPort *port)
Connect port to cmdRegOut[portNum].
void log_WARNING_HI_CommandFailed(FwOpcodeType opCode, U32 stmtIdx, const Fw::StringBase &filePath, Fw::CmdResponse response) const
Log event CommandFailed.
void sequencer_sendSignal_stmtResponse_beginSleep()
Send signal stmtResponse_beginSleep to state machine sequencer.
void log_WARNING_HI_CommandTimedOut(FwOpcodeType opCode, U32 stmtIdx, const Fw::StringBase &filePath) const
Log event CommandTimedOut.
void sequencer_sendSignal_result_checkStatementTimeout_noTimeout()
Send signal result_checkStatementTimeout_noTimeout to state machine sequencer.
static constexpr FwIndexType getNum_seqRunIn_InputPorts()
virtual void tlmWrite_handler(FwIndexType portNum, U32 context)=0
Handler for input port tlmWrite.
Svc::InputCmdSeqInPort * get_seqRunIn_InputPort(FwIndexType portNum)
virtual void directive_memCmp_internalInterfaceHandler(const Svc::FpySequencer_MemCmpDirective &directive)=0
Internal interface handler for directive_memCmp.
void tlmWrite_LastDirectiveError(const Svc::FpySequencer_DirectiveErrorCode &arg, Fw::Time _tlmTime=Fw::Time())
void loadParameters()
Load the parameters from a parameter source.
virtual void Svc_FpySequencer_SequencerStateMachine_action_sendCmdResponse_EXECUTION_ERROR(SmId smId, Svc_FpySequencer_SequencerStateMachine::Signal signal)=0
void log_WARNING_HI_InvalidSeqRunCall(I32 state) const
Log event InvalidSeqRunCall.
virtual void directive_if_internalInterfaceHandler(const Svc::FpySequencer_IfDirective &directive)=0
Internal interface handler for directive_if.
pops some bytes off the stack and puts them in lvar array
static constexpr FwIndexType getNum_cmdOut_OutputPorts()
virtual void Svc_FpySequencer_SequencerStateMachine_action_setGoalState_VALID(SmId smId, Svc_FpySequencer_SequencerStateMachine::Signal signal)=0
sleeps for a relative duration from the current time
bool isConnected_seqDoneOut_OutputPort(FwIndexType portNum)
void directive_discard_internalInterfaceInvoke(const Svc::FpySequencer_DiscardDirective &directive)
Internal interface base-class function for directive_discard.
uint8_t U8
8-bit unsigned integer
virtual void directive_noOp_internalInterfaceHandler(const Svc::FpySequencer_NoOpDirective &directive)=0
Internal interface handler for directive_noOp.
gets bytes from lvar array and pushes them to stack
void log_ACTIVITY_HI_BreakpointSet(U32 breakpointIdx, bool breakOnce) const
Log event BreakpointSet.
void tlmWrite_BreakOnlyOnceOnBreakpoint(bool arg, Fw::Time _tlmTime=Fw::Time()) const
void sequencer_sendSignal_result_timeOpFailed()
Send signal result_timeOpFailed to state machine sequencer.
void BREAK_cmdHandlerBase(FwOpcodeType opCode, U32 cmdSeq, Fw::CmdArgBuffer &args)
void seqDoneOut_out(FwIndexType portNum, FwOpcodeType opCode, U32 cmdSeq, const Fw::CmdResponse &response)
Invoke output port seqDoneOut.
void log_WARNING_HI_FileOpenError(const Fw::StringBase &filePath, I32 errorCode) const
Log event FileOpenError.
void init(FpySequencerComponentBase::SmId smId)
Initialize the state machine.
void set_prmSet_OutputPort(FwIndexType portNum, Fw::InputPrmSetPort *port)
Connect port to prmSet[portNum].
generic stack operation handler
virtual void Svc_FpySequencer_SequencerStateMachine_action_setSequenceBlockState(SmId smId, Svc_FpySequencer_SequencerStateMachine::Signal signal, const Svc::FpySequencer_SequenceExecutionArgs &value)=0
Channel ID for BreakBeforeNextLine.
virtual void seqRunIn_handler(FwIndexType portNum, const Fw::StringBase &filename)=0
Handler for input port seqRunIn.
void sequencer_sendSignal_cmd_CANCEL()
Send signal cmd_CANCEL to state machine sequencer.
void sequencer_sendSignal_result_checkStatementTimeout_statementTimeout()
Send signal result_checkStatementTimeout_statementTimeout to state machine sequencer.
static constexpr FwIndexType getNum_cmdResponseOut_OutputPorts()
Loads and validates a sequence.
void sequencer_sendSignal_stmtResponse_keepWaiting()
Send signal stmtResponse_keepWaiting to state machine sequencer.
virtual void Svc_FpySequencer_SequencerStateMachine_action_resetRuntime(SmId smId, Svc_FpySequencer_SequencerStateMachine::Signal signal)=0
bool isConnected_cmdResponseOut_OutputPort(FwIndexType portNum)
void log_WARNING_HI_InvalidCommand(I32 state) const
Log event InvalidCommand.
Opcode to set parameter FLAG_DEFAULT_EXIT_ON_CMD_FAIL.
sleeps until an absolute time
void log_ACTIVITY_HI_SequenceCancelled(const Fw::StringBase &filePath) const
Log event SequenceCancelled.
virtual void RUN_preMsgHook(FwOpcodeType opCode, U32 cmdSeq)
Pre-message hook for command RUN.
void log_ACTIVITY_HI_BreakpointCleared() const
Log event BreakpointCleared.
static constexpr FwIndexType getNum_getTlmChan_OutputPorts()
void pingOut_out(FwIndexType portNum, U32 key)
Invoke output port pingOut.
Opcode to set parameter STATEMENT_TIMEOUT_SECS.
bool isConnected_cmdOut_OutputPort(FwIndexType portNum)
void tlmWrite_Debug_ReachedEndOfFile(bool arg, Fw::Time _tlmTime=Fw::Time()) const
void tlmWrite_SequencesFailed(U64 arg, Fw::Time _tlmTime=Fw::Time())
void log_WARNING_HI_FileReadDeserializeError(Svc::FpySequencer_FileReadStage readStage, const Fw::StringBase &filePath, I32 errorCode, U64 buffLeft, U64 buffLength) const
Log event FileReadDeserializeError.
bool isConnected_logOut_OutputPort(FwIndexType portNum)
void tlmWrite_SeqPath(const Fw::StringBase &arg, Fw::Time _tlmTime=Fw::Time())
virtual void SET_BREAKPOINT_preMsgHook(FwOpcodeType opCode, U32 cmdSeq)
Pre-message hook for command SET_BREAKPOINT.
PlatformIndexType FwIndexType
void directive_constCmd_internalInterfaceInvoke(const Svc::FpySequencer_ConstCmdDirective &directive)
Internal interface base-class function for directive_constCmd.
virtual void VALIDATE_preMsgHook(FwOpcodeType opCode, U32 cmdSeq)
Pre-message hook for command VALIDATE.
static constexpr FwIndexType getNum_checkTimers_InputPorts()
virtual void directive_load_internalInterfaceHandler(const Svc::FpySequencer_LoadDirective &directive)=0
Internal interface handler for directive_load.
Channel ID for Debug_NextStatementOpcode.
bool isConnected_prmGet_OutputPort(FwIndexType portNum)
void log_WARNING_HI_MismatchedTimeContext(I32 internalTimeContext, I32 otherTimeContext) const
Log event MismatchedTimeContext.
virtual void Svc_FpySequencer_SequencerStateMachine_action_clearBreakBeforeNextLine(SmId smId, Svc_FpySequencer_SequencerStateMachine::Signal signal)=0
Svc::InputSchedPort * get_tlmWrite_InputPort(FwIndexType portNum)
void log_WARNING_HI_WrongSchemaVersion(U8 expected, U8 actual) const
Log event WrongSchemaVersion.
virtual void Svc_FpySequencer_SequencerStateMachine_action_report_seqBroken(SmId smId, Svc_FpySequencer_SequencerStateMachine::Signal signal)=0
void directive_getFlag_internalInterfaceInvoke(const Svc::FpySequencer_GetFlagDirective &directive)
Internal interface base-class function for directive_getFlag.
void cmdOut_out(FwIndexType portNum, Fw::ComBuffer &data, U32 context)
Invoke output port cmdOut.
virtual void Svc_FpySequencer_SequencerStateMachine_action_setBreakBeforeNextLine(SmId smId, Svc_FpySequencer_SequencerStateMachine::Signal signal)=0
void sequencer_sendSignal_cmd_CLEAR_BREAKPOINT()
Send signal cmd_CLEAR_BREAKPOINT to state machine sequencer.
void log_WARNING_HI_UnknownSequencerDirective(U8 opcode, U32 stmtIdx, const Fw::StringBase &filePath) const
Log event UnknownSequencerDirective.
virtual void VALIDATE_cmdHandler(FwOpcodeType opCode, U32 cmdSeq, const Fw::CmdStringArg &fileName)=0
pushes a const byte array onto stack
virtual void Svc_FpySequencer_SequencerStateMachine_action_report_seqSucceeded(SmId smId, Svc_FpySequencer_SequencerStateMachine::Signal signal)=0
virtual void BREAK_preMsgHook(FwOpcodeType opCode, U32 cmdSeq)
Pre-message hook for command BREAK.
void tlmWrite_DirectiveErrorIndex(U64 arg, Fw::Time _tlmTime=Fw::Time())
RateGroupDivider component implementation.
void log_WARNING_HI_CmdResponseWhileNotAwaiting(FwOpcodeType opcode, Fw::CmdResponse response) const
Log event CmdResponseWhileNotAwaiting.
virtual void Svc_FpySequencer_SequencerStateMachine_action_setGoalState_RUNNING(SmId smId, Svc_FpySequencer_SequencerStateMachine::Signal signal)=0
bool isConnected_cmdRegOut_OutputPort(FwIndexType portNum)
void log_WARNING_HI_CmdResponseWhileAwaitingDirective(FwOpcodeType opcode, Fw::CmdResponse response, U8 expectedDirectiveOpcode) const
Log event CmdResponseWhileAwaitingDirective.
virtual void cmdResponseIn_preMsgHook(FwIndexType portNum, FwOpcodeType opCode, U32 cmdSeq, const Fw::CmdResponse &response)
Pre-message hook for async input port cmdResponseIn.
void seqRunIn_handlerBase(FwIndexType portNum, const Fw::StringBase &filename)
Handler base-class function for input port seqRunIn.
Enum representing parameter validity.
virtual void Svc_FpySequencer_SequencerStateMachine_action_setBreakpoint(SmId smId, Svc_FpySequencer_SequencerStateMachine::Signal signal, const Svc::FpySequencer_BreakpointArgs &value)=0
void log_WARNING_HI_TooManySequenceArgs(U8 count, U8 max) const
Log event TooManySequenceArgs.
void sequencer_sendSignal_cmd_CONTINUE()
Send signal cmd_CONTINUE to state machine sequencer.
friend class FpySequencerTester
Friend class tester implementation to support white-box testing.
void log_WARNING_HI_MismatchedTimeBase(I32 internalTimeBase, I32 otherTimeBase) const
Log event MismatchedTimeBase.
void sequencer_sendSignal_result_failure()
Send signal result_failure to state machine sequencer.
virtual void CONTINUE_preMsgHook(FwOpcodeType opCode, U32 cmdSeq)
Pre-message hook for command CONTINUE.
virtual void checkTimers_preMsgHook(FwIndexType portNum, U32 context)
Pre-message hook for async input port checkTimers.
void sequencer_sendSignal_entered()
Send signal entered to state machine sequencer.
void directive_exit_internalInterfaceInvoke(const Svc::FpySequencer_ExitDirective &directive)
Internal interface base-class function for directive_exit.
Opcode to save parameter FLAG_DEFAULT_EXIT_ON_CMD_FAIL.
virtual void Svc_FpySequencer_SequencerStateMachine_action_checkShouldWake(SmId smId, Svc_FpySequencer_SequencerStateMachine::Signal signal)=0
Fw::ParamValid getParam_out(FwIndexType portNum, FwPrmIdType id, Fw::ParamBuffer &val)
Invoke output port getParam.
Channel ID for DirectiveErrorIndex.
FpySequencerComponentBase::SmId getId() const
Get the state machine id.
pushes the current Fw.Time struct to the stack
void log_ACTIVITY_HI_SequenceDone(const Fw::StringBase &filePath) const
Log event SequenceDone.
void directive_goto_internalInterfaceInvoke(const Svc::FpySequencer_GotoDirective &directive)
Internal interface base-class function for directive_goto.
static constexpr FwIndexType getNum_seqDoneOut_OutputPorts()
void directive_waitRel_internalInterfaceInvoke(const Svc::FpySequencer_WaitRelDirective &directive)
Internal interface base-class function for directive_waitRel.
virtual void directive_pushTlmValAndTime_internalInterfaceHandler(const Svc::FpySequencer_PushTlmValAndTimeDirective &directive)=0
Internal interface handler for directive_pushTlmValAndTime.
virtual bool Svc_FpySequencer_SequencerStateMachine_guard_goalStateIs_RUNNING(SmId smId, Svc_FpySequencer_SequencerStateMachine::Signal signal) const =0
void SET_BREAKPOINT_cmdHandlerBase(FwOpcodeType opCode, U32 cmdSeq, Fw::CmdArgBuffer &args)
stores a tlm buffer in the lvar array
Auto-generated base for FpySequencer component.
static constexpr FwIndexType getNum_logOut_OutputPorts()
void sequencer_sendSignal_cmd_RUN(const Svc::FpySequencer_SequenceExecutionArgs &value)
Send signal cmd_RUN to state machine sequencer.
pushes some empty bytes to the stack
void checkTimers_handlerBase(FwIndexType portNum, U32 context)
Handler base-class function for input port checkTimers.
static constexpr FwIndexType getNum_prmGet_OutputPorts()
pops a bool off the stack, sets a flag with a specific index to that bool
Channel ID for StatementsDispatched.
virtual void CANCEL_preMsgHook(FwOpcodeType opCode, U32 cmdSeq)
Pre-message hook for command CANCEL.
bool isConnected_getTlmChan_OutputPort(FwIndexType portNum)
void log_WARNING_HI_WrongCmdResponseIndex(FwOpcodeType opcode, Fw::CmdResponse response, U16 actualCmdIdx, U16 expectedCmdIdx) const
Log event WrongCmdResponseIndex.
gets a flag and pushes its value as a U8 to the stack
void tlmWrite_SequencesCancelled(U64 arg, Fw::Time _tlmTime=Fw::Time())
Channel ID for PRM_STATEMENT_TIMEOUT_SECS.
virtual void Svc_FpySequencer_SequencerStateMachine_action_report_seqCancelled(SmId smId, Svc_FpySequencer_SequencerStateMachine::Signal signal)=0
friend class FpySequencerTesterBase
Autocoded test harness for the enclosing component.
void set_prmGet_OutputPort(FwIndexType portNum, Fw::InputPrmGetPort *port)
Connect port to prmGet[portNum].
Channel ID for SequencesSucceeded.
Channel ID for LastDirectiveError.
void set_getParam_OutputPort(FwIndexType portNum, Fw::InputPrmGetPort *port)
Connect port to getParam[portNum].
void CLEAR_BREAKPOINT_cmdHandlerBase(FwOpcodeType opCode, U32 cmdSeq, Fw::CmdArgBuffer &args)
bool paramGet_FLAG_DEFAULT_EXIT_ON_CMD_FAIL(Fw::ParamValid &valid)
void tlmWrite_BreakpointIndex(U32 arg, Fw::Time _tlmTime=Fw::Time())