F´ Flight Software - C/C++ Documentation
A framework for building embedded system applications to NASA flight quality standards.
FpySequencer.hpp
Go to the documentation of this file.
1 // ======================================================================
2 // \title FpySequencer.hpp
3 // \author zimri.leisher
4 // \brief hpp file for FpySequencer component implementation class
5 // ======================================================================
6 
7 #ifndef FpySequencer_HPP
8 #define FpySequencer_HPP
9 
11 #include "Fw/Types/StringBase.hpp"
13 #include "Fw/Types/WaitEnumAc.hpp"
14 #include "Os/File.hpp"
25 
26 static_assert(Svc::Fpy::MAX_SEQUENCE_ARG_COUNT <= std::numeric_limits<U8>::max(),
27  "Sequence arg count must be below U8 max");
28 static_assert(Svc::Fpy::MAX_SEQUENCE_STATEMENT_COUNT <= std::numeric_limits<U16>::max(),
29  "Sequence statement count must be below U16 max");
30 static_assert(Svc::Fpy::MAX_STACK_SIZE <= std::numeric_limits<Svc::Fpy::StackSizeType>::max(),
31  "Max stack size must be below Svc::Fpy::StackSizeType max");
33  "Max stack size must be greater than max tlm buffer size");
35  "Max stack size must be greater than max prm buffer size");
36 static_assert(Svc::Fpy::FLAG_COUNT < std::numeric_limits<U8>::max(), "Flag count must be less than U8 max");
37 
38 namespace Svc {
39 
43 
45  friend class FpySequencerTester;
46 
47  public:
70 
73  };
74 
75  // ----------------------------------------------------------------------
76  // Construction, initialization, and destruction
77  // ----------------------------------------------------------------------
78 
81  FpySequencer(const char* const compName
82  );
83 
86  ~FpySequencer();
87 
88  private:
92  void RUN_cmdHandler(FwOpcodeType opCode,
93  U32 cmdSeq,
94  const Fw::CmdStringArg& fileName,
96  ) override;
97 
101  void VALIDATE_cmdHandler(FwOpcodeType opCode,
102  U32 cmdSeq,
103  const Fw::CmdStringArg& fileName
104  ) override;
105 
109  void RUN_VALIDATED_cmdHandler(FwOpcodeType opCode,
110  U32 cmdSeq,
112  ) override;
113 
117  void CANCEL_cmdHandler(FwOpcodeType opCode,
118  U32 cmdSeq
119  ) override;
120 
127  void SET_BREAKPOINT_cmdHandler(FwOpcodeType opCode,
128  U32 cmdSeq,
129  U32 stmtIdx,
130  bool breakOnce
131  ) override;
132 
138  void BREAK_cmdHandler(FwOpcodeType opCode,
139  U32 cmdSeq
140  ) override;
141 
146  void CONTINUE_cmdHandler(FwOpcodeType opCode,
147  U32 cmdSeq
148  ) override;
149 
154  void CLEAR_BREAKPOINT_cmdHandler(FwOpcodeType opCode,
155  U32 cmdSeq
156  ) override;
157 
163  void STEP_cmdHandler(FwOpcodeType opCode,
164  U32 cmdSeq
165  ) override;
166 
171  void SET_FLAG_cmdHandler(FwOpcodeType opCode,
172  U32 cmdSeq,
173  Svc::Fpy::FlagId flag,
174  bool value) override;
175 
176  // ----------------------------------------------------------------------
177  // Functions to implement for internal state machine actions
178  // ----------------------------------------------------------------------
179 
183  void Svc_FpySequencer_SequencerStateMachine_action_signalEntered(
184  SmId smId,
186  ) override;
187 
191  void Svc_FpySequencer_SequencerStateMachine_action_setSequenceFilePath(
192  SmId smId,
195  ) override;
196 
200  void Svc_FpySequencer_SequencerStateMachine_action_setSequenceBlockState(
201  SmId smId,
204  ) override;
205 
209  void Svc_FpySequencer_SequencerStateMachine_action_validate(
210  SmId smId,
212  ) override;
213 
217  void Svc_FpySequencer_SequencerStateMachine_action_report_seqSucceeded(
218  SmId smId,
220  ) override;
221 
225  void Svc_FpySequencer_SequencerStateMachine_action_report_seqCancelled(
226  SmId smId,
228  ) override;
229 
233  void Svc_FpySequencer_SequencerStateMachine_action_setGoalState_RUNNING(
234  SmId smId,
236  ) override;
237 
241  void Svc_FpySequencer_SequencerStateMachine_action_setGoalState_VALID(
242  SmId smId,
244  ) override;
245 
249  void Svc_FpySequencer_SequencerStateMachine_action_setGoalState_IDLE(
250  SmId smId,
252  ) override;
253 
257  void Svc_FpySequencer_SequencerStateMachine_action_sendCmdResponse_OK(
258  SmId smId,
260  ) override;
261 
266  void Svc_FpySequencer_SequencerStateMachine_action_sendCmdResponse_EXECUTION_ERROR(
267  SmId smId,
269  ) override;
270 
274  void Svc_FpySequencer_SequencerStateMachine_action_dispatchStatement(
275  SmId smId,
277  ) override;
278 
282  void Svc_FpySequencer_SequencerStateMachine_action_clearSequenceFile(
283  SmId smId,
285  ) override;
286 
290  void Svc_FpySequencer_SequencerStateMachine_action_checkShouldWake(
291  SmId smId,
293  ) override;
294 
298  void Svc_FpySequencer_SequencerStateMachine_action_resetRuntime(
299  SmId smId,
301  ) override;
302 
306  void Svc_FpySequencer_SequencerStateMachine_action_checkStatementTimeout(
307  SmId smId,
309  ) override;
310 
314  void Svc_FpySequencer_SequencerStateMachine_action_incrementSequenceCounter(
315  SmId smId,
317  ) override;
318 
322  void Svc_FpySequencer_SequencerStateMachine_action_clearBreakpoint(
323  SmId smId,
325  ) override;
326 
330  void Svc_FpySequencer_SequencerStateMachine_action_report_seqBroken(
331  SmId smId,
333  ) override;
334 
338  void Svc_FpySequencer_SequencerStateMachine_action_setBreakpoint(
339  SmId smId,
342  ) override;
343 
347  void Svc_FpySequencer_SequencerStateMachine_action_setBreakBeforeNextLine(
348  SmId smId,
350  ) override;
351 
355  void Svc_FpySequencer_SequencerStateMachine_action_clearBreakBeforeNextLine(
356  SmId smId,
358  ) override;
359 
363  void Svc_FpySequencer_SequencerStateMachine_action_report_seqFailed(
364  SmId smId,
366  ) override;
367 
371  void Svc_FpySequencer_SequencerStateMachine_action_report_seqStarted(
372  SmId smId,
374  ) override;
375 
376  protected:
377  // ----------------------------------------------------------------------
378  // Functions to implement for internal state machine guards
379  // ----------------------------------------------------------------------
380 
385  SmId smId,
387  ) const override;
388 
394  SmId smId,
396  ) const override;
397 
402  SmId smId,
404  ) const override;
405 
406  // ----------------------------------------------------------------------
407  // Handlers to implement for typed input ports
408  // ----------------------------------------------------------------------
409 
411  void checkTimers_handler(FwIndexType portNum,
412  U32 context
413  ) override;
414 
416  void cmdResponseIn_handler(FwIndexType portNum,
417  FwOpcodeType opCode,
418  U32 cmdSeq,
419  const Fw::CmdResponse& response
420  ) override;
421 
423  void seqRunIn_handler(FwIndexType portNum, const Fw::StringBase& filename) override;
424 
426  void pingIn_handler(FwIndexType portNum,
427  U32 key
428  ) override;
429 
431  void tlmWrite_handler(FwIndexType portNum,
432  U32 context
433  ) override;
434 
437 
440 
443 
446 
449 
452  const Svc::FpySequencer_StoreTlmValDirective& directive) override;
453 
456  const Svc::FpySequencer_PushTlmValAndTimeDirective& directive) override;
457 
460 
463 
466 
469 
472 
475 
478 
481 
484 
487 
490 
493 
496 
499 
500  void parametersLoaded() override;
501  void parameterUpdated(FwPrmIdType id) override;
502 
503  public:
504  void allocateBuffer(FwEnumStoreType identifier, Fw::MemAllocator& allocator, FwSizeType bytes);
505 
506  void deallocateBuffer(Fw::MemAllocator& allocator);
507 
508  private:
509  static constexpr U32 CRC_INITIAL_VALUE = 0xFFFFFFFFU;
510 
511  // allocated at startup
512  Fw::ExternalSerializeBuffer m_sequenceBuffer;
513  // id of allocator that gave us m_sequenceBuffer
514  FwEnumStoreType m_allocatorId;
515 
516  // assigned by the user via cmd
517  Fw::String m_sequenceFilePath;
518  // the sequence, loaded in memory
519  Fpy::Sequence m_sequenceObj;
520  // live running computation of CRC (updated as we read)
521  U32 m_computedCRC;
522 
523  // whether or not the sequence we're about to run should return immediately or
524  // block on completion
525  FpySequencer_BlockState m_sequenceBlockState;
526  // if we are to block on completion, save the opCode and cmdSeq we should
527  // return
528  FwOpcodeType m_savedOpCode;
529  U32 m_savedCmdSeq;
530 
531  // the goal state is the state that we're trying to reach in the sequencer
532  // if it's RUNNING, then we should promptly go to RUNNING once we validate the
533  // sequence. if it's VALID, we should wait after VALIDATING
534  FpySequencer_GoalState m_goalState;
535 
536  // the total number of sequences this sequencer has started since construction
537  U64 m_sequencesStarted;
538  // the total number of statements this sequencer has dispatched, successfully or
539  // otherwise, since construction
540  U64 m_statementsDispatched;
541 
542  // the runtime state of the sequence. encapsulates all state
543  // needed to run the sequence.
544  // this is distinct from the state of the sequencer. the
545  // sequencer and all its state is really just a shell to load
546  // and execute this runtime.
547  struct Runtime {
548  // the index of the next statement to be executed
549  U32 nextStatementIndex = 0;
550 
551  // the opcode of the statement that is currently executing
552  U8 currentStatementOpcode = Fpy::DirectiveId::INVALID;
553  // the opcode of the command that we are currently awaiting, or 0 if we are executing a directive
554  FwOpcodeType currentCmdOpcode = 0;
555  // the time we dispatched the statement that is currently executing
556  Fw::Time currentStatementDispatchTime = Fw::Time();
557 
558  // the absolute time we should wait for until returning
559  // a statement response
560  Fw::Time wakeupTime = Fw::Time();
561 
562  // the byte array of the program stack, storing lvars, operands and function calls
563  U8 stack[Fpy::MAX_STACK_SIZE] = {0};
564  // how many bytes high the stack is
565  Fpy::StackSizeType stackSize = 0;
566 
567  // the sequencer runtime flags. these are modifiable by the sequence and control
568  // various aspects of the sequencer.
569  // these get set to a default value from FpySequencerCfg
570  bool flags[Fpy::FLAG_COUNT] = {0};
571  } m_runtime;
572 
573  // the state of the debugger. debugger is separate from runtime
574  // because it can be set up before running the sequence.
575  struct BreakpointInfo {
576  // whether or not to break at the debug breakpoint index
577  bool breakpointInUse = false;
578  // whether or not to remove the breakpoint after breaking on it
579  bool breakOnlyOnceOnBreakpoint = false;
580  // the statement index at which to break, before dispatching
581  U32 breakpointIndex = 0;
582  // whether or not to break before dispatching the next line,
583  // independent of what line it is.
584  // can be used in combination with breakpointIndex
585  bool breakBeforeNextLine = false;
586  } m_breakpoint;
587 
588  // debug information about the sequence. only valid in the PAUSED state
589  // which you can access via BREAK or SET_BREAKPOINT cmds
590  struct DebugInfo {
591  // true if there are no statements remaining in the sequence file
592  bool reachedEndOfFile = false;
593  // true if we were able to deserialize the next statement successfully
594  bool nextStatementReadSuccess = false;
595  // the opcode of the next statement to dispatch.
596  U8 nextStatementOpcode = 0;
597  // if the next statement is a cmd directive, the opcode of that cmd
598  FwOpcodeType nextCmdOpcode = 0;
599  } m_debug;
600 
601  struct Telemetry {
602  // the number of statements that failed to execute
603  U64 statementsFailed = 0;
604  // the number of sequences successfully completed
605  U64 sequencesSucceeded = 0;
606  // the number of sequences that failed to validate or execute
607  U64 sequencesFailed = 0;
608  // the number of sequences that have been cancelled
609  U64 sequencesCancelled = 0;
610 
611  // the error code of the last directive that ran
612  DirectiveError lastDirectiveError = DirectiveError::NO_ERROR;
613  // the index of the last directive that errored
614  U64 directiveErrorIndex = 0;
615  // the opcode of the last directive that errored
616  Fpy::DirectiveId directiveErrorId = Fpy::DirectiveId::INVALID;
617  } m_tlm;
618 
619  // ----------------------------------------------------------------------
620  // Validation state
621  // ----------------------------------------------------------------------
622 
623  static void updateCrc(U32& crc,
624  const U8* buffer,
625  FwSizeType bufferSize
626  );
627 
628  // loads the sequence in memory, and does header/crc/integrity checks.
629  // return SUCCESS if sequence is valid, FAILURE otherwise
630  Fw::Success validate();
631  // reads and validates the header from the m_sequenceBuffer
632  // return SUCCESS if sequence is valid, FAILURE otherwise
633  Fw::Success readHeader();
634  // reads and validates the body from the m_sequenceBuffer
635  // return SUCCESS if sequence is valid, FAILURE otherwise
636  Fw::Success readBody();
637  // reads and validates the footer from the m_sequenceBuffer
638  // return SUCCESS if sequence is valid, FAILURE otherwise
639  Fw::Success readFooter();
640 
641  // reads some bytes from the open file into the m_sequenceBuffer.
642  // updates the CRC by default, but can be turned off if the contents
643  // aren't included in CRC.
644  // return success if successful
645  Fw::Success readBytes(Os::File& file,
646  FwSizeType readLen,
647  const FpySequencer_FileReadStage& readStage,
648  bool updateCrc = true);
649 
650  // ----------------------------------------------------------------------
651  // Run state
652  // ----------------------------------------------------------------------
653 
654  // utility method for updating telemetry based on a directive error code
655  void handleDirectiveErrorCode(Fpy::DirectiveId id, DirectiveError err);
656 
657  // dispatches the next statement
658  Signal dispatchStatement();
659 
660  // deserializes a directive from bytes into the Fpy type
661  // returns success if able to deserialize, and returns the Fpy type object
662  // as a reference, in a union of all the possible directive type objects
663  Fw::Success deserializeDirective(const Fpy::Statement& stmt, DirectiveUnion& deserializedDirective);
664 
665  // dispatches a deserialized sequencer directive to the right handler.
666  void dispatchDirective(const DirectiveUnion& directive, const Fpy::DirectiveId& id);
667 
668  // checks whether the currently executing statement timed out
669  Signal checkStatementTimeout();
670 
671  // checks whether the sequencer should wake from sleeping
672  Signal checkShouldWake();
673 
674  // return true if state is a substate of RUNNING
675  bool isRunningState(State state);
676 
677  // update a struct containing debug telemetry, or defaults if not in debug break
678  void updateDebugTelemetryStruct();
679 
680  // ----------------------------------------------------------------------
681  // Directives
682  // ----------------------------------------------------------------------
683 
684  // sends a signal based on a signal id
685  void sendSignal(Signal signal);
686 
687  // dispatches a command, returns whether successful or not
688  Fw::Success sendCmd(FwOpcodeType opcode, const U8* argBuf, FwSizeType argBufSize);
689 
690  // pops a value off of the top of the stack
691  // converts it from big endian
692  template <typename T>
693  T pop();
694 
695  // pushes a value onto the top of the stack
696  // converts it to big endian
697  template <typename T>
698  void push(T val);
699 
700  // returns a pointer to the next unused byte at the top of the stack
701  U8* top();
702  // returns a pointer to the first byte of the lvars array
703  U8* lvars();
704  // returns the stack height at which the lvar array begins
705  Fpy::StackSizeType lvarOffset();
706  // returns the index of the current statement
707  U32 currentStatementIdx();
708 
709  // we split these functions up into the internalInterfaceInvoke and these custom member funcs
710  // so that we can unit test them easier
711  Signal waitRel_directiveHandler(const FpySequencer_WaitRelDirective& directive, DirectiveError& error);
712  Signal waitAbs_directiveHandler(const FpySequencer_WaitAbsDirective& directive, DirectiveError& error);
713  Signal goto_directiveHandler(const FpySequencer_GotoDirective& directive, DirectiveError& error);
714  Signal if_directiveHandler(const FpySequencer_IfDirective& directive, DirectiveError& error);
715  Signal noOp_directiveHandler(const FpySequencer_NoOpDirective& directive, DirectiveError& error);
716  Signal storeTlmVal_directiveHandler(const FpySequencer_StoreTlmValDirective& directive, DirectiveError& error);
717  Signal pushTlmValAndTime_directiveHandler(const FpySequencer_PushTlmValAndTimeDirective& directive,
718  DirectiveError& error);
719  Signal storePrm_directiveHandler(const FpySequencer_StorePrmDirective& directive, DirectiveError& error);
720  Signal constCmd_directiveHandler(const FpySequencer_ConstCmdDirective& directive, DirectiveError& error);
721  Signal stackOp_directiveHandler(const FpySequencer_StackOpDirective& directive, DirectiveError& error);
722 
723  DirectiveError op_or();
724  DirectiveError op_and();
725  DirectiveError op_ieq();
726  DirectiveError op_ine();
727  DirectiveError op_ult();
728  DirectiveError op_ule();
729  DirectiveError op_ugt();
730  DirectiveError op_uge();
731  DirectiveError op_slt();
732  DirectiveError op_sle();
733  DirectiveError op_sgt();
734  DirectiveError op_sge();
735  DirectiveError op_feq();
736  DirectiveError op_fne();
737  DirectiveError op_flt();
738  DirectiveError op_fle();
739  DirectiveError op_fgt();
740  DirectiveError op_fge();
741  DirectiveError op_not();
742  DirectiveError op_fpext();
743  DirectiveError op_fptrunc();
744  DirectiveError op_fptoui();
745  DirectiveError op_fptosi();
746  DirectiveError op_sitofp();
747  DirectiveError op_uitofp();
748  DirectiveError op_iadd();
749  DirectiveError op_isub();
750  DirectiveError op_imul();
751  DirectiveError op_udiv();
752  DirectiveError op_sdiv();
753  DirectiveError op_umod();
754  DirectiveError op_smod();
755  DirectiveError op_fadd();
756  DirectiveError op_fsub();
757  DirectiveError op_fmul();
758  DirectiveError op_fdiv();
759  DirectiveError op_float_floor_div();
760  DirectiveError op_fpow();
761  DirectiveError op_flog();
762  DirectiveError op_fmod();
763  DirectiveError op_siext_8_64();
764  DirectiveError op_siext_16_64();
765  DirectiveError op_siext_32_64();
766  DirectiveError op_ziext_8_64();
767  DirectiveError op_ziext_16_64();
768  DirectiveError op_ziext_32_64();
769  DirectiveError op_itrunc_64_8();
770  DirectiveError op_itrunc_64_16();
771  DirectiveError op_itrunc_64_32();
772 
773  Signal exit_directiveHandler(const FpySequencer_ExitDirective& directive, DirectiveError& error);
774  Signal allocate_directiveHandler(const FpySequencer_AllocateDirective& directive, DirectiveError& error);
775  Signal store_directiveHandler(const FpySequencer_StoreDirective& directive, DirectiveError& error);
776  Signal load_directiveHandler(const FpySequencer_LoadDirective& directive, DirectiveError& error);
777  Signal pushVal_directiveHandler(const FpySequencer_PushValDirective& directive, DirectiveError& error);
778  Signal discard_directiveHandler(const FpySequencer_DiscardDirective& directive, DirectiveError& error);
779  Signal memCmp_directiveHandler(const FpySequencer_MemCmpDirective& directive, DirectiveError& error);
780  Signal stackCmd_directiveHandler(const FpySequencer_StackCmdDirective& directive, DirectiveError& error);
781  Signal pushTime_directiveHandler(const FpySequencer_PushTimeDirective& directive, DirectiveError& error);
782  Signal setFlag_directiveHandler(const FpySequencer_SetFlagDirective& directive, DirectiveError& error);
783  Signal getFlag_directiveHandler(const FpySequencer_GetFlagDirective& directive, DirectiveError& error);
784 };
785 
786 } // namespace Svc
787 
788 #endif
sets the index of the next directive to execute
FpySequencer_StackOpDirective stackOp
FwIdType FwOpcodeType
The type of a command opcode.
void directive_load_internalInterfaceHandler(const Svc::FpySequencer_LoadDirective &directive) override
Internal interface handler for directive_load.
branches based off of the top byte of the stack
void directive_if_internalInterfaceHandler(const Svc::FpySequencer_IfDirective &directive) override
Internal interface handler for directive_if.
PlatformSizeType FwSizeType
FpySequencer_GotoDirective gotoDirective
I32 FwEnumStoreType
void directive_stackOp_internalInterfaceHandler(const Svc::FpySequencer_StackOpDirective &directive) override
Internal interface handler for directive_stackOp.
void directive_storePrm_internalInterfaceHandler(const Svc::FpySequencer_StorePrmDirective &directive) override
Internal interface handler for directive_storePrm.
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_pushTlmValAndTime_internalInterfaceHandler(const Svc::FpySequencer_PushTlmValAndTimeDirective &directive) override
Internal interface handler for directive_pushTlmValAndTime.
FwIdType FwPrmIdType
The type of a parameter identifier.
void directive_constCmd_internalInterfaceHandler(const Svc::FpySequencer_ConstCmdDirective &directive) override
Internal interface handler for directive_constCmd.
FpySequencer_ConstCmdDirective constCmd
pop an opcode and arg buf off the stack, send to cmd dispatcher and await response ...
FpySequencer_WaitRelDirective waitRel
FpySequencer_WaitAbsDirective waitAbs
void directive_memCmp_internalInterfaceHandler(const Svc::FpySequencer_MemCmpDirective &directive) override
Internal interface handler for directive_memCmp.
void directive_pushVal_internalInterfaceHandler(const Svc::FpySequencer_PushValDirective &directive) override
Internal interface handler for directive_pushVal.
Enum representing a command response.
FpySequencer_PushValDirective pushVal
pops bytes off the top of the stack and does nothing with them
void directive_pushTime_internalInterfaceHandler(const Svc::FpySequencer_PushTimeDirective &directive) override
Internal interface handler for directive_pushTime.
FpySequencer_IfDirective ifDirective
FpySequencer_NoOpDirective noOp
FpySequencer_PushTimeDirective pushTime
void seqRunIn_handler(FwIndexType portNum, const Fw::StringBase &filename) override
Handler for input port seqRunIn.
FpySequencer_PushTlmValAndTimeDirective pushTlmValAndTime
void directive_allocate_internalInterfaceHandler(const Svc::FpySequencer_AllocateDirective &directive) override
Internal interface handler for directive_allocate.
void directive_storeTlmVal_internalInterfaceHandler(const Svc::FpySequencer_StoreTlmValDirective &directive) override
Internal interface handler for directive_storeTlmVal.
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.
void directive_stackCmd_internalInterfaceHandler(const Svc::FpySequencer_StackCmdDirective &directive) override
Internal interface handler for directive_stackCmd.
void directive_discard_internalInterfaceHandler(const Svc::FpySequencer_DiscardDirective &directive) override
Internal interface handler for directive_discard.
FpySequencer_DirectiveErrorCode DirectiveError
FpySequencer_AllocateDirective allocate
pop two byte arrays off the top of the stack, call memcmp, push 1 if they were equal, 0 otherwise
void tlmWrite_handler(FwIndexType portNum, U32 context) override
Handler for input port tlmWrite.
FpySequencer_GetFlagDirective getFlag
void directive_store_internalInterfaceHandler(const Svc::FpySequencer_StoreDirective &directive) override
Internal interface handler for directive_store.
void directive_exit_internalInterfaceHandler(const Svc::FpySequencer_ExitDirective &directive) override
Internal interface handler for directive_exit.
FpySequencer_DiscardDirective discard
External serialize buffer with no copy semantics.
#define FW_TLM_BUFFER_MAX_SIZE
Definition: FpConfig.h:211
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.
bool Svc_FpySequencer_SequencerStateMachine_guard_shouldBreak(SmId smId, Svc_FpySequencer_SequencerStateMachine::Signal signal) const override
#define FW_PARAM_BUFFER_MAX_SIZE
Definition: FpConfig.h:226
void allocateBuffer(FwEnumStoreType identifier, Fw::MemAllocator &allocator, FwSizeType bytes)
FpySequencer_MemCmpDirective memCmp
FpySequencer_StackCmdDirective stackCmd
void directive_getFlag_internalInterfaceHandler(const Svc::FpySequencer_GetFlagDirective &directive) override
Internal interface handler for directive_getFlag.
pops some bytes off the stack and puts them in lvar array
sleeps for a relative duration from the current time
uint8_t U8
8-bit unsigned integer
Definition: BasicTypes.h:53
gets bytes from lvar array and pushes them to stack
friend class FpySequencerTester
Memory Allocation base class.
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.
bool Svc_FpySequencer_SequencerStateMachine_guard_breakOnce(SmId smId, Svc_FpySequencer_SequencerStateMachine::Signal signal) const override
PlatformIndexType FwIndexType
FpySequencer_StorePrmDirective storePrm
RateGroupDivider component implementation.
FpySequencer_SetFlagDirective setFlag
Defines a base class for a memory allocator for classes.
void directive_setFlag_internalInterfaceHandler(const Svc::FpySequencer_SetFlagDirective &directive) override
Internal interface handler for directive_setFlag.
FpySequencer_StoreDirective store
Declares F Prime string base class.
void deallocateBuffer(Fw::MemAllocator &allocator)
FpySequencer_LoadDirective load
pushes the current Fw.Time struct to the stack
Auto-generated base for FpySequencer component.
FpySequencer_StoreTlmValDirective storeTlmVal
pops a bool off the stack, sets a flag with a specific index to that bool
FpySequencer_ExitDirective exit
gets a flag and pushes its value as a U8 to the stack
FpySequencer_SequencerStateMachineStateMachineBase::Signal Signal
Success/Failure.
U32 StackSizeType
the type which everything referencing a size or offset on the stack is represented in ...
FpySequencer(const char *const compName)
#define U64(C)
Definition: sha.h:181