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"
58 #include "Svc/Ping/PingPortAc.hpp"
65 
66 namespace Svc {
67 
74  {
75 
76  // ----------------------------------------------------------------------
77  // Friend classes
78  // ----------------------------------------------------------------------
79 
81  friend class FpySequencerTesterBase;
83  friend class FpySequencerTester;
84 
85  PROTECTED:
86 
87  // ----------------------------------------------------------------------
88  // Constants
89  // ----------------------------------------------------------------------
90 
92  enum {
94  };
95 
97  enum {
103  };
104 
106  enum {
115  };
116 
118  enum {
125  };
126 
128  enum {
129  OPCODE_RUN = 0x0,
135  OPCODE_DEBUG_BREAK = 0x5,
139  OPCODE_DEBUG_CONTINUE = 0x6,
147  };
148 
150  enum {
181  };
182 
184  enum {
196  };
197 
199  enum {
201  };
205 
207  enum class SmId : FwEnumStoreType {
208  sequencer,
209  };
210 
211  PROTECTED:
212 
213  // ----------------------------------------------------------------------
214  // Types for internal state machines
215  // ----------------------------------------------------------------------
216 
220  {
221 
222  public:
223 
226  FpySequencerComponentBase& component
227  );
228 
229  public:
230 
232  void init(
234  );
235 
236  public:
237 
240 
241  PRIVATE:
242 
244  void action_signalEntered(
245  Signal signal
246  );
247 
249  void action_setSequenceFilePath(
250  Signal signal,
252  );
253 
255  void action_setSequenceBlockState(
256  Signal signal,
258  );
259 
261  void action_validate(
262  Signal signal
263  );
264 
266  void action_report_seqSucceeded(
267  Signal signal
268  );
269 
271  void action_report_seqCancelled(
272  Signal signal
273  );
274 
276  void action_report_seqFailed(
277  Signal signal
278  );
279 
281  void action_report_seqStarted(
282  Signal signal
283  );
284 
286  void action_setGoalState_RUNNING(
287  Signal signal
288  );
289 
291  void action_setGoalState_VALID(
292  Signal signal
293  );
294 
296  void action_setGoalState_IDLE(
297  Signal signal
298  );
299 
301  void action_sendCmdResponse_OK(
302  Signal signal
303  );
304 
306  void action_sendCmdResponse_EXECUTION_ERROR(
307  Signal signal
308  );
309 
311  void action_clearSequenceFile(
312  Signal signal
313  );
314 
316  void action_clearDebugBreakpoint(
317  Signal signal
318  );
319 
321  void action_checkShouldWake(
322  Signal signal
323  );
324 
326  void action_dispatchStatement(
327  Signal signal
328  );
329 
331  void action_resetRuntime(
332  Signal signal
333  );
334 
336  void action_checkStatementTimeout(
337  Signal signal
338  );
339 
341  void action_incrementSequenceCounter(
342  Signal signal
343  );
344 
346  void action_report_debugBroken(
347  Signal signal
348  );
349 
351  void action_setDebugBreakpoint(
352  Signal signal,
354  );
355 
356  PRIVATE:
357 
359  bool guard_goalStateIs_RUNNING(
360  Signal signal
361  ) const;
362 
364  bool guard_shouldDebugBreak(
365  Signal signal
366  ) const;
367 
369  bool guard_debugBreakOnce(
370  Signal signal
371  ) const;
372 
373  PRIVATE:
374 
376  FpySequencerComponentBase& m_component;
377 
378  };
379 
380  public:
381 
382  // ----------------------------------------------------------------------
383  // Component initialization
384  // ----------------------------------------------------------------------
385 
387  void init(
388  FwSizeType queueDepth,
389  FwEnumStoreType instance = 0
390  );
391 
392  public:
393 
394  // ----------------------------------------------------------------------
395  // Getters for special input ports
396  // ----------------------------------------------------------------------
397 
402  FwIndexType portNum
403  );
404 
405  public:
406 
407  // ----------------------------------------------------------------------
408  // Getters for typed input ports
409  // ----------------------------------------------------------------------
410 
415  FwIndexType portNum
416  );
417 
422  FwIndexType portNum
423  );
424 
429  FwIndexType portNum
430  );
431 
436  FwIndexType portNum
437  );
438 
443  FwIndexType portNum
444  );
445 
446  public:
447 
448  // ----------------------------------------------------------------------
449  // Connect input ports to special output ports
450  // ----------------------------------------------------------------------
451 
454  FwIndexType portNum,
455  Fw::InputCmdRegPort* port
456  );
457 
460  FwIndexType portNum,
462  );
463 
466  FwIndexType portNum,
467  Fw::InputLogPort* port
468  );
469 
470 #if FW_ENABLE_TEXT_LOGGING == 1
471 
473  void set_logTextOut_OutputPort(
474  FwIndexType portNum,
475  Fw::InputLogTextPort* port
476  );
477 
478 #endif
479 
482  FwIndexType portNum,
483  Fw::InputPrmGetPort* port
484  );
485 
488  FwIndexType portNum,
489  Fw::InputPrmSetPort* port
490  );
491 
494  FwIndexType portNum,
495  Fw::InputTimePort* port
496  );
497 
500  FwIndexType portNum,
501  Fw::InputTlmPort* port
502  );
503 
504  public:
505 
506  // ----------------------------------------------------------------------
507  // Connect typed input ports to typed output ports
508  // ----------------------------------------------------------------------
509 
512  FwIndexType portNum,
513  Fw::InputComPort* port
514  );
515 
518  FwIndexType portNum,
519  Fw::InputPrmGetPort* port
520  );
521 
524  FwIndexType portNum,
525  Fw::InputTlmGetPort* port
526  );
527 
530  FwIndexType portNum,
531  Svc::InputPingPort* port
532  );
533 
536  FwIndexType portNum,
538  );
539 
542  FwIndexType portNum,
544  );
545 
546 #if FW_PORT_SERIALIZATION
547 
548  public:
549 
550  // ----------------------------------------------------------------------
551  // Connect serial input ports to special output ports
552  // ----------------------------------------------------------------------
553 
556  FwIndexType portNum,
557  Fw::InputSerializePort* port
558  );
559 
562  FwIndexType portNum,
563  Fw::InputSerializePort* port
564  );
565 
568  FwIndexType portNum,
569  Fw::InputSerializePort* port
570  );
571 
572 #if FW_ENABLE_TEXT_LOGGING == 1
573 
575  void set_logTextOut_OutputPort(
576  FwIndexType portNum,
577  Fw::InputSerializePort* port
578  );
579 
580 #endif
581 
584  FwIndexType portNum,
585  Fw::InputSerializePort* port
586  );
587 
590  FwIndexType portNum,
591  Fw::InputSerializePort* port
592  );
593 
596  FwIndexType portNum,
597  Fw::InputSerializePort* port
598  );
599 
600 #endif
601 
602 #if FW_PORT_SERIALIZATION
603 
604  public:
605 
606  // ----------------------------------------------------------------------
607  // Connect serial input ports to typed output ports
608  // ----------------------------------------------------------------------
609 
612  FwIndexType portNum,
613  Fw::InputSerializePort* port
614  );
615 
618  FwIndexType portNum,
619  Fw::InputSerializePort* port
620  );
621 
624  FwIndexType portNum,
625  Fw::InputSerializePort* port
626  );
627 
630  FwIndexType portNum,
631  Fw::InputSerializePort* port
632  );
633 
634 #endif
635 
636  public:
637 
638  // ----------------------------------------------------------------------
639  // Command registration
640  // ----------------------------------------------------------------------
641 
645  void regCommands();
646 
647  public:
648 
649  // ----------------------------------------------------------------------
650  // Parameter loading
651  // ----------------------------------------------------------------------
652 
656  void loadParameters();
657 
658  PROTECTED:
659 
660  // ----------------------------------------------------------------------
661  // Component construction and destruction
662  // ----------------------------------------------------------------------
663 
666  const char* compName = ""
667  );
668 
670  virtual ~FpySequencerComponentBase();
671 
672  PROTECTED:
673 
674  // ----------------------------------------------------------------------
675  // Getters for numbers of special input ports
676  // ----------------------------------------------------------------------
677 
682 
683  PROTECTED:
684 
685  // ----------------------------------------------------------------------
686  // Getters for numbers of typed input ports
687  // ----------------------------------------------------------------------
688 
693 
698 
703 
708 
713 
714  PROTECTED:
715 
716  // ----------------------------------------------------------------------
717  // Getters for numbers of special output ports
718  // ----------------------------------------------------------------------
719 
724 
729 
734 
735 #if FW_ENABLE_TEXT_LOGGING == 1
736 
740  FwIndexType getNum_logTextOut_OutputPorts() const;
741 
742 #endif
743 
748 
753 
758 
763 
764  PROTECTED:
765 
766  // ----------------------------------------------------------------------
767  // Getters for numbers of typed output ports
768  // ----------------------------------------------------------------------
769 
774 
779 
784 
789 
794 
799 
800  PROTECTED:
801 
802  // ----------------------------------------------------------------------
803  // Connection status queries for special output ports
804  // ----------------------------------------------------------------------
805 
810  FwIndexType portNum
811  );
812 
817  FwIndexType portNum
818  );
819 
824  FwIndexType portNum
825  );
826 
827 #if FW_ENABLE_TEXT_LOGGING == 1
828 
832  bool isConnected_logTextOut_OutputPort(
833  FwIndexType portNum
834  );
835 
836 #endif
837 
842  FwIndexType portNum
843  );
844 
849  FwIndexType portNum
850  );
851 
856  FwIndexType portNum
857  );
858 
863  FwIndexType portNum
864  );
865 
866  PROTECTED:
867 
868  // ----------------------------------------------------------------------
869  // Connection status queries for typed output ports
870  // ----------------------------------------------------------------------
871 
876  FwIndexType portNum
877  );
878 
883  FwIndexType portNum
884  );
885 
890  FwIndexType portNum
891  );
892 
897  FwIndexType portNum
898  );
899 
904  FwIndexType portNum
905  );
906 
911  FwIndexType portNum
912  );
913 
914  PROTECTED:
915 
916  // ----------------------------------------------------------------------
917  // Handlers to implement for typed input ports
918  // ----------------------------------------------------------------------
919 
921  virtual void checkTimers_handler(
922  FwIndexType portNum,
923  U32 context
924  ) = 0;
925 
927  virtual void cmdResponseIn_handler(
928  FwIndexType portNum,
929  FwOpcodeType opCode,
930  U32 cmdSeq,
931  const Fw::CmdResponse& response
932  ) = 0;
933 
935  virtual void pingIn_handler(
936  FwIndexType portNum,
937  U32 key
938  ) = 0;
939 
941  virtual void seqRunIn_handler(
942  FwIndexType portNum,
943  const Fw::StringBase& filename
944  ) = 0;
945 
947  virtual void tlmWrite_handler(
948  FwIndexType portNum,
949  U32 context
950  ) = 0;
951 
952  PROTECTED:
953 
954  // ----------------------------------------------------------------------
955  // Port handler base-class functions for typed input ports
956  //
957  // Call these functions directly to bypass the corresponding ports
958  // ----------------------------------------------------------------------
959 
962  FwIndexType portNum,
963  U32 context
964  );
965 
968  FwIndexType portNum,
969  FwOpcodeType opCode,
970  U32 cmdSeq,
971  const Fw::CmdResponse& response
972  );
973 
975  void pingIn_handlerBase(
976  FwIndexType portNum,
977  U32 key
978  );
979 
982  FwIndexType portNum,
983  const Fw::StringBase& filename
984  );
985 
988  FwIndexType portNum,
989  U32 context
990  );
991 
992  PROTECTED:
993 
994  // ----------------------------------------------------------------------
995  // Pre-message hooks for typed async input ports
996  //
997  // Each of these functions is invoked just before processing a message
998  // on the corresponding port. By default, they do nothing. You can
999  // override them to provide specific pre-message behavior.
1000  // ----------------------------------------------------------------------
1001 
1003  virtual void checkTimers_preMsgHook(
1004  FwIndexType portNum,
1005  U32 context
1006  );
1007 
1009  virtual void cmdResponseIn_preMsgHook(
1010  FwIndexType portNum,
1011  FwOpcodeType opCode,
1012  U32 cmdSeq,
1013  const Fw::CmdResponse& response
1014  );
1015 
1017  virtual void pingIn_preMsgHook(
1018  FwIndexType portNum,
1019  U32 key
1020  );
1021 
1023  virtual void seqRunIn_preMsgHook(
1024  FwIndexType portNum,
1025  const Fw::StringBase& filename
1026  );
1027 
1029  virtual void tlmWrite_preMsgHook(
1030  FwIndexType portNum,
1031  U32 context
1032  );
1033 
1034  PROTECTED:
1035 
1036  // ----------------------------------------------------------------------
1037  // Invocation functions for typed output ports
1038  // ----------------------------------------------------------------------
1039 
1041  void cmdOut_out(
1042  FwIndexType portNum,
1043  Fw::ComBuffer& data,
1044  U32 context
1045  );
1046 
1049  FwIndexType portNum,
1050  FwPrmIdType id,
1051  Fw::ParamBuffer& val
1052  );
1054 
1057  FwIndexType portNum,
1058  FwChanIdType id,
1059  Fw::Time& timeTag,
1060  Fw::TlmBuffer& val
1061  );
1064 
1066  void pingOut_out(
1067  FwIndexType portNum,
1068  U32 key
1069  );
1070 
1072  void seqDoneOut_out(
1073  FwIndexType portNum,
1074  FwOpcodeType opCode,
1075  U32 cmdSeq,
1076  const Fw::CmdResponse& response
1077  );
1078 
1080  void seqStartOut_out(
1081  FwIndexType portNum,
1082  const Fw::StringBase& filename
1083  );
1084 
1085  PROTECTED:
1086 
1087  // ----------------------------------------------------------------------
1088  // Internal interface handlers
1089  // ----------------------------------------------------------------------
1090 
1093 
1096 
1099 
1102 
1105 
1108 
1111 
1113  virtual void directive_if_internalInterfaceHandler(const Svc::FpySequencer_IfDirective& directive) = 0;
1114 
1117 
1120 
1123 
1126 
1129 
1132 
1133  PROTECTED:
1134 
1135  // ----------------------------------------------------------------------
1136  // Internal interface base-class functions
1137  // ----------------------------------------------------------------------
1138 
1141 
1144 
1147 
1150 
1153 
1156 
1159 
1162 
1165 
1168 
1171 
1174 
1177 
1180 
1181  PROTECTED:
1182 
1183  // ----------------------------------------------------------------------
1184  // State getter functions
1185  // ----------------------------------------------------------------------
1186 
1189 
1190  PROTECTED:
1191 
1192  // ----------------------------------------------------------------------
1193  // Signal send functions
1194  // ----------------------------------------------------------------------
1195 
1199  );
1200 
1204  );
1205 
1209  );
1210 
1213 
1217  );
1218 
1221 
1224 
1227 
1230 
1233 
1236 
1239 
1242 
1245 
1248 
1251 
1254 
1257 
1260 
1263 
1266 
1269 
1272 
1275 
1279  );
1280 
1281  PROTECTED:
1282 
1283  // ----------------------------------------------------------------------
1284  // Functions to implement for internal state machine actions
1285  // ----------------------------------------------------------------------
1286 
1291  SmId smId,
1293  ) = 0;
1294 
1299  SmId smId,
1302  ) = 0;
1303 
1308  SmId smId,
1311  ) = 0;
1312 
1317  SmId smId,
1319  ) = 0;
1320 
1325  SmId smId,
1327  ) = 0;
1328 
1333  SmId smId,
1335  ) = 0;
1336 
1341  SmId smId,
1343  ) = 0;
1344 
1349  SmId smId,
1351  ) = 0;
1352 
1357  SmId smId,
1359  ) = 0;
1360 
1365  SmId smId,
1367  ) = 0;
1368 
1373  SmId smId,
1375  ) = 0;
1376 
1381  SmId smId,
1383  ) = 0;
1384 
1389  SmId smId,
1391  ) = 0;
1392 
1397  SmId smId,
1399  ) = 0;
1400 
1405  SmId smId,
1407  ) = 0;
1408 
1413  SmId smId,
1415  ) = 0;
1416 
1421  SmId smId,
1423  ) = 0;
1424 
1429  SmId smId,
1431  ) = 0;
1432 
1437  SmId smId,
1439  ) = 0;
1440 
1445  SmId smId,
1447  ) = 0;
1448 
1453  SmId smId,
1455  ) = 0;
1456 
1461  SmId smId,
1464  ) = 0;
1465 
1466  PROTECTED:
1467 
1468  // ----------------------------------------------------------------------
1469  // Functions to implement for internal state machine guards
1470  // ----------------------------------------------------------------------
1471 
1476  SmId smId,
1478  ) const = 0;
1479 
1485  SmId smId,
1487  ) const = 0;
1488 
1493  SmId smId,
1495  ) const = 0;
1496 
1497  PROTECTED:
1498 
1499  // ----------------------------------------------------------------------
1500  // Command response
1501  // ----------------------------------------------------------------------
1502 
1504  void cmdResponse_out(
1505  FwOpcodeType opCode,
1506  U32 cmdSeq,
1507  Fw::CmdResponse response
1508  );
1509 
1510  PROTECTED:
1511 
1512  // ----------------------------------------------------------------------
1513  // Command handlers to implement
1514  // ----------------------------------------------------------------------
1515 
1519  virtual void RUN_cmdHandler(
1520  FwOpcodeType opCode,
1521  U32 cmdSeq,
1522  const Fw::CmdStringArg& fileName,
1524  ) = 0;
1525 
1529  virtual void VALIDATE_cmdHandler(
1530  FwOpcodeType opCode,
1531  U32 cmdSeq,
1532  const Fw::CmdStringArg& fileName
1533  ) = 0;
1534 
1538  virtual void RUN_VALIDATED_cmdHandler(
1539  FwOpcodeType opCode,
1540  U32 cmdSeq,
1542  ) = 0;
1543 
1548  virtual void CANCEL_cmdHandler(
1549  FwOpcodeType opCode,
1550  U32 cmdSeq
1551  ) = 0;
1552 
1559  virtual void DEBUG_SET_BREAKPOINT_cmdHandler(
1560  FwOpcodeType opCode,
1561  U32 cmdSeq,
1562  U32 stmtIdx,
1563  bool breakOnce
1564  ) = 0;
1565 
1571  virtual void DEBUG_BREAK_cmdHandler(
1572  FwOpcodeType opCode,
1573  U32 cmdSeq,
1574  bool breakOnce
1575  ) = 0;
1576 
1581  virtual void DEBUG_CONTINUE_cmdHandler(
1582  FwOpcodeType opCode,
1583  U32 cmdSeq
1584  ) = 0;
1585 
1590  virtual void DEBUG_CLEAR_BREAKPOINT_cmdHandler(
1591  FwOpcodeType opCode,
1592  U32 cmdSeq
1593  ) = 0;
1594 
1595  PROTECTED:
1596 
1597  // ----------------------------------------------------------------------
1598  // Command handler base-class functions
1599  //
1600  // Call these functions directly to bypass the command input port
1601  // ----------------------------------------------------------------------
1602 
1606  void RUN_cmdHandlerBase(
1607  FwOpcodeType opCode,
1608  U32 cmdSeq,
1609  Fw::CmdArgBuffer& args
1610  );
1611 
1616  FwOpcodeType opCode,
1617  U32 cmdSeq,
1618  Fw::CmdArgBuffer& args
1619  );
1620 
1625  FwOpcodeType opCode,
1626  U32 cmdSeq,
1627  Fw::CmdArgBuffer& args
1628  );
1629 
1634  void CANCEL_cmdHandlerBase(
1635  FwOpcodeType opCode,
1636  U32 cmdSeq,
1637  Fw::CmdArgBuffer& args
1638  );
1639 
1647  FwOpcodeType opCode,
1648  U32 cmdSeq,
1649  Fw::CmdArgBuffer& args
1650  );
1651 
1658  FwOpcodeType opCode,
1659  U32 cmdSeq,
1660  Fw::CmdArgBuffer& args
1661  );
1662 
1668  FwOpcodeType opCode,
1669  U32 cmdSeq,
1670  Fw::CmdArgBuffer& args
1671  );
1672 
1678  FwOpcodeType opCode,
1679  U32 cmdSeq,
1680  Fw::CmdArgBuffer& args
1681  );
1682 
1683  PROTECTED:
1684 
1685  // ----------------------------------------------------------------------
1686  // Pre-message hooks for async commands
1687  //
1688  // Each of these functions is invoked just before processing the
1689  // corresponding command. By default they do nothing. You can
1690  // override them to provide specific pre-command behavior.
1691  // ----------------------------------------------------------------------
1692 
1694  virtual void RUN_preMsgHook(
1695  FwOpcodeType opCode,
1696  U32 cmdSeq
1697  );
1698 
1700  virtual void VALIDATE_preMsgHook(
1701  FwOpcodeType opCode,
1702  U32 cmdSeq
1703  );
1704 
1706  virtual void RUN_VALIDATED_preMsgHook(
1707  FwOpcodeType opCode,
1708  U32 cmdSeq
1709  );
1710 
1712  virtual void CANCEL_preMsgHook(
1713  FwOpcodeType opCode,
1714  U32 cmdSeq
1715  );
1716 
1718  virtual void DEBUG_SET_BREAKPOINT_preMsgHook(
1719  FwOpcodeType opCode,
1720  U32 cmdSeq
1721  );
1722 
1724  virtual void DEBUG_BREAK_preMsgHook(
1725  FwOpcodeType opCode,
1726  U32 cmdSeq
1727  );
1728 
1730  virtual void DEBUG_CONTINUE_preMsgHook(
1731  FwOpcodeType opCode,
1732  U32 cmdSeq
1733  );
1734 
1736  virtual void DEBUG_CLEAR_BREAKPOINT_preMsgHook(
1737  FwOpcodeType opCode,
1738  U32 cmdSeq
1739  );
1740 
1741  PROTECTED:
1742 
1743  // ----------------------------------------------------------------------
1744  // Event logging functions
1745  // ----------------------------------------------------------------------
1746 
1748  void log_WARNING_HI_InvalidCommand(I32 state) const;
1749 
1751  void log_WARNING_HI_InvalidSeqRunCall(I32 state) const;
1752 
1755  const Fw::StringBase& filePath,
1756  I32 errorCode
1757  ) const;
1758 
1761  const Fw::StringBase& filePath,
1762  I32 errorCode
1763  ) const;
1764 
1766  void log_WARNING_HI_EndOfFileError(const Fw::StringBase& filePath) const;
1767 
1770  const Fw::StringBase& filePath,
1771  I32 errorCode,
1772  U64 buffLeft,
1773  U64 buffLength
1774  ) const;
1775 
1778  U8 expected,
1779  U8 actual
1780  ) const;
1781 
1784  U32 expected,
1785  U32 actual
1786  ) const;
1787 
1789  void log_WARNING_HI_ExtraBytesInSequence(U32 remaining) const;
1790 
1793  U64 bufferSize,
1794  const Fw::StringBase& filePath
1795  ) const;
1796 
1799  FwOpcodeType opCode,
1800  U32 stmtIdx,
1801  const Fw::StringBase& filePath,
1802  Fw::CmdResponse response
1803  ) const;
1804 
1806  void log_ACTIVITY_HI_SequenceDone(const Fw::StringBase& filePath) const;
1807 
1809  void log_ACTIVITY_HI_SequenceCancelled(const Fw::StringBase& filePath) const;
1810 
1813  U8 opcode,
1814  U32 stmtIdx,
1815  const Fw::StringBase& filePath
1816  ) const;
1817 
1820  I32 state,
1821  FwOpcodeType opcode,
1822  Fw::CmdResponse response
1823  ) const;
1824 
1827  FwOpcodeType opcode,
1828  Fw::CmdResponse response,
1829  U16 oldSequenceIdx,
1830  U16 currentSequenceIdx
1831  ) const;
1832 
1835  FwOpcodeType opcode,
1836  Fw::CmdResponse response
1837  ) const;
1838 
1841  FwOpcodeType opcode,
1842  Fw::CmdResponse response,
1843  U8 expectedDirectiveOpcode
1844  ) const;
1845 
1848  FwOpcodeType opcode,
1849  Fw::CmdResponse response,
1850  FwOpcodeType expectedOpcode
1851  ) const;
1852 
1855  FwOpcodeType opcode,
1856  Fw::CmdResponse response,
1857  U16 actualCmdIdx,
1858  U16 expectedCmdIdx
1859  ) const;
1860 
1863  U8 opcode,
1864  U32 stmtIdx,
1865  I32 errorCode,
1866  U64 buffLeft,
1867  U64 buffLength
1868  ) const;
1869 
1872  I32 internalTimeBase,
1873  I32 otherTimeBase
1874  ) const;
1875 
1878  I32 internalTimeContext,
1879  I32 otherTimeContext
1880  ) const;
1881 
1884  FwOpcodeType opCode,
1885  U32 stmtIdx,
1886  const Fw::StringBase& filePath
1887  ) const;
1888 
1891  U8 opCode,
1892  U32 stmtIdx,
1893  const Fw::StringBase& filePath
1894  ) const;
1895 
1898  U8 count,
1899  U8 max
1900  ) const;
1901 
1904  U16 count,
1905  U16 max
1906  ) const;
1907 
1910  U32 stmtIdx,
1911  bool breakOnce
1912  ) const;
1913 
1916  U32 breakpointIdx,
1917  bool breakOnce
1918  ) const;
1919 
1922 
1923  PROTECTED:
1924 
1925  // ----------------------------------------------------------------------
1926  // Telemetry write functions
1927  // ----------------------------------------------------------------------
1928 
1932  void tlmWrite_State(
1933  I32 arg,
1934  Fw::Time _tlmTime = Fw::Time()
1935  );
1936 
1941  U64 arg,
1942  Fw::Time _tlmTime = Fw::Time()
1943  );
1944 
1949  U64 arg,
1950  Fw::Time _tlmTime = Fw::Time()
1951  );
1952 
1957  U64 arg,
1958  Fw::Time _tlmTime = Fw::Time()
1959  );
1960 
1967  U64 arg,
1968  Fw::Time _tlmTime = Fw::Time()
1969  );
1970 
1975  U64 arg,
1976  Fw::Time _tlmTime = Fw::Time()
1977  );
1978 
1984  Fw::Time _tlmTime = Fw::Time()
1985  );
1986 
1990  void tlmWrite_SeqPath(
1991  const Fw::StringBase& arg,
1992  Fw::Time _tlmTime = Fw::Time()
1993  );
1994 
1999  U32 arg,
2000  Fw::Time _tlmTime = Fw::Time()
2001  );
2002 
2007  void tlmWrite_Debug(
2009  Fw::Time _tlmTime = Fw::Time()
2010  );
2011 
2016  F32 arg,
2017  Fw::Time _tlmTime = Fw::Time()
2018  );
2019 
2020  PROTECTED:
2021 
2022  // ----------------------------------------------------------------------
2023  // Parameter update hook
2024  // ----------------------------------------------------------------------
2025 
2029  virtual void parameterUpdated(
2030  FwPrmIdType id
2031  );
2032 
2033  // ----------------------------------------------------------------------
2034  // Parameter load hook
2035  // ----------------------------------------------------------------------
2036 
2040  virtual void parametersLoaded();
2041 
2042  PROTECTED:
2043 
2044  // ----------------------------------------------------------------------
2045  // Parameter get functions
2046  // ----------------------------------------------------------------------
2047 
2057  Fw::ParamValid& valid
2058  );
2059 
2060  PROTECTED:
2061 
2062  // ----------------------------------------------------------------------
2063  // Time
2064  // ----------------------------------------------------------------------
2065 
2069  Fw::Time getTime() const;
2070 
2071  PRIVATE:
2072 
2073  // ----------------------------------------------------------------------
2074  // Message dispatch functions
2075  // ----------------------------------------------------------------------
2076 
2078  virtual MsgDispatchStatus doDispatch();
2079 
2080  PRIVATE:
2081 
2082  // ----------------------------------------------------------------------
2083  // Calls for messages received on special input ports
2084  // ----------------------------------------------------------------------
2085 
2087  static void m_p_cmdIn_in(
2088  Fw::PassiveComponentBase* callComp,
2089  FwIndexType portNum,
2090  FwOpcodeType opCode,
2091  U32 cmdSeq,
2092  Fw::CmdArgBuffer& args
2093  );
2094 
2095  PRIVATE:
2096 
2097  // ----------------------------------------------------------------------
2098  // Calls for messages received on typed input ports
2099  // ----------------------------------------------------------------------
2100 
2102  static void m_p_checkTimers_in(
2103  Fw::PassiveComponentBase* callComp,
2104  FwIndexType portNum,
2105  U32 context
2106  );
2107 
2109  static void m_p_cmdResponseIn_in(
2110  Fw::PassiveComponentBase* callComp,
2111  FwIndexType portNum,
2112  FwOpcodeType opCode,
2113  U32 cmdSeq,
2114  const Fw::CmdResponse& response
2115  );
2116 
2118  static void m_p_pingIn_in(
2119  Fw::PassiveComponentBase* callComp,
2120  FwIndexType portNum,
2121  U32 key
2122  );
2123 
2125  static void m_p_seqRunIn_in(
2126  Fw::PassiveComponentBase* callComp,
2127  FwIndexType portNum,
2128  const Fw::StringBase& filename
2129  );
2130 
2132  static void m_p_tlmWrite_in(
2133  Fw::PassiveComponentBase* callComp,
2134  FwIndexType portNum,
2135  U32 context
2136  );
2137 
2138  PRIVATE:
2139 
2140  // ----------------------------------------------------------------------
2141  // Send signal helper functions
2142  // ----------------------------------------------------------------------
2143 
2145  void sendSignalStart(
2146  SmId smId,
2147  FwEnumStoreType signal,
2148  Fw::SerializeBufferBase& buffer
2149  );
2150 
2152  void sequencer_sendSignalFinish(
2153  Fw::SerializeBufferBase& buffer
2154  );
2155 
2156  PRIVATE:
2157 
2158  // ----------------------------------------------------------------------
2159  // Helper functions for state machine dispatch
2160  // ----------------------------------------------------------------------
2161 
2163  void smDispatch(
2164  Fw::SerializeBufferBase& buffer
2165  );
2166 
2168  static void deserializeSmIdAndSignal(
2169  Fw::SerializeBufferBase& buffer,
2170  FwEnumStoreType& smId,
2171  FwEnumStoreType& signal
2172  );
2173 
2175  void Svc_FpySequencer_SequencerStateMachine_smDispatch(
2176  Fw::SerializeBufferBase& buffer,
2179  );
2180 
2181  PRIVATE:
2182 
2183  // ----------------------------------------------------------------------
2184  // Parameter set functions
2185  // ----------------------------------------------------------------------
2186 
2190  Fw::CmdResponse paramSet_STATEMENT_TIMEOUT_SECS(
2192  );
2193 
2194  PRIVATE:
2195 
2196  // ----------------------------------------------------------------------
2197  // Parameter save functions
2198  // ----------------------------------------------------------------------
2199 
2203  Fw::CmdResponse paramSave_STATEMENT_TIMEOUT_SECS();
2204 
2205  PRIVATE:
2206 
2207  // ----------------------------------------------------------------------
2208  // Special input ports
2209  // ----------------------------------------------------------------------
2210 
2212  Fw::InputCmdPort m_cmdIn_InputPort[NUM_CMDIN_INPUT_PORTS];
2213 
2214  PRIVATE:
2215 
2216  // ----------------------------------------------------------------------
2217  // Typed input ports
2218  // ----------------------------------------------------------------------
2219 
2221  Svc::InputSchedPort m_checkTimers_InputPort[NUM_CHECKTIMERS_INPUT_PORTS];
2222 
2224  Fw::InputCmdResponsePort m_cmdResponseIn_InputPort[NUM_CMDRESPONSEIN_INPUT_PORTS];
2225 
2227  Svc::InputPingPort m_pingIn_InputPort[NUM_PINGIN_INPUT_PORTS];
2228 
2230  Svc::InputCmdSeqInPort m_seqRunIn_InputPort[NUM_SEQRUNIN_INPUT_PORTS];
2231 
2233  Svc::InputSchedPort m_tlmWrite_InputPort[NUM_TLMWRITE_INPUT_PORTS];
2234 
2235  PRIVATE:
2236 
2237  // ----------------------------------------------------------------------
2238  // Special output ports
2239  // ----------------------------------------------------------------------
2240 
2242  Fw::OutputCmdRegPort m_cmdRegOut_OutputPort[NUM_CMDREGOUT_OUTPUT_PORTS];
2243 
2245  Fw::OutputCmdResponsePort m_cmdResponseOut_OutputPort[NUM_CMDRESPONSEOUT_OUTPUT_PORTS];
2246 
2248  Fw::OutputLogPort m_logOut_OutputPort[NUM_LOGOUT_OUTPUT_PORTS];
2249 
2250 #if FW_ENABLE_TEXT_LOGGING == 1
2251 
2253  Fw::OutputLogTextPort m_logTextOut_OutputPort[NUM_LOGTEXTOUT_OUTPUT_PORTS];
2254 
2255 #endif
2256 
2258  Fw::OutputPrmGetPort m_prmGet_OutputPort[NUM_PRMGET_OUTPUT_PORTS];
2259 
2261  Fw::OutputPrmSetPort m_prmSet_OutputPort[NUM_PRMSET_OUTPUT_PORTS];
2262 
2264  Fw::OutputTimePort m_timeCaller_OutputPort[NUM_TIMECALLER_OUTPUT_PORTS];
2265 
2267  Fw::OutputTlmPort m_tlmOut_OutputPort[NUM_TLMOUT_OUTPUT_PORTS];
2268 
2269  PRIVATE:
2270 
2271  // ----------------------------------------------------------------------
2272  // Typed output ports
2273  // ----------------------------------------------------------------------
2274 
2276  Fw::OutputComPort m_cmdOut_OutputPort[NUM_CMDOUT_OUTPUT_PORTS];
2277 
2279  Fw::OutputPrmGetPort m_getParam_OutputPort[NUM_GETPARAM_OUTPUT_PORTS];
2280 
2282  Fw::OutputTlmGetPort m_getTlmChan_OutputPort[NUM_GETTLMCHAN_OUTPUT_PORTS];
2283 
2285  Svc::OutputPingPort m_pingOut_OutputPort[NUM_PINGOUT_OUTPUT_PORTS];
2286 
2288  Fw::OutputCmdResponsePort m_seqDoneOut_OutputPort[NUM_SEQDONEOUT_OUTPUT_PORTS];
2289 
2291  Svc::OutputCmdSeqInPort m_seqStartOut_OutputPort[NUM_SEQSTARTOUT_OUTPUT_PORTS];
2292 
2293  PRIVATE:
2294 
2295  // ----------------------------------------------------------------------
2296  // First update flags for telemetry channels
2297  // ----------------------------------------------------------------------
2298 
2300  bool m_first_update_State;
2301 
2303  bool m_first_update_SequencesSucceeded;
2304 
2306  bool m_first_update_SequencesFailed;
2307 
2309  bool m_first_update_SequencesCancelled;
2310 
2312  bool m_first_update_StatementsDispatched;
2313 
2315  bool m_first_update_StatementsFailed;
2316 
2318  bool m_first_update_LastDirectiveError;
2319 
2321  bool m_first_update_SeqPath;
2322 
2324  bool m_first_update_DebugBreakpointIdx;
2325 
2327  bool m_first_update_Debug;
2328 
2330  bool m_first_update_PRM_STATEMENT_TIMEOUT_SECS;
2331 
2332  PRIVATE:
2333 
2334  // ----------------------------------------------------------------------
2335  // Last value storage for telemetry channels
2336  // ----------------------------------------------------------------------
2337 
2339  I32 m_last_State;
2340 
2342  U64 m_last_SequencesSucceeded;
2343 
2345  U64 m_last_SequencesFailed;
2346 
2348  U64 m_last_SequencesCancelled;
2349 
2351  U64 m_last_StatementsDispatched;
2352 
2354  U64 m_last_StatementsFailed;
2355 
2357  Svc::FpySequencer_DirectiveErrorCode m_last_LastDirectiveError;
2358 
2360  Fw::TlmString m_last_SeqPath;
2361 
2363  U32 m_last_DebugBreakpointIdx;
2364 
2366  Svc::FpySequencer_DebugTelemetry m_last_Debug;
2367 
2369  F32 m_last_PRM_STATEMENT_TIMEOUT_SECS;
2370 
2371  PRIVATE:
2372 
2373  // ----------------------------------------------------------------------
2374  // Parameter validity flags
2375  // ----------------------------------------------------------------------
2376 
2378  Fw::ParamValid m_param_STATEMENT_TIMEOUT_SECS_valid;
2379 
2380  PRIVATE:
2381 
2382  // ----------------------------------------------------------------------
2383  // Parameter variables
2384  // ----------------------------------------------------------------------
2385 
2392  F32 m_STATEMENT_TIMEOUT_SECS;
2393 
2394  PRIVATE:
2395 
2396  // ----------------------------------------------------------------------
2397  // State machine instances
2398  // ----------------------------------------------------------------------
2399 
2401  Svc_FpySequencer_SequencerStateMachine m_stateMachine_sequencer;
2402 
2403  PRIVATE:
2404 
2405  // ----------------------------------------------------------------------
2406  // Mutexes
2407  // ----------------------------------------------------------------------
2408 
2410  Os::Mutex m_paramLock;
2411 
2412  };
2413 
2414 }
2415 
2416 #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
Definition: Time.hpp:9
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
Loads, validates and runs a sequence.
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 log_WARNING_HI_FileReadError(const Fw::StringBase &filePath, I32 errorCode) const
Log event FileReadError.
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 log_WARNING_HI_FileReadDeserializeError(const Fw::StringBase &filePath, I32 errorCode, U64 buffLeft, U64 buffLength) const
Log event FileReadDeserializeError.
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 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:26
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:86
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 log_WARNING_HI_EndOfFileError(const Fw::StringBase &filePath) const
Log event EndOfFileError.
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].
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 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
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:56
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.
Must be called after VALIDATE. Runs the sequence that was validated.
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.
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)
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
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