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"
79 #include "Svc/Ping/PingPortAc.hpp"
91 
92 namespace Svc {
93 
100  {
101 
102  // ----------------------------------------------------------------------
103  // Friend classes
104  // ----------------------------------------------------------------------
105 
109  friend class FpySequencerTester;
110 
111  protected:
112 
113  // ----------------------------------------------------------------------
114  // Constants
115  // ----------------------------------------------------------------------
116 
118  enum {
120  };
121 
123  enum {
130  };
131 
133  enum {
142  };
143 
145  enum {
152  };
153 
155  enum {
156  OPCODE_RUN = 0x0,
162  OPCODE_SET_BREAKPOINT = 0x6,
164  OPCODE_BREAK = 0x7,
168  OPCODE_CONTINUE = 0x8,
173  OPCODE_STEP = 0xa,
181  };
182 
184  enum {
229  };
230 
232  enum {
255  };
256 
258  enum {
260  PARAMID_SEQ_BASE_DIR = 0x1,
264  };
268 
270  enum class SmId : FwEnumStoreType {
271  sequencer,
272  };
273 
274  protected:
275 
276  // ----------------------------------------------------------------------
277  // Types for internal state machines
278  // ----------------------------------------------------------------------
279 
283  {
284 
285  // ----------------------------------------------------------------------
286  // Friend classes
287  // ----------------------------------------------------------------------
288 
292  friend class FpySequencerTester;
293 
294  public:
295 
298  FpySequencerComponentBase& component
299  );
300 
301  public:
302 
304  void init(
306  );
307 
308  public:
309 
312 
313  private:
314 
316  void action_signalEntered(
317  Signal signal
318  );
319 
321  void action_setSequenceFilePath(
322  Signal signal,
324  );
325 
327  void action_setSequenceBlockState(
328  Signal signal,
330  );
331 
333  void action_setSequenceArguments(
334  Signal signal,
336  );
337 
339  void action_validate(
340  Signal signal
341  );
342 
344  void action_report_seqSucceeded(
345  Signal signal
346  );
347 
349  void action_report_seqCancelled(
350  Signal signal
351  );
352 
354  void action_report_seqFailed(
355  Signal signal
356  );
357 
359  void action_report_seqStarted(
360  Signal signal
361  );
362 
364  void action_setGoalState_RUNNING(
365  Signal signal
366  );
367 
369  void action_setGoalState_VALID(
370  Signal signal
371  );
372 
374  void action_setGoalState_IDLE(
375  Signal signal
376  );
377 
379  void action_sendCmdResponse_OK(
380  Signal signal
381  );
382 
384  void action_sendCmdResponse_EXECUTION_ERROR(
385  Signal signal
386  );
387 
389  void action_clearSequenceFile(
390  Signal signal
391  );
392 
394  void action_clearBreakpoint(
395  Signal signal
396  );
397 
399  void action_clearSequenceArguments(
400  Signal signal
401  );
402 
404  void action_checkShouldWake(
405  Signal signal
406  );
407 
409  void action_dispatchStatement(
410  Signal signal
411  );
412 
414  void action_resetRuntime(
415  Signal signal
416  );
417 
419  void action_checkStatementTimeout(
420  Signal signal
421  );
422 
424  void action_incrementSequenceCounter(
425  Signal signal
426  );
427 
429  void action_pushArgsToStack(
430  Signal signal
431  );
432 
434  void action_report_seqBroken(
435  Signal signal
436  );
437 
439  void action_setBreakpoint(
440  Signal signal,
442  );
443 
445  void action_setBreakBeforeNextLine(
446  Signal signal
447  );
448 
450  void action_clearBreakBeforeNextLine(
451  Signal signal
452  );
453 
454  private:
455 
457  bool guard_goalStateIs_RUNNING(
458  Signal signal
459  ) const;
460 
462  bool guard_shouldBreak(
463  Signal signal
464  ) const;
465 
467  bool guard_breakOnce(
468  Signal signal
469  ) const;
470 
471  private:
472 
474  FpySequencerComponentBase& m_component;
475 
476  };
477 
478  public:
479 
480  // ----------------------------------------------------------------------
481  // Component initialization
482  // ----------------------------------------------------------------------
483 
485  void init(
486  FwSizeType queueDepth,
487  FwEnumStoreType instance = 0
488  );
489 
490 #if !FW_DIRECT_PORT_CALLS
491 
492  public:
493 
494  // ----------------------------------------------------------------------
495  // Getters for special input ports
496  // ----------------------------------------------------------------------
497 
502  FwIndexType portNum
503  );
504 
505 #endif
506 
507 #if !FW_DIRECT_PORT_CALLS
508 
509  public:
510 
511  // ----------------------------------------------------------------------
512  // Getters for typed input ports
513  // ----------------------------------------------------------------------
514 
519  FwIndexType portNum
520  );
521 
526  FwIndexType portNum
527  );
528 
533  FwIndexType portNum
534  );
535 
540  FwIndexType portNum
541  );
542 
547  FwIndexType portNum
548  );
549 
554  FwIndexType portNum
555  );
556 
557 #endif
558 
559 #if !FW_DIRECT_PORT_CALLS
560 
561  public:
562 
563  // ----------------------------------------------------------------------
564  // Connect input ports to special output ports
565  // ----------------------------------------------------------------------
566 
569  FwIndexType portNum,
570  Fw::InputCmdRegPort* port
571  );
572 
575  FwIndexType portNum,
577  );
578 
581  FwIndexType portNum,
582  Fw::InputLogPort* port
583  );
584 
585 #if FW_ENABLE_TEXT_LOGGING == 1
586 
588  void set_logTextOut_OutputPort(
589  FwIndexType portNum,
590  Fw::InputLogTextPort* port
591  );
592 
593 #endif
594 
597  FwIndexType portNum,
598  Fw::InputPrmGetPort* port
599  );
600 
603  FwIndexType portNum,
604  Fw::InputPrmSetPort* port
605  );
606 
609  FwIndexType portNum,
610  Fw::InputTimePort* port
611  );
612 
615  FwIndexType portNum,
616  Fw::InputTlmPort* port
617  );
618 
619 #endif
620 
621 #if !FW_DIRECT_PORT_CALLS
622 
623  public:
624 
625  // ----------------------------------------------------------------------
626  // Connect typed input ports to typed output ports
627  // ----------------------------------------------------------------------
628 
631  FwIndexType portNum,
632  Fw::InputComPort* port
633  );
634 
637  FwIndexType portNum,
638  Fw::InputPrmGetPort* port
639  );
640 
643  FwIndexType portNum,
644  Fw::InputTlmGetPort* port
645  );
646 
649  FwIndexType portNum,
650  Svc::InputPingPort* port
651  );
652 
655  FwIndexType portNum,
657  );
658 
661  FwIndexType portNum,
663  );
664 
665 #endif
666 
667 #if !FW_DIRECT_PORT_CALLS && FW_PORT_SERIALIZATION
668 
669  public:
670 
671  // ----------------------------------------------------------------------
672  // Connect serial input ports to special output ports
673  // ----------------------------------------------------------------------
674 
677  FwIndexType portNum,
678  Fw::InputSerializePort* port
679  );
680 
683  FwIndexType portNum,
684  Fw::InputSerializePort* port
685  );
686 
689  FwIndexType portNum,
690  Fw::InputSerializePort* port
691  );
692 
693 #if FW_ENABLE_TEXT_LOGGING == 1
694 
696  void set_logTextOut_OutputPort(
697  FwIndexType portNum,
698  Fw::InputSerializePort* port
699  );
700 
701 #endif
702 
705  FwIndexType portNum,
706  Fw::InputSerializePort* port
707  );
708 
711  FwIndexType portNum,
712  Fw::InputSerializePort* port
713  );
714 
717  FwIndexType portNum,
718  Fw::InputSerializePort* port
719  );
720 
721 #endif
722 
723 #if !FW_DIRECT_PORT_CALLS && FW_PORT_SERIALIZATION
724 
725  public:
726 
727  // ----------------------------------------------------------------------
728  // Connect serial input ports to typed output ports
729  // ----------------------------------------------------------------------
730 
733  FwIndexType portNum,
734  Fw::InputSerializePort* port
735  );
736 
739  FwIndexType portNum,
740  Fw::InputSerializePort* port
741  );
742 
745  FwIndexType portNum,
746  Fw::InputSerializePort* port
747  );
748 
751  FwIndexType portNum,
752  Fw::InputSerializePort* port
753  );
754 
755 #endif
756 
757  public:
758 
759  // ----------------------------------------------------------------------
760  // Command registration
761  // ----------------------------------------------------------------------
762 
766  void regCommands();
767 
768  public:
769 
770  // ----------------------------------------------------------------------
771  // Parameter loading
772  // ----------------------------------------------------------------------
773 
777  void loadParameters();
778 
779  protected:
780 
781  // ----------------------------------------------------------------------
782  // Component construction and destruction
783  // ----------------------------------------------------------------------
784 
787  const char* compName = ""
788  );
789 
791  virtual ~FpySequencerComponentBase();
792 
793  protected:
794 
795  // ----------------------------------------------------------------------
796  // Getters for numbers of special input ports
797  // ----------------------------------------------------------------------
798 
803  return NUM_CMDIN_INPUT_PORTS;
804  }
805 
806  protected:
807 
808  // ----------------------------------------------------------------------
809  // Getters for numbers of typed input ports
810  // ----------------------------------------------------------------------
811 
817  }
818 
824  }
825 
830  return NUM_PINGIN_INPUT_PORTS;
831  }
832 
838  }
839 
845  }
846 
852  }
853 
854  protected:
855 
856  // ----------------------------------------------------------------------
857  // Getters for numbers of special output ports
858  // ----------------------------------------------------------------------
859 
865  }
866 
872  }
873 
879  }
880 
881 #if FW_ENABLE_TEXT_LOGGING == 1
882 
886  static constexpr FwIndexType getNum_logTextOut_OutputPorts() {
888  }
889 
890 #endif
891 
897  }
898 
904  }
905 
911  }
912 
918  }
919 
920  protected:
921 
922  // ----------------------------------------------------------------------
923  // Getters for numbers of typed output ports
924  // ----------------------------------------------------------------------
925 
931  }
932 
938  }
939 
945  }
946 
952  }
953 
959  }
960 
966  }
967 
968  protected:
969 
970  // ----------------------------------------------------------------------
971  // Connection status queries for special output ports
972  // ----------------------------------------------------------------------
973 
978  FwIndexType portNum
979  ) const;
980 
985  FwIndexType portNum
986  ) const;
987 
992  FwIndexType portNum
993  ) const;
994 
995 #if FW_ENABLE_TEXT_LOGGING == 1
996 
1000  bool isConnected_logTextOut_OutputPort(
1001  FwIndexType portNum
1002  ) const;
1003 
1004 #endif
1005 
1010  FwIndexType portNum
1011  ) const;
1012 
1017  FwIndexType portNum
1018  ) const;
1019 
1024  FwIndexType portNum
1025  ) const;
1026 
1031  FwIndexType portNum
1032  ) const;
1033 
1034  protected:
1035 
1036  // ----------------------------------------------------------------------
1037  // Connection status queries for typed output ports
1038  // ----------------------------------------------------------------------
1039 
1044  FwIndexType portNum
1045  ) const;
1046 
1051  FwIndexType portNum
1052  ) const;
1053 
1058  FwIndexType portNum
1059  ) const;
1060 
1065  FwIndexType portNum
1066  ) const;
1067 
1072  FwIndexType portNum
1073  ) const;
1074 
1079  FwIndexType portNum
1080  ) const;
1081 
1082 #if FW_DIRECT_PORT_CALLS
1083  public:
1084 #else
1085  protected:
1086 #endif
1087 
1088  // ----------------------------------------------------------------------
1089  // Port handler base-class functions for special input ports
1090  //
1091  // Call these functions directly to bypass the corresponding ports
1092  // ----------------------------------------------------------------------
1093 
1095  void cmdIn_handlerBase(
1096  FwIndexType portNum,
1097  FwOpcodeType opCode,
1098  U32 cmdSeq,
1099  Fw::CmdArgBuffer& args
1100  );
1101 
1102  protected:
1103 
1104  // ----------------------------------------------------------------------
1105  // Handlers to implement for typed input ports
1106  // ----------------------------------------------------------------------
1107 
1109  virtual void checkTimers_handler(
1110  FwIndexType portNum,
1111  U32 context
1112  ) = 0;
1113 
1115  virtual void cmdResponseIn_handler(
1116  FwIndexType portNum,
1117  FwOpcodeType opCode,
1118  U32 cmdSeq,
1119  const Fw::CmdResponse& response
1120  ) = 0;
1121 
1123  virtual void pingIn_handler(
1124  FwIndexType portNum,
1125  U32 key
1126  ) = 0;
1127 
1129  virtual void seqCancelIn_handler(
1130  FwIndexType portNum
1131  ) = 0;
1132 
1134  virtual void seqRunIn_handler(
1135  FwIndexType portNum,
1136  const Fw::StringBase& filename,
1137  const Svc::SeqArgs& args
1138  ) = 0;
1139 
1141  virtual void tlmWrite_handler(
1142  FwIndexType portNum,
1143  U32 context
1144  ) = 0;
1145 
1146 #if FW_DIRECT_PORT_CALLS
1147  public:
1148 #else
1149  protected:
1150 #endif
1151 
1152  // ----------------------------------------------------------------------
1153  // Port handler base-class functions for typed input ports
1154  //
1155  // Call these functions directly to bypass the corresponding ports
1156  // ----------------------------------------------------------------------
1157 
1160  FwIndexType portNum,
1161  U32 context
1162  );
1163 
1166  FwIndexType portNum,
1167  FwOpcodeType opCode,
1168  U32 cmdSeq,
1169  const Fw::CmdResponse& response
1170  );
1171 
1173  void pingIn_handlerBase(
1174  FwIndexType portNum,
1175  U32 key
1176  );
1177 
1180  FwIndexType portNum
1181  );
1182 
1184  void seqRunIn_handlerBase(
1185  FwIndexType portNum,
1186  const Fw::StringBase& filename,
1187  const Svc::SeqArgs& args
1188  );
1189 
1191  void tlmWrite_handlerBase(
1192  FwIndexType portNum,
1193  U32 context
1194  );
1195 
1196  protected:
1197 
1198  // ----------------------------------------------------------------------
1199  // Pre-message hooks for typed async input ports
1200  //
1201  // Each of these functions is invoked just before processing a message
1202  // on the corresponding port. By default, they do nothing. You can
1203  // override them to provide specific pre-message behavior.
1204  // ----------------------------------------------------------------------
1205 
1207  virtual void checkTimers_preMsgHook(
1208  FwIndexType portNum,
1209  U32 context
1210  );
1211 
1213  virtual void cmdResponseIn_preMsgHook(
1214  FwIndexType portNum,
1215  FwOpcodeType opCode,
1216  U32 cmdSeq,
1217  const Fw::CmdResponse& response
1218  );
1219 
1221  virtual void pingIn_preMsgHook(
1222  FwIndexType portNum,
1223  U32 key
1224  );
1225 
1227  virtual void seqCancelIn_preMsgHook(
1228  FwIndexType portNum
1229  );
1230 
1232  virtual void seqRunIn_preMsgHook(
1233  FwIndexType portNum,
1234  const Fw::StringBase& filename,
1235  const Svc::SeqArgs& args
1236  );
1237 
1239  virtual void tlmWrite_preMsgHook(
1240  FwIndexType portNum,
1241  U32 context
1242  );
1243 
1244  protected:
1245 
1246  // ----------------------------------------------------------------------
1247  // Invocation functions for typed output ports
1248  // ----------------------------------------------------------------------
1249 
1251  void cmdOut_out(
1252  FwIndexType portNum,
1253  Fw::ComBuffer& data,
1254  U32 context
1255  ) const;
1256 
1259  FwIndexType portNum,
1260  FwPrmIdType id,
1261  Fw::ParamBuffer& val
1262  ) const;
1264 
1267  FwIndexType portNum,
1268  FwChanIdType id,
1269  Fw::Time& timeTag,
1270  Fw::TlmBuffer& val
1271  ) const;
1274 
1276  void pingOut_out(
1277  FwIndexType portNum,
1278  U32 key
1279  ) const;
1280 
1282  void seqDoneOut_out(
1283  FwIndexType portNum,
1284  FwOpcodeType opCode,
1285  U32 cmdSeq,
1286  const Fw::CmdResponse& response
1287  ) const;
1288 
1290  void seqStartOut_out(
1291  FwIndexType portNum,
1292  const Fw::StringBase& filename,
1293  const Svc::SeqArgs& args
1294  ) const;
1295 
1296  protected:
1297 
1298  // ----------------------------------------------------------------------
1299  // Internal interface handlers
1300  // ----------------------------------------------------------------------
1301 
1304 
1307 
1310 
1313 
1316 
1319 
1322 
1324  virtual void directive_if_internalInterfaceHandler(const Svc::FpySequencer_IfDirective& directive) = 0;
1325 
1328 
1331 
1334 
1337 
1340 
1343 
1346 
1349 
1352 
1355 
1358 
1361 
1364 
1367 
1370 
1373 
1376 
1379 
1382 
1385 
1388 
1391 
1392  protected:
1393 
1394  // ----------------------------------------------------------------------
1395  // Internal interface base-class functions
1396  // ----------------------------------------------------------------------
1397 
1400 
1403 
1406 
1409 
1412 
1415 
1418 
1421 
1424 
1427 
1430 
1433 
1436 
1439 
1442 
1445 
1448 
1451 
1454 
1457 
1460 
1463 
1466 
1469 
1472 
1475 
1478 
1481 
1484 
1487 
1488  protected:
1489 
1490  // ----------------------------------------------------------------------
1491  // State getter functions
1492  // ----------------------------------------------------------------------
1493 
1496 
1497  protected:
1498 
1499  // ----------------------------------------------------------------------
1500  // Signal send functions
1501  // ----------------------------------------------------------------------
1502 
1506  );
1507 
1511  );
1512 
1516  );
1517 
1520 
1523  const Svc::FpySequencer_BreakpointArgs& value
1524  );
1525 
1528 
1531 
1534 
1537 
1540 
1543 
1546 
1549 
1552 
1555 
1558 
1561 
1564 
1567 
1570 
1573 
1576 
1579 
1582 
1585 
1588 
1589  protected:
1590 
1591  // ----------------------------------------------------------------------
1592  // Functions to implement for internal state machine actions
1593  // ----------------------------------------------------------------------
1594 
1599  SmId smId,
1601  ) = 0;
1602 
1607  SmId smId,
1610  ) = 0;
1611 
1616  SmId smId,
1619  ) = 0;
1620 
1625  SmId smId,
1628  ) = 0;
1629 
1634  SmId smId,
1636  ) = 0;
1637 
1642  SmId smId,
1644  ) = 0;
1645 
1650  SmId smId,
1652  ) = 0;
1653 
1658  SmId smId,
1660  ) = 0;
1661 
1666  SmId smId,
1668  ) = 0;
1669 
1674  SmId smId,
1676  ) = 0;
1677 
1682  SmId smId,
1684  ) = 0;
1685 
1690  SmId smId,
1692  ) = 0;
1693 
1698  SmId smId,
1700  ) = 0;
1701 
1706  SmId smId,
1708  ) = 0;
1709 
1714  SmId smId,
1716  ) = 0;
1717 
1722  SmId smId,
1724  ) = 0;
1725 
1730  SmId smId,
1732  ) = 0;
1733 
1738  SmId smId,
1740  ) = 0;
1741 
1746  SmId smId,
1748  ) = 0;
1749 
1754  SmId smId,
1756  ) = 0;
1757 
1762  SmId smId,
1764  ) = 0;
1765 
1770  SmId smId,
1772  ) = 0;
1773 
1778  SmId smId,
1780  ) = 0;
1781 
1786  SmId smId,
1788  ) = 0;
1789 
1794  SmId smId,
1796  const Svc::FpySequencer_BreakpointArgs& value
1797  ) = 0;
1798 
1803  SmId smId,
1805  ) = 0;
1806 
1811  SmId smId,
1813  ) = 0;
1814 
1815  protected:
1816 
1817  // ----------------------------------------------------------------------
1818  // Functions to implement for internal state machine guards
1819  // ----------------------------------------------------------------------
1820 
1825  SmId smId,
1827  ) const = 0;
1828 
1834  SmId smId,
1836  ) const = 0;
1837 
1842  SmId smId,
1844  ) const = 0;
1845 
1846  protected:
1847 
1848  // ----------------------------------------------------------------------
1849  // Command response
1850  // ----------------------------------------------------------------------
1851 
1853  void cmdResponse_out(
1854  FwOpcodeType opCode,
1855  U32 cmdSeq,
1856  Fw::CmdResponse response
1857  );
1858 
1859  protected:
1860 
1861  // ----------------------------------------------------------------------
1862  // Command handlers to implement
1863  // ----------------------------------------------------------------------
1864 
1868  virtual void RUN_cmdHandler(
1869  FwOpcodeType opCode,
1870  U32 cmdSeq,
1871  const Fw::CmdStringArg& fileName,
1872  Svc::BlockState block
1873  ) = 0;
1874 
1876  virtual void RUN_ARGS_cmdHandler(
1877  FwOpcodeType opCode,
1878  U32 cmdSeq,
1879  const Fw::CmdStringArg& fileName,
1880  Svc::BlockState block,
1881  Svc::SeqArgs buffer
1882  ) = 0;
1883 
1887  virtual void VALIDATE_cmdHandler(
1888  FwOpcodeType opCode,
1889  U32 cmdSeq,
1890  const Fw::CmdStringArg& fileName
1891  ) = 0;
1892 
1896  virtual void VALIDATE_ARGS_cmdHandler(
1897  FwOpcodeType opCode,
1898  U32 cmdSeq,
1899  const Fw::CmdStringArg& fileName,
1900  Svc::SeqArgs buffer
1901  ) = 0;
1902 
1906  virtual void RUN_VALIDATED_cmdHandler(
1907  FwOpcodeType opCode,
1908  U32 cmdSeq,
1909  Svc::BlockState block
1910  ) = 0;
1911 
1916  virtual void CANCEL_cmdHandler(
1917  FwOpcodeType opCode,
1918  U32 cmdSeq
1919  ) = 0;
1920 
1927  virtual void SET_BREAKPOINT_cmdHandler(
1928  FwOpcodeType opCode,
1929  U32 cmdSeq,
1930  U32 stmtIdx,
1931  bool breakOnce
1932  ) = 0;
1933 
1939  virtual void BREAK_cmdHandler(
1940  FwOpcodeType opCode,
1941  U32 cmdSeq
1942  ) = 0;
1943 
1948  virtual void CONTINUE_cmdHandler(
1949  FwOpcodeType opCode,
1950  U32 cmdSeq
1951  ) = 0;
1952 
1957  virtual void CLEAR_BREAKPOINT_cmdHandler(
1958  FwOpcodeType opCode,
1959  U32 cmdSeq
1960  ) = 0;
1961 
1966  virtual void STEP_cmdHandler(
1967  FwOpcodeType opCode,
1968  U32 cmdSeq
1969  ) = 0;
1970 
1974  virtual void DUMP_STACK_TO_FILE_cmdHandler(
1975  FwOpcodeType opCode,
1976  U32 cmdSeq,
1977  const Fw::CmdStringArg& fileName
1978  ) = 0;
1979 
1980  protected:
1981 
1982  // ----------------------------------------------------------------------
1983  // Command handler base-class functions
1984  //
1985  // Call these functions directly to bypass the command input port
1986  // ----------------------------------------------------------------------
1987 
1991  void RUN_cmdHandlerBase(
1992  FwOpcodeType opCode,
1993  U32 cmdSeq,
1994  Fw::CmdArgBuffer& args
1995  );
1996 
1999  FwOpcodeType opCode,
2000  U32 cmdSeq,
2001  Fw::CmdArgBuffer& args
2002  );
2003 
2008  FwOpcodeType opCode,
2009  U32 cmdSeq,
2010  Fw::CmdArgBuffer& args
2011  );
2012 
2017  FwOpcodeType opCode,
2018  U32 cmdSeq,
2019  Fw::CmdArgBuffer& args
2020  );
2021 
2026  FwOpcodeType opCode,
2027  U32 cmdSeq,
2028  Fw::CmdArgBuffer& args
2029  );
2030 
2035  void CANCEL_cmdHandlerBase(
2036  FwOpcodeType opCode,
2037  U32 cmdSeq,
2038  Fw::CmdArgBuffer& args
2039  );
2040 
2048  FwOpcodeType opCode,
2049  U32 cmdSeq,
2050  Fw::CmdArgBuffer& args
2051  );
2052 
2058  void BREAK_cmdHandlerBase(
2059  FwOpcodeType opCode,
2060  U32 cmdSeq,
2061  Fw::CmdArgBuffer& args
2062  );
2063 
2069  FwOpcodeType opCode,
2070  U32 cmdSeq,
2071  Fw::CmdArgBuffer& args
2072  );
2073 
2079  FwOpcodeType opCode,
2080  U32 cmdSeq,
2081  Fw::CmdArgBuffer& args
2082  );
2083 
2088  void STEP_cmdHandlerBase(
2089  FwOpcodeType opCode,
2090  U32 cmdSeq,
2091  Fw::CmdArgBuffer& args
2092  );
2093 
2098  FwOpcodeType opCode,
2099  U32 cmdSeq,
2100  Fw::CmdArgBuffer& args
2101  );
2102 
2103  protected:
2104 
2105  // ----------------------------------------------------------------------
2106  // Pre-message hooks for async commands
2107  //
2108  // Each of these functions is invoked just before processing the
2109  // corresponding command. By default they do nothing. You can
2110  // override them to provide specific pre-command behavior.
2111  // ----------------------------------------------------------------------
2112 
2114  virtual void RUN_preMsgHook(
2115  FwOpcodeType opCode,
2116  U32 cmdSeq
2117  );
2118 
2120  virtual void RUN_ARGS_preMsgHook(
2121  FwOpcodeType opCode,
2122  U32 cmdSeq
2123  );
2124 
2126  virtual void VALIDATE_preMsgHook(
2127  FwOpcodeType opCode,
2128  U32 cmdSeq
2129  );
2130 
2132  virtual void VALIDATE_ARGS_preMsgHook(
2133  FwOpcodeType opCode,
2134  U32 cmdSeq
2135  );
2136 
2138  virtual void RUN_VALIDATED_preMsgHook(
2139  FwOpcodeType opCode,
2140  U32 cmdSeq
2141  );
2142 
2144  virtual void CANCEL_preMsgHook(
2145  FwOpcodeType opCode,
2146  U32 cmdSeq
2147  );
2148 
2150  virtual void SET_BREAKPOINT_preMsgHook(
2151  FwOpcodeType opCode,
2152  U32 cmdSeq
2153  );
2154 
2156  virtual void BREAK_preMsgHook(
2157  FwOpcodeType opCode,
2158  U32 cmdSeq
2159  );
2160 
2162  virtual void CONTINUE_preMsgHook(
2163  FwOpcodeType opCode,
2164  U32 cmdSeq
2165  );
2166 
2168  virtual void CLEAR_BREAKPOINT_preMsgHook(
2169  FwOpcodeType opCode,
2170  U32 cmdSeq
2171  );
2172 
2174  virtual void STEP_preMsgHook(
2175  FwOpcodeType opCode,
2176  U32 cmdSeq
2177  );
2178 
2180  virtual void DUMP_STACK_TO_FILE_preMsgHook(
2181  FwOpcodeType opCode,
2182  U32 cmdSeq
2183  );
2184 
2185  protected:
2186 
2187  // ----------------------------------------------------------------------
2188  // Event logging functions
2189  // ----------------------------------------------------------------------
2190 
2192  void log_WARNING_HI_InvalidCommand(I32 state) const;
2193 
2195  void log_WARNING_HI_InvalidSeqRunCall(I32 state) const;
2196 
2198  void log_WARNING_HI_InvalidSeqCancelCall(I32 state) const;
2199 
2202  const Fw::StringBase& filePath,
2203  I32 errorCode
2204  ) const;
2205 
2208  FwSizeType writeSize,
2209  const Fw::StringBase& filePath,
2210  I32 errorCode
2211  ) const;
2212 
2216  const Fw::StringBase& filePath,
2217  I32 errorCode
2218  ) const;
2219 
2223  const Fw::StringBase& filePath
2224  ) const;
2225 
2229  const Fw::StringBase& filePath,
2230  I32 errorCode,
2231  U64 buffLeft,
2232  U64 buffLength
2233  ) const;
2234 
2237  U8 expected,
2238  U8 actual
2239  ) const;
2240 
2243  U32 expected,
2244  U32 actual
2245  ) const;
2246 
2248  void log_WARNING_HI_ExtraBytesInSequence(FwSizeType remaining) const;
2249 
2252  U64 bufferSize,
2253  const Fw::StringBase& filePath
2254  ) const;
2255 
2258  const Fw::StringBase& filePath,
2259  I32 errorCode
2260  ) const;
2261 
2264  const Fw::StringBase& baseDir,
2265  const Fw::StringBase& fileName
2266  ) const;
2267 
2270  FwOpcodeType opCode,
2271  U32 stmtIdx,
2272  const Fw::StringBase& filePath,
2273  Fw::CmdResponse response
2274  ) const;
2275 
2277  void log_ACTIVITY_HI_SequenceDone(const Fw::StringBase& filePath) const;
2278 
2280  void log_ACTIVITY_HI_SequenceCancelled(const Fw::StringBase& filePath) const;
2281 
2284  const Fw::StringBase& filePath,
2285  U8 errorCode
2286  ) const;
2287 
2290  U8 opcode,
2291  U32 stmtIdx,
2292  const Fw::StringBase& filePath
2293  ) const;
2294 
2297  I32 state,
2298  FwOpcodeType opcode,
2299  Fw::CmdResponse response
2300  ) const;
2301 
2304  FwOpcodeType opcode,
2305  Fw::CmdResponse response,
2306  U16 oldSequenceIdx,
2307  U16 currentSequenceIdx
2308  ) const;
2309 
2312  FwOpcodeType opcode,
2313  Fw::CmdResponse response
2314  ) const;
2315 
2318  FwOpcodeType opcode,
2319  Fw::CmdResponse response,
2320  U8 expectedDirectiveOpcode
2321  ) const;
2322 
2325  FwOpcodeType opcode,
2326  Fw::CmdResponse response,
2327  FwOpcodeType expectedOpcode
2328  ) const;
2329 
2332  FwOpcodeType opcode,
2333  Fw::CmdResponse response,
2334  U16 actualCmdIdx,
2335  U16 expectedCmdIdx
2336  ) const;
2337 
2340  U8 opcode,
2341  U32 stmtIdx,
2342  I32 errorCode,
2343  U64 buffLeft,
2344  U64 buffLength
2345  ) const;
2346 
2349  I32 internalTimeBase,
2350  I32 otherTimeBase
2351  ) const;
2352 
2355  I32 internalTimeContext,
2356  I32 otherTimeContext
2357  ) const;
2358 
2361  FwOpcodeType opCode,
2362  U32 stmtIdx,
2363  const Fw::StringBase& filePath
2364  ) const;
2365 
2368  U8 opCode,
2369  U32 stmtIdx,
2370  const Fw::StringBase& filePath
2371  ) const;
2372 
2375  U8 count,
2376  U8 max
2377  ) const;
2378 
2381  U16 count,
2382  U16 max
2383  ) const;
2384 
2387  Svc::Fpy::StackSizeType expected,
2388  FwSizeType actual,
2389  const Fw::StringBase& filePath
2390  ) const;
2391 
2394 
2396  void log_ACTIVITY_HI_SequencePaused(U32 stmtIdx) const;
2397 
2400  U32 breakpointIdx,
2401  bool breakOnce
2402  ) const;
2403 
2405  void log_ACTIVITY_HI_BreakpointCleared() const;
2406 
2408  void log_FATAL_LogFatal(
2409  const Fw::StringBase& filePath,
2410  const Fw::StringBase& message
2411  ) const;
2412 
2415  const Fw::StringBase& filePath,
2416  const Fw::StringBase& message
2417  ) const;
2418 
2421  const Fw::StringBase& filePath,
2422  const Fw::StringBase& message
2423  ) const;
2424 
2427  const Fw::StringBase& filePath,
2428  const Fw::StringBase& message
2429  ) const;
2430 
2433  const Fw::StringBase& filePath,
2434  const Fw::StringBase& message
2435  ) const;
2436 
2439  const Fw::StringBase& filePath,
2440  const Fw::StringBase& message
2441  ) const;
2442 
2445  const Fw::StringBase& filePath,
2446  const Fw::StringBase& message
2447  ) const;
2448 
2449  protected:
2450 
2451  // ----------------------------------------------------------------------
2452  // Telemetry serialized write
2453  // ----------------------------------------------------------------------
2454 
2459  void tlmWrite(
2460  FwChanIdType id,
2461  Fw::TlmBuffer& _tlmBuff,
2462  Fw::Time _tlmTime = Fw::Time()
2463  ) const;
2464 
2465  protected:
2466 
2467  // ----------------------------------------------------------------------
2468  // Telemetry write functions
2469  // ----------------------------------------------------------------------
2470 
2474  void tlmWrite_State(
2475  FwEnumStoreType arg,
2476  Fw::Time _tlmTime = Fw::Time()
2477  );
2478 
2483  U64 arg,
2484  Fw::Time _tlmTime = Fw::Time()
2485  );
2486 
2491  U64 arg,
2492  Fw::Time _tlmTime = Fw::Time()
2493  );
2494 
2499  U64 arg,
2500  Fw::Time _tlmTime = Fw::Time()
2501  );
2502 
2509  U64 arg,
2510  Fw::Time _tlmTime = Fw::Time()
2511  );
2512 
2517  U64 arg,
2518  Fw::Time _tlmTime = Fw::Time()
2519  );
2520 
2525  const Svc::Fpy::DirectiveErrorCode& arg,
2526  Fw::Time _tlmTime = Fw::Time()
2527  );
2528 
2533  U64 arg,
2534  Fw::Time _tlmTime = Fw::Time()
2535  );
2536 
2541  const Svc::Fpy::DirectiveId& arg,
2542  Fw::Time _tlmTime = Fw::Time()
2543  );
2544 
2548  void tlmWrite_SeqPath(
2549  const Fw::StringBase& arg,
2550  Fw::Time _tlmTime = Fw::Time()
2551  );
2552 
2557  bool arg,
2558  Fw::Time _tlmTime = Fw::Time()
2559  );
2560 
2565  bool arg,
2566  Fw::Time _tlmTime = Fw::Time()
2567  );
2568 
2573  U8 arg,
2574  Fw::Time _tlmTime = Fw::Time()
2575  );
2576 
2581  U32 arg,
2582  Fw::Time _tlmTime = Fw::Time()
2583  );
2584 
2589  FwOpcodeType arg,
2590  Fw::Time _tlmTime = Fw::Time()
2591  );
2592 
2598  Fw::Time _tlmTime = Fw::Time()
2599  );
2600 
2605  bool arg,
2606  Fw::Time _tlmTime = Fw::Time()
2607  );
2608 
2614  U32 arg,
2615  Fw::Time _tlmTime = Fw::Time()
2616  );
2617 
2622  bool arg,
2623  Fw::Time _tlmTime = Fw::Time()
2624  );
2625 
2632  bool arg,
2633  Fw::Time _tlmTime = Fw::Time()
2634  );
2635 
2640  F32 arg,
2641  Fw::Time _tlmTime = Fw::Time()
2642  );
2643 
2648  const Fw::StringBase& arg,
2649  Fw::Time _tlmTime = Fw::Time()
2650  );
2651 
2652  protected:
2653 
2654  // ----------------------------------------------------------------------
2655  // Parameter hook functions
2656  // ----------------------------------------------------------------------
2657 
2661  virtual void parameterUpdated(
2662  FwPrmIdType id
2663  );
2664 
2668  virtual void parametersLoaded();
2669 
2670  protected:
2671 
2672  // ----------------------------------------------------------------------
2673  // Parameter get functions
2674  // ----------------------------------------------------------------------
2675 
2685  Fw::ParamValid& valid
2686  );
2687 
2697  Fw::ParamValid& valid
2698  );
2699 
2700  protected:
2701 
2702  // ----------------------------------------------------------------------
2703  // Time
2704  // ----------------------------------------------------------------------
2705 
2709  Fw::Time getTime() const;
2710 
2711  private:
2712 
2713  // ----------------------------------------------------------------------
2714  // Message dispatch functions
2715  // ----------------------------------------------------------------------
2716 
2718  virtual MsgDispatchStatus doDispatch();
2719 
2720  private:
2721 
2722  // ----------------------------------------------------------------------
2723  // Calls for messages received on special input ports
2724  // ----------------------------------------------------------------------
2725 
2727  static void m_p_cmdIn_in(
2728  Fw::PassiveComponentBase* callComp,
2729  FwIndexType portNum,
2730  FwOpcodeType opCode,
2731  U32 cmdSeq,
2732  Fw::CmdArgBuffer& args
2733  );
2734 
2735  private:
2736 
2737  // ----------------------------------------------------------------------
2738  // Calls for messages received on typed input ports
2739  // ----------------------------------------------------------------------
2740 
2742  static void m_p_checkTimers_in(
2743  Fw::PassiveComponentBase* callComp,
2744  FwIndexType portNum,
2745  U32 context
2746  );
2747 
2749  static void m_p_cmdResponseIn_in(
2750  Fw::PassiveComponentBase* callComp,
2751  FwIndexType portNum,
2752  FwOpcodeType opCode,
2753  U32 cmdSeq,
2754  const Fw::CmdResponse& response
2755  );
2756 
2758  static void m_p_pingIn_in(
2759  Fw::PassiveComponentBase* callComp,
2760  FwIndexType portNum,
2761  U32 key
2762  );
2763 
2765  static void m_p_seqCancelIn_in(
2766  Fw::PassiveComponentBase* callComp,
2767  FwIndexType portNum
2768  );
2769 
2771  static void m_p_seqRunIn_in(
2772  Fw::PassiveComponentBase* callComp,
2773  FwIndexType portNum,
2774  const Fw::StringBase& filename,
2775  const Svc::SeqArgs& args
2776  );
2777 
2779  static void m_p_tlmWrite_in(
2780  Fw::PassiveComponentBase* callComp,
2781  FwIndexType portNum,
2782  U32 context
2783  );
2784 
2785  private:
2786 
2787  // ----------------------------------------------------------------------
2788  // Invocation functions for special output ports
2789  // ----------------------------------------------------------------------
2790 
2792  void cmdRegOut_out(
2793  FwIndexType portNum,
2794  FwOpcodeType opCode
2795  ) const;
2796 
2798  void cmdResponseOut_out(
2799  FwIndexType portNum,
2800  FwOpcodeType opCode,
2801  U32 cmdSeq,
2802  const Fw::CmdResponse& response
2803  ) const;
2804 
2806  void logOut_out(
2807  FwIndexType portNum,
2808  FwEventIdType id,
2809  Fw::Time& timeTag,
2810  const Fw::LogSeverity& severity,
2811  Fw::LogBuffer& args
2812  ) const;
2813 
2814 #if FW_ENABLE_TEXT_LOGGING
2815 
2817  void logTextOut_out(
2818  FwIndexType portNum,
2819  FwEventIdType id,
2820  Fw::Time& timeTag,
2821  const Fw::LogSeverity& severity,
2822  Fw::TextLogString& text
2823  ) const;
2824 
2825 #endif
2826 
2828  Fw::ParamValid prmGet_out(
2829  FwIndexType portNum,
2830  FwPrmIdType id,
2831  Fw::ParamBuffer& val
2832  ) const;
2834 
2836  void prmSet_out(
2837  FwIndexType portNum,
2838  FwPrmIdType id,
2839  Fw::ParamBuffer& val
2840  ) const;
2841 
2843  void timeCaller_out(
2844  FwIndexType portNum,
2845  Fw::Time& time
2846  ) const;
2847 
2849  void tlmOut_out(
2850  FwIndexType portNum,
2851  FwChanIdType id,
2852  Fw::Time& timeTag,
2853  Fw::TlmBuffer& val
2854  ) const;
2855 
2856  private:
2857 
2858  // ----------------------------------------------------------------------
2859  // Send signal helper functions
2860  // ----------------------------------------------------------------------
2861 
2863  void sendSignalStart(
2864  SmId smId,
2865  FwEnumStoreType signal,
2866  Fw::SerialBufferBase& buffer
2867  );
2868 
2870  void sequencer_sendSignalFinish(
2871  Fw::LinearBufferBase& buffer
2872  );
2873 
2874  private:
2875 
2876  // ----------------------------------------------------------------------
2877  // Helper functions for state machine dispatch
2878  // ----------------------------------------------------------------------
2879 
2881  void smDispatch(
2882  Fw::SerialBufferBase& buffer
2883  );
2884 
2886  static void deserializeSmIdAndSignal(
2887  Fw::SerialBufferBase& buffer,
2888  FwEnumStoreType& smId,
2889  FwEnumStoreType& signal
2890  );
2891 
2893  void Svc_FpySequencer_SequencerStateMachine_smDispatch(
2894  Fw::SerialBufferBase& buffer,
2895  Svc_FpySequencer_SequencerStateMachine& sm,
2897  );
2898 
2899  private:
2900 
2901  // ----------------------------------------------------------------------
2902  // Parameter set functions
2903  // ----------------------------------------------------------------------
2904 
2908  Fw::CmdResponse paramSet_STATEMENT_TIMEOUT_SECS(
2909  Fw::SerialBufferBase& val
2910  );
2911 
2915  Fw::CmdResponse paramSet_SEQ_BASE_DIR(
2916  Fw::SerialBufferBase& val
2917  );
2918 
2919  private:
2920 
2921  // ----------------------------------------------------------------------
2922  // Parameter save functions
2923  // ----------------------------------------------------------------------
2924 
2928  Fw::CmdResponse paramSave_STATEMENT_TIMEOUT_SECS();
2929 
2933  Fw::CmdResponse paramSave_SEQ_BASE_DIR();
2934 
2935 #if !FW_DIRECT_PORT_CALLS
2936 
2937  private:
2938 
2939  // ----------------------------------------------------------------------
2940  // Special input ports
2941  // ----------------------------------------------------------------------
2942 
2944  Fw::InputCmdPort m_cmdIn_InputPort[NUM_CMDIN_INPUT_PORTS];
2945 
2946 #endif
2947 
2948 #if !FW_DIRECT_PORT_CALLS
2949 
2950  private:
2951 
2952  // ----------------------------------------------------------------------
2953  // Typed input ports
2954  // ----------------------------------------------------------------------
2955 
2957  Svc::InputSchedPort m_checkTimers_InputPort[NUM_CHECKTIMERS_INPUT_PORTS];
2958 
2960  Fw::InputCmdResponsePort m_cmdResponseIn_InputPort[NUM_CMDRESPONSEIN_INPUT_PORTS];
2961 
2963  Svc::InputPingPort m_pingIn_InputPort[NUM_PINGIN_INPUT_PORTS];
2964 
2967 
2969  Svc::InputCmdSeqInPort m_seqRunIn_InputPort[NUM_SEQRUNIN_INPUT_PORTS];
2970 
2972  Svc::InputSchedPort m_tlmWrite_InputPort[NUM_TLMWRITE_INPUT_PORTS];
2973 
2974 #endif
2975 
2976 #if !FW_DIRECT_PORT_CALLS
2977 
2978  private:
2979 
2980  // ----------------------------------------------------------------------
2981  // Special output ports
2982  // ----------------------------------------------------------------------
2983 
2985  Fw::OutputCmdRegPort m_cmdRegOut_OutputPort[NUM_CMDREGOUT_OUTPUT_PORTS];
2986 
2988  Fw::OutputCmdResponsePort m_cmdResponseOut_OutputPort[NUM_CMDRESPONSEOUT_OUTPUT_PORTS];
2989 
2991  Fw::OutputLogPort m_logOut_OutputPort[NUM_LOGOUT_OUTPUT_PORTS];
2992 
2993 #if FW_ENABLE_TEXT_LOGGING == 1
2994 
2996  Fw::OutputLogTextPort m_logTextOut_OutputPort[NUM_LOGTEXTOUT_OUTPUT_PORTS];
2997 
2998 #endif
2999 
3001  Fw::OutputPrmGetPort m_prmGet_OutputPort[NUM_PRMGET_OUTPUT_PORTS];
3002 
3004  Fw::OutputPrmSetPort m_prmSet_OutputPort[NUM_PRMSET_OUTPUT_PORTS];
3005 
3007  Fw::OutputTimePort m_timeCaller_OutputPort[NUM_TIMECALLER_OUTPUT_PORTS];
3008 
3010  Fw::OutputTlmPort m_tlmOut_OutputPort[NUM_TLMOUT_OUTPUT_PORTS];
3011 
3012 #endif
3013 
3014 #if !FW_DIRECT_PORT_CALLS
3015 
3016  private:
3017 
3018  // ----------------------------------------------------------------------
3019  // Typed output ports
3020  // ----------------------------------------------------------------------
3021 
3023  Fw::OutputComPort m_cmdOut_OutputPort[NUM_CMDOUT_OUTPUT_PORTS];
3024 
3026  Fw::OutputPrmGetPort m_getParam_OutputPort[NUM_GETPARAM_OUTPUT_PORTS];
3027 
3029  Fw::OutputTlmGetPort m_getTlmChan_OutputPort[NUM_GETTLMCHAN_OUTPUT_PORTS];
3030 
3032  Svc::OutputPingPort m_pingOut_OutputPort[NUM_PINGOUT_OUTPUT_PORTS];
3033 
3035  Fw::OutputCmdResponsePort m_seqDoneOut_OutputPort[NUM_SEQDONEOUT_OUTPUT_PORTS];
3036 
3038  Svc::OutputCmdSeqInPort m_seqStartOut_OutputPort[NUM_SEQSTARTOUT_OUTPUT_PORTS];
3039 
3040 #endif
3041 
3042  private:
3043 
3044  // ----------------------------------------------------------------------
3045  // First update flags for telemetry channels
3046  // ----------------------------------------------------------------------
3047 
3049  bool m_first_update_State = true;
3050 
3052  bool m_first_update_SequencesSucceeded = true;
3053 
3055  bool m_first_update_SequencesFailed = true;
3056 
3058  bool m_first_update_SequencesCancelled = true;
3059 
3061  bool m_first_update_StatementsDispatched = true;
3062 
3064  bool m_first_update_StatementsFailed = true;
3065 
3067  bool m_first_update_LastDirectiveError = true;
3068 
3070  bool m_first_update_DirectiveErrorIndex = true;
3071 
3073  bool m_first_update_DirectiveErrorId = true;
3074 
3076  bool m_first_update_SeqPath = true;
3077 
3079  bool m_first_update_Debug_ReachedEndOfFile = true;
3080 
3082  bool m_first_update_Debug_NextStatementReadSuccess = true;
3083 
3085  bool m_first_update_Debug_NextStatementOpcode = true;
3086 
3088  bool m_first_update_Debug_NextStatementIndex = true;
3089 
3091  bool m_first_update_Debug_NextCmdOpcode = true;
3092 
3094  bool m_first_update_Debug_StackSize = true;
3095 
3097  bool m_first_update_BreakpointInUse = true;
3098 
3100  bool m_first_update_BreakpointIndex = true;
3101 
3103  bool m_first_update_BreakOnlyOnceOnBreakpoint = true;
3104 
3106  bool m_first_update_BreakBeforeNextLine = true;
3107 
3109  bool m_first_update_PRM_STATEMENT_TIMEOUT_SECS = true;
3110 
3112  bool m_first_update_PRM_SEQ_BASE_DIR = true;
3113 
3114  private:
3115 
3116  // ----------------------------------------------------------------------
3117  // Last value storage for telemetry channels
3118  // ----------------------------------------------------------------------
3119 
3121  FwEnumStoreType m_last_State = {};
3122 
3124  U64 m_last_SequencesSucceeded = {};
3125 
3127  U64 m_last_SequencesFailed = {};
3128 
3130  U64 m_last_SequencesCancelled = {};
3131 
3133  U64 m_last_StatementsDispatched = {};
3134 
3136  U64 m_last_StatementsFailed = {};
3137 
3139  Svc::Fpy::DirectiveErrorCode m_last_LastDirectiveError = {};
3140 
3142  U64 m_last_DirectiveErrorIndex = {};
3143 
3145  Svc::Fpy::DirectiveId m_last_DirectiveErrorId = {};
3146 
3148  Fw::TlmString m_last_SeqPath = {};
3149 
3151  bool m_last_Debug_ReachedEndOfFile = {};
3152 
3154  bool m_last_Debug_NextStatementReadSuccess = {};
3155 
3157  U8 m_last_Debug_NextStatementOpcode = {};
3158 
3160  U32 m_last_Debug_NextStatementIndex = {};
3161 
3163  FwOpcodeType m_last_Debug_NextCmdOpcode = {};
3164 
3166  Svc::Fpy::StackSizeType m_last_Debug_StackSize = {};
3167 
3169  bool m_last_BreakpointInUse = {};
3170 
3172  U32 m_last_BreakpointIndex = {};
3173 
3175  bool m_last_BreakOnlyOnceOnBreakpoint = {};
3176 
3178  bool m_last_BreakBeforeNextLine = {};
3179 
3181  F32 m_last_PRM_STATEMENT_TIMEOUT_SECS = {};
3182 
3184  Fw::TlmString m_last_PRM_SEQ_BASE_DIR = {};
3185 
3186  private:
3187 
3188  // ----------------------------------------------------------------------
3189  // Parameter validity flags
3190  // ----------------------------------------------------------------------
3191 
3193  Fw::ParamValid m_param_STATEMENT_TIMEOUT_SECS_valid = Fw::ParamValid::UNINIT;
3194 
3196  Fw::ParamValid m_param_SEQ_BASE_DIR_valid = Fw::ParamValid::UNINIT;
3197 
3198  private:
3199 
3200  // ----------------------------------------------------------------------
3201  // Parameter variables
3202  // ----------------------------------------------------------------------
3203 
3210  F32 m_STATEMENT_TIMEOUT_SECS;
3211 
3218  Fw::ParamString m_SEQ_BASE_DIR;
3219 
3220  private:
3221 
3222  // ----------------------------------------------------------------------
3223  // State machine instances
3224  // ----------------------------------------------------------------------
3225 
3227  Svc_FpySequencer_SequencerStateMachine m_stateMachine_sequencer;
3228 
3229  private:
3230 
3231  // ----------------------------------------------------------------------
3232  // Mutexes
3233  // ----------------------------------------------------------------------
3234 
3236  Os::Mutex m_paramLock;
3237 
3238  };
3239 
3240 }
3241 
3242 #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
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 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()
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
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 log_WARNING_HI_SequenceFilePathTooLong(const Fw::StringBase &baseDir, const Fw::StringBase &fileName) const
Log event SequenceFilePathTooLong.
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.
Loads and validates a sequence with arguments.
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 log_WARNING_HI_FileApiError(const Fw::StringBase &filePath, I32 errorCode) const
Log event FileApiError.
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())
Loads, validates and runs a sequence.
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_setSeed_internalInterfaceHandler(const Svc::FpySequencer_SetSeedDirective &directive)=0
Internal interface handler for directive_setSeed.
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
void tlmWrite_PRM_SEQ_BASE_DIR(const Fw::StringBase &arg, Fw::Time _tlmTime=Fw::Time())
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.
Writes the contents of the stack to a file. This command is only valid in the RUNNING.PAUSED state.
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()
void directive_pushRand_internalInterfaceInvoke(const Svc::FpySequencer_PushRandDirective &directive)
Internal interface base-class function for directive_pushRand.
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.
Fw::ParamString paramGet_SEQ_BASE_DIR(Fw::ParamValid &valid)
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.
void directive_setSeed_internalInterfaceInvoke(const Svc::FpySequencer_SetSeedDirective &directive)
Internal interface base-class function for directive_setSeed.
loads a value from an absolute address in the stack (for global variables)
virtual void directive_pushRand_internalInterfaceHandler(const Svc::FpySequencer_PushRandDirective &directive)=0
Internal interface handler for directive_pushRand.
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()
pops a U32 from the stack and uses it to seed the RNG used by PushRandDirective
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.
Must be called after VALIDATE. Runs the sequence that was validated.
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())