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"
78 #include "Svc/Ping/PingPortAc.hpp"
88 
89 namespace Svc {
90 
97  {
98 
99  // ----------------------------------------------------------------------
100  // Friend classes
101  // ----------------------------------------------------------------------
102 
106  friend class FpySequencerTester;
107 
108  protected:
109 
110  // ----------------------------------------------------------------------
111  // Constants
112  // ----------------------------------------------------------------------
113 
115  enum {
117  };
118 
120  enum {
126  };
127 
129  enum {
138  };
139 
141  enum {
148  };
149 
151  enum {
152  OPCODE_RUN = 0x0,
158  OPCODE_SET_BREAKPOINT = 0x6,
160  OPCODE_BREAK = 0x7,
164  OPCODE_CONTINUE = 0x8,
169  OPCODE_STEP = 0xa,
175  };
176 
178  enum {
218  };
219 
221  enum {
243  };
244 
246  enum {
248  };
252 
254  enum class SmId : FwEnumStoreType {
255  sequencer,
256  };
257 
258  protected:
259 
260  // ----------------------------------------------------------------------
261  // Types for internal state machines
262  // ----------------------------------------------------------------------
263 
267  {
268 
269  // ----------------------------------------------------------------------
270  // Friend classes
271  // ----------------------------------------------------------------------
272 
276  friend class FpySequencerTester;
277 
278  public:
279 
282  FpySequencerComponentBase& component
283  );
284 
285  public:
286 
288  void init(
290  );
291 
292  public:
293 
296 
297  private:
298 
300  void action_signalEntered(
301  Signal signal
302  );
303 
305  void action_setSequenceFilePath(
306  Signal signal,
308  );
309 
311  void action_setSequenceBlockState(
312  Signal signal,
314  );
315 
317  void action_setSequenceArguments(
318  Signal signal,
320  );
321 
323  void action_validate(
324  Signal signal
325  );
326 
328  void action_report_seqSucceeded(
329  Signal signal
330  );
331 
333  void action_report_seqCancelled(
334  Signal signal
335  );
336 
338  void action_report_seqFailed(
339  Signal signal
340  );
341 
343  void action_report_seqStarted(
344  Signal signal
345  );
346 
348  void action_setGoalState_RUNNING(
349  Signal signal
350  );
351 
353  void action_setGoalState_VALID(
354  Signal signal
355  );
356 
358  void action_setGoalState_IDLE(
359  Signal signal
360  );
361 
363  void action_sendCmdResponse_OK(
364  Signal signal
365  );
366 
368  void action_sendCmdResponse_EXECUTION_ERROR(
369  Signal signal
370  );
371 
373  void action_clearSequenceFile(
374  Signal signal
375  );
376 
378  void action_clearBreakpoint(
379  Signal signal
380  );
381 
383  void action_clearSequenceArguments(
384  Signal signal
385  );
386 
388  void action_checkShouldWake(
389  Signal signal
390  );
391 
393  void action_dispatchStatement(
394  Signal signal
395  );
396 
398  void action_resetRuntime(
399  Signal signal
400  );
401 
403  void action_checkStatementTimeout(
404  Signal signal
405  );
406 
408  void action_incrementSequenceCounter(
409  Signal signal
410  );
411 
413  void action_pushArgsToStack(
414  Signal signal
415  );
416 
418  void action_report_seqBroken(
419  Signal signal
420  );
421 
423  void action_setBreakpoint(
424  Signal signal,
426  );
427 
429  void action_setBreakBeforeNextLine(
430  Signal signal
431  );
432 
434  void action_clearBreakBeforeNextLine(
435  Signal signal
436  );
437 
438  private:
439 
441  bool guard_goalStateIs_RUNNING(
442  Signal signal
443  ) const;
444 
446  bool guard_shouldBreak(
447  Signal signal
448  ) const;
449 
451  bool guard_breakOnce(
452  Signal signal
453  ) const;
454 
455  private:
456 
458  FpySequencerComponentBase& m_component;
459 
460  };
461 
462  public:
463 
464  // ----------------------------------------------------------------------
465  // Component initialization
466  // ----------------------------------------------------------------------
467 
469  void init(
470  FwSizeType queueDepth,
471  FwEnumStoreType instance = 0
472  );
473 
474 #if !FW_DIRECT_PORT_CALLS
475 
476  public:
477 
478  // ----------------------------------------------------------------------
479  // Getters for special input ports
480  // ----------------------------------------------------------------------
481 
486  FwIndexType portNum
487  );
488 
489 #endif
490 
491 #if !FW_DIRECT_PORT_CALLS
492 
493  public:
494 
495  // ----------------------------------------------------------------------
496  // Getters for typed input ports
497  // ----------------------------------------------------------------------
498 
503  FwIndexType portNum
504  );
505 
510  FwIndexType portNum
511  );
512 
517  FwIndexType portNum
518  );
519 
524  FwIndexType portNum
525  );
526 
531  FwIndexType portNum
532  );
533 
534 #endif
535 
536 #if !FW_DIRECT_PORT_CALLS
537 
538  public:
539 
540  // ----------------------------------------------------------------------
541  // Connect input ports to special output ports
542  // ----------------------------------------------------------------------
543 
546  FwIndexType portNum,
547  Fw::InputCmdRegPort* port
548  );
549 
552  FwIndexType portNum,
554  );
555 
558  FwIndexType portNum,
559  Fw::InputLogPort* port
560  );
561 
562 #if FW_ENABLE_TEXT_LOGGING == 1
563 
565  void set_logTextOut_OutputPort(
566  FwIndexType portNum,
567  Fw::InputLogTextPort* port
568  );
569 
570 #endif
571 
574  FwIndexType portNum,
575  Fw::InputPrmGetPort* port
576  );
577 
580  FwIndexType portNum,
581  Fw::InputPrmSetPort* port
582  );
583 
586  FwIndexType portNum,
587  Fw::InputTimePort* port
588  );
589 
592  FwIndexType portNum,
593  Fw::InputTlmPort* port
594  );
595 
596 #endif
597 
598 #if !FW_DIRECT_PORT_CALLS
599 
600  public:
601 
602  // ----------------------------------------------------------------------
603  // Connect typed input ports to typed output ports
604  // ----------------------------------------------------------------------
605 
608  FwIndexType portNum,
609  Fw::InputComPort* port
610  );
611 
614  FwIndexType portNum,
615  Fw::InputPrmGetPort* port
616  );
617 
620  FwIndexType portNum,
621  Fw::InputTlmGetPort* port
622  );
623 
626  FwIndexType portNum,
627  Svc::InputPingPort* port
628  );
629 
632  FwIndexType portNum,
634  );
635 
638  FwIndexType portNum,
640  );
641 
642 #endif
643 
644 #if !FW_DIRECT_PORT_CALLS && FW_PORT_SERIALIZATION
645 
646  public:
647 
648  // ----------------------------------------------------------------------
649  // Connect serial input ports to special output ports
650  // ----------------------------------------------------------------------
651 
654  FwIndexType portNum,
655  Fw::InputSerializePort* port
656  );
657 
660  FwIndexType portNum,
661  Fw::InputSerializePort* port
662  );
663 
666  FwIndexType portNum,
667  Fw::InputSerializePort* port
668  );
669 
670 #if FW_ENABLE_TEXT_LOGGING == 1
671 
673  void set_logTextOut_OutputPort(
674  FwIndexType portNum,
675  Fw::InputSerializePort* port
676  );
677 
678 #endif
679 
682  FwIndexType portNum,
683  Fw::InputSerializePort* port
684  );
685 
688  FwIndexType portNum,
689  Fw::InputSerializePort* port
690  );
691 
694  FwIndexType portNum,
695  Fw::InputSerializePort* port
696  );
697 
698 #endif
699 
700 #if !FW_DIRECT_PORT_CALLS && FW_PORT_SERIALIZATION
701 
702  public:
703 
704  // ----------------------------------------------------------------------
705  // Connect serial input ports to typed output ports
706  // ----------------------------------------------------------------------
707 
710  FwIndexType portNum,
711  Fw::InputSerializePort* port
712  );
713 
716  FwIndexType portNum,
717  Fw::InputSerializePort* port
718  );
719 
722  FwIndexType portNum,
723  Fw::InputSerializePort* port
724  );
725 
728  FwIndexType portNum,
729  Fw::InputSerializePort* port
730  );
731 
732 #endif
733 
734  public:
735 
736  // ----------------------------------------------------------------------
737  // Command registration
738  // ----------------------------------------------------------------------
739 
743  void regCommands();
744 
745  public:
746 
747  // ----------------------------------------------------------------------
748  // Parameter loading
749  // ----------------------------------------------------------------------
750 
754  void loadParameters();
755 
756  protected:
757 
758  // ----------------------------------------------------------------------
759  // Component construction and destruction
760  // ----------------------------------------------------------------------
761 
764  const char* compName = ""
765  );
766 
768  virtual ~FpySequencerComponentBase();
769 
770  protected:
771 
772  // ----------------------------------------------------------------------
773  // Getters for numbers of special input ports
774  // ----------------------------------------------------------------------
775 
780  return NUM_CMDIN_INPUT_PORTS;
781  }
782 
783  protected:
784 
785  // ----------------------------------------------------------------------
786  // Getters for numbers of typed input ports
787  // ----------------------------------------------------------------------
788 
794  }
795 
801  }
802 
807  return NUM_PINGIN_INPUT_PORTS;
808  }
809 
815  }
816 
822  }
823 
824  protected:
825 
826  // ----------------------------------------------------------------------
827  // Getters for numbers of special output ports
828  // ----------------------------------------------------------------------
829 
835  }
836 
842  }
843 
849  }
850 
851 #if FW_ENABLE_TEXT_LOGGING == 1
852 
856  static constexpr FwIndexType getNum_logTextOut_OutputPorts() {
858  }
859 
860 #endif
861 
867  }
868 
874  }
875 
881  }
882 
888  }
889 
890  protected:
891 
892  // ----------------------------------------------------------------------
893  // Getters for numbers of typed output ports
894  // ----------------------------------------------------------------------
895 
901  }
902 
908  }
909 
915  }
916 
922  }
923 
929  }
930 
936  }
937 
938  protected:
939 
940  // ----------------------------------------------------------------------
941  // Connection status queries for special output ports
942  // ----------------------------------------------------------------------
943 
948  FwIndexType portNum
949  ) const;
950 
955  FwIndexType portNum
956  ) const;
957 
962  FwIndexType portNum
963  ) const;
964 
965 #if FW_ENABLE_TEXT_LOGGING == 1
966 
970  bool isConnected_logTextOut_OutputPort(
971  FwIndexType portNum
972  ) const;
973 
974 #endif
975 
980  FwIndexType portNum
981  ) const;
982 
987  FwIndexType portNum
988  ) const;
989 
994  FwIndexType portNum
995  ) const;
996 
1001  FwIndexType portNum
1002  ) const;
1003 
1004  protected:
1005 
1006  // ----------------------------------------------------------------------
1007  // Connection status queries for typed output ports
1008  // ----------------------------------------------------------------------
1009 
1014  FwIndexType portNum
1015  ) const;
1016 
1021  FwIndexType portNum
1022  ) const;
1023 
1028  FwIndexType portNum
1029  ) const;
1030 
1035  FwIndexType portNum
1036  ) const;
1037 
1042  FwIndexType portNum
1043  ) const;
1044 
1049  FwIndexType portNum
1050  ) const;
1051 
1052 #if FW_DIRECT_PORT_CALLS
1053  public:
1054 #else
1055  protected:
1056 #endif
1057 
1058  // ----------------------------------------------------------------------
1059  // Port handler base-class functions for special input ports
1060  //
1061  // Call these functions directly to bypass the corresponding ports
1062  // ----------------------------------------------------------------------
1063 
1065  void cmdIn_handlerBase(
1066  FwIndexType portNum,
1067  FwOpcodeType opCode,
1068  U32 cmdSeq,
1069  Fw::CmdArgBuffer& args
1070  );
1071 
1072  protected:
1073 
1074  // ----------------------------------------------------------------------
1075  // Handlers to implement for typed input ports
1076  // ----------------------------------------------------------------------
1077 
1079  virtual void checkTimers_handler(
1080  FwIndexType portNum,
1081  U32 context
1082  ) = 0;
1083 
1085  virtual void cmdResponseIn_handler(
1086  FwIndexType portNum,
1087  FwOpcodeType opCode,
1088  U32 cmdSeq,
1089  const Fw::CmdResponse& response
1090  ) = 0;
1091 
1093  virtual void pingIn_handler(
1094  FwIndexType portNum,
1095  U32 key
1096  ) = 0;
1097 
1099  virtual void seqRunIn_handler(
1100  FwIndexType portNum,
1101  const Fw::StringBase& filename,
1102  const Svc::SeqArgs& args
1103  ) = 0;
1104 
1106  virtual void tlmWrite_handler(
1107  FwIndexType portNum,
1108  U32 context
1109  ) = 0;
1110 
1111 #if FW_DIRECT_PORT_CALLS
1112  public:
1113 #else
1114  protected:
1115 #endif
1116 
1117  // ----------------------------------------------------------------------
1118  // Port handler base-class functions for typed input ports
1119  //
1120  // Call these functions directly to bypass the corresponding ports
1121  // ----------------------------------------------------------------------
1122 
1125  FwIndexType portNum,
1126  U32 context
1127  );
1128 
1131  FwIndexType portNum,
1132  FwOpcodeType opCode,
1133  U32 cmdSeq,
1134  const Fw::CmdResponse& response
1135  );
1136 
1138  void pingIn_handlerBase(
1139  FwIndexType portNum,
1140  U32 key
1141  );
1142 
1144  void seqRunIn_handlerBase(
1145  FwIndexType portNum,
1146  const Fw::StringBase& filename,
1147  const Svc::SeqArgs& args
1148  );
1149 
1151  void tlmWrite_handlerBase(
1152  FwIndexType portNum,
1153  U32 context
1154  );
1155 
1156  protected:
1157 
1158  // ----------------------------------------------------------------------
1159  // Pre-message hooks for typed async input ports
1160  //
1161  // Each of these functions is invoked just before processing a message
1162  // on the corresponding port. By default, they do nothing. You can
1163  // override them to provide specific pre-message behavior.
1164  // ----------------------------------------------------------------------
1165 
1167  virtual void checkTimers_preMsgHook(
1168  FwIndexType portNum,
1169  U32 context
1170  );
1171 
1173  virtual void cmdResponseIn_preMsgHook(
1174  FwIndexType portNum,
1175  FwOpcodeType opCode,
1176  U32 cmdSeq,
1177  const Fw::CmdResponse& response
1178  );
1179 
1181  virtual void pingIn_preMsgHook(
1182  FwIndexType portNum,
1183  U32 key
1184  );
1185 
1187  virtual void seqRunIn_preMsgHook(
1188  FwIndexType portNum,
1189  const Fw::StringBase& filename,
1190  const Svc::SeqArgs& args
1191  );
1192 
1194  virtual void tlmWrite_preMsgHook(
1195  FwIndexType portNum,
1196  U32 context
1197  );
1198 
1199  protected:
1200 
1201  // ----------------------------------------------------------------------
1202  // Invocation functions for typed output ports
1203  // ----------------------------------------------------------------------
1204 
1206  void cmdOut_out(
1207  FwIndexType portNum,
1208  Fw::ComBuffer& data,
1209  U32 context
1210  ) const;
1211 
1214  FwIndexType portNum,
1215  FwPrmIdType id,
1216  Fw::ParamBuffer& val
1217  ) const;
1219 
1222  FwIndexType portNum,
1223  FwChanIdType id,
1224  Fw::Time& timeTag,
1225  Fw::TlmBuffer& val
1226  ) const;
1229 
1231  void pingOut_out(
1232  FwIndexType portNum,
1233  U32 key
1234  ) const;
1235 
1237  void seqDoneOut_out(
1238  FwIndexType portNum,
1239  FwOpcodeType opCode,
1240  U32 cmdSeq,
1241  const Fw::CmdResponse& response
1242  ) const;
1243 
1245  void seqStartOut_out(
1246  FwIndexType portNum,
1247  const Fw::StringBase& filename,
1248  const Svc::SeqArgs& args
1249  ) const;
1250 
1251  protected:
1252 
1253  // ----------------------------------------------------------------------
1254  // Internal interface handlers
1255  // ----------------------------------------------------------------------
1256 
1259 
1262 
1265 
1268 
1271 
1274 
1277 
1279  virtual void directive_if_internalInterfaceHandler(const Svc::FpySequencer_IfDirective& directive) = 0;
1280 
1283 
1286 
1289 
1292 
1295 
1298 
1301 
1304 
1307 
1310 
1313 
1316 
1319 
1322 
1325 
1328 
1331 
1334 
1337 
1340 
1341  protected:
1342 
1343  // ----------------------------------------------------------------------
1344  // Internal interface base-class functions
1345  // ----------------------------------------------------------------------
1346 
1349 
1352 
1355 
1358 
1361 
1364 
1367 
1370 
1373 
1376 
1379 
1382 
1385 
1388 
1391 
1394 
1397 
1400 
1403 
1406 
1409 
1412 
1415 
1418 
1421 
1424 
1427 
1430 
1431  protected:
1432 
1433  // ----------------------------------------------------------------------
1434  // State getter functions
1435  // ----------------------------------------------------------------------
1436 
1439 
1440  protected:
1441 
1442  // ----------------------------------------------------------------------
1443  // Signal send functions
1444  // ----------------------------------------------------------------------
1445 
1449  );
1450 
1454  );
1455 
1459  );
1460 
1463 
1466  const Svc::FpySequencer_BreakpointArgs& value
1467  );
1468 
1471 
1474 
1477 
1480 
1483 
1486 
1489 
1492 
1495 
1498 
1501 
1504 
1507 
1510 
1513 
1516 
1519 
1522 
1525 
1528 
1531 
1532  protected:
1533 
1534  // ----------------------------------------------------------------------
1535  // Functions to implement for internal state machine actions
1536  // ----------------------------------------------------------------------
1537 
1542  SmId smId,
1544  ) = 0;
1545 
1550  SmId smId,
1553  ) = 0;
1554 
1559  SmId smId,
1562  ) = 0;
1563 
1568  SmId smId,
1571  ) = 0;
1572 
1577  SmId smId,
1579  ) = 0;
1580 
1585  SmId smId,
1587  ) = 0;
1588 
1593  SmId smId,
1595  ) = 0;
1596 
1601  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  const Svc::FpySequencer_BreakpointArgs& value
1740  ) = 0;
1741 
1746  SmId smId,
1748  ) = 0;
1749 
1754  SmId smId,
1756  ) = 0;
1757 
1758  protected:
1759 
1760  // ----------------------------------------------------------------------
1761  // Functions to implement for internal state machine guards
1762  // ----------------------------------------------------------------------
1763 
1768  SmId smId,
1770  ) const = 0;
1771 
1777  SmId smId,
1779  ) const = 0;
1780 
1785  SmId smId,
1787  ) const = 0;
1788 
1789  protected:
1790 
1791  // ----------------------------------------------------------------------
1792  // Command response
1793  // ----------------------------------------------------------------------
1794 
1796  void cmdResponse_out(
1797  FwOpcodeType opCode,
1798  U32 cmdSeq,
1799  Fw::CmdResponse response
1800  );
1801 
1802  protected:
1803 
1804  // ----------------------------------------------------------------------
1805  // Command handlers to implement
1806  // ----------------------------------------------------------------------
1807 
1811  virtual void RUN_cmdHandler(
1812  FwOpcodeType opCode,
1813  U32 cmdSeq,
1814  const Fw::CmdStringArg& fileName,
1816  ) = 0;
1817 
1819  virtual void RUN_ARGS_cmdHandler(
1820  FwOpcodeType opCode,
1821  U32 cmdSeq,
1822  const Fw::CmdStringArg& fileName,
1824  Svc::SeqArgs buffer
1825  ) = 0;
1826 
1830  virtual void VALIDATE_cmdHandler(
1831  FwOpcodeType opCode,
1832  U32 cmdSeq,
1833  const Fw::CmdStringArg& fileName
1834  ) = 0;
1835 
1839  virtual void VALIDATE_ARGS_cmdHandler(
1840  FwOpcodeType opCode,
1841  U32 cmdSeq,
1842  const Fw::CmdStringArg& fileName,
1843  Svc::SeqArgs buffer
1844  ) = 0;
1845 
1849  virtual void RUN_VALIDATED_cmdHandler(
1850  FwOpcodeType opCode,
1851  U32 cmdSeq,
1853  ) = 0;
1854 
1859  virtual void CANCEL_cmdHandler(
1860  FwOpcodeType opCode,
1861  U32 cmdSeq
1862  ) = 0;
1863 
1870  virtual void SET_BREAKPOINT_cmdHandler(
1871  FwOpcodeType opCode,
1872  U32 cmdSeq,
1873  U32 stmtIdx,
1874  bool breakOnce
1875  ) = 0;
1876 
1882  virtual void BREAK_cmdHandler(
1883  FwOpcodeType opCode,
1884  U32 cmdSeq
1885  ) = 0;
1886 
1891  virtual void CONTINUE_cmdHandler(
1892  FwOpcodeType opCode,
1893  U32 cmdSeq
1894  ) = 0;
1895 
1900  virtual void CLEAR_BREAKPOINT_cmdHandler(
1901  FwOpcodeType opCode,
1902  U32 cmdSeq
1903  ) = 0;
1904 
1909  virtual void STEP_cmdHandler(
1910  FwOpcodeType opCode,
1911  U32 cmdSeq
1912  ) = 0;
1913 
1917  virtual void DUMP_STACK_TO_FILE_cmdHandler(
1918  FwOpcodeType opCode,
1919  U32 cmdSeq,
1920  const Fw::CmdStringArg& fileName
1921  ) = 0;
1922 
1923  protected:
1924 
1925  // ----------------------------------------------------------------------
1926  // Command handler base-class functions
1927  //
1928  // Call these functions directly to bypass the command input port
1929  // ----------------------------------------------------------------------
1930 
1934  void RUN_cmdHandlerBase(
1935  FwOpcodeType opCode,
1936  U32 cmdSeq,
1937  Fw::CmdArgBuffer& args
1938  );
1939 
1942  FwOpcodeType opCode,
1943  U32 cmdSeq,
1944  Fw::CmdArgBuffer& args
1945  );
1946 
1951  FwOpcodeType opCode,
1952  U32 cmdSeq,
1953  Fw::CmdArgBuffer& args
1954  );
1955 
1960  FwOpcodeType opCode,
1961  U32 cmdSeq,
1962  Fw::CmdArgBuffer& args
1963  );
1964 
1969  FwOpcodeType opCode,
1970  U32 cmdSeq,
1971  Fw::CmdArgBuffer& args
1972  );
1973 
1978  void CANCEL_cmdHandlerBase(
1979  FwOpcodeType opCode,
1980  U32 cmdSeq,
1981  Fw::CmdArgBuffer& args
1982  );
1983 
1991  FwOpcodeType opCode,
1992  U32 cmdSeq,
1993  Fw::CmdArgBuffer& args
1994  );
1995 
2001  void BREAK_cmdHandlerBase(
2002  FwOpcodeType opCode,
2003  U32 cmdSeq,
2004  Fw::CmdArgBuffer& args
2005  );
2006 
2012  FwOpcodeType opCode,
2013  U32 cmdSeq,
2014  Fw::CmdArgBuffer& args
2015  );
2016 
2022  FwOpcodeType opCode,
2023  U32 cmdSeq,
2024  Fw::CmdArgBuffer& args
2025  );
2026 
2031  void STEP_cmdHandlerBase(
2032  FwOpcodeType opCode,
2033  U32 cmdSeq,
2034  Fw::CmdArgBuffer& args
2035  );
2036 
2041  FwOpcodeType opCode,
2042  U32 cmdSeq,
2043  Fw::CmdArgBuffer& args
2044  );
2045 
2046  protected:
2047 
2048  // ----------------------------------------------------------------------
2049  // Pre-message hooks for async commands
2050  //
2051  // Each of these functions is invoked just before processing the
2052  // corresponding command. By default they do nothing. You can
2053  // override them to provide specific pre-command behavior.
2054  // ----------------------------------------------------------------------
2055 
2057  virtual void RUN_preMsgHook(
2058  FwOpcodeType opCode,
2059  U32 cmdSeq
2060  );
2061 
2063  virtual void RUN_ARGS_preMsgHook(
2064  FwOpcodeType opCode,
2065  U32 cmdSeq
2066  );
2067 
2069  virtual void VALIDATE_preMsgHook(
2070  FwOpcodeType opCode,
2071  U32 cmdSeq
2072  );
2073 
2075  virtual void VALIDATE_ARGS_preMsgHook(
2076  FwOpcodeType opCode,
2077  U32 cmdSeq
2078  );
2079 
2081  virtual void RUN_VALIDATED_preMsgHook(
2082  FwOpcodeType opCode,
2083  U32 cmdSeq
2084  );
2085 
2087  virtual void CANCEL_preMsgHook(
2088  FwOpcodeType opCode,
2089  U32 cmdSeq
2090  );
2091 
2093  virtual void SET_BREAKPOINT_preMsgHook(
2094  FwOpcodeType opCode,
2095  U32 cmdSeq
2096  );
2097 
2099  virtual void BREAK_preMsgHook(
2100  FwOpcodeType opCode,
2101  U32 cmdSeq
2102  );
2103 
2105  virtual void CONTINUE_preMsgHook(
2106  FwOpcodeType opCode,
2107  U32 cmdSeq
2108  );
2109 
2111  virtual void CLEAR_BREAKPOINT_preMsgHook(
2112  FwOpcodeType opCode,
2113  U32 cmdSeq
2114  );
2115 
2117  virtual void STEP_preMsgHook(
2118  FwOpcodeType opCode,
2119  U32 cmdSeq
2120  );
2121 
2123  virtual void DUMP_STACK_TO_FILE_preMsgHook(
2124  FwOpcodeType opCode,
2125  U32 cmdSeq
2126  );
2127 
2128  protected:
2129 
2130  // ----------------------------------------------------------------------
2131  // Event logging functions
2132  // ----------------------------------------------------------------------
2133 
2135  void log_WARNING_HI_InvalidCommand(I32 state) const;
2136 
2138  void log_WARNING_HI_InvalidSeqRunCall(I32 state) const;
2139 
2142  const Fw::StringBase& filePath,
2143  I32 errorCode
2144  ) const;
2145 
2148  FwSizeType writeSize,
2149  const Fw::StringBase& filePath,
2150  I32 errorCode
2151  ) const;
2152 
2156  const Fw::StringBase& filePath,
2157  I32 errorCode
2158  ) const;
2159 
2163  const Fw::StringBase& filePath
2164  ) const;
2165 
2169  const Fw::StringBase& filePath,
2170  I32 errorCode,
2171  U64 buffLeft,
2172  U64 buffLength
2173  ) const;
2174 
2177  U8 expected,
2178  U8 actual
2179  ) const;
2180 
2183  U32 expected,
2184  U32 actual
2185  ) const;
2186 
2188  void log_WARNING_HI_ExtraBytesInSequence(FwSizeType remaining) const;
2189 
2192  U64 bufferSize,
2193  const Fw::StringBase& filePath
2194  ) const;
2195 
2198  FwOpcodeType opCode,
2199  U32 stmtIdx,
2200  const Fw::StringBase& filePath,
2201  Fw::CmdResponse response
2202  ) const;
2203 
2205  void log_ACTIVITY_HI_SequenceDone(const Fw::StringBase& filePath) const;
2206 
2208  void log_ACTIVITY_HI_SequenceCancelled(const Fw::StringBase& filePath) const;
2209 
2212  const Fw::StringBase& filePath,
2213  U8 errorCode
2214  ) const;
2215 
2218  U8 opcode,
2219  U32 stmtIdx,
2220  const Fw::StringBase& filePath
2221  ) const;
2222 
2225  I32 state,
2226  FwOpcodeType opcode,
2227  Fw::CmdResponse response
2228  ) const;
2229 
2232  FwOpcodeType opcode,
2233  Fw::CmdResponse response,
2234  U16 oldSequenceIdx,
2235  U16 currentSequenceIdx
2236  ) const;
2237 
2240  FwOpcodeType opcode,
2241  Fw::CmdResponse response
2242  ) const;
2243 
2246  FwOpcodeType opcode,
2247  Fw::CmdResponse response,
2248  U8 expectedDirectiveOpcode
2249  ) const;
2250 
2253  FwOpcodeType opcode,
2254  Fw::CmdResponse response,
2255  FwOpcodeType expectedOpcode
2256  ) const;
2257 
2260  FwOpcodeType opcode,
2261  Fw::CmdResponse response,
2262  U16 actualCmdIdx,
2263  U16 expectedCmdIdx
2264  ) const;
2265 
2268  U8 opcode,
2269  U32 stmtIdx,
2270  I32 errorCode,
2271  U64 buffLeft,
2272  U64 buffLength
2273  ) const;
2274 
2277  I32 internalTimeBase,
2278  I32 otherTimeBase
2279  ) const;
2280 
2283  I32 internalTimeContext,
2284  I32 otherTimeContext
2285  ) const;
2286 
2289  FwOpcodeType opCode,
2290  U32 stmtIdx,
2291  const Fw::StringBase& filePath
2292  ) const;
2293 
2296  U8 opCode,
2297  U32 stmtIdx,
2298  const Fw::StringBase& filePath
2299  ) const;
2300 
2303  U8 count,
2304  U8 max
2305  ) const;
2306 
2309  U16 count,
2310  U16 max
2311  ) const;
2312 
2314  void log_ACTIVITY_HI_SequencePaused(U32 stmtIdx) const;
2315 
2318  U32 breakpointIdx,
2319  bool breakOnce
2320  ) const;
2321 
2323  void log_ACTIVITY_HI_BreakpointCleared() const;
2324 
2326  void log_FATAL_LogFatal(
2327  const Fw::StringBase& filePath,
2328  const Fw::StringBase& message
2329  ) const;
2330 
2333  const Fw::StringBase& filePath,
2334  const Fw::StringBase& message
2335  ) const;
2336 
2339  const Fw::StringBase& filePath,
2340  const Fw::StringBase& message
2341  ) const;
2342 
2345  const Fw::StringBase& filePath,
2346  const Fw::StringBase& message
2347  ) const;
2348 
2351  const Fw::StringBase& filePath,
2352  const Fw::StringBase& message
2353  ) const;
2354 
2357  const Fw::StringBase& filePath,
2358  const Fw::StringBase& message
2359  ) const;
2360 
2363  const Fw::StringBase& filePath,
2364  const Fw::StringBase& message
2365  ) const;
2366 
2367  protected:
2368 
2369  // ----------------------------------------------------------------------
2370  // Telemetry serialized write
2371  // ----------------------------------------------------------------------
2372 
2377  void tlmWrite(
2378  FwChanIdType id,
2379  Fw::TlmBuffer& _tlmBuff,
2380  Fw::Time _tlmTime = Fw::Time()
2381  ) const;
2382 
2383  protected:
2384 
2385  // ----------------------------------------------------------------------
2386  // Telemetry write functions
2387  // ----------------------------------------------------------------------
2388 
2392  void tlmWrite_State(
2393  FwEnumStoreType arg,
2394  Fw::Time _tlmTime = Fw::Time()
2395  );
2396 
2401  U64 arg,
2402  Fw::Time _tlmTime = Fw::Time()
2403  );
2404 
2409  U64 arg,
2410  Fw::Time _tlmTime = Fw::Time()
2411  );
2412 
2417  U64 arg,
2418  Fw::Time _tlmTime = Fw::Time()
2419  );
2420 
2427  U64 arg,
2428  Fw::Time _tlmTime = Fw::Time()
2429  );
2430 
2435  U64 arg,
2436  Fw::Time _tlmTime = Fw::Time()
2437  );
2438 
2443  const Svc::Fpy::DirectiveErrorCode& arg,
2444  Fw::Time _tlmTime = Fw::Time()
2445  );
2446 
2451  U64 arg,
2452  Fw::Time _tlmTime = Fw::Time()
2453  );
2454 
2459  const Svc::Fpy::DirectiveId& arg,
2460  Fw::Time _tlmTime = Fw::Time()
2461  );
2462 
2466  void tlmWrite_SeqPath(
2467  const Fw::StringBase& arg,
2468  Fw::Time _tlmTime = Fw::Time()
2469  );
2470 
2475  bool arg,
2476  Fw::Time _tlmTime = Fw::Time()
2477  );
2478 
2483  bool arg,
2484  Fw::Time _tlmTime = Fw::Time()
2485  );
2486 
2491  U8 arg,
2492  Fw::Time _tlmTime = Fw::Time()
2493  );
2494 
2499  U32 arg,
2500  Fw::Time _tlmTime = Fw::Time()
2501  );
2502 
2507  FwOpcodeType arg,
2508  Fw::Time _tlmTime = Fw::Time()
2509  );
2510 
2516  Fw::Time _tlmTime = Fw::Time()
2517  );
2518 
2523  bool arg,
2524  Fw::Time _tlmTime = Fw::Time()
2525  );
2526 
2532  U32 arg,
2533  Fw::Time _tlmTime = Fw::Time()
2534  );
2535 
2540  bool arg,
2541  Fw::Time _tlmTime = Fw::Time()
2542  );
2543 
2550  bool arg,
2551  Fw::Time _tlmTime = Fw::Time()
2552  );
2553 
2558  F32 arg,
2559  Fw::Time _tlmTime = Fw::Time()
2560  );
2561 
2562  protected:
2563 
2564  // ----------------------------------------------------------------------
2565  // Parameter hook functions
2566  // ----------------------------------------------------------------------
2567 
2571  virtual void parameterUpdated(
2572  FwPrmIdType id
2573  );
2574 
2578  virtual void parametersLoaded();
2579 
2580  protected:
2581 
2582  // ----------------------------------------------------------------------
2583  // Parameter get functions
2584  // ----------------------------------------------------------------------
2585 
2595  Fw::ParamValid& valid
2596  );
2597 
2598  protected:
2599 
2600  // ----------------------------------------------------------------------
2601  // Time
2602  // ----------------------------------------------------------------------
2603 
2607  Fw::Time getTime() const;
2608 
2609  private:
2610 
2611  // ----------------------------------------------------------------------
2612  // Message dispatch functions
2613  // ----------------------------------------------------------------------
2614 
2616  virtual MsgDispatchStatus doDispatch();
2617 
2618  private:
2619 
2620  // ----------------------------------------------------------------------
2621  // Calls for messages received on special input ports
2622  // ----------------------------------------------------------------------
2623 
2625  static void m_p_cmdIn_in(
2626  Fw::PassiveComponentBase* callComp,
2627  FwIndexType portNum,
2628  FwOpcodeType opCode,
2629  U32 cmdSeq,
2630  Fw::CmdArgBuffer& args
2631  );
2632 
2633  private:
2634 
2635  // ----------------------------------------------------------------------
2636  // Calls for messages received on typed input ports
2637  // ----------------------------------------------------------------------
2638 
2640  static void m_p_checkTimers_in(
2641  Fw::PassiveComponentBase* callComp,
2642  FwIndexType portNum,
2643  U32 context
2644  );
2645 
2647  static void m_p_cmdResponseIn_in(
2648  Fw::PassiveComponentBase* callComp,
2649  FwIndexType portNum,
2650  FwOpcodeType opCode,
2651  U32 cmdSeq,
2652  const Fw::CmdResponse& response
2653  );
2654 
2656  static void m_p_pingIn_in(
2657  Fw::PassiveComponentBase* callComp,
2658  FwIndexType portNum,
2659  U32 key
2660  );
2661 
2663  static void m_p_seqRunIn_in(
2664  Fw::PassiveComponentBase* callComp,
2665  FwIndexType portNum,
2666  const Fw::StringBase& filename,
2667  const Svc::SeqArgs& args
2668  );
2669 
2671  static void m_p_tlmWrite_in(
2672  Fw::PassiveComponentBase* callComp,
2673  FwIndexType portNum,
2674  U32 context
2675  );
2676 
2677  private:
2678 
2679  // ----------------------------------------------------------------------
2680  // Invocation functions for special output ports
2681  // ----------------------------------------------------------------------
2682 
2684  void cmdRegOut_out(
2685  FwIndexType portNum,
2686  FwOpcodeType opCode
2687  ) const;
2688 
2690  void cmdResponseOut_out(
2691  FwIndexType portNum,
2692  FwOpcodeType opCode,
2693  U32 cmdSeq,
2694  const Fw::CmdResponse& response
2695  ) const;
2696 
2698  void logOut_out(
2699  FwIndexType portNum,
2700  FwEventIdType id,
2701  Fw::Time& timeTag,
2702  const Fw::LogSeverity& severity,
2703  Fw::LogBuffer& args
2704  ) const;
2705 
2706 #if FW_ENABLE_TEXT_LOGGING
2707 
2709  void logTextOut_out(
2710  FwIndexType portNum,
2711  FwEventIdType id,
2712  Fw::Time& timeTag,
2713  const Fw::LogSeverity& severity,
2714  Fw::TextLogString& text
2715  ) const;
2716 
2717 #endif
2718 
2720  Fw::ParamValid prmGet_out(
2721  FwIndexType portNum,
2722  FwPrmIdType id,
2723  Fw::ParamBuffer& val
2724  ) const;
2726 
2728  void prmSet_out(
2729  FwIndexType portNum,
2730  FwPrmIdType id,
2731  Fw::ParamBuffer& val
2732  ) const;
2733 
2735  void timeCaller_out(
2736  FwIndexType portNum,
2737  Fw::Time& time
2738  ) const;
2739 
2741  void tlmOut_out(
2742  FwIndexType portNum,
2743  FwChanIdType id,
2744  Fw::Time& timeTag,
2745  Fw::TlmBuffer& val
2746  ) const;
2747 
2748  private:
2749 
2750  // ----------------------------------------------------------------------
2751  // Send signal helper functions
2752  // ----------------------------------------------------------------------
2753 
2755  void sendSignalStart(
2756  SmId smId,
2757  FwEnumStoreType signal,
2758  Fw::SerialBufferBase& buffer
2759  );
2760 
2762  void sequencer_sendSignalFinish(
2763  Fw::LinearBufferBase& buffer
2764  );
2765 
2766  private:
2767 
2768  // ----------------------------------------------------------------------
2769  // Helper functions for state machine dispatch
2770  // ----------------------------------------------------------------------
2771 
2773  void smDispatch(
2774  Fw::SerialBufferBase& buffer
2775  );
2776 
2778  static void deserializeSmIdAndSignal(
2779  Fw::SerialBufferBase& buffer,
2780  FwEnumStoreType& smId,
2781  FwEnumStoreType& signal
2782  );
2783 
2785  void Svc_FpySequencer_SequencerStateMachine_smDispatch(
2786  Fw::SerialBufferBase& buffer,
2787  Svc_FpySequencer_SequencerStateMachine& sm,
2789  );
2790 
2791  private:
2792 
2793  // ----------------------------------------------------------------------
2794  // Parameter set functions
2795  // ----------------------------------------------------------------------
2796 
2800  Fw::CmdResponse paramSet_STATEMENT_TIMEOUT_SECS(
2801  Fw::SerialBufferBase& val
2802  );
2803 
2804  private:
2805 
2806  // ----------------------------------------------------------------------
2807  // Parameter save functions
2808  // ----------------------------------------------------------------------
2809 
2813  Fw::CmdResponse paramSave_STATEMENT_TIMEOUT_SECS();
2814 
2815 #if !FW_DIRECT_PORT_CALLS
2816 
2817  private:
2818 
2819  // ----------------------------------------------------------------------
2820  // Special input ports
2821  // ----------------------------------------------------------------------
2822 
2824  Fw::InputCmdPort m_cmdIn_InputPort[NUM_CMDIN_INPUT_PORTS];
2825 
2826 #endif
2827 
2828 #if !FW_DIRECT_PORT_CALLS
2829 
2830  private:
2831 
2832  // ----------------------------------------------------------------------
2833  // Typed input ports
2834  // ----------------------------------------------------------------------
2835 
2837  Svc::InputSchedPort m_checkTimers_InputPort[NUM_CHECKTIMERS_INPUT_PORTS];
2838 
2840  Fw::InputCmdResponsePort m_cmdResponseIn_InputPort[NUM_CMDRESPONSEIN_INPUT_PORTS];
2841 
2843  Svc::InputPingPort m_pingIn_InputPort[NUM_PINGIN_INPUT_PORTS];
2844 
2846  Svc::InputCmdSeqInPort m_seqRunIn_InputPort[NUM_SEQRUNIN_INPUT_PORTS];
2847 
2849  Svc::InputSchedPort m_tlmWrite_InputPort[NUM_TLMWRITE_INPUT_PORTS];
2850 
2851 #endif
2852 
2853 #if !FW_DIRECT_PORT_CALLS
2854 
2855  private:
2856 
2857  // ----------------------------------------------------------------------
2858  // Special output ports
2859  // ----------------------------------------------------------------------
2860 
2862  Fw::OutputCmdRegPort m_cmdRegOut_OutputPort[NUM_CMDREGOUT_OUTPUT_PORTS];
2863 
2865  Fw::OutputCmdResponsePort m_cmdResponseOut_OutputPort[NUM_CMDRESPONSEOUT_OUTPUT_PORTS];
2866 
2868  Fw::OutputLogPort m_logOut_OutputPort[NUM_LOGOUT_OUTPUT_PORTS];
2869 
2870 #if FW_ENABLE_TEXT_LOGGING == 1
2871 
2873  Fw::OutputLogTextPort m_logTextOut_OutputPort[NUM_LOGTEXTOUT_OUTPUT_PORTS];
2874 
2875 #endif
2876 
2878  Fw::OutputPrmGetPort m_prmGet_OutputPort[NUM_PRMGET_OUTPUT_PORTS];
2879 
2881  Fw::OutputPrmSetPort m_prmSet_OutputPort[NUM_PRMSET_OUTPUT_PORTS];
2882 
2884  Fw::OutputTimePort m_timeCaller_OutputPort[NUM_TIMECALLER_OUTPUT_PORTS];
2885 
2887  Fw::OutputTlmPort m_tlmOut_OutputPort[NUM_TLMOUT_OUTPUT_PORTS];
2888 
2889 #endif
2890 
2891 #if !FW_DIRECT_PORT_CALLS
2892 
2893  private:
2894 
2895  // ----------------------------------------------------------------------
2896  // Typed output ports
2897  // ----------------------------------------------------------------------
2898 
2900  Fw::OutputComPort m_cmdOut_OutputPort[NUM_CMDOUT_OUTPUT_PORTS];
2901 
2903  Fw::OutputPrmGetPort m_getParam_OutputPort[NUM_GETPARAM_OUTPUT_PORTS];
2904 
2906  Fw::OutputTlmGetPort m_getTlmChan_OutputPort[NUM_GETTLMCHAN_OUTPUT_PORTS];
2907 
2909  Svc::OutputPingPort m_pingOut_OutputPort[NUM_PINGOUT_OUTPUT_PORTS];
2910 
2912  Fw::OutputCmdResponsePort m_seqDoneOut_OutputPort[NUM_SEQDONEOUT_OUTPUT_PORTS];
2913 
2915  Svc::OutputCmdSeqInPort m_seqStartOut_OutputPort[NUM_SEQSTARTOUT_OUTPUT_PORTS];
2916 
2917 #endif
2918 
2919  private:
2920 
2921  // ----------------------------------------------------------------------
2922  // First update flags for telemetry channels
2923  // ----------------------------------------------------------------------
2924 
2926  bool m_first_update_State = true;
2927 
2929  bool m_first_update_SequencesSucceeded = true;
2930 
2932  bool m_first_update_SequencesFailed = true;
2933 
2935  bool m_first_update_SequencesCancelled = true;
2936 
2938  bool m_first_update_StatementsDispatched = true;
2939 
2941  bool m_first_update_StatementsFailed = true;
2942 
2944  bool m_first_update_LastDirectiveError = true;
2945 
2947  bool m_first_update_DirectiveErrorIndex = true;
2948 
2950  bool m_first_update_DirectiveErrorId = true;
2951 
2953  bool m_first_update_SeqPath = true;
2954 
2956  bool m_first_update_Debug_ReachedEndOfFile = true;
2957 
2959  bool m_first_update_Debug_NextStatementReadSuccess = true;
2960 
2962  bool m_first_update_Debug_NextStatementOpcode = true;
2963 
2965  bool m_first_update_Debug_NextStatementIndex = true;
2966 
2968  bool m_first_update_Debug_NextCmdOpcode = true;
2969 
2971  bool m_first_update_Debug_StackSize = true;
2972 
2974  bool m_first_update_BreakpointInUse = true;
2975 
2977  bool m_first_update_BreakpointIndex = true;
2978 
2980  bool m_first_update_BreakOnlyOnceOnBreakpoint = true;
2981 
2983  bool m_first_update_BreakBeforeNextLine = true;
2984 
2986  bool m_first_update_PRM_STATEMENT_TIMEOUT_SECS = true;
2987 
2988  private:
2989 
2990  // ----------------------------------------------------------------------
2991  // Last value storage for telemetry channels
2992  // ----------------------------------------------------------------------
2993 
2995  FwEnumStoreType m_last_State = {};
2996 
2998  U64 m_last_SequencesSucceeded = {};
2999 
3001  U64 m_last_SequencesFailed = {};
3002 
3004  U64 m_last_SequencesCancelled = {};
3005 
3007  U64 m_last_StatementsDispatched = {};
3008 
3010  U64 m_last_StatementsFailed = {};
3011 
3013  Svc::Fpy::DirectiveErrorCode m_last_LastDirectiveError = {};
3014 
3016  U64 m_last_DirectiveErrorIndex = {};
3017 
3019  Svc::Fpy::DirectiveId m_last_DirectiveErrorId = {};
3020 
3022  Fw::TlmString m_last_SeqPath = {};
3023 
3025  bool m_last_Debug_ReachedEndOfFile = {};
3026 
3028  bool m_last_Debug_NextStatementReadSuccess = {};
3029 
3031  U8 m_last_Debug_NextStatementOpcode = {};
3032 
3034  U32 m_last_Debug_NextStatementIndex = {};
3035 
3037  FwOpcodeType m_last_Debug_NextCmdOpcode = {};
3038 
3040  Svc::Fpy::StackSizeType m_last_Debug_StackSize = {};
3041 
3043  bool m_last_BreakpointInUse = {};
3044 
3046  U32 m_last_BreakpointIndex = {};
3047 
3049  bool m_last_BreakOnlyOnceOnBreakpoint = {};
3050 
3052  bool m_last_BreakBeforeNextLine = {};
3053 
3055  F32 m_last_PRM_STATEMENT_TIMEOUT_SECS = {};
3056 
3057  private:
3058 
3059  // ----------------------------------------------------------------------
3060  // Parameter validity flags
3061  // ----------------------------------------------------------------------
3062 
3064  Fw::ParamValid m_param_STATEMENT_TIMEOUT_SECS_valid;
3065 
3066  private:
3067 
3068  // ----------------------------------------------------------------------
3069  // Parameter variables
3070  // ----------------------------------------------------------------------
3071 
3078  F32 m_STATEMENT_TIMEOUT_SECS;
3079 
3080  private:
3081 
3082  // ----------------------------------------------------------------------
3083  // State machine instances
3084  // ----------------------------------------------------------------------
3085 
3087  Svc_FpySequencer_SequencerStateMachine m_stateMachine_sequencer;
3088 
3089  private:
3090 
3091  // ----------------------------------------------------------------------
3092  // Mutexes
3093  // ----------------------------------------------------------------------
3094 
3096  Os::Mutex m_paramLock;
3097 
3098  };
3099 
3100 }
3101 
3102 #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.
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)
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 RUN_ARGS_cmdHandler(FwOpcodeType opCode, U32 cmdSeq, const Fw::CmdStringArg &fileName, Svc::FpySequencer_BlockState block, Svc::SeqArgs buffer)=0
Handler for command RUN_ARGS.
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::FpySequencer_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.
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())
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...
Must be called after VALIDATE. Runs the sequence that was validated.
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)
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.
Loads, validates and runs a sequence.
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
void seqDoneOut_out(FwIndexType portNum, FwOpcodeType opCode, U32 cmdSeq, const Fw::CmdResponse &response) const
Invoke output port seqDoneOut.
virtual void directive_storeRelConstOffset_internalInterfaceHandler(const Svc::FpySequencer_StoreRelConstOffsetDirective &directive)=0
Internal interface handler for directive_storeRelConstOffset.
void directive_discard_internalInterfaceInvoke(const Svc::FpySequencer_DiscardDirective &directive)
Internal interface base-class function for directive_discard.
uint8_t U8
8-bit unsigned integer
Definition: BasicTypes.h:53
virtual void directive_noOp_internalInterfaceHandler(const Svc::FpySequencer_NoOpDirective &directive)=0
Internal interface handler for directive_noOp.
void log_ACTIVITY_HI_BreakpointSet(U32 breakpointIdx, bool breakOnce) const
Log event BreakpointSet.
void directive_pushPrm_internalInterfaceInvoke(const Svc::FpySequencer_PushPrmDirective &directive)
Internal interface base-class function for directive_pushPrm.
void sequencer_sendSignal_result_timeOpFailed()
Send signal result_timeOpFailed to state machine sequencer.
void BREAK_cmdHandlerBase(FwOpcodeType opCode, U32 cmdSeq, Fw::CmdArgBuffer &args)
void log_WARNING_HI_FileOpenError(const Fw::StringBase &filePath, I32 errorCode) const
Log event FileOpenError.
void init(FpySequencerComponentBase::SmId smId)
Initialize the state machine.
void set_prmSet_OutputPort(FwIndexType portNum, Fw::InputPrmSetPort *port)
Connect port to prmSet[portNum].
virtual void Svc_FpySequencer_SequencerStateMachine_action_setSequenceBlockState(SmId smId, Svc_FpySequencer_SequencerStateMachine::Signal signal, const Svc::FpySequencer_SequenceExecutionArgs &value)=0
void sequencer_sendSignal_cmd_CANCEL()
Send signal cmd_CANCEL to state machine sequencer.
void sequencer_sendSignal_result_checkStatementTimeout_statementTimeout()
Send signal result_checkStatementTimeout_statementTimeout to state machine sequencer.
static constexpr FwIndexType getNum_cmdResponseOut_OutputPorts()
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
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.
Loads and validates a sequence with arguments.
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.
virtual bool Svc_FpySequencer_SequencerStateMachine_guard_goalStateIs_RUNNING(SmId smId, Svc_FpySequencer_SequencerStateMachine::Signal signal) const =0
void SET_BREAKPOINT_cmdHandlerBase(FwOpcodeType opCode, U32 cmdSeq, Fw::CmdArgBuffer &args)
void directive_loadRel_internalInterfaceInvoke(const Svc::FpySequencer_LoadRelDirective &directive)
Internal interface base-class function for directive_loadRel.
Auto-generated base for FpySequencer component.
static constexpr FwIndexType getNum_logOut_OutputPorts()
void sequencer_sendSignal_cmd_RUN(const Svc::FpySequencer_SequenceExecutionArgs &value)
Send signal cmd_RUN to state machine sequencer.
void log_WARNING_HI_FileWriteError(FwSizeType writeSize, const Fw::StringBase &filePath, I32 errorCode) const
Log event FileWriteError.
virtual void directive_storeAbsConstOffset_internalInterfaceHandler(const Svc::FpySequencer_StoreAbsConstOffsetDirective &directive)=0
Internal interface handler for directive_storeAbsConstOffset.
void checkTimers_handlerBase(FwIndexType portNum, U32 context)
Handler base-class function for input port checkTimers.
static constexpr FwIndexType getNum_prmGet_OutputPorts()
virtual void CANCEL_preMsgHook(FwOpcodeType opCode, U32 cmdSeq)
Pre-message hook for command CANCEL.
void tlmWrite_BreakOnlyOnceOnBreakpoint(bool 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.
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())