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
25 #if !FW_DIRECT_PORT_CALLS
27 #endif
28 #if !FW_DIRECT_PORT_CALLS
30 #endif
31 #include "Fw/Prm/PrmGetPortAc.hpp"
32 #include "Fw/Prm/PrmSetPortAc.hpp"
33 #include "Fw/Prm/PrmString.hpp"
34 #include "Fw/Time/TimePortAc.hpp"
35 #include "Fw/Tlm/TlmGetPortAc.hpp"
36 #include "Fw/Tlm/TlmPortAc.hpp"
37 #include "Fw/Tlm/TlmString.hpp"
39 #include "Os/Mutex.hpp"
77 #include "Svc/Ping/PingPortAc.hpp"
89 
90 namespace Svc {
91 
98  {
99 
100  // ----------------------------------------------------------------------
101  // Friend classes
102  // ----------------------------------------------------------------------
103 
107  friend class FpySequencerTester;
108 
109  protected:
110 
111  // ----------------------------------------------------------------------
112  // Constants
113  // ----------------------------------------------------------------------
114 
116  enum {
118  };
119 
121  enum {
128  };
129 
131  enum {
140  };
141 
143  enum {
150  };
151 
153  enum {
154  OPCODE_RUN = 0x0,
160  OPCODE_SET_BREAKPOINT = 0x6,
162  OPCODE_BREAK = 0x7,
166  OPCODE_CONTINUE = 0x8,
171  OPCODE_STEP = 0xa,
177  };
178 
180  enum {
223  };
224 
226  enum {
248  };
249 
251  enum {
253  };
257 
259  enum class SmId : FwEnumStoreType {
260  sequencer,
261  };
262 
263  protected:
264 
265  // ----------------------------------------------------------------------
266  // Types for internal state machines
267  // ----------------------------------------------------------------------
268 
272  {
273 
274  // ----------------------------------------------------------------------
275  // Friend classes
276  // ----------------------------------------------------------------------
277 
281  friend class FpySequencerTester;
282 
283  public:
284 
287  FpySequencerComponentBase& component
288  );
289 
290  public:
291 
293  void init(
295  );
296 
297  public:
298 
301 
302  private:
303 
305  void action_signalEntered(
306  Signal signal
307  );
308 
310  void action_setSequenceFilePath(
311  Signal signal,
313  );
314 
316  void action_setSequenceBlockState(
317  Signal signal,
319  );
320 
322  void action_setSequenceArguments(
323  Signal signal,
325  );
326 
328  void action_validate(
329  Signal signal
330  );
331 
333  void action_report_seqSucceeded(
334  Signal signal
335  );
336 
338  void action_report_seqCancelled(
339  Signal signal
340  );
341 
343  void action_report_seqFailed(
344  Signal signal
345  );
346 
348  void action_report_seqStarted(
349  Signal signal
350  );
351 
353  void action_setGoalState_RUNNING(
354  Signal signal
355  );
356 
358  void action_setGoalState_VALID(
359  Signal signal
360  );
361 
363  void action_setGoalState_IDLE(
364  Signal signal
365  );
366 
368  void action_sendCmdResponse_OK(
369  Signal signal
370  );
371 
373  void action_sendCmdResponse_EXECUTION_ERROR(
374  Signal signal
375  );
376 
378  void action_clearSequenceFile(
379  Signal signal
380  );
381 
383  void action_clearBreakpoint(
384  Signal signal
385  );
386 
388  void action_clearSequenceArguments(
389  Signal signal
390  );
391 
393  void action_checkShouldWake(
394  Signal signal
395  );
396 
398  void action_dispatchStatement(
399  Signal signal
400  );
401 
403  void action_resetRuntime(
404  Signal signal
405  );
406 
408  void action_checkStatementTimeout(
409  Signal signal
410  );
411 
413  void action_incrementSequenceCounter(
414  Signal signal
415  );
416 
418  void action_pushArgsToStack(
419  Signal signal
420  );
421 
423  void action_report_seqBroken(
424  Signal signal
425  );
426 
428  void action_setBreakpoint(
429  Signal signal,
431  );
432 
434  void action_setBreakBeforeNextLine(
435  Signal signal
436  );
437 
439  void action_clearBreakBeforeNextLine(
440  Signal signal
441  );
442 
443  private:
444 
446  bool guard_goalStateIs_RUNNING(
447  Signal signal
448  ) const;
449 
451  bool guard_shouldBreak(
452  Signal signal
453  ) const;
454 
456  bool guard_breakOnce(
457  Signal signal
458  ) const;
459 
460  private:
461 
463  FpySequencerComponentBase& m_component;
464 
465  };
466 
467  public:
468 
469  // ----------------------------------------------------------------------
470  // Component initialization
471  // ----------------------------------------------------------------------
472 
474  void init(
475  FwSizeType queueDepth,
476  FwEnumStoreType instance = 0
477  );
478 
479 #if !FW_DIRECT_PORT_CALLS
480 
481  public:
482 
483  // ----------------------------------------------------------------------
484  // Getters for special input ports
485  // ----------------------------------------------------------------------
486 
491  FwIndexType portNum
492  );
493 
494 #endif
495 
496 #if !FW_DIRECT_PORT_CALLS
497 
498  public:
499 
500  // ----------------------------------------------------------------------
501  // Getters for typed input ports
502  // ----------------------------------------------------------------------
503 
508  FwIndexType portNum
509  );
510 
515  FwIndexType portNum
516  );
517 
522  FwIndexType portNum
523  );
524 
529  FwIndexType portNum
530  );
531 
536  FwIndexType portNum
537  );
538 
543  FwIndexType portNum
544  );
545 
546 #endif
547 
548 #if !FW_DIRECT_PORT_CALLS
549 
550  public:
551 
552  // ----------------------------------------------------------------------
553  // Connect input ports to special output ports
554  // ----------------------------------------------------------------------
555 
558  FwIndexType portNum,
559  Fw::InputCmdRegPort* port
560  );
561 
564  FwIndexType portNum,
566  );
567 
570  FwIndexType portNum,
571  Fw::InputLogPort* port
572  );
573 
574 #if FW_ENABLE_TEXT_LOGGING == 1
575 
577  void set_logTextOut_OutputPort(
578  FwIndexType portNum,
579  Fw::InputLogTextPort* port
580  );
581 
582 #endif
583 
586  FwIndexType portNum,
587  Fw::InputPrmGetPort* port
588  );
589 
592  FwIndexType portNum,
593  Fw::InputPrmSetPort* port
594  );
595 
598  FwIndexType portNum,
599  Fw::InputTimePort* port
600  );
601 
604  FwIndexType portNum,
605  Fw::InputTlmPort* port
606  );
607 
608 #endif
609 
610 #if !FW_DIRECT_PORT_CALLS
611 
612  public:
613 
614  // ----------------------------------------------------------------------
615  // Connect typed input ports to typed output ports
616  // ----------------------------------------------------------------------
617 
620  FwIndexType portNum,
621  Fw::InputComPort* port
622  );
623 
626  FwIndexType portNum,
627  Fw::InputPrmGetPort* port
628  );
629 
632  FwIndexType portNum,
633  Fw::InputTlmGetPort* port
634  );
635 
638  FwIndexType portNum,
639  Svc::InputPingPort* port
640  );
641 
644  FwIndexType portNum,
646  );
647 
650  FwIndexType portNum,
652  );
653 
654 #endif
655 
656 #if !FW_DIRECT_PORT_CALLS && FW_PORT_SERIALIZATION
657 
658  public:
659 
660  // ----------------------------------------------------------------------
661  // Connect serial input ports to special output ports
662  // ----------------------------------------------------------------------
663 
666  FwIndexType portNum,
667  Fw::InputSerializePort* port
668  );
669 
672  FwIndexType portNum,
673  Fw::InputSerializePort* port
674  );
675 
678  FwIndexType portNum,
679  Fw::InputSerializePort* port
680  );
681 
682 #if FW_ENABLE_TEXT_LOGGING == 1
683 
685  void set_logTextOut_OutputPort(
686  FwIndexType portNum,
687  Fw::InputSerializePort* port
688  );
689 
690 #endif
691 
694  FwIndexType portNum,
695  Fw::InputSerializePort* port
696  );
697 
700  FwIndexType portNum,
701  Fw::InputSerializePort* port
702  );
703 
706  FwIndexType portNum,
707  Fw::InputSerializePort* port
708  );
709 
710 #endif
711 
712 #if !FW_DIRECT_PORT_CALLS && FW_PORT_SERIALIZATION
713 
714  public:
715 
716  // ----------------------------------------------------------------------
717  // Connect serial input ports to typed output ports
718  // ----------------------------------------------------------------------
719 
722  FwIndexType portNum,
723  Fw::InputSerializePort* port
724  );
725 
728  FwIndexType portNum,
729  Fw::InputSerializePort* port
730  );
731 
734  FwIndexType portNum,
735  Fw::InputSerializePort* port
736  );
737 
740  FwIndexType portNum,
741  Fw::InputSerializePort* port
742  );
743 
744 #endif
745 
746  public:
747 
748  // ----------------------------------------------------------------------
749  // Command registration
750  // ----------------------------------------------------------------------
751 
755  void regCommands();
756 
757  public:
758 
759  // ----------------------------------------------------------------------
760  // Parameter loading
761  // ----------------------------------------------------------------------
762 
766  void loadParameters();
767 
768  protected:
769 
770  // ----------------------------------------------------------------------
771  // Component construction and destruction
772  // ----------------------------------------------------------------------
773 
776  const char* compName = ""
777  );
778 
780  virtual ~FpySequencerComponentBase();
781 
782  protected:
783 
784  // ----------------------------------------------------------------------
785  // Getters for numbers of special input ports
786  // ----------------------------------------------------------------------
787 
792  return NUM_CMDIN_INPUT_PORTS;
793  }
794 
795  protected:
796 
797  // ----------------------------------------------------------------------
798  // Getters for numbers of typed input ports
799  // ----------------------------------------------------------------------
800 
806  }
807 
813  }
814 
819  return NUM_PINGIN_INPUT_PORTS;
820  }
821 
827  }
828 
834  }
835 
841  }
842 
843  protected:
844 
845  // ----------------------------------------------------------------------
846  // Getters for numbers of special output ports
847  // ----------------------------------------------------------------------
848 
854  }
855 
861  }
862 
868  }
869 
870 #if FW_ENABLE_TEXT_LOGGING == 1
871 
875  static constexpr FwIndexType getNum_logTextOut_OutputPorts() {
877  }
878 
879 #endif
880 
886  }
887 
893  }
894 
900  }
901 
907  }
908 
909  protected:
910 
911  // ----------------------------------------------------------------------
912  // Getters for numbers of typed output ports
913  // ----------------------------------------------------------------------
914 
920  }
921 
927  }
928 
934  }
935 
941  }
942 
948  }
949 
955  }
956 
957  protected:
958 
959  // ----------------------------------------------------------------------
960  // Connection status queries for special output ports
961  // ----------------------------------------------------------------------
962 
967  FwIndexType portNum
968  ) const;
969 
974  FwIndexType portNum
975  ) const;
976 
981  FwIndexType portNum
982  ) const;
983 
984 #if FW_ENABLE_TEXT_LOGGING == 1
985 
989  bool isConnected_logTextOut_OutputPort(
990  FwIndexType portNum
991  ) const;
992 
993 #endif
994 
999  FwIndexType portNum
1000  ) const;
1001 
1006  FwIndexType portNum
1007  ) const;
1008 
1013  FwIndexType portNum
1014  ) const;
1015 
1020  FwIndexType portNum
1021  ) const;
1022 
1023  protected:
1024 
1025  // ----------------------------------------------------------------------
1026  // Connection status queries for typed output ports
1027  // ----------------------------------------------------------------------
1028 
1033  FwIndexType portNum
1034  ) const;
1035 
1040  FwIndexType portNum
1041  ) const;
1042 
1047  FwIndexType portNum
1048  ) const;
1049 
1054  FwIndexType portNum
1055  ) const;
1056 
1061  FwIndexType portNum
1062  ) const;
1063 
1068  FwIndexType portNum
1069  ) const;
1070 
1071 #if FW_DIRECT_PORT_CALLS
1072  public:
1073 #else
1074  protected:
1075 #endif
1076 
1077  // ----------------------------------------------------------------------
1078  // Port handler base-class functions for special input ports
1079  //
1080  // Call these functions directly to bypass the corresponding ports
1081  // ----------------------------------------------------------------------
1082 
1084  void cmdIn_handlerBase(
1085  FwIndexType portNum,
1086  FwOpcodeType opCode,
1087  U32 cmdSeq,
1088  Fw::CmdArgBuffer& args
1089  );
1090 
1091  protected:
1092 
1093  // ----------------------------------------------------------------------
1094  // Handlers to implement for typed input ports
1095  // ----------------------------------------------------------------------
1096 
1098  virtual void checkTimers_handler(
1099  FwIndexType portNum,
1100  U32 context
1101  ) = 0;
1102 
1104  virtual void cmdResponseIn_handler(
1105  FwIndexType portNum,
1106  FwOpcodeType opCode,
1107  U32 cmdSeq,
1108  const Fw::CmdResponse& response
1109  ) = 0;
1110 
1112  virtual void pingIn_handler(
1113  FwIndexType portNum,
1114  U32 key
1115  ) = 0;
1116 
1118  virtual void seqCancelIn_handler(
1119  FwIndexType portNum
1120  ) = 0;
1121 
1123  virtual void seqRunIn_handler(
1124  FwIndexType portNum,
1125  const Fw::StringBase& filename,
1126  const Svc::SeqArgs& args
1127  ) = 0;
1128 
1130  virtual void tlmWrite_handler(
1131  FwIndexType portNum,
1132  U32 context
1133  ) = 0;
1134 
1135 #if FW_DIRECT_PORT_CALLS
1136  public:
1137 #else
1138  protected:
1139 #endif
1140 
1141  // ----------------------------------------------------------------------
1142  // Port handler base-class functions for typed input ports
1143  //
1144  // Call these functions directly to bypass the corresponding ports
1145  // ----------------------------------------------------------------------
1146 
1149  FwIndexType portNum,
1150  U32 context
1151  );
1152 
1155  FwIndexType portNum,
1156  FwOpcodeType opCode,
1157  U32 cmdSeq,
1158  const Fw::CmdResponse& response
1159  );
1160 
1162  void pingIn_handlerBase(
1163  FwIndexType portNum,
1164  U32 key
1165  );
1166 
1169  FwIndexType portNum
1170  );
1171 
1173  void seqRunIn_handlerBase(
1174  FwIndexType portNum,
1175  const Fw::StringBase& filename,
1176  const Svc::SeqArgs& args
1177  );
1178 
1180  void tlmWrite_handlerBase(
1181  FwIndexType portNum,
1182  U32 context
1183  );
1184 
1185  protected:
1186 
1187  // ----------------------------------------------------------------------
1188  // Pre-message hooks for typed async input ports
1189  //
1190  // Each of these functions is invoked just before processing a message
1191  // on the corresponding port. By default, they do nothing. You can
1192  // override them to provide specific pre-message behavior.
1193  // ----------------------------------------------------------------------
1194 
1196  virtual void checkTimers_preMsgHook(
1197  FwIndexType portNum,
1198  U32 context
1199  );
1200 
1202  virtual void cmdResponseIn_preMsgHook(
1203  FwIndexType portNum,
1204  FwOpcodeType opCode,
1205  U32 cmdSeq,
1206  const Fw::CmdResponse& response
1207  );
1208 
1210  virtual void pingIn_preMsgHook(
1211  FwIndexType portNum,
1212  U32 key
1213  );
1214 
1216  virtual void seqCancelIn_preMsgHook(
1217  FwIndexType portNum
1218  );
1219 
1221  virtual void seqRunIn_preMsgHook(
1222  FwIndexType portNum,
1223  const Fw::StringBase& filename,
1224  const Svc::SeqArgs& args
1225  );
1226 
1228  virtual void tlmWrite_preMsgHook(
1229  FwIndexType portNum,
1230  U32 context
1231  );
1232 
1233  protected:
1234 
1235  // ----------------------------------------------------------------------
1236  // Invocation functions for typed output ports
1237  // ----------------------------------------------------------------------
1238 
1240  void cmdOut_out(
1241  FwIndexType portNum,
1242  Fw::ComBuffer& data,
1243  U32 context
1244  ) const;
1245 
1248  FwIndexType portNum,
1249  FwPrmIdType id,
1250  Fw::ParamBuffer& val
1251  ) const;
1253 
1256  FwIndexType portNum,
1257  FwChanIdType id,
1258  Fw::Time& timeTag,
1259  Fw::TlmBuffer& val
1260  ) const;
1263 
1265  void pingOut_out(
1266  FwIndexType portNum,
1267  U32 key
1268  ) const;
1269 
1271  void seqDoneOut_out(
1272  FwIndexType portNum,
1273  FwOpcodeType opCode,
1274  U32 cmdSeq,
1275  const Fw::CmdResponse& response
1276  ) const;
1277 
1279  void seqStartOut_out(
1280  FwIndexType portNum,
1281  const Fw::StringBase& filename,
1282  const Svc::SeqArgs& args
1283  ) const;
1284 
1285  protected:
1286 
1287  // ----------------------------------------------------------------------
1288  // Internal interface handlers
1289  // ----------------------------------------------------------------------
1290 
1293 
1296 
1299 
1302 
1305 
1308 
1311 
1313  virtual void directive_if_internalInterfaceHandler(const Svc::FpySequencer_IfDirective& directive) = 0;
1314 
1317 
1320 
1323 
1326 
1329 
1332 
1335 
1338 
1341 
1344 
1347 
1350 
1353 
1356 
1359 
1362 
1365 
1368 
1371 
1374 
1375  protected:
1376 
1377  // ----------------------------------------------------------------------
1378  // Internal interface base-class functions
1379  // ----------------------------------------------------------------------
1380 
1383 
1386 
1389 
1392 
1395 
1398 
1401 
1404 
1407 
1410 
1413 
1416 
1419 
1422 
1425 
1428 
1431 
1434 
1437 
1440 
1443 
1446 
1449 
1452 
1455 
1458 
1461 
1464 
1465  protected:
1466 
1467  // ----------------------------------------------------------------------
1468  // State getter functions
1469  // ----------------------------------------------------------------------
1470 
1473 
1474  protected:
1475 
1476  // ----------------------------------------------------------------------
1477  // Signal send functions
1478  // ----------------------------------------------------------------------
1479 
1483  );
1484 
1488  );
1489 
1493  );
1494 
1497 
1500  const Svc::FpySequencer_BreakpointArgs& value
1501  );
1502 
1505 
1508 
1511 
1514 
1517 
1520 
1523 
1526 
1529 
1532 
1535 
1538 
1541 
1544 
1547 
1550 
1553 
1556 
1559 
1562 
1565 
1566  protected:
1567 
1568  // ----------------------------------------------------------------------
1569  // Functions to implement for internal state machine actions
1570  // ----------------------------------------------------------------------
1571 
1576  SmId smId,
1578  ) = 0;
1579 
1584  SmId smId,
1587  ) = 0;
1588 
1593  SmId smId,
1596  ) = 0;
1597 
1602  SmId smId,
1605  ) = 0;
1606 
1611  SmId smId,
1613  ) = 0;
1614 
1619  SmId smId,
1621  ) = 0;
1622 
1627  SmId smId,
1629  ) = 0;
1630 
1635  SmId smId,
1637  ) = 0;
1638 
1643  SmId smId,
1645  ) = 0;
1646 
1651  SmId smId,
1653  ) = 0;
1654 
1659  SmId smId,
1661  ) = 0;
1662 
1667  SmId smId,
1669  ) = 0;
1670 
1675  SmId smId,
1677  ) = 0;
1678 
1683  SmId smId,
1685  ) = 0;
1686 
1691  SmId smId,
1693  ) = 0;
1694 
1699  SmId smId,
1701  ) = 0;
1702 
1707  SmId smId,
1709  ) = 0;
1710 
1715  SmId smId,
1717  ) = 0;
1718 
1723  SmId smId,
1725  ) = 0;
1726 
1731  SmId smId,
1733  ) = 0;
1734 
1739  SmId smId,
1741  ) = 0;
1742 
1747  SmId smId,
1749  ) = 0;
1750 
1755  SmId smId,
1757  ) = 0;
1758 
1763  SmId smId,
1765  ) = 0;
1766 
1771  SmId smId,
1773  const Svc::FpySequencer_BreakpointArgs& value
1774  ) = 0;
1775 
1780  SmId smId,
1782  ) = 0;
1783 
1788  SmId smId,
1790  ) = 0;
1791 
1792  protected:
1793 
1794  // ----------------------------------------------------------------------
1795  // Functions to implement for internal state machine guards
1796  // ----------------------------------------------------------------------
1797 
1802  SmId smId,
1804  ) const = 0;
1805 
1811  SmId smId,
1813  ) const = 0;
1814 
1819  SmId smId,
1821  ) const = 0;
1822 
1823  protected:
1824 
1825  // ----------------------------------------------------------------------
1826  // Command response
1827  // ----------------------------------------------------------------------
1828 
1830  void cmdResponse_out(
1831  FwOpcodeType opCode,
1832  U32 cmdSeq,
1833  Fw::CmdResponse response
1834  );
1835 
1836  protected:
1837 
1838  // ----------------------------------------------------------------------
1839  // Command handlers to implement
1840  // ----------------------------------------------------------------------
1841 
1845  virtual void RUN_cmdHandler(
1846  FwOpcodeType opCode,
1847  U32 cmdSeq,
1848  const Fw::CmdStringArg& fileName,
1849  Svc::BlockState block
1850  ) = 0;
1851 
1853  virtual void RUN_ARGS_cmdHandler(
1854  FwOpcodeType opCode,
1855  U32 cmdSeq,
1856  const Fw::CmdStringArg& fileName,
1857  Svc::BlockState block,
1858  Svc::SeqArgs buffer
1859  ) = 0;
1860 
1864  virtual void VALIDATE_cmdHandler(
1865  FwOpcodeType opCode,
1866  U32 cmdSeq,
1867  const Fw::CmdStringArg& fileName
1868  ) = 0;
1869 
1873  virtual void VALIDATE_ARGS_cmdHandler(
1874  FwOpcodeType opCode,
1875  U32 cmdSeq,
1876  const Fw::CmdStringArg& fileName,
1877  Svc::SeqArgs buffer
1878  ) = 0;
1879 
1883  virtual void RUN_VALIDATED_cmdHandler(
1884  FwOpcodeType opCode,
1885  U32 cmdSeq,
1886  Svc::BlockState block
1887  ) = 0;
1888 
1893  virtual void CANCEL_cmdHandler(
1894  FwOpcodeType opCode,
1895  U32 cmdSeq
1896  ) = 0;
1897 
1904  virtual void SET_BREAKPOINT_cmdHandler(
1905  FwOpcodeType opCode,
1906  U32 cmdSeq,
1907  U32 stmtIdx,
1908  bool breakOnce
1909  ) = 0;
1910 
1916  virtual void BREAK_cmdHandler(
1917  FwOpcodeType opCode,
1918  U32 cmdSeq
1919  ) = 0;
1920 
1925  virtual void CONTINUE_cmdHandler(
1926  FwOpcodeType opCode,
1927  U32 cmdSeq
1928  ) = 0;
1929 
1934  virtual void CLEAR_BREAKPOINT_cmdHandler(
1935  FwOpcodeType opCode,
1936  U32 cmdSeq
1937  ) = 0;
1938 
1943  virtual void STEP_cmdHandler(
1944  FwOpcodeType opCode,
1945  U32 cmdSeq
1946  ) = 0;
1947 
1951  virtual void DUMP_STACK_TO_FILE_cmdHandler(
1952  FwOpcodeType opCode,
1953  U32 cmdSeq,
1954  const Fw::CmdStringArg& fileName
1955  ) = 0;
1956 
1957  protected:
1958 
1959  // ----------------------------------------------------------------------
1960  // Command handler base-class functions
1961  //
1962  // Call these functions directly to bypass the command input port
1963  // ----------------------------------------------------------------------
1964 
1968  void RUN_cmdHandlerBase(
1969  FwOpcodeType opCode,
1970  U32 cmdSeq,
1971  Fw::CmdArgBuffer& args
1972  );
1973 
1976  FwOpcodeType opCode,
1977  U32 cmdSeq,
1978  Fw::CmdArgBuffer& args
1979  );
1980 
1985  FwOpcodeType opCode,
1986  U32 cmdSeq,
1987  Fw::CmdArgBuffer& args
1988  );
1989 
1994  FwOpcodeType opCode,
1995  U32 cmdSeq,
1996  Fw::CmdArgBuffer& args
1997  );
1998 
2003  FwOpcodeType opCode,
2004  U32 cmdSeq,
2005  Fw::CmdArgBuffer& args
2006  );
2007 
2012  void CANCEL_cmdHandlerBase(
2013  FwOpcodeType opCode,
2014  U32 cmdSeq,
2015  Fw::CmdArgBuffer& args
2016  );
2017 
2025  FwOpcodeType opCode,
2026  U32 cmdSeq,
2027  Fw::CmdArgBuffer& args
2028  );
2029 
2035  void BREAK_cmdHandlerBase(
2036  FwOpcodeType opCode,
2037  U32 cmdSeq,
2038  Fw::CmdArgBuffer& args
2039  );
2040 
2046  FwOpcodeType opCode,
2047  U32 cmdSeq,
2048  Fw::CmdArgBuffer& args
2049  );
2050 
2056  FwOpcodeType opCode,
2057  U32 cmdSeq,
2058  Fw::CmdArgBuffer& args
2059  );
2060 
2065  void STEP_cmdHandlerBase(
2066  FwOpcodeType opCode,
2067  U32 cmdSeq,
2068  Fw::CmdArgBuffer& args
2069  );
2070 
2075  FwOpcodeType opCode,
2076  U32 cmdSeq,
2077  Fw::CmdArgBuffer& args
2078  );
2079 
2080  protected:
2081 
2082  // ----------------------------------------------------------------------
2083  // Pre-message hooks for async commands
2084  //
2085  // Each of these functions is invoked just before processing the
2086  // corresponding command. By default they do nothing. You can
2087  // override them to provide specific pre-command behavior.
2088  // ----------------------------------------------------------------------
2089 
2091  virtual void RUN_preMsgHook(
2092  FwOpcodeType opCode,
2093  U32 cmdSeq
2094  );
2095 
2097  virtual void RUN_ARGS_preMsgHook(
2098  FwOpcodeType opCode,
2099  U32 cmdSeq
2100  );
2101 
2103  virtual void VALIDATE_preMsgHook(
2104  FwOpcodeType opCode,
2105  U32 cmdSeq
2106  );
2107 
2109  virtual void VALIDATE_ARGS_preMsgHook(
2110  FwOpcodeType opCode,
2111  U32 cmdSeq
2112  );
2113 
2115  virtual void RUN_VALIDATED_preMsgHook(
2116  FwOpcodeType opCode,
2117  U32 cmdSeq
2118  );
2119 
2121  virtual void CANCEL_preMsgHook(
2122  FwOpcodeType opCode,
2123  U32 cmdSeq
2124  );
2125 
2127  virtual void SET_BREAKPOINT_preMsgHook(
2128  FwOpcodeType opCode,
2129  U32 cmdSeq
2130  );
2131 
2133  virtual void BREAK_preMsgHook(
2134  FwOpcodeType opCode,
2135  U32 cmdSeq
2136  );
2137 
2139  virtual void CONTINUE_preMsgHook(
2140  FwOpcodeType opCode,
2141  U32 cmdSeq
2142  );
2143 
2145  virtual void CLEAR_BREAKPOINT_preMsgHook(
2146  FwOpcodeType opCode,
2147  U32 cmdSeq
2148  );
2149 
2151  virtual void STEP_preMsgHook(
2152  FwOpcodeType opCode,
2153  U32 cmdSeq
2154  );
2155 
2157  virtual void DUMP_STACK_TO_FILE_preMsgHook(
2158  FwOpcodeType opCode,
2159  U32 cmdSeq
2160  );
2161 
2162  protected:
2163 
2164  // ----------------------------------------------------------------------
2165  // Event logging functions
2166  // ----------------------------------------------------------------------
2167 
2169  void log_WARNING_HI_InvalidCommand(I32 state) const;
2170 
2172  void log_WARNING_HI_InvalidSeqRunCall(I32 state) const;
2173 
2175  void log_WARNING_HI_InvalidSeqCancelCall(I32 state) const;
2176 
2179  const Fw::StringBase& filePath,
2180  I32 errorCode
2181  ) const;
2182 
2185  FwSizeType writeSize,
2186  const Fw::StringBase& filePath,
2187  I32 errorCode
2188  ) const;
2189 
2193  const Fw::StringBase& filePath,
2194  I32 errorCode
2195  ) const;
2196 
2200  const Fw::StringBase& filePath
2201  ) const;
2202 
2206  const Fw::StringBase& filePath,
2207  I32 errorCode,
2208  U64 buffLeft,
2209  U64 buffLength
2210  ) const;
2211 
2214  U8 expected,
2215  U8 actual
2216  ) const;
2217 
2220  U32 expected,
2221  U32 actual
2222  ) const;
2223 
2225  void log_WARNING_HI_ExtraBytesInSequence(FwSizeType remaining) const;
2226 
2229  U64 bufferSize,
2230  const Fw::StringBase& filePath
2231  ) const;
2232 
2235  FwOpcodeType opCode,
2236  U32 stmtIdx,
2237  const Fw::StringBase& filePath,
2238  Fw::CmdResponse response
2239  ) const;
2240 
2242  void log_ACTIVITY_HI_SequenceDone(const Fw::StringBase& filePath) const;
2243 
2245  void log_ACTIVITY_HI_SequenceCancelled(const Fw::StringBase& filePath) const;
2246 
2249  const Fw::StringBase& filePath,
2250  U8 errorCode
2251  ) const;
2252 
2255  U8 opcode,
2256  U32 stmtIdx,
2257  const Fw::StringBase& filePath
2258  ) const;
2259 
2262  I32 state,
2263  FwOpcodeType opcode,
2264  Fw::CmdResponse response
2265  ) const;
2266 
2269  FwOpcodeType opcode,
2270  Fw::CmdResponse response,
2271  U16 oldSequenceIdx,
2272  U16 currentSequenceIdx
2273  ) const;
2274 
2277  FwOpcodeType opcode,
2278  Fw::CmdResponse response
2279  ) const;
2280 
2283  FwOpcodeType opcode,
2284  Fw::CmdResponse response,
2285  U8 expectedDirectiveOpcode
2286  ) const;
2287 
2290  FwOpcodeType opcode,
2291  Fw::CmdResponse response,
2292  FwOpcodeType expectedOpcode
2293  ) const;
2294 
2297  FwOpcodeType opcode,
2298  Fw::CmdResponse response,
2299  U16 actualCmdIdx,
2300  U16 expectedCmdIdx
2301  ) const;
2302 
2305  U8 opcode,
2306  U32 stmtIdx,
2307  I32 errorCode,
2308  U64 buffLeft,
2309  U64 buffLength
2310  ) const;
2311 
2314  I32 internalTimeBase,
2315  I32 otherTimeBase
2316  ) const;
2317 
2320  I32 internalTimeContext,
2321  I32 otherTimeContext
2322  ) const;
2323 
2326  FwOpcodeType opCode,
2327  U32 stmtIdx,
2328  const Fw::StringBase& filePath
2329  ) const;
2330 
2333  U8 opCode,
2334  U32 stmtIdx,
2335  const Fw::StringBase& filePath
2336  ) const;
2337 
2340  U8 count,
2341  U8 max
2342  ) const;
2343 
2346  U16 count,
2347  U16 max
2348  ) const;
2349 
2352  Svc::Fpy::StackSizeType expected,
2353  FwSizeType actual,
2354  const Fw::StringBase& filePath
2355  ) const;
2356 
2359 
2361  void log_ACTIVITY_HI_SequencePaused(U32 stmtIdx) const;
2362 
2365  U32 breakpointIdx,
2366  bool breakOnce
2367  ) const;
2368 
2370  void log_ACTIVITY_HI_BreakpointCleared() const;
2371 
2373  void log_FATAL_LogFatal(
2374  const Fw::StringBase& filePath,
2375  const Fw::StringBase& message
2376  ) const;
2377 
2380  const Fw::StringBase& filePath,
2381  const Fw::StringBase& message
2382  ) const;
2383 
2386  const Fw::StringBase& filePath,
2387  const Fw::StringBase& message
2388  ) const;
2389 
2392  const Fw::StringBase& filePath,
2393  const Fw::StringBase& message
2394  ) const;
2395 
2398  const Fw::StringBase& filePath,
2399  const Fw::StringBase& message
2400  ) const;
2401 
2404  const Fw::StringBase& filePath,
2405  const Fw::StringBase& message
2406  ) const;
2407 
2410  const Fw::StringBase& filePath,
2411  const Fw::StringBase& message
2412  ) const;
2413 
2414  protected:
2415 
2416  // ----------------------------------------------------------------------
2417  // Telemetry serialized write
2418  // ----------------------------------------------------------------------
2419 
2424  void tlmWrite(
2425  FwChanIdType id,
2426  Fw::TlmBuffer& _tlmBuff,
2427  Fw::Time _tlmTime = Fw::Time()
2428  ) const;
2429 
2430  protected:
2431 
2432  // ----------------------------------------------------------------------
2433  // Telemetry write functions
2434  // ----------------------------------------------------------------------
2435 
2439  void tlmWrite_State(
2440  FwEnumStoreType arg,
2441  Fw::Time _tlmTime = Fw::Time()
2442  );
2443 
2448  U64 arg,
2449  Fw::Time _tlmTime = Fw::Time()
2450  );
2451 
2456  U64 arg,
2457  Fw::Time _tlmTime = Fw::Time()
2458  );
2459 
2464  U64 arg,
2465  Fw::Time _tlmTime = Fw::Time()
2466  );
2467 
2474  U64 arg,
2475  Fw::Time _tlmTime = Fw::Time()
2476  );
2477 
2482  U64 arg,
2483  Fw::Time _tlmTime = Fw::Time()
2484  );
2485 
2490  const Svc::Fpy::DirectiveErrorCode& arg,
2491  Fw::Time _tlmTime = Fw::Time()
2492  );
2493 
2498  U64 arg,
2499  Fw::Time _tlmTime = Fw::Time()
2500  );
2501 
2506  const Svc::Fpy::DirectiveId& arg,
2507  Fw::Time _tlmTime = Fw::Time()
2508  );
2509 
2513  void tlmWrite_SeqPath(
2514  const Fw::StringBase& arg,
2515  Fw::Time _tlmTime = Fw::Time()
2516  );
2517 
2522  bool arg,
2523  Fw::Time _tlmTime = Fw::Time()
2524  );
2525 
2530  bool arg,
2531  Fw::Time _tlmTime = Fw::Time()
2532  );
2533 
2538  U8 arg,
2539  Fw::Time _tlmTime = Fw::Time()
2540  );
2541 
2546  U32 arg,
2547  Fw::Time _tlmTime = Fw::Time()
2548  );
2549 
2554  FwOpcodeType arg,
2555  Fw::Time _tlmTime = Fw::Time()
2556  );
2557 
2563  Fw::Time _tlmTime = Fw::Time()
2564  );
2565 
2570  bool arg,
2571  Fw::Time _tlmTime = Fw::Time()
2572  );
2573 
2579  U32 arg,
2580  Fw::Time _tlmTime = Fw::Time()
2581  );
2582 
2587  bool arg,
2588  Fw::Time _tlmTime = Fw::Time()
2589  );
2590 
2597  bool arg,
2598  Fw::Time _tlmTime = Fw::Time()
2599  );
2600 
2605  F32 arg,
2606  Fw::Time _tlmTime = Fw::Time()
2607  );
2608 
2609  protected:
2610 
2611  // ----------------------------------------------------------------------
2612  // Parameter hook functions
2613  // ----------------------------------------------------------------------
2614 
2618  virtual void parameterUpdated(
2619  FwPrmIdType id
2620  );
2621 
2625  virtual void parametersLoaded();
2626 
2627  protected:
2628 
2629  // ----------------------------------------------------------------------
2630  // Parameter get functions
2631  // ----------------------------------------------------------------------
2632 
2642  Fw::ParamValid& valid
2643  );
2644 
2645  protected:
2646 
2647  // ----------------------------------------------------------------------
2648  // Time
2649  // ----------------------------------------------------------------------
2650 
2654  Fw::Time getTime() const;
2655 
2656  private:
2657 
2658  // ----------------------------------------------------------------------
2659  // Message dispatch functions
2660  // ----------------------------------------------------------------------
2661 
2663  virtual MsgDispatchStatus doDispatch();
2664 
2665  private:
2666 
2667  // ----------------------------------------------------------------------
2668  // Calls for messages received on special input ports
2669  // ----------------------------------------------------------------------
2670 
2672  static void m_p_cmdIn_in(
2673  Fw::PassiveComponentBase* callComp,
2674  FwIndexType portNum,
2675  FwOpcodeType opCode,
2676  U32 cmdSeq,
2677  Fw::CmdArgBuffer& args
2678  );
2679 
2680  private:
2681 
2682  // ----------------------------------------------------------------------
2683  // Calls for messages received on typed input ports
2684  // ----------------------------------------------------------------------
2685 
2687  static void m_p_checkTimers_in(
2688  Fw::PassiveComponentBase* callComp,
2689  FwIndexType portNum,
2690  U32 context
2691  );
2692 
2694  static void m_p_cmdResponseIn_in(
2695  Fw::PassiveComponentBase* callComp,
2696  FwIndexType portNum,
2697  FwOpcodeType opCode,
2698  U32 cmdSeq,
2699  const Fw::CmdResponse& response
2700  );
2701 
2703  static void m_p_pingIn_in(
2704  Fw::PassiveComponentBase* callComp,
2705  FwIndexType portNum,
2706  U32 key
2707  );
2708 
2710  static void m_p_seqCancelIn_in(
2711  Fw::PassiveComponentBase* callComp,
2712  FwIndexType portNum
2713  );
2714 
2716  static void m_p_seqRunIn_in(
2717  Fw::PassiveComponentBase* callComp,
2718  FwIndexType portNum,
2719  const Fw::StringBase& filename,
2720  const Svc::SeqArgs& args
2721  );
2722 
2724  static void m_p_tlmWrite_in(
2725  Fw::PassiveComponentBase* callComp,
2726  FwIndexType portNum,
2727  U32 context
2728  );
2729 
2730  private:
2731 
2732  // ----------------------------------------------------------------------
2733  // Invocation functions for special output ports
2734  // ----------------------------------------------------------------------
2735 
2737  void cmdRegOut_out(
2738  FwIndexType portNum,
2739  FwOpcodeType opCode
2740  ) const;
2741 
2743  void cmdResponseOut_out(
2744  FwIndexType portNum,
2745  FwOpcodeType opCode,
2746  U32 cmdSeq,
2747  const Fw::CmdResponse& response
2748  ) const;
2749 
2751  void logOut_out(
2752  FwIndexType portNum,
2753  FwEventIdType id,
2754  Fw::Time& timeTag,
2755  const Fw::LogSeverity& severity,
2756  Fw::LogBuffer& args
2757  ) const;
2758 
2759 #if FW_ENABLE_TEXT_LOGGING
2760 
2762  void logTextOut_out(
2763  FwIndexType portNum,
2764  FwEventIdType id,
2765  Fw::Time& timeTag,
2766  const Fw::LogSeverity& severity,
2767  Fw::TextLogString& text
2768  ) const;
2769 
2770 #endif
2771 
2773  Fw::ParamValid prmGet_out(
2774  FwIndexType portNum,
2775  FwPrmIdType id,
2776  Fw::ParamBuffer& val
2777  ) const;
2779 
2781  void prmSet_out(
2782  FwIndexType portNum,
2783  FwPrmIdType id,
2784  Fw::ParamBuffer& val
2785  ) const;
2786 
2788  void timeCaller_out(
2789  FwIndexType portNum,
2790  Fw::Time& time
2791  ) const;
2792 
2794  void tlmOut_out(
2795  FwIndexType portNum,
2796  FwChanIdType id,
2797  Fw::Time& timeTag,
2798  Fw::TlmBuffer& val
2799  ) const;
2800 
2801  private:
2802 
2803  // ----------------------------------------------------------------------
2804  // Send signal helper functions
2805  // ----------------------------------------------------------------------
2806 
2808  void sendSignalStart(
2809  SmId smId,
2810  FwEnumStoreType signal,
2811  Fw::SerialBufferBase& buffer
2812  );
2813 
2815  void sequencer_sendSignalFinish(
2816  Fw::LinearBufferBase& buffer
2817  );
2818 
2819  private:
2820 
2821  // ----------------------------------------------------------------------
2822  // Helper functions for state machine dispatch
2823  // ----------------------------------------------------------------------
2824 
2826  void smDispatch(
2827  Fw::SerialBufferBase& buffer
2828  );
2829 
2831  static void deserializeSmIdAndSignal(
2832  Fw::SerialBufferBase& buffer,
2833  FwEnumStoreType& smId,
2834  FwEnumStoreType& signal
2835  );
2836 
2838  void Svc_FpySequencer_SequencerStateMachine_smDispatch(
2839  Fw::SerialBufferBase& buffer,
2840  Svc_FpySequencer_SequencerStateMachine& sm,
2842  );
2843 
2844  private:
2845 
2846  // ----------------------------------------------------------------------
2847  // Parameter set functions
2848  // ----------------------------------------------------------------------
2849 
2853  Fw::CmdResponse paramSet_STATEMENT_TIMEOUT_SECS(
2854  Fw::SerialBufferBase& val
2855  );
2856 
2857  private:
2858 
2859  // ----------------------------------------------------------------------
2860  // Parameter save functions
2861  // ----------------------------------------------------------------------
2862 
2866  Fw::CmdResponse paramSave_STATEMENT_TIMEOUT_SECS();
2867 
2868 #if !FW_DIRECT_PORT_CALLS
2869 
2870  private:
2871 
2872  // ----------------------------------------------------------------------
2873  // Special input ports
2874  // ----------------------------------------------------------------------
2875 
2877  Fw::InputCmdPort m_cmdIn_InputPort[NUM_CMDIN_INPUT_PORTS];
2878 
2879 #endif
2880 
2881 #if !FW_DIRECT_PORT_CALLS
2882 
2883  private:
2884 
2885  // ----------------------------------------------------------------------
2886  // Typed input ports
2887  // ----------------------------------------------------------------------
2888 
2890  Svc::InputSchedPort m_checkTimers_InputPort[NUM_CHECKTIMERS_INPUT_PORTS];
2891 
2893  Fw::InputCmdResponsePort m_cmdResponseIn_InputPort[NUM_CMDRESPONSEIN_INPUT_PORTS];
2894 
2896  Svc::InputPingPort m_pingIn_InputPort[NUM_PINGIN_INPUT_PORTS];
2897 
2900 
2902  Svc::InputCmdSeqInPort m_seqRunIn_InputPort[NUM_SEQRUNIN_INPUT_PORTS];
2903 
2905  Svc::InputSchedPort m_tlmWrite_InputPort[NUM_TLMWRITE_INPUT_PORTS];
2906 
2907 #endif
2908 
2909 #if !FW_DIRECT_PORT_CALLS
2910 
2911  private:
2912 
2913  // ----------------------------------------------------------------------
2914  // Special output ports
2915  // ----------------------------------------------------------------------
2916 
2918  Fw::OutputCmdRegPort m_cmdRegOut_OutputPort[NUM_CMDREGOUT_OUTPUT_PORTS];
2919 
2921  Fw::OutputCmdResponsePort m_cmdResponseOut_OutputPort[NUM_CMDRESPONSEOUT_OUTPUT_PORTS];
2922 
2924  Fw::OutputLogPort m_logOut_OutputPort[NUM_LOGOUT_OUTPUT_PORTS];
2925 
2926 #if FW_ENABLE_TEXT_LOGGING == 1
2927 
2929  Fw::OutputLogTextPort m_logTextOut_OutputPort[NUM_LOGTEXTOUT_OUTPUT_PORTS];
2930 
2931 #endif
2932 
2934  Fw::OutputPrmGetPort m_prmGet_OutputPort[NUM_PRMGET_OUTPUT_PORTS];
2935 
2937  Fw::OutputPrmSetPort m_prmSet_OutputPort[NUM_PRMSET_OUTPUT_PORTS];
2938 
2940  Fw::OutputTimePort m_timeCaller_OutputPort[NUM_TIMECALLER_OUTPUT_PORTS];
2941 
2943  Fw::OutputTlmPort m_tlmOut_OutputPort[NUM_TLMOUT_OUTPUT_PORTS];
2944 
2945 #endif
2946 
2947 #if !FW_DIRECT_PORT_CALLS
2948 
2949  private:
2950 
2951  // ----------------------------------------------------------------------
2952  // Typed output ports
2953  // ----------------------------------------------------------------------
2954 
2956  Fw::OutputComPort m_cmdOut_OutputPort[NUM_CMDOUT_OUTPUT_PORTS];
2957 
2959  Fw::OutputPrmGetPort m_getParam_OutputPort[NUM_GETPARAM_OUTPUT_PORTS];
2960 
2962  Fw::OutputTlmGetPort m_getTlmChan_OutputPort[NUM_GETTLMCHAN_OUTPUT_PORTS];
2963 
2965  Svc::OutputPingPort m_pingOut_OutputPort[NUM_PINGOUT_OUTPUT_PORTS];
2966 
2968  Fw::OutputCmdResponsePort m_seqDoneOut_OutputPort[NUM_SEQDONEOUT_OUTPUT_PORTS];
2969 
2971  Svc::OutputCmdSeqInPort m_seqStartOut_OutputPort[NUM_SEQSTARTOUT_OUTPUT_PORTS];
2972 
2973 #endif
2974 
2975  private:
2976 
2977  // ----------------------------------------------------------------------
2978  // First update flags for telemetry channels
2979  // ----------------------------------------------------------------------
2980 
2982  bool m_first_update_State = true;
2983 
2985  bool m_first_update_SequencesSucceeded = true;
2986 
2988  bool m_first_update_SequencesFailed = true;
2989 
2991  bool m_first_update_SequencesCancelled = true;
2992 
2994  bool m_first_update_StatementsDispatched = true;
2995 
2997  bool m_first_update_StatementsFailed = true;
2998 
3000  bool m_first_update_LastDirectiveError = true;
3001 
3003  bool m_first_update_DirectiveErrorIndex = true;
3004 
3006  bool m_first_update_DirectiveErrorId = true;
3007 
3009  bool m_first_update_SeqPath = true;
3010 
3012  bool m_first_update_Debug_ReachedEndOfFile = true;
3013 
3015  bool m_first_update_Debug_NextStatementReadSuccess = true;
3016 
3018  bool m_first_update_Debug_NextStatementOpcode = true;
3019 
3021  bool m_first_update_Debug_NextStatementIndex = true;
3022 
3024  bool m_first_update_Debug_NextCmdOpcode = true;
3025 
3027  bool m_first_update_Debug_StackSize = true;
3028 
3030  bool m_first_update_BreakpointInUse = true;
3031 
3033  bool m_first_update_BreakpointIndex = true;
3034 
3036  bool m_first_update_BreakOnlyOnceOnBreakpoint = true;
3037 
3039  bool m_first_update_BreakBeforeNextLine = true;
3040 
3042  bool m_first_update_PRM_STATEMENT_TIMEOUT_SECS = true;
3043 
3044  private:
3045 
3046  // ----------------------------------------------------------------------
3047  // Last value storage for telemetry channels
3048  // ----------------------------------------------------------------------
3049 
3051  FwEnumStoreType m_last_State = {};
3052 
3054  U64 m_last_SequencesSucceeded = {};
3055 
3057  U64 m_last_SequencesFailed = {};
3058 
3060  U64 m_last_SequencesCancelled = {};
3061 
3063  U64 m_last_StatementsDispatched = {};
3064 
3066  U64 m_last_StatementsFailed = {};
3067 
3069  Svc::Fpy::DirectiveErrorCode m_last_LastDirectiveError = {};
3070 
3072  U64 m_last_DirectiveErrorIndex = {};
3073 
3075  Svc::Fpy::DirectiveId m_last_DirectiveErrorId = {};
3076 
3078  Fw::TlmString m_last_SeqPath = {};
3079 
3081  bool m_last_Debug_ReachedEndOfFile = {};
3082 
3084  bool m_last_Debug_NextStatementReadSuccess = {};
3085 
3087  U8 m_last_Debug_NextStatementOpcode = {};
3088 
3090  U32 m_last_Debug_NextStatementIndex = {};
3091 
3093  FwOpcodeType m_last_Debug_NextCmdOpcode = {};
3094 
3096  Svc::Fpy::StackSizeType m_last_Debug_StackSize = {};
3097 
3099  bool m_last_BreakpointInUse = {};
3100 
3102  U32 m_last_BreakpointIndex = {};
3103 
3105  bool m_last_BreakOnlyOnceOnBreakpoint = {};
3106 
3108  bool m_last_BreakBeforeNextLine = {};
3109 
3111  F32 m_last_PRM_STATEMENT_TIMEOUT_SECS = {};
3112 
3113  private:
3114 
3115  // ----------------------------------------------------------------------
3116  // Parameter validity flags
3117  // ----------------------------------------------------------------------
3118 
3120  Fw::ParamValid m_param_STATEMENT_TIMEOUT_SECS_valid;
3121 
3122  private:
3123 
3124  // ----------------------------------------------------------------------
3125  // Parameter variables
3126  // ----------------------------------------------------------------------
3127 
3134  F32 m_STATEMENT_TIMEOUT_SECS;
3135 
3136  private:
3137 
3138  // ----------------------------------------------------------------------
3139  // State machine instances
3140  // ----------------------------------------------------------------------
3141 
3143  Svc_FpySequencer_SequencerStateMachine m_stateMachine_sequencer;
3144 
3145  private:
3146 
3147  // ----------------------------------------------------------------------
3148  // Mutexes
3149  // ----------------------------------------------------------------------
3150 
3152  Os::Mutex m_paramLock;
3153 
3154  };
3155 
3156 }
3157 
3158 #endif
void cmdOut_out(FwIndexType portNum, Fw::ComBuffer &data, U32 context) const
Invoke output port cmdOut.
void pingOut_out(FwIndexType portNum, U32 key) const
Invoke output port pingOut.
virtual void seqCancelIn_handler(FwIndexType portNum)=0
Handler for input port seqCancelIn.
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
bool isConnected_getTlmChan_OutputPort(FwIndexType portNum) const
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)
virtual void seqCancelIn_preMsgHook(FwIndexType portNum)
Pre-message hook for async input port seqCancelIn.
FwIdType FwOpcodeType
The type of a command opcode.
void set_cmdOut_OutputPort(FwIndexType portNum, Fw::InputComPort *port)
Connect port to cmdOut[portNum].
virtual void seqRunIn_handler(FwIndexType portNum, const Fw::StringBase &filename, const Svc::SeqArgs &args)=0
Handler for input port seqRunIn.
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.
bool isConnected_cmdRegOut_OutputPort(FwIndexType portNum) const
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()
bool isConnected_getParam_OutputPort(FwIndexType portNum) const
PlatformSizeType FwSizeType
void directive_popEvent_internalInterfaceInvoke(const Svc::FpySequencer_PopEventDirective &directive)
Internal interface base-class function for directive_popEvent.
stores a value to an absolute address in the stack (for global variables), offset from stack ...
I32 FwEnumStoreType
Loads and validates a sequence with arguments.
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.
Writes the contents of the stack to a file. This command is only valid in the RUNNING.PAUSED state.
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 Svc_FpySequencer_SequencerStateMachine_action_pushArgsToStack(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()
Must be called after VALIDATE. Runs the sequence that was validated.
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)
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
Loads, validates and runs a sequence.
stores a value to a local variable at a compile-time-known offset relative to the current stack frame...
virtual void VALIDATE_ARGS_cmdHandler(FwOpcodeType opCode, U32 cmdSeq, const Fw::CmdStringArg &fileName, Svc::SeqArgs buffer)=0
virtual void CANCEL_cmdHandler(FwOpcodeType opCode, U32 cmdSeq)=0
Fw::ParamValid getParam_out(FwIndexType portNum, FwPrmIdType id, Fw::ParamBuffer &val) const
Invoke output port getParam.
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
bool isConnected_prmGet_OutputPort(FwIndexType portNum) const
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.
bool isConnected_prmSet_OutputPort(FwIndexType portNum) const
virtual void RUN_ARGS_preMsgHook(FwOpcodeType opCode, U32 cmdSeq)
Pre-message hook for command RUN_ARGS.
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 void VALIDATE_ARGS_preMsgHook(FwOpcodeType opCode, U32 cmdSeq)
Pre-message hook for command VALIDATE_ARGS.
virtual ~FpySequencerComponentBase()
Destroy FpySequencerComponentBase object.
virtual void Svc_FpySequencer_SequencerStateMachine_action_setSequenceArguments(SmId smId, Svc_FpySequencer_SequencerStateMachine::Signal signal, const Svc::FpySequencer_SequenceExecutionArgs &value)=0
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 seqRunIn_preMsgHook(FwIndexType portNum, const Fw::StringBase &filename, const Svc::SeqArgs &args)
Pre-message hook for async input port seqRunIn.
void log_DIAGNOSTIC_LogDiagnostic(const Fw::StringBase &filePath, const Fw::StringBase &message) const
Log event LogDiagnostic.
void log_COMMAND_LogCommand(const Fw::StringBase &filePath, const Fw::StringBase &message) const
Log event LogCommand.
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::BlockState block)=0
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 cmdIn_handlerBase(FwIndexType portNum, FwOpcodeType opCode, U32 cmdSeq, Fw::CmdArgBuffer &args)
Handler base-class function for input port cmdIn.
void log_WARNING_HI_TooManySequenceDirectives(U16 count, U16 max) const
Log event TooManySequenceDirectives.
void sequencer_sendSignal_stmtResponse_unexpected()
Send signal stmtResponse_unexpected to state machine sequencer.
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 log_ACTIVITY_LO_LogActivityLo(const Fw::StringBase &filePath, const Fw::StringBase &message) const
Log event LogActivityLo.
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.
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())
FwIdType FwEventIdType
The type of an event identifier.
loads a value from a local variable at a compile-time-known offset relative to the current stack fram...
void seqCancelIn_handlerBase(FwIndexType portNum)
Handler base-class function for input port seqCancelIn.
void log_ACTIVITY_HI_LogActivityHi(const Fw::StringBase &filePath, const Fw::StringBase &message) const
Log event LogActivityHi.
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)
Svc::InputCmdSeqCancelPort * get_seqCancelIn_InputPort(FwIndexType portNum)
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.
pops a severity and message from the stack and emits an F Prime event
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.
void RUN_ARGS_cmdHandlerBase(FwOpcodeType opCode, U32 cmdSeq, Fw::CmdArgBuffer &args)
Base-class handler function for command RUN_ARGS.
virtual void directive_constCmd_internalInterfaceHandler(const Svc::FpySequencer_ConstCmdDirective &directive)=0
Internal interface handler for directive_constCmd.
Fw::InputCmdPort * get_cmdIn_InputPort(FwIndexType portNum)
bool isConnected_cmdResponseOut_OutputPort(FwIndexType portNum) const
virtual void Svc_FpySequencer_SequencerStateMachine_action_clearSequenceArguments(SmId smId, Svc_FpySequencer_SequencerStateMachine::Signal signal)=0
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.
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.
Sequencer blocking state.
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.
void VALIDATE_ARGS_cmdHandlerBase(FwOpcodeType opCode, U32 cmdSeq, Fw::CmdArgBuffer &args)
static constexpr FwIndexType getNum_prmSet_OutputPorts()
void log_WARNING_HI_LogWarningHi(const Fw::StringBase &filePath, const Fw::StringBase &message) const
Log event LogWarningHi.
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.
Enum representing event severity.
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
virtual void RUN_cmdHandler(FwOpcodeType opCode, U32 cmdSeq, const Fw::CmdStringArg &fileName, Svc::BlockState block)=0
void seqDoneOut_out(FwIndexType portNum, FwOpcodeType opCode, U32 cmdSeq, const Fw::CmdResponse &response) const
Invoke output port seqDoneOut.
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 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].
virtual void Svc_FpySequencer_SequencerStateMachine_action_setSequenceBlockState(SmId smId, Svc_FpySequencer_SequencerStateMachine::Signal signal, const Svc::FpySequencer_SequenceExecutionArgs &value)=0
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()
virtual void RUN_ARGS_cmdHandler(FwOpcodeType opCode, U32 cmdSeq, const Fw::CmdStringArg &fileName, Svc::BlockState block, Svc::SeqArgs buffer)=0
Handler for command RUN_ARGS.
void sequencer_sendSignal_stmtResponse_keepWaiting()
Send signal stmtResponse_keepWaiting to state machine sequencer.
bool isConnected_tlmOut_OutputPort(FwIndexType portNum) const
virtual void Svc_FpySequencer_SequencerStateMachine_action_resetRuntime(SmId smId, Svc_FpySequencer_SequencerStateMachine::Signal signal)=0
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.
bool isConnected_logOut_OutputPort(FwIndexType portNum) const
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.
void log_WARNING_HI_ArgTotalSizeExceedsStackLimit(Svc::Fpy::StackSizeType argSize) const
Log event ArgTotalSizeExceedsStackLimit.
static constexpr FwIndexType getNum_getTlmChan_OutputPorts()
virtual void directive_getField_internalInterfaceHandler(const Svc::FpySequencer_GetFieldDirective &directive)=0
Internal interface handler for directive_getField.
virtual void directive_loadRel_internalInterfaceHandler(const Svc::FpySequencer_LoadRelDirective &directive)=0
Internal interface handler for directive_loadRel.
bool isConnected_timeCaller_OutputPort(FwIndexType portNum) const
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)
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_pingOut_OutputPort(FwIndexType portNum) const
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.
bool isConnected_cmdOut_OutputPort(FwIndexType portNum) const
Svc::InputSchedPort * get_tlmWrite_InputPort(FwIndexType portNum)
void seqRunIn_handlerBase(FwIndexType portNum, const Fw::StringBase &filename, const Svc::SeqArgs &args)
Handler base-class function for input port seqRunIn.
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
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.
void log_WARNING_LO_LogWarningLo(const Fw::StringBase &filePath, const Fw::StringBase &message) const
Log event LogWarningLo.
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
void log_WARNING_HI_InvalidSeqCancelCall(I32 state) const
Log event InvalidSeqCancelCall.
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
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.
Enum representing parameter validity.
virtual void directive_popEvent_internalInterfaceHandler(const Svc::FpySequencer_PopEventDirective &directive)=0
Internal interface handler for directive_popEvent.
virtual void Svc_FpySequencer_SequencerStateMachine_action_setBreakpoint(SmId smId, Svc_FpySequencer_SequencerStateMachine::Signal signal, const Svc::FpySequencer_BreakpointArgs &value)=0
void log_FATAL_LogFatal(const Fw::StringBase &filePath, const Fw::StringBase &message) const
Log event LogFatal.
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.
bool isConnected_seqStartOut_OutputPort(FwIndexType portNum) const
virtual void CONTINUE_preMsgHook(FwOpcodeType opCode, U32 cmdSeq)
Pre-message hook for command CONTINUE.
void log_WARNING_HI_ArgSizeMismatch(Svc::Fpy::StackSizeType expected, FwSizeType actual, const Fw::StringBase &filePath) const
Log event ArgSizeMismatch.
virtual void checkTimers_preMsgHook(FwIndexType portNum, U32 context)
Pre-message hook for async input port checkTimers.
void seqStartOut_out(FwIndexType portNum, const Fw::StringBase &filename, const Svc::SeqArgs &args) const
Invoke output port seqStartOut.
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
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)
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()
static constexpr FwIndexType getNum_seqCancelIn_InputPorts()
virtual void CANCEL_preMsgHook(FwOpcodeType opCode, U32 cmdSeq)
Pre-message hook for command CANCEL.
void tlmWrite_BreakOnlyOnceOnBreakpoint(bool arg, Fw::Time _tlmTime=Fw::Time())
void log_WARNING_HI_WrongCmdResponseIndex(FwOpcodeType opcode, Fw::CmdResponse response, U16 actualCmdIdx, U16 expectedCmdIdx) const
Log event WrongCmdResponseIndex.
Fw::TlmValid getTlmChan_out(FwIndexType portNum, FwChanIdType id, Fw::Time &timeTag, Fw::TlmBuffer &val) const
Invoke output port getTlmChan.
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
bool isConnected_seqDoneOut_OutputPort(FwIndexType portNum) const
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 ...
void tlmWrite(FwChanIdType id, Fw::TlmBuffer &_tlmBuff, Fw::Time _tlmTime=Fw::Time()) const
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())