7 #ifndef FpySequencer_HPP 8 #define FpySequencer_HPP 25 "Sequence arg count must be below U8 max");
27 "Register count must be below U8 max");
29 "Sequence statement count must be below U16 max");
31 "Local variable buffer size must be below FwSizeType max");
33 "Local variable buffer size must be greater than FW_TLM_BUFFER_MAX_SIZE");
35 "Local variable buffer size must be greater than FW_PARAM_BUFFER_MAX_SIZE");
122 void DEBUG_SET_BREAKPOINT_cmdHandler(
FwOpcodeType opCode,
150 void DEBUG_CLEAR_BREAKPOINT_cmdHandler(
FwOpcodeType opCode,
161 void Svc_FpySequencer_SequencerStateMachine_action_signalEntered(
169 void Svc_FpySequencer_SequencerStateMachine_action_setSequenceFilePath(
178 void Svc_FpySequencer_SequencerStateMachine_action_setSequenceBlockState(
187 void Svc_FpySequencer_SequencerStateMachine_action_validate(
195 void Svc_FpySequencer_SequencerStateMachine_action_report_seqSucceeded(
203 void Svc_FpySequencer_SequencerStateMachine_action_report_seqCancelled(
211 void Svc_FpySequencer_SequencerStateMachine_action_setGoalState_RUNNING(
219 void Svc_FpySequencer_SequencerStateMachine_action_setGoalState_VALID(
227 void Svc_FpySequencer_SequencerStateMachine_action_setGoalState_IDLE(
235 void Svc_FpySequencer_SequencerStateMachine_action_sendCmdResponse_OK(
244 void Svc_FpySequencer_SequencerStateMachine_action_sendCmdResponse_EXECUTION_ERROR(
252 void Svc_FpySequencer_SequencerStateMachine_action_dispatchStatement(
260 void Svc_FpySequencer_SequencerStateMachine_action_clearSequenceFile(
268 void Svc_FpySequencer_SequencerStateMachine_action_checkShouldWake(
276 void Svc_FpySequencer_SequencerStateMachine_action_resetRuntime(
284 void Svc_FpySequencer_SequencerStateMachine_action_checkStatementTimeout(
292 void Svc_FpySequencer_SequencerStateMachine_action_incrementSequenceCounter(
300 void Svc_FpySequencer_SequencerStateMachine_action_clearDebugBreakpoint(
308 void Svc_FpySequencer_SequencerStateMachine_action_report_debugBroken(
316 void Svc_FpySequencer_SequencerStateMachine_action_setDebugBreakpoint(
325 void Svc_FpySequencer_SequencerStateMachine_action_report_seqFailed(
333 void Svc_FpySequencer_SequencerStateMachine_action_report_seqStarted(
452 static constexpr U32 CRC_INITIAL_VALUE = 0xFFFFFFFFU;
480 U64 m_sequencesStarted;
483 U64 m_statementsDispatched;
492 U32 nextStatementIndex = 0;
523 bool breakOnBreakpoint =
false;
525 bool breakOnlyOnceOnBreakpoint =
false;
527 U32 breakpointIndex = 0;
532 U64 statementsFailed = 0;
535 U64 sequencesSucceeded = 0;
538 U64 sequencesFailed = 0;
541 U64 sequencesCancelled = 0;
551 static void updateCrc(U32& crc,
580 Signal dispatchStatement();
585 Fw::Success deserializeDirective(
const Fpy::Statement& stmt, DirectiveUnion& deserializedDirective);
588 void dispatchDirective(
const DirectiveUnion& directive,
const Fpy::DirectiveId&
id);
591 Signal checkStatementTimeout();
597 bool isRunningState(
State state);
600 FpySequencer_DebugTelemetry getDebugTelemetry();
607 void sendSignal(
Signal signal);
615 Signal waitRel_directiveHandler(
const FpySequencer_WaitRelDirective& directive,
DirectiveError& error);
616 Signal waitAbs_directiveHandler(
const FpySequencer_WaitAbsDirective& directive,
DirectiveError& error);
617 Signal setSerReg_directiveHandler(
const FpySequencer_SetSerRegDirective& directive,
DirectiveError& error);
618 Signal goto_directiveHandler(
const FpySequencer_GotoDirective& directive,
DirectiveError& error);
620 Signal noOp_directiveHandler(
const FpySequencer_NoOpDirective& directive,
DirectiveError& error);
621 Signal getTlm_directiveHandler(
const FpySequencer_GetTlmDirective& directive,
DirectiveError& error);
622 Signal getPrm_directiveHandler(
const FpySequencer_GetPrmDirective& directive,
DirectiveError& error);
624 Signal deserSerReg_directiveHandler(
const FpySequencer_DeserSerRegDirective& directive,
DirectiveError& error);
625 Signal setReg_directiveHandler(
const FpySequencer_SetRegDirective& directive,
DirectiveError& error);
627 Signal binaryRegOp_directiveHandler(
const FpySequencer_BinaryRegOpDirective& directive,
DirectiveError& error);
628 I64 binaryRegOp_or(I64 lhs, I64 rhs);
629 I64 binaryRegOp_and(I64 lhs, I64 rhs);
630 I64 binaryRegOp_ieq(I64 lhs, I64 rhs);
631 I64 binaryRegOp_ine(I64 lhs, I64 rhs);
632 I64 binaryRegOp_ult(I64 lhs, I64 rhs);
633 I64 binaryRegOp_ule(I64 lhs, I64 rhs);
634 I64 binaryRegOp_ugt(I64 lhs, I64 rhs);
635 I64 binaryRegOp_uge(I64 lhs, I64 rhs);
636 I64 binaryRegOp_slt(I64 lhs, I64 rhs);
637 I64 binaryRegOp_sle(I64 lhs, I64 rhs);
638 I64 binaryRegOp_sgt(I64 lhs, I64 rhs);
639 I64 binaryRegOp_sge(I64 lhs, I64 rhs);
640 I64 binaryRegOp_feq(I64 lhs, I64 rhs);
641 I64 binaryRegOp_fne(I64 lhs, I64 rhs);
642 I64 binaryRegOp_flt(I64 lhs, I64 rhs);
643 I64 binaryRegOp_fle(I64 lhs, I64 rhs);
644 I64 binaryRegOp_fgt(I64 lhs, I64 rhs);
645 I64 binaryRegOp_fge(I64 lhs, I64 rhs);
647 Signal unaryRegOp_directiveHandler(
const FpySequencer_UnaryRegOpDirective& directive,
DirectiveError& error);
648 I64 unaryRegOp_not(I64 src);
649 I64 unaryRegOp_fpext(I64 src);
650 I64 unaryRegOp_fptrunc(I64 src);
652 Signal exit_directiveHandler(
const FpySequencer_ExitDirective& directive,
DirectiveError& error);
deser up to 8 bytes out of an serReg
FpySequencer_SetSerRegDirective setSerReg
FwIdType FwOpcodeType
The type of a command opcode.
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
performs a unary reg operation on src reg, and stores in res reg
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_UnaryRegOpDirective unaryRegOp
FwIdType FwPrmIdType
The type of a parameter identifier.
void directive_binaryRegOp_internalInterfaceHandler(const Svc::FpySequencer_BinaryRegOpDirective &directive) override
Internal interface handler for directive_binaryRegOp.
U8 value[Fpy::MAX_SERIALIZABLE_REGISTER_SIZE]
void directive_cmd_internalInterfaceHandler(const Svc::FpySequencer_CmdDirective &directive) override
Internal interface handler for directive_cmd.
FpySequencer_WaitRelDirective waitRel
SmId
State machine identifiers.
FpySequencer_WaitAbsDirective waitAbs
Enum representing a command response.
void directive_setReg_internalInterfaceHandler(const Svc::FpySequencer_SetRegDirective &directive) override
Internal interface handler for directive_setReg.
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.
FpySequencer_SetRegDirective setReg
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 directive_unaryRegOp_internalInterfaceHandler(const Svc::FpySequencer_UnaryRegOpDirective &directive) override
Internal interface handler for directive_unaryRegOp.
void parametersLoaded() override
Called whenever parameters are loaded.
FpySequencer_CmdDirective cmd
FpySequencer_DirectiveErrorCode DirectiveError
void tlmWrite_handler(FwIndexType portNum, U32 context) override
Handler for input port tlmWrite.
void directive_deserSerReg_internalInterfaceHandler(const Svc::FpySequencer_DeserSerRegDirective &directive) override
Internal interface handler for directive_deserSerReg.
void directive_exit_internalInterfaceHandler(const Svc::FpySequencer_ExitDirective &directive) override
Internal interface handler for directive_exit.
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)
uint8_t U8
8-bit unsigned integer
sets a register to a constant value
friend class FpySequencerTester
FpySequencer_GetPrmDirective getPrm
void cmdResponseIn_handler(FwIndexType portNum, FwOpcodeType opCode, U32 cmdSeq, const Fw::CmdResponse &response) override
Handler for input port cmdResponseIn.
performs a binary reg operation on the lhs and rhs regs, and stores the result in the third register ...
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_setSerReg_internalInterfaceHandler(const FpySequencer_SetSerRegDirective &directive) override
Internal interface handler for directive_setSerReg.
Declares F Prime string base class.
FpySequencer_DeserSerRegDirective deserSerReg
void deallocateBuffer(Fw::MemAllocator &allocator)
Auto-generated base for FpySequencer component.
FpySequencer_ExitDirective exit
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)
FpySequencer_BinaryRegOpDirective binaryRegOp