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");
32 static_assert(Svc::Fpy::MAX_STACK_SIZE >= static_cast<FwSizeType>(FW_TLM_BUFFER_MAX_SIZE),
33  "Max stack size must be greater than max tlm buffer size");
34 static_assert(Svc::Fpy::MAX_STACK_SIZE >= static_cast<FwSizeType>(FW_PARAM_BUFFER_MAX_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:
73 
76  };
77 
78  class Stack {
79  public:
80  // the byte array of the program stack, storing lvars, operands and function calls
82  // how many bytes high the stack is
84 
85  // pops a value off of the top of the stack
86  // converts it from big endian
87  template <typename T>
88  T pop();
89 
90  // pushes a value onto the top of the stack
91  // converts it to big endian
92  template <typename T>
93  void push(T val);
94 
95  // pops a byte array from the top of the stack into the destination array
96  // does not convert endianness
97  void pop(U8* dest, Fpy::StackSizeType size);
98 
99  // pushes a byte array to the top of the stack from the source array
100  // leaves the source array unmodified
101  // does not convert endianness
102  void push(U8* src, Fpy::StackSizeType size);
103 
104  // pushes zero bytes to the stack
105  void pushZeroes(Fpy::StackSizeType byteCount);
106 
107  // returns a pointer to the next unused byte at the top of the stack
108  U8* top();
109  // returns a pointer to the first byte of the lvars array
110  U8* lvars();
111  // returns the stack height at which the lvar array begins
113  };
114 
115  // ----------------------------------------------------------------------
116  // Construction, initialization, and destruction
117  // ----------------------------------------------------------------------
118 
121  FpySequencer(const char* const compName
122  );
123 
126  ~FpySequencer();
127 
128  private:
132  void RUN_cmdHandler(FwOpcodeType opCode,
133  U32 cmdSeq,
134  const Fw::CmdStringArg& fileName,
136  ) override;
137 
141  void VALIDATE_cmdHandler(FwOpcodeType opCode,
142  U32 cmdSeq,
143  const Fw::CmdStringArg& fileName
144  ) override;
145 
149  void RUN_VALIDATED_cmdHandler(FwOpcodeType opCode,
150  U32 cmdSeq,
152  ) override;
153 
157  void CANCEL_cmdHandler(FwOpcodeType opCode,
158  U32 cmdSeq
159  ) override;
160 
167  void SET_BREAKPOINT_cmdHandler(FwOpcodeType opCode,
168  U32 cmdSeq,
169  U32 stmtIdx,
170  bool breakOnce
171  ) override;
172 
178  void BREAK_cmdHandler(FwOpcodeType opCode,
179  U32 cmdSeq
180  ) override;
181 
186  void CONTINUE_cmdHandler(FwOpcodeType opCode,
187  U32 cmdSeq
188  ) override;
189 
194  void CLEAR_BREAKPOINT_cmdHandler(FwOpcodeType opCode,
195  U32 cmdSeq
196  ) override;
197 
203  void STEP_cmdHandler(FwOpcodeType opCode,
204  U32 cmdSeq
205  ) override;
206 
211  void SET_FLAG_cmdHandler(FwOpcodeType opCode,
212  U32 cmdSeq,
213  Svc::Fpy::FlagId flag,
214  bool value) override;
218  void DUMP_STACK_TO_FILE_cmdHandler(FwOpcodeType opCode,
219  U32 cmdSeq,
220  const Fw::CmdStringArg& fileName
221  ) override;
222 
223  // ----------------------------------------------------------------------
224  // Functions to implement for internal state machine actions
225  // ----------------------------------------------------------------------
226 
230  void Svc_FpySequencer_SequencerStateMachine_action_signalEntered(
231  SmId smId,
233  ) override;
234 
238  void Svc_FpySequencer_SequencerStateMachine_action_setSequenceFilePath(
239  SmId smId,
242  ) override;
243 
247  void Svc_FpySequencer_SequencerStateMachine_action_setSequenceBlockState(
248  SmId smId,
251  ) override;
252 
256  void Svc_FpySequencer_SequencerStateMachine_action_validate(
257  SmId smId,
259  ) override;
260 
264  void Svc_FpySequencer_SequencerStateMachine_action_report_seqSucceeded(
265  SmId smId,
267  ) override;
268 
272  void Svc_FpySequencer_SequencerStateMachine_action_report_seqCancelled(
273  SmId smId,
275  ) override;
276 
280  void Svc_FpySequencer_SequencerStateMachine_action_setGoalState_RUNNING(
281  SmId smId,
283  ) override;
284 
288  void Svc_FpySequencer_SequencerStateMachine_action_setGoalState_VALID(
289  SmId smId,
291  ) override;
292 
296  void Svc_FpySequencer_SequencerStateMachine_action_setGoalState_IDLE(
297  SmId smId,
299  ) override;
300 
304  void Svc_FpySequencer_SequencerStateMachine_action_sendCmdResponse_OK(
305  SmId smId,
307  ) override;
308 
313  void Svc_FpySequencer_SequencerStateMachine_action_sendCmdResponse_EXECUTION_ERROR(
314  SmId smId,
316  ) override;
317 
321  void Svc_FpySequencer_SequencerStateMachine_action_dispatchStatement(
322  SmId smId,
324  ) override;
325 
329  void Svc_FpySequencer_SequencerStateMachine_action_clearSequenceFile(
330  SmId smId,
332  ) override;
333 
337  void Svc_FpySequencer_SequencerStateMachine_action_checkShouldWake(
338  SmId smId,
340  ) override;
341 
345  void Svc_FpySequencer_SequencerStateMachine_action_resetRuntime(
346  SmId smId,
348  ) override;
349 
353  void Svc_FpySequencer_SequencerStateMachine_action_checkStatementTimeout(
354  SmId smId,
356  ) override;
357 
361  void Svc_FpySequencer_SequencerStateMachine_action_incrementSequenceCounter(
362  SmId smId,
364  ) override;
365 
369  void Svc_FpySequencer_SequencerStateMachine_action_clearBreakpoint(
370  SmId smId,
372  ) override;
373 
377  void Svc_FpySequencer_SequencerStateMachine_action_report_seqBroken(
378  SmId smId,
380  ) override;
381 
385  void Svc_FpySequencer_SequencerStateMachine_action_setBreakpoint(
386  SmId smId,
389  ) override;
390 
394  void Svc_FpySequencer_SequencerStateMachine_action_setBreakBeforeNextLine(
395  SmId smId,
397  ) override;
398 
402  void Svc_FpySequencer_SequencerStateMachine_action_clearBreakBeforeNextLine(
403  SmId smId,
405  ) override;
406 
410  void Svc_FpySequencer_SequencerStateMachine_action_report_seqFailed(
411  SmId smId,
413  ) override;
414 
418  void Svc_FpySequencer_SequencerStateMachine_action_report_seqStarted(
419  SmId smId,
421  ) override;
422 
423  protected:
424  // ----------------------------------------------------------------------
425  // Functions to implement for internal state machine guards
426  // ----------------------------------------------------------------------
427 
432  SmId smId,
434  ) const override;
435 
441  SmId smId,
443  ) const override;
444 
449  SmId smId,
451  ) const override;
452 
453  // ----------------------------------------------------------------------
454  // Handlers to implement for typed input ports
455  // ----------------------------------------------------------------------
456 
458  void checkTimers_handler(FwIndexType portNum,
459  U32 context
460  ) override;
461 
463  void cmdResponseIn_handler(FwIndexType portNum,
464  FwOpcodeType opCode,
465  U32 cmdSeq,
466  const Fw::CmdResponse& response
467  ) override;
468 
470  void seqRunIn_handler(FwIndexType portNum, const Fw::StringBase& filename) override;
471 
473  void pingIn_handler(FwIndexType portNum,
474  U32 key
475  ) override;
476 
478  void tlmWrite_handler(FwIndexType portNum,
479  U32 context
480  ) override;
481 
484 
487 
490 
493 
496 
499 
502  const Svc::FpySequencer_PushTlmValAndTimeDirective& directive) override;
503 
506 
509 
512 
515 
518 
521  const Svc::FpySequencer_StoreConstOffsetDirective& directive) override;
522 
525 
528 
531 
534 
537 
540 
543 
546 
549 
552 
555 
556  void parametersLoaded() override;
557  void parameterUpdated(FwPrmIdType id) override;
558 
559  public:
560  void allocateBuffer(FwEnumStoreType identifier, Fw::MemAllocator& allocator, FwSizeType bytes);
561 
562  void deallocateBuffer(Fw::MemAllocator& allocator);
563 
564  private:
565  static constexpr U32 CRC_INITIAL_VALUE = 0xFFFFFFFFU;
566 
567  // allocated at startup
568  Fw::ExternalSerializeBuffer m_sequenceBuffer;
569  // id of allocator that gave us m_sequenceBuffer
570  FwEnumStoreType m_allocatorId;
571 
572  // assigned by the user via cmd
573  Fw::String m_sequenceFilePath;
574  // the sequence, loaded in memory
575  Fpy::Sequence m_sequenceObj;
576  // live running computation of CRC (updated as we read)
577  U32 m_computedCRC;
578 
579  // whether or not the sequence we're about to run should return immediately or
580  // block on completion
581  FpySequencer_BlockState m_sequenceBlockState;
582  // if we are to block on completion, save the opCode and cmdSeq we should
583  // return
584  FwOpcodeType m_savedOpCode;
585  U32 m_savedCmdSeq;
586 
587  // the goal state is the state that we're trying to reach in the sequencer
588  // if it's RUNNING, then we should promptly go to RUNNING once we validate the
589  // sequence. if it's VALID, we should wait after VALIDATING
590  FpySequencer_GoalState m_goalState;
591 
592  // the total number of sequences this sequencer has started since construction
593  U64 m_sequencesStarted;
594  // the total number of statements this sequencer has dispatched, successfully or
595  // otherwise, since construction
596  U64 m_statementsDispatched;
597 
598  // the runtime state of the sequence. encapsulates all state
599  // needed to run the sequence.
600  // this is distinct from the state of the sequencer. the
601  // sequencer and all its state is really just a shell to load
602  // and execute this runtime.
603  struct Runtime {
604  // the index of the next statement to be executed
605  U32 nextStatementIndex = 0;
606 
607  // the opcode of the statement that is currently executing
608  U8 currentStatementOpcode = Fpy::DirectiveId::INVALID;
609  // the opcode of the command that we are currently awaiting, or 0 if we are executing a directive
610  FwOpcodeType currentCmdOpcode = 0;
611  // the time we dispatched the statement that is currently executing
612  Fw::Time currentStatementDispatchTime = Fw::Time();
613 
614  // the absolute time we should wait for until returning
615  // a statement response
616  Fw::Time wakeupTime = Fw::Time();
617 
618  Stack stack = Stack();
619 
620  // the sequencer runtime flags. these are modifiable by the sequence and control
621  // various aspects of the sequencer.
622  // these get set to a default value from FpySequencerCfg
623  bool flags[Fpy::FLAG_COUNT] = {0};
624  } m_runtime;
625 
626  // the state of the debugger. debugger is separate from runtime
627  // because it can be set up before running the sequence.
628  struct BreakpointInfo {
629  // whether or not to break at the debug breakpoint index
630  bool breakpointInUse = false;
631  // whether or not to remove the breakpoint after breaking on it
632  bool breakOnlyOnceOnBreakpoint = false;
633  // the statement index at which to break, before dispatching
634  U32 breakpointIndex = 0;
635  // whether or not to break before dispatching the next line,
636  // independent of what line it is.
637  // can be used in combination with breakpointIndex
638  bool breakBeforeNextLine = false;
639  } m_breakpoint;
640 
641  // debug information about the sequence. only valid in the PAUSED state
642  // which you can access via BREAK or SET_BREAKPOINT cmds
643  struct DebugInfo {
644  // true if there are no statements remaining in the sequence file
645  bool reachedEndOfFile = false;
646  // true if we were able to deserialize the next statement successfully
647  bool nextStatementReadSuccess = false;
648  // the opcode of the next statement to dispatch.
649  U8 nextStatementOpcode = 0;
650  // if the next statement is a cmd directive, the opcode of that cmd
651  FwOpcodeType nextCmdOpcode = 0;
652  // the size of the stack. store this separately from the real stack size
653  // so we can avoid changing this during runtime, only modify it during
654  // debug
655  Fpy::StackSizeType stackSize = 0;
656  } m_debug;
657 
658  struct Telemetry {
659  // the number of statements that failed to execute
660  U64 statementsFailed = 0;
661  // the number of sequences successfully completed
662  U64 sequencesSucceeded = 0;
663  // the number of sequences that failed to validate or execute
664  U64 sequencesFailed = 0;
665  // the number of sequences that have been cancelled
666  U64 sequencesCancelled = 0;
667 
668  // the error code of the last directive that ran
669  DirectiveError lastDirectiveError = DirectiveError::NO_ERROR;
670  // the index of the last directive that errored
671  U64 directiveErrorIndex = 0;
672  // the opcode of the last directive that errored
673  Fpy::DirectiveId directiveErrorId = Fpy::DirectiveId::INVALID;
674  } m_tlm;
675 
676  // ----------------------------------------------------------------------
677  // Validation state
678  // ----------------------------------------------------------------------
679 
680  static void updateCrc(U32& crc,
681  const U8* buffer,
682  FwSizeType bufferSize
683  );
684 
685  // loads the sequence in memory, and does header/crc/integrity checks.
686  // return SUCCESS if sequence is valid, FAILURE otherwise
687  Fw::Success validate();
688  // reads and validates the header from the m_sequenceBuffer
689  // return SUCCESS if sequence is valid, FAILURE otherwise
690  Fw::Success readHeader();
691  // reads and validates the body from the m_sequenceBuffer
692  // return SUCCESS if sequence is valid, FAILURE otherwise
693  Fw::Success readBody();
694  // reads and validates the footer from the m_sequenceBuffer
695  // return SUCCESS if sequence is valid, FAILURE otherwise
696  Fw::Success readFooter();
697 
698  // reads some bytes from the open file into the m_sequenceBuffer.
699  // updates the CRC by default, but can be turned off if the contents
700  // aren't included in CRC.
701  // return success if successful
702  Fw::Success readBytes(Os::File& file,
703  FwSizeType readLen,
704  const FpySequencer_FileReadStage& readStage,
705  bool updateCrc = true);
706 
707  // ----------------------------------------------------------------------
708  // Run state
709  // ----------------------------------------------------------------------
710 
711  // utility method for updating telemetry based on a directive error code
712  void handleDirectiveErrorCode(Fpy::DirectiveId id, DirectiveError err);
713 
714  // dispatches the next statement
715  Signal dispatchStatement();
716 
717  // deserializes a directive from bytes into the Fpy type
718  // returns success if able to deserialize, and returns the Fpy type object
719  // as a reference, in a union of all the possible directive type objects
720  Fw::Success deserializeDirective(const Fpy::Statement& stmt, DirectiveUnion& deserializedDirective);
721 
722  // dispatches a deserialized sequencer directive to the right handler.
723  void dispatchDirective(const DirectiveUnion& directive, const Fpy::DirectiveId& id);
724 
725  // checks whether the currently executing statement timed out
726  Signal checkStatementTimeout();
727 
728  // checks whether the sequencer should wake from sleeping
729  Signal checkShouldWake();
730 
731  // return true if state is a substate of RUNNING
732  bool isRunningState(State state);
733 
734  // update a struct containing debug telemetry, or defaults if not in debug break
735  void updateDebugTelemetryStruct();
736 
737  // ----------------------------------------------------------------------
738  // Directives
739  // ----------------------------------------------------------------------
740 
741  // sends a signal based on a signal id
742  void sendSignal(Signal signal);
743 
744  // dispatches a command, returns whether successful or not
745  Fw::Success sendCmd(FwOpcodeType opcode, const U8* argBuf, FwSizeType argBufSize);
746 
747  // returns the index of the current statement
748  U32 currentStatementIdx();
749 
750  // we split these functions up into the internalInterfaceInvoke and these custom member funcs
751  // so that we can unit test them easier
752  Signal waitRel_directiveHandler(const FpySequencer_WaitRelDirective& directive, DirectiveError& error);
753  Signal waitAbs_directiveHandler(const FpySequencer_WaitAbsDirective& directive, DirectiveError& error);
754  Signal goto_directiveHandler(const FpySequencer_GotoDirective& directive, DirectiveError& error);
755  Signal if_directiveHandler(const FpySequencer_IfDirective& directive, DirectiveError& error);
756  Signal noOp_directiveHandler(const FpySequencer_NoOpDirective& directive, DirectiveError& error);
757  Signal pushTlmVal_directiveHandler(const FpySequencer_PushTlmValDirective& directive, DirectiveError& error);
758  Signal pushTlmValAndTime_directiveHandler(const FpySequencer_PushTlmValAndTimeDirective& directive,
759  DirectiveError& error);
760  Signal pushPrm_directiveHandler(const FpySequencer_PushPrmDirective& directive, DirectiveError& error);
761  Signal constCmd_directiveHandler(const FpySequencer_ConstCmdDirective& directive, DirectiveError& error);
762  Signal stackOp_directiveHandler(const FpySequencer_StackOpDirective& directive, DirectiveError& error);
763 
764  DirectiveError op_or();
765  DirectiveError op_and();
766  DirectiveError op_ieq();
767  DirectiveError op_ine();
768  DirectiveError op_ult();
769  DirectiveError op_ule();
770  DirectiveError op_ugt();
771  DirectiveError op_uge();
772  DirectiveError op_slt();
773  DirectiveError op_sle();
774  DirectiveError op_sgt();
775  DirectiveError op_sge();
776  DirectiveError op_feq();
777  DirectiveError op_fne();
778  DirectiveError op_flt();
779  DirectiveError op_fle();
780  DirectiveError op_fgt();
781  DirectiveError op_fge();
782  DirectiveError op_not();
783  DirectiveError op_fpext();
784  DirectiveError op_fptrunc();
785  DirectiveError op_fptoui();
786  DirectiveError op_fptosi();
787  DirectiveError op_sitofp();
788  DirectiveError op_uitofp();
789  DirectiveError op_add();
790  DirectiveError op_sub();
791  DirectiveError op_mul();
792  DirectiveError op_udiv();
793  DirectiveError op_sdiv();
794  DirectiveError op_umod();
795  DirectiveError op_smod();
796  DirectiveError op_fadd();
797  DirectiveError op_fsub();
798  DirectiveError op_fmul();
799  DirectiveError op_fdiv();
800  DirectiveError op_float_floor_div();
801  DirectiveError op_fpow();
802  DirectiveError op_flog();
803  DirectiveError op_fmod();
804  DirectiveError op_siext_8_64();
805  DirectiveError op_siext_16_64();
806  DirectiveError op_siext_32_64();
807  DirectiveError op_ziext_8_64();
808  DirectiveError op_ziext_16_64();
809  DirectiveError op_ziext_32_64();
810  DirectiveError op_itrunc_64_8();
811  DirectiveError op_itrunc_64_16();
812  DirectiveError op_itrunc_64_32();
813 
814  Signal exit_directiveHandler(const FpySequencer_ExitDirective& directive, DirectiveError& error);
815  Signal allocate_directiveHandler(const FpySequencer_AllocateDirective& directive, DirectiveError& error);
816  Signal storeConstOffset_directiveHandler(const FpySequencer_StoreConstOffsetDirective& directive,
817  DirectiveError& error);
818  Signal load_directiveHandler(const FpySequencer_LoadDirective& directive, DirectiveError& error);
819  Signal pushVal_directiveHandler(const FpySequencer_PushValDirective& directive, DirectiveError& error);
820  Signal discard_directiveHandler(const FpySequencer_DiscardDirective& directive, DirectiveError& error);
821  Signal memCmp_directiveHandler(const FpySequencer_MemCmpDirective& directive, DirectiveError& error);
822  Signal stackCmd_directiveHandler(const FpySequencer_StackCmdDirective& directive, DirectiveError& error);
823  Signal pushTime_directiveHandler(const FpySequencer_PushTimeDirective& directive, DirectiveError& error);
824  Signal setFlag_directiveHandler(const FpySequencer_SetFlagDirective& directive, DirectiveError& error);
825  Signal getFlag_directiveHandler(const FpySequencer_GetFlagDirective& directive, DirectiveError& error);
826  Signal getField_directiveHandler(const FpySequencer_GetFieldDirective& directive, DirectiveError& error);
827  Signal peek_directiveHandler(const FpySequencer_PeekDirective& directive, DirectiveError& error);
828  Signal store_directiveHandler(const FpySequencer_StoreDirective& directive, DirectiveError& error);
829 };
830 
831 } // namespace Svc
832 
833 #endif
sets the index of the next directive to execute
Fpy::StackSizeType lvarOffset()
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.
bool Svc_FpySequencer_SequencerStateMachine_guard_goalStateIs_RUNNING(SmId smId, Svc_FpySequencer_SequencerStateMachine::Signal signal) const override
void directive_getField_internalInterfaceHandler(const Svc::FpySequencer_GetFieldDirective &directive) override
Internal interface handler for directive_getField.
U8 bytes[Fpy::MAX_STACK_SIZE]
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 ...
void directive_peek_internalInterfaceHandler(const Svc::FpySequencer_PeekDirective &directive) override
Internal interface handler for directive_peek.
FpySequencer_WaitRelDirective waitRel
FpySequencer_WaitAbsDirective waitAbs
void directive_storeConstOffset_internalInterfaceHandler(const Svc::FpySequencer_StoreConstOffsetDirective &directive) override
Internal interface handler for directive_storeConstOffset.
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_PeekDirective peek
void directive_pushPrm_internalInterfaceHandler(const Svc::FpySequencer_PushPrmDirective &directive) override
Internal interface handler for directive_pushPrm.
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
pops some bytes off the stack and puts them in lvar array
void seqRunIn_handler(FwIndexType portNum, const Fw::StringBase &filename) override
Handler for input port seqRunIn.
FpySequencer_GetFieldDirective getField
FpySequencer_PushTlmValAndTimeDirective pushTlmValAndTime
Fpy::DirectiveErrorCode DirectiveError
void directive_allocate_internalInterfaceHandler(const Svc::FpySequencer_AllocateDirective &directive) override
Internal interface handler for directive_allocate.
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_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.
void pushZeroes(Fpy::StackSizeType byteCount)
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
FpySequencer_PushPrmDirective pushPrm
External serialize buffer with no copy semantics.
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.
peeks at N bytes from the stack, starting from an offset relative to the top of the stack ...
bool Svc_FpySequencer_SequencerStateMachine_guard_shouldBreak(SmId smId, Svc_FpySequencer_SequencerStateMachine::Signal signal) const override
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.
stores bytes from the top of the stack into a memory location, determined by the stack ...
sleeps for a relative duration from the current time
uint8_t U8
8-bit unsigned integer
Definition: BasicTypes.h:53
FpySequencer_PushTlmValDirective pushTlmVal
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
Fpy::StackSizeType size
RateGroupDivider component implementation.
FpySequencer_SetFlagDirective setFlag
FpySequencer_StoreConstOffsetDirective storeConstOffset
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.
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 ...
void directive_pushTlmVal_internalInterfaceHandler(const Svc::FpySequencer_PushTlmValDirective &directive) override
Internal interface handler for directive_pushTlmVal.
FpySequencer(const char *const compName)
#define U64(C)
Definition: sha.h:181