F´ Flight Software - C/C++ Documentation
A framework for building embedded system applications to NASA flight quality standards.
FpySequencerComponentAc.hpp
Go to the documentation of this file.
1 // ======================================================================
2 // \title FpySequencerComponentAc.hpp
3 // \author Generated by fpp-to-cpp
4 // \brief hpp file for FpySequencer component base class
5 // ======================================================================
6 
7 #ifndef Svc_FpySequencerComponentAc_HPP
8 #define Svc_FpySequencerComponentAc_HPP
9 
10 #include <atomic>
11 
12 #include "Fw/Cmd/CmdPortAc.hpp"
13 #include "Fw/Cmd/CmdRegPortAc.hpp"
16 #include "Fw/Cmd/CmdString.hpp"
17 #include "Fw/Com/ComPortAc.hpp"
19 #include "Fw/FPrimeBasicTypes.hpp"
20 #include "Fw/Log/LogPortAc.hpp"
21 #include "Fw/Log/LogString.hpp"
22 #if FW_ENABLE_TEXT_LOGGING == 1
23 #include "Fw/Log/LogTextPortAc.hpp"
24 #endif
27 #include "Fw/Prm/PrmGetPortAc.hpp"
28 #include "Fw/Prm/PrmSetPortAc.hpp"
29 #include "Fw/Prm/PrmString.hpp"
30 #include "Fw/Time/TimePortAc.hpp"
31 #include "Fw/Tlm/TlmGetPortAc.hpp"
32 #include "Fw/Tlm/TlmPortAc.hpp"
33 #include "Fw/Tlm/TlmString.hpp"
35 #include "Os/Mutex.hpp"
69 #include "Svc/Ping/PingPortAc.hpp"
77 
78 namespace Svc {
79 
86  {
87 
88  // ----------------------------------------------------------------------
89  // Friend classes
90  // ----------------------------------------------------------------------
91 
93  friend class FpySequencerTesterBase;
95  friend class FpySequencerTester;
96 
97  protected:
98 
99  // ----------------------------------------------------------------------
100  // Constants
101  // ----------------------------------------------------------------------
102 
104  enum {
106  };
107 
109  enum {
115  };
116 
118  enum {
127  };
128 
130  enum {
137  };
138 
140  enum {
141  OPCODE_RUN = 0x0,
145  OPCODE_SET_BREAKPOINT = 0x4,
147  OPCODE_BREAK = 0x5,
151  OPCODE_CONTINUE = 0x6,
156  OPCODE_STEP = 0x8,
158  OPCODE_SET_FLAG = 0x9,
166  };
167 
169  enum {
202  };
203 
205  enum {
227  };
228 
230  enum {
236  };
237 
239  enum class SmId : FwEnumStoreType {
240  sequencer,
241  };
242 
243  protected:
244 
245  // ----------------------------------------------------------------------
246  // Types for internal state machines
247  // ----------------------------------------------------------------------
248 
252  {
253 
254  // ----------------------------------------------------------------------
255  // Friend classes
256  // ----------------------------------------------------------------------
257 
261  friend class FpySequencerTester;
262 
263  public:
264 
267  FpySequencerComponentBase& component
268  );
269 
270  public:
271 
273  void init(
275  );
276 
277  public:
278 
281 
282  private:
283 
285  void action_signalEntered(
286  Signal signal
287  );
288 
290  void action_setSequenceFilePath(
291  Signal signal,
293  );
294 
296  void action_setSequenceBlockState(
297  Signal signal,
299  );
300 
302  void action_validate(
303  Signal signal
304  );
305 
307  void action_report_seqSucceeded(
308  Signal signal
309  );
310 
312  void action_report_seqCancelled(
313  Signal signal
314  );
315 
317  void action_report_seqFailed(
318  Signal signal
319  );
320 
322  void action_report_seqStarted(
323  Signal signal
324  );
325 
327  void action_setGoalState_RUNNING(
328  Signal signal
329  );
330 
332  void action_setGoalState_VALID(
333  Signal signal
334  );
335 
337  void action_setGoalState_IDLE(
338  Signal signal
339  );
340 
342  void action_sendCmdResponse_OK(
343  Signal signal
344  );
345 
347  void action_sendCmdResponse_EXECUTION_ERROR(
348  Signal signal
349  );
350 
352  void action_clearSequenceFile(
353  Signal signal
354  );
355 
357  void action_clearBreakpoint(
358  Signal signal
359  );
360 
362  void action_checkShouldWake(
363  Signal signal
364  );
365 
367  void action_dispatchStatement(
368  Signal signal
369  );
370 
372  void action_resetRuntime(
373  Signal signal
374  );
375 
377  void action_checkStatementTimeout(
378  Signal signal
379  );
380 
382  void action_incrementSequenceCounter(
383  Signal signal
384  );
385 
387  void action_report_seqBroken(
388  Signal signal
389  );
390 
392  void action_setBreakpoint(
393  Signal signal,
395  );
396 
398  void action_setBreakBeforeNextLine(
399  Signal signal
400  );
401 
403  void action_clearBreakBeforeNextLine(
404  Signal signal
405  );
406 
407  private:
408 
410  bool guard_goalStateIs_RUNNING(
411  Signal signal
412  ) const;
413 
415  bool guard_shouldBreak(
416  Signal signal
417  ) const;
418 
420  bool guard_breakOnce(
421  Signal signal
422  ) const;
423 
424  private:
425 
427  FpySequencerComponentBase& m_component;
428 
429  };
430 
431  public:
432 
433  // ----------------------------------------------------------------------
434  // Component initialization
435  // ----------------------------------------------------------------------
436 
438  void init(
439  FwSizeType queueDepth,
440  FwEnumStoreType instance = 0
441  );
442 
443  public:
444 
445  // ----------------------------------------------------------------------
446  // Getters for special input ports
447  // ----------------------------------------------------------------------
448 
453  FwIndexType portNum
454  );
455 
456  public:
457 
458  // ----------------------------------------------------------------------
459  // Getters for typed input ports
460  // ----------------------------------------------------------------------
461 
466  FwIndexType portNum
467  );
468 
473  FwIndexType portNum
474  );
475 
480  FwIndexType portNum
481  );
482 
487  FwIndexType portNum
488  );
489 
494  FwIndexType portNum
495  );
496 
497  public:
498 
499  // ----------------------------------------------------------------------
500  // Connect input ports to special output ports
501  // ----------------------------------------------------------------------
502 
505  FwIndexType portNum,
506  Fw::InputCmdRegPort* port
507  );
508 
511  FwIndexType portNum,
513  );
514 
517  FwIndexType portNum,
518  Fw::InputLogPort* port
519  );
520 
521 #if FW_ENABLE_TEXT_LOGGING == 1
522 
524  void set_logTextOut_OutputPort(
525  FwIndexType portNum,
526  Fw::InputLogTextPort* port
527  );
528 
529 #endif
530 
533  FwIndexType portNum,
534  Fw::InputPrmGetPort* port
535  );
536 
539  FwIndexType portNum,
540  Fw::InputPrmSetPort* port
541  );
542 
545  FwIndexType portNum,
546  Fw::InputTimePort* port
547  );
548 
551  FwIndexType portNum,
552  Fw::InputTlmPort* port
553  );
554 
555  public:
556 
557  // ----------------------------------------------------------------------
558  // Connect typed input ports to typed output ports
559  // ----------------------------------------------------------------------
560 
563  FwIndexType portNum,
564  Fw::InputComPort* port
565  );
566 
569  FwIndexType portNum,
570  Fw::InputPrmGetPort* port
571  );
572 
575  FwIndexType portNum,
576  Fw::InputTlmGetPort* port
577  );
578 
581  FwIndexType portNum,
582  Svc::InputPingPort* port
583  );
584 
587  FwIndexType portNum,
589  );
590 
593  FwIndexType portNum,
595  );
596 
597 #if FW_PORT_SERIALIZATION
598 
599  public:
600 
601  // ----------------------------------------------------------------------
602  // Connect serial input ports to special output ports
603  // ----------------------------------------------------------------------
604 
607  FwIndexType portNum,
608  Fw::InputSerializePort* port
609  );
610 
613  FwIndexType portNum,
614  Fw::InputSerializePort* port
615  );
616 
619  FwIndexType portNum,
620  Fw::InputSerializePort* port
621  );
622 
623 #if FW_ENABLE_TEXT_LOGGING == 1
624 
626  void set_logTextOut_OutputPort(
627  FwIndexType portNum,
628  Fw::InputSerializePort* port
629  );
630 
631 #endif
632 
635  FwIndexType portNum,
636  Fw::InputSerializePort* port
637  );
638 
641  FwIndexType portNum,
642  Fw::InputSerializePort* port
643  );
644 
647  FwIndexType portNum,
648  Fw::InputSerializePort* port
649  );
650 
651 #endif
652 
653 #if FW_PORT_SERIALIZATION
654 
655  public:
656 
657  // ----------------------------------------------------------------------
658  // Connect serial input ports to typed output ports
659  // ----------------------------------------------------------------------
660 
663  FwIndexType portNum,
664  Fw::InputSerializePort* port
665  );
666 
669  FwIndexType portNum,
670  Fw::InputSerializePort* port
671  );
672 
675  FwIndexType portNum,
676  Fw::InputSerializePort* port
677  );
678 
681  FwIndexType portNum,
682  Fw::InputSerializePort* port
683  );
684 
685 #endif
686 
687  public:
688 
689  // ----------------------------------------------------------------------
690  // Command registration
691  // ----------------------------------------------------------------------
692 
696  void regCommands();
697 
698  public:
699 
700  // ----------------------------------------------------------------------
701  // Parameter loading
702  // ----------------------------------------------------------------------
703 
707  void loadParameters();
708 
709  protected:
710 
711  // ----------------------------------------------------------------------
712  // Component construction and destruction
713  // ----------------------------------------------------------------------
714 
717  const char* compName = ""
718  );
719 
721  virtual ~FpySequencerComponentBase();
722 
723  protected:
724 
725  // ----------------------------------------------------------------------
726  // Getters for numbers of special input ports
727  // ----------------------------------------------------------------------
728 
733  return NUM_CMDIN_INPUT_PORTS;
734  }
735 
736  protected:
737 
738  // ----------------------------------------------------------------------
739  // Getters for numbers of typed input ports
740  // ----------------------------------------------------------------------
741 
747  }
748 
754  }
755 
760  return NUM_PINGIN_INPUT_PORTS;
761  }
762 
768  }
769 
775  }
776 
777  protected:
778 
779  // ----------------------------------------------------------------------
780  // Getters for numbers of special output ports
781  // ----------------------------------------------------------------------
782 
788  }
789 
795  }
796 
802  }
803 
804 #if FW_ENABLE_TEXT_LOGGING == 1
805 
809  static constexpr FwIndexType getNum_logTextOut_OutputPorts() {
811  }
812 
813 #endif
814 
820  }
821 
827  }
828 
834  }
835 
841  }
842 
843  protected:
844 
845  // ----------------------------------------------------------------------
846  // Getters for numbers of typed output ports
847  // ----------------------------------------------------------------------
848 
854  }
855 
861  }
862 
868  }
869 
875  }
876 
882  }
883 
889  }
890 
891  protected:
892 
893  // ----------------------------------------------------------------------
894  // Connection status queries for special output ports
895  // ----------------------------------------------------------------------
896 
901  FwIndexType portNum
902  );
903 
908  FwIndexType portNum
909  );
910 
915  FwIndexType portNum
916  );
917 
918 #if FW_ENABLE_TEXT_LOGGING == 1
919 
923  bool isConnected_logTextOut_OutputPort(
924  FwIndexType portNum
925  );
926 
927 #endif
928 
933  FwIndexType portNum
934  );
935 
940  FwIndexType portNum
941  );
942 
947  FwIndexType portNum
948  );
949 
954  FwIndexType portNum
955  );
956 
957  protected:
958 
959  // ----------------------------------------------------------------------
960  // Connection status queries for typed output ports
961  // ----------------------------------------------------------------------
962 
967  FwIndexType portNum
968  );
969 
974  FwIndexType portNum
975  );
976 
981  FwIndexType portNum
982  );
983 
988  FwIndexType portNum
989  );
990 
995  FwIndexType portNum
996  );
997 
1002  FwIndexType portNum
1003  );
1004 
1005  protected:
1006 
1007  // ----------------------------------------------------------------------
1008  // Handlers to implement for typed input ports
1009  // ----------------------------------------------------------------------
1010 
1012  virtual void checkTimers_handler(
1013  FwIndexType portNum,
1014  U32 context
1015  ) = 0;
1016 
1018  virtual void cmdResponseIn_handler(
1019  FwIndexType portNum,
1020  FwOpcodeType opCode,
1021  U32 cmdSeq,
1022  const Fw::CmdResponse& response
1023  ) = 0;
1024 
1026  virtual void pingIn_handler(
1027  FwIndexType portNum,
1028  U32 key
1029  ) = 0;
1030 
1032  virtual void seqRunIn_handler(
1033  FwIndexType portNum,
1034  const Fw::StringBase& filename
1035  ) = 0;
1036 
1038  virtual void tlmWrite_handler(
1039  FwIndexType portNum,
1040  U32 context
1041  ) = 0;
1042 
1043  protected:
1044 
1045  // ----------------------------------------------------------------------
1046  // Port handler base-class functions for typed input ports
1047  //
1048  // Call these functions directly to bypass the corresponding ports
1049  // ----------------------------------------------------------------------
1050 
1053  FwIndexType portNum,
1054  U32 context
1055  );
1056 
1059  FwIndexType portNum,
1060  FwOpcodeType opCode,
1061  U32 cmdSeq,
1062  const Fw::CmdResponse& response
1063  );
1064 
1066  void pingIn_handlerBase(
1067  FwIndexType portNum,
1068  U32 key
1069  );
1070 
1072  void seqRunIn_handlerBase(
1073  FwIndexType portNum,
1074  const Fw::StringBase& filename
1075  );
1076 
1078  void tlmWrite_handlerBase(
1079  FwIndexType portNum,
1080  U32 context
1081  );
1082 
1083  protected:
1084 
1085  // ----------------------------------------------------------------------
1086  // Pre-message hooks for typed async input ports
1087  //
1088  // Each of these functions is invoked just before processing a message
1089  // on the corresponding port. By default, they do nothing. You can
1090  // override them to provide specific pre-message behavior.
1091  // ----------------------------------------------------------------------
1092 
1094  virtual void checkTimers_preMsgHook(
1095  FwIndexType portNum,
1096  U32 context
1097  );
1098 
1100  virtual void cmdResponseIn_preMsgHook(
1101  FwIndexType portNum,
1102  FwOpcodeType opCode,
1103  U32 cmdSeq,
1104  const Fw::CmdResponse& response
1105  );
1106 
1108  virtual void pingIn_preMsgHook(
1109  FwIndexType portNum,
1110  U32 key
1111  );
1112 
1114  virtual void seqRunIn_preMsgHook(
1115  FwIndexType portNum,
1116  const Fw::StringBase& filename
1117  );
1118 
1120  virtual void tlmWrite_preMsgHook(
1121  FwIndexType portNum,
1122  U32 context
1123  );
1124 
1125  protected:
1126 
1127  // ----------------------------------------------------------------------
1128  // Invocation functions for typed output ports
1129  // ----------------------------------------------------------------------
1130 
1132  void cmdOut_out(
1133  FwIndexType portNum,
1134  Fw::ComBuffer& data,
1135  U32 context
1136  );
1137 
1140  FwIndexType portNum,
1141  FwPrmIdType id,
1142  Fw::ParamBuffer& val
1143  );
1145 
1148  FwIndexType portNum,
1149  FwChanIdType id,
1150  Fw::Time& timeTag,
1151  Fw::TlmBuffer& val
1152  );
1155 
1157  void pingOut_out(
1158  FwIndexType portNum,
1159  U32 key
1160  );
1161 
1163  void seqDoneOut_out(
1164  FwIndexType portNum,
1165  FwOpcodeType opCode,
1166  U32 cmdSeq,
1167  const Fw::CmdResponse& response
1168  );
1169 
1171  void seqStartOut_out(
1172  FwIndexType portNum,
1173  const Fw::StringBase& filename
1174  );
1175 
1176  protected:
1177 
1178  // ----------------------------------------------------------------------
1179  // Internal interface handlers
1180  // ----------------------------------------------------------------------
1181 
1184 
1187 
1190 
1193 
1196 
1199 
1202 
1204  virtual void directive_if_internalInterfaceHandler(const Svc::FpySequencer_IfDirective& directive) = 0;
1205 
1208 
1211 
1214 
1217 
1220 
1223 
1226 
1229 
1232 
1235 
1238 
1241 
1244 
1247 
1250 
1253 
1254  protected:
1255 
1256  // ----------------------------------------------------------------------
1257  // Internal interface base-class functions
1258  // ----------------------------------------------------------------------
1259 
1262 
1265 
1268 
1271 
1274 
1277 
1280 
1283 
1286 
1289 
1292 
1295 
1298 
1301 
1304 
1307 
1310 
1313 
1316 
1319 
1322 
1325 
1328 
1331 
1332  protected:
1333 
1334  // ----------------------------------------------------------------------
1335  // State getter functions
1336  // ----------------------------------------------------------------------
1337 
1340 
1341  protected:
1342 
1343  // ----------------------------------------------------------------------
1344  // Signal send functions
1345  // ----------------------------------------------------------------------
1346 
1350  );
1351 
1355  );
1356 
1360  );
1361 
1364 
1367  const Svc::FpySequencer_BreakpointArgs& value
1368  );
1369 
1372 
1375 
1378 
1381 
1384 
1387 
1390 
1393 
1396 
1399 
1402 
1405 
1408 
1411 
1414 
1417 
1420 
1423 
1426 
1429 
1432 
1433  protected:
1434 
1435  // ----------------------------------------------------------------------
1436  // Functions to implement for internal state machine actions
1437  // ----------------------------------------------------------------------
1438 
1443  SmId smId,
1445  ) = 0;
1446 
1451  SmId smId,
1454  ) = 0;
1455 
1460  SmId smId,
1463  ) = 0;
1464 
1469  SmId smId,
1471  ) = 0;
1472 
1477  SmId smId,
1479  ) = 0;
1480 
1485  SmId smId,
1487  ) = 0;
1488 
1493  SmId smId,
1495  ) = 0;
1496 
1501  SmId smId,
1503  ) = 0;
1504 
1509  SmId smId,
1511  ) = 0;
1512 
1517  SmId smId,
1519  ) = 0;
1520 
1525  SmId smId,
1527  ) = 0;
1528 
1533  SmId smId,
1535  ) = 0;
1536 
1541  SmId smId,
1543  ) = 0;
1544 
1549  SmId smId,
1551  ) = 0;
1552 
1557  SmId smId,
1559  ) = 0;
1560 
1565  SmId smId,
1567  ) = 0;
1568 
1573  SmId smId,
1575  ) = 0;
1576 
1581  SmId smId,
1583  ) = 0;
1584 
1589  SmId smId,
1591  ) = 0;
1592 
1597  SmId smId,
1599  ) = 0;
1600 
1605  SmId smId,
1607  ) = 0;
1608 
1613  SmId smId,
1615  const Svc::FpySequencer_BreakpointArgs& value
1616  ) = 0;
1617 
1622  SmId smId,
1624  ) = 0;
1625 
1630  SmId smId,
1632  ) = 0;
1633 
1634  protected:
1635 
1636  // ----------------------------------------------------------------------
1637  // Functions to implement for internal state machine guards
1638  // ----------------------------------------------------------------------
1639 
1644  SmId smId,
1646  ) const = 0;
1647 
1653  SmId smId,
1655  ) const = 0;
1656 
1661  SmId smId,
1663  ) const = 0;
1664 
1665  protected:
1666 
1667  // ----------------------------------------------------------------------
1668  // Command response
1669  // ----------------------------------------------------------------------
1670 
1672  void cmdResponse_out(
1673  FwOpcodeType opCode,
1674  U32 cmdSeq,
1675  Fw::CmdResponse response
1676  );
1677 
1678  protected:
1679 
1680  // ----------------------------------------------------------------------
1681  // Command handlers to implement
1682  // ----------------------------------------------------------------------
1683 
1687  virtual void RUN_cmdHandler(
1688  FwOpcodeType opCode,
1689  U32 cmdSeq,
1690  const Fw::CmdStringArg& fileName,
1692  ) = 0;
1693 
1697  virtual void VALIDATE_cmdHandler(
1698  FwOpcodeType opCode,
1699  U32 cmdSeq,
1700  const Fw::CmdStringArg& fileName
1701  ) = 0;
1702 
1706  virtual void RUN_VALIDATED_cmdHandler(
1707  FwOpcodeType opCode,
1708  U32 cmdSeq,
1710  ) = 0;
1711 
1716  virtual void CANCEL_cmdHandler(
1717  FwOpcodeType opCode,
1718  U32 cmdSeq
1719  ) = 0;
1720 
1727  virtual void SET_BREAKPOINT_cmdHandler(
1728  FwOpcodeType opCode,
1729  U32 cmdSeq,
1730  U32 stmtIdx,
1731  bool breakOnce
1732  ) = 0;
1733 
1739  virtual void BREAK_cmdHandler(
1740  FwOpcodeType opCode,
1741  U32 cmdSeq
1742  ) = 0;
1743 
1748  virtual void CONTINUE_cmdHandler(
1749  FwOpcodeType opCode,
1750  U32 cmdSeq
1751  ) = 0;
1752 
1757  virtual void CLEAR_BREAKPOINT_cmdHandler(
1758  FwOpcodeType opCode,
1759  U32 cmdSeq
1760  ) = 0;
1761 
1766  virtual void STEP_cmdHandler(
1767  FwOpcodeType opCode,
1768  U32 cmdSeq
1769  ) = 0;
1770 
1775  virtual void SET_FLAG_cmdHandler(
1776  FwOpcodeType opCode,
1777  U32 cmdSeq,
1778  Svc::Fpy::FlagId flag,
1779  bool value
1780  ) = 0;
1781 
1785  virtual void DUMP_STACK_TO_FILE_cmdHandler(
1786  FwOpcodeType opCode,
1787  U32 cmdSeq,
1788  const Fw::CmdStringArg& fileName
1789  ) = 0;
1790 
1791  protected:
1792 
1793  // ----------------------------------------------------------------------
1794  // Command handler base-class functions
1795  //
1796  // Call these functions directly to bypass the command input port
1797  // ----------------------------------------------------------------------
1798 
1802  void RUN_cmdHandlerBase(
1803  FwOpcodeType opCode,
1804  U32 cmdSeq,
1805  Fw::CmdArgBuffer& args
1806  );
1807 
1812  FwOpcodeType opCode,
1813  U32 cmdSeq,
1814  Fw::CmdArgBuffer& args
1815  );
1816 
1821  FwOpcodeType opCode,
1822  U32 cmdSeq,
1823  Fw::CmdArgBuffer& args
1824  );
1825 
1830  void CANCEL_cmdHandlerBase(
1831  FwOpcodeType opCode,
1832  U32 cmdSeq,
1833  Fw::CmdArgBuffer& args
1834  );
1835 
1843  FwOpcodeType opCode,
1844  U32 cmdSeq,
1845  Fw::CmdArgBuffer& args
1846  );
1847 
1853  void BREAK_cmdHandlerBase(
1854  FwOpcodeType opCode,
1855  U32 cmdSeq,
1856  Fw::CmdArgBuffer& args
1857  );
1858 
1864  FwOpcodeType opCode,
1865  U32 cmdSeq,
1866  Fw::CmdArgBuffer& args
1867  );
1868 
1874  FwOpcodeType opCode,
1875  U32 cmdSeq,
1876  Fw::CmdArgBuffer& args
1877  );
1878 
1883  void STEP_cmdHandlerBase(
1884  FwOpcodeType opCode,
1885  U32 cmdSeq,
1886  Fw::CmdArgBuffer& args
1887  );
1888 
1894  FwOpcodeType opCode,
1895  U32 cmdSeq,
1896  Fw::CmdArgBuffer& args
1897  );
1898 
1903  FwOpcodeType opCode,
1904  U32 cmdSeq,
1905  Fw::CmdArgBuffer& args
1906  );
1907 
1908  protected:
1909 
1910  // ----------------------------------------------------------------------
1911  // Pre-message hooks for async commands
1912  //
1913  // Each of these functions is invoked just before processing the
1914  // corresponding command. By default they do nothing. You can
1915  // override them to provide specific pre-command behavior.
1916  // ----------------------------------------------------------------------
1917 
1919  virtual void RUN_preMsgHook(
1920  FwOpcodeType opCode,
1921  U32 cmdSeq
1922  );
1923 
1925  virtual void VALIDATE_preMsgHook(
1926  FwOpcodeType opCode,
1927  U32 cmdSeq
1928  );
1929 
1931  virtual void RUN_VALIDATED_preMsgHook(
1932  FwOpcodeType opCode,
1933  U32 cmdSeq
1934  );
1935 
1937  virtual void CANCEL_preMsgHook(
1938  FwOpcodeType opCode,
1939  U32 cmdSeq
1940  );
1941 
1943  virtual void SET_BREAKPOINT_preMsgHook(
1944  FwOpcodeType opCode,
1945  U32 cmdSeq
1946  );
1947 
1949  virtual void BREAK_preMsgHook(
1950  FwOpcodeType opCode,
1951  U32 cmdSeq
1952  );
1953 
1955  virtual void CONTINUE_preMsgHook(
1956  FwOpcodeType opCode,
1957  U32 cmdSeq
1958  );
1959 
1961  virtual void CLEAR_BREAKPOINT_preMsgHook(
1962  FwOpcodeType opCode,
1963  U32 cmdSeq
1964  );
1965 
1967  virtual void STEP_preMsgHook(
1968  FwOpcodeType opCode,
1969  U32 cmdSeq
1970  );
1971 
1973  virtual void SET_FLAG_preMsgHook(
1974  FwOpcodeType opCode,
1975  U32 cmdSeq
1976  );
1977 
1979  virtual void DUMP_STACK_TO_FILE_preMsgHook(
1980  FwOpcodeType opCode,
1981  U32 cmdSeq
1982  );
1983 
1984  protected:
1985 
1986  // ----------------------------------------------------------------------
1987  // Event logging functions
1988  // ----------------------------------------------------------------------
1989 
1991  void log_WARNING_HI_InvalidCommand(I32 state) const;
1992 
1994  void log_WARNING_HI_InvalidSeqRunCall(I32 state) const;
1995 
1998  const Fw::StringBase& filePath,
1999  I32 errorCode
2000  ) const;
2001 
2004  FwSizeType writeSize,
2005  const Fw::StringBase& filePath,
2006  I32 errorCode
2007  ) const;
2008 
2012  const Fw::StringBase& filePath,
2013  I32 errorCode
2014  ) const;
2015 
2019  const Fw::StringBase& filePath
2020  ) const;
2021 
2025  const Fw::StringBase& filePath,
2026  I32 errorCode,
2027  U64 buffLeft,
2028  U64 buffLength
2029  ) const;
2030 
2033  U8 expected,
2034  U8 actual
2035  ) const;
2036 
2039  U32 expected,
2040  U32 actual
2041  ) const;
2042 
2044  void log_WARNING_HI_ExtraBytesInSequence(FwSizeType remaining) const;
2045 
2048  U64 bufferSize,
2049  const Fw::StringBase& filePath
2050  ) const;
2051 
2054  FwOpcodeType opCode,
2055  U32 stmtIdx,
2056  const Fw::StringBase& filePath,
2057  Fw::CmdResponse response
2058  ) const;
2059 
2061  void log_ACTIVITY_HI_SequenceDone(const Fw::StringBase& filePath) const;
2062 
2064  void log_ACTIVITY_HI_SequenceCancelled(const Fw::StringBase& filePath) const;
2065 
2068  const Fw::StringBase& filePath,
2069  U8 errorCode
2070  ) const;
2071 
2074  U8 opcode,
2075  U32 stmtIdx,
2076  const Fw::StringBase& filePath
2077  ) const;
2078 
2081  I32 state,
2082  FwOpcodeType opcode,
2083  Fw::CmdResponse response
2084  ) const;
2085 
2088  FwOpcodeType opcode,
2089  Fw::CmdResponse response,
2090  U16 oldSequenceIdx,
2091  U16 currentSequenceIdx
2092  ) const;
2093 
2096  FwOpcodeType opcode,
2097  Fw::CmdResponse response
2098  ) const;
2099 
2102  FwOpcodeType opcode,
2103  Fw::CmdResponse response,
2104  U8 expectedDirectiveOpcode
2105  ) const;
2106 
2109  FwOpcodeType opcode,
2110  Fw::CmdResponse response,
2111  FwOpcodeType expectedOpcode
2112  ) const;
2113 
2116  FwOpcodeType opcode,
2117  Fw::CmdResponse response,
2118  U16 actualCmdIdx,
2119  U16 expectedCmdIdx
2120  ) const;
2121 
2124  U8 opcode,
2125  U32 stmtIdx,
2126  I32 errorCode,
2127  U64 buffLeft,
2128  U64 buffLength
2129  ) const;
2130 
2133  I32 internalTimeBase,
2134  I32 otherTimeBase
2135  ) const;
2136 
2139  I32 internalTimeContext,
2140  I32 otherTimeContext
2141  ) const;
2142 
2145  FwOpcodeType opCode,
2146  U32 stmtIdx,
2147  const Fw::StringBase& filePath
2148  ) const;
2149 
2152  U8 opCode,
2153  U32 stmtIdx,
2154  const Fw::StringBase& filePath
2155  ) const;
2156 
2159  U8 count,
2160  U8 max
2161  ) const;
2162 
2165  U16 count,
2166  U16 max
2167  ) const;
2168 
2170  void log_ACTIVITY_HI_SequencePaused(U32 stmtIdx) const;
2171 
2174  U32 breakpointIdx,
2175  bool breakOnce
2176  ) const;
2177 
2179  void log_ACTIVITY_HI_BreakpointCleared() const;
2180 
2181  protected:
2182 
2183  // ----------------------------------------------------------------------
2184  // Telemetry write functions
2185  // ----------------------------------------------------------------------
2186 
2190  void tlmWrite_State(
2191  FwEnumStoreType arg,
2192  Fw::Time _tlmTime = Fw::Time()
2193  );
2194 
2199  U64 arg,
2200  Fw::Time _tlmTime = Fw::Time()
2201  );
2202 
2207  U64 arg,
2208  Fw::Time _tlmTime = Fw::Time()
2209  );
2210 
2215  U64 arg,
2216  Fw::Time _tlmTime = Fw::Time()
2217  );
2218 
2225  U64 arg,
2226  Fw::Time _tlmTime = Fw::Time()
2227  );
2228 
2233  U64 arg,
2234  Fw::Time _tlmTime = Fw::Time()
2235  );
2236 
2241  const Svc::Fpy::DirectiveErrorCode& arg,
2242  Fw::Time _tlmTime = Fw::Time()
2243  );
2244 
2249  U64 arg,
2250  Fw::Time _tlmTime = Fw::Time()
2251  );
2252 
2257  const Svc::Fpy::DirectiveId& arg,
2258  Fw::Time _tlmTime = Fw::Time()
2259  );
2260 
2264  void tlmWrite_SeqPath(
2265  const Fw::StringBase& arg,
2266  Fw::Time _tlmTime = Fw::Time()
2267  );
2268 
2273  bool arg,
2274  Fw::Time _tlmTime = Fw::Time()
2275  );
2276 
2281  bool arg,
2282  Fw::Time _tlmTime = Fw::Time()
2283  );
2284 
2289  U8 arg,
2290  Fw::Time _tlmTime = Fw::Time()
2291  );
2292 
2297  FwOpcodeType arg,
2298  Fw::Time _tlmTime = Fw::Time()
2299  );
2300 
2306  Fw::Time _tlmTime = Fw::Time()
2307  );
2308 
2313  bool arg,
2314  Fw::Time _tlmTime = Fw::Time()
2315  );
2316 
2322  U32 arg,
2323  Fw::Time _tlmTime = Fw::Time()
2324  );
2325 
2330  bool arg,
2331  Fw::Time _tlmTime = Fw::Time()
2332  );
2333 
2340  bool arg,
2341  Fw::Time _tlmTime = Fw::Time()
2342  );
2343 
2348  F32 arg,
2349  Fw::Time _tlmTime = Fw::Time()
2350  );
2351 
2356  bool arg,
2357  Fw::Time _tlmTime = Fw::Time()
2358  );
2359 
2360  protected:
2361 
2362  // ----------------------------------------------------------------------
2363  // Parameter update hook
2364  // ----------------------------------------------------------------------
2365 
2369  virtual void parameterUpdated(
2370  FwPrmIdType id
2371  );
2372 
2373  // ----------------------------------------------------------------------
2374  // Parameter load hook
2375  // ----------------------------------------------------------------------
2376 
2380  virtual void parametersLoaded();
2381 
2382  protected:
2383 
2384  // ----------------------------------------------------------------------
2385  // Parameter get functions
2386  // ----------------------------------------------------------------------
2387 
2397  Fw::ParamValid& valid
2398  );
2399 
2406  Fw::ParamValid& valid
2407  );
2408 
2409  protected:
2410 
2411  // ----------------------------------------------------------------------
2412  // Time
2413  // ----------------------------------------------------------------------
2414 
2418  Fw::Time getTime() const;
2419 
2420  private:
2421 
2422  // ----------------------------------------------------------------------
2423  // Message dispatch functions
2424  // ----------------------------------------------------------------------
2425 
2427  virtual MsgDispatchStatus doDispatch();
2428 
2429  private:
2430 
2431  // ----------------------------------------------------------------------
2432  // Calls for messages received on special input ports
2433  // ----------------------------------------------------------------------
2434 
2436  static void m_p_cmdIn_in(
2437  Fw::PassiveComponentBase* callComp,
2438  FwIndexType portNum,
2439  FwOpcodeType opCode,
2440  U32 cmdSeq,
2441  Fw::CmdArgBuffer& args
2442  );
2443 
2444  private:
2445 
2446  // ----------------------------------------------------------------------
2447  // Calls for messages received on typed input ports
2448  // ----------------------------------------------------------------------
2449 
2451  static void m_p_checkTimers_in(
2452  Fw::PassiveComponentBase* callComp,
2453  FwIndexType portNum,
2454  U32 context
2455  );
2456 
2458  static void m_p_cmdResponseIn_in(
2459  Fw::PassiveComponentBase* callComp,
2460  FwIndexType portNum,
2461  FwOpcodeType opCode,
2462  U32 cmdSeq,
2463  const Fw::CmdResponse& response
2464  );
2465 
2467  static void m_p_pingIn_in(
2468  Fw::PassiveComponentBase* callComp,
2469  FwIndexType portNum,
2470  U32 key
2471  );
2472 
2474  static void m_p_seqRunIn_in(
2475  Fw::PassiveComponentBase* callComp,
2476  FwIndexType portNum,
2477  const Fw::StringBase& filename
2478  );
2479 
2481  static void m_p_tlmWrite_in(
2482  Fw::PassiveComponentBase* callComp,
2483  FwIndexType portNum,
2484  U32 context
2485  );
2486 
2487  private:
2488 
2489  // ----------------------------------------------------------------------
2490  // Send signal helper functions
2491  // ----------------------------------------------------------------------
2492 
2494  void sendSignalStart(
2495  SmId smId,
2496  FwEnumStoreType signal,
2497  Fw::SerialBufferBase& buffer
2498  );
2499 
2501  void sequencer_sendSignalFinish(
2502  Fw::LinearBufferBase& buffer
2503  );
2504 
2505  private:
2506 
2507  // ----------------------------------------------------------------------
2508  // Helper functions for state machine dispatch
2509  // ----------------------------------------------------------------------
2510 
2512  void smDispatch(
2513  Fw::SerialBufferBase& buffer
2514  );
2515 
2517  static void deserializeSmIdAndSignal(
2518  Fw::SerialBufferBase& buffer,
2519  FwEnumStoreType& smId,
2520  FwEnumStoreType& signal
2521  );
2522 
2524  void Svc_FpySequencer_SequencerStateMachine_smDispatch(
2525  Fw::SerialBufferBase& buffer,
2526  Svc_FpySequencer_SequencerStateMachine& sm,
2528  );
2529 
2530  private:
2531 
2532  // ----------------------------------------------------------------------
2533  // Parameter set functions
2534  // ----------------------------------------------------------------------
2535 
2539  Fw::CmdResponse paramSet_STATEMENT_TIMEOUT_SECS(
2540  Fw::SerialBufferBase& val
2541  );
2542 
2546  Fw::CmdResponse paramSet_FLAG_DEFAULT_EXIT_ON_CMD_FAIL(
2547  Fw::SerialBufferBase& val
2548  );
2549 
2550  private:
2551 
2552  // ----------------------------------------------------------------------
2553  // Parameter save functions
2554  // ----------------------------------------------------------------------
2555 
2559  Fw::CmdResponse paramSave_STATEMENT_TIMEOUT_SECS();
2560 
2564  Fw::CmdResponse paramSave_FLAG_DEFAULT_EXIT_ON_CMD_FAIL();
2565 
2566  private:
2567 
2568  // ----------------------------------------------------------------------
2569  // Special input ports
2570  // ----------------------------------------------------------------------
2571 
2573  Fw::InputCmdPort m_cmdIn_InputPort[NUM_CMDIN_INPUT_PORTS];
2574 
2575  private:
2576 
2577  // ----------------------------------------------------------------------
2578  // Typed input ports
2579  // ----------------------------------------------------------------------
2580 
2582  Svc::InputSchedPort m_checkTimers_InputPort[NUM_CHECKTIMERS_INPUT_PORTS];
2583 
2585  Fw::InputCmdResponsePort m_cmdResponseIn_InputPort[NUM_CMDRESPONSEIN_INPUT_PORTS];
2586 
2588  Svc::InputPingPort m_pingIn_InputPort[NUM_PINGIN_INPUT_PORTS];
2589 
2591  Svc::InputCmdSeqInPort m_seqRunIn_InputPort[NUM_SEQRUNIN_INPUT_PORTS];
2592 
2594  Svc::InputSchedPort m_tlmWrite_InputPort[NUM_TLMWRITE_INPUT_PORTS];
2595 
2596  private:
2597 
2598  // ----------------------------------------------------------------------
2599  // Special output ports
2600  // ----------------------------------------------------------------------
2601 
2603  Fw::OutputCmdRegPort m_cmdRegOut_OutputPort[NUM_CMDREGOUT_OUTPUT_PORTS];
2604 
2606  Fw::OutputCmdResponsePort m_cmdResponseOut_OutputPort[NUM_CMDRESPONSEOUT_OUTPUT_PORTS];
2607 
2609  Fw::OutputLogPort m_logOut_OutputPort[NUM_LOGOUT_OUTPUT_PORTS];
2610 
2611 #if FW_ENABLE_TEXT_LOGGING == 1
2612 
2614  Fw::OutputLogTextPort m_logTextOut_OutputPort[NUM_LOGTEXTOUT_OUTPUT_PORTS];
2615 
2616 #endif
2617 
2619  Fw::OutputPrmGetPort m_prmGet_OutputPort[NUM_PRMGET_OUTPUT_PORTS];
2620 
2622  Fw::OutputPrmSetPort m_prmSet_OutputPort[NUM_PRMSET_OUTPUT_PORTS];
2623 
2625  Fw::OutputTimePort m_timeCaller_OutputPort[NUM_TIMECALLER_OUTPUT_PORTS];
2626 
2628  Fw::OutputTlmPort m_tlmOut_OutputPort[NUM_TLMOUT_OUTPUT_PORTS];
2629 
2630  private:
2631 
2632  // ----------------------------------------------------------------------
2633  // Typed output ports
2634  // ----------------------------------------------------------------------
2635 
2637  Fw::OutputComPort m_cmdOut_OutputPort[NUM_CMDOUT_OUTPUT_PORTS];
2638 
2640  Fw::OutputPrmGetPort m_getParam_OutputPort[NUM_GETPARAM_OUTPUT_PORTS];
2641 
2643  Fw::OutputTlmGetPort m_getTlmChan_OutputPort[NUM_GETTLMCHAN_OUTPUT_PORTS];
2644 
2646  Svc::OutputPingPort m_pingOut_OutputPort[NUM_PINGOUT_OUTPUT_PORTS];
2647 
2649  Fw::OutputCmdResponsePort m_seqDoneOut_OutputPort[NUM_SEQDONEOUT_OUTPUT_PORTS];
2650 
2652  Svc::OutputCmdSeqInPort m_seqStartOut_OutputPort[NUM_SEQSTARTOUT_OUTPUT_PORTS];
2653 
2654  private:
2655 
2656  // ----------------------------------------------------------------------
2657  // First update flags for telemetry channels
2658  // ----------------------------------------------------------------------
2659 
2661  bool m_first_update_State = true;
2662 
2664  bool m_first_update_SequencesSucceeded = true;
2665 
2667  bool m_first_update_SequencesFailed = true;
2668 
2670  bool m_first_update_SequencesCancelled = true;
2671 
2673  bool m_first_update_StatementsDispatched = true;
2674 
2676  bool m_first_update_StatementsFailed = true;
2677 
2679  bool m_first_update_LastDirectiveError = true;
2680 
2682  bool m_first_update_DirectiveErrorIndex = true;
2683 
2685  bool m_first_update_DirectiveErrorId = true;
2686 
2688  bool m_first_update_SeqPath = true;
2689 
2691  bool m_first_update_Debug_ReachedEndOfFile = true;
2692 
2694  bool m_first_update_Debug_NextStatementReadSuccess = true;
2695 
2697  bool m_first_update_Debug_NextStatementOpcode = true;
2698 
2700  bool m_first_update_Debug_NextCmdOpcode = true;
2701 
2703  bool m_first_update_Debug_StackSize = true;
2704 
2706  bool m_first_update_BreakpointInUse = true;
2707 
2709  bool m_first_update_BreakpointIndex = true;
2710 
2712  bool m_first_update_BreakOnlyOnceOnBreakpoint = true;
2713 
2715  bool m_first_update_BreakBeforeNextLine = true;
2716 
2718  bool m_first_update_PRM_STATEMENT_TIMEOUT_SECS = true;
2719 
2721  bool m_first_update_PRM_FLAG_DEFAULT_EXIT_ON_CMD_FAIL = true;
2722 
2723  private:
2724 
2725  // ----------------------------------------------------------------------
2726  // Last value storage for telemetry channels
2727  // ----------------------------------------------------------------------
2728 
2730  FwEnumStoreType m_last_State = {};
2731 
2733  U64 m_last_SequencesSucceeded = {};
2734 
2736  U64 m_last_SequencesFailed = {};
2737 
2739  U64 m_last_SequencesCancelled = {};
2740 
2742  U64 m_last_StatementsDispatched = {};
2743 
2745  U64 m_last_StatementsFailed = {};
2746 
2748  Svc::Fpy::DirectiveErrorCode m_last_LastDirectiveError = {};
2749 
2751  U64 m_last_DirectiveErrorIndex = {};
2752 
2754  Svc::Fpy::DirectiveId m_last_DirectiveErrorId = {};
2755 
2757  Fw::TlmString m_last_SeqPath = {};
2758 
2760  bool m_last_Debug_ReachedEndOfFile = {};
2761 
2763  bool m_last_Debug_NextStatementReadSuccess = {};
2764 
2766  U8 m_last_Debug_NextStatementOpcode = {};
2767 
2769  FwOpcodeType m_last_Debug_NextCmdOpcode = {};
2770 
2772  Svc::Fpy::StackSizeType m_last_Debug_StackSize = {};
2773 
2775  bool m_last_BreakpointInUse = {};
2776 
2778  U32 m_last_BreakpointIndex = {};
2779 
2781  bool m_last_BreakOnlyOnceOnBreakpoint = {};
2782 
2784  bool m_last_BreakBeforeNextLine = {};
2785 
2787  F32 m_last_PRM_STATEMENT_TIMEOUT_SECS = {};
2788 
2790  bool m_last_PRM_FLAG_DEFAULT_EXIT_ON_CMD_FAIL = {};
2791 
2792  private:
2793 
2794  // ----------------------------------------------------------------------
2795  // Parameter validity flags
2796  // ----------------------------------------------------------------------
2797 
2799  Fw::ParamValid m_param_STATEMENT_TIMEOUT_SECS_valid;
2800 
2802  Fw::ParamValid m_param_FLAG_DEFAULT_EXIT_ON_CMD_FAIL_valid;
2803 
2804  private:
2805 
2806  // ----------------------------------------------------------------------
2807  // Parameter variables
2808  // ----------------------------------------------------------------------
2809 
2816  F32 m_STATEMENT_TIMEOUT_SECS;
2817 
2821  bool m_FLAG_DEFAULT_EXIT_ON_CMD_FAIL;
2822 
2823  private:
2824 
2825  // ----------------------------------------------------------------------
2826  // State machine instances
2827  // ----------------------------------------------------------------------
2828 
2830  Svc_FpySequencer_SequencerStateMachine m_stateMachine_sequencer;
2831 
2832  private:
2833 
2834  // ----------------------------------------------------------------------
2835  // Mutexes
2836  // ----------------------------------------------------------------------
2837 
2839  Os::Mutex m_paramLock;
2840 
2841  };
2842 
2843 }
2844 
2845 #endif
bool isConnected_tlmOut_OutputPort(FwIndexType portNum)
void tlmWrite_PRM_FLAG_DEFAULT_EXIT_ON_CMD_FAIL(bool arg, Fw::Time _tlmTime=Fw::Time())
void sequencer_sendSignal_result_dispatchStatement_noMoreStatements()
Send signal result_dispatchStatement_noMoreStatements to state machine sequencer. ...
sets the index of the next directive to execute
void sequencer_sendSignal_result_checkShouldWake_keepSleeping()
Send signal result_checkShouldWake_keepSleeping to state machine sequencer.
virtual void directive_waitRel_internalInterfaceHandler(const Svc::FpySequencer_WaitRelDirective &directive)=0
Internal interface handler for directive_waitRel.
virtual void DUMP_STACK_TO_FILE_preMsgHook(FwOpcodeType opCode, U32 cmdSeq)
Pre-message hook for command DUMP_STACK_TO_FILE.
virtual void Svc_FpySequencer_SequencerStateMachine_action_checkStatementTimeout(SmId smId, Svc_FpySequencer_SequencerStateMachine::Signal signal)=0
virtual void Svc_FpySequencer_SequencerStateMachine_action_incrementSequenceCounter(SmId smId, Svc_FpySequencer_SequencerStateMachine::Signal signal)=0
virtual void Svc_FpySequencer_SequencerStateMachine_action_report_seqFailed(SmId smId, Svc_FpySequencer_SequencerStateMachine::Signal signal)=0
void set_seqStartOut_OutputPort(FwIndexType portNum, Svc::InputCmdSeqInPort *port)
Connect port to seqStartOut[portNum].
void log_WARNING_HI_DirectiveTimedOut(U8 opCode, U32 stmtIdx, const Fw::StringBase &filePath) const
Log event DirectiveTimedOut.
virtual void directive_pushPrm_internalInterfaceHandler(const Svc::FpySequencer_PushPrmDirective &directive)=0
Internal interface handler for directive_pushPrm.
virtual void directive_peek_internalInterfaceHandler(const Svc::FpySequencer_PeekDirective &directive)=0
Internal interface handler for directive_peek.
virtual void Svc_FpySequencer_SequencerStateMachine_action_setSequenceFilePath(SmId smId, Svc_FpySequencer_SequencerStateMachine::Signal signal, const Svc::FpySequencer_SequenceExecutionArgs &value)=0
virtual void Svc_FpySequencer_SequencerStateMachine_action_signalEntered(SmId smId, Svc_FpySequencer_SequencerStateMachine::Signal signal)=0
void log_ACTIVITY_HI_SequencePaused(U32 stmtIdx) const
Log event SequencePaused.
virtual void directive_exit_internalInterfaceHandler(const Svc::FpySequencer_ExitDirective &directive)=0
Internal interface handler for directive_exit.
Fw::InputCmdResponsePort * get_cmdResponseIn_InputPort(FwIndexType portNum)
FwIdType FwOpcodeType
The type of a command opcode.
void set_cmdOut_OutputPort(FwIndexType portNum, Fw::InputComPort *port)
Connect port to cmdOut[portNum].
branches based off of the top byte of the stack
void directive_pushVal_internalInterfaceInvoke(const Svc::FpySequencer_PushValDirective &directive)
Internal interface base-class function for directive_pushVal.
void tlmWrite_Debug_NextStatementOpcode(U8 arg, Fw::Time _tlmTime=Fw::Time())
virtual void parametersLoaded()
Called whenever parameters are loaded.
virtual void directive_pushTime_internalInterfaceHandler(const Svc::FpySequencer_PushTimeDirective &directive)=0
Internal interface handler for directive_pushTime.
void log_WARNING_HI_InsufficientBufferSpace(U64 bufferSize, const Fw::StringBase &filePath) const
Log event InsufficientBufferSpace.
static constexpr FwIndexType getNum_seqStartOut_OutputPorts()
PlatformSizeType FwSizeType
I32 FwEnumStoreType
void CONTINUE_cmdHandlerBase(FwOpcodeType opCode, U32 cmdSeq, Fw::CmdArgBuffer &args)
void sequencer_sendSignal_cmd_STEP()
Send signal cmd_STEP to state machine sequencer.
void sequencer_sendSignal_result_dispatchStatement_success()
Send signal result_dispatchStatement_success to state machine sequencer.
virtual void cmdResponseIn_handler(FwIndexType portNum, FwOpcodeType opCode, U32 cmdSeq, const Fw::CmdResponse &response)=0
Handler for input port cmdResponseIn.
void directive_stackOp_internalInterfaceInvoke(const Svc::FpySequencer_StackOpDirective &directive)
Internal interface base-class function for directive_stackOp.
void log_WARNING_HI_WrongCRC(U32 expected, U32 actual) const
Log event WrongCRC.
void directive_pushTlmVal_internalInterfaceInvoke(const Svc::FpySequencer_PushTlmValDirective &directive)
Internal interface base-class function for directive_pushTlmVal.
virtual void CLEAR_BREAKPOINT_cmdHandler(FwOpcodeType opCode, U32 cmdSeq)=0
virtual void parameterUpdated(FwPrmIdType id)
Called whenever a parameter is updated.
virtual void directive_stackCmd_internalInterfaceHandler(const Svc::FpySequencer_StackCmdDirective &directive)=0
Internal interface handler for directive_stackCmd.
void sequencer_sendSignal_cmd_SET_BREAKPOINT(const Svc::FpySequencer_BreakpointArgs &value)
Send signal cmd_SET_BREAKPOINT to state machine sequencer.
virtual void Svc_FpySequencer_SequencerStateMachine_action_sendCmdResponse_OK(SmId smId, Svc_FpySequencer_SequencerStateMachine::Signal signal)=0
virtual void tlmWrite_preMsgHook(FwIndexType portNum, U32 context)
Pre-message hook for async input port tlmWrite.
virtual void CLEAR_BREAKPOINT_preMsgHook(FwOpcodeType opCode, U32 cmdSeq)
Pre-message hook for command CLEAR_BREAKPOINT.
static constexpr FwIndexType getNum_cmdIn_InputPorts()
Fw::TlmValid getTlmChan_out(FwIndexType portNum, FwChanIdType id, Fw::Time &timeTag, Fw::TlmBuffer &val)
Invoke output port getTlmChan.
void tlmWrite_Debug_ReachedEndOfFile(bool arg, Fw::Time _tlmTime=Fw::Time())
void log_WARNING_HI_SequenceExitedWithError(const Fw::StringBase &filePath, U8 errorCode) const
Log event SequenceExitedWithError.
void RUN_cmdHandlerBase(FwOpcodeType opCode, U32 cmdSeq, Fw::CmdArgBuffer &args)
the default value of the EXIT_ON_CMD_FAIL sequence flag
virtual void SET_FLAG_preMsgHook(FwOpcodeType opCode, U32 cmdSeq)
Pre-message hook for command SET_FLAG.
void set_seqDoneOut_OutputPort(FwIndexType portNum, Fw::InputCmdResponsePort *port)
Connect port to seqDoneOut[portNum].
FwIdType FwPrmIdType
The type of a parameter identifier.
void set_tlmOut_OutputPort(FwIndexType portNum, Fw::InputTlmPort *port)
Connect port to tlmOut[portNum].
virtual void directive_store_internalInterfaceHandler(const Svc::FpySequencer_StoreDirective &directive)=0
Internal interface handler for directive_store.
void directive_load_internalInterfaceInvoke(const Svc::FpySequencer_LoadDirective &directive)
Internal interface base-class function for directive_load.
virtual void Svc_FpySequencer_SequencerStateMachine_action_setGoalState_IDLE(SmId smId, Svc_FpySequencer_SequencerStateMachine::Signal signal)=0
virtual void CANCEL_cmdHandler(FwOpcodeType opCode, U32 cmdSeq)=0
void STEP_cmdHandlerBase(FwOpcodeType opCode, U32 cmdSeq, Fw::CmdArgBuffer &args)
virtual bool Svc_FpySequencer_SequencerStateMachine_guard_breakOnce(SmId smId, Svc_FpySequencer_SequencerStateMachine::Signal signal) const =0
static constexpr FwIndexType getNum_pingIn_InputPorts()
virtual void Svc_FpySequencer_SequencerStateMachine_action_report_seqStarted(SmId smId, Svc_FpySequencer_SequencerStateMachine::Signal signal)=0
pop an opcode and arg buf off the stack, send to cmd dispatcher and await response ...
void sequencer_sendSignal_result_checkShouldWake_wakeup()
Send signal result_checkShouldWake_wakeup to state machine sequencer.
friend class FpySequencerTesterBase
Friend class tester to support autocoded test harness.
virtual void directive_goto_internalInterfaceHandler(const Svc::FpySequencer_GotoDirective &directive)=0
Internal interface handler for directive_goto.
void directive_if_internalInterfaceInvoke(const Svc::FpySequencer_IfDirective &directive)
Internal interface base-class function for directive_if.
void sequencer_sendSignal_result_success()
Send signal result_success to state machine sequencer.
void cmdResponseIn_handlerBase(FwIndexType portNum, FwOpcodeType opCode, U32 cmdSeq, const Fw::CmdResponse &response)
Handler base-class function for input port cmdResponseIn.
void sequencer_sendSignal_stmtResponse_success()
Send signal stmtResponse_success to state machine sequencer.
virtual ~FpySequencerComponentBase()
Destroy FpySequencerComponentBase object.
virtual void directive_setFlag_internalInterfaceHandler(const Svc::FpySequencer_SetFlagDirective &directive)=0
Internal interface handler for directive_setFlag.
void log_WARNING_LO_CmdResponseWhileNotRunningSequence(I32 state, FwOpcodeType opcode, Fw::CmdResponse response) const
Log event CmdResponseWhileNotRunningSequence.
void tlmWrite_Debug_StackSize(Svc::Fpy::StackSizeType arg, Fw::Time _tlmTime=Fw::Time())
virtual void SET_BREAKPOINT_cmdHandler(FwOpcodeType opCode, U32 cmdSeq, U32 stmtIdx, bool breakOnce)=0
virtual void directive_stackOp_internalInterfaceHandler(const Svc::FpySequencer_StackOpDirective &directive)=0
Internal interface handler for directive_stackOp.
void sequencer_sendSignal_cmd_VALIDATE(const Svc::FpySequencer_SequenceExecutionArgs &value)
Send signal cmd_VALIDATE to state machine sequencer.
void directive_noOp_internalInterfaceInvoke(const Svc::FpySequencer_NoOpDirective &directive)
Internal interface base-class function for directive_noOp.
static constexpr FwIndexType getNum_tlmWrite_InputPorts()
Enum representing a command response.
virtual void Svc_FpySequencer_SequencerStateMachine_action_validate(SmId smId, Svc_FpySequencer_SequencerStateMachine::Signal signal)=0
virtual void RUN_VALIDATED_preMsgHook(FwOpcodeType opCode, U32 cmdSeq)
Pre-message hook for command RUN_VALIDATED.
void log_WARNING_HI_FileReadError(Svc::FpySequencer_FileReadStage readStage, const Fw::StringBase &filePath, I32 errorCode) const
Log event FileReadError.
void set_logOut_OutputPort(FwIndexType portNum, Fw::InputLogPort *port)
Connect port to logOut[portNum].
virtual void DUMP_STACK_TO_FILE_cmdHandler(FwOpcodeType opCode, U32 cmdSeq, const Fw::CmdStringArg &fileName)=0
void tlmWrite_State(FwEnumStoreType arg, Fw::Time _tlmTime=Fw::Time())
void tlmWrite_SequencesSucceeded(U64 arg, Fw::Time _tlmTime=Fw::Time())
void log_WARNING_HI_ExtraBytesInSequence(FwSizeType remaining) const
Log event ExtraBytesInSequence.
void directive_store_internalInterfaceInvoke(const Svc::FpySequencer_StoreDirective &directive)
Internal interface base-class function for directive_store.
Loads, validates and runs a sequence.
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
static constexpr FwIndexType getNum_timeCaller_OutputPorts()
virtual void directive_waitAbs_internalInterfaceHandler(const Svc::FpySequencer_WaitAbsDirective &directive)=0
Internal interface handler for directive_waitAbs.
virtual void RUN_VALIDATED_cmdHandler(FwOpcodeType opCode, U32 cmdSeq, Svc::FpySequencer_BlockState block)=0
bool isConnected_pingOut_OutputPort(FwIndexType portNum)
virtual void pingIn_preMsgHook(FwIndexType portNum, U32 key)
Pre-message hook for async input port pingIn.
virtual void STEP_cmdHandler(FwOpcodeType opCode, U32 cmdSeq)=0
void directive_pushTlmValAndTime_internalInterfaceInvoke(const Svc::FpySequencer_PushTlmValAndTimeDirective &directive)
Internal interface base-class function for directive_pushTlmValAndTime.
void directive_stackCmd_internalInterfaceInvoke(const Svc::FpySequencer_StackCmdDirective &directive)
Internal interface base-class function for directive_stackCmd.
void log_WARNING_HI_TooManySequenceDirectives(U16 count, U16 max) const
Log event TooManySequenceDirectives.
bool isConnected_seqStartOut_OutputPort(FwIndexType portNum)
void sequencer_sendSignal_stmtResponse_unexpected()
Send signal stmtResponse_unexpected to state machine sequencer.
virtual void RUN_cmdHandler(FwOpcodeType opCode, U32 cmdSeq, const Fw::CmdStringArg &fileName, Svc::FpySequencer_BlockState block)=0
void sequencer_sendSignal_cmd_BREAK()
Send signal cmd_BREAK to state machine sequencer.
void sequencer_sendSignal_result_dispatchStatement_failure()
Send signal result_dispatchStatement_failure to state machine sequencer.
void log_WARNING_HI_DirectiveDeserializeError(U8 opcode, U32 stmtIdx, I32 errorCode, U64 buffLeft, U64 buffLength) const
Log event DirectiveDeserializeError.
virtual void pingIn_handler(FwIndexType portNum, U32 key)=0
Handler for input port pingIn.
Svc::InputSchedPort * get_checkTimers_InputPort(FwIndexType portNum)
virtual void STEP_preMsgHook(FwOpcodeType opCode, U32 cmdSeq)
Pre-message hook for command STEP.
void RUN_VALIDATED_cmdHandlerBase(FwOpcodeType opCode, U32 cmdSeq, Fw::CmdArgBuffer &args)
void tlmWrite_PRM_STATEMENT_TIMEOUT_SECS(F32 arg, Fw::Time _tlmTime=Fw::Time())
pops some bytes off the stack and puts them in lvar array
void init()
Object initializer.
Definition: ObjBase.cpp:24
void set_pingOut_OutputPort(FwIndexType portNum, Svc::InputPingPort *port)
Connect port to pingOut[portNum].
static constexpr FwIndexType getNum_tlmOut_OutputPorts()
void seqStartOut_out(FwIndexType portNum, const Fw::StringBase &filename)
Invoke output port seqStartOut.
virtual void directive_allocate_internalInterfaceHandler(const Svc::FpySequencer_AllocateDirective &directive)=0
Internal interface handler for directive_allocate.
static constexpr FwIndexType getNum_pingOut_OutputPorts()
Svc_FpySequencer_SequencerStateMachine::State sequencer_getState() const
Get the state of state machine instance sequencer.
void set_getTlmChan_OutputPort(FwIndexType portNum, Fw::InputTlmGetPort *port)
Connect port to getTlmChan[portNum].
float F32
32-bit floating point
Definition: BasicTypes.h:83
virtual bool Svc_FpySequencer_SequencerStateMachine_guard_shouldBreak(SmId smId, Svc_FpySequencer_SequencerStateMachine::Signal signal) const =0
virtual void checkTimers_handler(FwIndexType portNum, U32 context)=0
Handler for input port checkTimers.
bool isConnected_timeCaller_OutputPort(FwIndexType portNum)
static constexpr FwIndexType getNum_getParam_OutputPorts()
static constexpr FwIndexType getNum_cmdRegOut_OutputPorts()
void log_WARNING_HI_WrongCmdResponseOpcode(FwOpcodeType opcode, Fw::CmdResponse response, FwOpcodeType expectedOpcode) const
Log event WrongCmdResponseOpcode.
Must be called after VALIDATE. Runs the sequence that was validated.
void tlmWrite_StatementsFailed(U64 arg, Fw::Time _tlmTime=Fw::Time())
void regCommands()
Register commands with the Command Dispatcher.
F32 paramGet_STATEMENT_TIMEOUT_SECS(Fw::ParamValid &valid)
pop two byte arrays off the top of the stack, call memcmp, push 1 if they were equal, 0 otherwise
void cmdResponse_out(FwOpcodeType opCode, U32 cmdSeq, Fw::CmdResponse response)
Emit command response.
void directive_memCmp_internalInterfaceInvoke(const Svc::FpySequencer_MemCmpDirective &directive)
Internal interface base-class function for directive_memCmp.
void directive_pushTime_internalInterfaceInvoke(const Svc::FpySequencer_PushTimeDirective &directive)
Internal interface base-class function for directive_pushTime.
void tlmWrite_DirectiveErrorId(const Svc::Fpy::DirectiveId &arg, Fw::Time _tlmTime=Fw::Time())
static constexpr FwIndexType getNum_cmdResponseIn_InputPorts()
Svc::InputPingPort * get_pingIn_InputPort(FwIndexType portNum)
void tlmWrite_Debug_NextCmdOpcode(FwOpcodeType arg, Fw::Time _tlmTime=Fw::Time())
void tlmWrite_handlerBase(FwIndexType portNum, U32 context)
Handler base-class function for input port tlmWrite.
bool isConnected_prmSet_OutputPort(FwIndexType portNum)
virtual void SET_FLAG_cmdHandler(FwOpcodeType opCode, U32 cmdSeq, Svc::Fpy::FlagId flag, bool value)=0
virtual void directive_constCmd_internalInterfaceHandler(const Svc::FpySequencer_ConstCmdDirective &directive)=0
Internal interface handler for directive_constCmd.
Fw::InputCmdPort * get_cmdIn_InputPort(FwIndexType portNum)
void directive_storeConstOffset_internalInterfaceInvoke(const Svc::FpySequencer_StoreConstOffsetDirective &directive)
Internal interface base-class function for directive_storeConstOffset.
void pingIn_handlerBase(FwIndexType portNum, U32 key)
Handler base-class function for input port pingIn.
void set_timeCaller_OutputPort(FwIndexType portNum, Fw::InputTimePort *port)
Connect port to timeCaller[portNum].
friend class FpySequencerTester
Test implementation for the enclosing component.
void SET_FLAG_cmdHandlerBase(FwOpcodeType opCode, U32 cmdSeq, Fw::CmdArgBuffer &args)
virtual void Svc_FpySequencer_SequencerStateMachine_action_dispatchStatement(SmId smId, Svc_FpySequencer_SequencerStateMachine::Signal signal)=0
virtual void directive_pushVal_internalInterfaceHandler(const Svc::FpySequencer_PushValDirective &directive)=0
Internal interface handler for directive_pushVal.
void sequencer_sendSignal_cmd_RUN_VALIDATED(const Svc::FpySequencer_SequenceExecutionArgs &value)
Send signal cmd_RUN_VALIDATED to state machine sequencer.
virtual void Svc_FpySequencer_SequencerStateMachine_action_clearBreakpoint(SmId smId, Svc_FpySequencer_SequencerStateMachine::Signal signal)=0
virtual void BREAK_cmdHandler(FwOpcodeType opCode, U32 cmdSeq)=0
Svc_FpySequencer_SequencerStateMachine(FpySequencerComponentBase &component)
Constructor.
FwIdType FwChanIdType
The type of a telemetry channel identifier.
void log_WARNING_HI_EndOfFileError(Svc::FpySequencer_FileReadStage readStage, const Fw::StringBase &filePath) const
Log event EndOfFileError.
void set_cmdResponseOut_OutputPort(FwIndexType portNum, Fw::InputCmdResponsePort *port)
Connect port to cmdResponseOut[portNum].
void log_WARNING_LO_CmdResponseFromOldSequence(FwOpcodeType opcode, Fw::CmdResponse response, U16 oldSequenceIdx, U16 currentSequenceIdx) const
Log event CmdResponseFromOldSequence.
virtual void directive_getFlag_internalInterfaceHandler(const Svc::FpySequencer_GetFlagDirective &directive)=0
Internal interface handler for directive_getFlag.
FpySequencerComponentBase(const char *compName="")
Construct FpySequencerComponentBase object.
virtual void CONTINUE_cmdHandler(FwOpcodeType opCode, U32 cmdSeq)=0
void sequencer_sendSignal_checkTimersIn()
Send signal checkTimersIn to state machine sequencer.
void tlmWrite_StatementsDispatched(U64 arg, Fw::Time _tlmTime=Fw::Time())
void tlmWrite_LastDirectiveError(const Svc::Fpy::DirectiveErrorCode &arg, Fw::Time _tlmTime=Fw::Time())
void VALIDATE_cmdHandlerBase(FwOpcodeType opCode, U32 cmdSeq, Fw::CmdArgBuffer &args)
virtual void directive_discard_internalInterfaceHandler(const Svc::FpySequencer_DiscardDirective &directive)=0
Internal interface handler for directive_discard.
static constexpr FwIndexType getNum_prmSet_OutputPorts()
virtual void seqRunIn_preMsgHook(FwIndexType portNum, const Fw::StringBase &filename)
Pre-message hook for async input port seqRunIn.
void directive_setFlag_internalInterfaceInvoke(const Svc::FpySequencer_SetFlagDirective &directive)
Internal interface base-class function for directive_setFlag.
bool isConnected_getParam_OutputPort(FwIndexType portNum)
Implementation of state machine Svc_FpySequencer_SequencerStateMachine.
peeks at N bytes from the stack, starting from an offset relative to the top of the stack ...
void sequencer_sendSignal_stmtResponse_failure()
Send signal stmtResponse_failure to state machine sequencer.
void CANCEL_cmdHandlerBase(FwOpcodeType opCode, U32 cmdSeq, Fw::CmdArgBuffer &args)
void directive_waitAbs_internalInterfaceInvoke(const Svc::FpySequencer_WaitAbsDirective &directive)
Internal interface base-class function for directive_waitAbs.
void directive_peek_internalInterfaceInvoke(const Svc::FpySequencer_PeekDirective &directive)
Internal interface base-class function for directive_peek.
void set_cmdRegOut_OutputPort(FwIndexType portNum, Fw::InputCmdRegPort *port)
Connect port to cmdRegOut[portNum].
void log_WARNING_HI_CommandFailed(FwOpcodeType opCode, U32 stmtIdx, const Fw::StringBase &filePath, Fw::CmdResponse response) const
Log event CommandFailed.
void sequencer_sendSignal_stmtResponse_beginSleep()
Send signal stmtResponse_beginSleep to state machine sequencer.
void log_WARNING_HI_CommandTimedOut(FwOpcodeType opCode, U32 stmtIdx, const Fw::StringBase &filePath) const
Log event CommandTimedOut.
void sequencer_sendSignal_result_checkStatementTimeout_noTimeout()
Send signal result_checkStatementTimeout_noTimeout to state machine sequencer.
static constexpr FwIndexType getNum_seqRunIn_InputPorts()
virtual void tlmWrite_handler(FwIndexType portNum, U32 context)=0
Handler for input port tlmWrite.
Svc::InputCmdSeqInPort * get_seqRunIn_InputPort(FwIndexType portNum)
virtual void directive_memCmp_internalInterfaceHandler(const Svc::FpySequencer_MemCmpDirective &directive)=0
Internal interface handler for directive_memCmp.
void loadParameters()
Load the parameters from a parameter source.
virtual void Svc_FpySequencer_SequencerStateMachine_action_sendCmdResponse_EXECUTION_ERROR(SmId smId, Svc_FpySequencer_SequencerStateMachine::Signal signal)=0
void log_WARNING_HI_InvalidSeqRunCall(I32 state) const
Log event InvalidSeqRunCall.
virtual void directive_if_internalInterfaceHandler(const Svc::FpySequencer_IfDirective &directive)=0
Internal interface handler for directive_if.
void directive_getField_internalInterfaceInvoke(const Svc::FpySequencer_GetFieldDirective &directive)
Internal interface base-class function for directive_getField.
stores bytes from the top of the stack into a memory location, determined by the stack ...
static constexpr FwIndexType getNum_cmdOut_OutputPorts()
virtual void Svc_FpySequencer_SequencerStateMachine_action_setGoalState_VALID(SmId smId, Svc_FpySequencer_SequencerStateMachine::Signal signal)=0
sleeps for a relative duration from the current time
bool isConnected_seqDoneOut_OutputPort(FwIndexType portNum)
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.
gets bytes from lvar array and pushes them to stack
void log_ACTIVITY_HI_BreakpointSet(U32 breakpointIdx, bool breakOnce) const
Log event BreakpointSet.
void directive_pushPrm_internalInterfaceInvoke(const Svc::FpySequencer_PushPrmDirective &directive)
Internal interface base-class function for directive_pushPrm.
void sequencer_sendSignal_result_timeOpFailed()
Send signal result_timeOpFailed to state machine sequencer.
void BREAK_cmdHandlerBase(FwOpcodeType opCode, U32 cmdSeq, Fw::CmdArgBuffer &args)
void seqDoneOut_out(FwIndexType portNum, FwOpcodeType opCode, U32 cmdSeq, const Fw::CmdResponse &response)
Invoke output port seqDoneOut.
void log_WARNING_HI_FileOpenError(const Fw::StringBase &filePath, I32 errorCode) const
Log event FileOpenError.
void init(FpySequencerComponentBase::SmId smId)
Initialize the state machine.
void set_prmSet_OutputPort(FwIndexType portNum, Fw::InputPrmSetPort *port)
Connect port to prmSet[portNum].
virtual void Svc_FpySequencer_SequencerStateMachine_action_setSequenceBlockState(SmId smId, Svc_FpySequencer_SequencerStateMachine::Signal signal, const Svc::FpySequencer_SequenceExecutionArgs &value)=0
virtual void seqRunIn_handler(FwIndexType portNum, const Fw::StringBase &filename)=0
Handler for input port seqRunIn.
void sequencer_sendSignal_cmd_CANCEL()
Send signal cmd_CANCEL to state machine sequencer.
void sequencer_sendSignal_result_checkStatementTimeout_statementTimeout()
Send signal result_checkStatementTimeout_statementTimeout to state machine sequencer.
static constexpr FwIndexType getNum_cmdResponseOut_OutputPorts()
void sequencer_sendSignal_stmtResponse_keepWaiting()
Send signal stmtResponse_keepWaiting to state machine sequencer.
virtual void Svc_FpySequencer_SequencerStateMachine_action_resetRuntime(SmId smId, Svc_FpySequencer_SequencerStateMachine::Signal signal)=0
bool isConnected_cmdResponseOut_OutputPort(FwIndexType portNum)
void log_WARNING_HI_InvalidCommand(I32 state) const
Log event InvalidCommand.
void tlmWrite_BreakBeforeNextLine(bool arg, Fw::Time _tlmTime=Fw::Time())
void log_ACTIVITY_HI_SequenceCancelled(const Fw::StringBase &filePath) const
Log event SequenceCancelled.
virtual void RUN_preMsgHook(FwOpcodeType opCode, U32 cmdSeq)
Pre-message hook for command RUN.
void log_ACTIVITY_HI_BreakpointCleared() const
Log event BreakpointCleared.
static constexpr FwIndexType getNum_getTlmChan_OutputPorts()
virtual void directive_getField_internalInterfaceHandler(const Svc::FpySequencer_GetFieldDirective &directive)=0
Internal interface handler for directive_getField.
void pingOut_out(FwIndexType portNum, U32 key)
Invoke output port pingOut.
bool isConnected_cmdOut_OutputPort(FwIndexType portNum)
void tlmWrite_SequencesFailed(U64 arg, Fw::Time _tlmTime=Fw::Time())
void log_WARNING_HI_FileReadDeserializeError(Svc::FpySequencer_FileReadStage readStage, const Fw::StringBase &filePath, I32 errorCode, U64 buffLeft, U64 buffLength) const
Log event FileReadDeserializeError.
bool isConnected_logOut_OutputPort(FwIndexType portNum)
void tlmWrite_SeqPath(const Fw::StringBase &arg, Fw::Time _tlmTime=Fw::Time())
virtual void SET_BREAKPOINT_preMsgHook(FwOpcodeType opCode, U32 cmdSeq)
Pre-message hook for command SET_BREAKPOINT.
PlatformIndexType FwIndexType
void directive_constCmd_internalInterfaceInvoke(const Svc::FpySequencer_ConstCmdDirective &directive)
Internal interface base-class function for directive_constCmd.
virtual void VALIDATE_preMsgHook(FwOpcodeType opCode, U32 cmdSeq)
Pre-message hook for command VALIDATE.
static constexpr FwIndexType getNum_checkTimers_InputPorts()
virtual void directive_load_internalInterfaceHandler(const Svc::FpySequencer_LoadDirective &directive)=0
Internal interface handler for directive_load.
bool isConnected_prmGet_OutputPort(FwIndexType portNum)
void log_WARNING_HI_MismatchedTimeContext(I32 internalTimeContext, I32 otherTimeContext) const
Log event MismatchedTimeContext.
virtual void Svc_FpySequencer_SequencerStateMachine_action_clearBreakBeforeNextLine(SmId smId, Svc_FpySequencer_SequencerStateMachine::Signal signal)=0
Svc::InputSchedPort * get_tlmWrite_InputPort(FwIndexType portNum)
void log_WARNING_HI_WrongSchemaVersion(U8 expected, U8 actual) const
Log event WrongSchemaVersion.
virtual void Svc_FpySequencer_SequencerStateMachine_action_report_seqBroken(SmId smId, Svc_FpySequencer_SequencerStateMachine::Signal signal)=0
void directive_getFlag_internalInterfaceInvoke(const Svc::FpySequencer_GetFlagDirective &directive)
Internal interface base-class function for directive_getFlag.
void cmdOut_out(FwIndexType portNum, Fw::ComBuffer &data, U32 context)
Invoke output port cmdOut.
virtual void Svc_FpySequencer_SequencerStateMachine_action_setBreakBeforeNextLine(SmId smId, Svc_FpySequencer_SequencerStateMachine::Signal signal)=0
void sequencer_sendSignal_cmd_CLEAR_BREAKPOINT()
Send signal cmd_CLEAR_BREAKPOINT to state machine sequencer.
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
virtual void Svc_FpySequencer_SequencerStateMachine_action_report_seqSucceeded(SmId smId, Svc_FpySequencer_SequencerStateMachine::Signal signal)=0
virtual void BREAK_preMsgHook(FwOpcodeType opCode, U32 cmdSeq)
Pre-message hook for command BREAK.
void tlmWrite_DirectiveErrorIndex(U64 arg, Fw::Time _tlmTime=Fw::Time())
RateGroupDivider component implementation.
void log_WARNING_HI_CmdResponseWhileNotAwaiting(FwOpcodeType opcode, Fw::CmdResponse response) const
Log event CmdResponseWhileNotAwaiting.
virtual void Svc_FpySequencer_SequencerStateMachine_action_setGoalState_RUNNING(SmId smId, Svc_FpySequencer_SequencerStateMachine::Signal signal)=0
bool isConnected_cmdRegOut_OutputPort(FwIndexType portNum)
void log_WARNING_HI_CmdResponseWhileAwaitingDirective(FwOpcodeType opcode, Fw::CmdResponse response, U8 expectedDirectiveOpcode) const
Log event CmdResponseWhileAwaitingDirective.
virtual void cmdResponseIn_preMsgHook(FwIndexType portNum, FwOpcodeType opCode, U32 cmdSeq, const Fw::CmdResponse &response)
Pre-message hook for async input port cmdResponseIn.
void seqRunIn_handlerBase(FwIndexType portNum, const Fw::StringBase &filename)
Handler base-class function for input port seqRunIn.
Enum representing parameter validity.
virtual void Svc_FpySequencer_SequencerStateMachine_action_setBreakpoint(SmId smId, Svc_FpySequencer_SequencerStateMachine::Signal signal, const Svc::FpySequencer_BreakpointArgs &value)=0
void log_WARNING_HI_TooManySequenceArgs(U8 count, U8 max) const
Log event TooManySequenceArgs.
void sequencer_sendSignal_cmd_CONTINUE()
Send signal cmd_CONTINUE to state machine sequencer.
void DUMP_STACK_TO_FILE_cmdHandlerBase(FwOpcodeType opCode, U32 cmdSeq, Fw::CmdArgBuffer &args)
friend class FpySequencerTester
Friend class tester implementation to support white-box testing.
void log_WARNING_HI_MismatchedTimeBase(I32 internalTimeBase, I32 otherTimeBase) const
Log event MismatchedTimeBase.
void sequencer_sendSignal_result_failure()
Send signal result_failure to state machine sequencer.
virtual void CONTINUE_preMsgHook(FwOpcodeType opCode, U32 cmdSeq)
Pre-message hook for command CONTINUE.
virtual void checkTimers_preMsgHook(FwIndexType portNum, U32 context)
Pre-message hook for async input port checkTimers.
void sequencer_sendSignal_entered()
Send signal entered to state machine sequencer.
void directive_exit_internalInterfaceInvoke(const Svc::FpySequencer_ExitDirective &directive)
Internal interface base-class function for directive_exit.
virtual void Svc_FpySequencer_SequencerStateMachine_action_checkShouldWake(SmId smId, Svc_FpySequencer_SequencerStateMachine::Signal signal)=0
Fw::ParamValid getParam_out(FwIndexType portNum, FwPrmIdType id, Fw::ParamBuffer &val)
Invoke output port getParam.
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.
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)
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.
void checkTimers_handlerBase(FwIndexType portNum, U32 context)
Handler base-class function for input port checkTimers.
static constexpr FwIndexType getNum_prmGet_OutputPorts()
pops a bool off the stack, sets a flag with a specific index to that bool
virtual void CANCEL_preMsgHook(FwOpcodeType opCode, U32 cmdSeq)
Pre-message hook for command CANCEL.
void tlmWrite_BreakOnlyOnceOnBreakpoint(bool arg, Fw::Time _tlmTime=Fw::Time())
bool isConnected_getTlmChan_OutputPort(FwIndexType portNum)
void log_WARNING_HI_WrongCmdResponseIndex(FwOpcodeType opcode, Fw::CmdResponse response, U16 actualCmdIdx, U16 expectedCmdIdx) const
Log event WrongCmdResponseIndex.
gets a flag and pushes its value as a U8 to the stack
void tlmWrite_SequencesCancelled(U64 arg, Fw::Time _tlmTime=Fw::Time())
virtual void directive_storeConstOffset_internalInterfaceHandler(const Svc::FpySequencer_StoreConstOffsetDirective &directive)=0
Internal interface handler for directive_storeConstOffset.
void tlmWrite_BreakpointInUse(bool arg, Fw::Time _tlmTime=Fw::Time())
virtual void Svc_FpySequencer_SequencerStateMachine_action_report_seqCancelled(SmId smId, Svc_FpySequencer_SequencerStateMachine::Signal signal)=0
friend class FpySequencerTesterBase
Autocoded test harness for the enclosing component.
void set_prmGet_OutputPort(FwIndexType portNum, Fw::InputPrmGetPort *port)
Connect port to prmGet[portNum].
void set_getParam_OutputPort(FwIndexType portNum, Fw::InputPrmGetPort *port)
Connect port to getParam[portNum].
void CLEAR_BREAKPOINT_cmdHandlerBase(FwOpcodeType opCode, U32 cmdSeq, Fw::CmdArgBuffer &args)
U32 StackSizeType
the type which everything referencing a size or offset on the stack is represented in ...
bool paramGet_FLAG_DEFAULT_EXIT_ON_CMD_FAIL(Fw::ParamValid &valid)
void tlmWrite_BreakpointIndex(U32 arg, Fw::Time _tlmTime=Fw::Time())
Writes the contents of the stack to a file. This command is only valid in the RUNNING.PAUSED state.
#define U64(C)
Definition: sha.h:181
void tlmWrite_Debug_NextStatementReadSuccess(bool arg, Fw::Time _tlmTime=Fw::Time())