F´ Flight Software - C/C++ Documentation
A framework for building embedded system applications to NASA flight quality standards.
WasmSequencerComponentAc.hpp
Go to the documentation of this file.
1 // ======================================================================
2 // \title WasmSequencerComponentAc.hpp
3 // \author Generated by fpp-to-cpp
4 // \brief hpp file for WasmSequencer component base class
5 // ======================================================================
6 
7 #ifndef Svc_WasmSequencerComponentAc_HPP
8 #define Svc_WasmSequencerComponentAc_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 #include "Fw/Log/LogTextPortAc.hpp"
23 #if !FW_DIRECT_PORT_CALLS
25 #endif
26 #if !FW_DIRECT_PORT_CALLS
28 #endif
29 #include "Fw/Prm/PrmGetPortAc.hpp"
30 #include "Fw/Prm/PrmSetPortAc.hpp"
31 #include "Fw/Prm/PrmString.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"
62 
63 static_assert(
65  "WasmSequencer component requires serialization"
66 );
67 
68 namespace Svc {
69 
76  {
77 
78  // ----------------------------------------------------------------------
79  // Friend classes
80  // ----------------------------------------------------------------------
81 
85  friend class WasmSequencerTester;
86 
87  protected:
88 
89  // ----------------------------------------------------------------------
90  // Constants
91  // ----------------------------------------------------------------------
92 
94  enum {
96  };
97 
99  enum {
105  };
106 
108  enum {
110  };
111 
113  enum {
122  };
123 
125  enum {
131  };
132 
134  enum {
136  };
137 
139  enum {
140  OPCODE_RUN = 0x0,
141  OPCODE_LOAD = 0x1,
152  OPCODE_INVOKE = 0x2,
156  OPCODE_WAIT = 0x3,
158  OPCODE_PAUSE = 0x5,
160  OPCODE_CONTINUE = 0x6,
166  OPCODE_GLOBAL_SET_I64 = 0x8,
168  OPCODE_GLOBAL_SET_F32 = 0x9,
170  OPCODE_GLOBAL_SET_F64 = 0xa,
172  OPCODE_GLOBAL_GET = 0xb,
181  };
182 
184  enum {
207  EVENTID_BUFFERTOOLARGE = 0x12,
219  EVENTID_SEQUENCESTARTING = 0x1a,
225  EVENTID_SEQUENCEPANIC = 0x1e,
229  EVENTID_SEQUENCEPAUSED = 0x21,
248  };
249 
251  enum {
261  };
262 
264  enum {
270  PARAMID_SEQ_BASE_DIR = 0x2,
276  };
280 
282  enum class SmId : FwEnumStoreType {
283  controller,
284  interpreter,
285  };
286 
287  protected:
288 
289  // ----------------------------------------------------------------------
290  // Types for internal state machines
291  // ----------------------------------------------------------------------
292 
296  {
297 
298  // ----------------------------------------------------------------------
299  // Friend classes
300  // ----------------------------------------------------------------------
301 
305  friend class WasmSequencerTester;
306 
307  public:
308 
311  WasmSequencerComponentBase& component
312  );
313 
314  public:
315 
317  void init(
319  );
320 
321  public:
322 
325 
326  private:
327 
329  void action_processInvoke(
330  Signal signal,
332  );
333 
335  void action_setCancelRequested(
336  Signal signal
337  );
338 
340  void action_clearCancelRequested(
341  Signal signal
342  );
343 
345  void action_cancelPendingRequest(
346  Signal signal,
348  );
349 
351  void action_respond_noblock_OK(
352  Signal signal,
354  );
355 
357  void action_respond_ERROR(
358  Signal signal,
360  );
361 
363  void action_incrementSequenceFailure(
364  Signal signal
365  );
366 
368  void action_respondInvoke_BUSY(
369  Signal signal,
371  );
372 
374  void action_respondInvoke_ERROR(
375  Signal signal,
377  );
378 
380  void action_respondLoad_BUSY(
381  Signal signal,
382  const Svc::WasmSequencer_LoadRequest& value
383  );
384 
386  void action_respond_block_OK(
387  Signal signal,
389  );
390 
392  void action_respond_block_ERROR(
393  Signal signal,
395  );
396 
398  void action_load(
399  Signal signal,
400  const Svc::WasmSequencer_LoadRequest& value
401  );
402 
404  void action_invokeStart(
405  Signal signal,
407  );
408 
410  void action_invokeMain(
411  Signal signal,
413  );
414 
416  void action_reportModuleInvalidMain(
417  Signal signal,
419  );
420 
422  void action_reportModuleMainInvokeFailed(
423  Signal signal,
425  );
426 
428  void action_reportModuleStartInvokeFailed(
429  Signal signal,
431  );
432 
434  void action_reportModuleStarted(
435  Signal signal,
437  );
438 
440  void action_reportModuleSucceeded(
441  Signal signal,
443  );
444 
446  void action_reportModuleStartFailed(
447  Signal signal,
449  );
450 
452  void action_reportModuleMainFailed(
453  Signal signal,
455  );
456 
458  void action_resetStore(
459  Signal signal
460  );
461 
463  void action_runEngine(
464  Signal signal,
466  );
467 
468  private:
469 
471  bool guard_cancelRequested(
472  Signal signal
473  ) const;
474 
476  bool guard_moduleHasStart(
477  Signal signal,
479  ) const;
480 
482  bool guard_moduleHasValidMain(
483  Signal signal,
485  ) const;
486 
488  bool guard_invokeSucceeded(
489  Signal signal,
491  ) const;
492 
494  bool guard_interpreterSucceeded(
495  Signal signal
496  ) const;
497 
498  private:
499 
501  WasmSequencerComponentBase& m_component;
502 
503  };
504 
508  {
509 
510  // ----------------------------------------------------------------------
511  // Friend classes
512  // ----------------------------------------------------------------------
513 
517  friend class WasmSequencerTester;
518 
519  public:
520 
523  WasmSequencerComponentBase& component
524  );
525 
526  public:
527 
529  void init(
531  );
532 
533  public:
534 
537 
538  private:
539 
541  void action_cmdReplyOK(
542  Signal signal,
544  );
545 
547  void action_signalEntered(
548  Signal signal
549  );
550 
552  void action_spin(
553  Signal signal
554  );
555 
557  void action_reset(
558  Signal signal
559  );
560 
562  void action_clearExitStatus(
563  Signal signal
564  );
565 
567  void action_setExitReason_INTERPRETER_FINISHED(
568  Signal signal
569  );
570 
572  void action_setExitReason_INTERPRETER_TRAP(
573  Signal signal
574  );
575 
577  void action_setExitReason_REPLY_TIMEOUT(
578  Signal signal
579  );
580 
582  void action_setExitReason_HOST_FAILURE(
583  Signal signal
584  );
585 
587  void action_setExitReason_TIMER_INCOMPARABLE(
588  Signal signal
589  );
590 
592  void action_setExitReason_UNEXPECTED_REPLY(
593  Signal signal
594  );
595 
597  void action_setExitReason_CANCEL(
598  Signal signal
599  );
600 
602  void action_setExitCode(
603  Signal signal,
604  I32 value
605  );
606 
608  void action_setTrapReason(
609  Signal signal,
610  const Svc::WasmSequencer_TrapReason& value
611  );
612 
614  void action_setLastHostFunction(
615  Signal signal
616  );
617 
619  void action_finish(
620  Signal signal
621  );
622 
624  void action_reportPaused(
625  Signal signal
626  );
627 
629  void action_clearPause(
630  Signal signal
631  );
632 
634  void action_dispatchPendingHostFunction(
635  Signal signal
636  );
637 
639  void action_clearPendingHostFunction(
640  Signal signal
641  );
642 
644  void action_setContext(
645  Signal signal,
647  );
648 
650  void action_clearContext(
651  Signal signal
652  );
653 
655  void action_resume(
656  Signal signal
657  );
658 
660  void action_resumeI32(
661  Signal signal,
662  I32 value
663  );
664 
666  void action_checkSleepTimers(
667  Signal signal
668  );
669 
671  void action_checkTimeout(
672  Signal signal
673  );
674 
676  void action_dequeueSerialAndResume(
677  Signal signal,
678  const FwIndexType& value
679  );
680 
681  private:
682 
684  bool guard_pendingPause(
685  Signal signal
686  ) const;
687 
689  bool guard_pendingHostFunction(
690  Signal signal
691  ) const;
692 
694  bool guard_pendingHostFunctionIsSleep(
695  Signal signal
696  ) const;
697 
699  bool guard_blockingSerialIn(
700  Signal signal,
701  const FwIndexType& value
702  ) const;
703 
705  bool guard_dequeueSucceeded(
706  Signal signal
707  ) const;
708 
709  private:
710 
712  WasmSequencerComponentBase& m_component;
713 
714  };
715 
716  public:
717 
718  // ----------------------------------------------------------------------
719  // Component initialization
720  // ----------------------------------------------------------------------
721 
723  void init(
724  FwSizeType queueDepth,
725  FwEnumStoreType instance = 0
726  );
727 
728 #if !FW_DIRECT_PORT_CALLS
729 
730  public:
731 
732  // ----------------------------------------------------------------------
733  // Getters for special input ports
734  // ----------------------------------------------------------------------
735 
740  FwIndexType portNum
741  );
742 
743 #endif
744 
745 #if !FW_DIRECT_PORT_CALLS
746 
747  public:
748 
749  // ----------------------------------------------------------------------
750  // Getters for typed input ports
751  // ----------------------------------------------------------------------
752 
757  FwIndexType portNum
758  );
759 
764  FwIndexType portNum
765  );
766 
771  FwIndexType portNum
772  );
773 
778  FwIndexType portNum
779  );
780 
785  FwIndexType portNum
786  );
787 
788 #endif
789 
790 #if !FW_DIRECT_PORT_CALLS
791 
792  public:
793 
794  // ----------------------------------------------------------------------
795  // Getters for serial input ports
796  // ----------------------------------------------------------------------
797 
801  Fw::InputSerializePort* get_serialIn_InputPort(
802  FwIndexType portNum
803  );
804 
805 #endif
806 
807 #if !FW_DIRECT_PORT_CALLS
808 
809  public:
810 
811  // ----------------------------------------------------------------------
812  // Connect input ports to special output ports
813  // ----------------------------------------------------------------------
814 
817  FwIndexType portNum,
818  Fw::InputCmdRegPort* port
819  );
820 
823  FwIndexType portNum,
825  );
826 
829  FwIndexType portNum,
830  Fw::InputLogPort* port
831  );
832 
833 #if FW_ENABLE_TEXT_LOGGING == 1
834 
836  void set_logTextOut_OutputPort(
837  FwIndexType portNum,
838  Fw::InputLogTextPort* port
839  );
840 
841 #endif
842 
845  FwIndexType portNum,
846  Fw::InputPrmGetPort* port
847  );
848 
851  FwIndexType portNum,
852  Fw::InputPrmSetPort* port
853  );
854 
857  FwIndexType portNum,
858  Fw::InputTimePort* port
859  );
860 
863  FwIndexType portNum,
864  Fw::InputTlmPort* port
865  );
866 
867 #endif
868 
869 #if !FW_DIRECT_PORT_CALLS
870 
871  public:
872 
873  // ----------------------------------------------------------------------
874  // Connect typed input ports to typed output ports
875  // ----------------------------------------------------------------------
876 
879  FwIndexType portNum,
880  Fw::InputComPort* port
881  );
882 
885  FwIndexType portNum,
886  Fw::InputPrmGetPort* port
887  );
888 
891  FwIndexType portNum,
892  Fw::InputTlmGetPort* port
893  );
894 
897  FwIndexType portNum,
899  );
900 
903  FwIndexType portNum,
905  );
906 
907 #endif
908 
909 #if !FW_DIRECT_PORT_CALLS && FW_PORT_SERIALIZATION
910 
911  public:
912 
913  // ----------------------------------------------------------------------
914  // Connect serial input ports to special output ports
915  // ----------------------------------------------------------------------
916 
919  FwIndexType portNum,
920  Fw::InputSerializePort* port
921  );
922 
925  FwIndexType portNum,
926  Fw::InputSerializePort* port
927  );
928 
931  FwIndexType portNum,
932  Fw::InputSerializePort* port
933  );
934 
935 #if FW_ENABLE_TEXT_LOGGING == 1
936 
938  void set_logTextOut_OutputPort(
939  FwIndexType portNum,
940  Fw::InputSerializePort* port
941  );
942 
943 #endif
944 
947  FwIndexType portNum,
948  Fw::InputSerializePort* port
949  );
950 
953  FwIndexType portNum,
954  Fw::InputSerializePort* port
955  );
956 
959  FwIndexType portNum,
960  Fw::InputSerializePort* port
961  );
962 
963 #endif
964 
965 #if !FW_DIRECT_PORT_CALLS && FW_PORT_SERIALIZATION
966 
967  public:
968 
969  // ----------------------------------------------------------------------
970  // Connect serial input ports to typed output ports
971  // ----------------------------------------------------------------------
972 
975  FwIndexType portNum,
976  Fw::InputSerializePort* port
977  );
978 
981  FwIndexType portNum,
982  Fw::InputSerializePort* port
983  );
984 
987  FwIndexType portNum,
988  Fw::InputSerializePort* port
989  );
990 
991 #endif
992 
993 #if !FW_DIRECT_PORT_CALLS && FW_PORT_SERIALIZATION
994 
995  public:
996 
997  // ----------------------------------------------------------------------
998  // Connect typed and serial input ports to serial output ports
999  // ----------------------------------------------------------------------
1000 
1002  void set_serialOut_OutputPort(
1003  FwIndexType portNum,
1004  Fw::InputPortBase* port
1005  );
1006 
1007 #endif
1008 
1009  public:
1010 
1011  // ----------------------------------------------------------------------
1012  // Command registration
1013  // ----------------------------------------------------------------------
1014 
1018  void regCommands();
1019 
1020  public:
1021 
1022  // ----------------------------------------------------------------------
1023  // Parameter loading
1024  // ----------------------------------------------------------------------
1025 
1029  void loadParameters();
1030 
1031  protected:
1032 
1033  // ----------------------------------------------------------------------
1034  // Component construction and destruction
1035  // ----------------------------------------------------------------------
1036 
1039  const char* compName = ""
1040  );
1041 
1043  virtual ~WasmSequencerComponentBase();
1044 
1045  protected:
1046 
1047  // ----------------------------------------------------------------------
1048  // Getters for numbers of special input ports
1049  // ----------------------------------------------------------------------
1050 
1055  return NUM_CMDIN_INPUT_PORTS;
1056  }
1057 
1058  protected:
1059 
1060  // ----------------------------------------------------------------------
1061  // Getters for numbers of typed input ports
1062  // ----------------------------------------------------------------------
1063 
1069  }
1070 
1076  }
1077 
1083  }
1084 
1089  return NUM_SEQRUNIN_INPUT_PORTS;
1090  }
1091 
1097  }
1098 
1099  protected:
1100 
1101  // ----------------------------------------------------------------------
1102  // Getters for numbers of serial input ports
1103  // ----------------------------------------------------------------------
1104 
1109  return NUM_SERIALIN_INPUT_PORTS;
1110  }
1111 
1112  protected:
1113 
1114  // ----------------------------------------------------------------------
1115  // Getters for numbers of special output ports
1116  // ----------------------------------------------------------------------
1117 
1123  }
1124 
1130  }
1131 
1136  return NUM_LOGOUT_OUTPUT_PORTS;
1137  }
1138 
1139 #if FW_ENABLE_TEXT_LOGGING == 1
1140 
1144  static constexpr FwIndexType getNum_logTextOut_OutputPorts() {
1146  }
1147 
1148 #endif
1149 
1154  return NUM_PRMGET_OUTPUT_PORTS;
1155  }
1156 
1161  return NUM_PRMSET_OUTPUT_PORTS;
1162  }
1163 
1169  }
1170 
1175  return NUM_TLMOUT_OUTPUT_PORTS;
1176  }
1177 
1178  protected:
1179 
1180  // ----------------------------------------------------------------------
1181  // Getters for numbers of typed output ports
1182  // ----------------------------------------------------------------------
1183 
1188  return NUM_CMDOUT_OUTPUT_PORTS;
1189  }
1190 
1196  }
1197 
1203  }
1204 
1210  }
1211 
1217  }
1218 
1219  protected:
1220 
1221  // ----------------------------------------------------------------------
1222  // Getters for numbers of serial output ports
1223  // ----------------------------------------------------------------------
1224 
1230  }
1231 
1232  protected:
1233 
1234  // ----------------------------------------------------------------------
1235  // Connection status queries for special output ports
1236  // ----------------------------------------------------------------------
1237 
1242  FwIndexType portNum
1243  ) const;
1244 
1249  FwIndexType portNum
1250  ) const;
1251 
1256  FwIndexType portNum
1257  ) const;
1258 
1259 #if FW_ENABLE_TEXT_LOGGING == 1
1260 
1264  bool isConnected_logTextOut_OutputPort(
1265  FwIndexType portNum
1266  ) const;
1267 
1268 #endif
1269 
1274  FwIndexType portNum
1275  ) const;
1276 
1281  FwIndexType portNum
1282  ) const;
1283 
1288  FwIndexType portNum
1289  ) const;
1290 
1295  FwIndexType portNum
1296  ) const;
1297 
1298  protected:
1299 
1300  // ----------------------------------------------------------------------
1301  // Connection status queries for typed output ports
1302  // ----------------------------------------------------------------------
1303 
1308  FwIndexType portNum
1309  ) const;
1310 
1315  FwIndexType portNum
1316  ) const;
1317 
1322  FwIndexType portNum
1323  ) const;
1324 
1329  FwIndexType portNum
1330  ) const;
1331 
1336  FwIndexType portNum
1337  ) const;
1338 
1339  protected:
1340 
1341  // ----------------------------------------------------------------------
1342  // Connection status queries for serial output ports
1343  // ----------------------------------------------------------------------
1344 
1349  FwIndexType portNum
1350  ) const;
1351 
1352 #if FW_DIRECT_PORT_CALLS
1353  public:
1354 #else
1355  protected:
1356 #endif
1357 
1358  // ----------------------------------------------------------------------
1359  // Port handler base-class functions for special input ports
1360  //
1361  // Call these functions directly to bypass the corresponding ports
1362  // ----------------------------------------------------------------------
1363 
1365  void cmdIn_handlerBase(
1366  FwIndexType portNum,
1367  FwOpcodeType opCode,
1368  U32 cmdSeq,
1369  Fw::CmdArgBuffer& args
1370  );
1371 
1372  protected:
1373 
1374  // ----------------------------------------------------------------------
1375  // Handlers to implement for typed input ports
1376  // ----------------------------------------------------------------------
1377 
1379  virtual void checkTimers_handler(
1380  FwIndexType portNum,
1381  U32 context
1382  ) = 0;
1383 
1385  virtual void cmdResponseIn_handler(
1386  FwIndexType portNum,
1387  FwOpcodeType opCode,
1388  U32 cmdSeq,
1389  const Fw::CmdResponse& response
1390  ) = 0;
1391 
1393  virtual void seqCancelIn_handler(
1394  FwIndexType portNum
1395  ) = 0;
1396 
1398  virtual void seqRunIn_handler(
1399  FwIndexType portNum,
1400  const Fw::StringBase& filename,
1401  const Svc::SeqArgs& args
1402  ) = 0;
1403 
1405  virtual void writeTelemetry_handler(
1406  FwIndexType portNum,
1407  U32 context
1408  ) = 0;
1409 
1410 #if FW_DIRECT_PORT_CALLS
1411  public:
1412 #else
1413  protected:
1414 #endif
1415 
1416  // ----------------------------------------------------------------------
1417  // Port handler base-class functions for typed input ports
1418  //
1419  // Call these functions directly to bypass the corresponding ports
1420  // ----------------------------------------------------------------------
1421 
1424  FwIndexType portNum,
1425  U32 context
1426  );
1427 
1430  FwIndexType portNum,
1431  FwOpcodeType opCode,
1432  U32 cmdSeq,
1433  const Fw::CmdResponse& response
1434  );
1435 
1438  FwIndexType portNum
1439  );
1440 
1442  void seqRunIn_handlerBase(
1443  FwIndexType portNum,
1444  const Fw::StringBase& filename,
1445  const Svc::SeqArgs& args
1446  );
1447 
1450  FwIndexType portNum,
1451  U32 context
1452  );
1453 
1454  protected:
1455 
1456  // ----------------------------------------------------------------------
1457  // Handlers to implement for serial input ports
1458  // ----------------------------------------------------------------------
1459 
1461  virtual void serialIn_handler(
1462  FwIndexType portNum,
1463  Fw::LinearBufferBase& buffer
1464  ) = 0;
1465 
1466 #if FW_DIRECT_PORT_CALLS
1467  public:
1468 #else
1469  protected:
1470 #endif
1471 
1472  // ----------------------------------------------------------------------
1473  // Port handler base-class functions for serial input ports
1474  //
1475  // Call these functions directly to bypass the corresponding ports
1476  // ----------------------------------------------------------------------
1477 
1479  void serialIn_handlerBase(
1480  FwIndexType portNum,
1481  Fw::LinearBufferBase& buffer
1482  );
1483 
1484  protected:
1485 
1486  // ----------------------------------------------------------------------
1487  // Pre-message hooks for typed async input ports
1488  //
1489  // Each of these functions is invoked just before processing a message
1490  // on the corresponding port. By default, they do nothing. You can
1491  // override them to provide specific pre-message behavior.
1492  // ----------------------------------------------------------------------
1493 
1495  virtual void checkTimers_preMsgHook(
1496  FwIndexType portNum,
1497  U32 context
1498  );
1499 
1501  virtual void cmdResponseIn_preMsgHook(
1502  FwIndexType portNum,
1503  FwOpcodeType opCode,
1504  U32 cmdSeq,
1505  const Fw::CmdResponse& response
1506  );
1507 
1509  virtual void seqRunIn_preMsgHook(
1510  FwIndexType portNum,
1511  const Fw::StringBase& filename,
1512  const Svc::SeqArgs& args
1513  );
1514 
1515  protected:
1516 
1517  // ----------------------------------------------------------------------
1518  // Invocation functions for typed output ports
1519  // ----------------------------------------------------------------------
1520 
1522  void cmdOut_out(
1523  FwIndexType portNum,
1524  Fw::ComBuffer& data,
1525  U32 context
1526  ) const;
1527 
1530  FwIndexType portNum,
1531  FwPrmIdType id,
1532  Fw::ParamBuffer& val
1533  ) const;
1535 
1538  FwIndexType portNum,
1539  FwChanIdType id,
1540  Fw::Time& timeTag,
1541  Fw::TlmBuffer& val
1542  ) const;
1545 
1547  void seqDoneOut_out(
1548  FwIndexType portNum,
1549  FwOpcodeType opCode,
1550  U32 cmdSeq,
1551  const Fw::CmdResponse& response
1552  ) const;
1553 
1555  void seqStartOut_out(
1556  FwIndexType portNum,
1557  const Fw::StringBase& filename,
1558  const Svc::SeqArgs& args
1559  ) const;
1560 
1561  protected:
1562 
1563  // ----------------------------------------------------------------------
1564  // Invocation functions for serial output ports
1565  // ----------------------------------------------------------------------
1566 
1569  FwIndexType portNum,
1570  Fw::LinearBufferBase& buffer
1571  );
1572 
1573  protected:
1574 
1575  // ----------------------------------------------------------------------
1576  // Hooks for internal ports
1577  //
1578  // Each of these functions is invoked just before dropping a message
1579  // on the corresponding internal port. You should override them to provide
1580  // specific drop behavior.
1581  // ----------------------------------------------------------------------
1582 
1584  virtual void writeTelemetryInternal_overflowHook() = 0;
1585 
1586  protected:
1587 
1588  // ----------------------------------------------------------------------
1589  // Internal interface handlers
1590  // ----------------------------------------------------------------------
1591 
1594 
1595  protected:
1596 
1597  // ----------------------------------------------------------------------
1598  // Internal interface base-class functions
1599  // ----------------------------------------------------------------------
1600 
1603 
1604  protected:
1605 
1606  // ----------------------------------------------------------------------
1607  // State getter functions
1608  // ----------------------------------------------------------------------
1609 
1612 
1615 
1616  protected:
1617 
1618  // ----------------------------------------------------------------------
1619  // Signal send functions
1620  // ----------------------------------------------------------------------
1621 
1624  const Svc::WasmSequencer_LoadRequest& value
1625  );
1626 
1629  const Svc::WasmSequencer_LoadRequest& value
1630  );
1631 
1634  const Svc::WasmSequencer_InvokeRequest& value
1635  );
1636 
1639  const Svc::WasmSequencer_RequestContext& value
1640  );
1641 
1644  const Svc::WasmSequencer_RequestContext& value
1645  );
1646 
1649 
1652  const Svc::WasmSequencer_RequestContext& value
1653  );
1654 
1657  const Svc::WasmSequencer_RequestContext& value
1658  );
1659 
1662  const Svc::WasmSequencer_RequestContext& value
1663  );
1664 
1667 
1670  const Svc::WasmSequencer_CommandRequest& value
1671  );
1672 
1675 
1678 
1681  const Svc::WasmSequencer_RequestContext& value
1682  );
1683 
1686 
1689 
1692  I32 value
1693  );
1694 
1697 
1700  const Svc::WasmSequencer_HostFunction& value
1701  );
1702 
1705 
1708 
1711  const FwIndexType& value
1712  );
1713 
1716  I32 value
1717  );
1718 
1721  const Svc::WasmSequencer_TrapReason& value
1722  );
1723 
1726 
1729 
1730  protected:
1731 
1732  // ----------------------------------------------------------------------
1733  // Functions to implement for internal state machine actions
1734  // ----------------------------------------------------------------------
1735 
1740  SmId smId,
1742  const Svc::WasmSequencer_InvokeRequest& value
1743  ) = 0;
1744 
1749  SmId smId,
1751  ) = 0;
1752 
1757  SmId smId,
1759  ) = 0;
1760 
1766  SmId smId,
1768  const Svc::WasmSequencer_RequestContext& value
1769  ) = 0;
1770 
1775  SmId smId,
1777  const Svc::WasmSequencer_RequestContext& value
1778  ) = 0;
1779 
1785  SmId smId,
1787  const Svc::WasmSequencer_RequestContext& value
1788  ) = 0;
1789 
1794  SmId smId,
1796  ) = 0;
1797 
1803  SmId smId,
1805  const Svc::WasmSequencer_InvokeRequest& value
1806  ) = 0;
1807 
1813  SmId smId,
1815  const Svc::WasmSequencer_InvokeRequest& value
1816  ) = 0;
1817 
1824  SmId smId,
1826  const Svc::WasmSequencer_LoadRequest& value
1827  ) = 0;
1828 
1834  SmId smId,
1836  const Svc::WasmSequencer_RequestContext& value
1837  ) = 0;
1838 
1844  SmId smId,
1846  const Svc::WasmSequencer_RequestContext& value
1847  ) = 0;
1848 
1854  SmId smId,
1856  const Svc::WasmSequencer_LoadRequest& value
1857  ) = 0;
1858 
1863  SmId smId,
1865  const Svc::WasmSequencer_RequestContext& value
1866  ) = 0;
1867 
1872  SmId smId,
1874  const Svc::WasmSequencer_RequestContext& value
1875  ) = 0;
1876 
1881  SmId smId,
1883  const Svc::WasmSequencer_RequestContext& value
1884  ) = 0;
1885 
1890  SmId smId,
1892  const Svc::WasmSequencer_RequestContext& value
1893  ) = 0;
1894 
1899  SmId smId,
1901  const Svc::WasmSequencer_RequestContext& value
1902  ) = 0;
1903 
1908  SmId smId,
1910  const Svc::WasmSequencer_RequestContext& value
1911  ) = 0;
1912 
1917  SmId smId,
1919  const Svc::WasmSequencer_RequestContext& value
1920  ) = 0;
1921 
1926  SmId smId,
1928  const Svc::WasmSequencer_RequestContext& value
1929  ) = 0;
1930 
1935  SmId smId,
1937  const Svc::WasmSequencer_RequestContext& value
1938  ) = 0;
1939 
1944  SmId smId,
1946  ) = 0;
1947 
1953  SmId smId,
1955  const Svc::WasmSequencer_RequestContext& value
1956  ) = 0;
1957 
1962  SmId smId,
1964  const Svc::WasmSequencer_CommandRequest& value
1965  ) = 0;
1966 
1971  SmId smId,
1973  ) = 0;
1974 
1979  SmId smId,
1981  ) = 0;
1982 
1987  SmId smId,
1989  ) = 0;
1990 
1993  SmId smId,
1995  ) = 0;
1996 
1999  SmId smId,
2001  ) = 0;
2002 
2005  SmId smId,
2007  ) = 0;
2008 
2011  SmId smId,
2013  ) = 0;
2014 
2017  SmId smId,
2019  ) = 0;
2020 
2023  SmId smId,
2025  ) = 0;
2026 
2029  SmId smId,
2031  ) = 0;
2032 
2035  SmId smId,
2037  ) = 0;
2038 
2041  SmId smId,
2043  I32 value
2044  ) = 0;
2045 
2048  SmId smId,
2050  const Svc::WasmSequencer_TrapReason& value
2051  ) = 0;
2052 
2055  SmId smId,
2057  ) = 0;
2058 
2064  SmId smId,
2066  ) = 0;
2067 
2072  SmId smId,
2074  ) = 0;
2075 
2080  SmId smId,
2082  ) = 0;
2083 
2088  SmId smId,
2090  ) = 0;
2091 
2096  SmId smId,
2098  ) = 0;
2099 
2104  SmId smId,
2106  const Svc::WasmSequencer_RequestContext& value
2107  ) = 0;
2108 
2113  SmId smId,
2115  ) = 0;
2116 
2121  SmId smId,
2123  ) = 0;
2124 
2129  SmId smId,
2131  I32 value
2132  ) = 0;
2133 
2138  SmId smId,
2140  ) = 0;
2141 
2146  SmId smId,
2148  ) = 0;
2149 
2154  SmId smId,
2156  const FwIndexType& value
2157  ) = 0;
2158 
2159  protected:
2160 
2161  // ----------------------------------------------------------------------
2162  // Functions to implement for internal state machine guards
2163  // ----------------------------------------------------------------------
2164 
2169  SmId smId,
2171  ) const = 0;
2172 
2177  SmId smId,
2179  const Svc::WasmSequencer_RequestContext& value
2180  ) const = 0;
2181 
2186  SmId smId,
2188  const Svc::WasmSequencer_RequestContext& value
2189  ) const = 0;
2190 
2195  SmId smId,
2197  const Svc::WasmSequencer_RequestContext& value
2198  ) const = 0;
2199 
2204  SmId smId,
2206  ) const = 0;
2207 
2212  SmId smId,
2214  ) const = 0;
2215 
2220  SmId smId,
2222  ) const = 0;
2223 
2228  SmId smId,
2230  ) const = 0;
2231 
2236  SmId smId,
2238  const FwIndexType& value
2239  ) const = 0;
2240 
2245  SmId smId,
2247  ) const = 0;
2248 
2249  protected:
2250 
2251  // ----------------------------------------------------------------------
2252  // Command response
2253  // ----------------------------------------------------------------------
2254 
2256  void cmdResponse_out(
2257  FwOpcodeType opCode,
2258  U32 cmdSeq,
2259  Fw::CmdResponse response
2260  );
2261 
2262  protected:
2263 
2264  // ----------------------------------------------------------------------
2265  // Command handlers to implement
2266  // ----------------------------------------------------------------------
2267 
2281  virtual void RUN_cmdHandler(
2282  FwOpcodeType opCode,
2283  U32 cmdSeq,
2284  const Fw::CmdStringArg& fileName,
2285  const Svc::BlockState& block
2286  ) = 0;
2287 
2294  virtual void LOAD_cmdHandler(
2295  FwOpcodeType opCode,
2296  U32 cmdSeq,
2297  const Fw::CmdStringArg& fileName,
2298  const Fw::CmdStringArg& name
2299  ) = 0;
2300 
2304  virtual void INVOKE_cmdHandler(
2305  FwOpcodeType opCode,
2306  U32 cmdSeq,
2307  const Fw::CmdStringArg& module,
2308  const Svc::BlockState& block
2309  ) = 0;
2310 
2314  virtual void WAIT_cmdHandler(
2315  FwOpcodeType opCode,
2316  U32 cmdSeq
2317  ) = 0;
2318 
2323  virtual void CANCEL_cmdHandler(
2324  FwOpcodeType opCode,
2325  U32 cmdSeq
2326  ) = 0;
2327 
2335  virtual void PAUSE_cmdHandler(
2336  FwOpcodeType opCode,
2337  U32 cmdSeq
2338  ) = 0;
2339 
2343  virtual void CONTINUE_cmdHandler(
2344  FwOpcodeType opCode,
2345  U32 cmdSeq
2346  ) = 0;
2347 
2352  virtual void GLOBAL_SET_I32_cmdHandler(
2353  FwOpcodeType opCode,
2354  U32 cmdSeq,
2355  const Fw::CmdStringArg& moduleName,
2356  const Fw::CmdStringArg& name,
2357  I32 value
2358  ) = 0;
2359 
2364  virtual void GLOBAL_SET_I64_cmdHandler(
2365  FwOpcodeType opCode,
2366  U32 cmdSeq,
2367  const Fw::CmdStringArg& moduleName,
2368  const Fw::CmdStringArg& name,
2369  I64 value
2370  ) = 0;
2371 
2376  virtual void GLOBAL_SET_F32_cmdHandler(
2377  FwOpcodeType opCode,
2378  U32 cmdSeq,
2379  const Fw::CmdStringArg& moduleName,
2380  const Fw::CmdStringArg& name,
2381  F32 value
2382  ) = 0;
2383 
2388  virtual void GLOBAL_SET_F64_cmdHandler(
2389  FwOpcodeType opCode,
2390  U32 cmdSeq,
2391  const Fw::CmdStringArg& moduleName,
2392  const Fw::CmdStringArg& name,
2393  F64 value
2394  ) = 0;
2395 
2400  virtual void GLOBAL_GET_cmdHandler(
2401  FwOpcodeType opCode,
2402  U32 cmdSeq,
2403  const Fw::CmdStringArg& moduleName,
2404  const Fw::CmdStringArg& name
2405  ) = 0;
2406 
2407  protected:
2408 
2409  // ----------------------------------------------------------------------
2410  // Command handler base-class functions
2411  //
2412  // Call these functions directly to bypass the command input port
2413  // ----------------------------------------------------------------------
2414 
2428  void RUN_cmdHandlerBase(
2429  FwOpcodeType opCode,
2430  U32 cmdSeq,
2431  Fw::CmdArgBuffer& args
2432  );
2433 
2440  void LOAD_cmdHandlerBase(
2441  FwOpcodeType opCode,
2442  U32 cmdSeq,
2443  Fw::CmdArgBuffer& args
2444  );
2445 
2449  void INVOKE_cmdHandlerBase(
2450  FwOpcodeType opCode,
2451  U32 cmdSeq,
2452  Fw::CmdArgBuffer& args
2453  );
2454 
2458  void WAIT_cmdHandlerBase(
2459  FwOpcodeType opCode,
2460  U32 cmdSeq,
2461  Fw::CmdArgBuffer& args
2462  );
2463 
2468  void CANCEL_cmdHandlerBase(
2469  FwOpcodeType opCode,
2470  U32 cmdSeq,
2471  Fw::CmdArgBuffer& args
2472  );
2473 
2481  void PAUSE_cmdHandlerBase(
2482  FwOpcodeType opCode,
2483  U32 cmdSeq,
2484  Fw::CmdArgBuffer& args
2485  );
2486 
2491  FwOpcodeType opCode,
2492  U32 cmdSeq,
2493  Fw::CmdArgBuffer& args
2494  );
2495 
2501  FwOpcodeType opCode,
2502  U32 cmdSeq,
2503  Fw::CmdArgBuffer& args
2504  );
2505 
2511  FwOpcodeType opCode,
2512  U32 cmdSeq,
2513  Fw::CmdArgBuffer& args
2514  );
2515 
2521  FwOpcodeType opCode,
2522  U32 cmdSeq,
2523  Fw::CmdArgBuffer& args
2524  );
2525 
2531  FwOpcodeType opCode,
2532  U32 cmdSeq,
2533  Fw::CmdArgBuffer& args
2534  );
2535 
2541  FwOpcodeType opCode,
2542  U32 cmdSeq,
2543  Fw::CmdArgBuffer& args
2544  );
2545 
2546  protected:
2547 
2548  // ----------------------------------------------------------------------
2549  // Pre-message hooks for async commands
2550  //
2551  // Each of these functions is invoked just before processing the
2552  // corresponding command. By default they do nothing. You can
2553  // override them to provide specific pre-command behavior.
2554  // ----------------------------------------------------------------------
2555 
2557  virtual void RUN_preMsgHook(
2558  FwOpcodeType opCode,
2559  U32 cmdSeq
2560  );
2561 
2563  virtual void LOAD_preMsgHook(
2564  FwOpcodeType opCode,
2565  U32 cmdSeq
2566  );
2567 
2569  virtual void INVOKE_preMsgHook(
2570  FwOpcodeType opCode,
2571  U32 cmdSeq
2572  );
2573 
2575  virtual void WAIT_preMsgHook(
2576  FwOpcodeType opCode,
2577  U32 cmdSeq
2578  );
2579 
2581  virtual void PAUSE_preMsgHook(
2582  FwOpcodeType opCode,
2583  U32 cmdSeq
2584  );
2585 
2587  virtual void CONTINUE_preMsgHook(
2588  FwOpcodeType opCode,
2589  U32 cmdSeq
2590  );
2591 
2593  virtual void GLOBAL_SET_I32_preMsgHook(
2594  FwOpcodeType opCode,
2595  U32 cmdSeq
2596  );
2597 
2599  virtual void GLOBAL_SET_I64_preMsgHook(
2600  FwOpcodeType opCode,
2601  U32 cmdSeq
2602  );
2603 
2605  virtual void GLOBAL_SET_F32_preMsgHook(
2606  FwOpcodeType opCode,
2607  U32 cmdSeq
2608  );
2609 
2611  virtual void GLOBAL_SET_F64_preMsgHook(
2612  FwOpcodeType opCode,
2613  U32 cmdSeq
2614  );
2615 
2617  virtual void GLOBAL_GET_preMsgHook(
2618  FwOpcodeType opCode,
2619  U32 cmdSeq
2620  );
2621 
2622  protected:
2623 
2624  // ----------------------------------------------------------------------
2625  // Event logging functions
2626  // ----------------------------------------------------------------------
2627 
2631  void log_DIAGNOSTIC_StoreAllocationSucceeded(U16 moduleCount) const;
2632 
2637 
2642  const Svc::WasmSequencer_SignalSource& signalSource,
2644  ) const;
2645 
2649  void log_WARNING_LO_ModuleNotFound(const Fw::StringBase& module_name) const;
2650 
2657  U64 requestedSize
2658  ) const;
2659 
2662  const Fw::StringBase& module_name,
2663  const Fw::StringBase& globalName,
2664  const Svc::WasmSequencer_Status& reason
2665  ) const;
2666 
2669  const Fw::StringBase& module_name,
2670  const Fw::StringBase& globalName,
2671  const Svc::WasmSequencer_Status& reason
2672  ) const;
2673 
2676  const Fw::StringBase& module_name,
2677  const Fw::StringBase& globalName,
2678  I32 value
2679  ) const;
2680 
2683  const Fw::StringBase& module_name,
2684  const Fw::StringBase& globalName,
2685  I64 value
2686  ) const;
2687 
2690  const Fw::StringBase& module_name,
2691  const Fw::StringBase& globalName,
2692  F32 value
2693  ) const;
2694 
2697  const Fw::StringBase& module_name,
2698  const Fw::StringBase& globalName,
2699  F64 value
2700  ) const;
2701 
2706  const Fw::StringBase& fileName,
2707  I32 status
2708  ) const;
2709 
2715  const Fw::StringBase& baseDir,
2716  const Fw::StringBase& fileName
2717  ) const;
2718 
2725  const Fw::StringBase& baseDir,
2726  const Fw::StringBase& fileName
2727  ) const;
2728 
2733 
2738 
2743 
2749 
2754  const Svc::WasmSequencer_HostFunction& host_function,
2755  U32 size,
2756  U32 maxSize
2757  ) const;
2758 
2763  const Svc::WasmSequencer_HostFunction& host_function,
2764  U32 size,
2765  U32 valueSize
2766  ) const;
2767 
2770  const Svc::WasmSequencer_HostFunction& host_function,
2771  const Svc::WasmSequencer_Status& code
2772  ) const;
2773 
2775  void log_WARNING_HI_InvalidBlockingTypeValue(I32 invalidValue) const;
2776 
2781  const Svc::WasmSequencer_HostFunction& host_function,
2782  I32 index,
2783  U32 numPorts
2784  ) const;
2785 
2791  const Svc::WasmSequencer_HostFunction& host_function,
2792  I32 status
2793  ) const;
2794 
2801  U32 portIndex,
2802  U32 size,
2803  U32 maxSize
2804  ) const;
2805 
2812  I32 raw,
2813  const Fw::StringBase& msg
2814  ) const;
2815 
2820 
2825 
2832  ) const;
2833 
2840  const Svc::WasmSequencer_SequencePhase& phase,
2841  I32 code
2842  ) const;
2843 
2849  const Svc::WasmSequencer_SequencePhase& phase,
2850  I32 code
2851  ) const;
2852 
2858  const Svc::WasmSequencer_SequencePhase& phase,
2859  const Svc::WasmSequencer_TrapReason& reason
2860  ) const;
2861 
2868  const Svc::WasmSequencer_SequencePhase& phase,
2869  const Svc::WasmSequencer_ExitReason& reason,
2870  const Svc::WasmSequencer_HostFunction& hostFunction
2871  ) const;
2872 
2876  void log_ACTIVITY_HI_SequencePaused() const;
2877 
2881  void log_WARNING_LO_SequenceNotRunning() const;
2882 
2888  const Svc::WasmSequencer_HostFunction& host_function,
2889  U64 micros
2890  ) const;
2891 
2899  const Svc::WasmSequencer_HostFunction& host_function,
2900  I64 id
2901  ) const;
2902 
2908  FwOpcodeType opcode,
2909  const Fw::CmdResponse& response,
2910  U16 oldSequenceIdx,
2911  U16 currentSequenceIdx
2912  ) const;
2913 
2919  FwOpcodeType opcode,
2920  const Fw::CmdResponse& response,
2921  U16 actualCmdIdx,
2922  U16 expectedCmdIdx
2923  ) const;
2924 
2927  Svc::WasmSequencer_ModuleIdx moduleIdx,
2928  const Svc::WasmSequencer_Status& status
2929  ) const;
2930 
2934  void log_WARNING_HI_LogWarningHi(const Fw::StringBase& msg) const;
2935 
2939  void log_WARNING_LO_LogWarningLo(const Fw::StringBase& msg) const;
2940 
2944  void log_ACTIVITY_HI_LogActivityHi(const Fw::StringBase& msg) const;
2945 
2949  void log_ACTIVITY_LO_LogActivityLo(const Fw::StringBase& msg) const;
2950 
2954  void log_DIAGNOSTIC_LogDiagnostic(const Fw::StringBase& msg) const;
2955 
2956  protected:
2957 
2958  // ----------------------------------------------------------------------
2959  // Telemetry serialized write
2960  // ----------------------------------------------------------------------
2961 
2966  void tlmWrite(
2967  FwChanIdType id,
2968  Fw::TlmBuffer& _tlmBuff,
2969  Fw::Time _tlmTime = Fw::Time()
2970  ) const;
2971 
2972  protected:
2973 
2974  // ----------------------------------------------------------------------
2975  // Telemetry write functions
2976  // ----------------------------------------------------------------------
2977 
2983  Fw::Time _tlmTime = Fw::Time()
2984  );
2985 
2991  Fw::Time _tlmTime = Fw::Time()
2992  );
2993 
2998  U64 arg,
2999  Fw::Time _tlmTime = Fw::Time()
3000  );
3001 
3006  U64 arg,
3007  Fw::Time _tlmTime = Fw::Time()
3008  );
3009 
3014  U64 arg,
3015  Fw::Time _tlmTime = Fw::Time()
3016  );
3017 
3022  U64 arg,
3023  Fw::Time _tlmTime = Fw::Time()
3024  );
3025 
3030  U64 arg,
3031  Fw::Time _tlmTime = Fw::Time()
3032  );
3033 
3038  const Svc::WasmSequencer_TrapReason& arg,
3039  Fw::Time _tlmTime = Fw::Time()
3040  );
3041 
3047  void tlmWrite_SeqName(
3048  const Fw::StringBase& arg,
3049  Fw::Time _tlmTime = Fw::Time()
3050  );
3051 
3052  protected:
3053 
3054  // ----------------------------------------------------------------------
3055  // Parameter hook functions
3056  // ----------------------------------------------------------------------
3057 
3061  virtual void parameterUpdated(
3062  FwPrmIdType id
3063  );
3064 
3070  virtual void parametersLoaded();
3071 
3077  virtual void parameterLoaded(
3078  FwPrmIdType id,
3079  Fw::ParamValid valid
3080  );
3081 
3082  protected:
3083 
3084  // ----------------------------------------------------------------------
3085  // Parameter get functions
3086  // ----------------------------------------------------------------------
3087 
3097  Fw::ParamValid& valid
3098  );
3099 
3111  Fw::ParamValid& valid
3112  );
3113 
3123  Fw::ParamValid& valid
3124  );
3125 
3126  protected:
3127 
3128  // ----------------------------------------------------------------------
3129  // Time
3130  // ----------------------------------------------------------------------
3131 
3135  Fw::Time getTime() const;
3136 
3137  protected:
3138 
3139  // ----------------------------------------------------------------------
3140  // Mutex operations for guarded ports
3141  //
3142  // You can override these operations to provide more sophisticated
3143  // synchronization
3144  // ----------------------------------------------------------------------
3145 
3147  virtual void lock();
3148 
3150  virtual void unLock();
3151 
3152  private:
3153 
3154  // ----------------------------------------------------------------------
3155  // Message dispatch functions
3156  // ----------------------------------------------------------------------
3157 
3159  virtual MsgDispatchStatus doDispatch();
3160 
3161  private:
3162 
3163  // ----------------------------------------------------------------------
3164  // Calls for messages received on special input ports
3165  // ----------------------------------------------------------------------
3166 
3168  static void m_p_cmdIn_in(
3169  Fw::PassiveComponentBase* callComp,
3170  FwIndexType portNum,
3171  FwOpcodeType opCode,
3172  U32 cmdSeq,
3173  Fw::CmdArgBuffer& args
3174  );
3175 
3176  private:
3177 
3178  // ----------------------------------------------------------------------
3179  // Calls for messages received on typed input ports
3180  // ----------------------------------------------------------------------
3181 
3183  static void m_p_checkTimers_in(
3184  Fw::PassiveComponentBase* callComp,
3185  FwIndexType portNum,
3186  U32 context
3187  );
3188 
3190  static void m_p_cmdResponseIn_in(
3191  Fw::PassiveComponentBase* callComp,
3192  FwIndexType portNum,
3193  FwOpcodeType opCode,
3194  U32 cmdSeq,
3195  const Fw::CmdResponse& response
3196  );
3197 
3199  static void m_p_seqCancelIn_in(
3200  Fw::PassiveComponentBase* callComp,
3201  FwIndexType portNum
3202  );
3203 
3205  static void m_p_seqRunIn_in(
3206  Fw::PassiveComponentBase* callComp,
3207  FwIndexType portNum,
3208  const Fw::StringBase& filename,
3209  const Svc::SeqArgs& args
3210  );
3211 
3213  static void m_p_writeTelemetry_in(
3214  Fw::PassiveComponentBase* callComp,
3215  FwIndexType portNum,
3216  U32 context
3217  );
3218 
3219  private:
3220 
3221  // ----------------------------------------------------------------------
3222  // Calls for messages received on serial input ports
3223  // ----------------------------------------------------------------------
3224 
3225 #if FW_PORT_SERIALIZATION
3226 
3228  static void m_p_serialIn_in(
3229  Fw::PassiveComponentBase* callComp,
3230  FwIndexType portNum,
3231  Fw::LinearBufferBase& buffer
3232  );
3233 
3234 #endif
3235 
3236  private:
3237 
3238  // ----------------------------------------------------------------------
3239  // Invocation functions for special output ports
3240  // ----------------------------------------------------------------------
3241 
3243  void cmdRegOut_out(
3244  FwIndexType portNum,
3245  FwOpcodeType opCode
3246  ) const;
3247 
3249  void cmdResponseOut_out(
3250  FwIndexType portNum,
3251  FwOpcodeType opCode,
3252  U32 cmdSeq,
3253  const Fw::CmdResponse& response
3254  ) const;
3255 
3257  void logOut_out(
3258  FwIndexType portNum,
3259  FwEventIdType id,
3260  Fw::Time& timeTag,
3261  const Fw::LogSeverity& severity,
3262  Fw::LogBuffer& args
3263  ) const;
3264 
3265 #if FW_ENABLE_TEXT_LOGGING
3266 
3268  void logTextOut_out(
3269  FwIndexType portNum,
3270  FwEventIdType id,
3271  Fw::Time& timeTag,
3272  const Fw::LogSeverity& severity,
3273  Fw::TextLogString& text
3274  ) const;
3275 
3276 #endif
3277 
3279  Fw::ParamValid prmGet_out(
3280  FwIndexType portNum,
3281  FwPrmIdType id,
3282  Fw::ParamBuffer& val
3283  ) const;
3285 
3287  void prmSet_out(
3288  FwIndexType portNum,
3289  FwPrmIdType id,
3290  Fw::ParamBuffer& val
3291  ) const;
3292 
3294  void timeCaller_out(
3295  FwIndexType portNum,
3296  Fw::Time& time
3297  ) const;
3298 
3300  void tlmOut_out(
3301  FwIndexType portNum,
3302  FwChanIdType id,
3303  Fw::Time& timeTag,
3304  Fw::TlmBuffer& val
3305  ) const;
3306 
3307  private:
3308 
3309  // ----------------------------------------------------------------------
3310  // Send signal helper functions
3311  // ----------------------------------------------------------------------
3312 
3314  void sendSignalStart(
3315  SmId smId,
3316  FwEnumStoreType signal,
3317  Fw::SerialBufferBase& buffer
3318  );
3319 
3321  void controller_sendSignalFinish(
3322  Fw::LinearBufferBase& buffer
3323  );
3324 
3326  void interpreter_sendSignalFinish(
3327  Fw::LinearBufferBase& buffer
3328  );
3329 
3330  private:
3331 
3332  // ----------------------------------------------------------------------
3333  // Helper functions for state machine dispatch
3334  // ----------------------------------------------------------------------
3335 
3337  void smDispatch(
3338  Fw::SerialBufferBase& buffer
3339  );
3340 
3342  static void deserializeSmIdAndSignal(
3343  Fw::SerialBufferBase& buffer,
3344  FwEnumStoreType& smId,
3345  FwEnumStoreType& signal
3346  );
3347 
3349  void Svc_WasmSequencer_ControllerStateMachine_smDispatch(
3350  Fw::SerialBufferBase& buffer,
3351  Svc_WasmSequencer_ControllerStateMachine& sm,
3353  );
3354 
3356  void Svc_WasmSequencer_InterpreterStateMachine_smDispatch(
3357  Fw::SerialBufferBase& buffer,
3358  Svc_WasmSequencer_InterpreterStateMachine& sm,
3360  );
3361 
3362  private:
3363 
3364  // ----------------------------------------------------------------------
3365  // Parameter set functions
3366  // ----------------------------------------------------------------------
3367 
3371  Fw::CmdResponse paramSet_HOST_FUNCTION_TIMEOUT_SECS(
3372  Fw::SerialBufferBase& val
3373  );
3374 
3378  Fw::CmdResponse paramSet_INSTRUCTION_FUEL(
3379  Fw::SerialBufferBase& val
3380  );
3381 
3385  Fw::CmdResponse paramSet_SEQ_BASE_DIR(
3386  Fw::SerialBufferBase& val
3387  );
3388 
3389  private:
3390 
3391  // ----------------------------------------------------------------------
3392  // Parameter save functions
3393  // ----------------------------------------------------------------------
3394 
3398  Fw::CmdResponse paramSave_HOST_FUNCTION_TIMEOUT_SECS();
3399 
3403  Fw::CmdResponse paramSave_INSTRUCTION_FUEL();
3404 
3408  Fw::CmdResponse paramSave_SEQ_BASE_DIR();
3409 
3410 #if !FW_DIRECT_PORT_CALLS
3411 
3412  private:
3413 
3414  // ----------------------------------------------------------------------
3415  // Special input ports
3416  // ----------------------------------------------------------------------
3417 
3419  Fw::InputCmdPort m_cmdIn_InputPort[NUM_CMDIN_INPUT_PORTS];
3420 
3421 #endif
3422 
3423 #if !FW_DIRECT_PORT_CALLS
3424 
3425  private:
3426 
3427  // ----------------------------------------------------------------------
3428  // Typed input ports
3429  // ----------------------------------------------------------------------
3430 
3432  Svc::InputSchedPort m_checkTimers_InputPort[NUM_CHECKTIMERS_INPUT_PORTS];
3433 
3435  Fw::InputCmdResponsePort m_cmdResponseIn_InputPort[NUM_CMDRESPONSEIN_INPUT_PORTS];
3436 
3439 
3441  Svc::InputCmdSeqInPort m_seqRunIn_InputPort[NUM_SEQRUNIN_INPUT_PORTS];
3442 
3444  Svc::InputSchedPort m_writeTelemetry_InputPort[NUM_WRITETELEMETRY_INPUT_PORTS];
3445 
3446 #endif
3447 
3448 #if !FW_DIRECT_PORT_CALLS
3449 
3450  private:
3451 
3452  // ----------------------------------------------------------------------
3453  // Serial input ports
3454  // ----------------------------------------------------------------------
3455 
3457  Fw::InputSerializePort m_serialIn_InputPort[NUM_SERIALIN_INPUT_PORTS];
3458 
3459 #endif
3460 
3461 #if !FW_DIRECT_PORT_CALLS
3462 
3463  private:
3464 
3465  // ----------------------------------------------------------------------
3466  // Special output ports
3467  // ----------------------------------------------------------------------
3468 
3470  Fw::OutputCmdRegPort m_cmdRegOut_OutputPort[NUM_CMDREGOUT_OUTPUT_PORTS];
3471 
3473  Fw::OutputCmdResponsePort m_cmdResponseOut_OutputPort[NUM_CMDRESPONSEOUT_OUTPUT_PORTS];
3474 
3476  Fw::OutputLogPort m_logOut_OutputPort[NUM_LOGOUT_OUTPUT_PORTS];
3477 
3478 #if FW_ENABLE_TEXT_LOGGING == 1
3479 
3481  Fw::OutputLogTextPort m_logTextOut_OutputPort[NUM_LOGTEXTOUT_OUTPUT_PORTS];
3482 
3483 #endif
3484 
3486  Fw::OutputPrmGetPort m_prmGet_OutputPort[NUM_PRMGET_OUTPUT_PORTS];
3487 
3489  Fw::OutputPrmSetPort m_prmSet_OutputPort[NUM_PRMSET_OUTPUT_PORTS];
3490 
3492  Fw::OutputTimePort m_timeCaller_OutputPort[NUM_TIMECALLER_OUTPUT_PORTS];
3493 
3495  Fw::OutputTlmPort m_tlmOut_OutputPort[NUM_TLMOUT_OUTPUT_PORTS];
3496 
3497 #endif
3498 
3499 #if !FW_DIRECT_PORT_CALLS
3500 
3501  private:
3502 
3503  // ----------------------------------------------------------------------
3504  // Typed output ports
3505  // ----------------------------------------------------------------------
3506 
3508  Fw::OutputComPort m_cmdOut_OutputPort[NUM_CMDOUT_OUTPUT_PORTS];
3509 
3511  Fw::OutputPrmGetPort m_getParam_OutputPort[NUM_GETPARAM_OUTPUT_PORTS];
3512 
3514  Fw::OutputTlmGetPort m_getTlmChan_OutputPort[NUM_GETTLMCHAN_OUTPUT_PORTS];
3515 
3517  Fw::OutputCmdResponsePort m_seqDoneOut_OutputPort[NUM_SEQDONEOUT_OUTPUT_PORTS];
3518 
3520  Svc::OutputCmdSeqInPort m_seqStartOut_OutputPort[NUM_SEQSTARTOUT_OUTPUT_PORTS];
3521 
3522 #endif
3523 
3524 #if !FW_DIRECT_PORT_CALLS
3525 
3526  private:
3527 
3528  // ----------------------------------------------------------------------
3529  // Serial output ports
3530  // ----------------------------------------------------------------------
3531 
3533  Fw::OutputSerializePort m_serialOut_OutputPort[NUM_SERIALOUT_OUTPUT_PORTS];
3534 
3535 #endif
3536 
3537  private:
3538 
3539  // ----------------------------------------------------------------------
3540  // First update flags for telemetry channels
3541  // ----------------------------------------------------------------------
3542 
3544  bool m_first_update_ControllerState = true;
3545 
3547  bool m_first_update_InterpreterState = true;
3548 
3550  bool m_first_update_SequencesSucceeded = true;
3551 
3553  bool m_first_update_SequencesFailed = true;
3554 
3556  bool m_first_update_SequencesCancelled = true;
3557 
3559  bool m_first_update_CommandsDispatched = true;
3560 
3562  bool m_first_update_CommandsFailed = true;
3563 
3565  bool m_first_update_LastTrapReason = true;
3566 
3568  bool m_first_update_SeqName = true;
3569 
3570  private:
3571 
3572  // ----------------------------------------------------------------------
3573  // Last value storage for telemetry channels
3574  // ----------------------------------------------------------------------
3575 
3577  Svc::WasmSequencer_ControllerStateMachine_State m_last_ControllerState = {};
3578 
3580  Svc::WasmSequencer_InterpreterStateMachine_State m_last_InterpreterState = {};
3581 
3583  U64 m_last_SequencesSucceeded = {};
3584 
3586  U64 m_last_SequencesFailed = {};
3587 
3589  U64 m_last_SequencesCancelled = {};
3590 
3592  U64 m_last_CommandsDispatched = {};
3593 
3595  U64 m_last_CommandsFailed = {};
3596 
3598  Svc::WasmSequencer_TrapReason m_last_LastTrapReason = {};
3599 
3601  Fw::TlmString m_last_SeqName = {};
3602 
3603  private:
3604 
3605  // ----------------------------------------------------------------------
3606  // Parameter validity flags
3607  // ----------------------------------------------------------------------
3608 
3610  Fw::ParamValid m_param_HOST_FUNCTION_TIMEOUT_SECS_valid = Fw::ParamValid::UNINIT;
3611 
3613  Fw::ParamValid m_param_INSTRUCTION_FUEL_valid = Fw::ParamValid::UNINIT;
3614 
3616  Fw::ParamValid m_param_SEQ_BASE_DIR_valid = Fw::ParamValid::UNINIT;
3617 
3618  private:
3619 
3620  // ----------------------------------------------------------------------
3621  // Parameter variables
3622  // ----------------------------------------------------------------------
3623 
3630  F32 m_HOST_FUNCTION_TIMEOUT_SECS;
3631 
3640  FwSizeType m_INSTRUCTION_FUEL;
3641 
3648  Fw::ParamString m_SEQ_BASE_DIR;
3649 
3650  private:
3651 
3652  // ----------------------------------------------------------------------
3653  // State machine instances
3654  // ----------------------------------------------------------------------
3655 
3657  Svc_WasmSequencer_ControllerStateMachine m_stateMachine_controller;
3658 
3660  Svc_WasmSequencer_InterpreterStateMachine m_stateMachine_interpreter;
3661 
3662  private:
3663 
3664  // ----------------------------------------------------------------------
3665  // Mutexes
3666  // ----------------------------------------------------------------------
3667 
3669  Os::Mutex m_guardedPortMutex;
3670 
3672  Os::Mutex m_paramLock;
3673 
3674  };
3675 
3676 }
3677 
3678 #endif
void log_ACTIVITY_LO_LogActivityLo(const Fw::StringBase &msg) const
static constexpr FwIndexType getNum_serialIn_InputPorts()
An ACTIVITY_HI event emitted by the guest program.
void interpreter_sendSignal_hostResumeI32(I32 value)
Send signal hostResumeI32 to state machine interpreter.
virtual void Svc_WasmSequencer_InterpreterStateMachine_action_resume(SmId smId, Svc_WasmSequencer_InterpreterStateMachine::Signal signal)=0
void controller_sendSignal_loadFailed(const Svc::WasmSequencer_RequestContext &value)
Send signal loadFailed to state machine controller.
Fw::ParamValid getParam_out(FwIndexType portNum, FwPrmIdType id, Fw::ParamBuffer &val) const
Invoke output port getParam.
Implementation of state machine Svc_WasmSequencer_ControllerStateMachine.
virtual void Svc_WasmSequencer_InterpreterStateMachine_action_setContext(SmId smId, Svc_WasmSequencer_InterpreterStateMachine::Signal signal, const Svc::WasmSequencer_RequestContext &value)=0
A command was issued in a state where it is not valid.
void checkTimers_handlerBase(FwIndexType portNum, U32 context)
Handler base-class function for input port checkTimers.
virtual bool Svc_WasmSequencer_InterpreterStateMachine_guard_blockingSerialIn(SmId smId, Svc_WasmSequencer_InterpreterStateMachine::Signal signal, const FwIndexType &value) const =0
void log_WARNING_HI_HostFunctionInvalidId(const Svc::WasmSequencer_HostFunction &host_function, I64 id) const
void log_WARNING_HI_ModuleStartInvokeFailed(const Svc::WasmSequencer_Status &status) const
A guest serial port host function requested a port index outside the configured range.
void cmdResponseIn_handlerBase(FwIndexType portNum, FwOpcodeType opCode, U32 cmdSeq, const Fw::CmdResponse &response)
Handler base-class function for input port cmdResponseIn.
void tlmWrite_SequencesSucceeded(U64 arg, Fw::Time _tlmTime=Fw::Time())
virtual void cmdResponseIn_handler(FwIndexType portNum, FwOpcodeType opCode, U32 cmdSeq, const Fw::CmdResponse &response)=0
Handler for input port cmdResponseIn.
FwIdType FwOpcodeType
The type of a command opcode.
virtual bool Svc_WasmSequencer_ControllerStateMachine_guard_cancelRequested(SmId smId, Svc_WasmSequencer_ControllerStateMachine::Signal signal) const =0
virtual void parameterLoaded(FwPrmIdType id, Fw::ParamValid valid)
Called for each parameter when parameters are loaded.
void GLOBAL_SET_F32_cmdHandlerBase(FwOpcodeType opCode, U32 cmdSeq, Fw::CmdArgBuffer &args)
void log_WARNING_LO_CmdResponseFromOldSequence(FwOpcodeType opcode, const Fw::CmdResponse &response, U16 oldSequenceIdx, U16 currentSequenceIdx) const
void log_WARNING_HI_SequenceTrapped(Svc::WasmSequencer_ModuleIdx index, const Svc::WasmSequencer_SequencePhase &phase, const Svc::WasmSequencer_TrapReason &reason) const
virtual void Svc_WasmSequencer_InterpreterStateMachine_action_setExitReason_CANCEL(SmId smId, Svc_WasmSequencer_InterpreterStateMachine::Signal signal)=0
Implementation for action setExitReason_CANCEL of state machine Svc_WasmSequencer_InterpreterStateMac...
virtual void GLOBAL_SET_I64_preMsgHook(FwOpcodeType opCode, U32 cmdSeq)
Pre-message hook for command GLOBAL_SET_I64.
void log_WARNING_HI_InvalidBlockingTypeValue(I32 invalidValue) const
Log event InvalidBlockingTypeValue.
PlatformSizeType FwSizeType
Auto-generated base for WasmSequencer component.
virtual void Svc_WasmSequencer_InterpreterStateMachine_action_clearExitStatus(SmId smId, Svc_WasmSequencer_InterpreterStateMachine::Signal signal)=0
Implementation for action clearExitStatus of state machine Svc_WasmSequencer_InterpreterStateMachine...
virtual void Svc_WasmSequencer_InterpreterStateMachine_action_clearPendingHostFunction(SmId smId, Svc_WasmSequencer_InterpreterStateMachine::Signal signal)=0
void writeTelemetryInternal_internalInterfaceInvoke()
Internal interface base-class function for writeTelemetryInternal.
void set_timeCaller_OutputPort(FwIndexType portNum, Fw::InputTimePort *port)
Connect port to timeCaller[portNum].
virtual void lock()
Lock the guarded mutex.
I32 FwEnumStoreType
void WAIT_cmdHandlerBase(FwOpcodeType opCode, U32 cmdSeq, Fw::CmdArgBuffer &args)
void controller_sendSignal_engineFinished(const Svc::WasmSequencer_RequestContext &value)
Send signal engineFinished to state machine controller.
void log_ACTIVITY_LO_GlobalValueF32(const Fw::StringBase &module_name, const Fw::StringBase &globalName, F32 value) const
Log event GlobalValueF32.
Wait for the interpreter to finish and return it&#39;s result as a CmdResponse.
void set_getTlmChan_OutputPort(FwIndexType portNum, Fw::InputTlmGetPort *port)
Connect port to getTlmChan[portNum].
virtual void Svc_WasmSequencer_ControllerStateMachine_action_reportModuleMainFailed(SmId smId, Svc_WasmSequencer_ControllerStateMachine::Signal signal, const Svc::WasmSequencer_RequestContext &value)=0
virtual void Svc_WasmSequencer_ControllerStateMachine_action_reportModuleStarted(SmId smId, Svc_WasmSequencer_ControllerStateMachine::Signal signal, const Svc::WasmSequencer_RequestContext &value)=0
virtual void GLOBAL_GET_cmdHandler(FwOpcodeType opCode, U32 cmdSeq, const Fw::CmdStringArg &moduleName, const Fw::CmdStringArg &name)=0
void log_ACTIVITY_HI_LogActivityHi(const Fw::StringBase &msg) const
void tlmWrite_InterpreterState(const Svc::WasmSequencer_InterpreterStateMachine_State &arg, Fw::Time _tlmTime=Fw::Time())
virtual void Svc_WasmSequencer_InterpreterStateMachine_action_clearContext(SmId smId, Svc_WasmSequencer_InterpreterStateMachine::Signal signal)=0
Tracks the currently executing host function.
void log_WARNING_HI_SequenceFilePathNotContained(const Fw::StringBase &baseDir, const Fw::StringBase &fileName) const
Svc_WasmSequencer_InterpreterStateMachine(WasmSequencerComponentBase &component)
Constructor.
virtual void LOAD_cmdHandler(FwOpcodeType opCode, U32 cmdSeq, const Fw::CmdStringArg &fileName, const Fw::CmdStringArg &name)=0
virtual void Svc_WasmSequencer_ControllerStateMachine_action_invokeStart(SmId smId, Svc_WasmSequencer_ControllerStateMachine::Signal signal, const Svc::WasmSequencer_RequestContext &value)=0
FwIdType FwPrmIdType
The type of a parameter identifier.
void CONTINUE_cmdHandlerBase(FwOpcodeType opCode, U32 cmdSeq, Fw::CmdArgBuffer &args)
void interpreter_sendSignal_entered()
Send signal entered to state machine interpreter.
virtual void Svc_WasmSequencer_InterpreterStateMachine_action_setExitReason_REPLY_TIMEOUT(SmId smId, Svc_WasmSequencer_InterpreterStateMachine::Signal signal)=0
Implementation for action setExitReason_REPLY_TIMEOUT of state machine Svc_WasmSequencer_InterpreterS...
Link-time delegating Mutex implementation.
virtual void Svc_WasmSequencer_ControllerStateMachine_action_respondInvoke_ERROR(SmId smId, Svc_WasmSequencer_ControllerStateMachine::Signal signal, const Svc::WasmSequencer_InvokeRequest &value)=0
virtual void Svc_WasmSequencer_InterpreterStateMachine_action_spin(SmId smId, Svc_WasmSequencer_InterpreterStateMachine::Signal signal)=0
bool isConnected_getTlmChan_OutputPort(FwIndexType portNum) const
static constexpr FwIndexType getNum_prmSet_OutputPorts()
void interpreter_sendSignal_serialInMessage(const FwIndexType &value)
Send signal serialInMessage to state machine interpreter.
virtual void Svc_WasmSequencer_InterpreterStateMachine_action_setLastHostFunction(SmId smId, Svc_WasmSequencer_InterpreterStateMachine::Signal signal)=0
Implementation for action setLastHostFunction of state machine Svc_WasmSequencer_InterpreterStateMach...
void seqCancelIn_handlerBase(FwIndexType portNum)
Handler base-class function for input port seqCancelIn.
void cmdResponse_out(FwOpcodeType opCode, U32 cmdSeq, Fw::CmdResponse response)
Emit command response.
virtual void Svc_WasmSequencer_InterpreterStateMachine_action_setExitReason_TIMER_INCOMPARABLE(SmId smId, Svc_WasmSequencer_InterpreterStateMachine::Signal signal)=0
Implementation for action setExitReason_TIMER_INCOMPARABLE of state machine Svc_WasmSequencer_Interpr...
void GLOBAL_SET_I32_cmdHandlerBase(FwOpcodeType opCode, U32 cmdSeq, Fw::CmdArgBuffer &args)
virtual void Svc_WasmSequencer_ControllerStateMachine_action_load(SmId smId, Svc_WasmSequencer_ControllerStateMachine::Signal signal, const Svc::WasmSequencer_LoadRequest &value)=0
static constexpr FwIndexType getNum_cmdOut_OutputPorts()
friend class WasmSequencerTesterBase
Autocoded test harness for the enclosing component.
void set_seqDoneOut_OutputPort(FwIndexType portNum, Fw::InputCmdResponsePort *port)
Connect port to seqDoneOut[portNum].
void log_WARNING_HI_FileOpenError(const Fw::StringBase &fileName, I32 status) const
virtual void Svc_WasmSequencer_InterpreterStateMachine_action_setTrapReason(SmId smId, Svc_WasmSequencer_InterpreterStateMachine::Signal signal, const Svc::WasmSequencer_TrapReason &value)=0
Implementation for action setTrapReason of state machine Svc_WasmSequencer_InterpreterStateMachine.
virtual void Svc_WasmSequencer_InterpreterStateMachine_action_finish(SmId smId, Svc_WasmSequencer_InterpreterStateMachine::Signal signal)=0
void log_WARNING_LO_ControllerBusy(const Svc::WasmSequencer_SignalSource &signalSource, const Svc::WasmSequencer_ControllerStateMachine_State &state) const
static constexpr FwIndexType getNum_seqStartOut_OutputPorts()
Enum representing a command response.
virtual void Svc_WasmSequencer_ControllerStateMachine_action_respondInvoke_BUSY(SmId smId, Svc_WasmSequencer_ControllerStateMachine::Signal signal, const Svc::WasmSequencer_InvokeRequest &value)=0
No sequence is running so we cannot continue from a pause.
friend class WasmSequencerTester
Friend class tester implementation to support white-box testing.
FwSizeType paramGet_INSTRUCTION_FUEL(Fw::ParamValid &valid)
void regCommands()
Register commands with the Command Dispatcher.
bool isConnected_getParam_OutputPort(FwIndexType portNum) const
bool isConnected_tlmOut_OutputPort(FwIndexType portNum) const
virtual void PAUSE_cmdHandler(FwOpcodeType opCode, U32 cmdSeq)=0
void log_WARNING_LO_MemoryGrowRejected(const Svc::WasmSequencer_MemoryGrowFailReason &reason, U64 requestedSize) const
void log_WARNING_HI_HostFunctionInvalidPointer(const Svc::WasmSequencer_HostFunction &host_function, const Svc::WasmSequencer_Status &code) const
Log event HostFunctionInvalidPointer.
void init()
Object initializer.
Definition: ObjBase.cpp:24
void RUN_cmdHandlerBase(FwOpcodeType opCode, U32 cmdSeq, Fw::CmdArgBuffer &args)
SerializeStatus
forward declaration for string
void controller_sendSignal_cancel()
Send signal cancel to state machine controller.
static constexpr FwIndexType getNum_getTlmChan_OutputPorts()
float F32
32-bit floating point
Definition: BasicTypes.h:84
A WARNING_LO event emitted by the guest program.
void log_ACTIVITY_LO_GlobalValueI32(const Fw::StringBase &module_name, const Fw::StringBase &globalName, I32 value) const
Log event GlobalValueI32.
void set_prmGet_OutputPort(FwIndexType portNum, Fw::InputPrmGetPort *port)
Connect port to prmGet[portNum].
virtual void Svc_WasmSequencer_ControllerStateMachine_action_cancelPendingRequest(SmId smId, Svc_WasmSequencer_ControllerStateMachine::Signal signal, const Svc::WasmSequencer_RequestContext &value)=0
void log_DIAGNOSTIC_StoreAllocationSucceeded(U16 moduleCount) const
void interpreter_sendSignal_cmd_CONTINUE()
Send signal cmd_CONTINUE to state machine interpreter.
void log_WARNING_HI_SequencePanic(Svc::WasmSequencer_ModuleIdx index, const Svc::WasmSequencer_SequencePhase &phase, I32 code) const
virtual void Svc_WasmSequencer_ControllerStateMachine_action_respond_block_OK(SmId smId, Svc_WasmSequencer_ControllerStateMachine::Signal signal, const Svc::WasmSequencer_RequestContext &value)=0
void log_WARNING_HI_HostFunctionInvalidPort(const Svc::WasmSequencer_HostFunction &host_function, I32 index, U32 numPorts) const
static constexpr FwIndexType getNum_cmdResponseOut_OutputPorts()
void GLOBAL_SET_I64_cmdHandlerBase(FwOpcodeType opCode, U32 cmdSeq, Fw::CmdArgBuffer &args)
virtual void Svc_WasmSequencer_ControllerStateMachine_action_respondLoad_BUSY(SmId smId, Svc_WasmSequencer_ControllerStateMachine::Signal signal, const Svc::WasmSequencer_LoadRequest &value)=0
virtual ~WasmSequencerComponentBase()
Destroy WasmSequencerComponentBase object.
FwIdType FwEventIdType
The type of an event identifier.
virtual void Svc_WasmSequencer_InterpreterStateMachine_action_dispatchPendingHostFunction(SmId smId, Svc_WasmSequencer_InterpreterStateMachine::Signal signal)=0
static constexpr FwIndexType getNum_cmdResponseIn_InputPorts()
Svc_WasmSequencer_ControllerStateMachine::State controller_getState() const
Get the state of state machine instance controller.
virtual void WAIT_cmdHandler(FwOpcodeType opCode, U32 cmdSeq)=0
bool isConnected_prmSet_OutputPort(FwIndexType portNum) const
virtual void parameterUpdated(FwPrmIdType id)
Called whenever a parameter is updated.
void controller_sendSignal_load(const Svc::WasmSequencer_LoadRequest &value)
Send signal load to state machine controller.
void cmdOut_out(FwIndexType portNum, Fw::ComBuffer &data, U32 context) const
Invoke output port cmdOut.
The interpreter store was allocated with capacity for the given number of modules.
virtual void Svc_WasmSequencer_ControllerStateMachine_action_incrementSequenceFailure(SmId smId, Svc_WasmSequencer_ControllerStateMachine::Signal signal)=0
A command was issued in a state where it is not valid.
virtual void unLock()
Unlock the guarded mutex.
Invoke a main function from a loaded module.
void interpreter_sendSignal_interpreterHostFunctionNeedsPause()
Send signal interpreterHostFunctionNeedsPause to state machine interpreter.
Svc::InputSchedPort * get_writeTelemetry_InputPort(FwIndexType portNum)
void seqDoneOut_out(FwIndexType portNum, FwOpcodeType opCode, U32 cmdSeq, const Fw::CmdResponse &response) const
Invoke output port seqDoneOut.
Svc::WasmSequencer_InterpreterStateMachine_State State
The state type.
virtual bool Svc_WasmSequencer_InterpreterStateMachine_guard_pendingHostFunction(SmId smId, Svc_WasmSequencer_InterpreterStateMachine::Signal signal) const =0
void controller_sendSignal_loadSucceeded(const Svc::WasmSequencer_RequestContext &value)
Send signal loadSucceeded to state machine controller.
void loadParameters()
Load the parameters from a parameter source.
A module failed to decode/validate while loading.
virtual void Svc_WasmSequencer_InterpreterStateMachine_action_signalEntered(SmId smId, Svc_WasmSequencer_InterpreterStateMachine::Signal signal)=0
void set_tlmOut_OutputPort(FwIndexType portNum, Fw::InputTlmPort *port)
Connect port to tlmOut[portNum].
virtual void writeTelemetryInternal_overflowHook()=0
Overflow hook for async input port writeTelemetryInternal.
virtual void GLOBAL_GET_preMsgHook(FwOpcodeType opCode, U32 cmdSeq)
Pre-message hook for command GLOBAL_GET.
static constexpr FwIndexType getNum_seqCancelIn_InputPorts()
bool isConnected_seqDoneOut_OutputPort(FwIndexType portNum) const
bool isConnected_serialOut_OutputPort(FwIndexType portNum) const
void interpreter_sendSignal_hostResponseUnexpected(const Svc::WasmSequencer_HostFunction &value)
Send signal hostResponseUnexpected to state machine interpreter.
virtual void Svc_WasmSequencer_InterpreterStateMachine_action_resumeI32(SmId smId, Svc_WasmSequencer_InterpreterStateMachine::Signal signal, I32 value)=0
void tlmWrite_LastTrapReason(const Svc::WasmSequencer_TrapReason &arg, Fw::Time _tlmTime=Fw::Time())
WasmSequencerComponentBase(const char *compName="")
Construct WasmSequencerComponentBase object.
void cmdIn_handlerBase(FwIndexType portNum, FwOpcodeType opCode, U32 cmdSeq, Fw::CmdArgBuffer &args)
Handler base-class function for input port cmdIn.
virtual void Svc_WasmSequencer_InterpreterStateMachine_action_setExitReason_INTERPRETER_FINISHED(SmId smId, Svc_WasmSequencer_InterpreterStateMachine::Signal signal)=0
Implementation for action setExitReason_INTERPRETER_FINISHED of state machine Svc_WasmSequencer_Inter...
virtual void CONTINUE_preMsgHook(FwOpcodeType opCode, U32 cmdSeq)
Pre-message hook for command CONTINUE.
Fw::InputSerializePort * get_serialIn_InputPort(FwIndexType portNum)
friend class WasmSequencerTesterBase
Friend class tester to support autocoded test harness.
FwIdType FwChanIdType
The type of a telemetry channel identifier.
void interpreter_sendSignal_hostResponseFailure()
Send signal hostResponseFailure to state machine interpreter.
virtual void GLOBAL_SET_F32_cmdHandler(FwOpcodeType opCode, U32 cmdSeq, const Fw::CmdStringArg &moduleName, const Fw::CmdStringArg &name, F32 value)=0
WasmSequencerComponentBase::SmId getId() const
Get the state machine id.
Fw::InputCmdResponsePort * get_cmdResponseIn_InputPort(FwIndexType portNum)
void log_WARNING_HI_SequenceExited(Svc::WasmSequencer_ModuleIdx index, const Svc::WasmSequencer_SequencePhase &phase, I32 code) const
bool isConnected_cmdResponseOut_OutputPort(FwIndexType portNum) const
virtual void Svc_WasmSequencer_InterpreterStateMachine_action_setExitReason_UNEXPECTED_REPLY(SmId smId, Svc_WasmSequencer_InterpreterStateMachine::Signal signal)=0
Implementation for action setExitReason_UNEXPECTED_REPLY of state machine Svc_WasmSequencer_Interpret...
Sequencer blocking state.
virtual void Svc_WasmSequencer_InterpreterStateMachine_action_reportPaused(SmId smId, Svc_WasmSequencer_InterpreterStateMachine::Signal signal)=0
void log_ACTIVITY_LO_GlobalValueF64(const Fw::StringBase &module_name, const Fw::StringBase &globalName, F64 value) const
Log event GlobalValueF64.
void log_WARNING_HI_LogWarningHi(const Fw::StringBase &msg) const
void interpreter_sendSignal_interpreterFinished(I32 value)
Send signal interpreterFinished to state machine interpreter.
static constexpr FwIndexType getNum_seqRunIn_InputPorts()
virtual void writeTelemetry_handler(FwIndexType portNum, U32 context)=0
Handler for input port writeTelemetry.
void interpreter_sendSignal_hostResume()
Send signal hostResume to state machine interpreter.
void log_WARNING_LO_GlobalSetFailed(const Fw::StringBase &module_name, const Fw::StringBase &globalName, const Svc::WasmSequencer_Status &reason) const
Log event GlobalSetFailed.
WasmSequencerComponentBase::SmId getId() const
Get the state machine id.
friend class WasmSequencerTesterBase
Autocoded test harness for the enclosing component.
bool isConnected_logOut_OutputPort(FwIndexType portNum) const
void log_WARNING_HI_ModuleLoadFailed(const Svc::WasmSequencer_Status &status) const
virtual void Svc_WasmSequencer_ControllerStateMachine_action_setCancelRequested(SmId smId, Svc_WasmSequencer_ControllerStateMachine::Signal signal)=0
void log_WARNING_HI_HostFunctionInvalidSeverity(I32 raw, const Fw::StringBase &msg) const
static constexpr FwIndexType getNum_tlmOut_OutputPorts()
Enum representing event severity.
virtual void Svc_WasmSequencer_ControllerStateMachine_action_reportModuleMainInvokeFailed(SmId smId, Svc_WasmSequencer_ControllerStateMachine::Signal signal, const Svc::WasmSequencer_RequestContext &value)=0
void interpreter_sendSignal_hostResponseTimeout()
Send signal hostResponseTimeout to state machine interpreter.
void log_WARNING_HI_SerialInFrameTooLarge(U32 portIndex, U32 size, U32 maxSize) const
virtual void Svc_WasmSequencer_InterpreterStateMachine_action_setExitCode(SmId smId, Svc_WasmSequencer_InterpreterStateMachine::Signal signal, I32 value)=0
Implementation for action setExitCode of state machine Svc_WasmSequencer_InterpreterStateMachine.
void GLOBAL_SET_F64_cmdHandlerBase(FwOpcodeType opCode, U32 cmdSeq, Fw::CmdArgBuffer &args)
void tlmWrite_SequencesFailed(U64 arg, Fw::Time _tlmTime=Fw::Time())
Which phase of a module&#39;s execution a sequence-completion event refers to.
Fw::SerializeStatus serialOut_out(FwIndexType portNum, Fw::LinearBufferBase &buffer)
Invoke output port serialOut.
static constexpr FwIndexType getNum_writeTelemetry_InputPorts()
virtual void Svc_WasmSequencer_ControllerStateMachine_action_clearCancelRequested(SmId smId, Svc_WasmSequencer_ControllerStateMachine::Signal signal)=0
virtual void Svc_WasmSequencer_ControllerStateMachine_action_reportModuleStartInvokeFailed(SmId smId, Svc_WasmSequencer_ControllerStateMachine::Signal signal, const Svc::WasmSequencer_RequestContext &value)=0
virtual void GLOBAL_SET_I32_cmdHandler(FwOpcodeType opCode, U32 cmdSeq, const Fw::CmdStringArg &moduleName, const Fw::CmdStringArg &name, I32 value)=0
void set_prmSet_OutputPort(FwIndexType portNum, Fw::InputPrmSetPort *port)
Connect port to prmSet[portNum].
virtual void checkTimers_preMsgHook(FwIndexType portNum, U32 context)
Pre-message hook for async input port checkTimers.
void tlmWrite_ControllerState(const Svc::WasmSequencer_ControllerStateMachine_State &arg, Fw::Time _tlmTime=Fw::Time())
void set_seqStartOut_OutputPort(FwIndexType portNum, Svc::InputCmdSeqInPort *port)
Connect port to seqStartOut[portNum].
Fw::TlmValid getTlmChan_out(FwIndexType portNum, FwChanIdType id, Fw::Time &timeTag, Fw::TlmBuffer &val) const
Invoke output port getTlmChan.
bool isConnected_seqStartOut_OutputPort(FwIndexType portNum) const
virtual void Svc_WasmSequencer_ControllerStateMachine_action_resetStore(SmId smId, Svc_WasmSequencer_ControllerStateMachine::Signal signal)=0
void log_ACTIVITY_HI_SequenceStarting(Svc::WasmSequencer_ModuleIdx index) const
void log_ACTIVITY_LO_GlobalValueI64(const Fw::StringBase &module_name, const Fw::StringBase &globalName, I64 value) const
Log event GlobalValueI64.
F32 paramGet_HOST_FUNCTION_TIMEOUT_SECS(Fw::ParamValid &valid)
Svc_WasmSequencer_InterpreterStateMachine::State interpreter_getState() const
Get the state of state machine instance interpreter.
void log_WARNING_LO_LogWarningLo(const Fw::StringBase &msg) const
Svc::InputSchedPort * get_checkTimers_InputPort(FwIndexType portNum)
void init(WasmSequencerComponentBase::SmId smId)
Initialize the state machine.
void tlmWrite(FwChanIdType id, Fw::TlmBuffer &_tlmBuff, Fw::Time _tlmTime=Fw::Time()) const
void log_WARNING_HI_BufferTooLarge(const Svc::WasmSequencer_HostFunction &host_function, U32 size, U32 maxSize) const
virtual void Svc_WasmSequencer_InterpreterStateMachine_action_setExitReason_INTERPRETER_TRAP(SmId smId, Svc_WasmSequencer_InterpreterStateMachine::Signal signal)=0
Implementation for action setExitReason_INTERPRETER_TRAP of state machine Svc_WasmSequencer_Interpret...
void interpreter_sendSignal_checkTimers()
Send signal checkTimers to state machine interpreter.
virtual void Svc_WasmSequencer_ControllerStateMachine_action_reportModuleStartFailed(SmId smId, Svc_WasmSequencer_ControllerStateMachine::Signal signal, const Svc::WasmSequencer_RequestContext &value)=0
static constexpr FwIndexType getNum_serialOut_OutputPorts()
virtual void Svc_WasmSequencer_InterpreterStateMachine_action_checkSleepTimers(SmId smId, Svc_WasmSequencer_InterpreterStateMachine::Signal signal)=0
friend class WasmSequencerTester
Test implementation for the enclosing component.
void controller_sendSignal_run(const Svc::WasmSequencer_LoadRequest &value)
Send signal run to state machine controller.
diagram-layout engine=elk direction=RL cycleBreaking=GREEDY_MODEL_ORDER considerModelOrder=NODES_AND_...
void interpreter_sendSignal_interpreterTrap(const Svc::WasmSequencer_TrapReason &value)
Send signal interpreterTrap to state machine interpreter.
void tlmWrite_SeqName(const Fw::StringBase &arg, Fw::Time _tlmTime=Fw::Time())
virtual void Svc_WasmSequencer_InterpreterStateMachine_action_cmdReplyOK(SmId smId, Svc_WasmSequencer_InterpreterStateMachine::Signal signal, const Svc::WasmSequencer_CommandRequest &value)=0
Svc::InputCmdSeqCancelPort * get_seqCancelIn_InputPort(FwIndexType portNum)
virtual void seqRunIn_handler(FwIndexType portNum, const Fw::StringBase &filename, const Svc::SeqArgs &args)=0
Handler for input port seqRunIn.
static constexpr FwIndexType getNum_prmGet_OutputPorts()
Fw::ParamString paramGet_SEQ_BASE_DIR(Fw::ParamValid &valid)
void interpreter_sendSignal_run(const Svc::WasmSequencer_RequestContext &value)
Send signal run to state machine interpreter.
void tlmWrite_CommandsFailed(U64 arg, Fw::Time _tlmTime=Fw::Time())
void log_ACTIVITY_HI_SequenceSucceeded(Svc::WasmSequencer_ModuleIdx index) const
virtual void CONTINUE_cmdHandler(FwOpcodeType opCode, U32 cmdSeq)=0
void log_WARNING_HI_SequenceHostFailure(Svc::WasmSequencer_ModuleIdx index, const Svc::WasmSequencer_SequencePhase &phase, const Svc::WasmSequencer_ExitReason &reason, const Svc::WasmSequencer_HostFunction &hostFunction) const
virtual void Svc_WasmSequencer_ControllerStateMachine_action_invokeMain(SmId smId, Svc_WasmSequencer_ControllerStateMachine::Signal signal, const Svc::WasmSequencer_RequestContext &value)=0
virtual bool Svc_WasmSequencer_ControllerStateMachine_guard_interpreterSucceeded(SmId smId, Svc_WasmSequencer_ControllerStateMachine::Signal signal) const =0
virtual void seqRunIn_preMsgHook(FwIndexType portNum, const Fw::StringBase &filename, const Svc::SeqArgs &args)
Pre-message hook for async input port seqRunIn.
virtual bool Svc_WasmSequencer_ControllerStateMachine_guard_invokeSucceeded(SmId smId, Svc_WasmSequencer_ControllerStateMachine::Signal signal, const Svc::WasmSequencer_RequestContext &value) const =0
Failed to find a loaded module with the requested name.
virtual bool Svc_WasmSequencer_InterpreterStateMachine_guard_pendingPause(SmId smId, Svc_WasmSequencer_InterpreterStateMachine::Signal signal) const =0
virtual void Svc_WasmSequencer_InterpreterStateMachine_action_dequeueSerialAndResume(SmId smId, Svc_WasmSequencer_InterpreterStateMachine::Signal signal, const FwIndexType &value)=0
A guest host function supplied a buffer larger than the host maximum for that call.
static constexpr FwIndexType getNum_logOut_OutputPorts()
void interpreter_sendSignal_hostResponseTimeIncomparable()
Send signal hostResponseTimeIncomparable to state machine interpreter.
void log_WARNING_LO_ModuleNotFound(const Fw::StringBase &module_name) const
void writeTelemetry_handlerBase(FwIndexType portNum, U32 context)
Handler base-class function for input port writeTelemetry.
void log_WARNING_HI_WrongCmdResponseIndex(FwOpcodeType opcode, const Fw::CmdResponse &response, U16 actualCmdIdx, U16 expectedCmdIdx) const
virtual void writeTelemetryInternal_internalInterfaceHandler()=0
Internal interface handler for writeTelemetryInternal.
virtual void Svc_WasmSequencer_InterpreterStateMachine_action_checkTimeout(SmId smId, Svc_WasmSequencer_InterpreterStateMachine::Signal signal)=0
PlatformIndexType FwIndexType
void set_cmdRegOut_OutputPort(FwIndexType portNum, Fw::InputCmdRegPort *port)
Connect port to cmdRegOut[portNum].
virtual void Svc_WasmSequencer_InterpreterStateMachine_action_setExitReason_HOST_FAILURE(SmId smId, Svc_WasmSequencer_InterpreterStateMachine::Signal signal)=0
Implementation for action setExitReason_HOST_FAILURE of state machine Svc_WasmSequencer_InterpreterSt...
void log_WARNING_HI_InvalidModuleEntrypoint(Svc::WasmSequencer_ModuleIdx moduleIdx, const Svc::WasmSequencer_Status &status) const
Log event InvalidModuleEntrypoint.
void log_WARNING_LO_GlobalGetFailed(const Fw::StringBase &module_name, const Fw::StringBase &globalName, const Svc::WasmSequencer_Status &reason) const
Log event GlobalGetFailed.
void tlmWrite_SequencesCancelled(U64 arg, Fw::Time _tlmTime=Fw::Time())
double F64
64-bit floating point (double). Required for compiler-supplied double promotion.
Definition: BasicTypes.h:86
void log_WARNING_HI_ModuleMainInvokeFailed(const Svc::WasmSequencer_Status &status) const
A sequence is starting after the main entrypoint was invoked.
virtual void GLOBAL_SET_F64_preMsgHook(FwOpcodeType opCode, U32 cmdSeq)
Pre-message hook for command GLOBAL_SET_F64.
void seqStartOut_out(FwIndexType portNum, const Fw::StringBase &filename, const Svc::SeqArgs &args) const
Invoke output port seqStartOut.
virtual bool Svc_WasmSequencer_ControllerStateMachine_guard_moduleHasValidMain(SmId smId, Svc_WasmSequencer_ControllerStateMachine::Signal signal, const Svc::WasmSequencer_RequestContext &value) const =0
virtual void cmdResponseIn_preMsgHook(FwIndexType portNum, FwOpcodeType opCode, U32 cmdSeq, const Fw::CmdResponse &response)
Pre-message hook for async input port cmdResponseIn.
void set_cmdOut_OutputPort(FwIndexType portNum, Fw::InputComPort *port)
Connect port to cmdOut[portNum].
Fw::InputCmdPort * get_cmdIn_InputPort(FwIndexType portNum)
Svc_WasmSequencer_ControllerStateMachine(WasmSequencerComponentBase &component)
Constructor.
void interpreter_sendSignal_interpreterOutOfFuel()
Send signal interpreterOutOfFuel to state machine interpreter.
void serialIn_handlerBase(FwIndexType portNum, Fw::LinearBufferBase &buffer)
Handler base-class function for input port serialIn.
diagram-layout engine=elk direction=LR cycleBreaking=MODEL_ORDER considerModelOrder=NODES_AND_EDGES n...
void set_logOut_OutputPort(FwIndexType portNum, Fw::InputLogPort *port)
Connect port to logOut[portNum].
RateGroupDivider component implementation.
void CANCEL_cmdHandlerBase(FwOpcodeType opCode, U32 cmdSeq, Fw::CmdArgBuffer &args)
A guest host function supplied a buffer too small to hold the host value being returned.
Enum representing parameter validity.
void log_ACTIVITY_HI_SequenceCancelled(Svc::WasmSequencer_ModuleIdx index, const Svc::WasmSequencer_SequencePhase &phase) const
friend class WasmSequencerTester
Test implementation for the enclosing component.
void controller_sendSignal_invoked(const Svc::WasmSequencer_RequestContext &value)
Send signal invoked to state machine controller.
virtual void Svc_WasmSequencer_ControllerStateMachine_action_runEngine(SmId smId, Svc_WasmSequencer_ControllerStateMachine::Signal signal, const Svc::WasmSequencer_RequestContext &value)=0
A WARNING_HI event emitted by the guest program.
virtual void Svc_WasmSequencer_ControllerStateMachine_action_reportModuleInvalidMain(SmId smId, Svc_WasmSequencer_ControllerStateMachine::Signal signal, const Svc::WasmSequencer_RequestContext &value)=0
void init(WasmSequencerComponentBase::SmId smId)
Initialize the state machine.
void seqRunIn_handlerBase(FwIndexType portNum, const Fw::StringBase &filename, const Svc::SeqArgs &args)
Handler base-class function for input port seqRunIn.
void log_DIAGNOSTIC_LogDiagnostic(const Fw::StringBase &msg) const
A DIAGNOSTIC event emitted by the guest program.
void INVOKE_cmdHandlerBase(FwOpcodeType opCode, U32 cmdSeq, Fw::CmdArgBuffer &args)
void set_getParam_OutputPort(FwIndexType portNum, Fw::InputPrmGetPort *port)
Connect port to getParam[portNum].
virtual bool Svc_WasmSequencer_InterpreterStateMachine_guard_dequeueSucceeded(SmId smId, Svc_WasmSequencer_InterpreterStateMachine::Signal signal) const =0
virtual void RUN_preMsgHook(FwOpcodeType opCode, U32 cmdSeq)
Pre-message hook for command RUN.
virtual void INVOKE_cmdHandler(FwOpcodeType opCode, U32 cmdSeq, const Fw::CmdStringArg &module, const Svc::BlockState &block)=0
virtual void RUN_cmdHandler(FwOpcodeType opCode, U32 cmdSeq, const Fw::CmdStringArg &fileName, const Svc::BlockState &block)=0
Failed to open the requested Wasm module file.
void PAUSE_cmdHandlerBase(FwOpcodeType opCode, U32 cmdSeq, Fw::CmdArgBuffer &args)
void LOAD_cmdHandlerBase(FwOpcodeType opCode, U32 cmdSeq, Fw::CmdArgBuffer &args)
virtual bool Svc_WasmSequencer_InterpreterStateMachine_guard_pendingHostFunctionIsSleep(SmId smId, Svc_WasmSequencer_InterpreterStateMachine::Signal signal) const =0
virtual void Svc_WasmSequencer_InterpreterStateMachine_action_reset(SmId smId, Svc_WasmSequencer_InterpreterStateMachine::Signal signal)=0
The interpreter aborted the sequence with a byte-code trap.
void log_WARNING_HI_SleepDurationTooLarge(const Svc::WasmSequencer_HostFunction &host_function, U64 micros) const
virtual void LOAD_preMsgHook(FwOpcodeType opCode, U32 cmdSeq)
Pre-message hook for command LOAD.
static constexpr FwIndexType getNum_checkTimers_InputPorts()
virtual void Svc_WasmSequencer_ControllerStateMachine_action_respond_noblock_OK(SmId smId, Svc_WasmSequencer_ControllerStateMachine::Signal signal, const Svc::WasmSequencer_RequestContext &value)=0
virtual void Svc_WasmSequencer_InterpreterStateMachine_action_clearPause(SmId smId, Svc_WasmSequencer_InterpreterStateMachine::Signal signal)=0
static constexpr FwIndexType getNum_cmdRegOut_OutputPorts()
void log_WARNING_HI_SequenceFilePathTooLong(const Fw::StringBase &baseDir, const Fw::StringBase &fileName) const
virtual void PAUSE_preMsgHook(FwOpcodeType opCode, U32 cmdSeq)
Pre-message hook for command PAUSE.
Corresponds to spacewasm_status_t.
virtual void CANCEL_cmdHandler(FwOpcodeType opCode, U32 cmdSeq)=0
virtual void GLOBAL_SET_F64_cmdHandler(FwOpcodeType opCode, U32 cmdSeq, const Fw::CmdStringArg &moduleName, const Fw::CmdStringArg &name, F64 value)=0
virtual void GLOBAL_SET_I64_cmdHandler(FwOpcodeType opCode, U32 cmdSeq, const Fw::CmdStringArg &moduleName, const Fw::CmdStringArg &name, I64 value)=0
static constexpr FwIndexType getNum_cmdIn_InputPorts()
void controller_sendSignal_invokeFailed(const Svc::WasmSequencer_RequestContext &value)
Send signal invokeFailed to state machine controller.
bool isConnected_timeCaller_OutputPort(FwIndexType portNum) const
void interpreter_sendSignal_cancel()
Send signal cancel to state machine interpreter.
A struct holding the context needed to reply to a command request.
void interpreter_sendSignal_cmdCancel(const Svc::WasmSequencer_CommandRequest &value)
Send signal cmdCancel to state machine interpreter.
virtual void serialIn_handler(FwIndexType portNum, Fw::LinearBufferBase &buffer)=0
Handler for input port serialIn.
bool isConnected_cmdRegOut_OutputPort(FwIndexType portNum) const
virtual void INVOKE_preMsgHook(FwOpcodeType opCode, U32 cmdSeq)
Pre-message hook for command INVOKE.
virtual void Svc_WasmSequencer_ControllerStateMachine_action_processInvoke(SmId smId, Svc_WasmSequencer_ControllerStateMachine::Signal signal, const Svc::WasmSequencer_InvokeRequest &value)=0
virtual void Svc_WasmSequencer_ControllerStateMachine_action_respond_ERROR(SmId smId, Svc_WasmSequencer_ControllerStateMachine::Signal signal, const Svc::WasmSequencer_RequestContext &value)=0
bool isConnected_prmGet_OutputPort(FwIndexType portNum) const
Implementation of state machine Svc_WasmSequencer_InterpreterStateMachine.
virtual void GLOBAL_SET_I32_preMsgHook(FwOpcodeType opCode, U32 cmdSeq)
Pre-message hook for command GLOBAL_SET_I32.
bool isConnected_cmdOut_OutputPort(FwIndexType portNum) const
Svc::InputCmdSeqInPort * get_seqRunIn_InputPort(FwIndexType portNum)
void log_WARNING_HI_SerialPortSendFailed(const Svc::WasmSequencer_HostFunction &host_function, I32 status) const
An ACTIVITY_LO event emitted by the guest program.
Why a guest memory.grow request could not be serviced by the guest bump allocator.
void controller_sendSignal_invoke(const Svc::WasmSequencer_InvokeRequest &value)
Send signal invoke to state machine controller.
virtual void checkTimers_handler(FwIndexType portNum, U32 context)=0
Handler for input port checkTimers.
virtual bool Svc_WasmSequencer_ControllerStateMachine_guard_moduleHasStart(SmId smId, Svc_WasmSequencer_ControllerStateMachine::Signal signal, const Svc::WasmSequencer_RequestContext &value) const =0
static constexpr FwIndexType getNum_timeCaller_OutputPorts()
void GLOBAL_GET_cmdHandlerBase(FwOpcodeType opCode, U32 cmdSeq, Fw::CmdArgBuffer &args)
virtual void Svc_WasmSequencer_ControllerStateMachine_action_respond_block_ERROR(SmId smId, Svc_WasmSequencer_ControllerStateMachine::Signal signal, const Svc::WasmSequencer_RequestContext &value)=0
virtual void WAIT_preMsgHook(FwOpcodeType opCode, U32 cmdSeq)
Pre-message hook for command WAIT.
#define FW_PORT_SERIALIZATION
calls for multi-note systems)
Definition: FpConfig.h:83
virtual void parametersLoaded()
Called whenever parameters are loaded.
Svc::WasmSequencer_ControllerStateMachine_State State
The state type.
virtual void GLOBAL_SET_F32_preMsgHook(FwOpcodeType opCode, U32 cmdSeq)
Pre-message hook for command GLOBAL_SET_F32.
void set_cmdResponseOut_OutputPort(FwIndexType portNum, Fw::InputCmdResponsePort *port)
Connect port to cmdResponseOut[portNum].
void tlmWrite_CommandsDispatched(U64 arg, Fw::Time _tlmTime=Fw::Time())
virtual void Svc_WasmSequencer_ControllerStateMachine_action_reportModuleSucceeded(SmId smId, Svc_WasmSequencer_ControllerStateMachine::Signal signal, const Svc::WasmSequencer_RequestContext &value)=0
static constexpr FwIndexType getNum_getParam_OutputPorts()
void log_WARNING_HI_BufferTooSmall(const Svc::WasmSequencer_HostFunction &host_function, U32 size, U32 valueSize) const
static constexpr FwIndexType getNum_seqDoneOut_OutputPorts()
virtual void seqCancelIn_handler(FwIndexType portNum)=0
Handler for input port seqCancelIn.