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 #include "Fw/Log/LogTextPortAc.hpp"
23 #if !FW_DIRECT_PORT_CALLS
25 #endif
26 #if !FW_DIRECT_PORT_CALLS
28 #endif
29 #include "Fw/Prm/PrmGetPortAc.hpp"
30 #include "Fw/Prm/PrmSetPortAc.hpp"
31 #include "Fw/Prm/PrmString.hpp"
32 #include "Fw/Time/TimePortAc.hpp"
33 #include "Fw/Tlm/TlmGetPortAc.hpp"
34 #include "Fw/Tlm/TlmPortAc.hpp"
35 #include "Fw/Tlm/TlmString.hpp"
37 #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,
179  };
180 
182  enum {
227  };
228 
230  enum {
253  };
254 
256  enum {
258  PARAMID_SEQ_BASE_DIR = 0x1,
262  };
266 
268  enum class SmId : FwEnumStoreType {
269  sequencer,
270  };
271 
272  protected:
273 
274  // ----------------------------------------------------------------------
275  // Types for internal state machines
276  // ----------------------------------------------------------------------
277 
281  {
282 
283  // ----------------------------------------------------------------------
284  // Friend classes
285  // ----------------------------------------------------------------------
286 
290  friend class FpySequencerTester;
291 
292  public:
293 
296  FpySequencerComponentBase& component
297  );
298 
299  public:
300 
302  void init(
304  );
305 
306  public:
307 
310 
311  private:
312 
314  void action_signalEntered(
315  Signal signal
316  );
317 
319  void action_setSequenceFilePath(
320  Signal signal,
322  );
323 
325  void action_setSequenceBlockState(
326  Signal signal,
328  );
329 
331  void action_setSequenceArguments(
332  Signal signal,
334  );
335 
337  void action_validate(
338  Signal signal
339  );
340 
342  void action_report_seqSucceeded(
343  Signal signal
344  );
345 
347  void action_report_seqCancelled(
348  Signal signal
349  );
350 
352  void action_report_seqFailed(
353  Signal signal
354  );
355 
357  void action_report_seqStarted(
358  Signal signal
359  );
360 
362  void action_setGoalState_RUNNING(
363  Signal signal
364  );
365 
367  void action_setGoalState_VALID(
368  Signal signal
369  );
370 
372  void action_setGoalState_IDLE(
373  Signal signal
374  );
375 
377  void action_sendCmdResponse_OK(
378  Signal signal
379  );
380 
382  void action_sendCmdResponse_EXECUTION_ERROR(
383  Signal signal
384  );
385 
387  void action_clearSequenceFile(
388  Signal signal
389  );
390 
392  void action_clearBreakpoint(
393  Signal signal
394  );
395 
397  void action_clearSequenceArguments(
398  Signal signal
399  );
400 
402  void action_checkShouldWake(
403  Signal signal
404  );
405 
407  void action_dispatchStatement(
408  Signal signal
409  );
410 
412  void action_resetRuntime(
413  Signal signal
414  );
415 
417  void action_checkStatementTimeout(
418  Signal signal
419  );
420 
422  void action_incrementSequenceCounter(
423  Signal signal
424  );
425 
427  void action_pushArgsToStack(
428  Signal signal
429  );
430 
432  void action_report_seqBroken(
433  Signal signal
434  );
435 
437  void action_setBreakpoint(
438  Signal signal,
440  );
441 
443  void action_setBreakBeforeNextLine(
444  Signal signal
445  );
446 
448  void action_clearBreakBeforeNextLine(
449  Signal signal
450  );
451 
452  private:
453 
455  bool guard_goalStateIs_RUNNING(
456  Signal signal
457  ) const;
458 
460  bool guard_shouldBreak(
461  Signal signal
462  ) const;
463 
465  bool guard_breakOnce(
466  Signal signal
467  ) const;
468 
469  private:
470 
472  FpySequencerComponentBase& m_component;
473 
474  };
475 
476  public:
477 
478  // ----------------------------------------------------------------------
479  // Component initialization
480  // ----------------------------------------------------------------------
481 
483  void init(
484  FwSizeType queueDepth,
485  FwEnumStoreType instance = 0
486  );
487 
488 #if !FW_DIRECT_PORT_CALLS
489 
490  public:
491 
492  // ----------------------------------------------------------------------
493  // Getters for special input ports
494  // ----------------------------------------------------------------------
495 
500  FwIndexType portNum
501  );
502 
503 #endif
504 
505 #if !FW_DIRECT_PORT_CALLS
506 
507  public:
508 
509  // ----------------------------------------------------------------------
510  // Getters for typed input ports
511  // ----------------------------------------------------------------------
512 
517  FwIndexType portNum
518  );
519 
524  FwIndexType portNum
525  );
526 
531  FwIndexType portNum
532  );
533 
538  FwIndexType portNum
539  );
540 
545  FwIndexType portNum
546  );
547 
552  FwIndexType portNum
553  );
554 
555 #endif
556 
557 #if !FW_DIRECT_PORT_CALLS
558 
559  public:
560 
561  // ----------------------------------------------------------------------
562  // Connect input ports to special output ports
563  // ----------------------------------------------------------------------
564 
567  FwIndexType portNum,
568  Fw::InputCmdRegPort* port
569  );
570 
573  FwIndexType portNum,
575  );
576 
579  FwIndexType portNum,
580  Fw::InputLogPort* port
581  );
582 
583 #if FW_ENABLE_TEXT_LOGGING == 1
584 
586  void set_logTextOut_OutputPort(
587  FwIndexType portNum,
588  Fw::InputLogTextPort* port
589  );
590 
591 #endif
592 
595  FwIndexType portNum,
596  Fw::InputPrmGetPort* port
597  );
598 
601  FwIndexType portNum,
602  Fw::InputPrmSetPort* port
603  );
604 
607  FwIndexType portNum,
608  Fw::InputTimePort* port
609  );
610 
613  FwIndexType portNum,
614  Fw::InputTlmPort* port
615  );
616 
617 #endif
618 
619 #if !FW_DIRECT_PORT_CALLS
620 
621  public:
622 
623  // ----------------------------------------------------------------------
624  // Connect typed input ports to typed output ports
625  // ----------------------------------------------------------------------
626 
629  FwIndexType portNum,
630  Fw::InputComPort* port
631  );
632 
635  FwIndexType portNum,
636  Fw::InputPrmGetPort* port
637  );
638 
641  FwIndexType portNum,
642  Fw::InputTlmGetPort* port
643  );
644 
647  FwIndexType portNum,
648  Svc::InputPingPort* port
649  );
650 
653  FwIndexType portNum,
655  );
656 
659  FwIndexType portNum,
661  );
662 
663 #endif
664 
665 #if !FW_DIRECT_PORT_CALLS && FW_PORT_SERIALIZATION
666 
667  public:
668 
669  // ----------------------------------------------------------------------
670  // Connect serial input ports to special output ports
671  // ----------------------------------------------------------------------
672 
675  FwIndexType portNum,
676  Fw::InputSerializePort* port
677  );
678 
681  FwIndexType portNum,
682  Fw::InputSerializePort* port
683  );
684 
687  FwIndexType portNum,
688  Fw::InputSerializePort* port
689  );
690 
691 #if FW_ENABLE_TEXT_LOGGING == 1
692 
694  void set_logTextOut_OutputPort(
695  FwIndexType portNum,
696  Fw::InputSerializePort* port
697  );
698 
699 #endif
700 
703  FwIndexType portNum,
704  Fw::InputSerializePort* port
705  );
706 
709  FwIndexType portNum,
710  Fw::InputSerializePort* port
711  );
712 
715  FwIndexType portNum,
716  Fw::InputSerializePort* port
717  );
718 
719 #endif
720 
721 #if !FW_DIRECT_PORT_CALLS && FW_PORT_SERIALIZATION
722 
723  public:
724 
725  // ----------------------------------------------------------------------
726  // Connect serial input ports to typed output ports
727  // ----------------------------------------------------------------------
728 
731  FwIndexType portNum,
732  Fw::InputSerializePort* port
733  );
734 
737  FwIndexType portNum,
738  Fw::InputSerializePort* port
739  );
740 
743  FwIndexType portNum,
744  Fw::InputSerializePort* port
745  );
746 
749  FwIndexType portNum,
750  Fw::InputSerializePort* port
751  );
752 
753 #endif
754 
755  public:
756 
757  // ----------------------------------------------------------------------
758  // Command registration
759  // ----------------------------------------------------------------------
760 
764  void regCommands();
765 
766  public:
767 
768  // ----------------------------------------------------------------------
769  // Parameter loading
770  // ----------------------------------------------------------------------
771 
775  void loadParameters();
776 
777  protected:
778 
779  // ----------------------------------------------------------------------
780  // Component construction and destruction
781  // ----------------------------------------------------------------------
782 
785  const char* compName = ""
786  );
787 
789  virtual ~FpySequencerComponentBase();
790 
791  protected:
792 
793  // ----------------------------------------------------------------------
794  // Getters for numbers of special input ports
795  // ----------------------------------------------------------------------
796 
801  return NUM_CMDIN_INPUT_PORTS;
802  }
803 
804  protected:
805 
806  // ----------------------------------------------------------------------
807  // Getters for numbers of typed input ports
808  // ----------------------------------------------------------------------
809 
815  }
816 
822  }
823 
828  return NUM_PINGIN_INPUT_PORTS;
829  }
830 
836  }
837 
843  }
844 
850  }
851 
852  protected:
853 
854  // ----------------------------------------------------------------------
855  // Getters for numbers of special output ports
856  // ----------------------------------------------------------------------
857 
863  }
864 
870  }
871 
877  }
878 
879 #if FW_ENABLE_TEXT_LOGGING == 1
880 
884  static constexpr FwIndexType getNum_logTextOut_OutputPorts() {
886  }
887 
888 #endif
889 
895  }
896 
902  }
903 
909  }
910 
916  }
917 
918  protected:
919 
920  // ----------------------------------------------------------------------
921  // Getters for numbers of typed output ports
922  // ----------------------------------------------------------------------
923 
929  }
930 
936  }
937 
943  }
944 
950  }
951 
957  }
958 
964  }
965 
966  protected:
967 
968  // ----------------------------------------------------------------------
969  // Connection status queries for special output ports
970  // ----------------------------------------------------------------------
971 
976  FwIndexType portNum
977  ) const;
978 
983  FwIndexType portNum
984  ) const;
985 
990  FwIndexType portNum
991  ) const;
992 
993 #if FW_ENABLE_TEXT_LOGGING == 1
994 
998  bool isConnected_logTextOut_OutputPort(
999  FwIndexType portNum
1000  ) const;
1001 
1002 #endif
1003 
1008  FwIndexType portNum
1009  ) const;
1010 
1015  FwIndexType portNum
1016  ) const;
1017 
1022  FwIndexType portNum
1023  ) const;
1024 
1029  FwIndexType portNum
1030  ) const;
1031 
1032  protected:
1033 
1034  // ----------------------------------------------------------------------
1035  // Connection status queries for typed output ports
1036  // ----------------------------------------------------------------------
1037 
1042  FwIndexType portNum
1043  ) const;
1044 
1049  FwIndexType portNum
1050  ) const;
1051 
1056  FwIndexType portNum
1057  ) const;
1058 
1063  FwIndexType portNum
1064  ) const;
1065 
1070  FwIndexType portNum
1071  ) const;
1072 
1077  FwIndexType portNum
1078  ) const;
1079 
1080 #if FW_DIRECT_PORT_CALLS
1081  public:
1082 #else
1083  protected:
1084 #endif
1085 
1086  // ----------------------------------------------------------------------
1087  // Port handler base-class functions for special input ports
1088  //
1089  // Call these functions directly to bypass the corresponding ports
1090  // ----------------------------------------------------------------------
1091 
1093  void cmdIn_handlerBase(
1094  FwIndexType portNum,
1095  FwOpcodeType opCode,
1096  U32 cmdSeq,
1097  Fw::CmdArgBuffer& args
1098  );
1099 
1100  protected:
1101 
1102  // ----------------------------------------------------------------------
1103  // Handlers to implement for typed input ports
1104  // ----------------------------------------------------------------------
1105 
1107  virtual void checkTimers_handler(
1108  FwIndexType portNum,
1109  U32 context
1110  ) = 0;
1111 
1113  virtual void cmdResponseIn_handler(
1114  FwIndexType portNum,
1115  FwOpcodeType opCode,
1116  U32 cmdSeq,
1117  const Fw::CmdResponse& response
1118  ) = 0;
1119 
1121  virtual void pingIn_handler(
1122  FwIndexType portNum,
1123  U32 key
1124  ) = 0;
1125 
1127  virtual void seqCancelIn_handler(
1128  FwIndexType portNum
1129  ) = 0;
1130 
1132  virtual void seqRunIn_handler(
1133  FwIndexType portNum,
1134  const Fw::StringBase& filename,
1135  const Svc::SeqArgs& args
1136  ) = 0;
1137 
1139  virtual void tlmWrite_handler(
1140  FwIndexType portNum,
1141  U32 context
1142  ) = 0;
1143 
1144 #if FW_DIRECT_PORT_CALLS
1145  public:
1146 #else
1147  protected:
1148 #endif
1149 
1150  // ----------------------------------------------------------------------
1151  // Port handler base-class functions for typed input ports
1152  //
1153  // Call these functions directly to bypass the corresponding ports
1154  // ----------------------------------------------------------------------
1155 
1158  FwIndexType portNum,
1159  U32 context
1160  );
1161 
1164  FwIndexType portNum,
1165  FwOpcodeType opCode,
1166  U32 cmdSeq,
1167  const Fw::CmdResponse& response
1168  );
1169 
1171  void pingIn_handlerBase(
1172  FwIndexType portNum,
1173  U32 key
1174  );
1175 
1178  FwIndexType portNum
1179  );
1180 
1182  void seqRunIn_handlerBase(
1183  FwIndexType portNum,
1184  const Fw::StringBase& filename,
1185  const Svc::SeqArgs& args
1186  );
1187 
1189  void tlmWrite_handlerBase(
1190  FwIndexType portNum,
1191  U32 context
1192  );
1193 
1194  protected:
1195 
1196  // ----------------------------------------------------------------------
1197  // Pre-message hooks for typed async input ports
1198  //
1199  // Each of these functions is invoked just before processing a message
1200  // on the corresponding port. By default, they do nothing. You can
1201  // override them to provide specific pre-message behavior.
1202  // ----------------------------------------------------------------------
1203 
1205  virtual void checkTimers_preMsgHook(
1206  FwIndexType portNum,
1207  U32 context
1208  );
1209 
1211  virtual void cmdResponseIn_preMsgHook(
1212  FwIndexType portNum,
1213  FwOpcodeType opCode,
1214  U32 cmdSeq,
1215  const Fw::CmdResponse& response
1216  );
1217 
1219  virtual void pingIn_preMsgHook(
1220  FwIndexType portNum,
1221  U32 key
1222  );
1223 
1225  virtual void seqCancelIn_preMsgHook(
1226  FwIndexType portNum
1227  );
1228 
1230  virtual void seqRunIn_preMsgHook(
1231  FwIndexType portNum,
1232  const Fw::StringBase& filename,
1233  const Svc::SeqArgs& args
1234  );
1235 
1237  virtual void tlmWrite_preMsgHook(
1238  FwIndexType portNum,
1239  U32 context
1240  );
1241 
1242  protected:
1243 
1244  // ----------------------------------------------------------------------
1245  // Invocation functions for typed output ports
1246  // ----------------------------------------------------------------------
1247 
1249  void cmdOut_out(
1250  FwIndexType portNum,
1251  Fw::ComBuffer& data,
1252  U32 context
1253  ) const;
1254 
1257  FwIndexType portNum,
1258  FwPrmIdType id,
1259  Fw::ParamBuffer& val
1260  ) const;
1262 
1265  FwIndexType portNum,
1266  FwChanIdType id,
1267  Fw::Time& timeTag,
1268  Fw::TlmBuffer& val
1269  ) const;
1272 
1274  void pingOut_out(
1275  FwIndexType portNum,
1276  U32 key
1277  ) const;
1278 
1280  void seqDoneOut_out(
1281  FwIndexType portNum,
1282  FwOpcodeType opCode,
1283  U32 cmdSeq,
1284  const Fw::CmdResponse& response
1285  ) const;
1286 
1288  void seqStartOut_out(
1289  FwIndexType portNum,
1290  const Fw::StringBase& filename,
1291  const Svc::SeqArgs& args
1292  ) const;
1293 
1294  protected:
1295 
1296  // ----------------------------------------------------------------------
1297  // Internal interface handlers
1298  // ----------------------------------------------------------------------
1299 
1302 
1305 
1308 
1311 
1314 
1317 
1320 
1322  virtual void directive_if_internalInterfaceHandler(const Svc::FpySequencer_IfDirective& directive) = 0;
1323 
1326 
1329 
1332 
1335 
1338 
1341 
1344 
1347 
1350 
1353 
1356 
1359 
1362 
1365 
1368 
1371 
1374 
1377 
1380 
1383 
1386 
1389 
1390  protected:
1391 
1392  // ----------------------------------------------------------------------
1393  // Internal interface base-class functions
1394  // ----------------------------------------------------------------------
1395 
1398 
1401 
1404 
1407 
1410 
1413 
1416 
1419 
1422 
1425 
1428 
1431 
1434 
1437 
1440 
1443 
1446 
1449 
1452 
1455 
1458 
1461 
1464 
1467 
1470 
1473 
1476 
1479 
1482 
1485 
1486  protected:
1487 
1488  // ----------------------------------------------------------------------
1489  // State getter functions
1490  // ----------------------------------------------------------------------
1491 
1494 
1495  protected:
1496 
1497  // ----------------------------------------------------------------------
1498  // Signal send functions
1499  // ----------------------------------------------------------------------
1500 
1504  );
1505 
1509  );
1510 
1514  );
1515 
1518 
1521  const Svc::FpySequencer_BreakpointArgs& value
1522  );
1523 
1526 
1529 
1532 
1535 
1538 
1541 
1544 
1547 
1550 
1553 
1556 
1559 
1562 
1565 
1568 
1571 
1574 
1577 
1580 
1583 
1586 
1587  protected:
1588 
1589  // ----------------------------------------------------------------------
1590  // Functions to implement for internal state machine actions
1591  // ----------------------------------------------------------------------
1592 
1597  SmId smId,
1599  ) = 0;
1600 
1605  SmId smId,
1608  ) = 0;
1609 
1614  SmId smId,
1617  ) = 0;
1618 
1623  SmId smId,
1626  ) = 0;
1627 
1632  SmId smId,
1634  ) = 0;
1635 
1640  SmId smId,
1642  ) = 0;
1643 
1648  SmId smId,
1650  ) = 0;
1651 
1656  SmId smId,
1658  ) = 0;
1659 
1664  SmId smId,
1666  ) = 0;
1667 
1672  SmId smId,
1674  ) = 0;
1675 
1680  SmId smId,
1682  ) = 0;
1683 
1688  SmId smId,
1690  ) = 0;
1691 
1696  SmId smId,
1698  ) = 0;
1699 
1704  SmId smId,
1706  ) = 0;
1707 
1712  SmId smId,
1714  ) = 0;
1715 
1720  SmId smId,
1722  ) = 0;
1723 
1728  SmId smId,
1730  ) = 0;
1731 
1736  SmId smId,
1738  ) = 0;
1739 
1744  SmId smId,
1746  ) = 0;
1747 
1752  SmId smId,
1754  ) = 0;
1755 
1760  SmId smId,
1762  ) = 0;
1763 
1768  SmId smId,
1770  ) = 0;
1771 
1776  SmId smId,
1778  ) = 0;
1779 
1784  SmId smId,
1786  ) = 0;
1787 
1792  SmId smId,
1794  const Svc::FpySequencer_BreakpointArgs& value
1795  ) = 0;
1796 
1801  SmId smId,
1803  ) = 0;
1804 
1809  SmId smId,
1811  ) = 0;
1812 
1813  protected:
1814 
1815  // ----------------------------------------------------------------------
1816  // Functions to implement for internal state machine guards
1817  // ----------------------------------------------------------------------
1818 
1823  SmId smId,
1825  ) const = 0;
1826 
1832  SmId smId,
1834  ) const = 0;
1835 
1840  SmId smId,
1842  ) const = 0;
1843 
1844  protected:
1845 
1846  // ----------------------------------------------------------------------
1847  // Command response
1848  // ----------------------------------------------------------------------
1849 
1851  void cmdResponse_out(
1852  FwOpcodeType opCode,
1853  U32 cmdSeq,
1854  Fw::CmdResponse response
1855  );
1856 
1857  protected:
1858 
1859  // ----------------------------------------------------------------------
1860  // Command handlers to implement
1861  // ----------------------------------------------------------------------
1862 
1866  virtual void RUN_cmdHandler(
1867  FwOpcodeType opCode,
1868  U32 cmdSeq,
1869  const Fw::CmdStringArg& fileName,
1870  Svc::BlockState block
1871  ) = 0;
1872 
1874  virtual void RUN_ARGS_cmdHandler(
1875  FwOpcodeType opCode,
1876  U32 cmdSeq,
1877  const Fw::CmdStringArg& fileName,
1878  Svc::BlockState block,
1879  Svc::SeqArgs buffer
1880  ) = 0;
1881 
1885  virtual void VALIDATE_cmdHandler(
1886  FwOpcodeType opCode,
1887  U32 cmdSeq,
1888  const Fw::CmdStringArg& fileName
1889  ) = 0;
1890 
1894  virtual void VALIDATE_ARGS_cmdHandler(
1895  FwOpcodeType opCode,
1896  U32 cmdSeq,
1897  const Fw::CmdStringArg& fileName,
1898  Svc::SeqArgs buffer
1899  ) = 0;
1900 
1904  virtual void RUN_VALIDATED_cmdHandler(
1905  FwOpcodeType opCode,
1906  U32 cmdSeq,
1907  Svc::BlockState block
1908  ) = 0;
1909 
1914  virtual void CANCEL_cmdHandler(
1915  FwOpcodeType opCode,
1916  U32 cmdSeq
1917  ) = 0;
1918 
1925  virtual void SET_BREAKPOINT_cmdHandler(
1926  FwOpcodeType opCode,
1927  U32 cmdSeq,
1928  U32 stmtIdx,
1929  bool breakOnce
1930  ) = 0;
1931 
1937  virtual void BREAK_cmdHandler(
1938  FwOpcodeType opCode,
1939  U32 cmdSeq
1940  ) = 0;
1941 
1946  virtual void CONTINUE_cmdHandler(
1947  FwOpcodeType opCode,
1948  U32 cmdSeq
1949  ) = 0;
1950 
1955  virtual void CLEAR_BREAKPOINT_cmdHandler(
1956  FwOpcodeType opCode,
1957  U32 cmdSeq
1958  ) = 0;
1959 
1964  virtual void STEP_cmdHandler(
1965  FwOpcodeType opCode,
1966  U32 cmdSeq
1967  ) = 0;
1968 
1972  virtual void DUMP_STACK_TO_FILE_cmdHandler(
1973  FwOpcodeType opCode,
1974  U32 cmdSeq,
1975  const Fw::CmdStringArg& fileName
1976  ) = 0;
1977 
1978  protected:
1979 
1980  // ----------------------------------------------------------------------
1981  // Command handler base-class functions
1982  //
1983  // Call these functions directly to bypass the command input port
1984  // ----------------------------------------------------------------------
1985 
1989  void RUN_cmdHandlerBase(
1990  FwOpcodeType opCode,
1991  U32 cmdSeq,
1992  Fw::CmdArgBuffer& args
1993  );
1994 
1997  FwOpcodeType opCode,
1998  U32 cmdSeq,
1999  Fw::CmdArgBuffer& args
2000  );
2001 
2006  FwOpcodeType opCode,
2007  U32 cmdSeq,
2008  Fw::CmdArgBuffer& args
2009  );
2010 
2015  FwOpcodeType opCode,
2016  U32 cmdSeq,
2017  Fw::CmdArgBuffer& args
2018  );
2019 
2024  FwOpcodeType opCode,
2025  U32 cmdSeq,
2026  Fw::CmdArgBuffer& args
2027  );
2028 
2033  void CANCEL_cmdHandlerBase(
2034  FwOpcodeType opCode,
2035  U32 cmdSeq,
2036  Fw::CmdArgBuffer& args
2037  );
2038 
2046  FwOpcodeType opCode,
2047  U32 cmdSeq,
2048  Fw::CmdArgBuffer& args
2049  );
2050 
2056  void BREAK_cmdHandlerBase(
2057  FwOpcodeType opCode,
2058  U32 cmdSeq,
2059  Fw::CmdArgBuffer& args
2060  );
2061 
2067  FwOpcodeType opCode,
2068  U32 cmdSeq,
2069  Fw::CmdArgBuffer& args
2070  );
2071 
2077  FwOpcodeType opCode,
2078  U32 cmdSeq,
2079  Fw::CmdArgBuffer& args
2080  );
2081 
2086  void STEP_cmdHandlerBase(
2087  FwOpcodeType opCode,
2088  U32 cmdSeq,
2089  Fw::CmdArgBuffer& args
2090  );
2091 
2096  FwOpcodeType opCode,
2097  U32 cmdSeq,
2098  Fw::CmdArgBuffer& args
2099  );
2100 
2101  protected:
2102 
2103  // ----------------------------------------------------------------------
2104  // Pre-message hooks for async commands
2105  //
2106  // Each of these functions is invoked just before processing the
2107  // corresponding command. By default they do nothing. You can
2108  // override them to provide specific pre-command behavior.
2109  // ----------------------------------------------------------------------
2110 
2112  virtual void RUN_preMsgHook(
2113  FwOpcodeType opCode,
2114  U32 cmdSeq
2115  );
2116 
2118  virtual void RUN_ARGS_preMsgHook(
2119  FwOpcodeType opCode,
2120  U32 cmdSeq
2121  );
2122 
2124  virtual void VALIDATE_preMsgHook(
2125  FwOpcodeType opCode,
2126  U32 cmdSeq
2127  );
2128 
2130  virtual void VALIDATE_ARGS_preMsgHook(
2131  FwOpcodeType opCode,
2132  U32 cmdSeq
2133  );
2134 
2136  virtual void RUN_VALIDATED_preMsgHook(
2137  FwOpcodeType opCode,
2138  U32 cmdSeq
2139  );
2140 
2142  virtual void CANCEL_preMsgHook(
2143  FwOpcodeType opCode,
2144  U32 cmdSeq
2145  );
2146 
2148  virtual void SET_BREAKPOINT_preMsgHook(
2149  FwOpcodeType opCode,
2150  U32 cmdSeq
2151  );
2152 
2154  virtual void BREAK_preMsgHook(
2155  FwOpcodeType opCode,
2156  U32 cmdSeq
2157  );
2158 
2160  virtual void CONTINUE_preMsgHook(
2161  FwOpcodeType opCode,
2162  U32 cmdSeq
2163  );
2164 
2166  virtual void CLEAR_BREAKPOINT_preMsgHook(
2167  FwOpcodeType opCode,
2168  U32 cmdSeq
2169  );
2170 
2172  virtual void STEP_preMsgHook(
2173  FwOpcodeType opCode,
2174  U32 cmdSeq
2175  );
2176 
2178  virtual void DUMP_STACK_TO_FILE_preMsgHook(
2179  FwOpcodeType opCode,
2180  U32 cmdSeq
2181  );
2182 
2183  protected:
2184 
2185  // ----------------------------------------------------------------------
2186  // Event logging functions
2187  // ----------------------------------------------------------------------
2188 
2190  void log_WARNING_HI_InvalidCommand(I32 state) const;
2191 
2193  void log_WARNING_HI_InvalidSeqRunCall(I32 state) const;
2194 
2196  void log_WARNING_HI_InvalidSeqCancelCall(I32 state) const;
2197 
2200  const Fw::StringBase& filePath,
2201  I32 errorCode
2202  ) const;
2203 
2206  FwSizeType writeSize,
2207  const Fw::StringBase& filePath,
2208  I32 errorCode
2209  ) const;
2210 
2214  const Fw::StringBase& filePath,
2215  I32 errorCode
2216  ) const;
2217 
2221  const Fw::StringBase& filePath
2222  ) const;
2223 
2227  const Fw::StringBase& filePath,
2228  I32 errorCode,
2229  U64 buffLeft,
2230  U64 buffLength
2231  ) const;
2232 
2235  U8 expected,
2236  U8 actual
2237  ) const;
2238 
2241  U32 expected,
2242  U32 actual
2243  ) const;
2244 
2246  void log_WARNING_HI_ExtraBytesInSequence(FwSizeType remaining) const;
2247 
2250  U64 bufferSize,
2251  const Fw::StringBase& filePath
2252  ) const;
2253 
2256  const Fw::StringBase& filePath,
2257  I32 errorCode
2258  ) const;
2259 
2262  const Fw::StringBase& baseDir,
2263  const Fw::StringBase& fileName
2264  ) const;
2265 
2268  FwOpcodeType opCode,
2269  U32 stmtIdx,
2270  const Fw::StringBase& filePath,
2271  Fw::CmdResponse response
2272  ) const;
2273 
2275  void log_ACTIVITY_HI_SequenceDone(const Fw::StringBase& filePath) const;
2276 
2278  void log_ACTIVITY_HI_SequenceCancelled(const Fw::StringBase& filePath) const;
2279 
2282  const Fw::StringBase& filePath,
2283  U8 errorCode
2284  ) const;
2285 
2288  U8 opcode,
2289  U32 stmtIdx,
2290  const Fw::StringBase& filePath
2291  ) const;
2292 
2295  I32 state,
2296  FwOpcodeType opcode,
2297  Fw::CmdResponse response
2298  ) const;
2299 
2302  FwOpcodeType opcode,
2303  Fw::CmdResponse response,
2304  U16 oldSequenceIdx,
2305  U16 currentSequenceIdx
2306  ) const;
2307 
2310  FwOpcodeType opcode,
2311  Fw::CmdResponse response
2312  ) const;
2313 
2316  FwOpcodeType opcode,
2317  Fw::CmdResponse response,
2318  U8 expectedDirectiveOpcode
2319  ) const;
2320 
2323  FwOpcodeType opcode,
2324  Fw::CmdResponse response,
2325  FwOpcodeType expectedOpcode
2326  ) const;
2327 
2330  FwOpcodeType opcode,
2331  Fw::CmdResponse response,
2332  U16 actualCmdIdx,
2333  U16 expectedCmdIdx
2334  ) const;
2335 
2338  U8 opcode,
2339  U32 stmtIdx,
2340  I32 errorCode,
2341  U64 buffLeft,
2342  U64 buffLength
2343  ) const;
2344 
2347  I32 internalTimeBase,
2348  I32 otherTimeBase
2349  ) const;
2350 
2353  I32 internalTimeContext,
2354  I32 otherTimeContext
2355  ) const;
2356 
2359  FwOpcodeType opCode,
2360  U32 stmtIdx,
2361  const Fw::StringBase& filePath
2362  ) const;
2363 
2366  U8 opCode,
2367  U32 stmtIdx,
2368  const Fw::StringBase& filePath
2369  ) const;
2370 
2373  U8 count,
2374  U8 max
2375  ) const;
2376 
2379  U16 count,
2380  U16 max
2381  ) const;
2382 
2385  Svc::Fpy::StackSizeType expected,
2386  FwSizeType actual,
2387  const Fw::StringBase& filePath
2388  ) const;
2389 
2392 
2394  void log_ACTIVITY_HI_SequencePaused(U32 stmtIdx) const;
2395 
2398  U32 breakpointIdx,
2399  bool breakOnce
2400  ) const;
2401 
2403  void log_ACTIVITY_HI_BreakpointCleared() const;
2404 
2406  void log_FATAL_LogFatal(
2407  const Fw::StringBase& filePath,
2408  const Fw::StringBase& message
2409  ) const;
2410 
2413  const Fw::StringBase& filePath,
2414  const Fw::StringBase& message
2415  ) const;
2416 
2419  const Fw::StringBase& filePath,
2420  const Fw::StringBase& message
2421  ) const;
2422 
2425  const Fw::StringBase& filePath,
2426  const Fw::StringBase& message
2427  ) const;
2428 
2431  const Fw::StringBase& filePath,
2432  const Fw::StringBase& message
2433  ) const;
2434 
2437  const Fw::StringBase& filePath,
2438  const Fw::StringBase& message
2439  ) const;
2440 
2443  const Fw::StringBase& filePath,
2444  const Fw::StringBase& message
2445  ) const;
2446 
2447  protected:
2448 
2449  // ----------------------------------------------------------------------
2450  // Telemetry serialized write
2451  // ----------------------------------------------------------------------
2452 
2457  void tlmWrite(
2458  FwChanIdType id,
2459  Fw::TlmBuffer& _tlmBuff,
2460  Fw::Time _tlmTime = Fw::Time()
2461  ) const;
2462 
2463  protected:
2464 
2465  // ----------------------------------------------------------------------
2466  // Telemetry write functions
2467  // ----------------------------------------------------------------------
2468 
2472  void tlmWrite_State(
2473  FwEnumStoreType arg,
2474  Fw::Time _tlmTime = Fw::Time()
2475  );
2476 
2481  U64 arg,
2482  Fw::Time _tlmTime = Fw::Time()
2483  );
2484 
2489  U64 arg,
2490  Fw::Time _tlmTime = Fw::Time()
2491  );
2492 
2497  U64 arg,
2498  Fw::Time _tlmTime = Fw::Time()
2499  );
2500 
2507  U64 arg,
2508  Fw::Time _tlmTime = Fw::Time()
2509  );
2510 
2515  U64 arg,
2516  Fw::Time _tlmTime = Fw::Time()
2517  );
2518 
2523  const Svc::Fpy::DirectiveErrorCode& arg,
2524  Fw::Time _tlmTime = Fw::Time()
2525  );
2526 
2531  U64 arg,
2532  Fw::Time _tlmTime = Fw::Time()
2533  );
2534 
2539  const Svc::Fpy::DirectiveId& arg,
2540  Fw::Time _tlmTime = Fw::Time()
2541  );
2542 
2546  void tlmWrite_SeqPath(
2547  const Fw::StringBase& arg,
2548  Fw::Time _tlmTime = Fw::Time()
2549  );
2550 
2555  bool arg,
2556  Fw::Time _tlmTime = Fw::Time()
2557  );
2558 
2563  bool arg,
2564  Fw::Time _tlmTime = Fw::Time()
2565  );
2566 
2571  U8 arg,
2572  Fw::Time _tlmTime = Fw::Time()
2573  );
2574 
2579  U32 arg,
2580  Fw::Time _tlmTime = Fw::Time()
2581  );
2582 
2587  FwOpcodeType arg,
2588  Fw::Time _tlmTime = Fw::Time()
2589  );
2590 
2596  Fw::Time _tlmTime = Fw::Time()
2597  );
2598 
2603  bool arg,
2604  Fw::Time _tlmTime = Fw::Time()
2605  );
2606 
2612  U32 arg,
2613  Fw::Time _tlmTime = Fw::Time()
2614  );
2615 
2620  bool arg,
2621  Fw::Time _tlmTime = Fw::Time()
2622  );
2623 
2630  bool arg,
2631  Fw::Time _tlmTime = Fw::Time()
2632  );
2633 
2638  F32 arg,
2639  Fw::Time _tlmTime = Fw::Time()
2640  );
2641 
2646  const Fw::StringBase& arg,
2647  Fw::Time _tlmTime = Fw::Time()
2648  );
2649 
2650  protected:
2651 
2652  // ----------------------------------------------------------------------
2653  // Parameter hook functions
2654  // ----------------------------------------------------------------------
2655 
2659  virtual void parameterUpdated(
2660  FwPrmIdType id
2661  );
2662 
2666  virtual void parametersLoaded();
2667 
2668  protected:
2669 
2670  // ----------------------------------------------------------------------
2671  // Parameter get functions
2672  // ----------------------------------------------------------------------
2673 
2683  Fw::ParamValid& valid
2684  );
2685 
2695  Fw::ParamValid& valid
2696  );
2697 
2698  protected:
2699 
2700  // ----------------------------------------------------------------------
2701  // Time
2702  // ----------------------------------------------------------------------
2703 
2707  Fw::Time getTime() const;
2708 
2709  private:
2710 
2711  // ----------------------------------------------------------------------
2712  // Message dispatch functions
2713  // ----------------------------------------------------------------------
2714 
2716  virtual MsgDispatchStatus doDispatch();
2717 
2718  private:
2719 
2720  // ----------------------------------------------------------------------
2721  // Calls for messages received on special input ports
2722  // ----------------------------------------------------------------------
2723 
2725  static void m_p_cmdIn_in(
2726  Fw::PassiveComponentBase* callComp,
2727  FwIndexType portNum,
2728  FwOpcodeType opCode,
2729  U32 cmdSeq,
2730  Fw::CmdArgBuffer& args
2731  );
2732 
2733  private:
2734 
2735  // ----------------------------------------------------------------------
2736  // Calls for messages received on typed input ports
2737  // ----------------------------------------------------------------------
2738 
2740  static void m_p_checkTimers_in(
2741  Fw::PassiveComponentBase* callComp,
2742  FwIndexType portNum,
2743  U32 context
2744  );
2745 
2747  static void m_p_cmdResponseIn_in(
2748  Fw::PassiveComponentBase* callComp,
2749  FwIndexType portNum,
2750  FwOpcodeType opCode,
2751  U32 cmdSeq,
2752  const Fw::CmdResponse& response
2753  );
2754 
2756  static void m_p_pingIn_in(
2757  Fw::PassiveComponentBase* callComp,
2758  FwIndexType portNum,
2759  U32 key
2760  );
2761 
2763  static void m_p_seqCancelIn_in(
2764  Fw::PassiveComponentBase* callComp,
2765  FwIndexType portNum
2766  );
2767 
2769  static void m_p_seqRunIn_in(
2770  Fw::PassiveComponentBase* callComp,
2771  FwIndexType portNum,
2772  const Fw::StringBase& filename,
2773  const Svc::SeqArgs& args
2774  );
2775 
2777  static void m_p_tlmWrite_in(
2778  Fw::PassiveComponentBase* callComp,
2779  FwIndexType portNum,
2780  U32 context
2781  );
2782 
2783  private:
2784 
2785  // ----------------------------------------------------------------------
2786  // Invocation functions for special output ports
2787  // ----------------------------------------------------------------------
2788 
2790  void cmdRegOut_out(
2791  FwIndexType portNum,
2792  FwOpcodeType opCode
2793  ) const;
2794 
2796  void cmdResponseOut_out(
2797  FwIndexType portNum,
2798  FwOpcodeType opCode,
2799  U32 cmdSeq,
2800  const Fw::CmdResponse& response
2801  ) const;
2802 
2804  void logOut_out(
2805  FwIndexType portNum,
2806  FwEventIdType id,
2807  Fw::Time& timeTag,
2808  const Fw::LogSeverity& severity,
2809  Fw::LogBuffer& args
2810  ) const;
2811 
2812 #if FW_ENABLE_TEXT_LOGGING
2813 
2815  void logTextOut_out(
2816  FwIndexType portNum,
2817  FwEventIdType id,
2818  Fw::Time& timeTag,
2819  const Fw::LogSeverity& severity,
2820  Fw::TextLogString& text
2821  ) const;
2822 
2823 #endif
2824 
2826  Fw::ParamValid prmGet_out(
2827  FwIndexType portNum,
2828  FwPrmIdType id,
2829  Fw::ParamBuffer& val
2830  ) const;
2832 
2834  void prmSet_out(
2835  FwIndexType portNum,
2836  FwPrmIdType id,
2837  Fw::ParamBuffer& val
2838  ) const;
2839 
2841  void timeCaller_out(
2842  FwIndexType portNum,
2843  Fw::Time& time
2844  ) const;
2845 
2847  void tlmOut_out(
2848  FwIndexType portNum,
2849  FwChanIdType id,
2850  Fw::Time& timeTag,
2851  Fw::TlmBuffer& val
2852  ) const;
2853 
2854  private:
2855 
2856  // ----------------------------------------------------------------------
2857  // Send signal helper functions
2858  // ----------------------------------------------------------------------
2859 
2861  void sendSignalStart(
2862  SmId smId,
2863  FwEnumStoreType signal,
2864  Fw::SerialBufferBase& buffer
2865  );
2866 
2868  void sequencer_sendSignalFinish(
2869  Fw::LinearBufferBase& buffer
2870  );
2871 
2872  private:
2873 
2874  // ----------------------------------------------------------------------
2875  // Helper functions for state machine dispatch
2876  // ----------------------------------------------------------------------
2877 
2879  void smDispatch(
2880  Fw::SerialBufferBase& buffer
2881  );
2882 
2884  static void deserializeSmIdAndSignal(
2885  Fw::SerialBufferBase& buffer,
2886  FwEnumStoreType& smId,
2887  FwEnumStoreType& signal
2888  );
2889 
2891  void Svc_FpySequencer_SequencerStateMachine_smDispatch(
2892  Fw::SerialBufferBase& buffer,
2893  Svc_FpySequencer_SequencerStateMachine& sm,
2895  );
2896 
2897  private:
2898 
2899  // ----------------------------------------------------------------------
2900  // Parameter set functions
2901  // ----------------------------------------------------------------------
2902 
2906  Fw::CmdResponse paramSet_STATEMENT_TIMEOUT_SECS(
2907  Fw::SerialBufferBase& val
2908  );
2909 
2913  Fw::CmdResponse paramSet_SEQ_BASE_DIR(
2914  Fw::SerialBufferBase& val
2915  );
2916 
2917  private:
2918 
2919  // ----------------------------------------------------------------------
2920  // Parameter save functions
2921  // ----------------------------------------------------------------------
2922 
2926  Fw::CmdResponse paramSave_STATEMENT_TIMEOUT_SECS();
2927 
2931  Fw::CmdResponse paramSave_SEQ_BASE_DIR();
2932 
2933 #if !FW_DIRECT_PORT_CALLS
2934 
2935  private:
2936 
2937  // ----------------------------------------------------------------------
2938  // Special input ports
2939  // ----------------------------------------------------------------------
2940 
2942  Fw::InputCmdPort m_cmdIn_InputPort[NUM_CMDIN_INPUT_PORTS];
2943 
2944 #endif
2945 
2946 #if !FW_DIRECT_PORT_CALLS
2947 
2948  private:
2949 
2950  // ----------------------------------------------------------------------
2951  // Typed input ports
2952  // ----------------------------------------------------------------------
2953 
2955  Svc::InputSchedPort m_checkTimers_InputPort[NUM_CHECKTIMERS_INPUT_PORTS];
2956 
2958  Fw::InputCmdResponsePort m_cmdResponseIn_InputPort[NUM_CMDRESPONSEIN_INPUT_PORTS];
2959 
2961  Svc::InputPingPort m_pingIn_InputPort[NUM_PINGIN_INPUT_PORTS];
2962 
2965 
2967  Svc::InputCmdSeqInPort m_seqRunIn_InputPort[NUM_SEQRUNIN_INPUT_PORTS];
2968 
2970  Svc::InputSchedPort m_tlmWrite_InputPort[NUM_TLMWRITE_INPUT_PORTS];
2971 
2972 #endif
2973 
2974 #if !FW_DIRECT_PORT_CALLS
2975 
2976  private:
2977 
2978  // ----------------------------------------------------------------------
2979  // Special output ports
2980  // ----------------------------------------------------------------------
2981 
2983  Fw::OutputCmdRegPort m_cmdRegOut_OutputPort[NUM_CMDREGOUT_OUTPUT_PORTS];
2984 
2986  Fw::OutputCmdResponsePort m_cmdResponseOut_OutputPort[NUM_CMDRESPONSEOUT_OUTPUT_PORTS];
2987 
2989  Fw::OutputLogPort m_logOut_OutputPort[NUM_LOGOUT_OUTPUT_PORTS];
2990 
2991 #if FW_ENABLE_TEXT_LOGGING == 1
2992 
2994  Fw::OutputLogTextPort m_logTextOut_OutputPort[NUM_LOGTEXTOUT_OUTPUT_PORTS];
2995 
2996 #endif
2997 
2999  Fw::OutputPrmGetPort m_prmGet_OutputPort[NUM_PRMGET_OUTPUT_PORTS];
3000 
3002  Fw::OutputPrmSetPort m_prmSet_OutputPort[NUM_PRMSET_OUTPUT_PORTS];
3003 
3005  Fw::OutputTimePort m_timeCaller_OutputPort[NUM_TIMECALLER_OUTPUT_PORTS];
3006 
3008  Fw::OutputTlmPort m_tlmOut_OutputPort[NUM_TLMOUT_OUTPUT_PORTS];
3009 
3010 #endif
3011 
3012 #if !FW_DIRECT_PORT_CALLS
3013 
3014  private:
3015 
3016  // ----------------------------------------------------------------------
3017  // Typed output ports
3018  // ----------------------------------------------------------------------
3019 
3021  Fw::OutputComPort m_cmdOut_OutputPort[NUM_CMDOUT_OUTPUT_PORTS];
3022 
3024  Fw::OutputPrmGetPort m_getParam_OutputPort[NUM_GETPARAM_OUTPUT_PORTS];
3025 
3027  Fw::OutputTlmGetPort m_getTlmChan_OutputPort[NUM_GETTLMCHAN_OUTPUT_PORTS];
3028 
3030  Svc::OutputPingPort m_pingOut_OutputPort[NUM_PINGOUT_OUTPUT_PORTS];
3031 
3033  Fw::OutputCmdResponsePort m_seqDoneOut_OutputPort[NUM_SEQDONEOUT_OUTPUT_PORTS];
3034 
3036  Svc::OutputCmdSeqInPort m_seqStartOut_OutputPort[NUM_SEQSTARTOUT_OUTPUT_PORTS];
3037 
3038 #endif
3039 
3040  private:
3041 
3042  // ----------------------------------------------------------------------
3043  // First update flags for telemetry channels
3044  // ----------------------------------------------------------------------
3045 
3047  bool m_first_update_State = true;
3048 
3050  bool m_first_update_SequencesSucceeded = true;
3051 
3053  bool m_first_update_SequencesFailed = true;
3054 
3056  bool m_first_update_SequencesCancelled = true;
3057 
3059  bool m_first_update_StatementsDispatched = true;
3060 
3062  bool m_first_update_StatementsFailed = true;
3063 
3065  bool m_first_update_LastDirectiveError = true;
3066 
3068  bool m_first_update_DirectiveErrorIndex = true;
3069 
3071  bool m_first_update_DirectiveErrorId = true;
3072 
3074  bool m_first_update_SeqPath = true;
3075 
3077  bool m_first_update_Debug_ReachedEndOfFile = true;
3078 
3080  bool m_first_update_Debug_NextStatementReadSuccess = true;
3081 
3083  bool m_first_update_Debug_NextStatementOpcode = true;
3084 
3086  bool m_first_update_Debug_NextStatementIndex = true;
3087 
3089  bool m_first_update_Debug_NextCmdOpcode = true;
3090 
3092  bool m_first_update_Debug_StackSize = true;
3093 
3095  bool m_first_update_BreakpointInUse = true;
3096 
3098  bool m_first_update_BreakpointIndex = true;
3099 
3101  bool m_first_update_BreakOnlyOnceOnBreakpoint = true;
3102 
3104  bool m_first_update_BreakBeforeNextLine = true;
3105 
3107  bool m_first_update_PRM_STATEMENT_TIMEOUT_SECS = true;
3108 
3110  bool m_first_update_PRM_SEQ_BASE_DIR = true;
3111 
3112  private:
3113 
3114  // ----------------------------------------------------------------------
3115  // Last value storage for telemetry channels
3116  // ----------------------------------------------------------------------
3117 
3119  FwEnumStoreType m_last_State = {};
3120 
3122  U64 m_last_SequencesSucceeded = {};
3123 
3125  U64 m_last_SequencesFailed = {};
3126 
3128  U64 m_last_SequencesCancelled = {};
3129 
3131  U64 m_last_StatementsDispatched = {};
3132 
3134  U64 m_last_StatementsFailed = {};
3135 
3137  Svc::Fpy::DirectiveErrorCode m_last_LastDirectiveError = {};
3138 
3140  U64 m_last_DirectiveErrorIndex = {};
3141 
3143  Svc::Fpy::DirectiveId m_last_DirectiveErrorId = {};
3144 
3146  Fw::TlmString m_last_SeqPath = {};
3147 
3149  bool m_last_Debug_ReachedEndOfFile = {};
3150 
3152  bool m_last_Debug_NextStatementReadSuccess = {};
3153 
3155  U8 m_last_Debug_NextStatementOpcode = {};
3156 
3158  U32 m_last_Debug_NextStatementIndex = {};
3159 
3161  FwOpcodeType m_last_Debug_NextCmdOpcode = {};
3162 
3164  Svc::Fpy::StackSizeType m_last_Debug_StackSize = {};
3165 
3167  bool m_last_BreakpointInUse = {};
3168 
3170  U32 m_last_BreakpointIndex = {};
3171 
3173  bool m_last_BreakOnlyOnceOnBreakpoint = {};
3174 
3176  bool m_last_BreakBeforeNextLine = {};
3177 
3179  F32 m_last_PRM_STATEMENT_TIMEOUT_SECS = {};
3180 
3182  Fw::TlmString m_last_PRM_SEQ_BASE_DIR = {};
3183 
3184  private:
3185 
3186  // ----------------------------------------------------------------------
3187  // Parameter validity flags
3188  // ----------------------------------------------------------------------
3189 
3191  Fw::ParamValid m_param_STATEMENT_TIMEOUT_SECS_valid = Fw::ParamValid::UNINIT;
3192 
3194  Fw::ParamValid m_param_SEQ_BASE_DIR_valid = Fw::ParamValid::UNINIT;
3195 
3196  private:
3197 
3198  // ----------------------------------------------------------------------
3199  // Parameter variables
3200  // ----------------------------------------------------------------------
3201 
3208  F32 m_STATEMENT_TIMEOUT_SECS;
3209 
3216  Fw::ParamString m_SEQ_BASE_DIR;
3217 
3218  private:
3219 
3220  // ----------------------------------------------------------------------
3221  // State machine instances
3222  // ----------------------------------------------------------------------
3223 
3225  Svc_FpySequencer_SequencerStateMachine m_stateMachine_sequencer;
3226 
3227  private:
3228 
3229  // ----------------------------------------------------------------------
3230  // Mutexes
3231  // ----------------------------------------------------------------------
3232 
3234  Os::Mutex m_paramLock;
3235 
3236  };
3237 
3238 }
3239 
3240 #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())