F´ Flight Software - C/C++ Documentation
A framework for building embedded system applications to NASA flight quality standards.
FpySequencerComponentAc.hpp
Go to the documentation of this file.
1 // ======================================================================
2 // \title FpySequencerComponentAc.hpp
3 // \author Generated by fpp-to-cpp
4 // \brief hpp file for FpySequencer component base class
5 // ======================================================================
6 
7 #ifndef Svc_FpySequencerComponentAc_HPP
8 #define Svc_FpySequencerComponentAc_HPP
9 
10 #include <atomic>
11 
12 #include "Fw/Cmd/CmdPortAc.hpp"
13 #include "Fw/Cmd/CmdRegPortAc.hpp"
16 #include "Fw/Cmd/CmdString.hpp"
17 #include "Fw/Com/ComPortAc.hpp"
19 #include "Fw/FPrimeBasicTypes.hpp"
20 #include "Fw/Log/LogPortAc.hpp"
21 #include "Fw/Log/LogString.hpp"
22 #if FW_ENABLE_TEXT_LOGGING == 1
23 #include "Fw/Log/LogTextPortAc.hpp"
24 #endif
25 #if !FW_DIRECT_PORT_CALLS
27 #endif
28 #if !FW_DIRECT_PORT_CALLS
30 #endif
31 #include "Fw/Prm/PrmGetPortAc.hpp"
32 #include "Fw/Prm/PrmSetPortAc.hpp"
33 #include "Fw/Prm/PrmString.hpp"
34 #include "Fw/Time/TimePortAc.hpp"
35 #include "Fw/Tlm/TlmGetPortAc.hpp"
36 #include "Fw/Tlm/TlmPortAc.hpp"
37 #include "Fw/Tlm/TlmString.hpp"
39 #include "Os/Mutex.hpp"
77 #include "Svc/Ping/PingPortAc.hpp"
89 
90 namespace Svc {
91 
98  {
99 
100  // ----------------------------------------------------------------------
101  // Friend classes
102  // ----------------------------------------------------------------------
103 
107  friend class FpySequencerTester;
108 
109  protected:
110 
111  // ----------------------------------------------------------------------
112  // Constants
113  // ----------------------------------------------------------------------
114 
116  enum {
118  };
119 
121  enum {
128  };
129 
131  enum {
140  };
141 
143  enum {
150  };
151 
153  enum {
154  OPCODE_RUN = 0x0,
160  OPCODE_SET_BREAKPOINT = 0x6,
162  OPCODE_BREAK = 0x7,
166  OPCODE_CONTINUE = 0x8,
171  OPCODE_STEP = 0xa,
179  };
180 
182  enum {
227  };
228 
230  enum {
253  };
254 
256  enum {
258  PARAMID_SEQ_BASE_DIR = 0x1,
262  };
266 
268  enum class SmId : FwEnumStoreType {
269  sequencer,
270  };
271 
272  protected:
273 
274  // ----------------------------------------------------------------------
275  // Types for internal state machines
276  // ----------------------------------------------------------------------
277 
281  {
282 
283  // ----------------------------------------------------------------------
284  // Friend classes
285  // ----------------------------------------------------------------------
286 
290  friend class FpySequencerTester;
291 
292  public:
293 
296  FpySequencerComponentBase& component
297  );
298 
299  public:
300 
302  void init(
304  );
305 
306  public:
307 
310 
311  private:
312 
314  void action_signalEntered(
315  Signal signal
316  );
317 
319  void action_setSequenceFilePath(
320  Signal signal,
322  );
323 
325  void action_setSequenceBlockState(
326  Signal signal,
328  );
329 
331  void action_setSequenceArguments(
332  Signal signal,
334  );
335 
337  void action_validate(
338  Signal signal
339  );
340 
342  void action_report_seqSucceeded(
343  Signal signal
344  );
345 
347  void action_report_seqCancelled(
348  Signal signal
349  );
350 
352  void action_report_seqFailed(
353  Signal signal
354  );
355 
357  void action_report_seqStarted(
358  Signal signal
359  );
360 
362  void action_setGoalState_RUNNING(
363  Signal signal
364  );
365 
367  void action_setGoalState_VALID(
368  Signal signal
369  );
370 
372  void action_setGoalState_IDLE(
373  Signal signal
374  );
375 
377  void action_sendCmdResponse_OK(
378  Signal signal
379  );
380 
382  void action_sendCmdResponse_EXECUTION_ERROR(
383  Signal signal
384  );
385 
387  void action_clearSequenceFile(
388  Signal signal
389  );
390 
392  void action_clearBreakpoint(
393  Signal signal
394  );
395 
397  void action_clearSequenceArguments(
398  Signal signal
399  );
400 
402  void action_checkShouldWake(
403  Signal signal
404  );
405 
407  void action_dispatchStatement(
408  Signal signal
409  );
410 
412  void action_resetRuntime(
413  Signal signal
414  );
415 
417  void action_checkStatementTimeout(
418  Signal signal
419  );
420 
422  void action_incrementSequenceCounter(
423  Signal signal
424  );
425 
427  void action_pushArgsToStack(
428  Signal signal
429  );
430 
432  void action_report_seqBroken(
433  Signal signal
434  );
435 
437  void action_setBreakpoint(
438  Signal signal,
440  );
441 
443  void action_setBreakBeforeNextLine(
444  Signal signal
445  );
446 
448  void action_clearBreakBeforeNextLine(
449  Signal signal
450  );
451 
452  private:
453 
455  bool guard_goalStateIs_RUNNING(
456  Signal signal
457  ) const;
458 
460  bool guard_shouldBreak(
461  Signal signal
462  ) const;
463 
465  bool guard_breakOnce(
466  Signal signal
467  ) const;
468 
469  private:
470 
472  FpySequencerComponentBase& m_component;
473 
474  };
475 
476  public:
477 
478  // ----------------------------------------------------------------------
479  // Component initialization
480  // ----------------------------------------------------------------------
481 
483  void init(
484  FwSizeType queueDepth,
485  FwEnumStoreType instance = 0
486  );
487 
488 #if !FW_DIRECT_PORT_CALLS
489 
490  public:
491 
492  // ----------------------------------------------------------------------
493  // Getters for special input ports
494  // ----------------------------------------------------------------------
495 
500  FwIndexType portNum
501  );
502 
503 #endif
504 
505 #if !FW_DIRECT_PORT_CALLS
506 
507  public:
508 
509  // ----------------------------------------------------------------------
510  // Getters for typed input ports
511  // ----------------------------------------------------------------------
512 
517  FwIndexType portNum
518  );
519 
524  FwIndexType portNum
525  );
526 
531  FwIndexType portNum
532  );
533 
538  FwIndexType portNum
539  );
540 
545  FwIndexType portNum
546  );
547 
552  FwIndexType portNum
553  );
554 
555 #endif
556 
557 #if !FW_DIRECT_PORT_CALLS
558 
559  public:
560 
561  // ----------------------------------------------------------------------
562  // Connect input ports to special output ports
563  // ----------------------------------------------------------------------
564 
567  FwIndexType portNum,
568  Fw::InputCmdRegPort* port
569  );
570 
573  FwIndexType portNum,
575  );
576 
579  FwIndexType portNum,
580  Fw::InputLogPort* port
581  );
582 
583 #if FW_ENABLE_TEXT_LOGGING == 1
584 
586  void set_logTextOut_OutputPort(
587  FwIndexType portNum,
588  Fw::InputLogTextPort* port
589  );
590 
591 #endif
592 
595  FwIndexType portNum,
596  Fw::InputPrmGetPort* port
597  );
598 
601  FwIndexType portNum,
602  Fw::InputPrmSetPort* port
603  );
604 
607  FwIndexType portNum,
608  Fw::InputTimePort* port
609  );
610 
613  FwIndexType portNum,
614  Fw::InputTlmPort* port
615  );
616 
617 #endif
618 
619 #if !FW_DIRECT_PORT_CALLS
620 
621  public:
622 
623  // ----------------------------------------------------------------------
624  // Connect typed input ports to typed output ports
625  // ----------------------------------------------------------------------
626 
629  FwIndexType portNum,
630  Fw::InputComPort* port
631  );
632 
635  FwIndexType portNum,
636  Fw::InputPrmGetPort* port
637  );
638 
641  FwIndexType portNum,
642  Fw::InputTlmGetPort* port
643  );
644 
647  FwIndexType portNum,
648  Svc::InputPingPort* port
649  );
650 
653  FwIndexType portNum,
655  );
656 
659  FwIndexType portNum,
661  );
662 
663 #endif
664 
665 #if !FW_DIRECT_PORT_CALLS && FW_PORT_SERIALIZATION
666 
667  public:
668 
669  // ----------------------------------------------------------------------
670  // Connect serial input ports to special output ports
671  // ----------------------------------------------------------------------
672 
675  FwIndexType portNum,
676  Fw::InputSerializePort* port
677  );
678 
681  FwIndexType portNum,
682  Fw::InputSerializePort* port
683  );
684 
687  FwIndexType portNum,
688  Fw::InputSerializePort* port
689  );
690 
691 #if FW_ENABLE_TEXT_LOGGING == 1
692 
694  void set_logTextOut_OutputPort(
695  FwIndexType portNum,
696  Fw::InputSerializePort* port
697  );
698 
699 #endif
700 
703  FwIndexType portNum,
704  Fw::InputSerializePort* port
705  );
706 
709  FwIndexType portNum,
710  Fw::InputSerializePort* port
711  );
712 
715  FwIndexType portNum,
716  Fw::InputSerializePort* port
717  );
718 
719 #endif
720 
721 #if !FW_DIRECT_PORT_CALLS && FW_PORT_SERIALIZATION
722 
723  public:
724 
725  // ----------------------------------------------------------------------
726  // Connect serial input ports to typed output ports
727  // ----------------------------------------------------------------------
728 
731  FwIndexType portNum,
732  Fw::InputSerializePort* port
733  );
734 
737  FwIndexType portNum,
738  Fw::InputSerializePort* port
739  );
740 
743  FwIndexType portNum,
744  Fw::InputSerializePort* port
745  );
746 
749  FwIndexType portNum,
750  Fw::InputSerializePort* port
751  );
752 
753 #endif
754 
755  public:
756 
757  // ----------------------------------------------------------------------
758  // Command registration
759  // ----------------------------------------------------------------------
760 
764  void regCommands();
765 
766  public:
767 
768  // ----------------------------------------------------------------------
769  // Parameter loading
770  // ----------------------------------------------------------------------
771 
775  void loadParameters();
776 
777  protected:
778 
779  // ----------------------------------------------------------------------
780  // Component construction and destruction
781  // ----------------------------------------------------------------------
782 
785  const char* compName = ""
786  );
787 
789  virtual ~FpySequencerComponentBase();
790 
791  protected:
792 
793  // ----------------------------------------------------------------------
794  // Getters for numbers of special input ports
795  // ----------------------------------------------------------------------
796 
801  return NUM_CMDIN_INPUT_PORTS;
802  }
803 
804  protected:
805 
806  // ----------------------------------------------------------------------
807  // Getters for numbers of typed input ports
808  // ----------------------------------------------------------------------
809 
815  }
816 
822  }
823 
828  return NUM_PINGIN_INPUT_PORTS;
829  }
830 
836  }
837 
843  }
844 
850  }
851 
852  protected:
853 
854  // ----------------------------------------------------------------------
855  // Getters for numbers of special output ports
856  // ----------------------------------------------------------------------
857 
863  }
864 
870  }
871 
877  }
878 
879 #if FW_ENABLE_TEXT_LOGGING == 1
880 
884  static constexpr FwIndexType getNum_logTextOut_OutputPorts() {
886  }
887 
888 #endif
889 
895  }
896 
902  }
903 
909  }
910 
916  }
917 
918  protected:
919 
920  // ----------------------------------------------------------------------
921  // Getters for numbers of typed output ports
922  // ----------------------------------------------------------------------
923 
929  }
930 
936  }
937 
943  }
944 
950  }
951 
957  }
958 
964  }
965 
966  protected:
967 
968  // ----------------------------------------------------------------------
969  // Connection status queries for special output ports
970  // ----------------------------------------------------------------------
971 
976  FwIndexType portNum
977  ) const;
978 
983  FwIndexType portNum
984  ) const;
985 
990  FwIndexType portNum
991  ) const;
992 
993 #if FW_ENABLE_TEXT_LOGGING == 1
994 
998  bool isConnected_logTextOut_OutputPort(
999  FwIndexType portNum
1000  ) const;
1001 
1002 #endif
1003 
1008  FwIndexType portNum
1009  ) const;
1010 
1015  FwIndexType portNum
1016  ) const;
1017 
1022  FwIndexType portNum
1023  ) const;
1024 
1029  FwIndexType portNum
1030  ) const;
1031 
1032  protected:
1033 
1034  // ----------------------------------------------------------------------
1035  // Connection status queries for typed output ports
1036  // ----------------------------------------------------------------------
1037 
1042  FwIndexType portNum
1043  ) const;
1044 
1049  FwIndexType portNum
1050  ) const;
1051 
1056  FwIndexType portNum
1057  ) const;
1058 
1063  FwIndexType portNum
1064  ) const;
1065 
1070  FwIndexType portNum
1071  ) const;
1072 
1077  FwIndexType portNum
1078  ) const;
1079 
1080 #if FW_DIRECT_PORT_CALLS
1081  public:
1082 #else
1083  protected:
1084 #endif
1085 
1086  // ----------------------------------------------------------------------
1087  // Port handler base-class functions for special input ports
1088  //
1089  // Call these functions directly to bypass the corresponding ports
1090  // ----------------------------------------------------------------------
1091 
1093  void cmdIn_handlerBase(
1094  FwIndexType portNum,
1095  FwOpcodeType opCode,
1096  U32 cmdSeq,
1097  Fw::CmdArgBuffer& args
1098  );
1099 
1100  protected:
1101 
1102  // ----------------------------------------------------------------------
1103  // Handlers to implement for typed input ports
1104  // ----------------------------------------------------------------------
1105 
1107  virtual void checkTimers_handler(
1108  FwIndexType portNum,
1109  U32 context
1110  ) = 0;
1111 
1113  virtual void cmdResponseIn_handler(
1114  FwIndexType portNum,
1115  FwOpcodeType opCode,
1116  U32 cmdSeq,
1117  const Fw::CmdResponse& response
1118  ) = 0;
1119 
1121  virtual void pingIn_handler(
1122  FwIndexType portNum,
1123  U32 key
1124  ) = 0;
1125 
1127  virtual void seqCancelIn_handler(
1128  FwIndexType portNum
1129  ) = 0;
1130 
1132  virtual void seqRunIn_handler(
1133  FwIndexType portNum,
1134  const Fw::StringBase& filename,
1135  const Svc::SeqArgs& args
1136  ) = 0;
1137 
1139  virtual void tlmWrite_handler(
1140  FwIndexType portNum,
1141  U32 context
1142  ) = 0;
1143 
1144 #if FW_DIRECT_PORT_CALLS
1145  public:
1146 #else
1147  protected:
1148 #endif
1149 
1150  // ----------------------------------------------------------------------
1151  // Port handler base-class functions for typed input ports
1152  //
1153  // Call these functions directly to bypass the corresponding ports
1154  // ----------------------------------------------------------------------
1155 
1158  FwIndexType portNum,
1159  U32 context
1160  );
1161 
1164  FwIndexType portNum,
1165  FwOpcodeType opCode,
1166  U32 cmdSeq,
1167  const Fw::CmdResponse& response
1168  );
1169 
1171  void pingIn_handlerBase(
1172  FwIndexType portNum,
1173  U32 key
1174  );
1175 
1178  FwIndexType portNum
1179  );
1180 
1182  void seqRunIn_handlerBase(
1183  FwIndexType portNum,
1184  const Fw::StringBase& filename,
1185  const Svc::SeqArgs& args
1186  );
1187 
1189  void tlmWrite_handlerBase(
1190  FwIndexType portNum,
1191  U32 context
1192  );
1193 
1194  protected:
1195 
1196  // ----------------------------------------------------------------------
1197  // Pre-message hooks for typed async input ports
1198  //
1199  // Each of these functions is invoked just before processing a message
1200  // on the corresponding port. By default, they do nothing. You can
1201  // override them to provide specific pre-message behavior.
1202  // ----------------------------------------------------------------------
1203 
1205  virtual void checkTimers_preMsgHook(
1206  FwIndexType portNum,
1207  U32 context
1208  );
1209 
1211  virtual void cmdResponseIn_preMsgHook(
1212  FwIndexType portNum,
1213  FwOpcodeType opCode,
1214  U32 cmdSeq,
1215  const Fw::CmdResponse& response
1216  );
1217 
1219  virtual void pingIn_preMsgHook(
1220  FwIndexType portNum,
1221  U32 key
1222  );
1223 
1225  virtual void seqCancelIn_preMsgHook(
1226  FwIndexType portNum
1227  );
1228 
1230  virtual void seqRunIn_preMsgHook(
1231  FwIndexType portNum,
1232  const Fw::StringBase& filename,
1233  const Svc::SeqArgs& args
1234  );
1235 
1237  virtual void tlmWrite_preMsgHook(
1238  FwIndexType portNum,
1239  U32 context
1240  );
1241 
1242  protected:
1243 
1244  // ----------------------------------------------------------------------
1245  // Invocation functions for typed output ports
1246  // ----------------------------------------------------------------------
1247 
1249  void cmdOut_out(
1250  FwIndexType portNum,
1251  Fw::ComBuffer& data,
1252  U32 context
1253  ) const;
1254 
1257  FwIndexType portNum,
1258  FwPrmIdType id,
1259  Fw::ParamBuffer& val
1260  ) const;
1262 
1265  FwIndexType portNum,
1266  FwChanIdType id,
1267  Fw::Time& timeTag,
1268  Fw::TlmBuffer& val
1269  ) const;
1272 
1274  void pingOut_out(
1275  FwIndexType portNum,
1276  U32 key
1277  ) const;
1278 
1280  void seqDoneOut_out(
1281  FwIndexType portNum,
1282  FwOpcodeType opCode,
1283  U32 cmdSeq,
1284  const Fw::CmdResponse& response
1285  ) const;
1286 
1288  void seqStartOut_out(
1289  FwIndexType portNum,
1290  const Fw::StringBase& filename,
1291  const Svc::SeqArgs& args
1292  ) const;
1293 
1294  protected:
1295 
1296  // ----------------------------------------------------------------------
1297  // Internal interface handlers
1298  // ----------------------------------------------------------------------
1299 
1302 
1305 
1308 
1311 
1314 
1317 
1320 
1322  virtual void directive_if_internalInterfaceHandler(const Svc::FpySequencer_IfDirective& directive) = 0;
1323 
1326 
1329 
1332 
1335 
1338 
1341 
1344 
1347 
1350 
1353 
1356 
1359 
1362 
1365 
1368 
1371 
1374 
1377 
1380 
1383 
1384  protected:
1385 
1386  // ----------------------------------------------------------------------
1387  // Internal interface base-class functions
1388  // ----------------------------------------------------------------------
1389 
1392 
1395 
1398 
1401 
1404 
1407 
1410 
1413 
1416 
1419 
1422 
1425 
1428 
1431 
1434 
1437 
1440 
1443 
1446 
1449 
1452 
1455 
1458 
1461 
1464 
1467 
1470 
1473 
1474  protected:
1475 
1476  // ----------------------------------------------------------------------
1477  // State getter functions
1478  // ----------------------------------------------------------------------
1479 
1482 
1483  protected:
1484 
1485  // ----------------------------------------------------------------------
1486  // Signal send functions
1487  // ----------------------------------------------------------------------
1488 
1492  );
1493 
1497  );
1498 
1502  );
1503 
1506 
1509  const Svc::FpySequencer_BreakpointArgs& value
1510  );
1511 
1514 
1517 
1520 
1523 
1526 
1529 
1532 
1535 
1538 
1541 
1544 
1547 
1550 
1553 
1556 
1559 
1562 
1565 
1568 
1571 
1574 
1575  protected:
1576 
1577  // ----------------------------------------------------------------------
1578  // Functions to implement for internal state machine actions
1579  // ----------------------------------------------------------------------
1580 
1585  SmId smId,
1587  ) = 0;
1588 
1593  SmId smId,
1596  ) = 0;
1597 
1602  SmId smId,
1605  ) = 0;
1606 
1611  SmId smId,
1614  ) = 0;
1615 
1620  SmId smId,
1622  ) = 0;
1623 
1628  SmId smId,
1630  ) = 0;
1631 
1636  SmId smId,
1638  ) = 0;
1639 
1644  SmId smId,
1646  ) = 0;
1647 
1652  SmId smId,
1654  ) = 0;
1655 
1660  SmId smId,
1662  ) = 0;
1663 
1668  SmId smId,
1670  ) = 0;
1671 
1676  SmId smId,
1678  ) = 0;
1679 
1684  SmId smId,
1686  ) = 0;
1687 
1692  SmId smId,
1694  ) = 0;
1695 
1700  SmId smId,
1702  ) = 0;
1703 
1708  SmId smId,
1710  ) = 0;
1711 
1716  SmId smId,
1718  ) = 0;
1719 
1724  SmId smId,
1726  ) = 0;
1727 
1732  SmId smId,
1734  ) = 0;
1735 
1740  SmId smId,
1742  ) = 0;
1743 
1748  SmId smId,
1750  ) = 0;
1751 
1756  SmId smId,
1758  ) = 0;
1759 
1764  SmId smId,
1766  ) = 0;
1767 
1772  SmId smId,
1774  ) = 0;
1775 
1780  SmId smId,
1782  const Svc::FpySequencer_BreakpointArgs& value
1783  ) = 0;
1784 
1789  SmId smId,
1791  ) = 0;
1792 
1797  SmId smId,
1799  ) = 0;
1800 
1801  protected:
1802 
1803  // ----------------------------------------------------------------------
1804  // Functions to implement for internal state machine guards
1805  // ----------------------------------------------------------------------
1806 
1811  SmId smId,
1813  ) const = 0;
1814 
1820  SmId smId,
1822  ) const = 0;
1823 
1828  SmId smId,
1830  ) const = 0;
1831 
1832  protected:
1833 
1834  // ----------------------------------------------------------------------
1835  // Command response
1836  // ----------------------------------------------------------------------
1837 
1839  void cmdResponse_out(
1840  FwOpcodeType opCode,
1841  U32 cmdSeq,
1842  Fw::CmdResponse response
1843  );
1844 
1845  protected:
1846 
1847  // ----------------------------------------------------------------------
1848  // Command handlers to implement
1849  // ----------------------------------------------------------------------
1850 
1854  virtual void RUN_cmdHandler(
1855  FwOpcodeType opCode,
1856  U32 cmdSeq,
1857  const Fw::CmdStringArg& fileName,
1858  Svc::BlockState block
1859  ) = 0;
1860 
1862  virtual void RUN_ARGS_cmdHandler(
1863  FwOpcodeType opCode,
1864  U32 cmdSeq,
1865  const Fw::CmdStringArg& fileName,
1866  Svc::BlockState block,
1867  Svc::SeqArgs buffer
1868  ) = 0;
1869 
1873  virtual void VALIDATE_cmdHandler(
1874  FwOpcodeType opCode,
1875  U32 cmdSeq,
1876  const Fw::CmdStringArg& fileName
1877  ) = 0;
1878 
1882  virtual void VALIDATE_ARGS_cmdHandler(
1883  FwOpcodeType opCode,
1884  U32 cmdSeq,
1885  const Fw::CmdStringArg& fileName,
1886  Svc::SeqArgs buffer
1887  ) = 0;
1888 
1892  virtual void RUN_VALIDATED_cmdHandler(
1893  FwOpcodeType opCode,
1894  U32 cmdSeq,
1895  Svc::BlockState block
1896  ) = 0;
1897 
1902  virtual void CANCEL_cmdHandler(
1903  FwOpcodeType opCode,
1904  U32 cmdSeq
1905  ) = 0;
1906 
1913  virtual void SET_BREAKPOINT_cmdHandler(
1914  FwOpcodeType opCode,
1915  U32 cmdSeq,
1916  U32 stmtIdx,
1917  bool breakOnce
1918  ) = 0;
1919 
1925  virtual void BREAK_cmdHandler(
1926  FwOpcodeType opCode,
1927  U32 cmdSeq
1928  ) = 0;
1929 
1934  virtual void CONTINUE_cmdHandler(
1935  FwOpcodeType opCode,
1936  U32 cmdSeq
1937  ) = 0;
1938 
1943  virtual void CLEAR_BREAKPOINT_cmdHandler(
1944  FwOpcodeType opCode,
1945  U32 cmdSeq
1946  ) = 0;
1947 
1952  virtual void STEP_cmdHandler(
1953  FwOpcodeType opCode,
1954  U32 cmdSeq
1955  ) = 0;
1956 
1960  virtual void DUMP_STACK_TO_FILE_cmdHandler(
1961  FwOpcodeType opCode,
1962  U32 cmdSeq,
1963  const Fw::CmdStringArg& fileName
1964  ) = 0;
1965 
1966  protected:
1967 
1968  // ----------------------------------------------------------------------
1969  // Command handler base-class functions
1970  //
1971  // Call these functions directly to bypass the command input port
1972  // ----------------------------------------------------------------------
1973 
1977  void RUN_cmdHandlerBase(
1978  FwOpcodeType opCode,
1979  U32 cmdSeq,
1980  Fw::CmdArgBuffer& args
1981  );
1982 
1985  FwOpcodeType opCode,
1986  U32 cmdSeq,
1987  Fw::CmdArgBuffer& args
1988  );
1989 
1994  FwOpcodeType opCode,
1995  U32 cmdSeq,
1996  Fw::CmdArgBuffer& args
1997  );
1998 
2003  FwOpcodeType opCode,
2004  U32 cmdSeq,
2005  Fw::CmdArgBuffer& args
2006  );
2007 
2012  FwOpcodeType opCode,
2013  U32 cmdSeq,
2014  Fw::CmdArgBuffer& args
2015  );
2016 
2021  void CANCEL_cmdHandlerBase(
2022  FwOpcodeType opCode,
2023  U32 cmdSeq,
2024  Fw::CmdArgBuffer& args
2025  );
2026 
2034  FwOpcodeType opCode,
2035  U32 cmdSeq,
2036  Fw::CmdArgBuffer& args
2037  );
2038 
2044  void BREAK_cmdHandlerBase(
2045  FwOpcodeType opCode,
2046  U32 cmdSeq,
2047  Fw::CmdArgBuffer& args
2048  );
2049 
2055  FwOpcodeType opCode,
2056  U32 cmdSeq,
2057  Fw::CmdArgBuffer& args
2058  );
2059 
2065  FwOpcodeType opCode,
2066  U32 cmdSeq,
2067  Fw::CmdArgBuffer& args
2068  );
2069 
2074  void STEP_cmdHandlerBase(
2075  FwOpcodeType opCode,
2076  U32 cmdSeq,
2077  Fw::CmdArgBuffer& args
2078  );
2079 
2084  FwOpcodeType opCode,
2085  U32 cmdSeq,
2086  Fw::CmdArgBuffer& args
2087  );
2088 
2089  protected:
2090 
2091  // ----------------------------------------------------------------------
2092  // Pre-message hooks for async commands
2093  //
2094  // Each of these functions is invoked just before processing the
2095  // corresponding command. By default they do nothing. You can
2096  // override them to provide specific pre-command behavior.
2097  // ----------------------------------------------------------------------
2098 
2100  virtual void RUN_preMsgHook(
2101  FwOpcodeType opCode,
2102  U32 cmdSeq
2103  );
2104 
2106  virtual void RUN_ARGS_preMsgHook(
2107  FwOpcodeType opCode,
2108  U32 cmdSeq
2109  );
2110 
2112  virtual void VALIDATE_preMsgHook(
2113  FwOpcodeType opCode,
2114  U32 cmdSeq
2115  );
2116 
2118  virtual void VALIDATE_ARGS_preMsgHook(
2119  FwOpcodeType opCode,
2120  U32 cmdSeq
2121  );
2122 
2124  virtual void RUN_VALIDATED_preMsgHook(
2125  FwOpcodeType opCode,
2126  U32 cmdSeq
2127  );
2128 
2130  virtual void CANCEL_preMsgHook(
2131  FwOpcodeType opCode,
2132  U32 cmdSeq
2133  );
2134 
2136  virtual void SET_BREAKPOINT_preMsgHook(
2137  FwOpcodeType opCode,
2138  U32 cmdSeq
2139  );
2140 
2142  virtual void BREAK_preMsgHook(
2143  FwOpcodeType opCode,
2144  U32 cmdSeq
2145  );
2146 
2148  virtual void CONTINUE_preMsgHook(
2149  FwOpcodeType opCode,
2150  U32 cmdSeq
2151  );
2152 
2154  virtual void CLEAR_BREAKPOINT_preMsgHook(
2155  FwOpcodeType opCode,
2156  U32 cmdSeq
2157  );
2158 
2160  virtual void STEP_preMsgHook(
2161  FwOpcodeType opCode,
2162  U32 cmdSeq
2163  );
2164 
2166  virtual void DUMP_STACK_TO_FILE_preMsgHook(
2167  FwOpcodeType opCode,
2168  U32 cmdSeq
2169  );
2170 
2171  protected:
2172 
2173  // ----------------------------------------------------------------------
2174  // Event logging functions
2175  // ----------------------------------------------------------------------
2176 
2178  void log_WARNING_HI_InvalidCommand(I32 state) const;
2179 
2181  void log_WARNING_HI_InvalidSeqRunCall(I32 state) const;
2182 
2184  void log_WARNING_HI_InvalidSeqCancelCall(I32 state) const;
2185 
2188  const Fw::StringBase& filePath,
2189  I32 errorCode
2190  ) const;
2191 
2194  FwSizeType writeSize,
2195  const Fw::StringBase& filePath,
2196  I32 errorCode
2197  ) const;
2198 
2202  const Fw::StringBase& filePath,
2203  I32 errorCode
2204  ) const;
2205 
2209  const Fw::StringBase& filePath
2210  ) const;
2211 
2215  const Fw::StringBase& filePath,
2216  I32 errorCode,
2217  U64 buffLeft,
2218  U64 buffLength
2219  ) const;
2220 
2223  U8 expected,
2224  U8 actual
2225  ) const;
2226 
2229  U32 expected,
2230  U32 actual
2231  ) const;
2232 
2234  void log_WARNING_HI_ExtraBytesInSequence(FwSizeType remaining) const;
2235 
2238  U64 bufferSize,
2239  const Fw::StringBase& filePath
2240  ) const;
2241 
2244  const Fw::StringBase& filePath,
2245  I32 errorCode
2246  ) const;
2247 
2250  const Fw::StringBase& baseDir,
2251  const Fw::StringBase& fileName
2252  ) const;
2253 
2256  FwOpcodeType opCode,
2257  U32 stmtIdx,
2258  const Fw::StringBase& filePath,
2259  Fw::CmdResponse response
2260  ) const;
2261 
2263  void log_ACTIVITY_HI_SequenceDone(const Fw::StringBase& filePath) const;
2264 
2266  void log_ACTIVITY_HI_SequenceCancelled(const Fw::StringBase& filePath) const;
2267 
2270  const Fw::StringBase& filePath,
2271  U8 errorCode
2272  ) const;
2273 
2276  U8 opcode,
2277  U32 stmtIdx,
2278  const Fw::StringBase& filePath
2279  ) const;
2280 
2283  I32 state,
2284  FwOpcodeType opcode,
2285  Fw::CmdResponse response
2286  ) const;
2287 
2290  FwOpcodeType opcode,
2291  Fw::CmdResponse response,
2292  U16 oldSequenceIdx,
2293  U16 currentSequenceIdx
2294  ) const;
2295 
2298  FwOpcodeType opcode,
2299  Fw::CmdResponse response
2300  ) const;
2301 
2304  FwOpcodeType opcode,
2305  Fw::CmdResponse response,
2306  U8 expectedDirectiveOpcode
2307  ) const;
2308 
2311  FwOpcodeType opcode,
2312  Fw::CmdResponse response,
2313  FwOpcodeType expectedOpcode
2314  ) const;
2315 
2318  FwOpcodeType opcode,
2319  Fw::CmdResponse response,
2320  U16 actualCmdIdx,
2321  U16 expectedCmdIdx
2322  ) const;
2323 
2326  U8 opcode,
2327  U32 stmtIdx,
2328  I32 errorCode,
2329  U64 buffLeft,
2330  U64 buffLength
2331  ) const;
2332 
2335  I32 internalTimeBase,
2336  I32 otherTimeBase
2337  ) const;
2338 
2341  I32 internalTimeContext,
2342  I32 otherTimeContext
2343  ) const;
2344 
2347  FwOpcodeType opCode,
2348  U32 stmtIdx,
2349  const Fw::StringBase& filePath
2350  ) const;
2351 
2354  U8 opCode,
2355  U32 stmtIdx,
2356  const Fw::StringBase& filePath
2357  ) const;
2358 
2361  U8 count,
2362  U8 max
2363  ) const;
2364 
2367  U16 count,
2368  U16 max
2369  ) const;
2370 
2373  Svc::Fpy::StackSizeType expected,
2374  FwSizeType actual,
2375  const Fw::StringBase& filePath
2376  ) const;
2377 
2380 
2382  void log_ACTIVITY_HI_SequencePaused(U32 stmtIdx) const;
2383 
2386  U32 breakpointIdx,
2387  bool breakOnce
2388  ) const;
2389 
2391  void log_ACTIVITY_HI_BreakpointCleared() const;
2392 
2394  void log_FATAL_LogFatal(
2395  const Fw::StringBase& filePath,
2396  const Fw::StringBase& message
2397  ) const;
2398 
2401  const Fw::StringBase& filePath,
2402  const Fw::StringBase& message
2403  ) const;
2404 
2407  const Fw::StringBase& filePath,
2408  const Fw::StringBase& message
2409  ) const;
2410 
2413  const Fw::StringBase& filePath,
2414  const Fw::StringBase& message
2415  ) const;
2416 
2419  const Fw::StringBase& filePath,
2420  const Fw::StringBase& message
2421  ) const;
2422 
2425  const Fw::StringBase& filePath,
2426  const Fw::StringBase& message
2427  ) const;
2428 
2431  const Fw::StringBase& filePath,
2432  const Fw::StringBase& message
2433  ) const;
2434 
2435  protected:
2436 
2437  // ----------------------------------------------------------------------
2438  // Telemetry serialized write
2439  // ----------------------------------------------------------------------
2440 
2445  void tlmWrite(
2446  FwChanIdType id,
2447  Fw::TlmBuffer& _tlmBuff,
2448  Fw::Time _tlmTime = Fw::Time()
2449  ) const;
2450 
2451  protected:
2452 
2453  // ----------------------------------------------------------------------
2454  // Telemetry write functions
2455  // ----------------------------------------------------------------------
2456 
2460  void tlmWrite_State(
2461  FwEnumStoreType arg,
2462  Fw::Time _tlmTime = Fw::Time()
2463  );
2464 
2469  U64 arg,
2470  Fw::Time _tlmTime = Fw::Time()
2471  );
2472 
2477  U64 arg,
2478  Fw::Time _tlmTime = Fw::Time()
2479  );
2480 
2485  U64 arg,
2486  Fw::Time _tlmTime = Fw::Time()
2487  );
2488 
2495  U64 arg,
2496  Fw::Time _tlmTime = Fw::Time()
2497  );
2498 
2503  U64 arg,
2504  Fw::Time _tlmTime = Fw::Time()
2505  );
2506 
2511  const Svc::Fpy::DirectiveErrorCode& arg,
2512  Fw::Time _tlmTime = Fw::Time()
2513  );
2514 
2519  U64 arg,
2520  Fw::Time _tlmTime = Fw::Time()
2521  );
2522 
2527  const Svc::Fpy::DirectiveId& arg,
2528  Fw::Time _tlmTime = Fw::Time()
2529  );
2530 
2534  void tlmWrite_SeqPath(
2535  const Fw::StringBase& arg,
2536  Fw::Time _tlmTime = Fw::Time()
2537  );
2538 
2543  bool arg,
2544  Fw::Time _tlmTime = Fw::Time()
2545  );
2546 
2551  bool arg,
2552  Fw::Time _tlmTime = Fw::Time()
2553  );
2554 
2559  U8 arg,
2560  Fw::Time _tlmTime = Fw::Time()
2561  );
2562 
2567  U32 arg,
2568  Fw::Time _tlmTime = Fw::Time()
2569  );
2570 
2575  FwOpcodeType arg,
2576  Fw::Time _tlmTime = Fw::Time()
2577  );
2578 
2584  Fw::Time _tlmTime = Fw::Time()
2585  );
2586 
2591  bool arg,
2592  Fw::Time _tlmTime = Fw::Time()
2593  );
2594 
2600  U32 arg,
2601  Fw::Time _tlmTime = Fw::Time()
2602  );
2603 
2608  bool arg,
2609  Fw::Time _tlmTime = Fw::Time()
2610  );
2611 
2618  bool arg,
2619  Fw::Time _tlmTime = Fw::Time()
2620  );
2621 
2626  F32 arg,
2627  Fw::Time _tlmTime = Fw::Time()
2628  );
2629 
2634  const Fw::StringBase& arg,
2635  Fw::Time _tlmTime = Fw::Time()
2636  );
2637 
2638  protected:
2639 
2640  // ----------------------------------------------------------------------
2641  // Parameter hook functions
2642  // ----------------------------------------------------------------------
2643 
2647  virtual void parameterUpdated(
2648  FwPrmIdType id
2649  );
2650 
2654  virtual void parametersLoaded();
2655 
2656  protected:
2657 
2658  // ----------------------------------------------------------------------
2659  // Parameter get functions
2660  // ----------------------------------------------------------------------
2661 
2671  Fw::ParamValid& valid
2672  );
2673 
2683  Fw::ParamValid& valid
2684  );
2685 
2686  protected:
2687 
2688  // ----------------------------------------------------------------------
2689  // Time
2690  // ----------------------------------------------------------------------
2691 
2695  Fw::Time getTime() const;
2696 
2697  private:
2698 
2699  // ----------------------------------------------------------------------
2700  // Message dispatch functions
2701  // ----------------------------------------------------------------------
2702 
2704  virtual MsgDispatchStatus doDispatch();
2705 
2706  private:
2707 
2708  // ----------------------------------------------------------------------
2709  // Calls for messages received on special input ports
2710  // ----------------------------------------------------------------------
2711 
2713  static void m_p_cmdIn_in(
2714  Fw::PassiveComponentBase* callComp,
2715  FwIndexType portNum,
2716  FwOpcodeType opCode,
2717  U32 cmdSeq,
2718  Fw::CmdArgBuffer& args
2719  );
2720 
2721  private:
2722 
2723  // ----------------------------------------------------------------------
2724  // Calls for messages received on typed input ports
2725  // ----------------------------------------------------------------------
2726 
2728  static void m_p_checkTimers_in(
2729  Fw::PassiveComponentBase* callComp,
2730  FwIndexType portNum,
2731  U32 context
2732  );
2733 
2735  static void m_p_cmdResponseIn_in(
2736  Fw::PassiveComponentBase* callComp,
2737  FwIndexType portNum,
2738  FwOpcodeType opCode,
2739  U32 cmdSeq,
2740  const Fw::CmdResponse& response
2741  );
2742 
2744  static void m_p_pingIn_in(
2745  Fw::PassiveComponentBase* callComp,
2746  FwIndexType portNum,
2747  U32 key
2748  );
2749 
2751  static void m_p_seqCancelIn_in(
2752  Fw::PassiveComponentBase* callComp,
2753  FwIndexType portNum
2754  );
2755 
2757  static void m_p_seqRunIn_in(
2758  Fw::PassiveComponentBase* callComp,
2759  FwIndexType portNum,
2760  const Fw::StringBase& filename,
2761  const Svc::SeqArgs& args
2762  );
2763 
2765  static void m_p_tlmWrite_in(
2766  Fw::PassiveComponentBase* callComp,
2767  FwIndexType portNum,
2768  U32 context
2769  );
2770 
2771  private:
2772 
2773  // ----------------------------------------------------------------------
2774  // Invocation functions for special output ports
2775  // ----------------------------------------------------------------------
2776 
2778  void cmdRegOut_out(
2779  FwIndexType portNum,
2780  FwOpcodeType opCode
2781  ) const;
2782 
2784  void cmdResponseOut_out(
2785  FwIndexType portNum,
2786  FwOpcodeType opCode,
2787  U32 cmdSeq,
2788  const Fw::CmdResponse& response
2789  ) const;
2790 
2792  void logOut_out(
2793  FwIndexType portNum,
2794  FwEventIdType id,
2795  Fw::Time& timeTag,
2796  const Fw::LogSeverity& severity,
2797  Fw::LogBuffer& args
2798  ) const;
2799 
2800 #if FW_ENABLE_TEXT_LOGGING
2801 
2803  void logTextOut_out(
2804  FwIndexType portNum,
2805  FwEventIdType id,
2806  Fw::Time& timeTag,
2807  const Fw::LogSeverity& severity,
2808  Fw::TextLogString& text
2809  ) const;
2810 
2811 #endif
2812 
2814  Fw::ParamValid prmGet_out(
2815  FwIndexType portNum,
2816  FwPrmIdType id,
2817  Fw::ParamBuffer& val
2818  ) const;
2820 
2822  void prmSet_out(
2823  FwIndexType portNum,
2824  FwPrmIdType id,
2825  Fw::ParamBuffer& val
2826  ) const;
2827 
2829  void timeCaller_out(
2830  FwIndexType portNum,
2831  Fw::Time& time
2832  ) const;
2833 
2835  void tlmOut_out(
2836  FwIndexType portNum,
2837  FwChanIdType id,
2838  Fw::Time& timeTag,
2839  Fw::TlmBuffer& val
2840  ) const;
2841 
2842  private:
2843 
2844  // ----------------------------------------------------------------------
2845  // Send signal helper functions
2846  // ----------------------------------------------------------------------
2847 
2849  void sendSignalStart(
2850  SmId smId,
2851  FwEnumStoreType signal,
2852  Fw::SerialBufferBase& buffer
2853  );
2854 
2856  void sequencer_sendSignalFinish(
2857  Fw::LinearBufferBase& buffer
2858  );
2859 
2860  private:
2861 
2862  // ----------------------------------------------------------------------
2863  // Helper functions for state machine dispatch
2864  // ----------------------------------------------------------------------
2865 
2867  void smDispatch(
2868  Fw::SerialBufferBase& buffer
2869  );
2870 
2872  static void deserializeSmIdAndSignal(
2873  Fw::SerialBufferBase& buffer,
2874  FwEnumStoreType& smId,
2875  FwEnumStoreType& signal
2876  );
2877 
2879  void Svc_FpySequencer_SequencerStateMachine_smDispatch(
2880  Fw::SerialBufferBase& buffer,
2881  Svc_FpySequencer_SequencerStateMachine& sm,
2883  );
2884 
2885  private:
2886 
2887  // ----------------------------------------------------------------------
2888  // Parameter set functions
2889  // ----------------------------------------------------------------------
2890 
2894  Fw::CmdResponse paramSet_STATEMENT_TIMEOUT_SECS(
2895  Fw::SerialBufferBase& val
2896  );
2897 
2901  Fw::CmdResponse paramSet_SEQ_BASE_DIR(
2902  Fw::SerialBufferBase& val
2903  );
2904 
2905  private:
2906 
2907  // ----------------------------------------------------------------------
2908  // Parameter save functions
2909  // ----------------------------------------------------------------------
2910 
2914  Fw::CmdResponse paramSave_STATEMENT_TIMEOUT_SECS();
2915 
2919  Fw::CmdResponse paramSave_SEQ_BASE_DIR();
2920 
2921 #if !FW_DIRECT_PORT_CALLS
2922 
2923  private:
2924 
2925  // ----------------------------------------------------------------------
2926  // Special input ports
2927  // ----------------------------------------------------------------------
2928 
2930  Fw::InputCmdPort m_cmdIn_InputPort[NUM_CMDIN_INPUT_PORTS];
2931 
2932 #endif
2933 
2934 #if !FW_DIRECT_PORT_CALLS
2935 
2936  private:
2937 
2938  // ----------------------------------------------------------------------
2939  // Typed input ports
2940  // ----------------------------------------------------------------------
2941 
2943  Svc::InputSchedPort m_checkTimers_InputPort[NUM_CHECKTIMERS_INPUT_PORTS];
2944 
2946  Fw::InputCmdResponsePort m_cmdResponseIn_InputPort[NUM_CMDRESPONSEIN_INPUT_PORTS];
2947 
2949  Svc::InputPingPort m_pingIn_InputPort[NUM_PINGIN_INPUT_PORTS];
2950 
2953 
2955  Svc::InputCmdSeqInPort m_seqRunIn_InputPort[NUM_SEQRUNIN_INPUT_PORTS];
2956 
2958  Svc::InputSchedPort m_tlmWrite_InputPort[NUM_TLMWRITE_INPUT_PORTS];
2959 
2960 #endif
2961 
2962 #if !FW_DIRECT_PORT_CALLS
2963 
2964  private:
2965 
2966  // ----------------------------------------------------------------------
2967  // Special output ports
2968  // ----------------------------------------------------------------------
2969 
2971  Fw::OutputCmdRegPort m_cmdRegOut_OutputPort[NUM_CMDREGOUT_OUTPUT_PORTS];
2972 
2974  Fw::OutputCmdResponsePort m_cmdResponseOut_OutputPort[NUM_CMDRESPONSEOUT_OUTPUT_PORTS];
2975 
2977  Fw::OutputLogPort m_logOut_OutputPort[NUM_LOGOUT_OUTPUT_PORTS];
2978 
2979 #if FW_ENABLE_TEXT_LOGGING == 1
2980 
2982  Fw::OutputLogTextPort m_logTextOut_OutputPort[NUM_LOGTEXTOUT_OUTPUT_PORTS];
2983 
2984 #endif
2985 
2987  Fw::OutputPrmGetPort m_prmGet_OutputPort[NUM_PRMGET_OUTPUT_PORTS];
2988 
2990  Fw::OutputPrmSetPort m_prmSet_OutputPort[NUM_PRMSET_OUTPUT_PORTS];
2991 
2993  Fw::OutputTimePort m_timeCaller_OutputPort[NUM_TIMECALLER_OUTPUT_PORTS];
2994 
2996  Fw::OutputTlmPort m_tlmOut_OutputPort[NUM_TLMOUT_OUTPUT_PORTS];
2997 
2998 #endif
2999 
3000 #if !FW_DIRECT_PORT_CALLS
3001 
3002  private:
3003 
3004  // ----------------------------------------------------------------------
3005  // Typed output ports
3006  // ----------------------------------------------------------------------
3007 
3009  Fw::OutputComPort m_cmdOut_OutputPort[NUM_CMDOUT_OUTPUT_PORTS];
3010 
3012  Fw::OutputPrmGetPort m_getParam_OutputPort[NUM_GETPARAM_OUTPUT_PORTS];
3013 
3015  Fw::OutputTlmGetPort m_getTlmChan_OutputPort[NUM_GETTLMCHAN_OUTPUT_PORTS];
3016 
3018  Svc::OutputPingPort m_pingOut_OutputPort[NUM_PINGOUT_OUTPUT_PORTS];
3019 
3021  Fw::OutputCmdResponsePort m_seqDoneOut_OutputPort[NUM_SEQDONEOUT_OUTPUT_PORTS];
3022 
3024  Svc::OutputCmdSeqInPort m_seqStartOut_OutputPort[NUM_SEQSTARTOUT_OUTPUT_PORTS];
3025 
3026 #endif
3027 
3028  private:
3029 
3030  // ----------------------------------------------------------------------
3031  // First update flags for telemetry channels
3032  // ----------------------------------------------------------------------
3033 
3035  bool m_first_update_State = true;
3036 
3038  bool m_first_update_SequencesSucceeded = true;
3039 
3041  bool m_first_update_SequencesFailed = true;
3042 
3044  bool m_first_update_SequencesCancelled = true;
3045 
3047  bool m_first_update_StatementsDispatched = true;
3048 
3050  bool m_first_update_StatementsFailed = true;
3051 
3053  bool m_first_update_LastDirectiveError = true;
3054 
3056  bool m_first_update_DirectiveErrorIndex = true;
3057 
3059  bool m_first_update_DirectiveErrorId = true;
3060 
3062  bool m_first_update_SeqPath = true;
3063 
3065  bool m_first_update_Debug_ReachedEndOfFile = true;
3066 
3068  bool m_first_update_Debug_NextStatementReadSuccess = true;
3069 
3071  bool m_first_update_Debug_NextStatementOpcode = true;
3072 
3074  bool m_first_update_Debug_NextStatementIndex = true;
3075 
3077  bool m_first_update_Debug_NextCmdOpcode = true;
3078 
3080  bool m_first_update_Debug_StackSize = true;
3081 
3083  bool m_first_update_BreakpointInUse = true;
3084 
3086  bool m_first_update_BreakpointIndex = true;
3087 
3089  bool m_first_update_BreakOnlyOnceOnBreakpoint = true;
3090 
3092  bool m_first_update_BreakBeforeNextLine = true;
3093 
3095  bool m_first_update_PRM_STATEMENT_TIMEOUT_SECS = true;
3096 
3098  bool m_first_update_PRM_SEQ_BASE_DIR = true;
3099 
3100  private:
3101 
3102  // ----------------------------------------------------------------------
3103  // Last value storage for telemetry channels
3104  // ----------------------------------------------------------------------
3105 
3107  FwEnumStoreType m_last_State = {};
3108 
3110  U64 m_last_SequencesSucceeded = {};
3111 
3113  U64 m_last_SequencesFailed = {};
3114 
3116  U64 m_last_SequencesCancelled = {};
3117 
3119  U64 m_last_StatementsDispatched = {};
3120 
3122  U64 m_last_StatementsFailed = {};
3123 
3125  Svc::Fpy::DirectiveErrorCode m_last_LastDirectiveError = {};
3126 
3128  U64 m_last_DirectiveErrorIndex = {};
3129 
3131  Svc::Fpy::DirectiveId m_last_DirectiveErrorId = {};
3132 
3134  Fw::TlmString m_last_SeqPath = {};
3135 
3137  bool m_last_Debug_ReachedEndOfFile = {};
3138 
3140  bool m_last_Debug_NextStatementReadSuccess = {};
3141 
3143  U8 m_last_Debug_NextStatementOpcode = {};
3144 
3146  U32 m_last_Debug_NextStatementIndex = {};
3147 
3149  FwOpcodeType m_last_Debug_NextCmdOpcode = {};
3150 
3152  Svc::Fpy::StackSizeType m_last_Debug_StackSize = {};
3153 
3155  bool m_last_BreakpointInUse = {};
3156 
3158  U32 m_last_BreakpointIndex = {};
3159 
3161  bool m_last_BreakOnlyOnceOnBreakpoint = {};
3162 
3164  bool m_last_BreakBeforeNextLine = {};
3165 
3167  F32 m_last_PRM_STATEMENT_TIMEOUT_SECS = {};
3168 
3170  Fw::TlmString m_last_PRM_SEQ_BASE_DIR = {};
3171 
3172  private:
3173 
3174  // ----------------------------------------------------------------------
3175  // Parameter validity flags
3176  // ----------------------------------------------------------------------
3177 
3179  Fw::ParamValid m_param_STATEMENT_TIMEOUT_SECS_valid = Fw::ParamValid::UNINIT;
3180 
3182  Fw::ParamValid m_param_SEQ_BASE_DIR_valid = Fw::ParamValid::UNINIT;
3183 
3184  private:
3185 
3186  // ----------------------------------------------------------------------
3187  // Parameter variables
3188  // ----------------------------------------------------------------------
3189 
3196  F32 m_STATEMENT_TIMEOUT_SECS;
3197 
3204  Fw::ParamString m_SEQ_BASE_DIR;
3205 
3206  private:
3207 
3208  // ----------------------------------------------------------------------
3209  // State machine instances
3210  // ----------------------------------------------------------------------
3211 
3213  Svc_FpySequencer_SequencerStateMachine m_stateMachine_sequencer;
3214 
3215  private:
3216 
3217  // ----------------------------------------------------------------------
3218  // Mutexes
3219  // ----------------------------------------------------------------------
3220 
3222  Os::Mutex m_paramLock;
3223 
3224  };
3225 
3226 }
3227 
3228 #endif
void cmdOut_out(FwIndexType portNum, Fw::ComBuffer &data, U32 context) const
Invoke output port cmdOut.
void pingOut_out(FwIndexType portNum, U32 key) const
Invoke output port pingOut.
virtual void seqCancelIn_handler(FwIndexType portNum)=0
Handler for input port seqCancelIn.
void sequencer_sendSignal_result_dispatchStatement_noMoreStatements()
Send signal result_dispatchStatement_noMoreStatements to state machine sequencer. ...
sets the index of the next directive to execute
void sequencer_sendSignal_result_checkShouldWake_keepSleeping()
Send signal result_checkShouldWake_keepSleeping to state machine sequencer.
virtual void directive_waitRel_internalInterfaceHandler(const Svc::FpySequencer_WaitRelDirective &directive)=0
Internal interface handler for directive_waitRel.
virtual void DUMP_STACK_TO_FILE_preMsgHook(FwOpcodeType opCode, U32 cmdSeq)
Pre-message hook for command DUMP_STACK_TO_FILE.
virtual void Svc_FpySequencer_SequencerStateMachine_action_checkStatementTimeout(SmId smId, Svc_FpySequencer_SequencerStateMachine::Signal signal)=0
virtual void Svc_FpySequencer_SequencerStateMachine_action_incrementSequenceCounter(SmId smId, Svc_FpySequencer_SequencerStateMachine::Signal signal)=0
virtual void Svc_FpySequencer_SequencerStateMachine_action_report_seqFailed(SmId smId, Svc_FpySequencer_SequencerStateMachine::Signal signal)=0
bool isConnected_getTlmChan_OutputPort(FwIndexType portNum) const
void set_seqStartOut_OutputPort(FwIndexType portNum, Svc::InputCmdSeqInPort *port)
Connect port to seqStartOut[portNum].
void log_WARNING_HI_DirectiveTimedOut(U8 opCode, U32 stmtIdx, const Fw::StringBase &filePath) const
Log event DirectiveTimedOut.
virtual void directive_pushPrm_internalInterfaceHandler(const Svc::FpySequencer_PushPrmDirective &directive)=0
Internal interface handler for directive_pushPrm.
Writes the contents of the stack to a file. This command is only valid in the RUNNING.PAUSED state.
virtual void directive_peek_internalInterfaceHandler(const Svc::FpySequencer_PeekDirective &directive)=0
Internal interface handler for directive_peek.
virtual void Svc_FpySequencer_SequencerStateMachine_action_setSequenceFilePath(SmId smId, Svc_FpySequencer_SequencerStateMachine::Signal signal, const Svc::FpySequencer_SequenceExecutionArgs &value)=0
virtual void Svc_FpySequencer_SequencerStateMachine_action_signalEntered(SmId smId, Svc_FpySequencer_SequencerStateMachine::Signal signal)=0
void log_ACTIVITY_HI_SequencePaused(U32 stmtIdx) const
Log event SequencePaused.
virtual void directive_exit_internalInterfaceHandler(const Svc::FpySequencer_ExitDirective &directive)=0
Internal interface handler for directive_exit.
Fw::InputCmdResponsePort * get_cmdResponseIn_InputPort(FwIndexType portNum)
virtual void seqCancelIn_preMsgHook(FwIndexType portNum)
Pre-message hook for async input port seqCancelIn.
FwIdType FwOpcodeType
The type of a command opcode.
void set_cmdOut_OutputPort(FwIndexType portNum, Fw::InputComPort *port)
Connect port to cmdOut[portNum].
virtual void seqRunIn_handler(FwIndexType portNum, const Fw::StringBase &filename, const Svc::SeqArgs &args)=0
Handler for input port seqRunIn.
branches based off of the top byte of the stack
void directive_pushVal_internalInterfaceInvoke(const Svc::FpySequencer_PushValDirective &directive)
Internal interface base-class function for directive_pushVal.
void tlmWrite_Debug_NextStatementOpcode(U8 arg, Fw::Time _tlmTime=Fw::Time())
virtual void parametersLoaded()
Called whenever parameters are loaded.
bool isConnected_cmdRegOut_OutputPort(FwIndexType portNum) const
virtual void directive_pushTime_internalInterfaceHandler(const Svc::FpySequencer_PushTimeDirective &directive)=0
Internal interface handler for directive_pushTime.
void log_WARNING_HI_InsufficientBufferSpace(U64 bufferSize, const Fw::StringBase &filePath) const
Log event InsufficientBufferSpace.
static constexpr FwIndexType getNum_seqStartOut_OutputPorts()
bool isConnected_getParam_OutputPort(FwIndexType portNum) const
PlatformSizeType FwSizeType
void directive_popEvent_internalInterfaceInvoke(const Svc::FpySequencer_PopEventDirective &directive)
Internal interface base-class function for directive_popEvent.
stores a value to an absolute address in the stack (for global variables), offset from stack ...
I32 FwEnumStoreType
void CONTINUE_cmdHandlerBase(FwOpcodeType opCode, U32 cmdSeq, Fw::CmdArgBuffer &args)
void sequencer_sendSignal_cmd_STEP()
Send signal cmd_STEP to state machine sequencer.
void sequencer_sendSignal_result_dispatchStatement_success()
Send signal result_dispatchStatement_success to state machine sequencer.
virtual void cmdResponseIn_handler(FwIndexType portNum, FwOpcodeType opCode, U32 cmdSeq, const Fw::CmdResponse &response)=0
Handler for input port cmdResponseIn.
void directive_stackOp_internalInterfaceInvoke(const Svc::FpySequencer_StackOpDirective &directive)
Internal interface base-class function for directive_stackOp.
void log_WARNING_HI_WrongCRC(U32 expected, U32 actual) const
Log event WrongCRC.
void directive_pushTlmVal_internalInterfaceInvoke(const Svc::FpySequencer_PushTlmValDirective &directive)
Internal interface base-class function for directive_pushTlmVal.
virtual void CLEAR_BREAKPOINT_cmdHandler(FwOpcodeType opCode, U32 cmdSeq)=0
virtual void parameterUpdated(FwPrmIdType id)
Called whenever a parameter is updated.
virtual void directive_stackCmd_internalInterfaceHandler(const Svc::FpySequencer_StackCmdDirective &directive)=0
Internal interface handler for directive_stackCmd.
void sequencer_sendSignal_cmd_SET_BREAKPOINT(const Svc::FpySequencer_BreakpointArgs &value)
Send signal cmd_SET_BREAKPOINT to state machine sequencer.
virtual void Svc_FpySequencer_SequencerStateMachine_action_sendCmdResponse_OK(SmId smId, Svc_FpySequencer_SequencerStateMachine::Signal signal)=0
virtual void Svc_FpySequencer_SequencerStateMachine_action_pushArgsToStack(SmId smId, Svc_FpySequencer_SequencerStateMachine::Signal signal)=0
virtual void tlmWrite_preMsgHook(FwIndexType portNum, U32 context)
Pre-message hook for async input port tlmWrite.
virtual void CLEAR_BREAKPOINT_preMsgHook(FwOpcodeType opCode, U32 cmdSeq)
Pre-message hook for command CLEAR_BREAKPOINT.
static constexpr FwIndexType getNum_cmdIn_InputPorts()
void tlmWrite_Debug_ReachedEndOfFile(bool arg, Fw::Time _tlmTime=Fw::Time())
void log_WARNING_HI_SequenceExitedWithError(const Fw::StringBase &filePath, U8 errorCode) const
Log event SequenceExitedWithError.
void RUN_cmdHandlerBase(FwOpcodeType opCode, U32 cmdSeq, Fw::CmdArgBuffer &args)
void set_seqDoneOut_OutputPort(FwIndexType portNum, Fw::InputCmdResponsePort *port)
Connect port to seqDoneOut[portNum].
FwIdType FwPrmIdType
The type of a parameter identifier.
void set_tlmOut_OutputPort(FwIndexType portNum, Fw::InputTlmPort *port)
Connect port to tlmOut[portNum].
virtual void Svc_FpySequencer_SequencerStateMachine_action_setGoalState_IDLE(SmId smId, Svc_FpySequencer_SequencerStateMachine::Signal signal)=0
stores a value to a local variable at a compile-time-known offset relative to the current stack frame...
virtual void VALIDATE_ARGS_cmdHandler(FwOpcodeType opCode, U32 cmdSeq, const Fw::CmdStringArg &fileName, Svc::SeqArgs buffer)=0
virtual void CANCEL_cmdHandler(FwOpcodeType opCode, U32 cmdSeq)=0
Fw::ParamValid getParam_out(FwIndexType portNum, FwPrmIdType id, Fw::ParamBuffer &val) const
Invoke output port getParam.
void STEP_cmdHandlerBase(FwOpcodeType opCode, U32 cmdSeq, Fw::CmdArgBuffer &args)
virtual bool Svc_FpySequencer_SequencerStateMachine_guard_breakOnce(SmId smId, Svc_FpySequencer_SequencerStateMachine::Signal signal) const =0
static constexpr FwIndexType getNum_pingIn_InputPorts()
virtual void Svc_FpySequencer_SequencerStateMachine_action_report_seqStarted(SmId smId, Svc_FpySequencer_SequencerStateMachine::Signal signal)=0
Loads, validates and runs a sequence.
bool isConnected_prmGet_OutputPort(FwIndexType portNum) const
pop an opcode and arg buf off the stack, send to cmd dispatcher and await response ...
void log_WARNING_HI_SequenceFilePathTooLong(const Fw::StringBase &baseDir, const Fw::StringBase &fileName) const
Log event SequenceFilePathTooLong.
void sequencer_sendSignal_result_checkShouldWake_wakeup()
Send signal result_checkShouldWake_wakeup to state machine sequencer.
friend class FpySequencerTesterBase
Friend class tester to support autocoded test harness.
virtual void directive_goto_internalInterfaceHandler(const Svc::FpySequencer_GotoDirective &directive)=0
Internal interface handler for directive_goto.
void directive_if_internalInterfaceInvoke(const Svc::FpySequencer_IfDirective &directive)
Internal interface base-class function for directive_if.
bool isConnected_prmSet_OutputPort(FwIndexType portNum) const
virtual void RUN_ARGS_preMsgHook(FwOpcodeType opCode, U32 cmdSeq)
Pre-message hook for command RUN_ARGS.
virtual void directive_storeRel_internalInterfaceHandler(const Svc::FpySequencer_StoreRelDirective &directive)=0
Internal interface handler for directive_storeRel.
void sequencer_sendSignal_result_success()
Send signal result_success to state machine sequencer.
void cmdResponseIn_handlerBase(FwIndexType portNum, FwOpcodeType opCode, U32 cmdSeq, const Fw::CmdResponse &response)
Handler base-class function for input port cmdResponseIn.
void sequencer_sendSignal_stmtResponse_success()
Send signal stmtResponse_success to state machine sequencer.
virtual void VALIDATE_ARGS_preMsgHook(FwOpcodeType opCode, U32 cmdSeq)
Pre-message hook for command VALIDATE_ARGS.
virtual ~FpySequencerComponentBase()
Destroy FpySequencerComponentBase object.
virtual void Svc_FpySequencer_SequencerStateMachine_action_setSequenceArguments(SmId smId, Svc_FpySequencer_SequencerStateMachine::Signal signal, const Svc::FpySequencer_SequenceExecutionArgs &value)=0
void log_WARNING_LO_CmdResponseWhileNotRunningSequence(I32 state, FwOpcodeType opcode, Fw::CmdResponse response) const
Log event CmdResponseWhileNotRunningSequence.
void tlmWrite_Debug_StackSize(Svc::Fpy::StackSizeType arg, Fw::Time _tlmTime=Fw::Time())
virtual void SET_BREAKPOINT_cmdHandler(FwOpcodeType opCode, U32 cmdSeq, U32 stmtIdx, bool breakOnce)=0
virtual void directive_stackOp_internalInterfaceHandler(const Svc::FpySequencer_StackOpDirective &directive)=0
Internal interface handler for directive_stackOp.
void sequencer_sendSignal_cmd_VALIDATE(const Svc::FpySequencer_SequenceExecutionArgs &value)
Send signal cmd_VALIDATE to state machine sequencer.
void directive_noOp_internalInterfaceInvoke(const Svc::FpySequencer_NoOpDirective &directive)
Internal interface base-class function for directive_noOp.
static constexpr FwIndexType getNum_tlmWrite_InputPorts()
Enum representing a command response.
virtual void Svc_FpySequencer_SequencerStateMachine_action_validate(SmId smId, Svc_FpySequencer_SequencerStateMachine::Signal signal)=0
virtual void RUN_VALIDATED_preMsgHook(FwOpcodeType opCode, U32 cmdSeq)
Pre-message hook for command RUN_VALIDATED.
void log_WARNING_HI_FileReadError(Svc::FpySequencer_FileReadStage readStage, const Fw::StringBase &filePath, I32 errorCode) const
Log event FileReadError.
void set_logOut_OutputPort(FwIndexType portNum, Fw::InputLogPort *port)
Connect port to logOut[portNum].
virtual void DUMP_STACK_TO_FILE_cmdHandler(FwOpcodeType opCode, U32 cmdSeq, const Fw::CmdStringArg &fileName)=0
void tlmWrite_State(FwEnumStoreType arg, Fw::Time _tlmTime=Fw::Time())
void log_WARNING_HI_FileApiError(const Fw::StringBase &filePath, I32 errorCode) const
Log event FileApiError.
void tlmWrite_SequencesSucceeded(U64 arg, Fw::Time _tlmTime=Fw::Time())
void log_WARNING_HI_ExtraBytesInSequence(FwSizeType remaining) const
Log event ExtraBytesInSequence.
virtual void Svc_FpySequencer_SequencerStateMachine_action_clearSequenceFile(SmId smId, Svc_FpySequencer_SequencerStateMachine::Signal signal)=0
Loads and validates a sequence with arguments.
void directive_allocate_internalInterfaceInvoke(const Svc::FpySequencer_AllocateDirective &directive)
Internal interface base-class function for directive_allocate.
pops bytes off the top of the stack and does nothing with them
void directive_storeRelConstOffset_internalInterfaceInvoke(const Svc::FpySequencer_StoreRelConstOffsetDirective &directive)
Internal interface base-class function for directive_storeRelConstOffset.
static constexpr FwIndexType getNum_timeCaller_OutputPorts()
virtual void seqRunIn_preMsgHook(FwIndexType portNum, const Fw::StringBase &filename, const Svc::SeqArgs &args)
Pre-message hook for async input port seqRunIn.
void log_DIAGNOSTIC_LogDiagnostic(const Fw::StringBase &filePath, const Fw::StringBase &message) const
Log event LogDiagnostic.
void log_COMMAND_LogCommand(const Fw::StringBase &filePath, const Fw::StringBase &message) const
Log event LogCommand.
virtual void directive_waitAbs_internalInterfaceHandler(const Svc::FpySequencer_WaitAbsDirective &directive)=0
Internal interface handler for directive_waitAbs.
virtual void RUN_VALIDATED_cmdHandler(FwOpcodeType opCode, U32 cmdSeq, Svc::BlockState block)=0
virtual void pingIn_preMsgHook(FwIndexType portNum, U32 key)
Pre-message hook for async input port pingIn.
virtual void STEP_cmdHandler(FwOpcodeType opCode, U32 cmdSeq)=0
void directive_pushTlmValAndTime_internalInterfaceInvoke(const Svc::FpySequencer_PushTlmValAndTimeDirective &directive)
Internal interface base-class function for directive_pushTlmValAndTime.
void directive_stackCmd_internalInterfaceInvoke(const Svc::FpySequencer_StackCmdDirective &directive)
Internal interface base-class function for directive_stackCmd.
void cmdIn_handlerBase(FwIndexType portNum, FwOpcodeType opCode, U32 cmdSeq, Fw::CmdArgBuffer &args)
Handler base-class function for input port cmdIn.
void log_WARNING_HI_TooManySequenceDirectives(U16 count, U16 max) const
Log event TooManySequenceDirectives.
void sequencer_sendSignal_stmtResponse_unexpected()
Send signal stmtResponse_unexpected to state machine sequencer.
void sequencer_sendSignal_cmd_BREAK()
Send signal cmd_BREAK to state machine sequencer.
void sequencer_sendSignal_result_dispatchStatement_failure()
Send signal result_dispatchStatement_failure to state machine sequencer.
void log_WARNING_HI_DirectiveDeserializeError(U8 opcode, U32 stmtIdx, I32 errorCode, U64 buffLeft, U64 buffLength) const
Log event DirectiveDeserializeError.
virtual void pingIn_handler(FwIndexType portNum, U32 key)=0
Handler for input port pingIn.
Svc::InputSchedPort * get_checkTimers_InputPort(FwIndexType portNum)
virtual void STEP_preMsgHook(FwOpcodeType opCode, U32 cmdSeq)
Pre-message hook for command STEP.
void RUN_VALIDATED_cmdHandlerBase(FwOpcodeType opCode, U32 cmdSeq, Fw::CmdArgBuffer &args)
void tlmWrite_PRM_STATEMENT_TIMEOUT_SECS(F32 arg, Fw::Time _tlmTime=Fw::Time())
void init()
Object initializer.
Definition: ObjBase.cpp:24
void set_pingOut_OutputPort(FwIndexType portNum, Svc::InputPingPort *port)
Connect port to pingOut[portNum].
static constexpr FwIndexType getNum_tlmOut_OutputPorts()
void log_ACTIVITY_LO_LogActivityLo(const Fw::StringBase &filePath, const Fw::StringBase &message) const
Log event LogActivityLo.
virtual void directive_allocate_internalInterfaceHandler(const Svc::FpySequencer_AllocateDirective &directive)=0
Internal interface handler for directive_allocate.
static constexpr FwIndexType getNum_pingOut_OutputPorts()
Svc_FpySequencer_SequencerStateMachine::State sequencer_getState() const
Get the state of state machine instance sequencer.
void set_getTlmChan_OutputPort(FwIndexType portNum, Fw::InputTlmGetPort *port)
Connect port to getTlmChan[portNum].
float F32
32-bit floating point
Definition: BasicTypes.h:83
virtual bool Svc_FpySequencer_SequencerStateMachine_guard_shouldBreak(SmId smId, Svc_FpySequencer_SequencerStateMachine::Signal signal) const =0
virtual void checkTimers_handler(FwIndexType portNum, U32 context)=0
Handler for input port checkTimers.
static constexpr FwIndexType getNum_getParam_OutputPorts()
static constexpr FwIndexType getNum_cmdRegOut_OutputPorts()
void log_WARNING_HI_WrongCmdResponseOpcode(FwOpcodeType opcode, Fw::CmdResponse response, FwOpcodeType expectedOpcode) const
Log event WrongCmdResponseOpcode.
void tlmWrite_StatementsFailed(U64 arg, Fw::Time _tlmTime=Fw::Time())
FwIdType FwEventIdType
The type of an event identifier.
loads a value from a local variable at a compile-time-known offset relative to the current stack fram...
void seqCancelIn_handlerBase(FwIndexType portNum)
Handler base-class function for input port seqCancelIn.
void log_ACTIVITY_HI_LogActivityHi(const Fw::StringBase &filePath, const Fw::StringBase &message) const
Log event LogActivityHi.
void regCommands()
Register commands with the Command Dispatcher.
void directive_loadAbs_internalInterfaceInvoke(const Svc::FpySequencer_LoadAbsDirective &directive)
Internal interface base-class function for directive_loadAbs.
F32 paramGet_STATEMENT_TIMEOUT_SECS(Fw::ParamValid &valid)
Svc::InputCmdSeqCancelPort * get_seqCancelIn_InputPort(FwIndexType portNum)
pop two byte arrays off the top of the stack, call memcmp, push 1 if they were equal, 0 otherwise
void cmdResponse_out(FwOpcodeType opCode, U32 cmdSeq, Fw::CmdResponse response)
Emit command response.
void directive_memCmp_internalInterfaceInvoke(const Svc::FpySequencer_MemCmpDirective &directive)
Internal interface base-class function for directive_memCmp.
pops a severity and message from the stack and emits an F Prime event
void directive_pushTime_internalInterfaceInvoke(const Svc::FpySequencer_PushTimeDirective &directive)
Internal interface base-class function for directive_pushTime.
void tlmWrite_DirectiveErrorId(const Svc::Fpy::DirectiveId &arg, Fw::Time _tlmTime=Fw::Time())
static constexpr FwIndexType getNum_cmdResponseIn_InputPorts()
Svc::InputPingPort * get_pingIn_InputPort(FwIndexType portNum)
void tlmWrite_Debug_NextCmdOpcode(FwOpcodeType arg, Fw::Time _tlmTime=Fw::Time())
void tlmWrite_handlerBase(FwIndexType portNum, U32 context)
Handler base-class function for input port tlmWrite.
void RUN_ARGS_cmdHandlerBase(FwOpcodeType opCode, U32 cmdSeq, Fw::CmdArgBuffer &args)
Base-class handler function for command RUN_ARGS.
virtual void directive_constCmd_internalInterfaceHandler(const Svc::FpySequencer_ConstCmdDirective &directive)=0
Internal interface handler for directive_constCmd.
Fw::InputCmdPort * get_cmdIn_InputPort(FwIndexType portNum)
bool isConnected_cmdResponseOut_OutputPort(FwIndexType portNum) const
void tlmWrite_PRM_SEQ_BASE_DIR(const Fw::StringBase &arg, Fw::Time _tlmTime=Fw::Time())
virtual void Svc_FpySequencer_SequencerStateMachine_action_clearSequenceArguments(SmId smId, Svc_FpySequencer_SequencerStateMachine::Signal signal)=0
void pingIn_handlerBase(FwIndexType portNum, U32 key)
Handler base-class function for input port pingIn.
stores a value to an absolute address in the stack (for global variables), const offset ...
void set_timeCaller_OutputPort(FwIndexType portNum, Fw::InputTimePort *port)
Connect port to timeCaller[portNum].
friend class FpySequencerTester
Test implementation for the enclosing component.
virtual void Svc_FpySequencer_SequencerStateMachine_action_dispatchStatement(SmId smId, Svc_FpySequencer_SequencerStateMachine::Signal signal)=0
virtual void directive_pushVal_internalInterfaceHandler(const Svc::FpySequencer_PushValDirective &directive)=0
Internal interface handler for directive_pushVal.
void sequencer_sendSignal_cmd_RUN_VALIDATED(const Svc::FpySequencer_SequenceExecutionArgs &value)
Send signal cmd_RUN_VALIDATED to state machine sequencer.
virtual void Svc_FpySequencer_SequencerStateMachine_action_clearBreakpoint(SmId smId, Svc_FpySequencer_SequencerStateMachine::Signal signal)=0
virtual void BREAK_cmdHandler(FwOpcodeType opCode, U32 cmdSeq)=0
Svc_FpySequencer_SequencerStateMachine(FpySequencerComponentBase &component)
Constructor.
FwIdType FwChanIdType
The type of a telemetry channel identifier.
void log_WARNING_HI_EndOfFileError(Svc::FpySequencer_FileReadStage readStage, const Fw::StringBase &filePath) const
Log event EndOfFileError.
void set_cmdResponseOut_OutputPort(FwIndexType portNum, Fw::InputCmdResponsePort *port)
Connect port to cmdResponseOut[portNum].
void log_WARNING_LO_CmdResponseFromOldSequence(FwOpcodeType opcode, Fw::CmdResponse response, U16 oldSequenceIdx, U16 currentSequenceIdx) const
Log event CmdResponseFromOldSequence.
Sequencer blocking state.
FpySequencerComponentBase(const char *compName="")
Construct FpySequencerComponentBase object.
virtual void directive_call_internalInterfaceHandler(const Svc::FpySequencer_CallDirective &directive)=0
Internal interface handler for directive_call.
virtual void CONTINUE_cmdHandler(FwOpcodeType opCode, U32 cmdSeq)=0
void sequencer_sendSignal_checkTimersIn()
Send signal checkTimersIn to state machine sequencer.
void tlmWrite_StatementsDispatched(U64 arg, Fw::Time _tlmTime=Fw::Time())
void tlmWrite_LastDirectiveError(const Svc::Fpy::DirectiveErrorCode &arg, Fw::Time _tlmTime=Fw::Time())
void VALIDATE_cmdHandlerBase(FwOpcodeType opCode, U32 cmdSeq, Fw::CmdArgBuffer &args)
virtual void directive_discard_internalInterfaceHandler(const Svc::FpySequencer_DiscardDirective &directive)=0
Internal interface handler for directive_discard.
void VALIDATE_ARGS_cmdHandlerBase(FwOpcodeType opCode, U32 cmdSeq, Fw::CmdArgBuffer &args)
static constexpr FwIndexType getNum_prmSet_OutputPorts()
void log_WARNING_HI_LogWarningHi(const Fw::StringBase &filePath, const Fw::StringBase &message) const
Log event LogWarningHi.
Implementation of state machine Svc_FpySequencer_SequencerStateMachine.
peeks at N bytes from the stack, starting from an offset relative to the top of the stack ...
void sequencer_sendSignal_stmtResponse_failure()
Send signal stmtResponse_failure to state machine sequencer.
void CANCEL_cmdHandlerBase(FwOpcodeType opCode, U32 cmdSeq, Fw::CmdArgBuffer &args)
void directive_waitAbs_internalInterfaceInvoke(const Svc::FpySequencer_WaitAbsDirective &directive)
Internal interface base-class function for directive_waitAbs.
void directive_peek_internalInterfaceInvoke(const Svc::FpySequencer_PeekDirective &directive)
Internal interface base-class function for directive_peek.
void set_cmdRegOut_OutputPort(FwIndexType portNum, Fw::InputCmdRegPort *port)
Connect port to cmdRegOut[portNum].
void tlmWrite_Debug_NextStatementIndex(U32 arg, Fw::Time _tlmTime=Fw::Time())
void log_WARNING_HI_CommandFailed(FwOpcodeType opCode, U32 stmtIdx, const Fw::StringBase &filePath, Fw::CmdResponse response) const
Log event CommandFailed.
void sequencer_sendSignal_stmtResponse_beginSleep()
Send signal stmtResponse_beginSleep to state machine sequencer.
void log_WARNING_HI_CommandTimedOut(FwOpcodeType opCode, U32 stmtIdx, const Fw::StringBase &filePath) const
Log event CommandTimedOut.
void sequencer_sendSignal_result_checkStatementTimeout_noTimeout()
Send signal result_checkStatementTimeout_noTimeout to state machine sequencer.
Enum representing event severity.
static constexpr FwIndexType getNum_seqRunIn_InputPorts()
virtual void tlmWrite_handler(FwIndexType portNum, U32 context)=0
Handler for input port tlmWrite.
Svc::InputCmdSeqInPort * get_seqRunIn_InputPort(FwIndexType portNum)
virtual void directive_memCmp_internalInterfaceHandler(const Svc::FpySequencer_MemCmpDirective &directive)=0
Internal interface handler for directive_memCmp.
void loadParameters()
Load the parameters from a parameter source.
virtual void Svc_FpySequencer_SequencerStateMachine_action_sendCmdResponse_EXECUTION_ERROR(SmId smId, Svc_FpySequencer_SequencerStateMachine::Signal signal)=0
void log_WARNING_HI_InvalidSeqRunCall(I32 state) const
Log event InvalidSeqRunCall.
virtual void directive_if_internalInterfaceHandler(const Svc::FpySequencer_IfDirective &directive)=0
Internal interface handler for directive_if.
void directive_getField_internalInterfaceInvoke(const Svc::FpySequencer_GetFieldDirective &directive)
Internal interface base-class function for directive_getField.
static constexpr FwIndexType getNum_cmdOut_OutputPorts()
virtual void Svc_FpySequencer_SequencerStateMachine_action_setGoalState_VALID(SmId smId, Svc_FpySequencer_SequencerStateMachine::Signal signal)=0
sleeps for a relative duration from the current time
virtual void RUN_cmdHandler(FwOpcodeType opCode, U32 cmdSeq, const Fw::CmdStringArg &fileName, Svc::BlockState block)=0
void seqDoneOut_out(FwIndexType portNum, FwOpcodeType opCode, U32 cmdSeq, const Fw::CmdResponse &response) const
Invoke output port seqDoneOut.
virtual void directive_storeRelConstOffset_internalInterfaceHandler(const Svc::FpySequencer_StoreRelConstOffsetDirective &directive)=0
Internal interface handler for directive_storeRelConstOffset.
void directive_discard_internalInterfaceInvoke(const Svc::FpySequencer_DiscardDirective &directive)
Internal interface base-class function for directive_discard.
uint8_t U8
8-bit unsigned integer
Definition: BasicTypes.h:53
virtual void directive_noOp_internalInterfaceHandler(const Svc::FpySequencer_NoOpDirective &directive)=0
Internal interface handler for directive_noOp.
void log_ACTIVITY_HI_BreakpointSet(U32 breakpointIdx, bool breakOnce) const
Log event BreakpointSet.
void directive_pushPrm_internalInterfaceInvoke(const Svc::FpySequencer_PushPrmDirective &directive)
Internal interface base-class function for directive_pushPrm.
void sequencer_sendSignal_result_timeOpFailed()
Send signal result_timeOpFailed to state machine sequencer.
void BREAK_cmdHandlerBase(FwOpcodeType opCode, U32 cmdSeq, Fw::CmdArgBuffer &args)
void log_WARNING_HI_FileOpenError(const Fw::StringBase &filePath, I32 errorCode) const
Log event FileOpenError.
void init(FpySequencerComponentBase::SmId smId)
Initialize the state machine.
void set_prmSet_OutputPort(FwIndexType portNum, Fw::InputPrmSetPort *port)
Connect port to prmSet[portNum].
virtual void Svc_FpySequencer_SequencerStateMachine_action_setSequenceBlockState(SmId smId, Svc_FpySequencer_SequencerStateMachine::Signal signal, const Svc::FpySequencer_SequenceExecutionArgs &value)=0
void sequencer_sendSignal_cmd_CANCEL()
Send signal cmd_CANCEL to state machine sequencer.
void sequencer_sendSignal_result_checkStatementTimeout_statementTimeout()
Send signal result_checkStatementTimeout_statementTimeout to state machine sequencer.
static constexpr FwIndexType getNum_cmdResponseOut_OutputPorts()
virtual void RUN_ARGS_cmdHandler(FwOpcodeType opCode, U32 cmdSeq, const Fw::CmdStringArg &fileName, Svc::BlockState block, Svc::SeqArgs buffer)=0
Handler for command RUN_ARGS.
void sequencer_sendSignal_stmtResponse_keepWaiting()
Send signal stmtResponse_keepWaiting to state machine sequencer.
bool isConnected_tlmOut_OutputPort(FwIndexType portNum) const
virtual void Svc_FpySequencer_SequencerStateMachine_action_resetRuntime(SmId smId, Svc_FpySequencer_SequencerStateMachine::Signal signal)=0
void log_WARNING_HI_InvalidCommand(I32 state) const
Log event InvalidCommand.
void tlmWrite_BreakBeforeNextLine(bool arg, Fw::Time _tlmTime=Fw::Time())
virtual void directive_storeAbs_internalInterfaceHandler(const Svc::FpySequencer_StoreAbsDirective &directive)=0
Internal interface handler for directive_storeAbs.
bool isConnected_logOut_OutputPort(FwIndexType portNum) const
void log_ACTIVITY_HI_SequenceCancelled(const Fw::StringBase &filePath) const
Log event SequenceCancelled.
virtual void RUN_preMsgHook(FwOpcodeType opCode, U32 cmdSeq)
Pre-message hook for command RUN.
void log_ACTIVITY_HI_BreakpointCleared() const
Log event BreakpointCleared.
void log_WARNING_HI_ArgTotalSizeExceedsStackLimit(Svc::Fpy::StackSizeType argSize) const
Log event ArgTotalSizeExceedsStackLimit.
static constexpr FwIndexType getNum_getTlmChan_OutputPorts()
virtual void directive_getField_internalInterfaceHandler(const Svc::FpySequencer_GetFieldDirective &directive)=0
Internal interface handler for directive_getField.
virtual void directive_loadRel_internalInterfaceHandler(const Svc::FpySequencer_LoadRelDirective &directive)=0
Internal interface handler for directive_loadRel.
Fw::ParamString paramGet_SEQ_BASE_DIR(Fw::ParamValid &valid)
bool isConnected_timeCaller_OutputPort(FwIndexType portNum) const
void tlmWrite_SequencesFailed(U64 arg, Fw::Time _tlmTime=Fw::Time())
void log_WARNING_HI_FileReadDeserializeError(Svc::FpySequencer_FileReadStage readStage, const Fw::StringBase &filePath, I32 errorCode, U64 buffLeft, U64 buffLength) const
Log event FileReadDeserializeError.
loads a value from an absolute address in the stack (for global variables)
void tlmWrite_SeqPath(const Fw::StringBase &arg, Fw::Time _tlmTime=Fw::Time())
virtual void SET_BREAKPOINT_preMsgHook(FwOpcodeType opCode, U32 cmdSeq)
Pre-message hook for command SET_BREAKPOINT.
PlatformIndexType FwIndexType
void directive_constCmd_internalInterfaceInvoke(const Svc::FpySequencer_ConstCmdDirective &directive)
Internal interface base-class function for directive_constCmd.
virtual void VALIDATE_preMsgHook(FwOpcodeType opCode, U32 cmdSeq)
Pre-message hook for command VALIDATE.
static constexpr FwIndexType getNum_checkTimers_InputPorts()
bool isConnected_pingOut_OutputPort(FwIndexType portNum) const
void log_WARNING_HI_MismatchedTimeContext(I32 internalTimeContext, I32 otherTimeContext) const
Log event MismatchedTimeContext.
virtual void Svc_FpySequencer_SequencerStateMachine_action_clearBreakBeforeNextLine(SmId smId, Svc_FpySequencer_SequencerStateMachine::Signal signal)=0
void directive_return_internalInterfaceInvoke(const Svc::FpySequencer_ReturnDirective &directive)
Internal interface base-class function for directive_return.
bool isConnected_cmdOut_OutputPort(FwIndexType portNum) const
Svc::InputSchedPort * get_tlmWrite_InputPort(FwIndexType portNum)
void seqRunIn_handlerBase(FwIndexType portNum, const Fw::StringBase &filename, const Svc::SeqArgs &args)
Handler base-class function for input port seqRunIn.
void log_WARNING_HI_WrongSchemaVersion(U8 expected, U8 actual) const
Log event WrongSchemaVersion.
virtual void Svc_FpySequencer_SequencerStateMachine_action_report_seqBroken(SmId smId, Svc_FpySequencer_SequencerStateMachine::Signal signal)=0
virtual void Svc_FpySequencer_SequencerStateMachine_action_setBreakBeforeNextLine(SmId smId, Svc_FpySequencer_SequencerStateMachine::Signal signal)=0
void sequencer_sendSignal_cmd_CLEAR_BREAKPOINT()
Send signal cmd_CLEAR_BREAKPOINT to state machine sequencer.
void log_WARNING_LO_LogWarningLo(const Fw::StringBase &filePath, const Fw::StringBase &message) const
Log event LogWarningLo.
Svc::FpySequencer_SequencerStateMachine_State State
The state type.
void log_WARNING_HI_UnknownSequencerDirective(U8 opcode, U32 stmtIdx, const Fw::StringBase &filePath) const
Log event UnknownSequencerDirective.
virtual void VALIDATE_cmdHandler(FwOpcodeType opCode, U32 cmdSeq, const Fw::CmdStringArg &fileName)=0
void log_WARNING_HI_InvalidSeqCancelCall(I32 state) const
Log event InvalidSeqCancelCall.
stores a value to a local variable at a runtime-determined offset relative to the current stack frame...
virtual void directive_return_internalInterfaceHandler(const Svc::FpySequencer_ReturnDirective &directive)=0
Internal interface handler for directive_return.
virtual void Svc_FpySequencer_SequencerStateMachine_action_report_seqSucceeded(SmId smId, Svc_FpySequencer_SequencerStateMachine::Signal signal)=0
virtual void BREAK_preMsgHook(FwOpcodeType opCode, U32 cmdSeq)
Pre-message hook for command BREAK.
void tlmWrite_DirectiveErrorIndex(U64 arg, Fw::Time _tlmTime=Fw::Time())
RateGroupDivider component implementation.
void log_WARNING_HI_CmdResponseWhileNotAwaiting(FwOpcodeType opcode, Fw::CmdResponse response) const
Log event CmdResponseWhileNotAwaiting.
virtual void Svc_FpySequencer_SequencerStateMachine_action_setGoalState_RUNNING(SmId smId, Svc_FpySequencer_SequencerStateMachine::Signal signal)=0
void log_WARNING_HI_CmdResponseWhileAwaitingDirective(FwOpcodeType opcode, Fw::CmdResponse response, U8 expectedDirectiveOpcode) const
Log event CmdResponseWhileAwaitingDirective.
virtual void cmdResponseIn_preMsgHook(FwIndexType portNum, FwOpcodeType opCode, U32 cmdSeq, const Fw::CmdResponse &response)
Pre-message hook for async input port cmdResponseIn.
Enum representing parameter validity.
virtual void directive_popEvent_internalInterfaceHandler(const Svc::FpySequencer_PopEventDirective &directive)=0
Internal interface handler for directive_popEvent.
virtual void Svc_FpySequencer_SequencerStateMachine_action_setBreakpoint(SmId smId, Svc_FpySequencer_SequencerStateMachine::Signal signal, const Svc::FpySequencer_BreakpointArgs &value)=0
void log_FATAL_LogFatal(const Fw::StringBase &filePath, const Fw::StringBase &message) const
Log event LogFatal.
void log_WARNING_HI_TooManySequenceArgs(U8 count, U8 max) const
Log event TooManySequenceArgs.
void sequencer_sendSignal_cmd_CONTINUE()
Send signal cmd_CONTINUE to state machine sequencer.
void directive_storeAbs_internalInterfaceInvoke(const Svc::FpySequencer_StoreAbsDirective &directive)
Internal interface base-class function for directive_storeAbs.
void DUMP_STACK_TO_FILE_cmdHandlerBase(FwOpcodeType opCode, U32 cmdSeq, Fw::CmdArgBuffer &args)
friend class FpySequencerTester
Friend class tester implementation to support white-box testing.
void log_WARNING_HI_MismatchedTimeBase(I32 internalTimeBase, I32 otherTimeBase) const
Log event MismatchedTimeBase.
void sequencer_sendSignal_result_failure()
Send signal result_failure to state machine sequencer.
bool isConnected_seqStartOut_OutputPort(FwIndexType portNum) const
virtual void CONTINUE_preMsgHook(FwOpcodeType opCode, U32 cmdSeq)
Pre-message hook for command CONTINUE.
void log_WARNING_HI_ArgSizeMismatch(Svc::Fpy::StackSizeType expected, FwSizeType actual, const Fw::StringBase &filePath) const
Log event ArgSizeMismatch.
virtual void checkTimers_preMsgHook(FwIndexType portNum, U32 context)
Pre-message hook for async input port checkTimers.
void seqStartOut_out(FwIndexType portNum, const Fw::StringBase &filename, const Svc::SeqArgs &args) const
Invoke output port seqStartOut.
void sequencer_sendSignal_entered()
Send signal entered to state machine sequencer.
void directive_call_internalInterfaceInvoke(const Svc::FpySequencer_CallDirective &directive)
Internal interface base-class function for directive_call.
void directive_exit_internalInterfaceInvoke(const Svc::FpySequencer_ExitDirective &directive)
Internal interface base-class function for directive_exit.
virtual void Svc_FpySequencer_SequencerStateMachine_action_checkShouldWake(SmId smId, Svc_FpySequencer_SequencerStateMachine::Signal signal)=0
void directive_storeAbsConstOffset_internalInterfaceInvoke(const Svc::FpySequencer_StoreAbsConstOffsetDirective &directive)
Internal interface base-class function for directive_storeAbsConstOffset.
FpySequencerComponentBase::SmId getId() const
Get the state machine id.
pushes the current Fw.Time struct to the stack
void log_ACTIVITY_HI_SequenceDone(const Fw::StringBase &filePath) const
Log event SequenceDone.
void directive_goto_internalInterfaceInvoke(const Svc::FpySequencer_GotoDirective &directive)
Internal interface base-class function for directive_goto.
static constexpr FwIndexType getNum_seqDoneOut_OutputPorts()
void directive_waitRel_internalInterfaceInvoke(const Svc::FpySequencer_WaitRelDirective &directive)
Internal interface base-class function for directive_waitRel.
virtual void directive_pushTlmValAndTime_internalInterfaceHandler(const Svc::FpySequencer_PushTlmValAndTimeDirective &directive)=0
Internal interface handler for directive_pushTlmValAndTime.
void directive_storeRel_internalInterfaceInvoke(const Svc::FpySequencer_StoreRelDirective &directive)
Internal interface base-class function for directive_storeRel.
virtual void directive_pushTlmVal_internalInterfaceHandler(const Svc::FpySequencer_PushTlmValDirective &directive)=0
Internal interface handler for directive_pushTlmVal.
virtual bool Svc_FpySequencer_SequencerStateMachine_guard_goalStateIs_RUNNING(SmId smId, Svc_FpySequencer_SequencerStateMachine::Signal signal) const =0
void SET_BREAKPOINT_cmdHandlerBase(FwOpcodeType opCode, U32 cmdSeq, Fw::CmdArgBuffer &args)
void directive_loadRel_internalInterfaceInvoke(const Svc::FpySequencer_LoadRelDirective &directive)
Internal interface base-class function for directive_loadRel.
Auto-generated base for FpySequencer component.
static constexpr FwIndexType getNum_logOut_OutputPorts()
void sequencer_sendSignal_cmd_RUN(const Svc::FpySequencer_SequenceExecutionArgs &value)
Send signal cmd_RUN to state machine sequencer.
void log_WARNING_HI_FileWriteError(FwSizeType writeSize, const Fw::StringBase &filePath, I32 errorCode) const
Log event FileWriteError.
virtual void directive_storeAbsConstOffset_internalInterfaceHandler(const Svc::FpySequencer_StoreAbsConstOffsetDirective &directive)=0
Internal interface handler for directive_storeAbsConstOffset.
void checkTimers_handlerBase(FwIndexType portNum, U32 context)
Handler base-class function for input port checkTimers.
static constexpr FwIndexType getNum_prmGet_OutputPorts()
static constexpr FwIndexType getNum_seqCancelIn_InputPorts()
virtual void CANCEL_preMsgHook(FwOpcodeType opCode, U32 cmdSeq)
Pre-message hook for command CANCEL.
void tlmWrite_BreakOnlyOnceOnBreakpoint(bool arg, Fw::Time _tlmTime=Fw::Time())
void log_WARNING_HI_WrongCmdResponseIndex(FwOpcodeType opcode, Fw::CmdResponse response, U16 actualCmdIdx, U16 expectedCmdIdx) const
Log event WrongCmdResponseIndex.
Fw::TlmValid getTlmChan_out(FwIndexType portNum, FwChanIdType id, Fw::Time &timeTag, Fw::TlmBuffer &val) const
Invoke output port getTlmChan.
void tlmWrite_SequencesCancelled(U64 arg, Fw::Time _tlmTime=Fw::Time())
virtual void directive_loadAbs_internalInterfaceHandler(const Svc::FpySequencer_LoadAbsDirective &directive)=0
Internal interface handler for directive_loadAbs.
void tlmWrite_BreakpointInUse(bool arg, Fw::Time _tlmTime=Fw::Time())
virtual void Svc_FpySequencer_SequencerStateMachine_action_report_seqCancelled(SmId smId, Svc_FpySequencer_SequencerStateMachine::Signal signal)=0
bool isConnected_seqDoneOut_OutputPort(FwIndexType portNum) const
friend class FpySequencerTesterBase
Autocoded test harness for the enclosing component.
void set_prmGet_OutputPort(FwIndexType portNum, Fw::InputPrmGetPort *port)
Connect port to prmGet[portNum].
void set_getParam_OutputPort(FwIndexType portNum, Fw::InputPrmGetPort *port)
Connect port to getParam[portNum].
void CLEAR_BREAKPOINT_cmdHandlerBase(FwOpcodeType opCode, U32 cmdSeq, Fw::CmdArgBuffer &args)
Must be called after VALIDATE. Runs the sequence that was validated.
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())