F´ Flight Software - C/C++ Documentation
A framework for building embedded system applications to NASA flight quality standards.
FpySequencerComponentAc.hpp
Go to the documentation of this file.
1 // ======================================================================
2 // \title FpySequencerComponentAc.hpp
3 // \author Generated by fpp-to-cpp
4 // \brief hpp file for FpySequencer component base class
5 // ======================================================================
6 
7 #ifndef Svc_FpySequencerComponentAc_HPP
8 #define Svc_FpySequencerComponentAc_HPP
9 
10 #include <atomic>
11 
12 #include "Fw/Cmd/CmdPortAc.hpp"
13 #include "Fw/Cmd/CmdRegPortAc.hpp"
16 #include "Fw/Cmd/CmdString.hpp"
17 #include "Fw/Com/ComPortAc.hpp"
19 #include "Fw/FPrimeBasicTypes.hpp"
20 #include "Fw/Log/LogPortAc.hpp"
21 #include "Fw/Log/LogString.hpp"
22 #if FW_ENABLE_TEXT_LOGGING == 1
23 #include "Fw/Log/LogTextPortAc.hpp"
24 #endif
27 #include "Fw/Prm/PrmGetPortAc.hpp"
28 #include "Fw/Prm/PrmSetPortAc.hpp"
29 #include "Fw/Prm/PrmString.hpp"
30 #include "Fw/Time/Time.hpp"
31 #include "Fw/Time/TimePortAc.hpp"
32 #include "Fw/Tlm/TlmGetPortAc.hpp"
33 #include "Fw/Tlm/TlmPortAc.hpp"
34 #include "Fw/Tlm/TlmString.hpp"
36 #include "Os/Mutex.hpp"
59 #include "Svc/Ping/PingPortAc.hpp"
66 
67 namespace Svc {
68 
75  {
76 
77  // ----------------------------------------------------------------------
78  // Friend classes
79  // ----------------------------------------------------------------------
80 
82  friend class FpySequencerTesterBase;
84  friend class FpySequencerTester;
85 
86  protected:
87 
88  // ----------------------------------------------------------------------
89  // Constants
90  // ----------------------------------------------------------------------
91 
93  enum {
95  };
96 
98  enum {
104  };
105 
107  enum {
116  };
117 
119  enum {
126  };
127 
129  enum {
130  OPCODE_RUN = 0x0,
136  OPCODE_DEBUG_BREAK = 0x5,
140  OPCODE_DEBUG_CONTINUE = 0x6,
148  };
149 
151  enum {
182  };
183 
185  enum {
197  };
198 
200  enum {
202  };
206 
208  enum class SmId : FwEnumStoreType {
209  sequencer,
210  };
211 
212  protected:
213 
214  // ----------------------------------------------------------------------
215  // Types for internal state machines
216  // ----------------------------------------------------------------------
217 
221  {
222 
223  // ----------------------------------------------------------------------
224  // Friend classes
225  // ----------------------------------------------------------------------
226 
230  friend class FpySequencerTester;
231 
232  public:
233 
236  FpySequencerComponentBase& component
237  );
238 
239  public:
240 
242  void init(
244  );
245 
246  public:
247 
250 
251  private:
252 
254  void action_signalEntered(
255  Signal signal
256  );
257 
259  void action_setSequenceFilePath(
260  Signal signal,
262  );
263 
265  void action_setSequenceBlockState(
266  Signal signal,
268  );
269 
271  void action_validate(
272  Signal signal
273  );
274 
276  void action_report_seqSucceeded(
277  Signal signal
278  );
279 
281  void action_report_seqCancelled(
282  Signal signal
283  );
284 
286  void action_report_seqFailed(
287  Signal signal
288  );
289 
291  void action_report_seqStarted(
292  Signal signal
293  );
294 
296  void action_setGoalState_RUNNING(
297  Signal signal
298  );
299 
301  void action_setGoalState_VALID(
302  Signal signal
303  );
304 
306  void action_setGoalState_IDLE(
307  Signal signal
308  );
309 
311  void action_sendCmdResponse_OK(
312  Signal signal
313  );
314 
316  void action_sendCmdResponse_EXECUTION_ERROR(
317  Signal signal
318  );
319 
321  void action_clearSequenceFile(
322  Signal signal
323  );
324 
326  void action_clearDebugBreakpoint(
327  Signal signal
328  );
329 
331  void action_checkShouldWake(
332  Signal signal
333  );
334 
336  void action_dispatchStatement(
337  Signal signal
338  );
339 
341  void action_resetRuntime(
342  Signal signal
343  );
344 
346  void action_checkStatementTimeout(
347  Signal signal
348  );
349 
351  void action_incrementSequenceCounter(
352  Signal signal
353  );
354 
356  void action_report_debugBroken(
357  Signal signal
358  );
359 
361  void action_setDebugBreakpoint(
362  Signal signal,
364  );
365 
366  private:
367 
369  bool guard_goalStateIs_RUNNING(
370  Signal signal
371  ) const;
372 
374  bool guard_shouldDebugBreak(
375  Signal signal
376  ) const;
377 
379  bool guard_debugBreakOnce(
380  Signal signal
381  ) const;
382 
383  private:
384 
386  FpySequencerComponentBase& m_component;
387 
388  };
389 
390  public:
391 
392  // ----------------------------------------------------------------------
393  // Component initialization
394  // ----------------------------------------------------------------------
395 
397  void init(
398  FwSizeType queueDepth,
399  FwEnumStoreType instance = 0
400  );
401 
402  public:
403 
404  // ----------------------------------------------------------------------
405  // Getters for special input ports
406  // ----------------------------------------------------------------------
407 
412  FwIndexType portNum
413  );
414 
415  public:
416 
417  // ----------------------------------------------------------------------
418  // Getters for typed input ports
419  // ----------------------------------------------------------------------
420 
425  FwIndexType portNum
426  );
427 
432  FwIndexType portNum
433  );
434 
439  FwIndexType portNum
440  );
441 
446  FwIndexType portNum
447  );
448 
453  FwIndexType portNum
454  );
455 
456  public:
457 
458  // ----------------------------------------------------------------------
459  // Connect input ports to special output ports
460  // ----------------------------------------------------------------------
461 
464  FwIndexType portNum,
465  Fw::InputCmdRegPort* port
466  );
467 
470  FwIndexType portNum,
472  );
473 
476  FwIndexType portNum,
477  Fw::InputLogPort* port
478  );
479 
480 #if FW_ENABLE_TEXT_LOGGING == 1
481 
483  void set_logTextOut_OutputPort(
484  FwIndexType portNum,
485  Fw::InputLogTextPort* port
486  );
487 
488 #endif
489 
492  FwIndexType portNum,
493  Fw::InputPrmGetPort* port
494  );
495 
498  FwIndexType portNum,
499  Fw::InputPrmSetPort* port
500  );
501 
504  FwIndexType portNum,
505  Fw::InputTimePort* port
506  );
507 
510  FwIndexType portNum,
511  Fw::InputTlmPort* port
512  );
513 
514  public:
515 
516  // ----------------------------------------------------------------------
517  // Connect typed input ports to typed output ports
518  // ----------------------------------------------------------------------
519 
522  FwIndexType portNum,
523  Fw::InputComPort* port
524  );
525 
528  FwIndexType portNum,
529  Fw::InputPrmGetPort* port
530  );
531 
534  FwIndexType portNum,
535  Fw::InputTlmGetPort* port
536  );
537 
540  FwIndexType portNum,
541  Svc::InputPingPort* port
542  );
543 
546  FwIndexType portNum,
548  );
549 
552  FwIndexType portNum,
554  );
555 
556 #if FW_PORT_SERIALIZATION
557 
558  public:
559 
560  // ----------------------------------------------------------------------
561  // Connect serial input ports to special output ports
562  // ----------------------------------------------------------------------
563 
566  FwIndexType portNum,
567  Fw::InputSerializePort* port
568  );
569 
572  FwIndexType portNum,
573  Fw::InputSerializePort* port
574  );
575 
578  FwIndexType portNum,
579  Fw::InputSerializePort* port
580  );
581 
582 #if FW_ENABLE_TEXT_LOGGING == 1
583 
585  void set_logTextOut_OutputPort(
586  FwIndexType portNum,
587  Fw::InputSerializePort* port
588  );
589 
590 #endif
591 
594  FwIndexType portNum,
595  Fw::InputSerializePort* port
596  );
597 
600  FwIndexType portNum,
601  Fw::InputSerializePort* port
602  );
603 
606  FwIndexType portNum,
607  Fw::InputSerializePort* port
608  );
609 
610 #endif
611 
612 #if FW_PORT_SERIALIZATION
613 
614  public:
615 
616  // ----------------------------------------------------------------------
617  // Connect serial input ports to typed output ports
618  // ----------------------------------------------------------------------
619 
622  FwIndexType portNum,
623  Fw::InputSerializePort* port
624  );
625 
628  FwIndexType portNum,
629  Fw::InputSerializePort* port
630  );
631 
634  FwIndexType portNum,
635  Fw::InputSerializePort* port
636  );
637 
640  FwIndexType portNum,
641  Fw::InputSerializePort* port
642  );
643 
644 #endif
645 
646  public:
647 
648  // ----------------------------------------------------------------------
649  // Command registration
650  // ----------------------------------------------------------------------
651 
655  void regCommands();
656 
657  public:
658 
659  // ----------------------------------------------------------------------
660  // Parameter loading
661  // ----------------------------------------------------------------------
662 
666  void loadParameters();
667 
668  protected:
669 
670  // ----------------------------------------------------------------------
671  // Component construction and destruction
672  // ----------------------------------------------------------------------
673 
676  const char* compName = ""
677  );
678 
680  virtual ~FpySequencerComponentBase();
681 
682  protected:
683 
684  // ----------------------------------------------------------------------
685  // Getters for numbers of special input ports
686  // ----------------------------------------------------------------------
687 
692 
693  protected:
694 
695  // ----------------------------------------------------------------------
696  // Getters for numbers of typed input ports
697  // ----------------------------------------------------------------------
698 
703 
708 
713 
718 
723 
724  protected:
725 
726  // ----------------------------------------------------------------------
727  // Getters for numbers of special output ports
728  // ----------------------------------------------------------------------
729 
734 
739 
744 
745 #if FW_ENABLE_TEXT_LOGGING == 1
746 
750  FwIndexType getNum_logTextOut_OutputPorts() const;
751 
752 #endif
753 
758 
763 
768 
773 
774  protected:
775 
776  // ----------------------------------------------------------------------
777  // Getters for numbers of typed output ports
778  // ----------------------------------------------------------------------
779 
784 
789 
794 
799 
804 
809 
810  protected:
811 
812  // ----------------------------------------------------------------------
813  // Connection status queries for special output ports
814  // ----------------------------------------------------------------------
815 
820  FwIndexType portNum
821  );
822 
827  FwIndexType portNum
828  );
829 
834  FwIndexType portNum
835  );
836 
837 #if FW_ENABLE_TEXT_LOGGING == 1
838 
842  bool isConnected_logTextOut_OutputPort(
843  FwIndexType portNum
844  );
845 
846 #endif
847 
852  FwIndexType portNum
853  );
854 
859  FwIndexType portNum
860  );
861 
866  FwIndexType portNum
867  );
868 
873  FwIndexType portNum
874  );
875 
876  protected:
877 
878  // ----------------------------------------------------------------------
879  // Connection status queries for typed output ports
880  // ----------------------------------------------------------------------
881 
886  FwIndexType portNum
887  );
888 
893  FwIndexType portNum
894  );
895 
900  FwIndexType portNum
901  );
902 
907  FwIndexType portNum
908  );
909 
914  FwIndexType portNum
915  );
916 
921  FwIndexType portNum
922  );
923 
924  protected:
925 
926  // ----------------------------------------------------------------------
927  // Handlers to implement for typed input ports
928  // ----------------------------------------------------------------------
929 
931  virtual void checkTimers_handler(
932  FwIndexType portNum,
933  U32 context
934  ) = 0;
935 
937  virtual void cmdResponseIn_handler(
938  FwIndexType portNum,
939  FwOpcodeType opCode,
940  U32 cmdSeq,
941  const Fw::CmdResponse& response
942  ) = 0;
943 
945  virtual void pingIn_handler(
946  FwIndexType portNum,
947  U32 key
948  ) = 0;
949 
951  virtual void seqRunIn_handler(
952  FwIndexType portNum,
953  const Fw::StringBase& filename
954  ) = 0;
955 
957  virtual void tlmWrite_handler(
958  FwIndexType portNum,
959  U32 context
960  ) = 0;
961 
962  protected:
963 
964  // ----------------------------------------------------------------------
965  // Port handler base-class functions for typed input ports
966  //
967  // Call these functions directly to bypass the corresponding ports
968  // ----------------------------------------------------------------------
969 
972  FwIndexType portNum,
973  U32 context
974  );
975 
978  FwIndexType portNum,
979  FwOpcodeType opCode,
980  U32 cmdSeq,
981  const Fw::CmdResponse& response
982  );
983 
985  void pingIn_handlerBase(
986  FwIndexType portNum,
987  U32 key
988  );
989 
992  FwIndexType portNum,
993  const Fw::StringBase& filename
994  );
995 
998  FwIndexType portNum,
999  U32 context
1000  );
1001 
1002  protected:
1003 
1004  // ----------------------------------------------------------------------
1005  // Pre-message hooks for typed async input ports
1006  //
1007  // Each of these functions is invoked just before processing a message
1008  // on the corresponding port. By default, they do nothing. You can
1009  // override them to provide specific pre-message behavior.
1010  // ----------------------------------------------------------------------
1011 
1013  virtual void checkTimers_preMsgHook(
1014  FwIndexType portNum,
1015  U32 context
1016  );
1017 
1019  virtual void cmdResponseIn_preMsgHook(
1020  FwIndexType portNum,
1021  FwOpcodeType opCode,
1022  U32 cmdSeq,
1023  const Fw::CmdResponse& response
1024  );
1025 
1027  virtual void pingIn_preMsgHook(
1028  FwIndexType portNum,
1029  U32 key
1030  );
1031 
1033  virtual void seqRunIn_preMsgHook(
1034  FwIndexType portNum,
1035  const Fw::StringBase& filename
1036  );
1037 
1039  virtual void tlmWrite_preMsgHook(
1040  FwIndexType portNum,
1041  U32 context
1042  );
1043 
1044  protected:
1045 
1046  // ----------------------------------------------------------------------
1047  // Invocation functions for typed output ports
1048  // ----------------------------------------------------------------------
1049 
1051  void cmdOut_out(
1052  FwIndexType portNum,
1053  Fw::ComBuffer& data,
1054  U32 context
1055  );
1056 
1059  FwIndexType portNum,
1060  FwPrmIdType id,
1061  Fw::ParamBuffer& val
1062  );
1064 
1067  FwIndexType portNum,
1068  FwChanIdType id,
1069  Fw::Time& timeTag,
1070  Fw::TlmBuffer& val
1071  );
1074 
1076  void pingOut_out(
1077  FwIndexType portNum,
1078  U32 key
1079  );
1080 
1082  void seqDoneOut_out(
1083  FwIndexType portNum,
1084  FwOpcodeType opCode,
1085  U32 cmdSeq,
1086  const Fw::CmdResponse& response
1087  );
1088 
1090  void seqStartOut_out(
1091  FwIndexType portNum,
1092  const Fw::StringBase& filename
1093  );
1094 
1095  protected:
1096 
1097  // ----------------------------------------------------------------------
1098  // Internal interface handlers
1099  // ----------------------------------------------------------------------
1100 
1103 
1106 
1109 
1112 
1115 
1118 
1121 
1123  virtual void directive_if_internalInterfaceHandler(const Svc::FpySequencer_IfDirective& directive) = 0;
1124 
1127 
1130 
1133 
1136 
1139 
1142 
1143  protected:
1144 
1145  // ----------------------------------------------------------------------
1146  // Internal interface base-class functions
1147  // ----------------------------------------------------------------------
1148 
1151 
1154 
1157 
1160 
1163 
1166 
1169 
1172 
1175 
1178 
1181 
1184 
1187 
1190 
1191  protected:
1192 
1193  // ----------------------------------------------------------------------
1194  // State getter functions
1195  // ----------------------------------------------------------------------
1196 
1199 
1200  protected:
1201 
1202  // ----------------------------------------------------------------------
1203  // Signal send functions
1204  // ----------------------------------------------------------------------
1205 
1209  );
1210 
1214  );
1215 
1219  );
1220 
1223 
1227  );
1228 
1231 
1234 
1237 
1240 
1243 
1246 
1249 
1252 
1255 
1258 
1261 
1264 
1267 
1270 
1273 
1276 
1279 
1282 
1285 
1289  );
1290 
1291  protected:
1292 
1293  // ----------------------------------------------------------------------
1294  // Functions to implement for internal state machine actions
1295  // ----------------------------------------------------------------------
1296 
1301  SmId smId,
1303  ) = 0;
1304 
1309  SmId smId,
1312  ) = 0;
1313 
1318  SmId smId,
1321  ) = 0;
1322 
1327  SmId smId,
1329  ) = 0;
1330 
1335  SmId smId,
1337  ) = 0;
1338 
1343  SmId smId,
1345  ) = 0;
1346 
1351  SmId smId,
1353  ) = 0;
1354 
1359  SmId smId,
1361  ) = 0;
1362 
1367  SmId smId,
1369  ) = 0;
1370 
1375  SmId smId,
1377  ) = 0;
1378 
1383  SmId smId,
1385  ) = 0;
1386 
1391  SmId smId,
1393  ) = 0;
1394 
1399  SmId smId,
1401  ) = 0;
1402 
1407  SmId smId,
1409  ) = 0;
1410 
1415  SmId smId,
1417  ) = 0;
1418 
1423  SmId smId,
1425  ) = 0;
1426 
1431  SmId smId,
1433  ) = 0;
1434 
1439  SmId smId,
1441  ) = 0;
1442 
1447  SmId smId,
1449  ) = 0;
1450 
1455  SmId smId,
1457  ) = 0;
1458 
1463  SmId smId,
1465  ) = 0;
1466 
1471  SmId smId,
1474  ) = 0;
1475 
1476  protected:
1477 
1478  // ----------------------------------------------------------------------
1479  // Functions to implement for internal state machine guards
1480  // ----------------------------------------------------------------------
1481 
1486  SmId smId,
1488  ) const = 0;
1489 
1495  SmId smId,
1497  ) const = 0;
1498 
1503  SmId smId,
1505  ) const = 0;
1506 
1507  protected:
1508 
1509  // ----------------------------------------------------------------------
1510  // Command response
1511  // ----------------------------------------------------------------------
1512 
1514  void cmdResponse_out(
1515  FwOpcodeType opCode,
1516  U32 cmdSeq,
1517  Fw::CmdResponse response
1518  );
1519 
1520  protected:
1521 
1522  // ----------------------------------------------------------------------
1523  // Command handlers to implement
1524  // ----------------------------------------------------------------------
1525 
1529  virtual void RUN_cmdHandler(
1530  FwOpcodeType opCode,
1531  U32 cmdSeq,
1532  const Fw::CmdStringArg& fileName,
1534  ) = 0;
1535 
1539  virtual void VALIDATE_cmdHandler(
1540  FwOpcodeType opCode,
1541  U32 cmdSeq,
1542  const Fw::CmdStringArg& fileName
1543  ) = 0;
1544 
1548  virtual void RUN_VALIDATED_cmdHandler(
1549  FwOpcodeType opCode,
1550  U32 cmdSeq,
1552  ) = 0;
1553 
1558  virtual void CANCEL_cmdHandler(
1559  FwOpcodeType opCode,
1560  U32 cmdSeq
1561  ) = 0;
1562 
1569  virtual void DEBUG_SET_BREAKPOINT_cmdHandler(
1570  FwOpcodeType opCode,
1571  U32 cmdSeq,
1572  U32 stmtIdx,
1573  bool breakOnce
1574  ) = 0;
1575 
1581  virtual void DEBUG_BREAK_cmdHandler(
1582  FwOpcodeType opCode,
1583  U32 cmdSeq,
1584  bool breakOnce
1585  ) = 0;
1586 
1591  virtual void DEBUG_CONTINUE_cmdHandler(
1592  FwOpcodeType opCode,
1593  U32 cmdSeq
1594  ) = 0;
1595 
1600  virtual void DEBUG_CLEAR_BREAKPOINT_cmdHandler(
1601  FwOpcodeType opCode,
1602  U32 cmdSeq
1603  ) = 0;
1604 
1605  protected:
1606 
1607  // ----------------------------------------------------------------------
1608  // Command handler base-class functions
1609  //
1610  // Call these functions directly to bypass the command input port
1611  // ----------------------------------------------------------------------
1612 
1616  void RUN_cmdHandlerBase(
1617  FwOpcodeType opCode,
1618  U32 cmdSeq,
1619  Fw::CmdArgBuffer& args
1620  );
1621 
1626  FwOpcodeType opCode,
1627  U32 cmdSeq,
1628  Fw::CmdArgBuffer& args
1629  );
1630 
1635  FwOpcodeType opCode,
1636  U32 cmdSeq,
1637  Fw::CmdArgBuffer& args
1638  );
1639 
1644  void CANCEL_cmdHandlerBase(
1645  FwOpcodeType opCode,
1646  U32 cmdSeq,
1647  Fw::CmdArgBuffer& args
1648  );
1649 
1657  FwOpcodeType opCode,
1658  U32 cmdSeq,
1659  Fw::CmdArgBuffer& args
1660  );
1661 
1668  FwOpcodeType opCode,
1669  U32 cmdSeq,
1670  Fw::CmdArgBuffer& args
1671  );
1672 
1678  FwOpcodeType opCode,
1679  U32 cmdSeq,
1680  Fw::CmdArgBuffer& args
1681  );
1682 
1688  FwOpcodeType opCode,
1689  U32 cmdSeq,
1690  Fw::CmdArgBuffer& args
1691  );
1692 
1693  protected:
1694 
1695  // ----------------------------------------------------------------------
1696  // Pre-message hooks for async commands
1697  //
1698  // Each of these functions is invoked just before processing the
1699  // corresponding command. By default they do nothing. You can
1700  // override them to provide specific pre-command behavior.
1701  // ----------------------------------------------------------------------
1702 
1704  virtual void RUN_preMsgHook(
1705  FwOpcodeType opCode,
1706  U32 cmdSeq
1707  );
1708 
1710  virtual void VALIDATE_preMsgHook(
1711  FwOpcodeType opCode,
1712  U32 cmdSeq
1713  );
1714 
1716  virtual void RUN_VALIDATED_preMsgHook(
1717  FwOpcodeType opCode,
1718  U32 cmdSeq
1719  );
1720 
1722  virtual void CANCEL_preMsgHook(
1723  FwOpcodeType opCode,
1724  U32 cmdSeq
1725  );
1726 
1728  virtual void DEBUG_SET_BREAKPOINT_preMsgHook(
1729  FwOpcodeType opCode,
1730  U32 cmdSeq
1731  );
1732 
1734  virtual void DEBUG_BREAK_preMsgHook(
1735  FwOpcodeType opCode,
1736  U32 cmdSeq
1737  );
1738 
1740  virtual void DEBUG_CONTINUE_preMsgHook(
1741  FwOpcodeType opCode,
1742  U32 cmdSeq
1743  );
1744 
1746  virtual void DEBUG_CLEAR_BREAKPOINT_preMsgHook(
1747  FwOpcodeType opCode,
1748  U32 cmdSeq
1749  );
1750 
1751  protected:
1752 
1753  // ----------------------------------------------------------------------
1754  // Event logging functions
1755  // ----------------------------------------------------------------------
1756 
1758  void log_WARNING_HI_InvalidCommand(I32 state) const;
1759 
1761  void log_WARNING_HI_InvalidSeqRunCall(I32 state) const;
1762 
1765  const Fw::StringBase& filePath,
1766  I32 errorCode
1767  ) const;
1768 
1772  const Fw::StringBase& filePath,
1773  I32 errorCode
1774  ) const;
1775 
1779  const Fw::StringBase& filePath
1780  ) const;
1781 
1785  const Fw::StringBase& filePath,
1786  I32 errorCode,
1787  U64 buffLeft,
1788  U64 buffLength
1789  ) const;
1790 
1793  U8 expected,
1794  U8 actual
1795  ) const;
1796 
1799  U32 expected,
1800  U32 actual
1801  ) const;
1802 
1804  void log_WARNING_HI_ExtraBytesInSequence(U32 remaining) const;
1805 
1808  U64 bufferSize,
1809  const Fw::StringBase& filePath
1810  ) const;
1811 
1814  FwOpcodeType opCode,
1815  U32 stmtIdx,
1816  const Fw::StringBase& filePath,
1817  Fw::CmdResponse response
1818  ) const;
1819 
1821  void log_ACTIVITY_HI_SequenceDone(const Fw::StringBase& filePath) const;
1822 
1824  void log_ACTIVITY_HI_SequenceCancelled(const Fw::StringBase& filePath) const;
1825 
1828  U8 opcode,
1829  U32 stmtIdx,
1830  const Fw::StringBase& filePath
1831  ) const;
1832 
1835  I32 state,
1836  FwOpcodeType opcode,
1837  Fw::CmdResponse response
1838  ) const;
1839 
1842  FwOpcodeType opcode,
1843  Fw::CmdResponse response,
1844  U16 oldSequenceIdx,
1845  U16 currentSequenceIdx
1846  ) const;
1847 
1850  FwOpcodeType opcode,
1851  Fw::CmdResponse response
1852  ) const;
1853 
1856  FwOpcodeType opcode,
1857  Fw::CmdResponse response,
1858  U8 expectedDirectiveOpcode
1859  ) const;
1860 
1863  FwOpcodeType opcode,
1864  Fw::CmdResponse response,
1865  FwOpcodeType expectedOpcode
1866  ) const;
1867 
1870  FwOpcodeType opcode,
1871  Fw::CmdResponse response,
1872  U16 actualCmdIdx,
1873  U16 expectedCmdIdx
1874  ) const;
1875 
1878  U8 opcode,
1879  U32 stmtIdx,
1880  I32 errorCode,
1881  U64 buffLeft,
1882  U64 buffLength
1883  ) const;
1884 
1887  I32 internalTimeBase,
1888  I32 otherTimeBase
1889  ) const;
1890 
1893  I32 internalTimeContext,
1894  I32 otherTimeContext
1895  ) const;
1896 
1899  FwOpcodeType opCode,
1900  U32 stmtIdx,
1901  const Fw::StringBase& filePath
1902  ) const;
1903 
1906  U8 opCode,
1907  U32 stmtIdx,
1908  const Fw::StringBase& filePath
1909  ) const;
1910 
1913  U8 count,
1914  U8 max
1915  ) const;
1916 
1919  U16 count,
1920  U16 max
1921  ) const;
1922 
1925  U32 stmtIdx,
1926  bool breakOnce
1927  ) const;
1928 
1931  U32 breakpointIdx,
1932  bool breakOnce
1933  ) const;
1934 
1937 
1938  protected:
1939 
1940  // ----------------------------------------------------------------------
1941  // Telemetry write functions
1942  // ----------------------------------------------------------------------
1943 
1947  void tlmWrite_State(
1948  I32 arg,
1949  Fw::Time _tlmTime = Fw::Time()
1950  );
1951 
1956  U64 arg,
1957  Fw::Time _tlmTime = Fw::Time()
1958  );
1959 
1964  U64 arg,
1965  Fw::Time _tlmTime = Fw::Time()
1966  );
1967 
1972  U64 arg,
1973  Fw::Time _tlmTime = Fw::Time()
1974  );
1975 
1982  U64 arg,
1983  Fw::Time _tlmTime = Fw::Time()
1984  );
1985 
1990  U64 arg,
1991  Fw::Time _tlmTime = Fw::Time()
1992  );
1993 
1999  Fw::Time _tlmTime = Fw::Time()
2000  );
2001 
2005  void tlmWrite_SeqPath(
2006  const Fw::StringBase& arg,
2007  Fw::Time _tlmTime = Fw::Time()
2008  );
2009 
2014  U32 arg,
2015  Fw::Time _tlmTime = Fw::Time()
2016  );
2017 
2022  void tlmWrite_Debug(
2024  Fw::Time _tlmTime = Fw::Time()
2025  );
2026 
2031  F32 arg,
2032  Fw::Time _tlmTime = Fw::Time()
2033  );
2034 
2035  protected:
2036 
2037  // ----------------------------------------------------------------------
2038  // Parameter update hook
2039  // ----------------------------------------------------------------------
2040 
2044  virtual void parameterUpdated(
2045  FwPrmIdType id
2046  );
2047 
2048  // ----------------------------------------------------------------------
2049  // Parameter load hook
2050  // ----------------------------------------------------------------------
2051 
2055  virtual void parametersLoaded();
2056 
2057  protected:
2058 
2059  // ----------------------------------------------------------------------
2060  // Parameter get functions
2061  // ----------------------------------------------------------------------
2062 
2072  Fw::ParamValid& valid
2073  );
2074 
2075  protected:
2076 
2077  // ----------------------------------------------------------------------
2078  // Time
2079  // ----------------------------------------------------------------------
2080 
2084  Fw::Time getTime() const;
2085 
2086  private:
2087 
2088  // ----------------------------------------------------------------------
2089  // Message dispatch functions
2090  // ----------------------------------------------------------------------
2091 
2093  virtual MsgDispatchStatus doDispatch();
2094 
2095  private:
2096 
2097  // ----------------------------------------------------------------------
2098  // Calls for messages received on special input ports
2099  // ----------------------------------------------------------------------
2100 
2102  static void m_p_cmdIn_in(
2103  Fw::PassiveComponentBase* callComp,
2104  FwIndexType portNum,
2105  FwOpcodeType opCode,
2106  U32 cmdSeq,
2107  Fw::CmdArgBuffer& args
2108  );
2109 
2110  private:
2111 
2112  // ----------------------------------------------------------------------
2113  // Calls for messages received on typed input ports
2114  // ----------------------------------------------------------------------
2115 
2117  static void m_p_checkTimers_in(
2118  Fw::PassiveComponentBase* callComp,
2119  FwIndexType portNum,
2120  U32 context
2121  );
2122 
2124  static void m_p_cmdResponseIn_in(
2125  Fw::PassiveComponentBase* callComp,
2126  FwIndexType portNum,
2127  FwOpcodeType opCode,
2128  U32 cmdSeq,
2129  const Fw::CmdResponse& response
2130  );
2131 
2133  static void m_p_pingIn_in(
2134  Fw::PassiveComponentBase* callComp,
2135  FwIndexType portNum,
2136  U32 key
2137  );
2138 
2140  static void m_p_seqRunIn_in(
2141  Fw::PassiveComponentBase* callComp,
2142  FwIndexType portNum,
2143  const Fw::StringBase& filename
2144  );
2145 
2147  static void m_p_tlmWrite_in(
2148  Fw::PassiveComponentBase* callComp,
2149  FwIndexType portNum,
2150  U32 context
2151  );
2152 
2153  private:
2154 
2155  // ----------------------------------------------------------------------
2156  // Send signal helper functions
2157  // ----------------------------------------------------------------------
2158 
2160  void sendSignalStart(
2161  SmId smId,
2162  FwEnumStoreType signal,
2163  Fw::SerializeBufferBase& buffer
2164  );
2165 
2167  void sequencer_sendSignalFinish(
2168  Fw::SerializeBufferBase& buffer
2169  );
2170 
2171  private:
2172 
2173  // ----------------------------------------------------------------------
2174  // Helper functions for state machine dispatch
2175  // ----------------------------------------------------------------------
2176 
2178  void smDispatch(
2179  Fw::SerializeBufferBase& buffer
2180  );
2181 
2183  static void deserializeSmIdAndSignal(
2184  Fw::SerializeBufferBase& buffer,
2185  FwEnumStoreType& smId,
2186  FwEnumStoreType& signal
2187  );
2188 
2190  void Svc_FpySequencer_SequencerStateMachine_smDispatch(
2191  Fw::SerializeBufferBase& buffer,
2194  );
2195 
2196  private:
2197 
2198  // ----------------------------------------------------------------------
2199  // Parameter set functions
2200  // ----------------------------------------------------------------------
2201 
2205  Fw::CmdResponse paramSet_STATEMENT_TIMEOUT_SECS(
2207  );
2208 
2209  private:
2210 
2211  // ----------------------------------------------------------------------
2212  // Parameter save functions
2213  // ----------------------------------------------------------------------
2214 
2218  Fw::CmdResponse paramSave_STATEMENT_TIMEOUT_SECS();
2219 
2220  private:
2221 
2222  // ----------------------------------------------------------------------
2223  // Special input ports
2224  // ----------------------------------------------------------------------
2225 
2227  Fw::InputCmdPort m_cmdIn_InputPort[NUM_CMDIN_INPUT_PORTS];
2228 
2229  private:
2230 
2231  // ----------------------------------------------------------------------
2232  // Typed input ports
2233  // ----------------------------------------------------------------------
2234 
2236  Svc::InputSchedPort m_checkTimers_InputPort[NUM_CHECKTIMERS_INPUT_PORTS];
2237 
2239  Fw::InputCmdResponsePort m_cmdResponseIn_InputPort[NUM_CMDRESPONSEIN_INPUT_PORTS];
2240 
2242  Svc::InputPingPort m_pingIn_InputPort[NUM_PINGIN_INPUT_PORTS];
2243 
2245  Svc::InputCmdSeqInPort m_seqRunIn_InputPort[NUM_SEQRUNIN_INPUT_PORTS];
2246 
2248  Svc::InputSchedPort m_tlmWrite_InputPort[NUM_TLMWRITE_INPUT_PORTS];
2249 
2250  private:
2251 
2252  // ----------------------------------------------------------------------
2253  // Special output ports
2254  // ----------------------------------------------------------------------
2255 
2257  Fw::OutputCmdRegPort m_cmdRegOut_OutputPort[NUM_CMDREGOUT_OUTPUT_PORTS];
2258 
2260  Fw::OutputCmdResponsePort m_cmdResponseOut_OutputPort[NUM_CMDRESPONSEOUT_OUTPUT_PORTS];
2261 
2263  Fw::OutputLogPort m_logOut_OutputPort[NUM_LOGOUT_OUTPUT_PORTS];
2264 
2265 #if FW_ENABLE_TEXT_LOGGING == 1
2266 
2268  Fw::OutputLogTextPort m_logTextOut_OutputPort[NUM_LOGTEXTOUT_OUTPUT_PORTS];
2269 
2270 #endif
2271 
2273  Fw::OutputPrmGetPort m_prmGet_OutputPort[NUM_PRMGET_OUTPUT_PORTS];
2274 
2276  Fw::OutputPrmSetPort m_prmSet_OutputPort[NUM_PRMSET_OUTPUT_PORTS];
2277 
2279  Fw::OutputTimePort m_timeCaller_OutputPort[NUM_TIMECALLER_OUTPUT_PORTS];
2280 
2282  Fw::OutputTlmPort m_tlmOut_OutputPort[NUM_TLMOUT_OUTPUT_PORTS];
2283 
2284  private:
2285 
2286  // ----------------------------------------------------------------------
2287  // Typed output ports
2288  // ----------------------------------------------------------------------
2289 
2291  Fw::OutputComPort m_cmdOut_OutputPort[NUM_CMDOUT_OUTPUT_PORTS];
2292 
2294  Fw::OutputPrmGetPort m_getParam_OutputPort[NUM_GETPARAM_OUTPUT_PORTS];
2295 
2297  Fw::OutputTlmGetPort m_getTlmChan_OutputPort[NUM_GETTLMCHAN_OUTPUT_PORTS];
2298 
2300  Svc::OutputPingPort m_pingOut_OutputPort[NUM_PINGOUT_OUTPUT_PORTS];
2301 
2303  Fw::OutputCmdResponsePort m_seqDoneOut_OutputPort[NUM_SEQDONEOUT_OUTPUT_PORTS];
2304 
2306  Svc::OutputCmdSeqInPort m_seqStartOut_OutputPort[NUM_SEQSTARTOUT_OUTPUT_PORTS];
2307 
2308  private:
2309 
2310  // ----------------------------------------------------------------------
2311  // First update flags for telemetry channels
2312  // ----------------------------------------------------------------------
2313 
2315  bool m_first_update_State;
2316 
2318  bool m_first_update_SequencesSucceeded;
2319 
2321  bool m_first_update_SequencesFailed;
2322 
2324  bool m_first_update_SequencesCancelled;
2325 
2327  bool m_first_update_StatementsDispatched;
2328 
2330  bool m_first_update_StatementsFailed;
2331 
2333  bool m_first_update_LastDirectiveError;
2334 
2336  bool m_first_update_SeqPath;
2337 
2339  bool m_first_update_DebugBreakpointIdx;
2340 
2342  bool m_first_update_Debug;
2343 
2345  bool m_first_update_PRM_STATEMENT_TIMEOUT_SECS;
2346 
2347  private:
2348 
2349  // ----------------------------------------------------------------------
2350  // Last value storage for telemetry channels
2351  // ----------------------------------------------------------------------
2352 
2354  I32 m_last_State;
2355 
2357  U64 m_last_SequencesSucceeded;
2358 
2360  U64 m_last_SequencesFailed;
2361 
2363  U64 m_last_SequencesCancelled;
2364 
2366  U64 m_last_StatementsDispatched;
2367 
2369  U64 m_last_StatementsFailed;
2370 
2372  Svc::FpySequencer_DirectiveErrorCode m_last_LastDirectiveError;
2373 
2375  Fw::TlmString m_last_SeqPath;
2376 
2378  U32 m_last_DebugBreakpointIdx;
2379 
2381  Svc::FpySequencer_DebugTelemetry m_last_Debug;
2382 
2384  F32 m_last_PRM_STATEMENT_TIMEOUT_SECS;
2385 
2386  private:
2387 
2388  // ----------------------------------------------------------------------
2389  // Parameter validity flags
2390  // ----------------------------------------------------------------------
2391 
2393  Fw::ParamValid m_param_STATEMENT_TIMEOUT_SECS_valid;
2394 
2395  private:
2396 
2397  // ----------------------------------------------------------------------
2398  // Parameter variables
2399  // ----------------------------------------------------------------------
2400 
2407  F32 m_STATEMENT_TIMEOUT_SECS;
2408 
2409  private:
2410 
2411  // ----------------------------------------------------------------------
2412  // State machine instances
2413  // ----------------------------------------------------------------------
2414 
2416  Svc_FpySequencer_SequencerStateMachine m_stateMachine_sequencer;
2417 
2418  private:
2419 
2420  // ----------------------------------------------------------------------
2421  // Mutexes
2422  // ----------------------------------------------------------------------
2423 
2425  Os::Mutex m_paramLock;
2426 
2427  };
2428 
2429 }
2430 
2431 #endif
bool isConnected_tlmOut_OutputPort(FwIndexType portNum)
void sequencer_sendSignal_result_dispatchStatement_noMoreStatements()
Send signal result_dispatchStatement_noMoreStatements to state machine sequencer. ...
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.
void directive_setSerReg_internalInterfaceInvoke(const Svc::FpySequencer_SetSerRegDirective &directive)
Internal interface base-class function for directive_setSerReg.
virtual void Svc_FpySequencer_SequencerStateMachine_action_checkStatementTimeout(SmId smId, Svc_FpySequencer_SequencerStateMachine::Signal signal)=0
virtual void Svc_FpySequencer_SequencerStateMachine_action_incrementSequenceCounter(SmId smId, Svc_FpySequencer_SequencerStateMachine::Signal signal)=0
virtual void Svc_FpySequencer_SequencerStateMachine_action_report_seqFailed(SmId smId, Svc_FpySequencer_SequencerStateMachine::Signal signal)=0
void set_seqStartOut_OutputPort(FwIndexType portNum, Svc::InputCmdSeqInPort *port)
Connect port to seqStartOut[portNum].
void log_WARNING_HI_DirectiveTimedOut(U8 opCode, U32 stmtIdx, const Fw::StringBase &filePath) const
Log event DirectiveTimedOut.
virtual void DEBUG_SET_BREAKPOINT_preMsgHook(FwOpcodeType opCode, U32 cmdSeq)
Pre-message hook for command DEBUG_SET_BREAKPOINT.
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
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 parametersLoaded()
Called whenever parameters are loaded.
void log_WARNING_HI_InsufficientBufferSpace(U64 bufferSize, const Fw::StringBase &filePath) const
Log event InsufficientBufferSpace.
PlatformSizeType FwSizeType
FwIndexType getNum_cmdResponseOut_OutputPorts() const
virtual bool Svc_FpySequencer_SequencerStateMachine_guard_shouldDebugBreak(SmId smId, Svc_FpySequencer_SequencerStateMachine::Signal signal) const =0
I32 FwEnumStoreType
void directive_deserSerReg_internalInterfaceInvoke(const Svc::FpySequencer_DeserSerRegDirective &directive)
Internal interface base-class function for directive_deserSerReg.
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 log_WARNING_HI_WrongCRC(U32 expected, U32 actual) const
Log event WrongCRC.
virtual void directive_unaryRegOp_internalInterfaceHandler(const Svc::FpySequencer_UnaryRegOpDirective &directive)=0
Internal interface handler for directive_unaryRegOp.
virtual void DEBUG_CLEAR_BREAKPOINT_cmdHandler(FwOpcodeType opCode, U32 cmdSeq)=0
virtual void parameterUpdated(FwPrmIdType id)
Called whenever a parameter is updated.
virtual void Svc_FpySequencer_SequencerStateMachine_action_sendCmdResponse_OK(SmId smId, Svc_FpySequencer_SequencerStateMachine::Signal signal)=0
virtual void tlmWrite_preMsgHook(FwIndexType portNum, U32 context)
Pre-message hook for async input port tlmWrite.
performs a unary reg operation on src reg, and stores in res reg
Fw::TlmValid getTlmChan_out(FwIndexType portNum, FwChanIdType id, Fw::Time &timeTag, Fw::TlmBuffer &val)
Invoke output port getTlmChan.
void RUN_cmdHandlerBase(FwOpcodeType opCode, U32 cmdSeq, Fw::CmdArgBuffer &args)
void set_seqDoneOut_OutputPort(FwIndexType portNum, Fw::InputCmdResponsePort *port)
Connect port to seqDoneOut[portNum].
void sequencer_sendSignal_cmd_DEBUG_SET_BREAKPOINT(const Svc::FpySequencer_DebugBreakpointArgs &value)
Send signal cmd_DEBUG_SET_BREAKPOINT to state machine sequencer.
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
virtual void CANCEL_cmdHandler(FwOpcodeType opCode, U32 cmdSeq)=0
void tlmWrite_State(I32 arg, Fw::Time _tlmTime=Fw::Time())
virtual void Svc_FpySequencer_SequencerStateMachine_action_report_seqStarted(SmId smId, Svc_FpySequencer_SequencerStateMachine::Signal signal)=0
void sequencer_sendSignal_result_checkShouldWake_wakeup()
Send signal result_checkShouldWake_wakeup to state machine sequencer.
friend class FpySequencerTesterBase
Friend class tester to support autocoded test harness.
virtual void directive_goto_internalInterfaceHandler(const Svc::FpySequencer_GotoDirective &directive)=0
Internal interface handler for directive_goto.
void directive_if_internalInterfaceInvoke(const Svc::FpySequencer_IfDirective &directive)
Internal interface base-class function for directive_if.
void sequencer_sendSignal_result_success()
Send signal result_success to state machine sequencer.
void cmdResponseIn_handlerBase(FwIndexType portNum, FwOpcodeType opCode, U32 cmdSeq, const Fw::CmdResponse &response)
Handler base-class function for input port cmdResponseIn.
void sequencer_sendSignal_stmtResponse_success()
Send signal stmtResponse_success to state machine sequencer.
virtual ~FpySequencerComponentBase()
Destroy FpySequencerComponentBase object.
void log_WARNING_LO_CmdResponseWhileNotRunningSequence(I32 state, FwOpcodeType opcode, Fw::CmdResponse response) const
Log event CmdResponseWhileNotRunningSequence.
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.
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 Svc_FpySequencer_SequencerStateMachine_action_report_debugBroken(SmId smId, Svc_FpySequencer_SequencerStateMachine::Signal signal)=0
void tlmWrite_SequencesSucceeded(U64 arg, Fw::Time _tlmTime=Fw::Time())
virtual void Svc_FpySequencer_SequencerStateMachine_action_clearSequenceFile(SmId smId, Svc_FpySequencer_SequencerStateMachine::Signal signal)=0
virtual void directive_waitAbs_internalInterfaceHandler(const Svc::FpySequencer_WaitAbsDirective &directive)=0
Internal interface handler for directive_waitAbs.
virtual void RUN_VALIDATED_cmdHandler(FwOpcodeType opCode, U32 cmdSeq, Svc::FpySequencer_BlockState block)=0
bool isConnected_pingOut_OutputPort(FwIndexType portNum)
virtual void pingIn_preMsgHook(FwIndexType portNum, U32 key)
Pre-message hook for async input port pingIn.
bool isConnected_seqStartOut_OutputPort(FwIndexType portNum)
void sequencer_sendSignal_stmtResponse_unexpected()
Send signal stmtResponse_unexpected to state machine sequencer.
virtual void RUN_cmdHandler(FwOpcodeType opCode, U32 cmdSeq, const Fw::CmdStringArg &fileName, Svc::FpySequencer_BlockState block)=0
void sequencer_sendSignal_result_dispatchStatement_failure()
Send signal result_dispatchStatement_failure to state machine sequencer.
virtual void directive_cmd_internalInterfaceHandler(const Svc::FpySequencer_CmdDirective &directive)=0
Internal interface handler for directive_cmd.
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)
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 DEBUG_SET_BREAKPOINT_cmdHandlerBase(FwOpcodeType opCode, U32 cmdSeq, Fw::CmdArgBuffer &args)
void set_pingOut_OutputPort(FwIndexType portNum, Svc::InputPingPort *port)
Connect port to pingOut[portNum].
void seqStartOut_out(FwIndexType portNum, const Fw::StringBase &filename)
Invoke output port seqStartOut.
virtual bool Svc_FpySequencer_SequencerStateMachine_guard_debugBreakOnce(SmId smId, Svc_FpySequencer_SequencerStateMachine::Signal signal) const =0
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 void checkTimers_handler(FwIndexType portNum, U32 context)=0
Handler for input port checkTimers.
bool isConnected_timeCaller_OutputPort(FwIndexType portNum)
void log_WARNING_HI_WrongCmdResponseOpcode(FwOpcodeType opcode, Fw::CmdResponse response, FwOpcodeType expectedOpcode) const
Log event WrongCmdResponseOpcode.
void log_WARNING_HI_ExtraBytesInSequence(U32 remaining) const
Log event ExtraBytesInSequence.
void tlmWrite_StatementsFailed(U64 arg, Fw::Time _tlmTime=Fw::Time())
void regCommands()
Register commands with the Command Dispatcher.
void directive_setReg_internalInterfaceInvoke(const Svc::FpySequencer_SetRegDirective &directive)
Internal interface base-class function for directive_setReg.
F32 paramGet_STATEMENT_TIMEOUT_SECS(Fw::ParamValid &valid)
void cmdResponse_out(FwOpcodeType opCode, U32 cmdSeq, Fw::CmdResponse response)
Emit command response.
void directive_unaryRegOp_internalInterfaceInvoke(const Svc::FpySequencer_UnaryRegOpDirective &directive)
Internal interface base-class function for directive_unaryRegOp.
Svc::InputPingPort * get_pingIn_InputPort(FwIndexType portNum)
void tlmWrite_handlerBase(FwIndexType portNum, U32 context)
Handler base-class function for input port tlmWrite.
bool isConnected_prmSet_OutputPort(FwIndexType portNum)
virtual void directive_deserSerReg_internalInterfaceHandler(const Svc::FpySequencer_DeserSerRegDirective &directive)=0
Internal interface handler for directive_deserSerReg.
Fw::InputCmdPort * get_cmdIn_InputPort(FwIndexType portNum)
void tlmWrite_DebugBreakpointIdx(U32 arg, Fw::Time _tlmTime=Fw::Time())
void DEBUG_CONTINUE_cmdHandlerBase(FwOpcodeType opCode, U32 cmdSeq, Fw::CmdArgBuffer &args)
void sequencer_sendSignal_cmd_DEBUG_CLEAR_BREAKPOINT()
Send signal cmd_DEBUG_CLEAR_BREAKPOINT to state machine sequencer.
void pingIn_handlerBase(FwIndexType portNum, U32 key)
Handler base-class function for input port pingIn.
void set_timeCaller_OutputPort(FwIndexType portNum, Fw::InputTimePort *port)
Connect port to timeCaller[portNum].
friend class FpySequencerTester
Test implementation for the enclosing component.
virtual void Svc_FpySequencer_SequencerStateMachine_action_dispatchStatement(SmId smId, Svc_FpySequencer_SequencerStateMachine::Signal signal)=0
void sequencer_sendSignal_cmd_RUN_VALIDATED(const Svc::FpySequencer_SequenceExecutionArgs &value)
Send signal cmd_RUN_VALIDATED to state machine sequencer.
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].
virtual void DEBUG_CLEAR_BREAKPOINT_preMsgHook(FwOpcodeType opCode, U32 cmdSeq)
Pre-message hook for command DEBUG_CLEAR_BREAKPOINT.
void log_WARNING_LO_CmdResponseFromOldSequence(FwOpcodeType opcode, Fw::CmdResponse response, U16 oldSequenceIdx, U16 currentSequenceIdx) const
Log event CmdResponseFromOldSequence.
FpySequencerComponentBase(const char *compName="")
Construct FpySequencerComponentBase object.
virtual void directive_setSerReg_internalInterfaceHandler(const Svc::FpySequencer_SetSerRegDirective &directive)=0
Internal interface handler for directive_setSerReg.
void sequencer_sendSignal_checkTimersIn()
Send signal checkTimersIn to state machine sequencer.
void tlmWrite_StatementsDispatched(U64 arg, Fw::Time _tlmTime=Fw::Time())
void log_ACTIVITY_HI_DebugBreakpointCleared() const
Log event DebugBreakpointCleared.
void VALIDATE_cmdHandlerBase(FwOpcodeType opCode, U32 cmdSeq, Fw::CmdArgBuffer &args)
virtual void seqRunIn_preMsgHook(FwIndexType portNum, const Fw::StringBase &filename)
Pre-message hook for async input port seqRunIn.
bool isConnected_getParam_OutputPort(FwIndexType portNum)
Implementation of state machine Svc_FpySequencer_SequencerStateMachine.
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 set_cmdRegOut_OutputPort(FwIndexType portNum, Fw::InputCmdRegPort *port)
Connect port to cmdRegOut[portNum].
void log_WARNING_HI_CommandFailed(FwOpcodeType opCode, U32 stmtIdx, const Fw::StringBase &filePath, Fw::CmdResponse response) const
Log event CommandFailed.
void sequencer_sendSignal_stmtResponse_beginSleep()
Send signal stmtResponse_beginSleep to state machine sequencer.
void log_WARNING_HI_CommandTimedOut(FwOpcodeType opCode, U32 stmtIdx, const Fw::StringBase &filePath) const
Log event CommandTimedOut.
void sequencer_sendSignal_result_checkStatementTimeout_noTimeout()
Send signal result_checkStatementTimeout_noTimeout to state machine sequencer.
void directive_getTlm_internalInterfaceInvoke(const Svc::FpySequencer_GetTlmDirective &directive)
Internal interface base-class function for directive_getTlm.
virtual void tlmWrite_handler(FwIndexType portNum, U32 context)=0
Handler for input port tlmWrite.
Svc::InputCmdSeqInPort * get_seqRunIn_InputPort(FwIndexType portNum)
void tlmWrite_LastDirectiveError(const Svc::FpySequencer_DirectiveErrorCode &arg, Fw::Time _tlmTime=Fw::Time())
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.
virtual void Svc_FpySequencer_SequencerStateMachine_action_setGoalState_VALID(SmId smId, Svc_FpySequencer_SequencerStateMachine::Signal signal)=0
Loads, validates and runs a sequence.
bool isConnected_seqDoneOut_OutputPort(FwIndexType portNum)
void log_ACTIVITY_HI_DebugBroken(U32 stmtIdx, bool breakOnce) const
Log event DebugBroken.
virtual void DEBUG_SET_BREAKPOINT_cmdHandler(FwOpcodeType opCode, U32 cmdSeq, U32 stmtIdx, bool breakOnce)=0
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.
virtual void directive_binaryRegOp_internalInterfaceHandler(const Svc::FpySequencer_BinaryRegOpDirective &directive)=0
Internal interface handler for directive_binaryRegOp.
void log_WARNING_HI_TooManySequenceStatements(U16 count, U16 max) const
Log event TooManySequenceStatements.
void sequencer_sendSignal_result_timeOpFailed()
Send signal result_timeOpFailed to state machine sequencer.
void seqDoneOut_out(FwIndexType portNum, FwOpcodeType opCode, U32 cmdSeq, const Fw::CmdResponse &response)
Invoke output port seqDoneOut.
void log_WARNING_HI_FileOpenError(const Fw::StringBase &filePath, I32 errorCode) const
Log event FileOpenError.
void init(FpySequencerComponentBase::SmId smId)
Initialize the state machine.
void set_prmSet_OutputPort(FwIndexType portNum, Fw::InputPrmSetPort *port)
Connect port to prmSet[portNum].
virtual void Svc_FpySequencer_SequencerStateMachine_action_setSequenceBlockState(SmId smId, Svc_FpySequencer_SequencerStateMachine::Signal signal, const Svc::FpySequencer_SequenceExecutionArgs &value)=0
virtual void directive_setReg_internalInterfaceHandler(const Svc::FpySequencer_SetRegDirective &directive)=0
Internal interface handler for directive_setReg.
virtual void directive_getTlm_internalInterfaceHandler(const Svc::FpySequencer_GetTlmDirective &directive)=0
Internal interface handler for directive_getTlm.
virtual void seqRunIn_handler(FwIndexType portNum, const Fw::StringBase &filename)=0
Handler for input port seqRunIn.
void sequencer_sendSignal_cmd_CANCEL()
Send signal cmd_CANCEL to state machine sequencer.
void sequencer_sendSignal_result_checkStatementTimeout_statementTimeout()
Send signal result_checkStatementTimeout_statementTimeout to state machine sequencer.
virtual void DEBUG_CONTINUE_cmdHandler(FwOpcodeType opCode, U32 cmdSeq)=0
virtual void directive_getPrm_internalInterfaceHandler(const Svc::FpySequencer_GetPrmDirective &directive)=0
Internal interface handler for directive_getPrm.
void sequencer_sendSignal_stmtResponse_keepWaiting()
Send signal stmtResponse_keepWaiting to state machine sequencer.
virtual void Svc_FpySequencer_SequencerStateMachine_action_resetRuntime(SmId smId, Svc_FpySequencer_SequencerStateMachine::Signal signal)=0
bool isConnected_cmdResponseOut_OutputPort(FwIndexType portNum)
void log_WARNING_HI_InvalidCommand(I32 state) const
Log event InvalidCommand.
void 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 pingOut_out(FwIndexType portNum, U32 key)
Invoke output port pingOut.
bool isConnected_cmdOut_OutputPort(FwIndexType portNum)
performs a binary reg operation on the lhs and rhs regs, and stores the result in the third register ...
virtual void Svc_FpySequencer_SequencerStateMachine_action_setDebugBreakpoint(SmId smId, Svc_FpySequencer_SequencerStateMachine::Signal signal, const Svc::FpySequencer_DebugBreakpointArgs &value)=0
void tlmWrite_SequencesFailed(U64 arg, Fw::Time _tlmTime=Fw::Time())
void sequencer_sendSignal_cmd_DEBUG_BREAK(const Svc::FpySequencer_DebugBreakpointArgs &value)
Send signal cmd_DEBUG_BREAK to state machine sequencer.
void log_WARNING_HI_FileReadDeserializeError(Svc::FpySequencer_FileReadStage readStage, const Fw::StringBase &filePath, I32 errorCode, U64 buffLeft, U64 buffLength) const
Log event FileReadDeserializeError.
bool isConnected_logOut_OutputPort(FwIndexType portNum)
void tlmWrite_SeqPath(const Fw::StringBase &arg, Fw::Time _tlmTime=Fw::Time())
PlatformIndexType FwIndexType
virtual void VALIDATE_preMsgHook(FwOpcodeType opCode, U32 cmdSeq)
Pre-message hook for command VALIDATE.
void DEBUG_BREAK_cmdHandlerBase(FwOpcodeType opCode, U32 cmdSeq, Fw::CmdArgBuffer &args)
Must be called after VALIDATE. Runs the sequence that was validated.
void tlmWrite_Debug(const Svc::FpySequencer_DebugTelemetry &arg, Fw::Time _tlmTime=Fw::Time())
bool isConnected_prmGet_OutputPort(FwIndexType portNum)
void log_WARNING_HI_MismatchedTimeContext(I32 internalTimeContext, I32 otherTimeContext) const
Log event MismatchedTimeContext.
Svc::InputSchedPort * get_tlmWrite_InputPort(FwIndexType portNum)
void log_WARNING_HI_WrongSchemaVersion(U8 expected, U8 actual) const
Log event WrongSchemaVersion.
void DEBUG_CLEAR_BREAKPOINT_cmdHandlerBase(FwOpcodeType opCode, U32 cmdSeq, Fw::CmdArgBuffer &args)
void cmdOut_out(FwIndexType portNum, Fw::ComBuffer &data, U32 context)
Invoke output port cmdOut.
void log_WARNING_HI_UnknownSequencerDirective(U8 opcode, U32 stmtIdx, const Fw::StringBase &filePath) const
Log event UnknownSequencerDirective.
virtual void VALIDATE_cmdHandler(FwOpcodeType opCode, U32 cmdSeq, const Fw::CmdStringArg &fileName)=0
virtual void Svc_FpySequencer_SequencerStateMachine_action_report_seqSucceeded(SmId smId, Svc_FpySequencer_SequencerStateMachine::Signal signal)=0
RateGroupDivider component implementation.
void log_WARNING_HI_CmdResponseWhileNotAwaiting(FwOpcodeType opcode, Fw::CmdResponse response) const
Log event CmdResponseWhileNotAwaiting.
virtual void Svc_FpySequencer_SequencerStateMachine_action_setGoalState_RUNNING(SmId smId, Svc_FpySequencer_SequencerStateMachine::Signal signal)=0
bool isConnected_cmdRegOut_OutputPort(FwIndexType portNum)
void directive_getPrm_internalInterfaceInvoke(const Svc::FpySequencer_GetPrmDirective &directive)
Internal interface base-class function for directive_getPrm.
void log_WARNING_HI_CmdResponseWhileAwaitingDirective(FwOpcodeType opcode, Fw::CmdResponse response, U8 expectedDirectiveOpcode) const
Log event CmdResponseWhileAwaitingDirective.
virtual void cmdResponseIn_preMsgHook(FwIndexType portNum, FwOpcodeType opCode, U32 cmdSeq, const Fw::CmdResponse &response)
Pre-message hook for async input port cmdResponseIn.
void seqRunIn_handlerBase(FwIndexType portNum, const Fw::StringBase &filename)
Handler base-class function for input port seqRunIn.
Enum representing parameter validity.
void log_WARNING_HI_TooManySequenceArgs(U8 count, U8 max) const
Log event TooManySequenceArgs.
friend class FpySequencerTester
Friend class tester implementation to support white-box testing.
void log_WARNING_HI_MismatchedTimeBase(I32 internalTimeBase, I32 otherTimeBase) const
Log event MismatchedTimeBase.
void sequencer_sendSignal_result_failure()
Send signal result_failure to state machine sequencer.
virtual void checkTimers_preMsgHook(FwIndexType portNum, U32 context)
Pre-message hook for async input port checkTimers.
void sequencer_sendSignal_entered()
Send signal entered to state machine sequencer.
virtual void DEBUG_CONTINUE_preMsgHook(FwOpcodeType opCode, U32 cmdSeq)
Pre-message hook for command DEBUG_CONTINUE.
void directive_exit_internalInterfaceInvoke(const Svc::FpySequencer_ExitDirective &directive)
Internal interface base-class function for directive_exit.
virtual void DEBUG_BREAK_cmdHandler(FwOpcodeType opCode, U32 cmdSeq, bool breakOnce)=0
virtual void Svc_FpySequencer_SequencerStateMachine_action_checkShouldWake(SmId smId, Svc_FpySequencer_SequencerStateMachine::Signal signal)=0
Fw::ParamValid getParam_out(FwIndexType portNum, FwPrmIdType id, Fw::ParamBuffer &val)
Invoke output port getParam.
void log_ACTIVITY_HI_DebugBreakpointSet(U32 breakpointIdx, bool breakOnce) const
Log event DebugBreakpointSet.
FpySequencerComponentBase::SmId getId() const
Get the state machine id.
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.
void directive_waitRel_internalInterfaceInvoke(const Svc::FpySequencer_WaitRelDirective &directive)
Internal interface base-class function for directive_waitRel.
virtual bool Svc_FpySequencer_SequencerStateMachine_guard_goalStateIs_RUNNING(SmId smId, Svc_FpySequencer_SequencerStateMachine::Signal signal) const =0
Auto-generated base for FpySequencer component.
void sequencer_sendSignal_cmd_RUN(const Svc::FpySequencer_SequenceExecutionArgs &value)
Send signal cmd_RUN to state machine sequencer.
void checkTimers_handlerBase(FwIndexType portNum, U32 context)
Handler base-class function for input port checkTimers.
virtual void Svc_FpySequencer_SequencerStateMachine_action_clearDebugBreakpoint(SmId smId, Svc_FpySequencer_SequencerStateMachine::Signal signal)=0
virtual void CANCEL_preMsgHook(FwOpcodeType opCode, U32 cmdSeq)
Pre-message hook for command CANCEL.
bool isConnected_getTlmChan_OutputPort(FwIndexType portNum)
void directive_binaryRegOp_internalInterfaceInvoke(const Svc::FpySequencer_BinaryRegOpDirective &directive)
Internal interface base-class function for directive_binaryRegOp.
void log_WARNING_HI_WrongCmdResponseIndex(FwOpcodeType opcode, Fw::CmdResponse response, U16 actualCmdIdx, U16 expectedCmdIdx) const
Log event WrongCmdResponseIndex.
void sequencer_sendSignal_cmd_DEBUG_CONTINUE()
Send signal cmd_DEBUG_CONTINUE to state machine sequencer.
void tlmWrite_SequencesCancelled(U64 arg, Fw::Time _tlmTime=Fw::Time())
virtual void Svc_FpySequencer_SequencerStateMachine_action_report_seqCancelled(SmId smId, Svc_FpySequencer_SequencerStateMachine::Signal signal)=0
friend class FpySequencerTesterBase
Autocoded test harness for the enclosing component.
virtual void DEBUG_BREAK_preMsgHook(FwOpcodeType opCode, U32 cmdSeq)
Pre-message hook for command DEBUG_BREAK.
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 directive_cmd_internalInterfaceInvoke(const Svc::FpySequencer_CmdDirective &directive)
Internal interface base-class function for directive_cmd.
#define U64(C)
Definition: sha.h:180