7 #ifndef FpySequencer_HPP 8 #define FpySequencer_HPP 25 "Sequence arg count must be below U8 max");
27 "Sequence statement count must be below U16 max");
29 "Local variable buffer size must be below FwSizeType max");
31 "Local variable buffer size must be greater than FW_TLM_BUFFER_MAX_SIZE");
33 "Local variable buffer size must be greater than FW_PARAM_BUFFER_MAX_SIZE");
110 void DEBUG_SET_BREAKPOINT_cmdHandler(
FwOpcodeType opCode,
138 void DEBUG_CLEAR_BREAKPOINT_cmdHandler(
FwOpcodeType opCode,
149 void Svc_FpySequencer_SequencerStateMachine_action_signalEntered(
157 void Svc_FpySequencer_SequencerStateMachine_action_setSequenceFilePath(
166 void Svc_FpySequencer_SequencerStateMachine_action_setSequenceBlockState(
175 void Svc_FpySequencer_SequencerStateMachine_action_validate(
183 void Svc_FpySequencer_SequencerStateMachine_action_report_seqSucceeded(
191 void Svc_FpySequencer_SequencerStateMachine_action_report_seqCancelled(
199 void Svc_FpySequencer_SequencerStateMachine_action_setGoalState_RUNNING(
207 void Svc_FpySequencer_SequencerStateMachine_action_setGoalState_VALID(
215 void Svc_FpySequencer_SequencerStateMachine_action_setGoalState_IDLE(
223 void Svc_FpySequencer_SequencerStateMachine_action_sendCmdResponse_OK(
232 void Svc_FpySequencer_SequencerStateMachine_action_sendCmdResponse_EXECUTION_ERROR(
240 void Svc_FpySequencer_SequencerStateMachine_action_dispatchStatement(
248 void Svc_FpySequencer_SequencerStateMachine_action_clearSequenceFile(
256 void Svc_FpySequencer_SequencerStateMachine_action_checkShouldWake(
264 void Svc_FpySequencer_SequencerStateMachine_action_resetRuntime(
272 void Svc_FpySequencer_SequencerStateMachine_action_checkStatementTimeout(
280 void Svc_FpySequencer_SequencerStateMachine_action_incrementSequenceCounter(
288 void Svc_FpySequencer_SequencerStateMachine_action_clearDebugBreakpoint(
296 void Svc_FpySequencer_SequencerStateMachine_action_report_debugBroken(
304 void Svc_FpySequencer_SequencerStateMachine_action_setDebugBreakpoint(
406 static constexpr U32 CRC_INITIAL_VALUE = 0xFFFFFFFFU;
434 U64 m_sequencesStarted;
437 U64 m_statementsDispatched;
446 U32 nextStatementIndex = 0;
472 bool breakOnBreakpoint =
false;
474 bool breakOnlyOnceOnBreakpoint =
false;
476 U32 breakpointIndex = 0;
481 U64 statementsFailed = 0;
484 U64 sequencesSucceeded = 0;
487 U64 sequencesFailed = 0;
490 U64 sequencesCancelled = 0;
497 static void updateCrc(U32& crc,
526 Signal dispatchStatement();
530 Fw::Success dispatchCommand(
const Fpy::Statement& stmt);
535 Fw::Success deserializeDirective(
const Fpy::Statement& stmt, DirectiveUnion& deserializedDirective);
539 void dispatchDirective(
const DirectiveUnion& directive,
const Fpy::DirectiveId&
id);
542 Signal checkStatementTimeout();
548 bool isRunningState(
State state);
551 FpySequencer_DebugTelemetry getDebugTelemetry();
558 void sendSignal(
Signal signal);
562 Signal waitRel_directiveHandler(
const FpySequencer_WaitRelDirective& directive);
563 Signal waitAbs_directiveHandler(
const FpySequencer_WaitAbsDirective& directive);
564 Signal setLocalVar_directiveHandler(
const FpySequencer_SetLocalVarDirective& directive);
565 Signal goto_directiveHandler(
const FpySequencer_GotoDirective& directive);
566 Signal if_directiveHandler(
const FpySequencer_IfDirective& directive);
567 Signal noOp_directiveHandler(
const FpySequencer_NoOpDirective& directive);
568 Signal getTlm_directiveHandler(
const FpySequencer_GetTlmDirective& directive);
569 Signal getPrm_directiveHandler(
const FpySequencer_GetPrmDirective& directive);
void directive_if_internalInterfaceHandler(const Svc::FpySequencer_IfDirective &directive) override
Internal interface handler for directive_if.
PlatformSizeType FwSizeType
FpySequencer_GotoDirective gotoDirective
bool Svc_FpySequencer_SequencerStateMachine_guard_goalStateIs_RUNNING(SmId smId, Svc_FpySequencer_SequencerStateMachine::Signal signal) const override
void pingIn_handler(FwIndexType portNum, U32 key) override
Handler for input port pingIn.
void directive_getPrm_internalInterfaceHandler(const Svc::FpySequencer_GetPrmDirective &directive) override
Internal interface handler for directive_getPrm.
FpySequencer_WaitRelDirective waitRel
SmId
State machine identifiers.
FpySequencer_WaitAbsDirective waitAbs
Enum representing a command response.
void directive_getTlm_internalInterfaceHandler(const Svc::FpySequencer_GetTlmDirective &directive) override
Internal interface handler for directive_getTlm.
FpySequencer_IfDirective ifDirective
FpySequencer_NoOpDirective noOp
void seqRunIn_handler(FwIndexType portNum, const Fw::StringBase &filename) override
Handler for input port seqRunIn.
void directive_waitRel_internalInterfaceHandler(const FpySequencer_WaitRelDirective &directive) override
Internal interface handler for directive_waitRel.
void directive_noOp_internalInterfaceHandler(const Svc::FpySequencer_NoOpDirective &directive) override
Internal interface handler for directive_noOp.
void parametersLoaded() override
Called whenever parameters are loaded.
U32 FwOpcodeType
The type of a command opcode.
void tlmWrite_handler(FwIndexType portNum, U32 context) override
Handler for input port tlmWrite.
FpySequencer_SetLocalVarDirective setLVar
U8 value[Fpy::MAX_LOCAL_VARIABLE_BUFFER_SIZE]
External serialize buffer with no copy semantics.
#define FW_TLM_BUFFER_MAX_SIZE
FpySequencer_SequencerStateMachineStateMachineBase::State State
void directive_waitAbs_internalInterfaceHandler(const FpySequencer_WaitAbsDirective &directive) override
Internal interface handler for directive_waitAbs.
void parameterUpdated(FwPrmIdType id) override
Called whenever a parameter is updated.
void directive_goto_internalInterfaceHandler(const Svc::FpySequencer_GotoDirective &directive) override
Internal interface handler for directive_goto.
#define FW_PARAM_BUFFER_MAX_SIZE
void allocateBuffer(FwEnumStoreType identifier, Fw::MemAllocator &allocator, FwSizeType bytes)
U32 FwPrmIdType
The type of a parameter identifier.
uint8_t U8
8-bit unsigned integer
FpySequencer_GetPrmDirective getPrm
void cmdResponseIn_handler(FwIndexType portNum, FwOpcodeType opCode, U32 cmdSeq, const Fw::CmdResponse &response) override
Handler for input port cmdResponseIn.
void checkTimers_handler(FwIndexType portNum, U32 context) override
Handler for input port checkTimers.
PlatformIndexType FwIndexType
FpySequencer_GetTlmDirective getTlm
RateGroupDivider component implementation.
Defines a base class for a memory allocator for classes.
void directive_setLocalVar_internalInterfaceHandler(const FpySequencer_SetLocalVarDirective &directive) override
Internal interface handler for directive_setLocalVar.
Declares F Prime string base class.
void deallocateBuffer(Fw::MemAllocator &allocator)
Auto-generated base for FpySequencer component.
FpySequencer_SequencerStateMachineStateMachineBase::Signal Signal
bool Svc_FpySequencer_SequencerStateMachine_guard_shouldDebugBreak(SmId smId, Svc_FpySequencer_SequencerStateMachine::Signal signal) const override
bool Svc_FpySequencer_SequencerStateMachine_guard_debugBreakOnce(SmId smId, Svc_FpySequencer_SequencerStateMachine::Signal signal) const override
FpySequencer(const char *const compName)