7 #ifndef Svc_FpySequencerComponentAc_HPP 8 #define Svc_FpySequencerComponentAc_HPP 22 #if FW_ENABLE_TEXT_LOGGING == 1 199 void action_signalEntered(
204 void action_setSequenceFilePath(
210 void action_setSequenceBlockState(
216 void action_validate(
221 void action_report_seqSucceeded(
226 void action_report_seqCancelled(
231 void action_setGoalState_RUNNING(
236 void action_setGoalState_VALID(
241 void action_setGoalState_IDLE(
246 void action_sendCmdResponse_OK(
251 void action_sendCmdResponse_EXECUTION_ERROR(
256 void action_clearSequenceFile(
261 void action_checkShouldWake(
266 void action_dispatchStatement(
271 void action_resetRuntime(
276 void action_checkStatementTimeout(
281 void action_incrementSequenceCounter(
288 bool guard_goalStateIs_RUNNING(
382 #if FW_ENABLE_TEXT_LOGGING == 1 385 void set_logTextOut_OutputPort(
434 #if FW_PORT_SERIALIZATION 445 Fw::InputSerializePort* port
451 Fw::InputSerializePort* port
457 Fw::InputSerializePort* port
460 #if FW_ENABLE_TEXT_LOGGING == 1 463 void set_logTextOut_OutputPort(
465 Fw::InputSerializePort* port
473 Fw::InputSerializePort* port
479 Fw::InputSerializePort* port
485 Fw::InputSerializePort* port
490 #if FW_PORT_SERIALIZATION 501 Fw::InputSerializePort* port
507 Fw::InputSerializePort* port
542 const char* compName =
"" 606 #if FW_ENABLE_TEXT_LOGGING == 1 678 #if FW_ENABLE_TEXT_LOGGING == 1 683 bool isConnected_logTextOut_OutputPort(
1353 U16 currentSequenceIdx
1388 I32 internalTimeBase,
1394 I32 internalTimeContext,
1395 I32 otherTimeContext
1549 static void m_p_cmdIn_in(
1564 static void m_p_checkTimers_in(
1571 static void m_p_cmdResponseIn_in(
1580 static void m_p_pingIn_in(
1587 static void m_p_tlmWrite_in(
1600 void sendSignalStart(
1607 void sequencer_sendSignalFinish(
1623 static void deserializeSmIdAndSignal(
1630 void Svc_FpySequencer_SequencerStateMachine_smDispatch(
1702 #if FW_ENABLE_TEXT_LOGGING == 1 1740 bool m_first_update_SequencesSucceeded;
1743 bool m_first_update_SequencesFailed;
1746 bool m_first_update_SequencesCancelled;
1749 bool m_first_update_StatementsDispatched;
1752 bool m_first_update_StatementsFailed;
1755 bool m_first_update_SeqPath;
1758 bool m_first_update_STATEMENT_TIMEOUT_SECS;
1767 U64 m_last_SequencesSucceeded;
1770 U64 m_last_SequencesFailed;
1773 U64 m_last_SequencesCancelled;
1776 U64 m_last_StatementsDispatched;
1779 U64 m_last_StatementsFailed;
1785 F32 m_last_STATEMENT_TIMEOUT_SECS;
1808 F32 m_STATEMENT_TIMEOUT_SECS;
bool isConnected_tlmOut_OutputPort(FwIndexType portNum)
void sequencer_sendSignal_result_dispatchStatement_noMoreStatements()
Send signal result_dispatchStatement_noMoreStatements to state machine sequencer. ...
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.
FwIndexType getNum_cmdResponseIn_InputPorts() const
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_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
Channel ID for SequencesFailed.
Fw::InputCmdResponsePort * get_cmdResponseIn_InputPort(FwIndexType portNum)
void set_cmdOut_OutputPort(FwIndexType portNum, Fw::InputComPort *port)
Connect port to cmdOut[portNum].
virtual void parametersLoaded()
Called whenever parameters are loaded.
void log_WARNING_HI_StatementFailed(Svc::Fpy::StatementType stmtType, U32 stmtOpcode, U32 stmtIdx, const Fw::StringBase &filePath, Fw::CmdResponse response) const
Log event StatementFailed.
void log_WARNING_HI_InsufficientBufferSpace(U64 bufferSize, const Fw::StringBase &filePath) const
Log event InsufficientBufferSpace.
PlatformSizeType FwSizeType
Channel ID for StatementsFailed.
FwIndexType getNum_tlmWrite_InputPorts() const
FwIndexType getNum_cmdResponseOut_OutputPorts() const
void log_WARNING_HI_CmdResponseWhileNotAwaiting(U32 opcode, Fw::CmdResponse response) const
Log event CmdResponseWhileNotAwaiting.
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 log_WARNING_HI_WrongCRC(U32 expected, U32 actual) const
Log event WrongCRC.
Loads and validates a sequence.
virtual void parameterUpdated(FwPrmIdType id)
Called whenever a parameter is updated.
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.
FwIndexType getNum_prmGet_OutputPorts() const
void RUN_cmdHandlerBase(FwOpcodeType opCode, U32 cmdSeq, Fw::CmdArgBuffer &args)
void set_tlmOut_OutputPort(FwIndexType portNum, Fw::InputTlmPort *port)
Connect port to tlmOut[portNum].
virtual void Svc_FpySequencer_SequencerStateMachine_action_setGoalState_IDLE(SmId smId, Svc_FpySequencer_SequencerStateMachine::Signal signal)=0
virtual void CANCEL_cmdHandler(FwOpcodeType opCode, U32 cmdSeq)=0
void log_WARNING_HI_FileReadError(const Fw::StringBase &filePath, I32 errorCode) const
Log event FileReadError.
void sequencer_sendSignal_result_checkShouldWake_wakeup()
Send signal result_checkShouldWake_wakeup to state machine sequencer.
Channel ID for StatementsDispatched.
friend class FpySequencerTesterBase
Friend class tester to support autocoded test harness.
void sequencer_sendSignal_result_success()
Send signal result_success to state machine sequencer.
void log_WARNING_HI_FileReadDeserializeError(const Fw::StringBase &filePath, I32 errorCode, U64 buffLeft, U64 buffLength) const
Log event FileReadDeserializeError.
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.
void sequencer_sendSignal_cmd_VALIDATE(const Svc::FpySequencer_SequenceExecutionArgs &value)
Send signal cmd_VALIDATE to state machine sequencer.
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 set_logOut_OutputPort(FwIndexType portNum, Fw::InputLogPort *port)
Connect port to logOut[portNum].
void tlmWrite_SequencesSucceeded(U64 arg, Fw::Time _tlmTime=Fw::Time())
FwIndexType getNum_pingIn_InputPorts() const
virtual void Svc_FpySequencer_SequencerStateMachine_action_clearSequenceFile(SmId smId, Svc_FpySequencer_SequencerStateMachine::Signal signal)=0
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.
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_result_dispatchStatement_failure()
Send signal result_dispatchStatement_failure to state machine sequencer.
virtual void pingIn_handler(FwIndexType portNum, U32 key)=0
Handler for input port pingIn.
Svc::InputSchedPort * get_checkTimers_InputPort(FwIndexType portNum)
void RUN_VALIDATED_cmdHandlerBase(FwOpcodeType opCode, U32 cmdSeq, Fw::CmdArgBuffer &args)
FwIndexType getNum_pingOut_OutputPorts() const
void init()
Object initializer.
void set_pingOut_OutputPort(FwIndexType portNum, Svc::InputPingPort *port)
Connect port to pingOut[portNum].
Svc_FpySequencer_SequencerStateMachine::State sequencer_getState() const
Get the state of state machine instance sequencer.
float F32
32-bit floating point
FwIndexType getNum_cmdIn_InputPorts() const
virtual void checkTimers_handler(FwIndexType portNum, U32 context)=0
Handler for input port checkTimers.
bool isConnected_timeCaller_OutputPort(FwIndexType portNum)
void log_WARNING_HI_ExtraBytesInSequence(U32 remaining) const
Log event ExtraBytesInSequence.
void tlmWrite_StatementsFailed(U64 arg, Fw::Time _tlmTime=Fw::Time())
void log_WARNING_HI_StatementTimedOut(Svc::Fpy::StatementType stmtType, U32 stmtOpcode, U32 stmtIdx, const Fw::StringBase &filePath) const
Log event StatementTimedOut.
void regCommands()
Register commands with the Command Dispatcher.
F32 paramGet_STATEMENT_TIMEOUT_SECS(Fw::ParamValid &valid)
void log_WARNING_HI_EndOfFileError(const Fw::StringBase &filePath) const
Log event EndOfFileError.
void log_WARNING_HI_WrongCmdResponseOpcode(U32 opcode, Fw::CmdResponse response, U32 expectedOpcode) const
Log event WrongCmdResponseOpcode.
U32 FwOpcodeType
The type of a command opcode.
FwIndexType getNum_prmSet_OutputPorts() const
void cmdResponse_out(FwOpcodeType opCode, U32 cmdSeq, Fw::CmdResponse response)
Emit command response.
FwIndexType getNum_timeCaller_OutputPorts() const
FwIndexType getNum_cmdOut_OutputPorts() const
Svc::InputPingPort * get_pingIn_InputPort(FwIndexType portNum)
void tlmWrite_handlerBase(FwIndexType portNum, U32 context)
Handler base-class function for input port tlmWrite.
bool isConnected_prmSet_OutputPort(FwIndexType portNum)
FwIndexType getNum_logOut_OutputPorts() const
Channel ID for SequencesSucceeded.
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].
Loads, validates and runs a sequence.
virtual void Svc_FpySequencer_SequencerStateMachine_action_dispatchStatement(SmId smId, Svc_FpySequencer_SequencerStateMachine::Signal signal)=0
void sequencer_sendSignal_cmd_RUN_VALIDATED(const Svc::FpySequencer_SequenceExecutionArgs &value)
Send signal cmd_RUN_VALIDATED to state machine sequencer.
Must be called after VALIDATE. Runs the sequence that was validated.
Svc_FpySequencer_SequencerStateMachine(FpySequencerComponentBase &component)
Constructor.
void set_cmdResponseOut_OutputPort(FwIndexType portNum, Fw::InputCmdResponsePort *port)
Connect port to cmdResponseOut[portNum].
void log_WARNING_HI_WrongCmdResponseIndex(U32 opcode, Fw::CmdResponse response, U16 actualCmdIdx, U16 expectedCmdIdx) const
Log event WrongCmdResponseIndex.
FpySequencerComponentBase(const char *compName="")
Construct FpySequencerComponentBase object.
void sequencer_sendSignal_checkTimersIn()
Send signal checkTimersIn to state machine sequencer.
void tlmWrite_StatementsDispatched(U64 arg, Fw::Time _tlmTime=Fw::Time())
Channel ID for STATEMENT_TIMEOUT_SECS.
void VALIDATE_cmdHandlerBase(FwOpcodeType opCode, U32 cmdSeq, Fw::CmdArgBuffer &args)
Channel ID for SequencesCancelled.
Implementation of state machine Svc_FpySequencer_SequencerStateMachine.
void sequencer_sendSignal_stmtResponse_failure()
Send signal stmtResponse_failure to state machine sequencer.
void log_WARNING_LO_CmdResponseWhileNotRunningSequence(I32 state, U32 opcode, Fw::CmdResponse response) const
Log event CmdResponseWhileNotRunningSequence.
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 log_WARNING_HI_DirectiveDeserializeError(U32 opcode, U32 stmtIdx, I32 errorCode, U64 buffLeft, U64 buffLength) const
Log event DirectiveDeserializeError.
void set_cmdRegOut_OutputPort(FwIndexType portNum, Fw::InputCmdRegPort *port)
Connect port to cmdRegOut[portNum].
void sequencer_sendSignal_stmtResponse_beginSleep()
Send signal stmtResponse_beginSleep to state machine sequencer.
void sequencer_sendSignal_result_checkStatementTimeout_noTimeout()
Send signal result_checkStatementTimeout_noTimeout to state machine sequencer.
U32 FwPrmIdType
The type of a parameter identifier.
virtual void tlmWrite_handler(FwIndexType portNum, U32 context)=0
Handler for input port tlmWrite.
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_CommandSerializeError(U32 cmdOpcode, U64 bufCapacity, U64 curPos, U64 writeSize, U8 errorCode, U32 stmtIdx) const
Log event CommandSerializeError.
virtual void Svc_FpySequencer_SequencerStateMachine_action_setGoalState_VALID(SmId smId, Svc_FpySequencer_SequencerStateMachine::Signal signal)=0
uint8_t U8
8-bit unsigned integer
void log_WARNING_HI_TooManySequenceStatements(U16 count, U16 max) const
Log event TooManySequenceStatements.
void tlmWrite_STATEMENT_TIMEOUT_SECS(F32 arg, Fw::Time _tlmTime=Fw::Time())
void sequencer_sendSignal_result_timeOpFailed()
Send signal result_timeOpFailed to state machine sequencer.
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].
virtual void Svc_FpySequencer_SequencerStateMachine_action_setSequenceBlockState(SmId smId, Svc_FpySequencer_SequencerStateMachine::Signal signal, const Svc::FpySequencer_SequenceExecutionArgs &value)=0
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.
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.
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 pingOut_out(FwIndexType portNum, U32 key)
Invoke output port pingOut.
void log_WARNING_LO_CmdResponseFromOldSequence(U32 opcode, Fw::CmdResponse response, U16 oldSequenceIdx, U16 currentSequenceIdx) const
Log event CmdResponseFromOldSequence.
bool isConnected_cmdOut_OutputPort(FwIndexType portNum)
Opcode to save parameter STATEMENT_TIMEOUT_SECS.
void tlmWrite_SequencesFailed(U64 arg, Fw::Time _tlmTime=Fw::Time())
bool isConnected_logOut_OutputPort(FwIndexType portNum)
void tlmWrite_SeqPath(const Fw::StringBase &arg, Fw::Time _tlmTime=Fw::Time())
PlatformIndexType FwIndexType
FwIndexType getNum_tlmOut_OutputPorts() const
virtual void VALIDATE_preMsgHook(FwOpcodeType opCode, U32 cmdSeq)
Pre-message hook for command VALIDATE.
bool isConnected_prmGet_OutputPort(FwIndexType portNum)
void log_WARNING_HI_MismatchedTimeContext(I32 internalTimeContext, I32 otherTimeContext) const
Log event MismatchedTimeContext.
Svc::InputSchedPort * get_tlmWrite_InputPort(FwIndexType portNum)
void log_WARNING_HI_WrongSchemaVersion(U8 expected, U8 actual) const
Log event WrongSchemaVersion.
void cmdOut_out(FwIndexType portNum, Fw::ComBuffer &data, U32 context)
Invoke output port cmdOut.
virtual void VALIDATE_cmdHandler(FwOpcodeType opCode, U32 cmdSeq, const Fw::CmdStringArg &fileName)=0
virtual void Svc_FpySequencer_SequencerStateMachine_action_report_seqSucceeded(SmId smId, Svc_FpySequencer_SequencerStateMachine::Signal signal)=0
RateGroupDivider component implementation.
virtual void Svc_FpySequencer_SequencerStateMachine_action_setGoalState_RUNNING(SmId smId, Svc_FpySequencer_SequencerStateMachine::Signal signal)=0
bool isConnected_cmdRegOut_OutputPort(FwIndexType portNum)
FwIndexType getNum_checkTimers_InputPorts() const
FwIndexType getNum_cmdRegOut_OutputPorts() const
virtual void cmdResponseIn_preMsgHook(FwIndexType portNum, FwOpcodeType opCode, U32 cmdSeq, const Fw::CmdResponse &response)
Pre-message hook for async input port cmdResponseIn.
Enum representing parameter validity.
void log_WARNING_HI_TooManySequenceArgs(U8 count, U8 max) const
Log event TooManySequenceArgs.
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 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.
virtual void Svc_FpySequencer_SequencerStateMachine_action_checkShouldWake(SmId smId, Svc_FpySequencer_SequencerStateMachine::Signal signal)=0
friend class FpySequencerComponentBaseFriend
Friend class for white-box testing.
FpySequencerComponentBase::SmId getId() const
Get the state machine id.
void log_ACTIVITY_HI_SequenceDone(const Fw::StringBase &filePath) const
Log event SequenceDone.
void directive_waitRel_internalInterfaceInvoke(const Svc::FpySequencer_WaitRelDirective &directive)
Internal interface base-class function for directive_waitRel.
virtual bool Svc_FpySequencer_SequencerStateMachine_guard_goalStateIs_RUNNING(SmId smId, Svc_FpySequencer_SequencerStateMachine::Signal signal) const =0
Auto-generated base for FpySequencer component.
void sequencer_sendSignal_cmd_RUN(const Svc::FpySequencer_SequenceExecutionArgs &value)
Send signal cmd_RUN to state machine sequencer.
void checkTimers_handlerBase(FwIndexType portNum, U32 context)
Handler base-class function for input port checkTimers.
virtual void CANCEL_preMsgHook(FwOpcodeType opCode, U32 cmdSeq)
Pre-message hook for command CANCEL.
Opcode to set parameter STATEMENT_TIMEOUT_SECS.
void log_WARNING_HI_UnknownSequencerDirective(U32 opcode, U32 stmtIdx, const Fw::StringBase &filePath) const
Log event UnknownSequencerDirective.
void tlmWrite_SequencesCancelled(U64 arg, Fw::Time _tlmTime=Fw::Time())
virtual void Svc_FpySequencer_SequencerStateMachine_action_report_seqCancelled(SmId smId, Svc_FpySequencer_SequencerStateMachine::Signal signal)=0
void set_prmGet_OutputPort(FwIndexType portNum, Fw::InputPrmGetPort *port)
Connect port to prmGet[portNum].