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/TimeInterval.hpp"
32 #include "Fw/Time/TimePortAc.hpp"
33 #include "Fw/Tlm/TlmGetPortAc.hpp"
34 #include "Fw/Tlm/TlmPortAc.hpp"
35 #include "Fw/Tlm/TlmString.hpp"
37 #include "Os/Mutex.hpp"
52 #include "Svc/Ping/PingPortAc.hpp"
58 
59 namespace Svc {
60 
67  {
68 
69  // ----------------------------------------------------------------------
70  // Friend classes
71  // ----------------------------------------------------------------------
72 
74  friend class FpySequencerTesterBase;
76  friend class FpySequencerTester;
77 
78  PROTECTED:
79 
80  // ----------------------------------------------------------------------
81  // Constants
82  // ----------------------------------------------------------------------
83 
85  enum {
87  };
88 
90  enum {
96  };
97 
99  enum {
108  };
109 
111  enum {
116  };
117 
119  enum {
120  OPCODE_RUN = 0x0,
126  OPCODE_DEBUG_BREAK = 0x5,
130  OPCODE_DEBUG_CONTINUE = 0x6,
138  };
139 
141  enum {
171  };
172 
174  enum {
185  };
186 
188  enum {
190  };
194 
196  enum class SmId : FwEnumStoreType {
197  sequencer,
198  };
199 
200  PROTECTED:
201 
202  // ----------------------------------------------------------------------
203  // Types for internal state machines
204  // ----------------------------------------------------------------------
205 
209  {
210 
211  public:
212 
215  FpySequencerComponentBase& component
216  );
217 
218  public:
219 
221  void init(
223  );
224 
225  public:
226 
229 
230  PRIVATE:
231 
233  void action_signalEntered(
234  Signal signal
235  );
236 
238  void action_setSequenceFilePath(
239  Signal signal,
241  );
242 
244  void action_setSequenceBlockState(
245  Signal signal,
247  );
248 
250  void action_validate(
251  Signal signal
252  );
253 
255  void action_report_seqSucceeded(
256  Signal signal
257  );
258 
260  void action_report_seqCancelled(
261  Signal signal
262  );
263 
265  void action_setGoalState_RUNNING(
266  Signal signal
267  );
268 
270  void action_setGoalState_VALID(
271  Signal signal
272  );
273 
275  void action_setGoalState_IDLE(
276  Signal signal
277  );
278 
280  void action_sendCmdResponse_OK(
281  Signal signal
282  );
283 
285  void action_sendCmdResponse_EXECUTION_ERROR(
286  Signal signal
287  );
288 
290  void action_clearSequenceFile(
291  Signal signal
292  );
293 
295  void action_clearDebugBreakpoint(
296  Signal signal
297  );
298 
300  void action_checkShouldWake(
301  Signal signal
302  );
303 
305  void action_dispatchStatement(
306  Signal signal
307  );
308 
310  void action_resetRuntime(
311  Signal signal
312  );
313 
315  void action_checkStatementTimeout(
316  Signal signal
317  );
318 
320  void action_incrementSequenceCounter(
321  Signal signal
322  );
323 
325  void action_report_debugBroken(
326  Signal signal
327  );
328 
330  void action_setDebugBreakpoint(
331  Signal signal,
333  );
334 
335  PRIVATE:
336 
338  bool guard_goalStateIs_RUNNING(
339  Signal signal
340  ) const;
341 
343  bool guard_shouldDebugBreak(
344  Signal signal
345  ) const;
346 
348  bool guard_debugBreakOnce(
349  Signal signal
350  ) const;
351 
352  PRIVATE:
353 
355  FpySequencerComponentBase& m_component;
356 
357  };
358 
359  public:
360 
361  // ----------------------------------------------------------------------
362  // Component initialization
363  // ----------------------------------------------------------------------
364 
366  void init(
367  FwSizeType queueDepth,
368  FwEnumStoreType instance = 0
369  );
370 
371  public:
372 
373  // ----------------------------------------------------------------------
374  // Getters for special input ports
375  // ----------------------------------------------------------------------
376 
381  FwIndexType portNum
382  );
383 
384  public:
385 
386  // ----------------------------------------------------------------------
387  // Getters for typed input ports
388  // ----------------------------------------------------------------------
389 
394  FwIndexType portNum
395  );
396 
401  FwIndexType portNum
402  );
403 
408  FwIndexType portNum
409  );
410 
415  FwIndexType portNum
416  );
417 
422  FwIndexType portNum
423  );
424 
425  public:
426 
427  // ----------------------------------------------------------------------
428  // Connect input ports to special output ports
429  // ----------------------------------------------------------------------
430 
433  FwIndexType portNum,
434  Fw::InputCmdRegPort* port
435  );
436 
439  FwIndexType portNum,
441  );
442 
445  FwIndexType portNum,
446  Fw::InputLogPort* port
447  );
448 
449 #if FW_ENABLE_TEXT_LOGGING == 1
450 
452  void set_logTextOut_OutputPort(
453  FwIndexType portNum,
454  Fw::InputLogTextPort* port
455  );
456 
457 #endif
458 
461  FwIndexType portNum,
462  Fw::InputPrmGetPort* port
463  );
464 
467  FwIndexType portNum,
468  Fw::InputPrmSetPort* port
469  );
470 
473  FwIndexType portNum,
474  Fw::InputTimePort* port
475  );
476 
479  FwIndexType portNum,
480  Fw::InputTlmPort* port
481  );
482 
483  public:
484 
485  // ----------------------------------------------------------------------
486  // Connect typed input ports to typed output ports
487  // ----------------------------------------------------------------------
488 
491  FwIndexType portNum,
492  Fw::InputComPort* port
493  );
494 
497  FwIndexType portNum,
498  Fw::InputPrmGetPort* port
499  );
500 
503  FwIndexType portNum,
504  Fw::InputTlmGetPort* port
505  );
506 
509  FwIndexType portNum,
510  Svc::InputPingPort* port
511  );
512 
513 #if FW_PORT_SERIALIZATION
514 
515  public:
516 
517  // ----------------------------------------------------------------------
518  // Connect serial input ports to special output ports
519  // ----------------------------------------------------------------------
520 
523  FwIndexType portNum,
524  Fw::InputSerializePort* port
525  );
526 
529  FwIndexType portNum,
530  Fw::InputSerializePort* port
531  );
532 
535  FwIndexType portNum,
536  Fw::InputSerializePort* port
537  );
538 
539 #if FW_ENABLE_TEXT_LOGGING == 1
540 
542  void set_logTextOut_OutputPort(
543  FwIndexType portNum,
544  Fw::InputSerializePort* port
545  );
546 
547 #endif
548 
551  FwIndexType portNum,
552  Fw::InputSerializePort* port
553  );
554 
557  FwIndexType portNum,
558  Fw::InputSerializePort* port
559  );
560 
563  FwIndexType portNum,
564  Fw::InputSerializePort* port
565  );
566 
567 #endif
568 
569 #if FW_PORT_SERIALIZATION
570 
571  public:
572 
573  // ----------------------------------------------------------------------
574  // Connect serial input ports to typed output ports
575  // ----------------------------------------------------------------------
576 
579  FwIndexType portNum,
580  Fw::InputSerializePort* port
581  );
582 
585  FwIndexType portNum,
586  Fw::InputSerializePort* port
587  );
588 
589 #endif
590 
591  public:
592 
593  // ----------------------------------------------------------------------
594  // Command registration
595  // ----------------------------------------------------------------------
596 
600  void regCommands();
601 
602  public:
603 
604  // ----------------------------------------------------------------------
605  // Parameter loading
606  // ----------------------------------------------------------------------
607 
611  void loadParameters();
612 
613  PROTECTED:
614 
615  // ----------------------------------------------------------------------
616  // Component construction and destruction
617  // ----------------------------------------------------------------------
618 
621  const char* compName = ""
622  );
623 
625  virtual ~FpySequencerComponentBase();
626 
627  PROTECTED:
628 
629  // ----------------------------------------------------------------------
630  // Getters for numbers of special input ports
631  // ----------------------------------------------------------------------
632 
637 
638  PROTECTED:
639 
640  // ----------------------------------------------------------------------
641  // Getters for numbers of typed input ports
642  // ----------------------------------------------------------------------
643 
648 
653 
658 
663 
668 
669  PROTECTED:
670 
671  // ----------------------------------------------------------------------
672  // Getters for numbers of special output ports
673  // ----------------------------------------------------------------------
674 
679 
684 
689 
690 #if FW_ENABLE_TEXT_LOGGING == 1
691 
695  FwIndexType getNum_logTextOut_OutputPorts() const;
696 
697 #endif
698 
703 
708 
713 
718 
719  PROTECTED:
720 
721  // ----------------------------------------------------------------------
722  // Getters for numbers of typed output ports
723  // ----------------------------------------------------------------------
724 
729 
734 
739 
744 
745  PROTECTED:
746 
747  // ----------------------------------------------------------------------
748  // Connection status queries for special output ports
749  // ----------------------------------------------------------------------
750 
755  FwIndexType portNum
756  );
757 
762  FwIndexType portNum
763  );
764 
769  FwIndexType portNum
770  );
771 
772 #if FW_ENABLE_TEXT_LOGGING == 1
773 
777  bool isConnected_logTextOut_OutputPort(
778  FwIndexType portNum
779  );
780 
781 #endif
782 
787  FwIndexType portNum
788  );
789 
794  FwIndexType portNum
795  );
796 
801  FwIndexType portNum
802  );
803 
808  FwIndexType portNum
809  );
810 
811  PROTECTED:
812 
813  // ----------------------------------------------------------------------
814  // Connection status queries for typed output ports
815  // ----------------------------------------------------------------------
816 
821  FwIndexType portNum
822  );
823 
828  FwIndexType portNum
829  );
830 
835  FwIndexType portNum
836  );
837 
842  FwIndexType portNum
843  );
844 
845  PROTECTED:
846 
847  // ----------------------------------------------------------------------
848  // Handlers to implement for typed input ports
849  // ----------------------------------------------------------------------
850 
852  virtual void checkTimers_handler(
853  FwIndexType portNum,
854  U32 context
855  ) = 0;
856 
858  virtual void cmdResponseIn_handler(
859  FwIndexType portNum,
860  FwOpcodeType opCode,
861  U32 cmdSeq,
862  const Fw::CmdResponse& response
863  ) = 0;
864 
866  virtual void pingIn_handler(
867  FwIndexType portNum,
868  U32 key
869  ) = 0;
870 
872  virtual void seqRunIn_handler(
873  FwIndexType portNum,
874  const Fw::StringBase& filename
875  ) = 0;
876 
878  virtual void tlmWrite_handler(
879  FwIndexType portNum,
880  U32 context
881  ) = 0;
882 
883  PROTECTED:
884 
885  // ----------------------------------------------------------------------
886  // Port handler base-class functions for typed input ports
887  //
888  // Call these functions directly to bypass the corresponding ports
889  // ----------------------------------------------------------------------
890 
893  FwIndexType portNum,
894  U32 context
895  );
896 
899  FwIndexType portNum,
900  FwOpcodeType opCode,
901  U32 cmdSeq,
902  const Fw::CmdResponse& response
903  );
904 
906  void pingIn_handlerBase(
907  FwIndexType portNum,
908  U32 key
909  );
910 
913  FwIndexType portNum,
914  const Fw::StringBase& filename
915  );
916 
919  FwIndexType portNum,
920  U32 context
921  );
922 
923  PROTECTED:
924 
925  // ----------------------------------------------------------------------
926  // Pre-message hooks for typed async input ports
927  //
928  // Each of these functions is invoked just before processing a message
929  // on the corresponding port. By default, they do nothing. You can
930  // override them to provide specific pre-message behavior.
931  // ----------------------------------------------------------------------
932 
934  virtual void checkTimers_preMsgHook(
935  FwIndexType portNum,
936  U32 context
937  );
938 
940  virtual void cmdResponseIn_preMsgHook(
941  FwIndexType portNum,
942  FwOpcodeType opCode,
943  U32 cmdSeq,
944  const Fw::CmdResponse& response
945  );
946 
948  virtual void pingIn_preMsgHook(
949  FwIndexType portNum,
950  U32 key
951  );
952 
954  virtual void seqRunIn_preMsgHook(
955  FwIndexType portNum,
956  const Fw::StringBase& filename
957  );
958 
960  virtual void tlmWrite_preMsgHook(
961  FwIndexType portNum,
962  U32 context
963  );
964 
965  PROTECTED:
966 
967  // ----------------------------------------------------------------------
968  // Invocation functions for typed output ports
969  // ----------------------------------------------------------------------
970 
972  void cmdOut_out(
973  FwIndexType portNum,
974  Fw::ComBuffer& data,
975  U32 context
976  );
977 
980  FwIndexType portNum,
981  FwPrmIdType id,
982  Fw::ParamBuffer& val
983  );
985 
988  FwIndexType portNum,
989  FwChanIdType id,
990  Fw::Time& timeTag,
991  Fw::TlmBuffer& val
992  );
995 
997  void pingOut_out(
998  FwIndexType portNum,
999  U32 key
1000  );
1001 
1002  PROTECTED:
1003 
1004  // ----------------------------------------------------------------------
1005  // Internal interface handlers
1006  // ----------------------------------------------------------------------
1007 
1010 
1013 
1016 
1018  virtual void directive_if_internalInterfaceHandler(const Svc::FpySequencer_IfDirective& directive) = 0;
1019 
1022 
1025 
1028 
1031 
1032  PROTECTED:
1033 
1034  // ----------------------------------------------------------------------
1035  // Internal interface base-class functions
1036  // ----------------------------------------------------------------------
1037 
1040 
1043 
1046 
1049 
1052 
1055 
1058 
1061 
1062  PROTECTED:
1063 
1064  // ----------------------------------------------------------------------
1065  // State getter functions
1066  // ----------------------------------------------------------------------
1067 
1070 
1071  PROTECTED:
1072 
1073  // ----------------------------------------------------------------------
1074  // Signal send functions
1075  // ----------------------------------------------------------------------
1076 
1080  );
1081 
1085  );
1086 
1090  );
1091 
1094 
1098  );
1099 
1102 
1105 
1108 
1111 
1114 
1117 
1120 
1123 
1126 
1129 
1132 
1135 
1138 
1141 
1144 
1147 
1150 
1153 
1157  );
1158 
1159  PROTECTED:
1160 
1161  // ----------------------------------------------------------------------
1162  // Functions to implement for internal state machine actions
1163  // ----------------------------------------------------------------------
1164 
1169  SmId smId,
1171  ) = 0;
1172 
1177  SmId smId,
1180  ) = 0;
1181 
1186  SmId smId,
1189  ) = 0;
1190 
1195  SmId smId,
1197  ) = 0;
1198 
1203  SmId smId,
1205  ) = 0;
1206 
1211  SmId smId,
1213  ) = 0;
1214 
1219  SmId smId,
1221  ) = 0;
1222 
1227  SmId smId,
1229  ) = 0;
1230 
1235  SmId smId,
1237  ) = 0;
1238 
1243  SmId smId,
1245  ) = 0;
1246 
1251  SmId smId,
1253  ) = 0;
1254 
1259  SmId smId,
1261  ) = 0;
1262 
1267  SmId smId,
1269  ) = 0;
1270 
1275  SmId smId,
1277  ) = 0;
1278 
1283  SmId smId,
1285  ) = 0;
1286 
1291  SmId smId,
1293  ) = 0;
1294 
1299  SmId smId,
1301  ) = 0;
1302 
1307  SmId smId,
1309  ) = 0;
1310 
1315  SmId smId,
1317  ) = 0;
1318 
1323  SmId smId,
1326  ) = 0;
1327 
1328  PROTECTED:
1329 
1330  // ----------------------------------------------------------------------
1331  // Functions to implement for internal state machine guards
1332  // ----------------------------------------------------------------------
1333 
1338  SmId smId,
1340  ) const = 0;
1341 
1347  SmId smId,
1349  ) const = 0;
1350 
1355  SmId smId,
1357  ) const = 0;
1358 
1359  PROTECTED:
1360 
1361  // ----------------------------------------------------------------------
1362  // Command response
1363  // ----------------------------------------------------------------------
1364 
1366  void cmdResponse_out(
1367  FwOpcodeType opCode,
1368  U32 cmdSeq,
1369  Fw::CmdResponse response
1370  );
1371 
1372  PROTECTED:
1373 
1374  // ----------------------------------------------------------------------
1375  // Command handlers to implement
1376  // ----------------------------------------------------------------------
1377 
1381  virtual void RUN_cmdHandler(
1382  FwOpcodeType opCode,
1383  U32 cmdSeq,
1384  const Fw::CmdStringArg& fileName,
1386  ) = 0;
1387 
1391  virtual void VALIDATE_cmdHandler(
1392  FwOpcodeType opCode,
1393  U32 cmdSeq,
1394  const Fw::CmdStringArg& fileName
1395  ) = 0;
1396 
1400  virtual void RUN_VALIDATED_cmdHandler(
1401  FwOpcodeType opCode,
1402  U32 cmdSeq,
1404  ) = 0;
1405 
1410  virtual void CANCEL_cmdHandler(
1411  FwOpcodeType opCode,
1412  U32 cmdSeq
1413  ) = 0;
1414 
1421  virtual void DEBUG_SET_BREAKPOINT_cmdHandler(
1422  FwOpcodeType opCode,
1423  U32 cmdSeq,
1424  U32 stmtIdx,
1425  bool breakOnce
1426  ) = 0;
1427 
1433  virtual void DEBUG_BREAK_cmdHandler(
1434  FwOpcodeType opCode,
1435  U32 cmdSeq,
1436  bool breakOnce
1437  ) = 0;
1438 
1443  virtual void DEBUG_CONTINUE_cmdHandler(
1444  FwOpcodeType opCode,
1445  U32 cmdSeq
1446  ) = 0;
1447 
1452  virtual void DEBUG_CLEAR_BREAKPOINT_cmdHandler(
1453  FwOpcodeType opCode,
1454  U32 cmdSeq
1455  ) = 0;
1456 
1457  PROTECTED:
1458 
1459  // ----------------------------------------------------------------------
1460  // Command handler base-class functions
1461  //
1462  // Call these functions directly to bypass the command input port
1463  // ----------------------------------------------------------------------
1464 
1468  void RUN_cmdHandlerBase(
1469  FwOpcodeType opCode,
1470  U32 cmdSeq,
1471  Fw::CmdArgBuffer& args
1472  );
1473 
1478  FwOpcodeType opCode,
1479  U32 cmdSeq,
1480  Fw::CmdArgBuffer& args
1481  );
1482 
1487  FwOpcodeType opCode,
1488  U32 cmdSeq,
1489  Fw::CmdArgBuffer& args
1490  );
1491 
1496  void CANCEL_cmdHandlerBase(
1497  FwOpcodeType opCode,
1498  U32 cmdSeq,
1499  Fw::CmdArgBuffer& args
1500  );
1501 
1509  FwOpcodeType opCode,
1510  U32 cmdSeq,
1511  Fw::CmdArgBuffer& args
1512  );
1513 
1520  FwOpcodeType opCode,
1521  U32 cmdSeq,
1522  Fw::CmdArgBuffer& args
1523  );
1524 
1530  FwOpcodeType opCode,
1531  U32 cmdSeq,
1532  Fw::CmdArgBuffer& args
1533  );
1534 
1540  FwOpcodeType opCode,
1541  U32 cmdSeq,
1542  Fw::CmdArgBuffer& args
1543  );
1544 
1545  PROTECTED:
1546 
1547  // ----------------------------------------------------------------------
1548  // Pre-message hooks for async commands
1549  //
1550  // Each of these functions is invoked just before processing the
1551  // corresponding command. By default they do nothing. You can
1552  // override them to provide specific pre-command behavior.
1553  // ----------------------------------------------------------------------
1554 
1556  virtual void RUN_preMsgHook(
1557  FwOpcodeType opCode,
1558  U32 cmdSeq
1559  );
1560 
1562  virtual void VALIDATE_preMsgHook(
1563  FwOpcodeType opCode,
1564  U32 cmdSeq
1565  );
1566 
1568  virtual void RUN_VALIDATED_preMsgHook(
1569  FwOpcodeType opCode,
1570  U32 cmdSeq
1571  );
1572 
1574  virtual void CANCEL_preMsgHook(
1575  FwOpcodeType opCode,
1576  U32 cmdSeq
1577  );
1578 
1580  virtual void DEBUG_SET_BREAKPOINT_preMsgHook(
1581  FwOpcodeType opCode,
1582  U32 cmdSeq
1583  );
1584 
1586  virtual void DEBUG_BREAK_preMsgHook(
1587  FwOpcodeType opCode,
1588  U32 cmdSeq
1589  );
1590 
1592  virtual void DEBUG_CONTINUE_preMsgHook(
1593  FwOpcodeType opCode,
1594  U32 cmdSeq
1595  );
1596 
1598  virtual void DEBUG_CLEAR_BREAKPOINT_preMsgHook(
1599  FwOpcodeType opCode,
1600  U32 cmdSeq
1601  );
1602 
1603  PROTECTED:
1604 
1605  // ----------------------------------------------------------------------
1606  // Event logging functions
1607  // ----------------------------------------------------------------------
1608 
1610  void log_WARNING_HI_InvalidCommand(I32 state) const;
1611 
1613  void log_WARNING_HI_InvalidSeqRunCall(I32 state) const;
1614 
1617  const Fw::StringBase& filePath,
1618  I32 errorCode
1619  ) const;
1620 
1623  const Fw::StringBase& filePath,
1624  I32 errorCode
1625  ) const;
1626 
1628  void log_WARNING_HI_EndOfFileError(const Fw::StringBase& filePath) const;
1629 
1632  const Fw::StringBase& filePath,
1633  I32 errorCode,
1634  U64 buffLeft,
1635  U64 buffLength
1636  ) const;
1637 
1640  U8 expected,
1641  U8 actual
1642  ) const;
1643 
1646  U32 expected,
1647  U32 actual
1648  ) const;
1649 
1651  void log_WARNING_HI_ExtraBytesInSequence(U32 remaining) const;
1652 
1655  U64 bufferSize,
1656  const Fw::StringBase& filePath
1657  ) const;
1658 
1661  Svc::Fpy::StatementType stmtType,
1662  U32 stmtOpcode,
1663  U32 stmtIdx,
1664  const Fw::StringBase& filePath,
1665  Fw::CmdResponse response
1666  ) const;
1667 
1669  void log_ACTIVITY_HI_SequenceDone(const Fw::StringBase& filePath) const;
1670 
1672  void log_ACTIVITY_HI_SequenceCancelled(const Fw::StringBase& filePath) const;
1673 
1676  U32 opcode,
1677  U32 stmtIdx,
1678  const Fw::StringBase& filePath
1679  ) const;
1680 
1683  U32 cmdOpcode,
1684  U64 bufCapacity,
1685  U64 curPos,
1686  U64 writeSize,
1687  U8 errorCode,
1688  U32 stmtIdx
1689  ) const;
1690 
1693  I32 state,
1694  U32 opcode,
1695  Fw::CmdResponse response
1696  ) const;
1697 
1700  U32 opcode,
1701  Fw::CmdResponse response,
1702  U16 oldSequenceIdx,
1703  U16 currentSequenceIdx
1704  ) const;
1705 
1708  U32 opcode,
1709  Fw::CmdResponse response
1710  ) const;
1711 
1714  U32 opcode,
1715  Fw::CmdResponse response,
1716  U32 expectedOpcode
1717  ) const;
1718 
1721  U32 opcode,
1722  Fw::CmdResponse response,
1723  U16 actualCmdIdx,
1724  U16 expectedCmdIdx
1725  ) const;
1726 
1729  U32 opcode,
1730  U32 stmtIdx,
1731  I32 errorCode,
1732  U64 buffLeft,
1733  U64 buffLength
1734  ) const;
1735 
1738  I32 internalTimeBase,
1739  I32 otherTimeBase
1740  ) const;
1741 
1744  I32 internalTimeContext,
1745  I32 otherTimeContext
1746  ) const;
1747 
1750  Svc::Fpy::StatementType stmtType,
1751  U32 stmtOpcode,
1752  U32 stmtIdx,
1753  const Fw::StringBase& filePath
1754  ) const;
1755 
1758  U8 count,
1759  U8 max
1760  ) const;
1761 
1764  U16 count,
1765  U16 max
1766  ) const;
1767 
1770  U32 stmtIdx,
1771  bool breakOnce
1772  ) const;
1773 
1776  U32 breakpointIdx,
1777  bool breakOnce
1778  ) const;
1779 
1782 
1783  PROTECTED:
1784 
1785  // ----------------------------------------------------------------------
1786  // Telemetry write functions
1787  // ----------------------------------------------------------------------
1788 
1792  void tlmWrite_State(
1793  I32 arg,
1794  Fw::Time _tlmTime = Fw::Time()
1795  );
1796 
1801  U64 arg,
1802  Fw::Time _tlmTime = Fw::Time()
1803  );
1804 
1809  U64 arg,
1810  Fw::Time _tlmTime = Fw::Time()
1811  );
1812 
1817  U64 arg,
1818  Fw::Time _tlmTime = Fw::Time()
1819  );
1820 
1827  U64 arg,
1828  Fw::Time _tlmTime = Fw::Time()
1829  );
1830 
1835  U64 arg,
1836  Fw::Time _tlmTime = Fw::Time()
1837  );
1838 
1842  void tlmWrite_SeqPath(
1843  const Fw::StringBase& arg,
1844  Fw::Time _tlmTime = Fw::Time()
1845  );
1846 
1851  U32 arg,
1852  Fw::Time _tlmTime = Fw::Time()
1853  );
1854 
1859  void tlmWrite_Debug(
1861  Fw::Time _tlmTime = Fw::Time()
1862  );
1863 
1868  F32 arg,
1869  Fw::Time _tlmTime = Fw::Time()
1870  );
1871 
1872  PROTECTED:
1873 
1874  // ----------------------------------------------------------------------
1875  // Parameter update hook
1876  // ----------------------------------------------------------------------
1877 
1881  virtual void parameterUpdated(
1882  FwPrmIdType id
1883  );
1884 
1885  // ----------------------------------------------------------------------
1886  // Parameter load hook
1887  // ----------------------------------------------------------------------
1888 
1892  virtual void parametersLoaded();
1893 
1894  PROTECTED:
1895 
1896  // ----------------------------------------------------------------------
1897  // Parameter get functions
1898  // ----------------------------------------------------------------------
1899 
1909  Fw::ParamValid& valid
1910  );
1911 
1912  PROTECTED:
1913 
1914  // ----------------------------------------------------------------------
1915  // Time
1916  // ----------------------------------------------------------------------
1917 
1921  Fw::Time getTime() const;
1922 
1923  PRIVATE:
1924 
1925  // ----------------------------------------------------------------------
1926  // Message dispatch functions
1927  // ----------------------------------------------------------------------
1928 
1930  virtual MsgDispatchStatus doDispatch();
1931 
1932  PRIVATE:
1933 
1934  // ----------------------------------------------------------------------
1935  // Calls for messages received on special input ports
1936  // ----------------------------------------------------------------------
1937 
1939  static void m_p_cmdIn_in(
1940  Fw::PassiveComponentBase* callComp,
1941  FwIndexType portNum,
1942  FwOpcodeType opCode,
1943  U32 cmdSeq,
1944  Fw::CmdArgBuffer& args
1945  );
1946 
1947  PRIVATE:
1948 
1949  // ----------------------------------------------------------------------
1950  // Calls for messages received on typed input ports
1951  // ----------------------------------------------------------------------
1952 
1954  static void m_p_checkTimers_in(
1955  Fw::PassiveComponentBase* callComp,
1956  FwIndexType portNum,
1957  U32 context
1958  );
1959 
1961  static void m_p_cmdResponseIn_in(
1962  Fw::PassiveComponentBase* callComp,
1963  FwIndexType portNum,
1964  FwOpcodeType opCode,
1965  U32 cmdSeq,
1966  const Fw::CmdResponse& response
1967  );
1968 
1970  static void m_p_pingIn_in(
1971  Fw::PassiveComponentBase* callComp,
1972  FwIndexType portNum,
1973  U32 key
1974  );
1975 
1977  static void m_p_seqRunIn_in(
1978  Fw::PassiveComponentBase* callComp,
1979  FwIndexType portNum,
1980  const Fw::StringBase& filename
1981  );
1982 
1984  static void m_p_tlmWrite_in(
1985  Fw::PassiveComponentBase* callComp,
1986  FwIndexType portNum,
1987  U32 context
1988  );
1989 
1990  PRIVATE:
1991 
1992  // ----------------------------------------------------------------------
1993  // Send signal helper functions
1994  // ----------------------------------------------------------------------
1995 
1997  void sendSignalStart(
1998  SmId smId,
1999  FwEnumStoreType signal,
2000  Fw::SerializeBufferBase& buffer
2001  );
2002 
2004  void sequencer_sendSignalFinish(
2005  Fw::SerializeBufferBase& buffer
2006  );
2007 
2008  PRIVATE:
2009 
2010  // ----------------------------------------------------------------------
2011  // Helper functions for state machine dispatch
2012  // ----------------------------------------------------------------------
2013 
2015  void smDispatch(
2016  Fw::SerializeBufferBase& buffer
2017  );
2018 
2020  static void deserializeSmIdAndSignal(
2021  Fw::SerializeBufferBase& buffer,
2022  FwEnumStoreType& smId,
2023  FwEnumStoreType& signal
2024  );
2025 
2027  void Svc_FpySequencer_SequencerStateMachine_smDispatch(
2028  Fw::SerializeBufferBase& buffer,
2031  );
2032 
2033  PRIVATE:
2034 
2035  // ----------------------------------------------------------------------
2036  // Parameter set functions
2037  // ----------------------------------------------------------------------
2038 
2042  Fw::CmdResponse paramSet_STATEMENT_TIMEOUT_SECS(
2044  );
2045 
2046  PRIVATE:
2047 
2048  // ----------------------------------------------------------------------
2049  // Parameter save functions
2050  // ----------------------------------------------------------------------
2051 
2055  Fw::CmdResponse paramSave_STATEMENT_TIMEOUT_SECS();
2056 
2057  PRIVATE:
2058 
2059  // ----------------------------------------------------------------------
2060  // Special input ports
2061  // ----------------------------------------------------------------------
2062 
2064  Fw::InputCmdPort m_cmdIn_InputPort[NUM_CMDIN_INPUT_PORTS];
2065 
2066  PRIVATE:
2067 
2068  // ----------------------------------------------------------------------
2069  // Typed input ports
2070  // ----------------------------------------------------------------------
2071 
2073  Svc::InputSchedPort m_checkTimers_InputPort[NUM_CHECKTIMERS_INPUT_PORTS];
2074 
2076  Fw::InputCmdResponsePort m_cmdResponseIn_InputPort[NUM_CMDRESPONSEIN_INPUT_PORTS];
2077 
2079  Svc::InputPingPort m_pingIn_InputPort[NUM_PINGIN_INPUT_PORTS];
2080 
2082  Svc::InputCmdSeqInPort m_seqRunIn_InputPort[NUM_SEQRUNIN_INPUT_PORTS];
2083 
2085  Svc::InputSchedPort m_tlmWrite_InputPort[NUM_TLMWRITE_INPUT_PORTS];
2086 
2087  PRIVATE:
2088 
2089  // ----------------------------------------------------------------------
2090  // Special output ports
2091  // ----------------------------------------------------------------------
2092 
2094  Fw::OutputCmdRegPort m_cmdRegOut_OutputPort[NUM_CMDREGOUT_OUTPUT_PORTS];
2095 
2097  Fw::OutputCmdResponsePort m_cmdResponseOut_OutputPort[NUM_CMDRESPONSEOUT_OUTPUT_PORTS];
2098 
2100  Fw::OutputLogPort m_logOut_OutputPort[NUM_LOGOUT_OUTPUT_PORTS];
2101 
2102 #if FW_ENABLE_TEXT_LOGGING == 1
2103 
2105  Fw::OutputLogTextPort m_logTextOut_OutputPort[NUM_LOGTEXTOUT_OUTPUT_PORTS];
2106 
2107 #endif
2108 
2110  Fw::OutputPrmGetPort m_prmGet_OutputPort[NUM_PRMGET_OUTPUT_PORTS];
2111 
2113  Fw::OutputPrmSetPort m_prmSet_OutputPort[NUM_PRMSET_OUTPUT_PORTS];
2114 
2116  Fw::OutputTimePort m_timeCaller_OutputPort[NUM_TIMECALLER_OUTPUT_PORTS];
2117 
2119  Fw::OutputTlmPort m_tlmOut_OutputPort[NUM_TLMOUT_OUTPUT_PORTS];
2120 
2121  PRIVATE:
2122 
2123  // ----------------------------------------------------------------------
2124  // Typed output ports
2125  // ----------------------------------------------------------------------
2126 
2128  Fw::OutputComPort m_cmdOut_OutputPort[NUM_CMDOUT_OUTPUT_PORTS];
2129 
2131  Fw::OutputPrmGetPort m_getParam_OutputPort[NUM_GETPARAM_OUTPUT_PORTS];
2132 
2134  Fw::OutputTlmGetPort m_getTlmChan_OutputPort[NUM_GETTLMCHAN_OUTPUT_PORTS];
2135 
2137  Svc::OutputPingPort m_pingOut_OutputPort[NUM_PINGOUT_OUTPUT_PORTS];
2138 
2139  PRIVATE:
2140 
2141  // ----------------------------------------------------------------------
2142  // First update flags for telemetry channels
2143  // ----------------------------------------------------------------------
2144 
2146  bool m_first_update_State;
2147 
2149  bool m_first_update_SequencesSucceeded;
2150 
2152  bool m_first_update_SequencesFailed;
2153 
2155  bool m_first_update_SequencesCancelled;
2156 
2158  bool m_first_update_StatementsDispatched;
2159 
2161  bool m_first_update_StatementsFailed;
2162 
2164  bool m_first_update_SeqPath;
2165 
2167  bool m_first_update_DebugBreakpointIdx;
2168 
2170  bool m_first_update_Debug;
2171 
2173  bool m_first_update_STATEMENT_TIMEOUT_SECS;
2174 
2175  PRIVATE:
2176 
2177  // ----------------------------------------------------------------------
2178  // Last value storage for telemetry channels
2179  // ----------------------------------------------------------------------
2180 
2182  I32 m_last_State;
2183 
2185  U64 m_last_SequencesSucceeded;
2186 
2188  U64 m_last_SequencesFailed;
2189 
2191  U64 m_last_SequencesCancelled;
2192 
2194  U64 m_last_StatementsDispatched;
2195 
2197  U64 m_last_StatementsFailed;
2198 
2200  Fw::TlmString m_last_SeqPath;
2201 
2203  U32 m_last_DebugBreakpointIdx;
2204 
2206  Svc::FpySequencer_DebugTelemetry m_last_Debug;
2207 
2209  F32 m_last_STATEMENT_TIMEOUT_SECS;
2210 
2211  PRIVATE:
2212 
2213  // ----------------------------------------------------------------------
2214  // Parameter validity flags
2215  // ----------------------------------------------------------------------
2216 
2218  Fw::ParamValid m_param_STATEMENT_TIMEOUT_SECS_valid;
2219 
2220  PRIVATE:
2221 
2222  // ----------------------------------------------------------------------
2223  // Parameter variables
2224  // ----------------------------------------------------------------------
2225 
2232  F32 m_STATEMENT_TIMEOUT_SECS;
2233 
2234  PRIVATE:
2235 
2236  // ----------------------------------------------------------------------
2237  // State machine instances
2238  // ----------------------------------------------------------------------
2239 
2241  Svc_FpySequencer_SequencerStateMachine m_stateMachine_sequencer;
2242 
2243  PRIVATE:
2244 
2245  // ----------------------------------------------------------------------
2246  // Mutexes
2247  // ----------------------------------------------------------------------
2248 
2250  Os::Mutex m_paramLock;
2251 
2252  };
2253 
2254 }
2255 
2256 #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.
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
Definition: Time.hpp:9
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
Fw::InputCmdResponsePort * get_cmdResponseIn_InputPort(FwIndexType portNum)
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_StatementFailed(Svc::Fpy::StatementType stmtType, U32 stmtOpcode, U32 stmtIdx, const Fw::StringBase &filePath, Fw::CmdResponse response) const
Log event StatementFailed.
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
void log_WARNING_HI_CmdResponseWhileNotAwaiting(U32 opcode, Fw::CmdResponse response) const
Log event CmdResponseWhileNotAwaiting.
I32 FwEnumStoreType
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 DEBUG_CLEAR_BREAKPOINT_cmdHandler(FwOpcodeType opCode, U32 cmdSeq)=0
virtual void parameterUpdated(FwPrmIdType id)
Called whenever a parameter is updated.
Loads, validates and runs a sequence.
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.
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 sequencer_sendSignal_cmd_DEBUG_SET_BREAKPOINT(const Svc::FpySequencer_DebugBreakpointArgs &value)
Send signal cmd_DEBUG_SET_BREAKPOINT to state machine sequencer.
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
U32 FwChanIdType
The type of a telemetry channel identifier.
virtual void CANCEL_cmdHandler(FwOpcodeType opCode, U32 cmdSeq)=0
void tlmWrite_State(I32 arg, Fw::Time _tlmTime=Fw::Time())
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 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.
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 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 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].
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_ExtraBytesInSequence(U32 remaining) const
Log event ExtraBytesInSequence.
void tlmWrite_StatementsFailed(U64 arg, Fw::Time _tlmTime=Fw::Time())
void log_WARNING_HI_StatementTimedOut(Svc::Fpy::StatementType stmtType, U32 stmtOpcode, U32 stmtIdx, const Fw::StringBase &filePath) const
Log event StatementTimedOut.
void regCommands()
Register commands with the Command Dispatcher.
F32 paramGet_STATEMENT_TIMEOUT_SECS(Fw::ParamValid &valid)
void log_WARNING_HI_EndOfFileError(const Fw::StringBase &filePath) const
Log event EndOfFileError.
void log_WARNING_HI_WrongCmdResponseOpcode(U32 opcode, Fw::CmdResponse response, U32 expectedOpcode) const
Log event WrongCmdResponseOpcode.
U32 FwOpcodeType
The type of a command opcode.
void cmdResponse_out(FwOpcodeType opCode, U32 cmdSeq, Fw::CmdResponse response)
Emit command response.
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)
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.
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_HI_WrongCmdResponseIndex(U32 opcode, Fw::CmdResponse response, U16 actualCmdIdx, U16 expectedCmdIdx) const
Log event WrongCmdResponseIndex.
FpySequencerComponentBase(const char *compName="")
Construct FpySequencerComponentBase object.
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)
Must be called after VALIDATE. Runs the sequence that was validated.
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 log_WARNING_LO_CmdResponseWhileNotRunningSequence(I32 state, U32 opcode, Fw::CmdResponse response) const
Log event CmdResponseWhileNotRunningSequence.
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 log_WARNING_HI_DirectiveDeserializeError(U32 opcode, U32 stmtIdx, I32 errorCode, U64 buffLeft, U64 buffLength) const
Log event DirectiveDeserializeError.
void directive_setLocalVar_internalInterfaceInvoke(const Svc::FpySequencer_SetLocalVarDirective &directive)
Internal interface base-class function for directive_setLocalVar.
void set_cmdRegOut_OutputPort(FwIndexType portNum, Fw::InputCmdRegPort *port)
Connect port to cmdRegOut[portNum].
void sequencer_sendSignal_stmtResponse_beginSleep()
Send signal stmtResponse_beginSleep to state machine sequencer.
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.
U32 FwPrmIdType
The type of a parameter identifier.
virtual void tlmWrite_handler(FwIndexType portNum, U32 context)=0
Handler for input port tlmWrite.
Svc::InputCmdSeqInPort * get_seqRunIn_InputPort(FwIndexType portNum)
void loadParameters()
Load the parameters from a parameter source.
virtual void Svc_FpySequencer_SequencerStateMachine_action_sendCmdResponse_EXECUTION_ERROR(SmId smId, Svc_FpySequencer_SequencerStateMachine::Signal signal)=0
void log_WARNING_HI_InvalidSeqRunCall(I32 state) const
Log event InvalidSeqRunCall.
virtual void directive_if_internalInterfaceHandler(const Svc::FpySequencer_IfDirective &directive)=0
Internal interface handler for directive_if.
void log_WARNING_HI_CommandSerializeError(U32 cmdOpcode, U64 bufCapacity, U64 curPos, U64 writeSize, U8 errorCode, U32 stmtIdx) const
Log event CommandSerializeError.
virtual void Svc_FpySequencer_SequencerStateMachine_action_setGoalState_VALID(SmId smId, Svc_FpySequencer_SequencerStateMachine::Signal signal)=0
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.
void log_WARNING_HI_TooManySequenceStatements(U16 count, U16 max) const
Log event TooManySequenceStatements.
void tlmWrite_STATEMENT_TIMEOUT_SECS(F32 arg, Fw::Time _tlmTime=Fw::Time())
void sequencer_sendSignal_result_timeOpFailed()
Send signal result_timeOpFailed to state machine sequencer.
virtual void directive_setLocalVar_internalInterfaceHandler(const Svc::FpySequencer_SetLocalVarDirective &directive)=0
Internal interface handler for directive_setLocalVar.
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_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.
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.
void log_WARNING_LO_CmdResponseFromOldSequence(U32 opcode, Fw::CmdResponse response, U16 oldSequenceIdx, U16 currentSequenceIdx) const
Log event CmdResponseFromOldSequence.
bool isConnected_cmdOut_OutputPort(FwIndexType portNum)
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.
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.
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.
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.
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 log_WARNING_HI_UnknownSequencerDirective(U32 opcode, U32 stmtIdx, const Fw::StringBase &filePath) const
Log event UnknownSequencerDirective.
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].
#define U64(C)
Definition: sha.h:180