F´ Flight Software - C/C++ Documentation
A framework for building embedded system applications to NASA flight quality standards.
FpySequencerComponentAc.hpp
Go to the documentation of this file.
1 // ======================================================================
2 // \title FpySequencerComponentAc.hpp
3 // \author Generated by fpp-to-cpp
4 // \brief hpp file for FpySequencer component base class
5 // ======================================================================
6 
7 #ifndef Svc_FpySequencerComponentAc_HPP
8 #define Svc_FpySequencerComponentAc_HPP
9 
10 #include <atomic>
11 
12 #include "Fw/Cmd/CmdPortAc.hpp"
13 #include "Fw/Cmd/CmdRegPortAc.hpp"
16 #include "Fw/Cmd/CmdString.hpp"
17 #include "Fw/Com/ComPortAc.hpp"
19 #include "Fw/FPrimeBasicTypes.hpp"
20 #include "Fw/Log/LogPortAc.hpp"
21 #include "Fw/Log/LogString.hpp"
22 #if FW_ENABLE_TEXT_LOGGING == 1
23 #include "Fw/Log/LogTextPortAc.hpp"
24 #endif
27 #include "Fw/Prm/PrmGetPortAc.hpp"
28 #include "Fw/Prm/PrmSetPortAc.hpp"
29 #include "Fw/Prm/PrmString.hpp"
30 #include "Fw/Time/TimePortAc.hpp"
31 #include "Fw/Tlm/TlmGetPortAc.hpp"
32 #include "Fw/Tlm/TlmPortAc.hpp"
33 #include "Fw/Tlm/TlmString.hpp"
35 #include "Os/Mutex.hpp"
76 #include "Svc/Ping/PingPortAc.hpp"
85 
86 namespace Svc {
87 
94  {
95 
96  // ----------------------------------------------------------------------
97  // Friend classes
98  // ----------------------------------------------------------------------
99 
103  friend class FpySequencerTester;
104 
105  protected:
106 
107  // ----------------------------------------------------------------------
108  // Constants
109  // ----------------------------------------------------------------------
110 
112  enum {
114  };
115 
117  enum {
123  };
124 
126  enum {
135  };
136 
138  enum {
145  };
146 
148  enum {
149  OPCODE_RUN = 0x0,
153  OPCODE_SET_BREAKPOINT = 0x4,
155  OPCODE_BREAK = 0x5,
159  OPCODE_CONTINUE = 0x6,
164  OPCODE_STEP = 0x8,
166  OPCODE_SET_FLAG = 0x9,
174  };
175 
177  enum {
210  };
211 
213  enum {
236  };
237 
239  enum {
245  };
246 
248  enum class SmId : FwEnumStoreType {
249  sequencer,
250  };
251 
252  protected:
253 
254  // ----------------------------------------------------------------------
255  // Types for internal state machines
256  // ----------------------------------------------------------------------
257 
261  {
262 
263  // ----------------------------------------------------------------------
264  // Friend classes
265  // ----------------------------------------------------------------------
266 
270  friend class FpySequencerTester;
271 
272  public:
273 
276  FpySequencerComponentBase& component
277  );
278 
279  public:
280 
282  void init(
284  );
285 
286  public:
287 
290 
291  private:
292 
294  void action_signalEntered(
295  Signal signal
296  );
297 
299  void action_setSequenceFilePath(
300  Signal signal,
302  );
303 
305  void action_setSequenceBlockState(
306  Signal signal,
308  );
309 
311  void action_validate(
312  Signal signal
313  );
314 
316  void action_report_seqSucceeded(
317  Signal signal
318  );
319 
321  void action_report_seqCancelled(
322  Signal signal
323  );
324 
326  void action_report_seqFailed(
327  Signal signal
328  );
329 
331  void action_report_seqStarted(
332  Signal signal
333  );
334 
336  void action_setGoalState_RUNNING(
337  Signal signal
338  );
339 
341  void action_setGoalState_VALID(
342  Signal signal
343  );
344 
346  void action_setGoalState_IDLE(
347  Signal signal
348  );
349 
351  void action_sendCmdResponse_OK(
352  Signal signal
353  );
354 
356  void action_sendCmdResponse_EXECUTION_ERROR(
357  Signal signal
358  );
359 
361  void action_clearSequenceFile(
362  Signal signal
363  );
364 
366  void action_clearBreakpoint(
367  Signal signal
368  );
369 
371  void action_checkShouldWake(
372  Signal signal
373  );
374 
376  void action_dispatchStatement(
377  Signal signal
378  );
379 
381  void action_resetRuntime(
382  Signal signal
383  );
384 
386  void action_checkStatementTimeout(
387  Signal signal
388  );
389 
391  void action_incrementSequenceCounter(
392  Signal signal
393  );
394 
396  void action_report_seqBroken(
397  Signal signal
398  );
399 
401  void action_setBreakpoint(
402  Signal signal,
404  );
405 
407  void action_setBreakBeforeNextLine(
408  Signal signal
409  );
410 
412  void action_clearBreakBeforeNextLine(
413  Signal signal
414  );
415 
416  private:
417 
419  bool guard_goalStateIs_RUNNING(
420  Signal signal
421  ) const;
422 
424  bool guard_shouldBreak(
425  Signal signal
426  ) const;
427 
429  bool guard_breakOnce(
430  Signal signal
431  ) const;
432 
433  private:
434 
436  FpySequencerComponentBase& m_component;
437 
438  };
439 
440  public:
441 
442  // ----------------------------------------------------------------------
443  // Component initialization
444  // ----------------------------------------------------------------------
445 
447  void init(
448  FwSizeType queueDepth,
449  FwEnumStoreType instance = 0
450  );
451 
452  public:
453 
454  // ----------------------------------------------------------------------
455  // Getters for special input ports
456  // ----------------------------------------------------------------------
457 
462  FwIndexType portNum
463  );
464 
465  public:
466 
467  // ----------------------------------------------------------------------
468  // Getters for typed input ports
469  // ----------------------------------------------------------------------
470 
475  FwIndexType portNum
476  );
477 
482  FwIndexType portNum
483  );
484 
489  FwIndexType portNum
490  );
491 
496  FwIndexType portNum
497  );
498 
503  FwIndexType portNum
504  );
505 
506  public:
507 
508  // ----------------------------------------------------------------------
509  // Connect input ports to special output ports
510  // ----------------------------------------------------------------------
511 
514  FwIndexType portNum,
515  Fw::InputCmdRegPort* port
516  );
517 
520  FwIndexType portNum,
522  );
523 
526  FwIndexType portNum,
527  Fw::InputLogPort* port
528  );
529 
530 #if FW_ENABLE_TEXT_LOGGING == 1
531 
533  void set_logTextOut_OutputPort(
534  FwIndexType portNum,
535  Fw::InputLogTextPort* port
536  );
537 
538 #endif
539 
542  FwIndexType portNum,
543  Fw::InputPrmGetPort* port
544  );
545 
548  FwIndexType portNum,
549  Fw::InputPrmSetPort* port
550  );
551 
554  FwIndexType portNum,
555  Fw::InputTimePort* port
556  );
557 
560  FwIndexType portNum,
561  Fw::InputTlmPort* port
562  );
563 
564  public:
565 
566  // ----------------------------------------------------------------------
567  // Connect typed input ports to typed output ports
568  // ----------------------------------------------------------------------
569 
572  FwIndexType portNum,
573  Fw::InputComPort* port
574  );
575 
578  FwIndexType portNum,
579  Fw::InputPrmGetPort* port
580  );
581 
584  FwIndexType portNum,
585  Fw::InputTlmGetPort* port
586  );
587 
590  FwIndexType portNum,
591  Svc::InputPingPort* port
592  );
593 
596  FwIndexType portNum,
598  );
599 
602  FwIndexType portNum,
604  );
605 
606 #if FW_PORT_SERIALIZATION
607 
608  public:
609 
610  // ----------------------------------------------------------------------
611  // Connect serial input ports to special output ports
612  // ----------------------------------------------------------------------
613 
616  FwIndexType portNum,
617  Fw::InputSerializePort* port
618  );
619 
622  FwIndexType portNum,
623  Fw::InputSerializePort* port
624  );
625 
628  FwIndexType portNum,
629  Fw::InputSerializePort* port
630  );
631 
632 #if FW_ENABLE_TEXT_LOGGING == 1
633 
635  void set_logTextOut_OutputPort(
636  FwIndexType portNum,
637  Fw::InputSerializePort* port
638  );
639 
640 #endif
641 
644  FwIndexType portNum,
645  Fw::InputSerializePort* port
646  );
647 
650  FwIndexType portNum,
651  Fw::InputSerializePort* port
652  );
653 
656  FwIndexType portNum,
657  Fw::InputSerializePort* port
658  );
659 
660 #endif
661 
662 #if FW_PORT_SERIALIZATION
663 
664  public:
665 
666  // ----------------------------------------------------------------------
667  // Connect serial input ports to typed output ports
668  // ----------------------------------------------------------------------
669 
672  FwIndexType portNum,
673  Fw::InputSerializePort* port
674  );
675 
678  FwIndexType portNum,
679  Fw::InputSerializePort* port
680  );
681 
684  FwIndexType portNum,
685  Fw::InputSerializePort* port
686  );
687 
690  FwIndexType portNum,
691  Fw::InputSerializePort* port
692  );
693 
694 #endif
695 
696  public:
697 
698  // ----------------------------------------------------------------------
699  // Command registration
700  // ----------------------------------------------------------------------
701 
705  void regCommands();
706 
707  public:
708 
709  // ----------------------------------------------------------------------
710  // Parameter loading
711  // ----------------------------------------------------------------------
712 
716  void loadParameters();
717 
718  protected:
719 
720  // ----------------------------------------------------------------------
721  // Component construction and destruction
722  // ----------------------------------------------------------------------
723 
726  const char* compName = ""
727  );
728 
730  virtual ~FpySequencerComponentBase();
731 
732  protected:
733 
734  // ----------------------------------------------------------------------
735  // Getters for numbers of special input ports
736  // ----------------------------------------------------------------------
737 
742  return NUM_CMDIN_INPUT_PORTS;
743  }
744 
745  protected:
746 
747  // ----------------------------------------------------------------------
748  // Getters for numbers of typed input ports
749  // ----------------------------------------------------------------------
750 
756  }
757 
763  }
764 
769  return NUM_PINGIN_INPUT_PORTS;
770  }
771 
777  }
778 
784  }
785 
786  protected:
787 
788  // ----------------------------------------------------------------------
789  // Getters for numbers of special output ports
790  // ----------------------------------------------------------------------
791 
797  }
798 
804  }
805 
811  }
812 
813 #if FW_ENABLE_TEXT_LOGGING == 1
814 
818  static constexpr FwIndexType getNum_logTextOut_OutputPorts() {
820  }
821 
822 #endif
823 
829  }
830 
836  }
837 
843  }
844 
850  }
851 
852  protected:
853 
854  // ----------------------------------------------------------------------
855  // Getters for numbers of typed output ports
856  // ----------------------------------------------------------------------
857 
863  }
864 
870  }
871 
877  }
878 
884  }
885 
891  }
892 
898  }
899 
900  protected:
901 
902  // ----------------------------------------------------------------------
903  // Connection status queries for special output ports
904  // ----------------------------------------------------------------------
905 
910  FwIndexType portNum
911  );
912 
917  FwIndexType portNum
918  );
919 
924  FwIndexType portNum
925  );
926 
927 #if FW_ENABLE_TEXT_LOGGING == 1
928 
932  bool isConnected_logTextOut_OutputPort(
933  FwIndexType portNum
934  );
935 
936 #endif
937 
942  FwIndexType portNum
943  );
944 
949  FwIndexType portNum
950  );
951 
956  FwIndexType portNum
957  );
958 
963  FwIndexType portNum
964  );
965 
966  protected:
967 
968  // ----------------------------------------------------------------------
969  // Connection status queries for typed output ports
970  // ----------------------------------------------------------------------
971 
976  FwIndexType portNum
977  );
978 
983  FwIndexType portNum
984  );
985 
990  FwIndexType portNum
991  );
992 
997  FwIndexType portNum
998  );
999 
1004  FwIndexType portNum
1005  );
1006 
1011  FwIndexType portNum
1012  );
1013 
1014  protected:
1015 
1016  // ----------------------------------------------------------------------
1017  // Handlers to implement for typed input ports
1018  // ----------------------------------------------------------------------
1019 
1021  virtual void checkTimers_handler(
1022  FwIndexType portNum,
1023  U32 context
1024  ) = 0;
1025 
1027  virtual void cmdResponseIn_handler(
1028  FwIndexType portNum,
1029  FwOpcodeType opCode,
1030  U32 cmdSeq,
1031  const Fw::CmdResponse& response
1032  ) = 0;
1033 
1035  virtual void pingIn_handler(
1036  FwIndexType portNum,
1037  U32 key
1038  ) = 0;
1039 
1041  virtual void seqRunIn_handler(
1042  FwIndexType portNum,
1043  const Fw::StringBase& filename
1044  ) = 0;
1045 
1047  virtual void tlmWrite_handler(
1048  FwIndexType portNum,
1049  U32 context
1050  ) = 0;
1051 
1052  protected:
1053 
1054  // ----------------------------------------------------------------------
1055  // Port handler base-class functions for typed input ports
1056  //
1057  // Call these functions directly to bypass the corresponding ports
1058  // ----------------------------------------------------------------------
1059 
1062  FwIndexType portNum,
1063  U32 context
1064  );
1065 
1068  FwIndexType portNum,
1069  FwOpcodeType opCode,
1070  U32 cmdSeq,
1071  const Fw::CmdResponse& response
1072  );
1073 
1075  void pingIn_handlerBase(
1076  FwIndexType portNum,
1077  U32 key
1078  );
1079 
1081  void seqRunIn_handlerBase(
1082  FwIndexType portNum,
1083  const Fw::StringBase& filename
1084  );
1085 
1087  void tlmWrite_handlerBase(
1088  FwIndexType portNum,
1089  U32 context
1090  );
1091 
1092  protected:
1093 
1094  // ----------------------------------------------------------------------
1095  // Pre-message hooks for typed async input ports
1096  //
1097  // Each of these functions is invoked just before processing a message
1098  // on the corresponding port. By default, they do nothing. You can
1099  // override them to provide specific pre-message behavior.
1100  // ----------------------------------------------------------------------
1101 
1103  virtual void checkTimers_preMsgHook(
1104  FwIndexType portNum,
1105  U32 context
1106  );
1107 
1109  virtual void cmdResponseIn_preMsgHook(
1110  FwIndexType portNum,
1111  FwOpcodeType opCode,
1112  U32 cmdSeq,
1113  const Fw::CmdResponse& response
1114  );
1115 
1117  virtual void pingIn_preMsgHook(
1118  FwIndexType portNum,
1119  U32 key
1120  );
1121 
1123  virtual void seqRunIn_preMsgHook(
1124  FwIndexType portNum,
1125  const Fw::StringBase& filename
1126  );
1127 
1129  virtual void tlmWrite_preMsgHook(
1130  FwIndexType portNum,
1131  U32 context
1132  );
1133 
1134  protected:
1135 
1136  // ----------------------------------------------------------------------
1137  // Invocation functions for typed output ports
1138  // ----------------------------------------------------------------------
1139 
1141  void cmdOut_out(
1142  FwIndexType portNum,
1143  Fw::ComBuffer& data,
1144  U32 context
1145  );
1146 
1149  FwIndexType portNum,
1150  FwPrmIdType id,
1151  Fw::ParamBuffer& val
1152  );
1154 
1157  FwIndexType portNum,
1158  FwChanIdType id,
1159  Fw::Time& timeTag,
1160  Fw::TlmBuffer& val
1161  );
1164 
1166  void pingOut_out(
1167  FwIndexType portNum,
1168  U32 key
1169  );
1170 
1172  void seqDoneOut_out(
1173  FwIndexType portNum,
1174  FwOpcodeType opCode,
1175  U32 cmdSeq,
1176  const Fw::CmdResponse& response
1177  );
1178 
1180  void seqStartOut_out(
1181  FwIndexType portNum,
1182  const Fw::StringBase& filename
1183  );
1184 
1185  protected:
1186 
1187  // ----------------------------------------------------------------------
1188  // Internal interface handlers
1189  // ----------------------------------------------------------------------
1190 
1193 
1196 
1199 
1202 
1205 
1208 
1211 
1214 
1216  virtual void directive_if_internalInterfaceHandler(const Svc::FpySequencer_IfDirective& directive) = 0;
1217 
1220 
1223 
1226 
1229 
1232 
1235 
1238 
1241 
1244 
1247 
1250 
1253 
1256 
1259 
1262 
1265 
1268 
1271 
1274 
1277 
1278  protected:
1279 
1280  // ----------------------------------------------------------------------
1281  // Internal interface base-class functions
1282  // ----------------------------------------------------------------------
1283 
1286 
1289 
1292 
1295 
1298 
1301 
1304 
1307 
1310 
1313 
1316 
1319 
1322 
1325 
1328 
1331 
1334 
1337 
1340 
1343 
1346 
1349 
1352 
1355 
1358 
1361 
1364 
1367 
1370 
1371  protected:
1372 
1373  // ----------------------------------------------------------------------
1374  // State getter functions
1375  // ----------------------------------------------------------------------
1376 
1379 
1380  protected:
1381 
1382  // ----------------------------------------------------------------------
1383  // Signal send functions
1384  // ----------------------------------------------------------------------
1385 
1389  );
1390 
1394  );
1395 
1399  );
1400 
1403 
1406  const Svc::FpySequencer_BreakpointArgs& value
1407  );
1408 
1411 
1414 
1417 
1420 
1423 
1426 
1429 
1432 
1435 
1438 
1441 
1444 
1447 
1450 
1453 
1456 
1459 
1462 
1465 
1468 
1471 
1472  protected:
1473 
1474  // ----------------------------------------------------------------------
1475  // Functions to implement for internal state machine actions
1476  // ----------------------------------------------------------------------
1477 
1482  SmId smId,
1484  ) = 0;
1485 
1490  SmId smId,
1493  ) = 0;
1494 
1499  SmId smId,
1502  ) = 0;
1503 
1508  SmId smId,
1510  ) = 0;
1511 
1516  SmId smId,
1518  ) = 0;
1519 
1524  SmId smId,
1526  ) = 0;
1527 
1532  SmId smId,
1534  ) = 0;
1535 
1540  SmId smId,
1542  ) = 0;
1543 
1548  SmId smId,
1550  ) = 0;
1551 
1556  SmId smId,
1558  ) = 0;
1559 
1564  SmId smId,
1566  ) = 0;
1567 
1572  SmId smId,
1574  ) = 0;
1575 
1580  SmId smId,
1582  ) = 0;
1583 
1588  SmId smId,
1590  ) = 0;
1591 
1596  SmId smId,
1598  ) = 0;
1599 
1604  SmId smId,
1606  ) = 0;
1607 
1612  SmId smId,
1614  ) = 0;
1615 
1620  SmId smId,
1622  ) = 0;
1623 
1628  SmId smId,
1630  ) = 0;
1631 
1636  SmId smId,
1638  ) = 0;
1639 
1644  SmId smId,
1646  ) = 0;
1647 
1652  SmId smId,
1654  const Svc::FpySequencer_BreakpointArgs& value
1655  ) = 0;
1656 
1661  SmId smId,
1663  ) = 0;
1664 
1669  SmId smId,
1671  ) = 0;
1672 
1673  protected:
1674 
1675  // ----------------------------------------------------------------------
1676  // Functions to implement for internal state machine guards
1677  // ----------------------------------------------------------------------
1678 
1683  SmId smId,
1685  ) const = 0;
1686 
1692  SmId smId,
1694  ) const = 0;
1695 
1700  SmId smId,
1702  ) const = 0;
1703 
1704  protected:
1705 
1706  // ----------------------------------------------------------------------
1707  // Command response
1708  // ----------------------------------------------------------------------
1709 
1711  void cmdResponse_out(
1712  FwOpcodeType opCode,
1713  U32 cmdSeq,
1714  Fw::CmdResponse response
1715  );
1716 
1717  protected:
1718 
1719  // ----------------------------------------------------------------------
1720  // Command handlers to implement
1721  // ----------------------------------------------------------------------
1722 
1726  virtual void RUN_cmdHandler(
1727  FwOpcodeType opCode,
1728  U32 cmdSeq,
1729  const Fw::CmdStringArg& fileName,
1731  ) = 0;
1732 
1736  virtual void VALIDATE_cmdHandler(
1737  FwOpcodeType opCode,
1738  U32 cmdSeq,
1739  const Fw::CmdStringArg& fileName
1740  ) = 0;
1741 
1745  virtual void RUN_VALIDATED_cmdHandler(
1746  FwOpcodeType opCode,
1747  U32 cmdSeq,
1749  ) = 0;
1750 
1755  virtual void CANCEL_cmdHandler(
1756  FwOpcodeType opCode,
1757  U32 cmdSeq
1758  ) = 0;
1759 
1766  virtual void SET_BREAKPOINT_cmdHandler(
1767  FwOpcodeType opCode,
1768  U32 cmdSeq,
1769  U32 stmtIdx,
1770  bool breakOnce
1771  ) = 0;
1772 
1778  virtual void BREAK_cmdHandler(
1779  FwOpcodeType opCode,
1780  U32 cmdSeq
1781  ) = 0;
1782 
1787  virtual void CONTINUE_cmdHandler(
1788  FwOpcodeType opCode,
1789  U32 cmdSeq
1790  ) = 0;
1791 
1796  virtual void CLEAR_BREAKPOINT_cmdHandler(
1797  FwOpcodeType opCode,
1798  U32 cmdSeq
1799  ) = 0;
1800 
1805  virtual void STEP_cmdHandler(
1806  FwOpcodeType opCode,
1807  U32 cmdSeq
1808  ) = 0;
1809 
1814  virtual void SET_FLAG_cmdHandler(
1815  FwOpcodeType opCode,
1816  U32 cmdSeq,
1817  Svc::Fpy::FlagId flag,
1818  bool value
1819  ) = 0;
1820 
1824  virtual void DUMP_STACK_TO_FILE_cmdHandler(
1825  FwOpcodeType opCode,
1826  U32 cmdSeq,
1827  const Fw::CmdStringArg& fileName
1828  ) = 0;
1829 
1830  protected:
1831 
1832  // ----------------------------------------------------------------------
1833  // Command handler base-class functions
1834  //
1835  // Call these functions directly to bypass the command input port
1836  // ----------------------------------------------------------------------
1837 
1841  void RUN_cmdHandlerBase(
1842  FwOpcodeType opCode,
1843  U32 cmdSeq,
1844  Fw::CmdArgBuffer& args
1845  );
1846 
1851  FwOpcodeType opCode,
1852  U32 cmdSeq,
1853  Fw::CmdArgBuffer& args
1854  );
1855 
1860  FwOpcodeType opCode,
1861  U32 cmdSeq,
1862  Fw::CmdArgBuffer& args
1863  );
1864 
1869  void CANCEL_cmdHandlerBase(
1870  FwOpcodeType opCode,
1871  U32 cmdSeq,
1872  Fw::CmdArgBuffer& args
1873  );
1874 
1882  FwOpcodeType opCode,
1883  U32 cmdSeq,
1884  Fw::CmdArgBuffer& args
1885  );
1886 
1892  void BREAK_cmdHandlerBase(
1893  FwOpcodeType opCode,
1894  U32 cmdSeq,
1895  Fw::CmdArgBuffer& args
1896  );
1897 
1903  FwOpcodeType opCode,
1904  U32 cmdSeq,
1905  Fw::CmdArgBuffer& args
1906  );
1907 
1913  FwOpcodeType opCode,
1914  U32 cmdSeq,
1915  Fw::CmdArgBuffer& args
1916  );
1917 
1922  void STEP_cmdHandlerBase(
1923  FwOpcodeType opCode,
1924  U32 cmdSeq,
1925  Fw::CmdArgBuffer& args
1926  );
1927 
1933  FwOpcodeType opCode,
1934  U32 cmdSeq,
1935  Fw::CmdArgBuffer& args
1936  );
1937 
1942  FwOpcodeType opCode,
1943  U32 cmdSeq,
1944  Fw::CmdArgBuffer& args
1945  );
1946 
1947  protected:
1948 
1949  // ----------------------------------------------------------------------
1950  // Pre-message hooks for async commands
1951  //
1952  // Each of these functions is invoked just before processing the
1953  // corresponding command. By default they do nothing. You can
1954  // override them to provide specific pre-command behavior.
1955  // ----------------------------------------------------------------------
1956 
1958  virtual void RUN_preMsgHook(
1959  FwOpcodeType opCode,
1960  U32 cmdSeq
1961  );
1962 
1964  virtual void VALIDATE_preMsgHook(
1965  FwOpcodeType opCode,
1966  U32 cmdSeq
1967  );
1968 
1970  virtual void RUN_VALIDATED_preMsgHook(
1971  FwOpcodeType opCode,
1972  U32 cmdSeq
1973  );
1974 
1976  virtual void CANCEL_preMsgHook(
1977  FwOpcodeType opCode,
1978  U32 cmdSeq
1979  );
1980 
1982  virtual void SET_BREAKPOINT_preMsgHook(
1983  FwOpcodeType opCode,
1984  U32 cmdSeq
1985  );
1986 
1988  virtual void BREAK_preMsgHook(
1989  FwOpcodeType opCode,
1990  U32 cmdSeq
1991  );
1992 
1994  virtual void CONTINUE_preMsgHook(
1995  FwOpcodeType opCode,
1996  U32 cmdSeq
1997  );
1998 
2000  virtual void CLEAR_BREAKPOINT_preMsgHook(
2001  FwOpcodeType opCode,
2002  U32 cmdSeq
2003  );
2004 
2006  virtual void STEP_preMsgHook(
2007  FwOpcodeType opCode,
2008  U32 cmdSeq
2009  );
2010 
2012  virtual void SET_FLAG_preMsgHook(
2013  FwOpcodeType opCode,
2014  U32 cmdSeq
2015  );
2016 
2018  virtual void DUMP_STACK_TO_FILE_preMsgHook(
2019  FwOpcodeType opCode,
2020  U32 cmdSeq
2021  );
2022 
2023  protected:
2024 
2025  // ----------------------------------------------------------------------
2026  // Event logging functions
2027  // ----------------------------------------------------------------------
2028 
2030  void log_WARNING_HI_InvalidCommand(I32 state) const;
2031 
2033  void log_WARNING_HI_InvalidSeqRunCall(I32 state) const;
2034 
2037  const Fw::StringBase& filePath,
2038  I32 errorCode
2039  ) const;
2040 
2043  FwSizeType writeSize,
2044  const Fw::StringBase& filePath,
2045  I32 errorCode
2046  ) const;
2047 
2051  const Fw::StringBase& filePath,
2052  I32 errorCode
2053  ) const;
2054 
2058  const Fw::StringBase& filePath
2059  ) const;
2060 
2064  const Fw::StringBase& filePath,
2065  I32 errorCode,
2066  U64 buffLeft,
2067  U64 buffLength
2068  ) const;
2069 
2072  U8 expected,
2073  U8 actual
2074  ) const;
2075 
2078  U32 expected,
2079  U32 actual
2080  ) const;
2081 
2083  void log_WARNING_HI_ExtraBytesInSequence(FwSizeType remaining) const;
2084 
2087  U64 bufferSize,
2088  const Fw::StringBase& filePath
2089  ) const;
2090 
2093  FwOpcodeType opCode,
2094  U32 stmtIdx,
2095  const Fw::StringBase& filePath,
2096  Fw::CmdResponse response
2097  ) const;
2098 
2100  void log_ACTIVITY_HI_SequenceDone(const Fw::StringBase& filePath) const;
2101 
2103  void log_ACTIVITY_HI_SequenceCancelled(const Fw::StringBase& filePath) const;
2104 
2107  const Fw::StringBase& filePath,
2108  U8 errorCode
2109  ) const;
2110 
2113  U8 opcode,
2114  U32 stmtIdx,
2115  const Fw::StringBase& filePath
2116  ) const;
2117 
2120  I32 state,
2121  FwOpcodeType opcode,
2122  Fw::CmdResponse response
2123  ) const;
2124 
2127  FwOpcodeType opcode,
2128  Fw::CmdResponse response,
2129  U16 oldSequenceIdx,
2130  U16 currentSequenceIdx
2131  ) const;
2132 
2135  FwOpcodeType opcode,
2136  Fw::CmdResponse response
2137  ) const;
2138 
2141  FwOpcodeType opcode,
2142  Fw::CmdResponse response,
2143  U8 expectedDirectiveOpcode
2144  ) const;
2145 
2148  FwOpcodeType opcode,
2149  Fw::CmdResponse response,
2150  FwOpcodeType expectedOpcode
2151  ) const;
2152 
2155  FwOpcodeType opcode,
2156  Fw::CmdResponse response,
2157  U16 actualCmdIdx,
2158  U16 expectedCmdIdx
2159  ) const;
2160 
2163  U8 opcode,
2164  U32 stmtIdx,
2165  I32 errorCode,
2166  U64 buffLeft,
2167  U64 buffLength
2168  ) const;
2169 
2172  I32 internalTimeBase,
2173  I32 otherTimeBase
2174  ) const;
2175 
2178  I32 internalTimeContext,
2179  I32 otherTimeContext
2180  ) const;
2181 
2184  FwOpcodeType opCode,
2185  U32 stmtIdx,
2186  const Fw::StringBase& filePath
2187  ) const;
2188 
2191  U8 opCode,
2192  U32 stmtIdx,
2193  const Fw::StringBase& filePath
2194  ) const;
2195 
2198  U8 count,
2199  U8 max
2200  ) const;
2201 
2204  U16 count,
2205  U16 max
2206  ) const;
2207 
2209  void log_ACTIVITY_HI_SequencePaused(U32 stmtIdx) const;
2210 
2213  U32 breakpointIdx,
2214  bool breakOnce
2215  ) const;
2216 
2218  void log_ACTIVITY_HI_BreakpointCleared() const;
2219 
2220  protected:
2221 
2222  // ----------------------------------------------------------------------
2223  // Telemetry write functions
2224  // ----------------------------------------------------------------------
2225 
2229  void tlmWrite_State(
2230  FwEnumStoreType arg,
2231  Fw::Time _tlmTime = Fw::Time()
2232  );
2233 
2238  U64 arg,
2239  Fw::Time _tlmTime = Fw::Time()
2240  );
2241 
2246  U64 arg,
2247  Fw::Time _tlmTime = Fw::Time()
2248  );
2249 
2254  U64 arg,
2255  Fw::Time _tlmTime = Fw::Time()
2256  );
2257 
2264  U64 arg,
2265  Fw::Time _tlmTime = Fw::Time()
2266  );
2267 
2272  U64 arg,
2273  Fw::Time _tlmTime = Fw::Time()
2274  );
2275 
2280  const Svc::Fpy::DirectiveErrorCode& arg,
2281  Fw::Time _tlmTime = Fw::Time()
2282  );
2283 
2288  U64 arg,
2289  Fw::Time _tlmTime = Fw::Time()
2290  );
2291 
2296  const Svc::Fpy::DirectiveId& arg,
2297  Fw::Time _tlmTime = Fw::Time()
2298  );
2299 
2303  void tlmWrite_SeqPath(
2304  const Fw::StringBase& arg,
2305  Fw::Time _tlmTime = Fw::Time()
2306  );
2307 
2312  bool arg,
2313  Fw::Time _tlmTime = Fw::Time()
2314  );
2315 
2320  bool arg,
2321  Fw::Time _tlmTime = Fw::Time()
2322  );
2323 
2328  U8 arg,
2329  Fw::Time _tlmTime = Fw::Time()
2330  );
2331 
2336  U32 arg,
2337  Fw::Time _tlmTime = Fw::Time()
2338  );
2339 
2344  FwOpcodeType arg,
2345  Fw::Time _tlmTime = Fw::Time()
2346  );
2347 
2353  Fw::Time _tlmTime = Fw::Time()
2354  );
2355 
2360  bool arg,
2361  Fw::Time _tlmTime = Fw::Time()
2362  );
2363 
2369  U32 arg,
2370  Fw::Time _tlmTime = Fw::Time()
2371  );
2372 
2377  bool arg,
2378  Fw::Time _tlmTime = Fw::Time()
2379  );
2380 
2387  bool arg,
2388  Fw::Time _tlmTime = Fw::Time()
2389  );
2390 
2395  F32 arg,
2396  Fw::Time _tlmTime = Fw::Time()
2397  );
2398 
2403  bool arg,
2404  Fw::Time _tlmTime = Fw::Time()
2405  );
2406 
2407  protected:
2408 
2409  // ----------------------------------------------------------------------
2410  // Parameter update hook
2411  // ----------------------------------------------------------------------
2412 
2416  virtual void parameterUpdated(
2417  FwPrmIdType id
2418  );
2419 
2420  // ----------------------------------------------------------------------
2421  // Parameter load hook
2422  // ----------------------------------------------------------------------
2423 
2427  virtual void parametersLoaded();
2428 
2429  protected:
2430 
2431  // ----------------------------------------------------------------------
2432  // Parameter get functions
2433  // ----------------------------------------------------------------------
2434 
2444  Fw::ParamValid& valid
2445  );
2446 
2453  Fw::ParamValid& valid
2454  );
2455 
2456  protected:
2457 
2458  // ----------------------------------------------------------------------
2459  // Time
2460  // ----------------------------------------------------------------------
2461 
2465  Fw::Time getTime() const;
2466 
2467  private:
2468 
2469  // ----------------------------------------------------------------------
2470  // Message dispatch functions
2471  // ----------------------------------------------------------------------
2472 
2474  virtual MsgDispatchStatus doDispatch();
2475 
2476  private:
2477 
2478  // ----------------------------------------------------------------------
2479  // Calls for messages received on special input ports
2480  // ----------------------------------------------------------------------
2481 
2483  static void m_p_cmdIn_in(
2484  Fw::PassiveComponentBase* callComp,
2485  FwIndexType portNum,
2486  FwOpcodeType opCode,
2487  U32 cmdSeq,
2488  Fw::CmdArgBuffer& args
2489  );
2490 
2491  private:
2492 
2493  // ----------------------------------------------------------------------
2494  // Calls for messages received on typed input ports
2495  // ----------------------------------------------------------------------
2496 
2498  static void m_p_checkTimers_in(
2499  Fw::PassiveComponentBase* callComp,
2500  FwIndexType portNum,
2501  U32 context
2502  );
2503 
2505  static void m_p_cmdResponseIn_in(
2506  Fw::PassiveComponentBase* callComp,
2507  FwIndexType portNum,
2508  FwOpcodeType opCode,
2509  U32 cmdSeq,
2510  const Fw::CmdResponse& response
2511  );
2512 
2514  static void m_p_pingIn_in(
2515  Fw::PassiveComponentBase* callComp,
2516  FwIndexType portNum,
2517  U32 key
2518  );
2519 
2521  static void m_p_seqRunIn_in(
2522  Fw::PassiveComponentBase* callComp,
2523  FwIndexType portNum,
2524  const Fw::StringBase& filename
2525  );
2526 
2528  static void m_p_tlmWrite_in(
2529  Fw::PassiveComponentBase* callComp,
2530  FwIndexType portNum,
2531  U32 context
2532  );
2533 
2534  private:
2535 
2536  // ----------------------------------------------------------------------
2537  // Send signal helper functions
2538  // ----------------------------------------------------------------------
2539 
2541  void sendSignalStart(
2542  SmId smId,
2543  FwEnumStoreType signal,
2544  Fw::SerialBufferBase& buffer
2545  );
2546 
2548  void sequencer_sendSignalFinish(
2549  Fw::LinearBufferBase& buffer
2550  );
2551 
2552  private:
2553 
2554  // ----------------------------------------------------------------------
2555  // Helper functions for state machine dispatch
2556  // ----------------------------------------------------------------------
2557 
2559  void smDispatch(
2560  Fw::SerialBufferBase& buffer
2561  );
2562 
2564  static void deserializeSmIdAndSignal(
2565  Fw::SerialBufferBase& buffer,
2566  FwEnumStoreType& smId,
2567  FwEnumStoreType& signal
2568  );
2569 
2571  void Svc_FpySequencer_SequencerStateMachine_smDispatch(
2572  Fw::SerialBufferBase& buffer,
2573  Svc_FpySequencer_SequencerStateMachine& sm,
2575  );
2576 
2577  private:
2578 
2579  // ----------------------------------------------------------------------
2580  // Parameter set functions
2581  // ----------------------------------------------------------------------
2582 
2586  Fw::CmdResponse paramSet_STATEMENT_TIMEOUT_SECS(
2587  Fw::SerialBufferBase& val
2588  );
2589 
2593  Fw::CmdResponse paramSet_FLAG_DEFAULT_EXIT_ON_CMD_FAIL(
2594  Fw::SerialBufferBase& val
2595  );
2596 
2597  private:
2598 
2599  // ----------------------------------------------------------------------
2600  // Parameter save functions
2601  // ----------------------------------------------------------------------
2602 
2606  Fw::CmdResponse paramSave_STATEMENT_TIMEOUT_SECS();
2607 
2611  Fw::CmdResponse paramSave_FLAG_DEFAULT_EXIT_ON_CMD_FAIL();
2612 
2613  private:
2614 
2615  // ----------------------------------------------------------------------
2616  // Special input ports
2617  // ----------------------------------------------------------------------
2618 
2620  Fw::InputCmdPort m_cmdIn_InputPort[NUM_CMDIN_INPUT_PORTS];
2621 
2622  private:
2623 
2624  // ----------------------------------------------------------------------
2625  // Typed input ports
2626  // ----------------------------------------------------------------------
2627 
2629  Svc::InputSchedPort m_checkTimers_InputPort[NUM_CHECKTIMERS_INPUT_PORTS];
2630 
2632  Fw::InputCmdResponsePort m_cmdResponseIn_InputPort[NUM_CMDRESPONSEIN_INPUT_PORTS];
2633 
2635  Svc::InputPingPort m_pingIn_InputPort[NUM_PINGIN_INPUT_PORTS];
2636 
2638  Svc::InputCmdSeqInPort m_seqRunIn_InputPort[NUM_SEQRUNIN_INPUT_PORTS];
2639 
2641  Svc::InputSchedPort m_tlmWrite_InputPort[NUM_TLMWRITE_INPUT_PORTS];
2642 
2643  private:
2644 
2645  // ----------------------------------------------------------------------
2646  // Special output ports
2647  // ----------------------------------------------------------------------
2648 
2650  Fw::OutputCmdRegPort m_cmdRegOut_OutputPort[NUM_CMDREGOUT_OUTPUT_PORTS];
2651 
2653  Fw::OutputCmdResponsePort m_cmdResponseOut_OutputPort[NUM_CMDRESPONSEOUT_OUTPUT_PORTS];
2654 
2656  Fw::OutputLogPort m_logOut_OutputPort[NUM_LOGOUT_OUTPUT_PORTS];
2657 
2658 #if FW_ENABLE_TEXT_LOGGING == 1
2659 
2661  Fw::OutputLogTextPort m_logTextOut_OutputPort[NUM_LOGTEXTOUT_OUTPUT_PORTS];
2662 
2663 #endif
2664 
2666  Fw::OutputPrmGetPort m_prmGet_OutputPort[NUM_PRMGET_OUTPUT_PORTS];
2667 
2669  Fw::OutputPrmSetPort m_prmSet_OutputPort[NUM_PRMSET_OUTPUT_PORTS];
2670 
2672  Fw::OutputTimePort m_timeCaller_OutputPort[NUM_TIMECALLER_OUTPUT_PORTS];
2673 
2675  Fw::OutputTlmPort m_tlmOut_OutputPort[NUM_TLMOUT_OUTPUT_PORTS];
2676 
2677  private:
2678 
2679  // ----------------------------------------------------------------------
2680  // Typed output ports
2681  // ----------------------------------------------------------------------
2682 
2684  Fw::OutputComPort m_cmdOut_OutputPort[NUM_CMDOUT_OUTPUT_PORTS];
2685 
2687  Fw::OutputPrmGetPort m_getParam_OutputPort[NUM_GETPARAM_OUTPUT_PORTS];
2688 
2690  Fw::OutputTlmGetPort m_getTlmChan_OutputPort[NUM_GETTLMCHAN_OUTPUT_PORTS];
2691 
2693  Svc::OutputPingPort m_pingOut_OutputPort[NUM_PINGOUT_OUTPUT_PORTS];
2694 
2696  Fw::OutputCmdResponsePort m_seqDoneOut_OutputPort[NUM_SEQDONEOUT_OUTPUT_PORTS];
2697 
2699  Svc::OutputCmdSeqInPort m_seqStartOut_OutputPort[NUM_SEQSTARTOUT_OUTPUT_PORTS];
2700 
2701  private:
2702 
2703  // ----------------------------------------------------------------------
2704  // First update flags for telemetry channels
2705  // ----------------------------------------------------------------------
2706 
2708  bool m_first_update_State = true;
2709 
2711  bool m_first_update_SequencesSucceeded = true;
2712 
2714  bool m_first_update_SequencesFailed = true;
2715 
2717  bool m_first_update_SequencesCancelled = true;
2718 
2720  bool m_first_update_StatementsDispatched = true;
2721 
2723  bool m_first_update_StatementsFailed = true;
2724 
2726  bool m_first_update_LastDirectiveError = true;
2727 
2729  bool m_first_update_DirectiveErrorIndex = true;
2730 
2732  bool m_first_update_DirectiveErrorId = true;
2733 
2735  bool m_first_update_SeqPath = true;
2736 
2738  bool m_first_update_Debug_ReachedEndOfFile = true;
2739 
2741  bool m_first_update_Debug_NextStatementReadSuccess = true;
2742 
2744  bool m_first_update_Debug_NextStatementOpcode = true;
2745 
2747  bool m_first_update_Debug_NextStatementIndex = true;
2748 
2750  bool m_first_update_Debug_NextCmdOpcode = true;
2751 
2753  bool m_first_update_Debug_StackSize = true;
2754 
2756  bool m_first_update_BreakpointInUse = true;
2757 
2759  bool m_first_update_BreakpointIndex = true;
2760 
2762  bool m_first_update_BreakOnlyOnceOnBreakpoint = true;
2763 
2765  bool m_first_update_BreakBeforeNextLine = true;
2766 
2768  bool m_first_update_PRM_STATEMENT_TIMEOUT_SECS = true;
2769 
2771  bool m_first_update_PRM_FLAG_DEFAULT_EXIT_ON_CMD_FAIL = true;
2772 
2773  private:
2774 
2775  // ----------------------------------------------------------------------
2776  // Last value storage for telemetry channels
2777  // ----------------------------------------------------------------------
2778 
2780  FwEnumStoreType m_last_State = {};
2781 
2783  U64 m_last_SequencesSucceeded = {};
2784 
2786  U64 m_last_SequencesFailed = {};
2787 
2789  U64 m_last_SequencesCancelled = {};
2790 
2792  U64 m_last_StatementsDispatched = {};
2793 
2795  U64 m_last_StatementsFailed = {};
2796 
2798  Svc::Fpy::DirectiveErrorCode m_last_LastDirectiveError = {};
2799 
2801  U64 m_last_DirectiveErrorIndex = {};
2802 
2804  Svc::Fpy::DirectiveId m_last_DirectiveErrorId = {};
2805 
2807  Fw::TlmString m_last_SeqPath = {};
2808 
2810  bool m_last_Debug_ReachedEndOfFile = {};
2811 
2813  bool m_last_Debug_NextStatementReadSuccess = {};
2814 
2816  U8 m_last_Debug_NextStatementOpcode = {};
2817 
2819  U32 m_last_Debug_NextStatementIndex = {};
2820 
2822  FwOpcodeType m_last_Debug_NextCmdOpcode = {};
2823 
2825  Svc::Fpy::StackSizeType m_last_Debug_StackSize = {};
2826 
2828  bool m_last_BreakpointInUse = {};
2829 
2831  U32 m_last_BreakpointIndex = {};
2832 
2834  bool m_last_BreakOnlyOnceOnBreakpoint = {};
2835 
2837  bool m_last_BreakBeforeNextLine = {};
2838 
2840  F32 m_last_PRM_STATEMENT_TIMEOUT_SECS = {};
2841 
2843  bool m_last_PRM_FLAG_DEFAULT_EXIT_ON_CMD_FAIL = {};
2844 
2845  private:
2846 
2847  // ----------------------------------------------------------------------
2848  // Parameter validity flags
2849  // ----------------------------------------------------------------------
2850 
2852  Fw::ParamValid m_param_STATEMENT_TIMEOUT_SECS_valid;
2853 
2855  Fw::ParamValid m_param_FLAG_DEFAULT_EXIT_ON_CMD_FAIL_valid;
2856 
2857  private:
2858 
2859  // ----------------------------------------------------------------------
2860  // Parameter variables
2861  // ----------------------------------------------------------------------
2862 
2869  F32 m_STATEMENT_TIMEOUT_SECS;
2870 
2874  bool m_FLAG_DEFAULT_EXIT_ON_CMD_FAIL;
2875 
2876  private:
2877 
2878  // ----------------------------------------------------------------------
2879  // State machine instances
2880  // ----------------------------------------------------------------------
2881 
2883  Svc_FpySequencer_SequencerStateMachine m_stateMachine_sequencer;
2884 
2885  private:
2886 
2887  // ----------------------------------------------------------------------
2888  // Mutexes
2889  // ----------------------------------------------------------------------
2890 
2892  Os::Mutex m_paramLock;
2893 
2894  };
2895 
2896 }
2897 
2898 #endif
bool isConnected_tlmOut_OutputPort(FwIndexType portNum)
void tlmWrite_PRM_FLAG_DEFAULT_EXIT_ON_CMD_FAIL(bool arg, Fw::Time _tlmTime=Fw::Time())
void sequencer_sendSignal_result_dispatchStatement_noMoreStatements()
Send signal result_dispatchStatement_noMoreStatements to state machine sequencer. ...
sets the index of the next directive to execute
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.
virtual void DUMP_STACK_TO_FILE_preMsgHook(FwOpcodeType opCode, U32 cmdSeq)
Pre-message hook for command DUMP_STACK_TO_FILE.
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_report_seqFailed(SmId smId, Svc_FpySequencer_SequencerStateMachine::Signal signal)=0
void set_seqStartOut_OutputPort(FwIndexType portNum, Svc::InputCmdSeqInPort *port)
Connect port to seqStartOut[portNum].
void log_WARNING_HI_DirectiveTimedOut(U8 opCode, U32 stmtIdx, const Fw::StringBase &filePath) const
Log event DirectiveTimedOut.
virtual void directive_pushPrm_internalInterfaceHandler(const Svc::FpySequencer_PushPrmDirective &directive)=0
Internal interface handler for directive_pushPrm.
virtual void directive_peek_internalInterfaceHandler(const Svc::FpySequencer_PeekDirective &directive)=0
Internal interface handler for directive_peek.
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
void log_ACTIVITY_HI_SequencePaused(U32 stmtIdx) const
Log event SequencePaused.
virtual void directive_exit_internalInterfaceHandler(const Svc::FpySequencer_ExitDirective &directive)=0
Internal interface handler for directive_exit.
Fw::InputCmdResponsePort * get_cmdResponseIn_InputPort(FwIndexType portNum)
FwIdType FwOpcodeType
The type of a command opcode.
void set_cmdOut_OutputPort(FwIndexType portNum, Fw::InputComPort *port)
Connect port to cmdOut[portNum].
branches based off of the top byte of the stack
void directive_pushVal_internalInterfaceInvoke(const Svc::FpySequencer_PushValDirective &directive)
Internal interface base-class function for directive_pushVal.
void tlmWrite_Debug_NextStatementOpcode(U8 arg, Fw::Time _tlmTime=Fw::Time())
virtual void parametersLoaded()
Called whenever parameters are loaded.
virtual void directive_pushTime_internalInterfaceHandler(const Svc::FpySequencer_PushTimeDirective &directive)=0
Internal interface handler for directive_pushTime.
void log_WARNING_HI_InsufficientBufferSpace(U64 bufferSize, const Fw::StringBase &filePath) const
Log event InsufficientBufferSpace.
static constexpr FwIndexType getNum_seqStartOut_OutputPorts()
PlatformSizeType FwSizeType
stores a value to an absolute address in the stack (for global variables), offset from stack ...
I32 FwEnumStoreType
void CONTINUE_cmdHandlerBase(FwOpcodeType opCode, U32 cmdSeq, Fw::CmdArgBuffer &args)
void sequencer_sendSignal_cmd_STEP()
Send signal cmd_STEP to state machine sequencer.
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 directive_stackOp_internalInterfaceInvoke(const Svc::FpySequencer_StackOpDirective &directive)
Internal interface base-class function for directive_stackOp.
void log_WARNING_HI_WrongCRC(U32 expected, U32 actual) const
Log event WrongCRC.
void directive_pushTlmVal_internalInterfaceInvoke(const Svc::FpySequencer_PushTlmValDirective &directive)
Internal interface base-class function for directive_pushTlmVal.
virtual void CLEAR_BREAKPOINT_cmdHandler(FwOpcodeType opCode, U32 cmdSeq)=0
virtual void parameterUpdated(FwPrmIdType id)
Called whenever a parameter is updated.
virtual void directive_stackCmd_internalInterfaceHandler(const Svc::FpySequencer_StackCmdDirective &directive)=0
Internal interface handler for directive_stackCmd.
void sequencer_sendSignal_cmd_SET_BREAKPOINT(const Svc::FpySequencer_BreakpointArgs &value)
Send signal cmd_SET_BREAKPOINT to state machine sequencer.
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.
virtual void CLEAR_BREAKPOINT_preMsgHook(FwOpcodeType opCode, U32 cmdSeq)
Pre-message hook for command CLEAR_BREAKPOINT.
static constexpr FwIndexType getNum_cmdIn_InputPorts()
Fw::TlmValid getTlmChan_out(FwIndexType portNum, FwChanIdType id, Fw::Time &timeTag, Fw::TlmBuffer &val)
Invoke output port getTlmChan.
void tlmWrite_Debug_ReachedEndOfFile(bool arg, Fw::Time _tlmTime=Fw::Time())
void log_WARNING_HI_SequenceExitedWithError(const Fw::StringBase &filePath, U8 errorCode) const
Log event SequenceExitedWithError.
void RUN_cmdHandlerBase(FwOpcodeType opCode, U32 cmdSeq, Fw::CmdArgBuffer &args)
virtual void SET_FLAG_preMsgHook(FwOpcodeType opCode, U32 cmdSeq)
Pre-message hook for command SET_FLAG.
void set_seqDoneOut_OutputPort(FwIndexType portNum, Fw::InputCmdResponsePort *port)
Connect port to seqDoneOut[portNum].
FwIdType FwPrmIdType
The type of a parameter identifier.
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
stores a value to a local variable at a compile-time-known offset relative to the current stack frame...
virtual void CANCEL_cmdHandler(FwOpcodeType opCode, U32 cmdSeq)=0
void STEP_cmdHandlerBase(FwOpcodeType opCode, U32 cmdSeq, Fw::CmdArgBuffer &args)
virtual bool Svc_FpySequencer_SequencerStateMachine_guard_breakOnce(SmId smId, Svc_FpySequencer_SequencerStateMachine::Signal signal) const =0
static constexpr FwIndexType getNum_pingIn_InputPorts()
virtual void Svc_FpySequencer_SequencerStateMachine_action_report_seqStarted(SmId smId, Svc_FpySequencer_SequencerStateMachine::Signal signal)=0
pop an opcode and arg buf off the stack, send to cmd dispatcher and await response ...
void sequencer_sendSignal_result_checkShouldWake_wakeup()
Send signal result_checkShouldWake_wakeup to state machine sequencer.
friend class FpySequencerTesterBase
Friend class tester to support autocoded test harness.
virtual void directive_goto_internalInterfaceHandler(const Svc::FpySequencer_GotoDirective &directive)=0
Internal interface handler for directive_goto.
void directive_if_internalInterfaceInvoke(const Svc::FpySequencer_IfDirective &directive)
Internal interface base-class function for directive_if.
virtual void directive_storeRel_internalInterfaceHandler(const Svc::FpySequencer_StoreRelDirective &directive)=0
Internal interface handler for directive_storeRel.
void sequencer_sendSignal_result_success()
Send signal result_success to state machine sequencer.
void cmdResponseIn_handlerBase(FwIndexType portNum, FwOpcodeType opCode, U32 cmdSeq, const Fw::CmdResponse &response)
Handler base-class function for input port cmdResponseIn.
void sequencer_sendSignal_stmtResponse_success()
Send signal stmtResponse_success to state machine sequencer.
virtual ~FpySequencerComponentBase()
Destroy FpySequencerComponentBase object.
virtual void directive_setFlag_internalInterfaceHandler(const Svc::FpySequencer_SetFlagDirective &directive)=0
Internal interface handler for directive_setFlag.
void log_WARNING_LO_CmdResponseWhileNotRunningSequence(I32 state, FwOpcodeType opcode, Fw::CmdResponse response) const
Log event CmdResponseWhileNotRunningSequence.
void tlmWrite_Debug_StackSize(Svc::Fpy::StackSizeType arg, Fw::Time _tlmTime=Fw::Time())
virtual void SET_BREAKPOINT_cmdHandler(FwOpcodeType opCode, U32 cmdSeq, U32 stmtIdx, bool breakOnce)=0
virtual void directive_stackOp_internalInterfaceHandler(const Svc::FpySequencer_StackOpDirective &directive)=0
Internal interface handler for directive_stackOp.
void sequencer_sendSignal_cmd_VALIDATE(const Svc::FpySequencer_SequenceExecutionArgs &value)
Send signal cmd_VALIDATE to state machine sequencer.
void directive_noOp_internalInterfaceInvoke(const Svc::FpySequencer_NoOpDirective &directive)
Internal interface base-class function for directive_noOp.
static constexpr FwIndexType getNum_tlmWrite_InputPorts()
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 log_WARNING_HI_FileReadError(Svc::FpySequencer_FileReadStage readStage, const Fw::StringBase &filePath, I32 errorCode) const
Log event FileReadError.
void set_logOut_OutputPort(FwIndexType portNum, Fw::InputLogPort *port)
Connect port to logOut[portNum].
virtual void DUMP_STACK_TO_FILE_cmdHandler(FwOpcodeType opCode, U32 cmdSeq, const Fw::CmdStringArg &fileName)=0
void tlmWrite_State(FwEnumStoreType arg, Fw::Time _tlmTime=Fw::Time())
void tlmWrite_SequencesSucceeded(U64 arg, Fw::Time _tlmTime=Fw::Time())
void log_WARNING_HI_ExtraBytesInSequence(FwSizeType remaining) const
Log event ExtraBytesInSequence.
virtual void Svc_FpySequencer_SequencerStateMachine_action_clearSequenceFile(SmId smId, Svc_FpySequencer_SequencerStateMachine::Signal signal)=0
void directive_allocate_internalInterfaceInvoke(const Svc::FpySequencer_AllocateDirective &directive)
Internal interface base-class function for directive_allocate.
pops bytes off the top of the stack and does nothing with them
void directive_storeRelConstOffset_internalInterfaceInvoke(const Svc::FpySequencer_StoreRelConstOffsetDirective &directive)
Internal interface base-class function for directive_storeRelConstOffset.
static constexpr FwIndexType getNum_timeCaller_OutputPorts()
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.
virtual void STEP_cmdHandler(FwOpcodeType opCode, U32 cmdSeq)=0
void directive_pushTlmValAndTime_internalInterfaceInvoke(const Svc::FpySequencer_PushTlmValAndTimeDirective &directive)
Internal interface base-class function for directive_pushTlmValAndTime.
void directive_stackCmd_internalInterfaceInvoke(const Svc::FpySequencer_StackCmdDirective &directive)
Internal interface base-class function for directive_stackCmd.
void log_WARNING_HI_TooManySequenceDirectives(U16 count, U16 max) const
Log event TooManySequenceDirectives.
bool isConnected_seqStartOut_OutputPort(FwIndexType portNum)
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_cmd_BREAK()
Send signal cmd_BREAK to state machine sequencer.
void sequencer_sendSignal_result_dispatchStatement_failure()
Send signal result_dispatchStatement_failure to state machine sequencer.
void log_WARNING_HI_DirectiveDeserializeError(U8 opcode, U32 stmtIdx, I32 errorCode, U64 buffLeft, U64 buffLength) const
Log event DirectiveDeserializeError.
virtual void pingIn_handler(FwIndexType portNum, U32 key)=0
Handler for input port pingIn.
Svc::InputSchedPort * get_checkTimers_InputPort(FwIndexType portNum)
virtual void STEP_preMsgHook(FwOpcodeType opCode, U32 cmdSeq)
Pre-message hook for command STEP.
void RUN_VALIDATED_cmdHandlerBase(FwOpcodeType opCode, U32 cmdSeq, Fw::CmdArgBuffer &args)
void tlmWrite_PRM_STATEMENT_TIMEOUT_SECS(F32 arg, Fw::Time _tlmTime=Fw::Time())
void init()
Object initializer.
Definition: ObjBase.cpp:24
void set_pingOut_OutputPort(FwIndexType portNum, Svc::InputPingPort *port)
Connect port to pingOut[portNum].
static constexpr FwIndexType getNum_tlmOut_OutputPorts()
void seqStartOut_out(FwIndexType portNum, const Fw::StringBase &filename)
Invoke output port seqStartOut.
virtual void directive_allocate_internalInterfaceHandler(const Svc::FpySequencer_AllocateDirective &directive)=0
Internal interface handler for directive_allocate.
static constexpr FwIndexType getNum_pingOut_OutputPorts()
Svc_FpySequencer_SequencerStateMachine::State sequencer_getState() const
Get the state of state machine instance sequencer.
void set_getTlmChan_OutputPort(FwIndexType portNum, Fw::InputTlmGetPort *port)
Connect port to getTlmChan[portNum].
float F32
32-bit floating point
Definition: BasicTypes.h:83
virtual bool Svc_FpySequencer_SequencerStateMachine_guard_shouldBreak(SmId smId, Svc_FpySequencer_SequencerStateMachine::Signal signal) const =0
virtual void checkTimers_handler(FwIndexType portNum, U32 context)=0
Handler for input port checkTimers.
bool isConnected_timeCaller_OutputPort(FwIndexType portNum)
static constexpr FwIndexType getNum_getParam_OutputPorts()
static constexpr FwIndexType getNum_cmdRegOut_OutputPorts()
void log_WARNING_HI_WrongCmdResponseOpcode(FwOpcodeType opcode, Fw::CmdResponse response, FwOpcodeType expectedOpcode) const
Log event WrongCmdResponseOpcode.
void tlmWrite_StatementsFailed(U64 arg, Fw::Time _tlmTime=Fw::Time())
Must be called after VALIDATE. Runs the sequence that was validated.
loads a value from a local variable at a compile-time-known offset relative to the current stack fram...
void regCommands()
Register commands with the Command Dispatcher.
void directive_loadAbs_internalInterfaceInvoke(const Svc::FpySequencer_LoadAbsDirective &directive)
Internal interface base-class function for directive_loadAbs.
F32 paramGet_STATEMENT_TIMEOUT_SECS(Fw::ParamValid &valid)
pop two byte arrays off the top of the stack, call memcmp, push 1 if they were equal, 0 otherwise
void cmdResponse_out(FwOpcodeType opCode, U32 cmdSeq, Fw::CmdResponse response)
Emit command response.
void directive_memCmp_internalInterfaceInvoke(const Svc::FpySequencer_MemCmpDirective &directive)
Internal interface base-class function for directive_memCmp.
void directive_pushTime_internalInterfaceInvoke(const Svc::FpySequencer_PushTimeDirective &directive)
Internal interface base-class function for directive_pushTime.
void tlmWrite_DirectiveErrorId(const Svc::Fpy::DirectiveId &arg, Fw::Time _tlmTime=Fw::Time())
static constexpr FwIndexType getNum_cmdResponseIn_InputPorts()
Svc::InputPingPort * get_pingIn_InputPort(FwIndexType portNum)
void tlmWrite_Debug_NextCmdOpcode(FwOpcodeType arg, Fw::Time _tlmTime=Fw::Time())
void tlmWrite_handlerBase(FwIndexType portNum, U32 context)
Handler base-class function for input port tlmWrite.
bool isConnected_prmSet_OutputPort(FwIndexType portNum)
virtual void SET_FLAG_cmdHandler(FwOpcodeType opCode, U32 cmdSeq, Svc::Fpy::FlagId flag, bool value)=0
virtual void directive_constCmd_internalInterfaceHandler(const Svc::FpySequencer_ConstCmdDirective &directive)=0
Internal interface handler for directive_constCmd.
Fw::InputCmdPort * get_cmdIn_InputPort(FwIndexType portNum)
void pingIn_handlerBase(FwIndexType portNum, U32 key)
Handler base-class function for input port pingIn.
stores a value to an absolute address in the stack (for global variables), const offset ...
void set_timeCaller_OutputPort(FwIndexType portNum, Fw::InputTimePort *port)
Connect port to timeCaller[portNum].
friend class FpySequencerTester
Test implementation for the enclosing component.
void SET_FLAG_cmdHandlerBase(FwOpcodeType opCode, U32 cmdSeq, Fw::CmdArgBuffer &args)
virtual void Svc_FpySequencer_SequencerStateMachine_action_dispatchStatement(SmId smId, Svc_FpySequencer_SequencerStateMachine::Signal signal)=0
virtual void directive_pushVal_internalInterfaceHandler(const Svc::FpySequencer_PushValDirective &directive)=0
Internal interface handler for directive_pushVal.
void sequencer_sendSignal_cmd_RUN_VALIDATED(const Svc::FpySequencer_SequenceExecutionArgs &value)
Send signal cmd_RUN_VALIDATED to state machine sequencer.
virtual void Svc_FpySequencer_SequencerStateMachine_action_clearBreakpoint(SmId smId, Svc_FpySequencer_SequencerStateMachine::Signal signal)=0
virtual void BREAK_cmdHandler(FwOpcodeType opCode, U32 cmdSeq)=0
Svc_FpySequencer_SequencerStateMachine(FpySequencerComponentBase &component)
Constructor.
FwIdType FwChanIdType
The type of a telemetry channel identifier.
void log_WARNING_HI_EndOfFileError(Svc::FpySequencer_FileReadStage readStage, const Fw::StringBase &filePath) const
Log event EndOfFileError.
void set_cmdResponseOut_OutputPort(FwIndexType portNum, Fw::InputCmdResponsePort *port)
Connect port to cmdResponseOut[portNum].
void log_WARNING_LO_CmdResponseFromOldSequence(FwOpcodeType opcode, Fw::CmdResponse response, U16 oldSequenceIdx, U16 currentSequenceIdx) const
Log event CmdResponseFromOldSequence.
virtual void directive_getFlag_internalInterfaceHandler(const Svc::FpySequencer_GetFlagDirective &directive)=0
Internal interface handler for directive_getFlag.
FpySequencerComponentBase(const char *compName="")
Construct FpySequencerComponentBase object.
virtual void directive_call_internalInterfaceHandler(const Svc::FpySequencer_CallDirective &directive)=0
Internal interface handler for directive_call.
virtual void CONTINUE_cmdHandler(FwOpcodeType opCode, U32 cmdSeq)=0
void sequencer_sendSignal_checkTimersIn()
Send signal checkTimersIn to state machine sequencer.
void tlmWrite_StatementsDispatched(U64 arg, Fw::Time _tlmTime=Fw::Time())
void tlmWrite_LastDirectiveError(const Svc::Fpy::DirectiveErrorCode &arg, Fw::Time _tlmTime=Fw::Time())
void VALIDATE_cmdHandlerBase(FwOpcodeType opCode, U32 cmdSeq, Fw::CmdArgBuffer &args)
virtual void directive_discard_internalInterfaceHandler(const Svc::FpySequencer_DiscardDirective &directive)=0
Internal interface handler for directive_discard.
static constexpr FwIndexType getNum_prmSet_OutputPorts()
virtual void seqRunIn_preMsgHook(FwIndexType portNum, const Fw::StringBase &filename)
Pre-message hook for async input port seqRunIn.
void directive_setFlag_internalInterfaceInvoke(const Svc::FpySequencer_SetFlagDirective &directive)
Internal interface base-class function for directive_setFlag.
bool isConnected_getParam_OutputPort(FwIndexType portNum)
Implementation of state machine Svc_FpySequencer_SequencerStateMachine.
peeks at N bytes from the stack, starting from an offset relative to the top of the stack ...
void sequencer_sendSignal_stmtResponse_failure()
Send signal stmtResponse_failure to state machine sequencer.
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 directive_peek_internalInterfaceInvoke(const Svc::FpySequencer_PeekDirective &directive)
Internal interface base-class function for directive_peek.
void set_cmdRegOut_OutputPort(FwIndexType portNum, Fw::InputCmdRegPort *port)
Connect port to cmdRegOut[portNum].
void tlmWrite_Debug_NextStatementIndex(U32 arg, Fw::Time _tlmTime=Fw::Time())
void log_WARNING_HI_CommandFailed(FwOpcodeType opCode, U32 stmtIdx, const Fw::StringBase &filePath, Fw::CmdResponse response) const
Log event CommandFailed.
void sequencer_sendSignal_stmtResponse_beginSleep()
Send signal stmtResponse_beginSleep to state machine sequencer.
void log_WARNING_HI_CommandTimedOut(FwOpcodeType opCode, U32 stmtIdx, const Fw::StringBase &filePath) const
Log event CommandTimedOut.
void sequencer_sendSignal_result_checkStatementTimeout_noTimeout()
Send signal result_checkStatementTimeout_noTimeout to state machine sequencer.
static constexpr FwIndexType getNum_seqRunIn_InputPorts()
virtual void tlmWrite_handler(FwIndexType portNum, U32 context)=0
Handler for input port tlmWrite.
Svc::InputCmdSeqInPort * get_seqRunIn_InputPort(FwIndexType portNum)
virtual void directive_memCmp_internalInterfaceHandler(const Svc::FpySequencer_MemCmpDirective &directive)=0
Internal interface handler for directive_memCmp.
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_InvalidSeqRunCall(I32 state) const
Log event InvalidSeqRunCall.
virtual void directive_if_internalInterfaceHandler(const Svc::FpySequencer_IfDirective &directive)=0
Internal interface handler for directive_if.
void directive_getField_internalInterfaceInvoke(const Svc::FpySequencer_GetFieldDirective &directive)
Internal interface base-class function for directive_getField.
static constexpr FwIndexType getNum_cmdOut_OutputPorts()
virtual void Svc_FpySequencer_SequencerStateMachine_action_setGoalState_VALID(SmId smId, Svc_FpySequencer_SequencerStateMachine::Signal signal)=0
sleeps for a relative duration from the current time
bool isConnected_seqDoneOut_OutputPort(FwIndexType portNum)
virtual void directive_storeRelConstOffset_internalInterfaceHandler(const Svc::FpySequencer_StoreRelConstOffsetDirective &directive)=0
Internal interface handler for directive_storeRelConstOffset.
void directive_discard_internalInterfaceInvoke(const Svc::FpySequencer_DiscardDirective &directive)
Internal interface base-class function for directive_discard.
uint8_t U8
8-bit unsigned integer
Definition: BasicTypes.h:53
virtual void directive_noOp_internalInterfaceHandler(const Svc::FpySequencer_NoOpDirective &directive)=0
Internal interface handler for directive_noOp.
void log_ACTIVITY_HI_BreakpointSet(U32 breakpointIdx, bool breakOnce) const
Log event BreakpointSet.
void directive_pushPrm_internalInterfaceInvoke(const Svc::FpySequencer_PushPrmDirective &directive)
Internal interface base-class function for directive_pushPrm.
void sequencer_sendSignal_result_timeOpFailed()
Send signal result_timeOpFailed to state machine sequencer.
void BREAK_cmdHandlerBase(FwOpcodeType opCode, U32 cmdSeq, Fw::CmdArgBuffer &args)
void seqDoneOut_out(FwIndexType portNum, FwOpcodeType opCode, U32 cmdSeq, const Fw::CmdResponse &response)
Invoke output port seqDoneOut.
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].
the default value of the EXIT_ON_CMD_FAIL sequence flag
virtual void Svc_FpySequencer_SequencerStateMachine_action_setSequenceBlockState(SmId smId, Svc_FpySequencer_SequencerStateMachine::Signal signal, const Svc::FpySequencer_SequenceExecutionArgs &value)=0
virtual void seqRunIn_handler(FwIndexType portNum, const Fw::StringBase &filename)=0
Handler for input port seqRunIn.
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.
static constexpr FwIndexType getNum_cmdResponseOut_OutputPorts()
void sequencer_sendSignal_stmtResponse_keepWaiting()
Send signal stmtResponse_keepWaiting 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 tlmWrite_BreakBeforeNextLine(bool arg, Fw::Time _tlmTime=Fw::Time())
virtual void directive_storeAbs_internalInterfaceHandler(const Svc::FpySequencer_StoreAbsDirective &directive)=0
Internal interface handler for directive_storeAbs.
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 log_ACTIVITY_HI_BreakpointCleared() const
Log event BreakpointCleared.
static constexpr FwIndexType getNum_getTlmChan_OutputPorts()
virtual void directive_getField_internalInterfaceHandler(const Svc::FpySequencer_GetFieldDirective &directive)=0
Internal interface handler for directive_getField.
void pingOut_out(FwIndexType portNum, U32 key)
Invoke output port pingOut.
virtual void directive_loadRel_internalInterfaceHandler(const Svc::FpySequencer_LoadRelDirective &directive)=0
Internal interface handler for directive_loadRel.
bool isConnected_cmdOut_OutputPort(FwIndexType portNum)
void tlmWrite_SequencesFailed(U64 arg, Fw::Time _tlmTime=Fw::Time())
void log_WARNING_HI_FileReadDeserializeError(Svc::FpySequencer_FileReadStage readStage, const Fw::StringBase &filePath, I32 errorCode, U64 buffLeft, U64 buffLength) const
Log event FileReadDeserializeError.
loads a value from an absolute address in the stack (for global variables)
bool isConnected_logOut_OutputPort(FwIndexType portNum)
void tlmWrite_SeqPath(const Fw::StringBase &arg, Fw::Time _tlmTime=Fw::Time())
virtual void SET_BREAKPOINT_preMsgHook(FwOpcodeType opCode, U32 cmdSeq)
Pre-message hook for command SET_BREAKPOINT.
PlatformIndexType FwIndexType
void directive_constCmd_internalInterfaceInvoke(const Svc::FpySequencer_ConstCmdDirective &directive)
Internal interface base-class function for directive_constCmd.
virtual void VALIDATE_preMsgHook(FwOpcodeType opCode, U32 cmdSeq)
Pre-message hook for command VALIDATE.
static constexpr FwIndexType getNum_checkTimers_InputPorts()
bool isConnected_prmGet_OutputPort(FwIndexType portNum)
void log_WARNING_HI_MismatchedTimeContext(I32 internalTimeContext, I32 otherTimeContext) const
Log event MismatchedTimeContext.
virtual void Svc_FpySequencer_SequencerStateMachine_action_clearBreakBeforeNextLine(SmId smId, Svc_FpySequencer_SequencerStateMachine::Signal signal)=0
void directive_return_internalInterfaceInvoke(const Svc::FpySequencer_ReturnDirective &directive)
Internal interface base-class function for directive_return.
Svc::InputSchedPort * get_tlmWrite_InputPort(FwIndexType portNum)
void log_WARNING_HI_WrongSchemaVersion(U8 expected, U8 actual) const
Log event WrongSchemaVersion.
virtual void Svc_FpySequencer_SequencerStateMachine_action_report_seqBroken(SmId smId, Svc_FpySequencer_SequencerStateMachine::Signal signal)=0
void directive_getFlag_internalInterfaceInvoke(const Svc::FpySequencer_GetFlagDirective &directive)
Internal interface base-class function for directive_getFlag.
void cmdOut_out(FwIndexType portNum, Fw::ComBuffer &data, U32 context)
Invoke output port cmdOut.
virtual void Svc_FpySequencer_SequencerStateMachine_action_setBreakBeforeNextLine(SmId smId, Svc_FpySequencer_SequencerStateMachine::Signal signal)=0
void sequencer_sendSignal_cmd_CLEAR_BREAKPOINT()
Send signal cmd_CLEAR_BREAKPOINT to state machine sequencer.
Svc::FpySequencer_SequencerStateMachine_State State
The state type.
void log_WARNING_HI_UnknownSequencerDirective(U8 opcode, U32 stmtIdx, const Fw::StringBase &filePath) const
Log event UnknownSequencerDirective.
virtual void VALIDATE_cmdHandler(FwOpcodeType opCode, U32 cmdSeq, const Fw::CmdStringArg &fileName)=0
stores a value to a local variable at a runtime-determined offset relative to the current stack frame...
virtual void directive_return_internalInterfaceHandler(const Svc::FpySequencer_ReturnDirective &directive)=0
Internal interface handler for directive_return.
virtual void Svc_FpySequencer_SequencerStateMachine_action_report_seqSucceeded(SmId smId, Svc_FpySequencer_SequencerStateMachine::Signal signal)=0
virtual void BREAK_preMsgHook(FwOpcodeType opCode, U32 cmdSeq)
Pre-message hook for command BREAK.
void tlmWrite_DirectiveErrorIndex(U64 arg, Fw::Time _tlmTime=Fw::Time())
RateGroupDivider component implementation.
void log_WARNING_HI_CmdResponseWhileNotAwaiting(FwOpcodeType opcode, Fw::CmdResponse response) const
Log event CmdResponseWhileNotAwaiting.
virtual void Svc_FpySequencer_SequencerStateMachine_action_setGoalState_RUNNING(SmId smId, Svc_FpySequencer_SequencerStateMachine::Signal signal)=0
bool isConnected_cmdRegOut_OutputPort(FwIndexType portNum)
void log_WARNING_HI_CmdResponseWhileAwaitingDirective(FwOpcodeType opcode, Fw::CmdResponse response, U8 expectedDirectiveOpcode) const
Log event CmdResponseWhileAwaitingDirective.
virtual void cmdResponseIn_preMsgHook(FwIndexType portNum, FwOpcodeType opCode, U32 cmdSeq, const Fw::CmdResponse &response)
Pre-message hook for async input port cmdResponseIn.
void seqRunIn_handlerBase(FwIndexType portNum, const Fw::StringBase &filename)
Handler base-class function for input port seqRunIn.
Enum representing parameter validity.
virtual void Svc_FpySequencer_SequencerStateMachine_action_setBreakpoint(SmId smId, Svc_FpySequencer_SequencerStateMachine::Signal signal, const Svc::FpySequencer_BreakpointArgs &value)=0
void log_WARNING_HI_TooManySequenceArgs(U8 count, U8 max) const
Log event TooManySequenceArgs.
void sequencer_sendSignal_cmd_CONTINUE()
Send signal cmd_CONTINUE to state machine sequencer.
void directive_storeAbs_internalInterfaceInvoke(const Svc::FpySequencer_StoreAbsDirective &directive)
Internal interface base-class function for directive_storeAbs.
void DUMP_STACK_TO_FILE_cmdHandlerBase(FwOpcodeType opCode, U32 cmdSeq, Fw::CmdArgBuffer &args)
friend class FpySequencerTester
Friend class tester implementation to support white-box testing.
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 CONTINUE_preMsgHook(FwOpcodeType opCode, U32 cmdSeq)
Pre-message hook for command CONTINUE.
virtual void checkTimers_preMsgHook(FwIndexType portNum, U32 context)
Pre-message hook for async input port checkTimers.
Loads, validates and runs a sequence.
void sequencer_sendSignal_entered()
Send signal entered to state machine sequencer.
void directive_call_internalInterfaceInvoke(const Svc::FpySequencer_CallDirective &directive)
Internal interface base-class function for directive_call.
void directive_exit_internalInterfaceInvoke(const Svc::FpySequencer_ExitDirective &directive)
Internal interface base-class function for directive_exit.
virtual void Svc_FpySequencer_SequencerStateMachine_action_checkShouldWake(SmId smId, Svc_FpySequencer_SequencerStateMachine::Signal signal)=0
Fw::ParamValid getParam_out(FwIndexType portNum, FwPrmIdType id, Fw::ParamBuffer &val)
Invoke output port getParam.
void directive_storeAbsConstOffset_internalInterfaceInvoke(const Svc::FpySequencer_StoreAbsConstOffsetDirective &directive)
Internal interface base-class function for directive_storeAbsConstOffset.
FpySequencerComponentBase::SmId getId() const
Get the state machine id.
pushes the current Fw.Time struct to the stack
void log_ACTIVITY_HI_SequenceDone(const Fw::StringBase &filePath) const
Log event SequenceDone.
void directive_goto_internalInterfaceInvoke(const Svc::FpySequencer_GotoDirective &directive)
Internal interface base-class function for directive_goto.
static constexpr FwIndexType getNum_seqDoneOut_OutputPorts()
void directive_waitRel_internalInterfaceInvoke(const Svc::FpySequencer_WaitRelDirective &directive)
Internal interface base-class function for directive_waitRel.
virtual void directive_pushTlmValAndTime_internalInterfaceHandler(const Svc::FpySequencer_PushTlmValAndTimeDirective &directive)=0
Internal interface handler for directive_pushTlmValAndTime.
void directive_storeRel_internalInterfaceInvoke(const Svc::FpySequencer_StoreRelDirective &directive)
Internal interface base-class function for directive_storeRel.
virtual void directive_pushTlmVal_internalInterfaceHandler(const Svc::FpySequencer_PushTlmValDirective &directive)=0
Internal interface handler for directive_pushTlmVal.
virtual bool Svc_FpySequencer_SequencerStateMachine_guard_goalStateIs_RUNNING(SmId smId, Svc_FpySequencer_SequencerStateMachine::Signal signal) const =0
void SET_BREAKPOINT_cmdHandlerBase(FwOpcodeType opCode, U32 cmdSeq, Fw::CmdArgBuffer &args)
Writes the contents of the stack to a file. This command is only valid in the RUNNING.PAUSED state.
void directive_loadRel_internalInterfaceInvoke(const Svc::FpySequencer_LoadRelDirective &directive)
Internal interface base-class function for directive_loadRel.
Auto-generated base for FpySequencer component.
static constexpr FwIndexType getNum_logOut_OutputPorts()
void sequencer_sendSignal_cmd_RUN(const Svc::FpySequencer_SequenceExecutionArgs &value)
Send signal cmd_RUN to state machine sequencer.
void log_WARNING_HI_FileWriteError(FwSizeType writeSize, const Fw::StringBase &filePath, I32 errorCode) const
Log event FileWriteError.
virtual void directive_storeAbsConstOffset_internalInterfaceHandler(const Svc::FpySequencer_StoreAbsConstOffsetDirective &directive)=0
Internal interface handler for directive_storeAbsConstOffset.
void checkTimers_handlerBase(FwIndexType portNum, U32 context)
Handler base-class function for input port checkTimers.
static constexpr FwIndexType getNum_prmGet_OutputPorts()
pops a bool off the stack, sets a flag with a specific index to that bool
virtual void CANCEL_preMsgHook(FwOpcodeType opCode, U32 cmdSeq)
Pre-message hook for command CANCEL.
void tlmWrite_BreakOnlyOnceOnBreakpoint(bool arg, Fw::Time _tlmTime=Fw::Time())
bool isConnected_getTlmChan_OutputPort(FwIndexType portNum)
void log_WARNING_HI_WrongCmdResponseIndex(FwOpcodeType opcode, Fw::CmdResponse response, U16 actualCmdIdx, U16 expectedCmdIdx) const
Log event WrongCmdResponseIndex.
gets a flag and pushes its value as a U8 to the stack
void tlmWrite_SequencesCancelled(U64 arg, Fw::Time _tlmTime=Fw::Time())
virtual void directive_loadAbs_internalInterfaceHandler(const Svc::FpySequencer_LoadAbsDirective &directive)=0
Internal interface handler for directive_loadAbs.
void tlmWrite_BreakpointInUse(bool arg, Fw::Time _tlmTime=Fw::Time())
virtual void Svc_FpySequencer_SequencerStateMachine_action_report_seqCancelled(SmId smId, Svc_FpySequencer_SequencerStateMachine::Signal signal)=0
friend class FpySequencerTesterBase
Autocoded test harness for the enclosing component.
void set_prmGet_OutputPort(FwIndexType portNum, Fw::InputPrmGetPort *port)
Connect port to prmGet[portNum].
void set_getParam_OutputPort(FwIndexType portNum, Fw::InputPrmGetPort *port)
Connect port to getParam[portNum].
void CLEAR_BREAKPOINT_cmdHandlerBase(FwOpcodeType opCode, U32 cmdSeq, Fw::CmdArgBuffer &args)
U32 StackSizeType
the type which everything referencing a size or offset on the stack is represented in ...
bool paramGet_FLAG_DEFAULT_EXIT_ON_CMD_FAIL(Fw::ParamValid &valid)
void tlmWrite_BreakpointIndex(U32 arg, Fw::Time _tlmTime=Fw::Time())
#define U64(C)
Definition: sha.h:181
void tlmWrite_Debug_NextStatementReadSuccess(bool arg, Fw::Time _tlmTime=Fw::Time())