F´ Flight Software - C/C++ Documentation
A framework for building embedded system applications to NASA flight quality standards.
FpySequencerComponentAc.hpp
Go to the documentation of this file.
1 // ======================================================================
2 // \title FpySequencerComponentAc.hpp
3 // \author Generated by fpp-to-cpp
4 // \brief hpp file for FpySequencer component base class
5 // ======================================================================
6 
7 #ifndef Svc_FpySequencerComponentAc_HPP
8 #define Svc_FpySequencerComponentAc_HPP
9 
10 #include <atomic>
11 
12 #include "Fw/Cmd/CmdPortAc.hpp"
13 #include "Fw/Cmd/CmdRegPortAc.hpp"
16 #include "Fw/Cmd/CmdString.hpp"
17 #include "Fw/Com/ComPortAc.hpp"
19 #include "Fw/FPrimeBasicTypes.hpp"
20 #include "Fw/Log/LogPortAc.hpp"
21 #include "Fw/Log/LogString.hpp"
22 #if FW_ENABLE_TEXT_LOGGING == 1
23 #include "Fw/Log/LogTextPortAc.hpp"
24 #endif
25 #if !FW_DIRECT_PORT_CALLS
27 #endif
28 #if !FW_DIRECT_PORT_CALLS
30 #endif
31 #include "Fw/Prm/PrmGetPortAc.hpp"
32 #include "Fw/Prm/PrmSetPortAc.hpp"
33 #include "Fw/Prm/PrmString.hpp"
34 #include "Fw/Time/TimePortAc.hpp"
35 #include "Fw/Tlm/TlmGetPortAc.hpp"
36 #include "Fw/Tlm/TlmPortAc.hpp"
37 #include "Fw/Tlm/TlmString.hpp"
39 #include "Os/Mutex.hpp"
77 #include "Svc/Ping/PingPortAc.hpp"
89 
90 namespace Svc {
91 
98  {
99 
100  // ----------------------------------------------------------------------
101  // Friend classes
102  // ----------------------------------------------------------------------
103 
107  friend class FpySequencerTester;
108 
109  protected:
110 
111  // ----------------------------------------------------------------------
112  // Constants
113  // ----------------------------------------------------------------------
114 
116  enum {
118  };
119 
121  enum {
128  };
129 
131  enum {
140  };
141 
143  enum {
150  };
151 
153  enum {
154  OPCODE_RUN = 0x0,
160  OPCODE_SET_BREAKPOINT = 0x6,
162  OPCODE_BREAK = 0x7,
166  OPCODE_CONTINUE = 0x8,
171  OPCODE_STEP = 0xa,
177  };
178 
180  enum {
221  };
222 
224  enum {
246  };
247 
249  enum {
251  };
255 
257  enum class SmId : FwEnumStoreType {
258  sequencer,
259  };
260 
261  protected:
262 
263  // ----------------------------------------------------------------------
264  // Types for internal state machines
265  // ----------------------------------------------------------------------
266 
270  {
271 
272  // ----------------------------------------------------------------------
273  // Friend classes
274  // ----------------------------------------------------------------------
275 
279  friend class FpySequencerTester;
280 
281  public:
282 
285  FpySequencerComponentBase& component
286  );
287 
288  public:
289 
291  void init(
293  );
294 
295  public:
296 
299 
300  private:
301 
303  void action_signalEntered(
304  Signal signal
305  );
306 
308  void action_setSequenceFilePath(
309  Signal signal,
311  );
312 
314  void action_setSequenceBlockState(
315  Signal signal,
317  );
318 
320  void action_setSequenceArguments(
321  Signal signal,
323  );
324 
326  void action_validate(
327  Signal signal
328  );
329 
331  void action_report_seqSucceeded(
332  Signal signal
333  );
334 
336  void action_report_seqCancelled(
337  Signal signal
338  );
339 
341  void action_report_seqFailed(
342  Signal signal
343  );
344 
346  void action_report_seqStarted(
347  Signal signal
348  );
349 
351  void action_setGoalState_RUNNING(
352  Signal signal
353  );
354 
356  void action_setGoalState_VALID(
357  Signal signal
358  );
359 
361  void action_setGoalState_IDLE(
362  Signal signal
363  );
364 
366  void action_sendCmdResponse_OK(
367  Signal signal
368  );
369 
371  void action_sendCmdResponse_EXECUTION_ERROR(
372  Signal signal
373  );
374 
376  void action_clearSequenceFile(
377  Signal signal
378  );
379 
381  void action_clearBreakpoint(
382  Signal signal
383  );
384 
386  void action_clearSequenceArguments(
387  Signal signal
388  );
389 
391  void action_checkShouldWake(
392  Signal signal
393  );
394 
396  void action_dispatchStatement(
397  Signal signal
398  );
399 
401  void action_resetRuntime(
402  Signal signal
403  );
404 
406  void action_checkStatementTimeout(
407  Signal signal
408  );
409 
411  void action_incrementSequenceCounter(
412  Signal signal
413  );
414 
416  void action_pushArgsToStack(
417  Signal signal
418  );
419 
421  void action_report_seqBroken(
422  Signal signal
423  );
424 
426  void action_setBreakpoint(
427  Signal signal,
429  );
430 
432  void action_setBreakBeforeNextLine(
433  Signal signal
434  );
435 
437  void action_clearBreakBeforeNextLine(
438  Signal signal
439  );
440 
441  private:
442 
444  bool guard_goalStateIs_RUNNING(
445  Signal signal
446  ) const;
447 
449  bool guard_shouldBreak(
450  Signal signal
451  ) const;
452 
454  bool guard_breakOnce(
455  Signal signal
456  ) const;
457 
458  private:
459 
461  FpySequencerComponentBase& m_component;
462 
463  };
464 
465  public:
466 
467  // ----------------------------------------------------------------------
468  // Component initialization
469  // ----------------------------------------------------------------------
470 
472  void init(
473  FwSizeType queueDepth,
474  FwEnumStoreType instance = 0
475  );
476 
477 #if !FW_DIRECT_PORT_CALLS
478 
479  public:
480 
481  // ----------------------------------------------------------------------
482  // Getters for special input ports
483  // ----------------------------------------------------------------------
484 
489  FwIndexType portNum
490  );
491 
492 #endif
493 
494 #if !FW_DIRECT_PORT_CALLS
495 
496  public:
497 
498  // ----------------------------------------------------------------------
499  // Getters for typed input ports
500  // ----------------------------------------------------------------------
501 
506  FwIndexType portNum
507  );
508 
513  FwIndexType portNum
514  );
515 
520  FwIndexType portNum
521  );
522 
527  FwIndexType portNum
528  );
529 
534  FwIndexType portNum
535  );
536 
541  FwIndexType portNum
542  );
543 
544 #endif
545 
546 #if !FW_DIRECT_PORT_CALLS
547 
548  public:
549 
550  // ----------------------------------------------------------------------
551  // Connect input ports to special output ports
552  // ----------------------------------------------------------------------
553 
556  FwIndexType portNum,
557  Fw::InputCmdRegPort* port
558  );
559 
562  FwIndexType portNum,
564  );
565 
568  FwIndexType portNum,
569  Fw::InputLogPort* port
570  );
571 
572 #if FW_ENABLE_TEXT_LOGGING == 1
573 
575  void set_logTextOut_OutputPort(
576  FwIndexType portNum,
577  Fw::InputLogTextPort* port
578  );
579 
580 #endif
581 
584  FwIndexType portNum,
585  Fw::InputPrmGetPort* port
586  );
587 
590  FwIndexType portNum,
591  Fw::InputPrmSetPort* port
592  );
593 
596  FwIndexType portNum,
597  Fw::InputTimePort* port
598  );
599 
602  FwIndexType portNum,
603  Fw::InputTlmPort* port
604  );
605 
606 #endif
607 
608 #if !FW_DIRECT_PORT_CALLS
609 
610  public:
611 
612  // ----------------------------------------------------------------------
613  // Connect typed input ports to typed output ports
614  // ----------------------------------------------------------------------
615 
618  FwIndexType portNum,
619  Fw::InputComPort* port
620  );
621 
624  FwIndexType portNum,
625  Fw::InputPrmGetPort* port
626  );
627 
630  FwIndexType portNum,
631  Fw::InputTlmGetPort* port
632  );
633 
636  FwIndexType portNum,
637  Svc::InputPingPort* port
638  );
639 
642  FwIndexType portNum,
644  );
645 
648  FwIndexType portNum,
650  );
651 
652 #endif
653 
654 #if !FW_DIRECT_PORT_CALLS && FW_PORT_SERIALIZATION
655 
656  public:
657 
658  // ----------------------------------------------------------------------
659  // Connect serial input ports to special output ports
660  // ----------------------------------------------------------------------
661 
664  FwIndexType portNum,
665  Fw::InputSerializePort* port
666  );
667 
670  FwIndexType portNum,
671  Fw::InputSerializePort* port
672  );
673 
676  FwIndexType portNum,
677  Fw::InputSerializePort* port
678  );
679 
680 #if FW_ENABLE_TEXT_LOGGING == 1
681 
683  void set_logTextOut_OutputPort(
684  FwIndexType portNum,
685  Fw::InputSerializePort* port
686  );
687 
688 #endif
689 
692  FwIndexType portNum,
693  Fw::InputSerializePort* port
694  );
695 
698  FwIndexType portNum,
699  Fw::InputSerializePort* port
700  );
701 
704  FwIndexType portNum,
705  Fw::InputSerializePort* port
706  );
707 
708 #endif
709 
710 #if !FW_DIRECT_PORT_CALLS && FW_PORT_SERIALIZATION
711 
712  public:
713 
714  // ----------------------------------------------------------------------
715  // Connect serial input ports to typed output ports
716  // ----------------------------------------------------------------------
717 
720  FwIndexType portNum,
721  Fw::InputSerializePort* port
722  );
723 
726  FwIndexType portNum,
727  Fw::InputSerializePort* port
728  );
729 
732  FwIndexType portNum,
733  Fw::InputSerializePort* port
734  );
735 
738  FwIndexType portNum,
739  Fw::InputSerializePort* port
740  );
741 
742 #endif
743 
744  public:
745 
746  // ----------------------------------------------------------------------
747  // Command registration
748  // ----------------------------------------------------------------------
749 
753  void regCommands();
754 
755  public:
756 
757  // ----------------------------------------------------------------------
758  // Parameter loading
759  // ----------------------------------------------------------------------
760 
764  void loadParameters();
765 
766  protected:
767 
768  // ----------------------------------------------------------------------
769  // Component construction and destruction
770  // ----------------------------------------------------------------------
771 
774  const char* compName = ""
775  );
776 
778  virtual ~FpySequencerComponentBase();
779 
780  protected:
781 
782  // ----------------------------------------------------------------------
783  // Getters for numbers of special input ports
784  // ----------------------------------------------------------------------
785 
790  return NUM_CMDIN_INPUT_PORTS;
791  }
792 
793  protected:
794 
795  // ----------------------------------------------------------------------
796  // Getters for numbers of typed input ports
797  // ----------------------------------------------------------------------
798 
804  }
805 
811  }
812 
817  return NUM_PINGIN_INPUT_PORTS;
818  }
819 
825  }
826 
832  }
833 
839  }
840 
841  protected:
842 
843  // ----------------------------------------------------------------------
844  // Getters for numbers of special output ports
845  // ----------------------------------------------------------------------
846 
852  }
853 
859  }
860 
866  }
867 
868 #if FW_ENABLE_TEXT_LOGGING == 1
869 
873  static constexpr FwIndexType getNum_logTextOut_OutputPorts() {
875  }
876 
877 #endif
878 
884  }
885 
891  }
892 
898  }
899 
905  }
906 
907  protected:
908 
909  // ----------------------------------------------------------------------
910  // Getters for numbers of typed output ports
911  // ----------------------------------------------------------------------
912 
918  }
919 
925  }
926 
932  }
933 
939  }
940 
946  }
947 
953  }
954 
955  protected:
956 
957  // ----------------------------------------------------------------------
958  // Connection status queries for special output ports
959  // ----------------------------------------------------------------------
960 
965  FwIndexType portNum
966  ) const;
967 
972  FwIndexType portNum
973  ) const;
974 
979  FwIndexType portNum
980  ) const;
981 
982 #if FW_ENABLE_TEXT_LOGGING == 1
983 
987  bool isConnected_logTextOut_OutputPort(
988  FwIndexType portNum
989  ) const;
990 
991 #endif
992 
997  FwIndexType portNum
998  ) const;
999 
1004  FwIndexType portNum
1005  ) const;
1006 
1011  FwIndexType portNum
1012  ) const;
1013 
1018  FwIndexType portNum
1019  ) const;
1020 
1021  protected:
1022 
1023  // ----------------------------------------------------------------------
1024  // Connection status queries for typed output ports
1025  // ----------------------------------------------------------------------
1026 
1031  FwIndexType portNum
1032  ) const;
1033 
1038  FwIndexType portNum
1039  ) const;
1040 
1045  FwIndexType portNum
1046  ) const;
1047 
1052  FwIndexType portNum
1053  ) const;
1054 
1059  FwIndexType portNum
1060  ) const;
1061 
1066  FwIndexType portNum
1067  ) const;
1068 
1069 #if FW_DIRECT_PORT_CALLS
1070  public:
1071 #else
1072  protected:
1073 #endif
1074 
1075  // ----------------------------------------------------------------------
1076  // Port handler base-class functions for special input ports
1077  //
1078  // Call these functions directly to bypass the corresponding ports
1079  // ----------------------------------------------------------------------
1080 
1082  void cmdIn_handlerBase(
1083  FwIndexType portNum,
1084  FwOpcodeType opCode,
1085  U32 cmdSeq,
1086  Fw::CmdArgBuffer& args
1087  );
1088 
1089  protected:
1090 
1091  // ----------------------------------------------------------------------
1092  // Handlers to implement for typed input ports
1093  // ----------------------------------------------------------------------
1094 
1096  virtual void checkTimers_handler(
1097  FwIndexType portNum,
1098  U32 context
1099  ) = 0;
1100 
1102  virtual void cmdResponseIn_handler(
1103  FwIndexType portNum,
1104  FwOpcodeType opCode,
1105  U32 cmdSeq,
1106  const Fw::CmdResponse& response
1107  ) = 0;
1108 
1110  virtual void pingIn_handler(
1111  FwIndexType portNum,
1112  U32 key
1113  ) = 0;
1114 
1116  virtual void seqCancelIn_handler(
1117  FwIndexType portNum
1118  ) = 0;
1119 
1121  virtual void seqRunIn_handler(
1122  FwIndexType portNum,
1123  const Fw::StringBase& filename,
1124  const Svc::SeqArgs& args
1125  ) = 0;
1126 
1128  virtual void tlmWrite_handler(
1129  FwIndexType portNum,
1130  U32 context
1131  ) = 0;
1132 
1133 #if FW_DIRECT_PORT_CALLS
1134  public:
1135 #else
1136  protected:
1137 #endif
1138 
1139  // ----------------------------------------------------------------------
1140  // Port handler base-class functions for typed input ports
1141  //
1142  // Call these functions directly to bypass the corresponding ports
1143  // ----------------------------------------------------------------------
1144 
1147  FwIndexType portNum,
1148  U32 context
1149  );
1150 
1153  FwIndexType portNum,
1154  FwOpcodeType opCode,
1155  U32 cmdSeq,
1156  const Fw::CmdResponse& response
1157  );
1158 
1160  void pingIn_handlerBase(
1161  FwIndexType portNum,
1162  U32 key
1163  );
1164 
1167  FwIndexType portNum
1168  );
1169 
1171  void seqRunIn_handlerBase(
1172  FwIndexType portNum,
1173  const Fw::StringBase& filename,
1174  const Svc::SeqArgs& args
1175  );
1176 
1178  void tlmWrite_handlerBase(
1179  FwIndexType portNum,
1180  U32 context
1181  );
1182 
1183  protected:
1184 
1185  // ----------------------------------------------------------------------
1186  // Pre-message hooks for typed async input ports
1187  //
1188  // Each of these functions is invoked just before processing a message
1189  // on the corresponding port. By default, they do nothing. You can
1190  // override them to provide specific pre-message behavior.
1191  // ----------------------------------------------------------------------
1192 
1194  virtual void checkTimers_preMsgHook(
1195  FwIndexType portNum,
1196  U32 context
1197  );
1198 
1200  virtual void cmdResponseIn_preMsgHook(
1201  FwIndexType portNum,
1202  FwOpcodeType opCode,
1203  U32 cmdSeq,
1204  const Fw::CmdResponse& response
1205  );
1206 
1208  virtual void pingIn_preMsgHook(
1209  FwIndexType portNum,
1210  U32 key
1211  );
1212 
1214  virtual void seqCancelIn_preMsgHook(
1215  FwIndexType portNum
1216  );
1217 
1219  virtual void seqRunIn_preMsgHook(
1220  FwIndexType portNum,
1221  const Fw::StringBase& filename,
1222  const Svc::SeqArgs& args
1223  );
1224 
1226  virtual void tlmWrite_preMsgHook(
1227  FwIndexType portNum,
1228  U32 context
1229  );
1230 
1231  protected:
1232 
1233  // ----------------------------------------------------------------------
1234  // Invocation functions for typed output ports
1235  // ----------------------------------------------------------------------
1236 
1238  void cmdOut_out(
1239  FwIndexType portNum,
1240  Fw::ComBuffer& data,
1241  U32 context
1242  ) const;
1243 
1246  FwIndexType portNum,
1247  FwPrmIdType id,
1248  Fw::ParamBuffer& val
1249  ) const;
1251 
1254  FwIndexType portNum,
1255  FwChanIdType id,
1256  Fw::Time& timeTag,
1257  Fw::TlmBuffer& val
1258  ) const;
1261 
1263  void pingOut_out(
1264  FwIndexType portNum,
1265  U32 key
1266  ) const;
1267 
1269  void seqDoneOut_out(
1270  FwIndexType portNum,
1271  FwOpcodeType opCode,
1272  U32 cmdSeq,
1273  const Fw::CmdResponse& response
1274  ) const;
1275 
1277  void seqStartOut_out(
1278  FwIndexType portNum,
1279  const Fw::StringBase& filename,
1280  const Svc::SeqArgs& args
1281  ) const;
1282 
1283  protected:
1284 
1285  // ----------------------------------------------------------------------
1286  // Internal interface handlers
1287  // ----------------------------------------------------------------------
1288 
1291 
1294 
1297 
1300 
1303 
1306 
1309 
1311  virtual void directive_if_internalInterfaceHandler(const Svc::FpySequencer_IfDirective& directive) = 0;
1312 
1315 
1318 
1321 
1324 
1327 
1330 
1333 
1336 
1339 
1342 
1345 
1348 
1351 
1354 
1357 
1360 
1363 
1366 
1369 
1372 
1373  protected:
1374 
1375  // ----------------------------------------------------------------------
1376  // Internal interface base-class functions
1377  // ----------------------------------------------------------------------
1378 
1381 
1384 
1387 
1390 
1393 
1396 
1399 
1402 
1405 
1408 
1411 
1414 
1417 
1420 
1423 
1426 
1429 
1432 
1435 
1438 
1441 
1444 
1447 
1450 
1453 
1456 
1459 
1462 
1463  protected:
1464 
1465  // ----------------------------------------------------------------------
1466  // State getter functions
1467  // ----------------------------------------------------------------------
1468 
1471 
1472  protected:
1473 
1474  // ----------------------------------------------------------------------
1475  // Signal send functions
1476  // ----------------------------------------------------------------------
1477 
1481  );
1482 
1486  );
1487 
1491  );
1492 
1495 
1498  const Svc::FpySequencer_BreakpointArgs& value
1499  );
1500 
1503 
1506 
1509 
1512 
1515 
1518 
1521 
1524 
1527 
1530 
1533 
1536 
1539 
1542 
1545 
1548 
1551 
1554 
1557 
1560 
1563 
1564  protected:
1565 
1566  // ----------------------------------------------------------------------
1567  // Functions to implement for internal state machine actions
1568  // ----------------------------------------------------------------------
1569 
1574  SmId smId,
1576  ) = 0;
1577 
1582  SmId smId,
1585  ) = 0;
1586 
1591  SmId smId,
1594  ) = 0;
1595 
1600  SmId smId,
1603  ) = 0;
1604 
1609  SmId smId,
1611  ) = 0;
1612 
1617  SmId smId,
1619  ) = 0;
1620 
1625  SmId smId,
1627  ) = 0;
1628 
1633  SmId smId,
1635  ) = 0;
1636 
1641  SmId smId,
1643  ) = 0;
1644 
1649  SmId smId,
1651  ) = 0;
1652 
1657  SmId smId,
1659  ) = 0;
1660 
1665  SmId smId,
1667  ) = 0;
1668 
1673  SmId smId,
1675  ) = 0;
1676 
1681  SmId smId,
1683  ) = 0;
1684 
1689  SmId smId,
1691  ) = 0;
1692 
1697  SmId smId,
1699  ) = 0;
1700 
1705  SmId smId,
1707  ) = 0;
1708 
1713  SmId smId,
1715  ) = 0;
1716 
1721  SmId smId,
1723  ) = 0;
1724 
1729  SmId smId,
1731  ) = 0;
1732 
1737  SmId smId,
1739  ) = 0;
1740 
1745  SmId smId,
1747  ) = 0;
1748 
1753  SmId smId,
1755  ) = 0;
1756 
1761  SmId smId,
1763  ) = 0;
1764 
1769  SmId smId,
1771  const Svc::FpySequencer_BreakpointArgs& value
1772  ) = 0;
1773 
1778  SmId smId,
1780  ) = 0;
1781 
1786  SmId smId,
1788  ) = 0;
1789 
1790  protected:
1791 
1792  // ----------------------------------------------------------------------
1793  // Functions to implement for internal state machine guards
1794  // ----------------------------------------------------------------------
1795 
1800  SmId smId,
1802  ) const = 0;
1803 
1809  SmId smId,
1811  ) const = 0;
1812 
1817  SmId smId,
1819  ) const = 0;
1820 
1821  protected:
1822 
1823  // ----------------------------------------------------------------------
1824  // Command response
1825  // ----------------------------------------------------------------------
1826 
1828  void cmdResponse_out(
1829  FwOpcodeType opCode,
1830  U32 cmdSeq,
1831  Fw::CmdResponse response
1832  );
1833 
1834  protected:
1835 
1836  // ----------------------------------------------------------------------
1837  // Command handlers to implement
1838  // ----------------------------------------------------------------------
1839 
1843  virtual void RUN_cmdHandler(
1844  FwOpcodeType opCode,
1845  U32 cmdSeq,
1846  const Fw::CmdStringArg& fileName,
1847  Svc::BlockState block
1848  ) = 0;
1849 
1851  virtual void RUN_ARGS_cmdHandler(
1852  FwOpcodeType opCode,
1853  U32 cmdSeq,
1854  const Fw::CmdStringArg& fileName,
1855  Svc::BlockState block,
1856  Svc::SeqArgs buffer
1857  ) = 0;
1858 
1862  virtual void VALIDATE_cmdHandler(
1863  FwOpcodeType opCode,
1864  U32 cmdSeq,
1865  const Fw::CmdStringArg& fileName
1866  ) = 0;
1867 
1871  virtual void VALIDATE_ARGS_cmdHandler(
1872  FwOpcodeType opCode,
1873  U32 cmdSeq,
1874  const Fw::CmdStringArg& fileName,
1875  Svc::SeqArgs buffer
1876  ) = 0;
1877 
1881  virtual void RUN_VALIDATED_cmdHandler(
1882  FwOpcodeType opCode,
1883  U32 cmdSeq,
1884  Svc::BlockState block
1885  ) = 0;
1886 
1891  virtual void CANCEL_cmdHandler(
1892  FwOpcodeType opCode,
1893  U32 cmdSeq
1894  ) = 0;
1895 
1902  virtual void SET_BREAKPOINT_cmdHandler(
1903  FwOpcodeType opCode,
1904  U32 cmdSeq,
1905  U32 stmtIdx,
1906  bool breakOnce
1907  ) = 0;
1908 
1914  virtual void BREAK_cmdHandler(
1915  FwOpcodeType opCode,
1916  U32 cmdSeq
1917  ) = 0;
1918 
1923  virtual void CONTINUE_cmdHandler(
1924  FwOpcodeType opCode,
1925  U32 cmdSeq
1926  ) = 0;
1927 
1932  virtual void CLEAR_BREAKPOINT_cmdHandler(
1933  FwOpcodeType opCode,
1934  U32 cmdSeq
1935  ) = 0;
1936 
1941  virtual void STEP_cmdHandler(
1942  FwOpcodeType opCode,
1943  U32 cmdSeq
1944  ) = 0;
1945 
1949  virtual void DUMP_STACK_TO_FILE_cmdHandler(
1950  FwOpcodeType opCode,
1951  U32 cmdSeq,
1952  const Fw::CmdStringArg& fileName
1953  ) = 0;
1954 
1955  protected:
1956 
1957  // ----------------------------------------------------------------------
1958  // Command handler base-class functions
1959  //
1960  // Call these functions directly to bypass the command input port
1961  // ----------------------------------------------------------------------
1962 
1966  void RUN_cmdHandlerBase(
1967  FwOpcodeType opCode,
1968  U32 cmdSeq,
1969  Fw::CmdArgBuffer& args
1970  );
1971 
1974  FwOpcodeType opCode,
1975  U32 cmdSeq,
1976  Fw::CmdArgBuffer& args
1977  );
1978 
1983  FwOpcodeType opCode,
1984  U32 cmdSeq,
1985  Fw::CmdArgBuffer& args
1986  );
1987 
1992  FwOpcodeType opCode,
1993  U32 cmdSeq,
1994  Fw::CmdArgBuffer& args
1995  );
1996 
2001  FwOpcodeType opCode,
2002  U32 cmdSeq,
2003  Fw::CmdArgBuffer& args
2004  );
2005 
2010  void CANCEL_cmdHandlerBase(
2011  FwOpcodeType opCode,
2012  U32 cmdSeq,
2013  Fw::CmdArgBuffer& args
2014  );
2015 
2023  FwOpcodeType opCode,
2024  U32 cmdSeq,
2025  Fw::CmdArgBuffer& args
2026  );
2027 
2033  void BREAK_cmdHandlerBase(
2034  FwOpcodeType opCode,
2035  U32 cmdSeq,
2036  Fw::CmdArgBuffer& args
2037  );
2038 
2044  FwOpcodeType opCode,
2045  U32 cmdSeq,
2046  Fw::CmdArgBuffer& args
2047  );
2048 
2054  FwOpcodeType opCode,
2055  U32 cmdSeq,
2056  Fw::CmdArgBuffer& args
2057  );
2058 
2063  void STEP_cmdHandlerBase(
2064  FwOpcodeType opCode,
2065  U32 cmdSeq,
2066  Fw::CmdArgBuffer& args
2067  );
2068 
2073  FwOpcodeType opCode,
2074  U32 cmdSeq,
2075  Fw::CmdArgBuffer& args
2076  );
2077 
2078  protected:
2079 
2080  // ----------------------------------------------------------------------
2081  // Pre-message hooks for async commands
2082  //
2083  // Each of these functions is invoked just before processing the
2084  // corresponding command. By default they do nothing. You can
2085  // override them to provide specific pre-command behavior.
2086  // ----------------------------------------------------------------------
2087 
2089  virtual void RUN_preMsgHook(
2090  FwOpcodeType opCode,
2091  U32 cmdSeq
2092  );
2093 
2095  virtual void RUN_ARGS_preMsgHook(
2096  FwOpcodeType opCode,
2097  U32 cmdSeq
2098  );
2099 
2101  virtual void VALIDATE_preMsgHook(
2102  FwOpcodeType opCode,
2103  U32 cmdSeq
2104  );
2105 
2107  virtual void VALIDATE_ARGS_preMsgHook(
2108  FwOpcodeType opCode,
2109  U32 cmdSeq
2110  );
2111 
2113  virtual void RUN_VALIDATED_preMsgHook(
2114  FwOpcodeType opCode,
2115  U32 cmdSeq
2116  );
2117 
2119  virtual void CANCEL_preMsgHook(
2120  FwOpcodeType opCode,
2121  U32 cmdSeq
2122  );
2123 
2125  virtual void SET_BREAKPOINT_preMsgHook(
2126  FwOpcodeType opCode,
2127  U32 cmdSeq
2128  );
2129 
2131  virtual void BREAK_preMsgHook(
2132  FwOpcodeType opCode,
2133  U32 cmdSeq
2134  );
2135 
2137  virtual void CONTINUE_preMsgHook(
2138  FwOpcodeType opCode,
2139  U32 cmdSeq
2140  );
2141 
2143  virtual void CLEAR_BREAKPOINT_preMsgHook(
2144  FwOpcodeType opCode,
2145  U32 cmdSeq
2146  );
2147 
2149  virtual void STEP_preMsgHook(
2150  FwOpcodeType opCode,
2151  U32 cmdSeq
2152  );
2153 
2155  virtual void DUMP_STACK_TO_FILE_preMsgHook(
2156  FwOpcodeType opCode,
2157  U32 cmdSeq
2158  );
2159 
2160  protected:
2161 
2162  // ----------------------------------------------------------------------
2163  // Event logging functions
2164  // ----------------------------------------------------------------------
2165 
2167  void log_WARNING_HI_InvalidCommand(I32 state) const;
2168 
2170  void log_WARNING_HI_InvalidSeqRunCall(I32 state) const;
2171 
2173  void log_WARNING_HI_InvalidSeqCancelCall(I32 state) const;
2174 
2177  const Fw::StringBase& filePath,
2178  I32 errorCode
2179  ) const;
2180 
2183  FwSizeType writeSize,
2184  const Fw::StringBase& filePath,
2185  I32 errorCode
2186  ) const;
2187 
2191  const Fw::StringBase& filePath,
2192  I32 errorCode
2193  ) const;
2194 
2198  const Fw::StringBase& filePath
2199  ) const;
2200 
2204  const Fw::StringBase& filePath,
2205  I32 errorCode,
2206  U64 buffLeft,
2207  U64 buffLength
2208  ) const;
2209 
2212  U8 expected,
2213  U8 actual
2214  ) const;
2215 
2218  U32 expected,
2219  U32 actual
2220  ) const;
2221 
2223  void log_WARNING_HI_ExtraBytesInSequence(FwSizeType remaining) const;
2224 
2227  U64 bufferSize,
2228  const Fw::StringBase& filePath
2229  ) const;
2230 
2233  FwOpcodeType opCode,
2234  U32 stmtIdx,
2235  const Fw::StringBase& filePath,
2236  Fw::CmdResponse response
2237  ) const;
2238 
2240  void log_ACTIVITY_HI_SequenceDone(const Fw::StringBase& filePath) const;
2241 
2243  void log_ACTIVITY_HI_SequenceCancelled(const Fw::StringBase& filePath) const;
2244 
2247  const Fw::StringBase& filePath,
2248  U8 errorCode
2249  ) const;
2250 
2253  U8 opcode,
2254  U32 stmtIdx,
2255  const Fw::StringBase& filePath
2256  ) const;
2257 
2260  I32 state,
2261  FwOpcodeType opcode,
2262  Fw::CmdResponse response
2263  ) const;
2264 
2267  FwOpcodeType opcode,
2268  Fw::CmdResponse response,
2269  U16 oldSequenceIdx,
2270  U16 currentSequenceIdx
2271  ) const;
2272 
2275  FwOpcodeType opcode,
2276  Fw::CmdResponse response
2277  ) const;
2278 
2281  FwOpcodeType opcode,
2282  Fw::CmdResponse response,
2283  U8 expectedDirectiveOpcode
2284  ) const;
2285 
2288  FwOpcodeType opcode,
2289  Fw::CmdResponse response,
2290  FwOpcodeType expectedOpcode
2291  ) const;
2292 
2295  FwOpcodeType opcode,
2296  Fw::CmdResponse response,
2297  U16 actualCmdIdx,
2298  U16 expectedCmdIdx
2299  ) const;
2300 
2303  U8 opcode,
2304  U32 stmtIdx,
2305  I32 errorCode,
2306  U64 buffLeft,
2307  U64 buffLength
2308  ) const;
2309 
2312  I32 internalTimeBase,
2313  I32 otherTimeBase
2314  ) const;
2315 
2318  I32 internalTimeContext,
2319  I32 otherTimeContext
2320  ) const;
2321 
2324  FwOpcodeType opCode,
2325  U32 stmtIdx,
2326  const Fw::StringBase& filePath
2327  ) const;
2328 
2331  U8 opCode,
2332  U32 stmtIdx,
2333  const Fw::StringBase& filePath
2334  ) const;
2335 
2338  U8 count,
2339  U8 max
2340  ) const;
2341 
2344  U16 count,
2345  U16 max
2346  ) const;
2347 
2349  void log_ACTIVITY_HI_SequencePaused(U32 stmtIdx) const;
2350 
2353  U32 breakpointIdx,
2354  bool breakOnce
2355  ) const;
2356 
2358  void log_ACTIVITY_HI_BreakpointCleared() const;
2359 
2361  void log_FATAL_LogFatal(
2362  const Fw::StringBase& filePath,
2363  const Fw::StringBase& message
2364  ) const;
2365 
2368  const Fw::StringBase& filePath,
2369  const Fw::StringBase& message
2370  ) const;
2371 
2374  const Fw::StringBase& filePath,
2375  const Fw::StringBase& message
2376  ) const;
2377 
2380  const Fw::StringBase& filePath,
2381  const Fw::StringBase& message
2382  ) const;
2383 
2386  const Fw::StringBase& filePath,
2387  const Fw::StringBase& message
2388  ) const;
2389 
2392  const Fw::StringBase& filePath,
2393  const Fw::StringBase& message
2394  ) const;
2395 
2398  const Fw::StringBase& filePath,
2399  const Fw::StringBase& message
2400  ) const;
2401 
2402  protected:
2403 
2404  // ----------------------------------------------------------------------
2405  // Telemetry serialized write
2406  // ----------------------------------------------------------------------
2407 
2412  void tlmWrite(
2413  FwChanIdType id,
2414  Fw::TlmBuffer& _tlmBuff,
2415  Fw::Time _tlmTime = Fw::Time()
2416  ) const;
2417 
2418  protected:
2419 
2420  // ----------------------------------------------------------------------
2421  // Telemetry write functions
2422  // ----------------------------------------------------------------------
2423 
2427  void tlmWrite_State(
2428  FwEnumStoreType arg,
2429  Fw::Time _tlmTime = Fw::Time()
2430  );
2431 
2436  U64 arg,
2437  Fw::Time _tlmTime = Fw::Time()
2438  );
2439 
2444  U64 arg,
2445  Fw::Time _tlmTime = Fw::Time()
2446  );
2447 
2452  U64 arg,
2453  Fw::Time _tlmTime = Fw::Time()
2454  );
2455 
2462  U64 arg,
2463  Fw::Time _tlmTime = Fw::Time()
2464  );
2465 
2470  U64 arg,
2471  Fw::Time _tlmTime = Fw::Time()
2472  );
2473 
2478  const Svc::Fpy::DirectiveErrorCode& arg,
2479  Fw::Time _tlmTime = Fw::Time()
2480  );
2481 
2486  U64 arg,
2487  Fw::Time _tlmTime = Fw::Time()
2488  );
2489 
2494  const Svc::Fpy::DirectiveId& arg,
2495  Fw::Time _tlmTime = Fw::Time()
2496  );
2497 
2501  void tlmWrite_SeqPath(
2502  const Fw::StringBase& arg,
2503  Fw::Time _tlmTime = Fw::Time()
2504  );
2505 
2510  bool arg,
2511  Fw::Time _tlmTime = Fw::Time()
2512  );
2513 
2518  bool arg,
2519  Fw::Time _tlmTime = Fw::Time()
2520  );
2521 
2526  U8 arg,
2527  Fw::Time _tlmTime = Fw::Time()
2528  );
2529 
2534  U32 arg,
2535  Fw::Time _tlmTime = Fw::Time()
2536  );
2537 
2542  FwOpcodeType arg,
2543  Fw::Time _tlmTime = Fw::Time()
2544  );
2545 
2551  Fw::Time _tlmTime = Fw::Time()
2552  );
2553 
2558  bool arg,
2559  Fw::Time _tlmTime = Fw::Time()
2560  );
2561 
2567  U32 arg,
2568  Fw::Time _tlmTime = Fw::Time()
2569  );
2570 
2575  bool arg,
2576  Fw::Time _tlmTime = Fw::Time()
2577  );
2578 
2585  bool arg,
2586  Fw::Time _tlmTime = Fw::Time()
2587  );
2588 
2593  F32 arg,
2594  Fw::Time _tlmTime = Fw::Time()
2595  );
2596 
2597  protected:
2598 
2599  // ----------------------------------------------------------------------
2600  // Parameter hook functions
2601  // ----------------------------------------------------------------------
2602 
2606  virtual void parameterUpdated(
2607  FwPrmIdType id
2608  );
2609 
2613  virtual void parametersLoaded();
2614 
2615  protected:
2616 
2617  // ----------------------------------------------------------------------
2618  // Parameter get functions
2619  // ----------------------------------------------------------------------
2620 
2630  Fw::ParamValid& valid
2631  );
2632 
2633  protected:
2634 
2635  // ----------------------------------------------------------------------
2636  // Time
2637  // ----------------------------------------------------------------------
2638 
2642  Fw::Time getTime() const;
2643 
2644  private:
2645 
2646  // ----------------------------------------------------------------------
2647  // Message dispatch functions
2648  // ----------------------------------------------------------------------
2649 
2651  virtual MsgDispatchStatus doDispatch();
2652 
2653  private:
2654 
2655  // ----------------------------------------------------------------------
2656  // Calls for messages received on special input ports
2657  // ----------------------------------------------------------------------
2658 
2660  static void m_p_cmdIn_in(
2661  Fw::PassiveComponentBase* callComp,
2662  FwIndexType portNum,
2663  FwOpcodeType opCode,
2664  U32 cmdSeq,
2665  Fw::CmdArgBuffer& args
2666  );
2667 
2668  private:
2669 
2670  // ----------------------------------------------------------------------
2671  // Calls for messages received on typed input ports
2672  // ----------------------------------------------------------------------
2673 
2675  static void m_p_checkTimers_in(
2676  Fw::PassiveComponentBase* callComp,
2677  FwIndexType portNum,
2678  U32 context
2679  );
2680 
2682  static void m_p_cmdResponseIn_in(
2683  Fw::PassiveComponentBase* callComp,
2684  FwIndexType portNum,
2685  FwOpcodeType opCode,
2686  U32 cmdSeq,
2687  const Fw::CmdResponse& response
2688  );
2689 
2691  static void m_p_pingIn_in(
2692  Fw::PassiveComponentBase* callComp,
2693  FwIndexType portNum,
2694  U32 key
2695  );
2696 
2698  static void m_p_seqCancelIn_in(
2699  Fw::PassiveComponentBase* callComp,
2700  FwIndexType portNum
2701  );
2702 
2704  static void m_p_seqRunIn_in(
2705  Fw::PassiveComponentBase* callComp,
2706  FwIndexType portNum,
2707  const Fw::StringBase& filename,
2708  const Svc::SeqArgs& args
2709  );
2710 
2712  static void m_p_tlmWrite_in(
2713  Fw::PassiveComponentBase* callComp,
2714  FwIndexType portNum,
2715  U32 context
2716  );
2717 
2718  private:
2719 
2720  // ----------------------------------------------------------------------
2721  // Invocation functions for special output ports
2722  // ----------------------------------------------------------------------
2723 
2725  void cmdRegOut_out(
2726  FwIndexType portNum,
2727  FwOpcodeType opCode
2728  ) const;
2729 
2731  void cmdResponseOut_out(
2732  FwIndexType portNum,
2733  FwOpcodeType opCode,
2734  U32 cmdSeq,
2735  const Fw::CmdResponse& response
2736  ) const;
2737 
2739  void logOut_out(
2740  FwIndexType portNum,
2741  FwEventIdType id,
2742  Fw::Time& timeTag,
2743  const Fw::LogSeverity& severity,
2744  Fw::LogBuffer& args
2745  ) const;
2746 
2747 #if FW_ENABLE_TEXT_LOGGING
2748 
2750  void logTextOut_out(
2751  FwIndexType portNum,
2752  FwEventIdType id,
2753  Fw::Time& timeTag,
2754  const Fw::LogSeverity& severity,
2755  Fw::TextLogString& text
2756  ) const;
2757 
2758 #endif
2759 
2761  Fw::ParamValid prmGet_out(
2762  FwIndexType portNum,
2763  FwPrmIdType id,
2764  Fw::ParamBuffer& val
2765  ) const;
2767 
2769  void prmSet_out(
2770  FwIndexType portNum,
2771  FwPrmIdType id,
2772  Fw::ParamBuffer& val
2773  ) const;
2774 
2776  void timeCaller_out(
2777  FwIndexType portNum,
2778  Fw::Time& time
2779  ) const;
2780 
2782  void tlmOut_out(
2783  FwIndexType portNum,
2784  FwChanIdType id,
2785  Fw::Time& timeTag,
2786  Fw::TlmBuffer& val
2787  ) const;
2788 
2789  private:
2790 
2791  // ----------------------------------------------------------------------
2792  // Send signal helper functions
2793  // ----------------------------------------------------------------------
2794 
2796  void sendSignalStart(
2797  SmId smId,
2798  FwEnumStoreType signal,
2799  Fw::SerialBufferBase& buffer
2800  );
2801 
2803  void sequencer_sendSignalFinish(
2804  Fw::LinearBufferBase& buffer
2805  );
2806 
2807  private:
2808 
2809  // ----------------------------------------------------------------------
2810  // Helper functions for state machine dispatch
2811  // ----------------------------------------------------------------------
2812 
2814  void smDispatch(
2815  Fw::SerialBufferBase& buffer
2816  );
2817 
2819  static void deserializeSmIdAndSignal(
2820  Fw::SerialBufferBase& buffer,
2821  FwEnumStoreType& smId,
2822  FwEnumStoreType& signal
2823  );
2824 
2826  void Svc_FpySequencer_SequencerStateMachine_smDispatch(
2827  Fw::SerialBufferBase& buffer,
2828  Svc_FpySequencer_SequencerStateMachine& sm,
2830  );
2831 
2832  private:
2833 
2834  // ----------------------------------------------------------------------
2835  // Parameter set functions
2836  // ----------------------------------------------------------------------
2837 
2841  Fw::CmdResponse paramSet_STATEMENT_TIMEOUT_SECS(
2842  Fw::SerialBufferBase& val
2843  );
2844 
2845  private:
2846 
2847  // ----------------------------------------------------------------------
2848  // Parameter save functions
2849  // ----------------------------------------------------------------------
2850 
2854  Fw::CmdResponse paramSave_STATEMENT_TIMEOUT_SECS();
2855 
2856 #if !FW_DIRECT_PORT_CALLS
2857 
2858  private:
2859 
2860  // ----------------------------------------------------------------------
2861  // Special input ports
2862  // ----------------------------------------------------------------------
2863 
2865  Fw::InputCmdPort m_cmdIn_InputPort[NUM_CMDIN_INPUT_PORTS];
2866 
2867 #endif
2868 
2869 #if !FW_DIRECT_PORT_CALLS
2870 
2871  private:
2872 
2873  // ----------------------------------------------------------------------
2874  // Typed input ports
2875  // ----------------------------------------------------------------------
2876 
2878  Svc::InputSchedPort m_checkTimers_InputPort[NUM_CHECKTIMERS_INPUT_PORTS];
2879 
2881  Fw::InputCmdResponsePort m_cmdResponseIn_InputPort[NUM_CMDRESPONSEIN_INPUT_PORTS];
2882 
2884  Svc::InputPingPort m_pingIn_InputPort[NUM_PINGIN_INPUT_PORTS];
2885 
2888 
2890  Svc::InputCmdSeqInPort m_seqRunIn_InputPort[NUM_SEQRUNIN_INPUT_PORTS];
2891 
2893  Svc::InputSchedPort m_tlmWrite_InputPort[NUM_TLMWRITE_INPUT_PORTS];
2894 
2895 #endif
2896 
2897 #if !FW_DIRECT_PORT_CALLS
2898 
2899  private:
2900 
2901  // ----------------------------------------------------------------------
2902  // Special output ports
2903  // ----------------------------------------------------------------------
2904 
2906  Fw::OutputCmdRegPort m_cmdRegOut_OutputPort[NUM_CMDREGOUT_OUTPUT_PORTS];
2907 
2909  Fw::OutputCmdResponsePort m_cmdResponseOut_OutputPort[NUM_CMDRESPONSEOUT_OUTPUT_PORTS];
2910 
2912  Fw::OutputLogPort m_logOut_OutputPort[NUM_LOGOUT_OUTPUT_PORTS];
2913 
2914 #if FW_ENABLE_TEXT_LOGGING == 1
2915 
2917  Fw::OutputLogTextPort m_logTextOut_OutputPort[NUM_LOGTEXTOUT_OUTPUT_PORTS];
2918 
2919 #endif
2920 
2922  Fw::OutputPrmGetPort m_prmGet_OutputPort[NUM_PRMGET_OUTPUT_PORTS];
2923 
2925  Fw::OutputPrmSetPort m_prmSet_OutputPort[NUM_PRMSET_OUTPUT_PORTS];
2926 
2928  Fw::OutputTimePort m_timeCaller_OutputPort[NUM_TIMECALLER_OUTPUT_PORTS];
2929 
2931  Fw::OutputTlmPort m_tlmOut_OutputPort[NUM_TLMOUT_OUTPUT_PORTS];
2932 
2933 #endif
2934 
2935 #if !FW_DIRECT_PORT_CALLS
2936 
2937  private:
2938 
2939  // ----------------------------------------------------------------------
2940  // Typed output ports
2941  // ----------------------------------------------------------------------
2942 
2944  Fw::OutputComPort m_cmdOut_OutputPort[NUM_CMDOUT_OUTPUT_PORTS];
2945 
2947  Fw::OutputPrmGetPort m_getParam_OutputPort[NUM_GETPARAM_OUTPUT_PORTS];
2948 
2950  Fw::OutputTlmGetPort m_getTlmChan_OutputPort[NUM_GETTLMCHAN_OUTPUT_PORTS];
2951 
2953  Svc::OutputPingPort m_pingOut_OutputPort[NUM_PINGOUT_OUTPUT_PORTS];
2954 
2956  Fw::OutputCmdResponsePort m_seqDoneOut_OutputPort[NUM_SEQDONEOUT_OUTPUT_PORTS];
2957 
2959  Svc::OutputCmdSeqInPort m_seqStartOut_OutputPort[NUM_SEQSTARTOUT_OUTPUT_PORTS];
2960 
2961 #endif
2962 
2963  private:
2964 
2965  // ----------------------------------------------------------------------
2966  // First update flags for telemetry channels
2967  // ----------------------------------------------------------------------
2968 
2970  bool m_first_update_State = true;
2971 
2973  bool m_first_update_SequencesSucceeded = true;
2974 
2976  bool m_first_update_SequencesFailed = true;
2977 
2979  bool m_first_update_SequencesCancelled = true;
2980 
2982  bool m_first_update_StatementsDispatched = true;
2983 
2985  bool m_first_update_StatementsFailed = true;
2986 
2988  bool m_first_update_LastDirectiveError = true;
2989 
2991  bool m_first_update_DirectiveErrorIndex = true;
2992 
2994  bool m_first_update_DirectiveErrorId = true;
2995 
2997  bool m_first_update_SeqPath = true;
2998 
3000  bool m_first_update_Debug_ReachedEndOfFile = true;
3001 
3003  bool m_first_update_Debug_NextStatementReadSuccess = true;
3004 
3006  bool m_first_update_Debug_NextStatementOpcode = true;
3007 
3009  bool m_first_update_Debug_NextStatementIndex = true;
3010 
3012  bool m_first_update_Debug_NextCmdOpcode = true;
3013 
3015  bool m_first_update_Debug_StackSize = true;
3016 
3018  bool m_first_update_BreakpointInUse = true;
3019 
3021  bool m_first_update_BreakpointIndex = true;
3022 
3024  bool m_first_update_BreakOnlyOnceOnBreakpoint = true;
3025 
3027  bool m_first_update_BreakBeforeNextLine = true;
3028 
3030  bool m_first_update_PRM_STATEMENT_TIMEOUT_SECS = true;
3031 
3032  private:
3033 
3034  // ----------------------------------------------------------------------
3035  // Last value storage for telemetry channels
3036  // ----------------------------------------------------------------------
3037 
3039  FwEnumStoreType m_last_State = {};
3040 
3042  U64 m_last_SequencesSucceeded = {};
3043 
3045  U64 m_last_SequencesFailed = {};
3046 
3048  U64 m_last_SequencesCancelled = {};
3049 
3051  U64 m_last_StatementsDispatched = {};
3052 
3054  U64 m_last_StatementsFailed = {};
3055 
3057  Svc::Fpy::DirectiveErrorCode m_last_LastDirectiveError = {};
3058 
3060  U64 m_last_DirectiveErrorIndex = {};
3061 
3063  Svc::Fpy::DirectiveId m_last_DirectiveErrorId = {};
3064 
3066  Fw::TlmString m_last_SeqPath = {};
3067 
3069  bool m_last_Debug_ReachedEndOfFile = {};
3070 
3072  bool m_last_Debug_NextStatementReadSuccess = {};
3073 
3075  U8 m_last_Debug_NextStatementOpcode = {};
3076 
3078  U32 m_last_Debug_NextStatementIndex = {};
3079 
3081  FwOpcodeType m_last_Debug_NextCmdOpcode = {};
3082 
3084  Svc::Fpy::StackSizeType m_last_Debug_StackSize = {};
3085 
3087  bool m_last_BreakpointInUse = {};
3088 
3090  U32 m_last_BreakpointIndex = {};
3091 
3093  bool m_last_BreakOnlyOnceOnBreakpoint = {};
3094 
3096  bool m_last_BreakBeforeNextLine = {};
3097 
3099  F32 m_last_PRM_STATEMENT_TIMEOUT_SECS = {};
3100 
3101  private:
3102 
3103  // ----------------------------------------------------------------------
3104  // Parameter validity flags
3105  // ----------------------------------------------------------------------
3106 
3108  Fw::ParamValid m_param_STATEMENT_TIMEOUT_SECS_valid;
3109 
3110  private:
3111 
3112  // ----------------------------------------------------------------------
3113  // Parameter variables
3114  // ----------------------------------------------------------------------
3115 
3122  F32 m_STATEMENT_TIMEOUT_SECS;
3123 
3124  private:
3125 
3126  // ----------------------------------------------------------------------
3127  // State machine instances
3128  // ----------------------------------------------------------------------
3129 
3131  Svc_FpySequencer_SequencerStateMachine m_stateMachine_sequencer;
3132 
3133  private:
3134 
3135  // ----------------------------------------------------------------------
3136  // Mutexes
3137  // ----------------------------------------------------------------------
3138 
3140  Os::Mutex m_paramLock;
3141 
3142  };
3143 
3144 }
3145 
3146 #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 sequencer_sendSignal_result_checkShouldWake_wakeup()
Send signal result_checkShouldWake_wakeup to state machine sequencer.
friend class FpySequencerTesterBase
Friend class tester to support autocoded test harness.
virtual void directive_goto_internalInterfaceHandler(const Svc::FpySequencer_GotoDirective &directive)=0
Internal interface handler for directive_goto.
void directive_if_internalInterfaceInvoke(const Svc::FpySequencer_IfDirective &directive)
Internal interface base-class function for directive_if.
bool isConnected_prmSet_OutputPort(FwIndexType portNum) const
virtual void RUN_ARGS_preMsgHook(FwOpcodeType opCode, U32 cmdSeq)
Pre-message hook for command RUN_ARGS.
virtual void directive_storeRel_internalInterfaceHandler(const Svc::FpySequencer_StoreRelDirective &directive)=0
Internal interface handler for directive_storeRel.
void sequencer_sendSignal_result_success()
Send signal result_success to state machine sequencer.
void cmdResponseIn_handlerBase(FwIndexType portNum, FwOpcodeType opCode, U32 cmdSeq, const Fw::CmdResponse &response)
Handler base-class function for input port cmdResponseIn.
void sequencer_sendSignal_stmtResponse_success()
Send signal stmtResponse_success to state machine sequencer.
virtual void VALIDATE_ARGS_preMsgHook(FwOpcodeType opCode, U32 cmdSeq)
Pre-message hook for command VALIDATE_ARGS.
virtual ~FpySequencerComponentBase()
Destroy FpySequencerComponentBase object.
virtual void Svc_FpySequencer_SequencerStateMachine_action_setSequenceArguments(SmId smId, Svc_FpySequencer_SequencerStateMachine::Signal signal, const Svc::FpySequencer_SequenceExecutionArgs &value)=0
void log_WARNING_LO_CmdResponseWhileNotRunningSequence(I32 state, FwOpcodeType opcode, Fw::CmdResponse response) const
Log event CmdResponseWhileNotRunningSequence.
void tlmWrite_Debug_StackSize(Svc::Fpy::StackSizeType arg, Fw::Time _tlmTime=Fw::Time())
virtual void SET_BREAKPOINT_cmdHandler(FwOpcodeType opCode, U32 cmdSeq, U32 stmtIdx, bool breakOnce)=0
virtual void directive_stackOp_internalInterfaceHandler(const Svc::FpySequencer_StackOpDirective &directive)=0
Internal interface handler for directive_stackOp.
void sequencer_sendSignal_cmd_VALIDATE(const Svc::FpySequencer_SequenceExecutionArgs &value)
Send signal cmd_VALIDATE to state machine sequencer.
void directive_noOp_internalInterfaceInvoke(const Svc::FpySequencer_NoOpDirective &directive)
Internal interface base-class function for directive_noOp.
static constexpr FwIndexType getNum_tlmWrite_InputPorts()
Enum representing a command response.
virtual void Svc_FpySequencer_SequencerStateMachine_action_validate(SmId smId, Svc_FpySequencer_SequencerStateMachine::Signal signal)=0
virtual void RUN_VALIDATED_preMsgHook(FwOpcodeType opCode, U32 cmdSeq)
Pre-message hook for command RUN_VALIDATED.
void log_WARNING_HI_FileReadError(Svc::FpySequencer_FileReadStage readStage, const Fw::StringBase &filePath, I32 errorCode) const
Log event FileReadError.
void set_logOut_OutputPort(FwIndexType portNum, Fw::InputLogPort *port)
Connect port to logOut[portNum].
virtual void DUMP_STACK_TO_FILE_cmdHandler(FwOpcodeType opCode, U32 cmdSeq, const Fw::CmdStringArg &fileName)=0
void tlmWrite_State(FwEnumStoreType arg, Fw::Time _tlmTime=Fw::Time())
void tlmWrite_SequencesSucceeded(U64 arg, Fw::Time _tlmTime=Fw::Time())
void log_WARNING_HI_ExtraBytesInSequence(FwSizeType remaining) const
Log event ExtraBytesInSequence.
virtual void Svc_FpySequencer_SequencerStateMachine_action_clearSequenceFile(SmId smId, Svc_FpySequencer_SequencerStateMachine::Signal signal)=0
void directive_allocate_internalInterfaceInvoke(const Svc::FpySequencer_AllocateDirective &directive)
Internal interface base-class function for directive_allocate.
pops bytes off the top of the stack and does nothing with them
void directive_storeRelConstOffset_internalInterfaceInvoke(const Svc::FpySequencer_StoreRelConstOffsetDirective &directive)
Internal interface base-class function for directive_storeRelConstOffset.
static constexpr FwIndexType getNum_timeCaller_OutputPorts()
virtual void seqRunIn_preMsgHook(FwIndexType portNum, const Fw::StringBase &filename, const Svc::SeqArgs &args)
Pre-message hook for async input port seqRunIn.
void log_DIAGNOSTIC_LogDiagnostic(const Fw::StringBase &filePath, const Fw::StringBase &message) const
Log event LogDiagnostic.
void log_COMMAND_LogCommand(const Fw::StringBase &filePath, const Fw::StringBase &message) const
Log event LogCommand.
virtual void directive_waitAbs_internalInterfaceHandler(const Svc::FpySequencer_WaitAbsDirective &directive)=0
Internal interface handler for directive_waitAbs.
virtual void RUN_VALIDATED_cmdHandler(FwOpcodeType opCode, U32 cmdSeq, Svc::BlockState block)=0
virtual void pingIn_preMsgHook(FwIndexType portNum, U32 key)
Pre-message hook for async input port pingIn.
virtual void STEP_cmdHandler(FwOpcodeType opCode, U32 cmdSeq)=0
void directive_pushTlmValAndTime_internalInterfaceInvoke(const Svc::FpySequencer_PushTlmValAndTimeDirective &directive)
Internal interface base-class function for directive_pushTlmValAndTime.
void directive_stackCmd_internalInterfaceInvoke(const Svc::FpySequencer_StackCmdDirective &directive)
Internal interface base-class function for directive_stackCmd.
void cmdIn_handlerBase(FwIndexType portNum, FwOpcodeType opCode, U32 cmdSeq, Fw::CmdArgBuffer &args)
Handler base-class function for input port cmdIn.
void log_WARNING_HI_TooManySequenceDirectives(U16 count, U16 max) const
Log event TooManySequenceDirectives.
void sequencer_sendSignal_stmtResponse_unexpected()
Send signal stmtResponse_unexpected to state machine sequencer.
void sequencer_sendSignal_cmd_BREAK()
Send signal cmd_BREAK to state machine sequencer.
void sequencer_sendSignal_result_dispatchStatement_failure()
Send signal result_dispatchStatement_failure to state machine sequencer.
void log_WARNING_HI_DirectiveDeserializeError(U8 opcode, U32 stmtIdx, I32 errorCode, U64 buffLeft, U64 buffLength) const
Log event DirectiveDeserializeError.
virtual void pingIn_handler(FwIndexType portNum, U32 key)=0
Handler for input port pingIn.
Svc::InputSchedPort * get_checkTimers_InputPort(FwIndexType portNum)
virtual void STEP_preMsgHook(FwOpcodeType opCode, U32 cmdSeq)
Pre-message hook for command STEP.
void RUN_VALIDATED_cmdHandlerBase(FwOpcodeType opCode, U32 cmdSeq, Fw::CmdArgBuffer &args)
void tlmWrite_PRM_STATEMENT_TIMEOUT_SECS(F32 arg, Fw::Time _tlmTime=Fw::Time())
void init()
Object initializer.
Definition: ObjBase.cpp:24
void set_pingOut_OutputPort(FwIndexType portNum, Svc::InputPingPort *port)
Connect port to pingOut[portNum].
static constexpr FwIndexType getNum_tlmOut_OutputPorts()
void log_ACTIVITY_LO_LogActivityLo(const Fw::StringBase &filePath, const Fw::StringBase &message) const
Log event LogActivityLo.
virtual void directive_allocate_internalInterfaceHandler(const Svc::FpySequencer_AllocateDirective &directive)=0
Internal interface handler for directive_allocate.
static constexpr FwIndexType getNum_pingOut_OutputPorts()
Svc_FpySequencer_SequencerStateMachine::State sequencer_getState() const
Get the state of state machine instance sequencer.
void set_getTlmChan_OutputPort(FwIndexType portNum, Fw::InputTlmGetPort *port)
Connect port to getTlmChan[portNum].
float F32
32-bit floating point
Definition: BasicTypes.h:83
virtual bool Svc_FpySequencer_SequencerStateMachine_guard_shouldBreak(SmId smId, Svc_FpySequencer_SequencerStateMachine::Signal signal) const =0
virtual void checkTimers_handler(FwIndexType portNum, U32 context)=0
Handler for input port checkTimers.
static constexpr FwIndexType getNum_getParam_OutputPorts()
static constexpr FwIndexType getNum_cmdRegOut_OutputPorts()
void log_WARNING_HI_WrongCmdResponseOpcode(FwOpcodeType opcode, Fw::CmdResponse response, FwOpcodeType expectedOpcode) const
Log event WrongCmdResponseOpcode.
void tlmWrite_StatementsFailed(U64 arg, Fw::Time _tlmTime=Fw::Time())
FwIdType FwEventIdType
The type of an event identifier.
loads a value from a local variable at a compile-time-known offset relative to the current stack fram...
void seqCancelIn_handlerBase(FwIndexType portNum)
Handler base-class function for input port seqCancelIn.
void log_ACTIVITY_HI_LogActivityHi(const Fw::StringBase &filePath, const Fw::StringBase &message) const
Log event LogActivityHi.
void regCommands()
Register commands with the Command Dispatcher.
void directive_loadAbs_internalInterfaceInvoke(const Svc::FpySequencer_LoadAbsDirective &directive)
Internal interface base-class function for directive_loadAbs.
F32 paramGet_STATEMENT_TIMEOUT_SECS(Fw::ParamValid &valid)
Svc::InputCmdSeqCancelPort * get_seqCancelIn_InputPort(FwIndexType portNum)
pop two byte arrays off the top of the stack, call memcmp, push 1 if they were equal, 0 otherwise
void cmdResponse_out(FwOpcodeType opCode, U32 cmdSeq, Fw::CmdResponse response)
Emit command response.
void directive_memCmp_internalInterfaceInvoke(const Svc::FpySequencer_MemCmpDirective &directive)
Internal interface base-class function for directive_memCmp.
pops a severity and message from the stack and emits an F Prime event
void directive_pushTime_internalInterfaceInvoke(const Svc::FpySequencer_PushTimeDirective &directive)
Internal interface base-class function for directive_pushTime.
void tlmWrite_DirectiveErrorId(const Svc::Fpy::DirectiveId &arg, Fw::Time _tlmTime=Fw::Time())
static constexpr FwIndexType getNum_cmdResponseIn_InputPorts()
Svc::InputPingPort * get_pingIn_InputPort(FwIndexType portNum)
void tlmWrite_Debug_NextCmdOpcode(FwOpcodeType arg, Fw::Time _tlmTime=Fw::Time())
void tlmWrite_handlerBase(FwIndexType portNum, U32 context)
Handler base-class function for input port tlmWrite.
void RUN_ARGS_cmdHandlerBase(FwOpcodeType opCode, U32 cmdSeq, Fw::CmdArgBuffer &args)
Base-class handler function for command RUN_ARGS.
virtual void directive_constCmd_internalInterfaceHandler(const Svc::FpySequencer_ConstCmdDirective &directive)=0
Internal interface handler for directive_constCmd.
Fw::InputCmdPort * get_cmdIn_InputPort(FwIndexType portNum)
bool isConnected_cmdResponseOut_OutputPort(FwIndexType portNum) const
virtual void Svc_FpySequencer_SequencerStateMachine_action_clearSequenceArguments(SmId smId, Svc_FpySequencer_SequencerStateMachine::Signal signal)=0
void pingIn_handlerBase(FwIndexType portNum, U32 key)
Handler base-class function for input port pingIn.
stores a value to an absolute address in the stack (for global variables), const offset ...
void set_timeCaller_OutputPort(FwIndexType portNum, Fw::InputTimePort *port)
Connect port to timeCaller[portNum].
friend class FpySequencerTester
Test implementation for the enclosing component.
virtual void Svc_FpySequencer_SequencerStateMachine_action_dispatchStatement(SmId smId, Svc_FpySequencer_SequencerStateMachine::Signal signal)=0
virtual void directive_pushVal_internalInterfaceHandler(const Svc::FpySequencer_PushValDirective &directive)=0
Internal interface handler for directive_pushVal.
void sequencer_sendSignal_cmd_RUN_VALIDATED(const Svc::FpySequencer_SequenceExecutionArgs &value)
Send signal cmd_RUN_VALIDATED to state machine sequencer.
virtual void Svc_FpySequencer_SequencerStateMachine_action_clearBreakpoint(SmId smId, Svc_FpySequencer_SequencerStateMachine::Signal signal)=0
virtual void BREAK_cmdHandler(FwOpcodeType opCode, U32 cmdSeq)=0
Svc_FpySequencer_SequencerStateMachine(FpySequencerComponentBase &component)
Constructor.
FwIdType FwChanIdType
The type of a telemetry channel identifier.
void log_WARNING_HI_EndOfFileError(Svc::FpySequencer_FileReadStage readStage, const Fw::StringBase &filePath) const
Log event EndOfFileError.
void set_cmdResponseOut_OutputPort(FwIndexType portNum, Fw::InputCmdResponsePort *port)
Connect port to cmdResponseOut[portNum].
void log_WARNING_LO_CmdResponseFromOldSequence(FwOpcodeType opcode, Fw::CmdResponse response, U16 oldSequenceIdx, U16 currentSequenceIdx) const
Log event CmdResponseFromOldSequence.
Sequencer blocking state.
Loads and validates a sequence with arguments.
FpySequencerComponentBase(const char *compName="")
Construct FpySequencerComponentBase object.
virtual void directive_call_internalInterfaceHandler(const Svc::FpySequencer_CallDirective &directive)=0
Internal interface handler for directive_call.
virtual void CONTINUE_cmdHandler(FwOpcodeType opCode, U32 cmdSeq)=0
void sequencer_sendSignal_checkTimersIn()
Send signal checkTimersIn to state machine sequencer.
void tlmWrite_StatementsDispatched(U64 arg, Fw::Time _tlmTime=Fw::Time())
void tlmWrite_LastDirectiveError(const Svc::Fpy::DirectiveErrorCode &arg, Fw::Time _tlmTime=Fw::Time())
void VALIDATE_cmdHandlerBase(FwOpcodeType opCode, U32 cmdSeq, Fw::CmdArgBuffer &args)
virtual void directive_discard_internalInterfaceHandler(const Svc::FpySequencer_DiscardDirective &directive)=0
Internal interface handler for directive_discard.
void VALIDATE_ARGS_cmdHandlerBase(FwOpcodeType opCode, U32 cmdSeq, Fw::CmdArgBuffer &args)
static constexpr FwIndexType getNum_prmSet_OutputPorts()
void log_WARNING_HI_LogWarningHi(const Fw::StringBase &filePath, const Fw::StringBase &message) const
Log event LogWarningHi.
Implementation of state machine Svc_FpySequencer_SequencerStateMachine.
peeks at N bytes from the stack, starting from an offset relative to the top of the stack ...
void sequencer_sendSignal_stmtResponse_failure()
Send signal stmtResponse_failure to state machine sequencer.
void CANCEL_cmdHandlerBase(FwOpcodeType opCode, U32 cmdSeq, Fw::CmdArgBuffer &args)
void directive_waitAbs_internalInterfaceInvoke(const Svc::FpySequencer_WaitAbsDirective &directive)
Internal interface base-class function for directive_waitAbs.
void directive_peek_internalInterfaceInvoke(const Svc::FpySequencer_PeekDirective &directive)
Internal interface base-class function for directive_peek.
void set_cmdRegOut_OutputPort(FwIndexType portNum, Fw::InputCmdRegPort *port)
Connect port to cmdRegOut[portNum].
void tlmWrite_Debug_NextStatementIndex(U32 arg, Fw::Time _tlmTime=Fw::Time())
void log_WARNING_HI_CommandFailed(FwOpcodeType opCode, U32 stmtIdx, const Fw::StringBase &filePath, Fw::CmdResponse response) const
Log event CommandFailed.
void sequencer_sendSignal_stmtResponse_beginSleep()
Send signal stmtResponse_beginSleep to state machine sequencer.
void log_WARNING_HI_CommandTimedOut(FwOpcodeType opCode, U32 stmtIdx, const Fw::StringBase &filePath) const
Log event CommandTimedOut.
void sequencer_sendSignal_result_checkStatementTimeout_noTimeout()
Send signal result_checkStatementTimeout_noTimeout to state machine sequencer.
Enum representing event severity.
static constexpr FwIndexType getNum_seqRunIn_InputPorts()
virtual void tlmWrite_handler(FwIndexType portNum, U32 context)=0
Handler for input port tlmWrite.
Svc::InputCmdSeqInPort * get_seqRunIn_InputPort(FwIndexType portNum)
virtual void directive_memCmp_internalInterfaceHandler(const Svc::FpySequencer_MemCmpDirective &directive)=0
Internal interface handler for directive_memCmp.
void loadParameters()
Load the parameters from a parameter source.
virtual void Svc_FpySequencer_SequencerStateMachine_action_sendCmdResponse_EXECUTION_ERROR(SmId smId, Svc_FpySequencer_SequencerStateMachine::Signal signal)=0
void log_WARNING_HI_InvalidSeqRunCall(I32 state) const
Log event InvalidSeqRunCall.
virtual void directive_if_internalInterfaceHandler(const Svc::FpySequencer_IfDirective &directive)=0
Internal interface handler for directive_if.
void directive_getField_internalInterfaceInvoke(const Svc::FpySequencer_GetFieldDirective &directive)
Internal interface base-class function for directive_getField.
static constexpr FwIndexType getNum_cmdOut_OutputPorts()
virtual void Svc_FpySequencer_SequencerStateMachine_action_setGoalState_VALID(SmId smId, Svc_FpySequencer_SequencerStateMachine::Signal signal)=0
sleeps for a relative duration from the current time
virtual void RUN_cmdHandler(FwOpcodeType opCode, U32 cmdSeq, const Fw::CmdStringArg &fileName, Svc::BlockState block)=0
void seqDoneOut_out(FwIndexType portNum, FwOpcodeType opCode, U32 cmdSeq, const Fw::CmdResponse &response) const
Invoke output port seqDoneOut.
virtual void directive_storeRelConstOffset_internalInterfaceHandler(const Svc::FpySequencer_StoreRelConstOffsetDirective &directive)=0
Internal interface handler for directive_storeRelConstOffset.
void directive_discard_internalInterfaceInvoke(const Svc::FpySequencer_DiscardDirective &directive)
Internal interface base-class function for directive_discard.
uint8_t U8
8-bit unsigned integer
Definition: BasicTypes.h:53
virtual void directive_noOp_internalInterfaceHandler(const Svc::FpySequencer_NoOpDirective &directive)=0
Internal interface handler for directive_noOp.
Must be called after VALIDATE. Runs the sequence that was validated.
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.
static constexpr FwIndexType getNum_getTlmChan_OutputPorts()
virtual void directive_getField_internalInterfaceHandler(const Svc::FpySequencer_GetFieldDirective &directive)=0
Internal interface handler for directive_getField.
virtual void directive_loadRel_internalInterfaceHandler(const Svc::FpySequencer_LoadRelDirective &directive)=0
Internal interface handler for directive_loadRel.
bool isConnected_timeCaller_OutputPort(FwIndexType portNum) const
void tlmWrite_SequencesFailed(U64 arg, Fw::Time _tlmTime=Fw::Time())
void log_WARNING_HI_FileReadDeserializeError(Svc::FpySequencer_FileReadStage readStage, const Fw::StringBase &filePath, I32 errorCode, U64 buffLeft, U64 buffLength) const
Log event FileReadDeserializeError.
loads a value from an absolute address in the stack (for global variables)
void tlmWrite_SeqPath(const Fw::StringBase &arg, Fw::Time _tlmTime=Fw::Time())
virtual void SET_BREAKPOINT_preMsgHook(FwOpcodeType opCode, U32 cmdSeq)
Pre-message hook for command SET_BREAKPOINT.
PlatformIndexType FwIndexType
void directive_constCmd_internalInterfaceInvoke(const Svc::FpySequencer_ConstCmdDirective &directive)
Internal interface base-class function for directive_constCmd.
virtual void VALIDATE_preMsgHook(FwOpcodeType opCode, U32 cmdSeq)
Pre-message hook for command VALIDATE.
static constexpr FwIndexType getNum_checkTimers_InputPorts()
bool isConnected_pingOut_OutputPort(FwIndexType portNum) const
void log_WARNING_HI_MismatchedTimeContext(I32 internalTimeContext, I32 otherTimeContext) const
Log event MismatchedTimeContext.
virtual void Svc_FpySequencer_SequencerStateMachine_action_clearBreakBeforeNextLine(SmId smId, Svc_FpySequencer_SequencerStateMachine::Signal signal)=0
void directive_return_internalInterfaceInvoke(const Svc::FpySequencer_ReturnDirective &directive)
Internal interface base-class function for directive_return.
bool isConnected_cmdOut_OutputPort(FwIndexType portNum) const
Svc::InputSchedPort * get_tlmWrite_InputPort(FwIndexType portNum)
void seqRunIn_handlerBase(FwIndexType portNum, const Fw::StringBase &filename, const Svc::SeqArgs &args)
Handler base-class function for input port seqRunIn.
void log_WARNING_HI_WrongSchemaVersion(U8 expected, U8 actual) const
Log event WrongSchemaVersion.
virtual void Svc_FpySequencer_SequencerStateMachine_action_report_seqBroken(SmId smId, Svc_FpySequencer_SequencerStateMachine::Signal signal)=0
virtual void Svc_FpySequencer_SequencerStateMachine_action_setBreakBeforeNextLine(SmId smId, Svc_FpySequencer_SequencerStateMachine::Signal signal)=0
void sequencer_sendSignal_cmd_CLEAR_BREAKPOINT()
Send signal cmd_CLEAR_BREAKPOINT to state machine sequencer.
void log_WARNING_LO_LogWarningLo(const Fw::StringBase &filePath, const Fw::StringBase &message) const
Log event LogWarningLo.
Svc::FpySequencer_SequencerStateMachine_State State
The state type.
void log_WARNING_HI_UnknownSequencerDirective(U8 opcode, U32 stmtIdx, const Fw::StringBase &filePath) const
Log event UnknownSequencerDirective.
virtual void VALIDATE_cmdHandler(FwOpcodeType opCode, U32 cmdSeq, const Fw::CmdStringArg &fileName)=0
void log_WARNING_HI_InvalidSeqCancelCall(I32 state) const
Log event InvalidSeqCancelCall.
stores a value to a local variable at a runtime-determined offset relative to the current stack frame...
virtual void directive_return_internalInterfaceHandler(const Svc::FpySequencer_ReturnDirective &directive)=0
Internal interface handler for directive_return.
virtual void Svc_FpySequencer_SequencerStateMachine_action_report_seqSucceeded(SmId smId, Svc_FpySequencer_SequencerStateMachine::Signal signal)=0
virtual void BREAK_preMsgHook(FwOpcodeType opCode, U32 cmdSeq)
Pre-message hook for command BREAK.
void tlmWrite_DirectiveErrorIndex(U64 arg, Fw::Time _tlmTime=Fw::Time())
RateGroupDivider component implementation.
void log_WARNING_HI_CmdResponseWhileNotAwaiting(FwOpcodeType opcode, Fw::CmdResponse response) const
Log event CmdResponseWhileNotAwaiting.
virtual void Svc_FpySequencer_SequencerStateMachine_action_setGoalState_RUNNING(SmId smId, Svc_FpySequencer_SequencerStateMachine::Signal signal)=0
void log_WARNING_HI_CmdResponseWhileAwaitingDirective(FwOpcodeType opcode, Fw::CmdResponse response, U8 expectedDirectiveOpcode) const
Log event CmdResponseWhileAwaitingDirective.
virtual void cmdResponseIn_preMsgHook(FwIndexType portNum, FwOpcodeType opCode, U32 cmdSeq, const Fw::CmdResponse &response)
Pre-message hook for async input port cmdResponseIn.
Enum representing parameter validity.
virtual void directive_popEvent_internalInterfaceHandler(const Svc::FpySequencer_PopEventDirective &directive)=0
Internal interface handler for directive_popEvent.
virtual void Svc_FpySequencer_SequencerStateMachine_action_setBreakpoint(SmId smId, Svc_FpySequencer_SequencerStateMachine::Signal signal, const Svc::FpySequencer_BreakpointArgs &value)=0
void log_FATAL_LogFatal(const Fw::StringBase &filePath, const Fw::StringBase &message) const
Log event LogFatal.
void log_WARNING_HI_TooManySequenceArgs(U8 count, U8 max) const
Log event TooManySequenceArgs.
void sequencer_sendSignal_cmd_CONTINUE()
Send signal cmd_CONTINUE to state machine sequencer.
void directive_storeAbs_internalInterfaceInvoke(const Svc::FpySequencer_StoreAbsDirective &directive)
Internal interface base-class function for directive_storeAbs.
void DUMP_STACK_TO_FILE_cmdHandlerBase(FwOpcodeType opCode, U32 cmdSeq, Fw::CmdArgBuffer &args)
friend class FpySequencerTester
Friend class tester implementation to support white-box testing.
void log_WARNING_HI_MismatchedTimeBase(I32 internalTimeBase, I32 otherTimeBase) const
Log event MismatchedTimeBase.
void sequencer_sendSignal_result_failure()
Send signal result_failure to state machine sequencer.
bool isConnected_seqStartOut_OutputPort(FwIndexType portNum) const
virtual void CONTINUE_preMsgHook(FwOpcodeType opCode, U32 cmdSeq)
Pre-message hook for command CONTINUE.
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.
Loads, validates and runs a sequence.
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.
Writes the contents of the stack to a file. This command is only valid in the RUNNING.PAUSED state.
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())