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"
36 #include "Os/Mutex.hpp"
61 
62 static_assert(
64  "WasmSequencer component requires serialization"
65 );
66 
67 namespace Svc {
68 
75  {
76 
77  // ----------------------------------------------------------------------
78  // Friend classes
79  // ----------------------------------------------------------------------
80 
84  friend class WasmSequencerTester;
85 
86  protected:
87 
88  // ----------------------------------------------------------------------
89  // Constants
90  // ----------------------------------------------------------------------
91 
93  enum {
95  };
96 
98  enum {
104  };
105 
107  enum {
109  };
110 
112  enum {
121  };
122 
124  enum {
130  };
131 
133  enum {
135  };
136 
138  enum {
139  OPCODE_RUN = 0x0,
140  OPCODE_LOAD = 0x1,
151  OPCODE_INVOKE = 0x2,
155  OPCODE_WAIT = 0x3,
157  OPCODE_PAUSE = 0x5,
159  OPCODE_CONTINUE = 0x6,
165  OPCODE_GLOBAL_SET_I64 = 0x8,
167  OPCODE_GLOBAL_SET_F32 = 0x9,
169  OPCODE_GLOBAL_SET_F64 = 0xa,
171  OPCODE_GLOBAL_GET = 0xb,
180  };
181 
183  enum {
206  EVENTID_BUFFERTOOLARGE = 0x12,
218  EVENTID_SEQUENCESTARTING = 0x1a,
224  EVENTID_SEQUENCEPANIC = 0x1e,
228  EVENTID_SEQUENCEPAUSED = 0x21,
247  };
248 
250  enum {
260  };
261 
263  enum {
269  PARAMID_SEQ_BASE_DIR = 0x2,
275  };
279 
281  enum class SmId : FwEnumStoreType {
282  controller,
283  interpreter,
284  };
285 
286  protected:
287 
288  // ----------------------------------------------------------------------
289  // Types for internal state machines
290  // ----------------------------------------------------------------------
291 
295  {
296 
297  // ----------------------------------------------------------------------
298  // Friend classes
299  // ----------------------------------------------------------------------
300 
304  friend class WasmSequencerTester;
305 
306  public:
307 
310  WasmSequencerComponentBase& component
311  );
312 
313  public:
314 
316  void init(
318  );
319 
320  public:
321 
324 
325  private:
326 
328  void action_processInvoke(
329  Signal signal,
331  );
332 
334  void action_setCancelRequested(
335  Signal signal
336  );
337 
339  void action_clearCancelRequested(
340  Signal signal
341  );
342 
344  void action_cancelPendingRequest(
345  Signal signal,
347  );
348 
350  void action_respond_noblock_OK(
351  Signal signal,
353  );
354 
356  void action_respond_ERROR(
357  Signal signal,
359  );
360 
362  void action_incrementSequenceFailure(
363  Signal signal
364  );
365 
367  void action_respondInvoke_BUSY(
368  Signal signal,
370  );
371 
373  void action_respondInvoke_ERROR(
374  Signal signal,
376  );
377 
379  void action_respondLoad_BUSY(
380  Signal signal,
381  const Svc::WasmSequencer_LoadRequest& value
382  );
383 
385  void action_respond_block_OK(
386  Signal signal,
388  );
389 
391  void action_respond_block_ERROR(
392  Signal signal,
394  );
395 
397  void action_load(
398  Signal signal,
399  const Svc::WasmSequencer_LoadRequest& value
400  );
401 
403  void action_invokeStart(
404  Signal signal,
406  );
407 
409  void action_invokeMain(
410  Signal signal,
412  );
413 
415  void action_reportModuleInvalidMain(
416  Signal signal,
418  );
419 
421  void action_reportModuleMainInvokeFailed(
422  Signal signal,
424  );
425 
427  void action_reportModuleStartInvokeFailed(
428  Signal signal,
430  );
431 
433  void action_reportModuleStarted(
434  Signal signal,
436  );
437 
439  void action_reportModuleSucceeded(
440  Signal signal,
442  );
443 
445  void action_reportModuleStartFailed(
446  Signal signal,
448  );
449 
451  void action_reportModuleMainFailed(
452  Signal signal,
454  );
455 
457  void action_resetStore(
458  Signal signal
459  );
460 
462  void action_runEngine(
463  Signal signal,
465  );
466 
467  private:
468 
470  bool guard_cancelRequested(
471  Signal signal
472  ) const;
473 
475  bool guard_moduleHasStart(
476  Signal signal,
478  ) const;
479 
481  bool guard_moduleHasValidMain(
482  Signal signal,
484  ) const;
485 
487  bool guard_invokeSucceeded(
488  Signal signal,
490  ) const;
491 
493  bool guard_interpreterSucceeded(
494  Signal signal
495  ) const;
496 
497  private:
498 
500  WasmSequencerComponentBase& m_component;
501 
502  };
503 
507  {
508 
509  // ----------------------------------------------------------------------
510  // Friend classes
511  // ----------------------------------------------------------------------
512 
516  friend class WasmSequencerTester;
517 
518  public:
519 
522  WasmSequencerComponentBase& component
523  );
524 
525  public:
526 
528  void init(
530  );
531 
532  public:
533 
536 
537  private:
538 
540  void action_cmdReplyOK(
541  Signal signal,
543  );
544 
546  void action_signalEntered(
547  Signal signal
548  );
549 
551  void action_spin(
552  Signal signal
553  );
554 
556  void action_reset(
557  Signal signal
558  );
559 
561  void action_clearExitStatus(
562  Signal signal
563  );
564 
566  void action_setExitReason_INTERPRETER_FINISHED(
567  Signal signal
568  );
569 
571  void action_setExitReason_INTERPRETER_TRAP(
572  Signal signal
573  );
574 
576  void action_setExitReason_REPLY_TIMEOUT(
577  Signal signal
578  );
579 
581  void action_setExitReason_HOST_FAILURE(
582  Signal signal
583  );
584 
586  void action_setExitReason_TIMER_INCOMPARABLE(
587  Signal signal
588  );
589 
591  void action_setExitReason_UNEXPECTED_REPLY(
592  Signal signal
593  );
594 
596  void action_setExitReason_CANCEL(
597  Signal signal
598  );
599 
601  void action_setExitCode(
602  Signal signal,
603  I32 value
604  );
605 
607  void action_setTrapReason(
608  Signal signal,
609  const Svc::WasmSequencer_TrapReason& value
610  );
611 
613  void action_setLastHostFunction(
614  Signal signal
615  );
616 
618  void action_finish(
619  Signal signal
620  );
621 
623  void action_reportPaused(
624  Signal signal
625  );
626 
628  void action_clearPause(
629  Signal signal
630  );
631 
633  void action_dispatchPendingHostFunction(
634  Signal signal
635  );
636 
638  void action_clearPendingHostFunction(
639  Signal signal
640  );
641 
643  void action_setContext(
644  Signal signal,
646  );
647 
649  void action_clearContext(
650  Signal signal
651  );
652 
654  void action_resume(
655  Signal signal
656  );
657 
659  void action_resumeI32(
660  Signal signal,
661  I32 value
662  );
663 
665  void action_checkSleepTimers(
666  Signal signal
667  );
668 
670  void action_checkTimeout(
671  Signal signal
672  );
673 
675  void action_dequeueSerialAndResume(
676  Signal signal,
677  const FwIndexType& value
678  );
679 
680  private:
681 
683  bool guard_pendingPause(
684  Signal signal
685  ) const;
686 
688  bool guard_pendingHostFunction(
689  Signal signal
690  ) const;
691 
693  bool guard_pendingHostFunctionIsSleep(
694  Signal signal
695  ) const;
696 
698  bool guard_blockingSerialIn(
699  Signal signal,
700  const FwIndexType& value
701  ) const;
702 
704  bool guard_dequeueSucceeded(
705  Signal signal
706  ) const;
707 
708  private:
709 
711  WasmSequencerComponentBase& m_component;
712 
713  };
714 
715  public:
716 
717  // ----------------------------------------------------------------------
718  // Component initialization
719  // ----------------------------------------------------------------------
720 
722  void init(
723  FwSizeType queueDepth,
724  FwEnumStoreType instance = 0
725  );
726 
727 #if !FW_DIRECT_PORT_CALLS
728 
729  public:
730 
731  // ----------------------------------------------------------------------
732  // Getters for special input ports
733  // ----------------------------------------------------------------------
734 
739  FwIndexType portNum
740  );
741 
742 #endif
743 
744 #if !FW_DIRECT_PORT_CALLS
745 
746  public:
747 
748  // ----------------------------------------------------------------------
749  // Getters for typed input ports
750  // ----------------------------------------------------------------------
751 
756  FwIndexType portNum
757  );
758 
763  FwIndexType portNum
764  );
765 
770  FwIndexType portNum
771  );
772 
777  FwIndexType portNum
778  );
779 
784  FwIndexType portNum
785  );
786 
787 #endif
788 
789 #if !FW_DIRECT_PORT_CALLS
790 
791  public:
792 
793  // ----------------------------------------------------------------------
794  // Getters for serial input ports
795  // ----------------------------------------------------------------------
796 
800  Fw::InputSerializePort* get_serialIn_InputPort(
801  FwIndexType portNum
802  );
803 
804 #endif
805 
806 #if !FW_DIRECT_PORT_CALLS
807 
808  public:
809 
810  // ----------------------------------------------------------------------
811  // Connect input ports to special output ports
812  // ----------------------------------------------------------------------
813 
816  FwIndexType portNum,
817  Fw::InputCmdRegPort* port
818  );
819 
822  FwIndexType portNum,
824  );
825 
828  FwIndexType portNum,
829  Fw::InputLogPort* port
830  );
831 
832 #if FW_ENABLE_TEXT_LOGGING == 1
833 
835  void set_logTextOut_OutputPort(
836  FwIndexType portNum,
837  Fw::InputLogTextPort* port
838  );
839 
840 #endif
841 
844  FwIndexType portNum,
845  Fw::InputPrmGetPort* port
846  );
847 
850  FwIndexType portNum,
851  Fw::InputPrmSetPort* port
852  );
853 
856  FwIndexType portNum,
857  Fw::InputTimePort* port
858  );
859 
862  FwIndexType portNum,
863  Fw::InputTlmPort* port
864  );
865 
866 #endif
867 
868 #if !FW_DIRECT_PORT_CALLS
869 
870  public:
871 
872  // ----------------------------------------------------------------------
873  // Connect typed input ports to typed output ports
874  // ----------------------------------------------------------------------
875 
878  FwIndexType portNum,
879  Fw::InputComPort* port
880  );
881 
884  FwIndexType portNum,
885  Fw::InputPrmGetPort* port
886  );
887 
890  FwIndexType portNum,
891  Fw::InputTlmGetPort* port
892  );
893 
896  FwIndexType portNum,
898  );
899 
902  FwIndexType portNum,
904  );
905 
906 #endif
907 
908 #if !FW_DIRECT_PORT_CALLS && FW_PORT_SERIALIZATION
909 
910  public:
911 
912  // ----------------------------------------------------------------------
913  // Connect serial input ports to special output ports
914  // ----------------------------------------------------------------------
915 
918  FwIndexType portNum,
919  Fw::InputSerializePort* port
920  );
921 
924  FwIndexType portNum,
925  Fw::InputSerializePort* port
926  );
927 
930  FwIndexType portNum,
931  Fw::InputSerializePort* port
932  );
933 
934 #if FW_ENABLE_TEXT_LOGGING == 1
935 
937  void set_logTextOut_OutputPort(
938  FwIndexType portNum,
939  Fw::InputSerializePort* port
940  );
941 
942 #endif
943 
946  FwIndexType portNum,
947  Fw::InputSerializePort* port
948  );
949 
952  FwIndexType portNum,
953  Fw::InputSerializePort* port
954  );
955 
958  FwIndexType portNum,
959  Fw::InputSerializePort* port
960  );
961 
962 #endif
963 
964 #if !FW_DIRECT_PORT_CALLS && FW_PORT_SERIALIZATION
965 
966  public:
967 
968  // ----------------------------------------------------------------------
969  // Connect serial input ports to typed output ports
970  // ----------------------------------------------------------------------
971 
974  FwIndexType portNum,
975  Fw::InputSerializePort* port
976  );
977 
980  FwIndexType portNum,
981  Fw::InputSerializePort* port
982  );
983 
986  FwIndexType portNum,
987  Fw::InputSerializePort* port
988  );
989 
990 #endif
991 
992 #if !FW_DIRECT_PORT_CALLS && FW_PORT_SERIALIZATION
993 
994  public:
995 
996  // ----------------------------------------------------------------------
997  // Connect typed and serial input ports to serial output ports
998  // ----------------------------------------------------------------------
999 
1001  void set_serialOut_OutputPort(
1002  FwIndexType portNum,
1003  Fw::InputPortBase* port
1004  );
1005 
1006 #endif
1007 
1008  public:
1009 
1010  // ----------------------------------------------------------------------
1011  // Command registration
1012  // ----------------------------------------------------------------------
1013 
1017  void regCommands();
1018 
1019  public:
1020 
1021  // ----------------------------------------------------------------------
1022  // Parameter loading
1023  // ----------------------------------------------------------------------
1024 
1028  void loadParameters();
1029 
1030  protected:
1031 
1032  // ----------------------------------------------------------------------
1033  // Component construction and destruction
1034  // ----------------------------------------------------------------------
1035 
1038  const char* compName = ""
1039  );
1040 
1042  virtual ~WasmSequencerComponentBase();
1043 
1044  protected:
1045 
1046  // ----------------------------------------------------------------------
1047  // Getters for numbers of special input ports
1048  // ----------------------------------------------------------------------
1049 
1054  return NUM_CMDIN_INPUT_PORTS;
1055  }
1056 
1057  protected:
1058 
1059  // ----------------------------------------------------------------------
1060  // Getters for numbers of typed input ports
1061  // ----------------------------------------------------------------------
1062 
1068  }
1069 
1075  }
1076 
1082  }
1083 
1088  return NUM_SEQRUNIN_INPUT_PORTS;
1089  }
1090 
1096  }
1097 
1098  protected:
1099 
1100  // ----------------------------------------------------------------------
1101  // Getters for numbers of serial input ports
1102  // ----------------------------------------------------------------------
1103 
1108  return NUM_SERIALIN_INPUT_PORTS;
1109  }
1110 
1111  protected:
1112 
1113  // ----------------------------------------------------------------------
1114  // Getters for numbers of special output ports
1115  // ----------------------------------------------------------------------
1116 
1122  }
1123 
1129  }
1130 
1135  return NUM_LOGOUT_OUTPUT_PORTS;
1136  }
1137 
1138 #if FW_ENABLE_TEXT_LOGGING == 1
1139 
1143  static constexpr FwIndexType getNum_logTextOut_OutputPorts() {
1145  }
1146 
1147 #endif
1148 
1153  return NUM_PRMGET_OUTPUT_PORTS;
1154  }
1155 
1160  return NUM_PRMSET_OUTPUT_PORTS;
1161  }
1162 
1168  }
1169 
1174  return NUM_TLMOUT_OUTPUT_PORTS;
1175  }
1176 
1177  protected:
1178 
1179  // ----------------------------------------------------------------------
1180  // Getters for numbers of typed output ports
1181  // ----------------------------------------------------------------------
1182 
1187  return NUM_CMDOUT_OUTPUT_PORTS;
1188  }
1189 
1195  }
1196 
1202  }
1203 
1209  }
1210 
1216  }
1217 
1218  protected:
1219 
1220  // ----------------------------------------------------------------------
1221  // Getters for numbers of serial output ports
1222  // ----------------------------------------------------------------------
1223 
1229  }
1230 
1231  protected:
1232 
1233  // ----------------------------------------------------------------------
1234  // Connection status queries for special output ports
1235  // ----------------------------------------------------------------------
1236 
1241  FwIndexType portNum
1242  ) const;
1243 
1248  FwIndexType portNum
1249  ) const;
1250 
1255  FwIndexType portNum
1256  ) const;
1257 
1258 #if FW_ENABLE_TEXT_LOGGING == 1
1259 
1263  bool isConnected_logTextOut_OutputPort(
1264  FwIndexType portNum
1265  ) const;
1266 
1267 #endif
1268 
1273  FwIndexType portNum
1274  ) const;
1275 
1280  FwIndexType portNum
1281  ) const;
1282 
1287  FwIndexType portNum
1288  ) const;
1289 
1294  FwIndexType portNum
1295  ) const;
1296 
1297  protected:
1298 
1299  // ----------------------------------------------------------------------
1300  // Connection status queries for typed output ports
1301  // ----------------------------------------------------------------------
1302 
1307  FwIndexType portNum
1308  ) const;
1309 
1314  FwIndexType portNum
1315  ) const;
1316 
1321  FwIndexType portNum
1322  ) const;
1323 
1328  FwIndexType portNum
1329  ) const;
1330 
1335  FwIndexType portNum
1336  ) const;
1337 
1338  protected:
1339 
1340  // ----------------------------------------------------------------------
1341  // Connection status queries for serial output ports
1342  // ----------------------------------------------------------------------
1343 
1348  FwIndexType portNum
1349  ) const;
1350 
1351 #if FW_DIRECT_PORT_CALLS
1352  public:
1353 #else
1354  protected:
1355 #endif
1356 
1357  // ----------------------------------------------------------------------
1358  // Port handler base-class functions for special input ports
1359  //
1360  // Call these functions directly to bypass the corresponding ports
1361  // ----------------------------------------------------------------------
1362 
1364  void cmdIn_handlerBase(
1365  FwIndexType portNum,
1366  FwOpcodeType opCode,
1367  U32 cmdSeq,
1368  Fw::CmdArgBuffer& args
1369  );
1370 
1371  protected:
1372 
1373  // ----------------------------------------------------------------------
1374  // Handlers to implement for typed input ports
1375  // ----------------------------------------------------------------------
1376 
1378  virtual void checkTimers_handler(
1379  FwIndexType portNum,
1380  U32 context
1381  ) = 0;
1382 
1384  virtual void cmdResponseIn_handler(
1385  FwIndexType portNum,
1386  FwOpcodeType opCode,
1387  U32 cmdSeq,
1388  const Fw::CmdResponse& response
1389  ) = 0;
1390 
1392  virtual void seqCancelIn_handler(
1393  FwIndexType portNum
1394  ) = 0;
1395 
1397  virtual void seqRunIn_handler(
1398  FwIndexType portNum,
1399  const Fw::StringBase& filename,
1400  const Svc::SeqArgs& args
1401  ) = 0;
1402 
1404  virtual void writeTelemetry_handler(
1405  FwIndexType portNum,
1406  U32 context
1407  ) = 0;
1408 
1409 #if FW_DIRECT_PORT_CALLS
1410  public:
1411 #else
1412  protected:
1413 #endif
1414 
1415  // ----------------------------------------------------------------------
1416  // Port handler base-class functions for typed input ports
1417  //
1418  // Call these functions directly to bypass the corresponding ports
1419  // ----------------------------------------------------------------------
1420 
1423  FwIndexType portNum,
1424  U32 context
1425  );
1426 
1429  FwIndexType portNum,
1430  FwOpcodeType opCode,
1431  U32 cmdSeq,
1432  const Fw::CmdResponse& response
1433  );
1434 
1437  FwIndexType portNum
1438  );
1439 
1441  void seqRunIn_handlerBase(
1442  FwIndexType portNum,
1443  const Fw::StringBase& filename,
1444  const Svc::SeqArgs& args
1445  );
1446 
1449  FwIndexType portNum,
1450  U32 context
1451  );
1452 
1453  protected:
1454 
1455  // ----------------------------------------------------------------------
1456  // Handlers to implement for serial input ports
1457  // ----------------------------------------------------------------------
1458 
1460  virtual void serialIn_handler(
1461  FwIndexType portNum,
1462  Fw::LinearBufferBase& buffer
1463  ) = 0;
1464 
1465 #if FW_DIRECT_PORT_CALLS
1466  public:
1467 #else
1468  protected:
1469 #endif
1470 
1471  // ----------------------------------------------------------------------
1472  // Port handler base-class functions for serial input ports
1473  //
1474  // Call these functions directly to bypass the corresponding ports
1475  // ----------------------------------------------------------------------
1476 
1478  void serialIn_handlerBase(
1479  FwIndexType portNum,
1480  Fw::LinearBufferBase& buffer
1481  );
1482 
1483  protected:
1484 
1485  // ----------------------------------------------------------------------
1486  // Pre-message hooks for typed async input ports
1487  //
1488  // Each of these functions is invoked just before processing a message
1489  // on the corresponding port. By default, they do nothing. You can
1490  // override them to provide specific pre-message behavior.
1491  // ----------------------------------------------------------------------
1492 
1494  virtual void checkTimers_preMsgHook(
1495  FwIndexType portNum,
1496  U32 context
1497  );
1498 
1500  virtual void cmdResponseIn_preMsgHook(
1501  FwIndexType portNum,
1502  FwOpcodeType opCode,
1503  U32 cmdSeq,
1504  const Fw::CmdResponse& response
1505  );
1506 
1508  virtual void seqRunIn_preMsgHook(
1509  FwIndexType portNum,
1510  const Fw::StringBase& filename,
1511  const Svc::SeqArgs& args
1512  );
1513 
1515  virtual void writeTelemetry_preMsgHook(
1516  FwIndexType portNum,
1517  U32 context
1518  );
1519 
1520  protected:
1521 
1522  // ----------------------------------------------------------------------
1523  // Invocation functions for typed output ports
1524  // ----------------------------------------------------------------------
1525 
1527  void cmdOut_out(
1528  FwIndexType portNum,
1529  Fw::ComBuffer& data,
1530  U32 context
1531  ) const;
1532 
1535  FwIndexType portNum,
1536  FwPrmIdType id,
1537  Fw::ParamBuffer& val
1538  ) const;
1540 
1543  FwIndexType portNum,
1544  FwChanIdType id,
1545  Fw::Time& timeTag,
1546  Fw::TlmBuffer& val
1547  ) const;
1550 
1552  void seqDoneOut_out(
1553  FwIndexType portNum,
1554  FwOpcodeType opCode,
1555  U32 cmdSeq,
1556  const Fw::CmdResponse& response
1557  ) const;
1558 
1560  void seqStartOut_out(
1561  FwIndexType portNum,
1562  const Fw::StringBase& filename,
1563  const Svc::SeqArgs& args
1564  ) const;
1565 
1566  protected:
1567 
1568  // ----------------------------------------------------------------------
1569  // Invocation functions for serial output ports
1570  // ----------------------------------------------------------------------
1571 
1574  FwIndexType portNum,
1575  Fw::LinearBufferBase& buffer
1576  );
1577 
1578  protected:
1579 
1580  // ----------------------------------------------------------------------
1581  // State getter functions
1582  // ----------------------------------------------------------------------
1583 
1586 
1589 
1590  protected:
1591 
1592  // ----------------------------------------------------------------------
1593  // Signal send functions
1594  // ----------------------------------------------------------------------
1595 
1598  const Svc::WasmSequencer_LoadRequest& value
1599  );
1600 
1603  const Svc::WasmSequencer_LoadRequest& value
1604  );
1605 
1608  const Svc::WasmSequencer_InvokeRequest& value
1609  );
1610 
1613  const Svc::WasmSequencer_RequestContext& value
1614  );
1615 
1618  const Svc::WasmSequencer_RequestContext& value
1619  );
1620 
1623 
1626  const Svc::WasmSequencer_RequestContext& value
1627  );
1628 
1631  const Svc::WasmSequencer_RequestContext& value
1632  );
1633 
1636  const Svc::WasmSequencer_RequestContext& value
1637  );
1638 
1641 
1644  const Svc::WasmSequencer_CommandRequest& value
1645  );
1646 
1649 
1652 
1655  const Svc::WasmSequencer_RequestContext& value
1656  );
1657 
1660 
1663 
1666  I32 value
1667  );
1668 
1671 
1674  const Svc::WasmSequencer_HostFunction& value
1675  );
1676 
1679 
1682 
1685  const FwIndexType& value
1686  );
1687 
1690  I32 value
1691  );
1692 
1695  const Svc::WasmSequencer_TrapReason& value
1696  );
1697 
1700 
1703 
1704  protected:
1705 
1706  // ----------------------------------------------------------------------
1707  // Functions to implement for internal state machine actions
1708  // ----------------------------------------------------------------------
1709 
1714  SmId smId,
1716  const Svc::WasmSequencer_InvokeRequest& value
1717  ) = 0;
1718 
1723  SmId smId,
1725  ) = 0;
1726 
1731  SmId smId,
1733  ) = 0;
1734 
1740  SmId smId,
1742  const Svc::WasmSequencer_RequestContext& value
1743  ) = 0;
1744 
1749  SmId smId,
1751  const Svc::WasmSequencer_RequestContext& value
1752  ) = 0;
1753 
1759  SmId smId,
1761  const Svc::WasmSequencer_RequestContext& value
1762  ) = 0;
1763 
1768  SmId smId,
1770  ) = 0;
1771 
1777  SmId smId,
1779  const Svc::WasmSequencer_InvokeRequest& value
1780  ) = 0;
1781 
1787  SmId smId,
1789  const Svc::WasmSequencer_InvokeRequest& value
1790  ) = 0;
1791 
1798  SmId smId,
1800  const Svc::WasmSequencer_LoadRequest& value
1801  ) = 0;
1802 
1808  SmId smId,
1810  const Svc::WasmSequencer_RequestContext& value
1811  ) = 0;
1812 
1818  SmId smId,
1820  const Svc::WasmSequencer_RequestContext& value
1821  ) = 0;
1822 
1828  SmId smId,
1830  const Svc::WasmSequencer_LoadRequest& value
1831  ) = 0;
1832 
1837  SmId smId,
1839  const Svc::WasmSequencer_RequestContext& value
1840  ) = 0;
1841 
1846  SmId smId,
1848  const Svc::WasmSequencer_RequestContext& value
1849  ) = 0;
1850 
1855  SmId smId,
1857  const Svc::WasmSequencer_RequestContext& value
1858  ) = 0;
1859 
1864  SmId smId,
1866  const Svc::WasmSequencer_RequestContext& value
1867  ) = 0;
1868 
1873  SmId smId,
1875  const Svc::WasmSequencer_RequestContext& value
1876  ) = 0;
1877 
1882  SmId smId,
1884  const Svc::WasmSequencer_RequestContext& value
1885  ) = 0;
1886 
1891  SmId smId,
1893  const Svc::WasmSequencer_RequestContext& value
1894  ) = 0;
1895 
1900  SmId smId,
1902  const Svc::WasmSequencer_RequestContext& value
1903  ) = 0;
1904 
1909  SmId smId,
1911  const Svc::WasmSequencer_RequestContext& value
1912  ) = 0;
1913 
1918  SmId smId,
1920  ) = 0;
1921 
1927  SmId smId,
1929  const Svc::WasmSequencer_RequestContext& value
1930  ) = 0;
1931 
1936  SmId smId,
1938  const Svc::WasmSequencer_CommandRequest& value
1939  ) = 0;
1940 
1945  SmId smId,
1947  ) = 0;
1948 
1953  SmId smId,
1955  ) = 0;
1956 
1961  SmId smId,
1963  ) = 0;
1964 
1967  SmId smId,
1969  ) = 0;
1970 
1973  SmId smId,
1975  ) = 0;
1976 
1979  SmId smId,
1981  ) = 0;
1982 
1985  SmId smId,
1987  ) = 0;
1988 
1991  SmId smId,
1993  ) = 0;
1994 
1997  SmId smId,
1999  ) = 0;
2000 
2003  SmId smId,
2005  ) = 0;
2006 
2009  SmId smId,
2011  ) = 0;
2012 
2015  SmId smId,
2017  I32 value
2018  ) = 0;
2019 
2022  SmId smId,
2024  const Svc::WasmSequencer_TrapReason& value
2025  ) = 0;
2026 
2029  SmId smId,
2031  ) = 0;
2032 
2038  SmId smId,
2040  ) = 0;
2041 
2046  SmId smId,
2048  ) = 0;
2049 
2054  SmId smId,
2056  ) = 0;
2057 
2062  SmId smId,
2064  ) = 0;
2065 
2070  SmId smId,
2072  ) = 0;
2073 
2078  SmId smId,
2080  const Svc::WasmSequencer_RequestContext& value
2081  ) = 0;
2082 
2087  SmId smId,
2089  ) = 0;
2090 
2095  SmId smId,
2097  ) = 0;
2098 
2103  SmId smId,
2105  I32 value
2106  ) = 0;
2107 
2112  SmId smId,
2114  ) = 0;
2115 
2120  SmId smId,
2122  ) = 0;
2123 
2128  SmId smId,
2130  const FwIndexType& value
2131  ) = 0;
2132 
2133  protected:
2134 
2135  // ----------------------------------------------------------------------
2136  // Functions to implement for internal state machine guards
2137  // ----------------------------------------------------------------------
2138 
2143  SmId smId,
2145  ) const = 0;
2146 
2151  SmId smId,
2153  const Svc::WasmSequencer_RequestContext& value
2154  ) const = 0;
2155 
2160  SmId smId,
2162  const Svc::WasmSequencer_RequestContext& value
2163  ) const = 0;
2164 
2169  SmId smId,
2171  const Svc::WasmSequencer_RequestContext& value
2172  ) const = 0;
2173 
2178  SmId smId,
2180  ) const = 0;
2181 
2186  SmId smId,
2188  ) const = 0;
2189 
2194  SmId smId,
2196  ) const = 0;
2197 
2202  SmId smId,
2204  ) const = 0;
2205 
2210  SmId smId,
2212  const FwIndexType& value
2213  ) const = 0;
2214 
2219  SmId smId,
2221  ) const = 0;
2222 
2223  protected:
2224 
2225  // ----------------------------------------------------------------------
2226  // Command response
2227  // ----------------------------------------------------------------------
2228 
2230  void cmdResponse_out(
2231  FwOpcodeType opCode,
2232  U32 cmdSeq,
2233  Fw::CmdResponse response
2234  );
2235 
2236  protected:
2237 
2238  // ----------------------------------------------------------------------
2239  // Command handlers to implement
2240  // ----------------------------------------------------------------------
2241 
2255  virtual void RUN_cmdHandler(
2256  FwOpcodeType opCode,
2257  U32 cmdSeq,
2258  const Fw::CmdStringArg& fileName,
2259  const Svc::BlockState& block
2260  ) = 0;
2261 
2268  virtual void LOAD_cmdHandler(
2269  FwOpcodeType opCode,
2270  U32 cmdSeq,
2271  const Fw::CmdStringArg& fileName,
2272  const Fw::CmdStringArg& name
2273  ) = 0;
2274 
2278  virtual void INVOKE_cmdHandler(
2279  FwOpcodeType opCode,
2280  U32 cmdSeq,
2281  const Fw::CmdStringArg& module,
2282  const Svc::BlockState& block
2283  ) = 0;
2284 
2288  virtual void WAIT_cmdHandler(
2289  FwOpcodeType opCode,
2290  U32 cmdSeq
2291  ) = 0;
2292 
2297  virtual void CANCEL_cmdHandler(
2298  FwOpcodeType opCode,
2299  U32 cmdSeq
2300  ) = 0;
2301 
2309  virtual void PAUSE_cmdHandler(
2310  FwOpcodeType opCode,
2311  U32 cmdSeq
2312  ) = 0;
2313 
2317  virtual void CONTINUE_cmdHandler(
2318  FwOpcodeType opCode,
2319  U32 cmdSeq
2320  ) = 0;
2321 
2326  virtual void GLOBAL_SET_I32_cmdHandler(
2327  FwOpcodeType opCode,
2328  U32 cmdSeq,
2329  const Fw::CmdStringArg& moduleName,
2330  const Fw::CmdStringArg& name,
2331  I32 value
2332  ) = 0;
2333 
2338  virtual void GLOBAL_SET_I64_cmdHandler(
2339  FwOpcodeType opCode,
2340  U32 cmdSeq,
2341  const Fw::CmdStringArg& moduleName,
2342  const Fw::CmdStringArg& name,
2343  I64 value
2344  ) = 0;
2345 
2350  virtual void GLOBAL_SET_F32_cmdHandler(
2351  FwOpcodeType opCode,
2352  U32 cmdSeq,
2353  const Fw::CmdStringArg& moduleName,
2354  const Fw::CmdStringArg& name,
2355  F32 value
2356  ) = 0;
2357 
2362  virtual void GLOBAL_SET_F64_cmdHandler(
2363  FwOpcodeType opCode,
2364  U32 cmdSeq,
2365  const Fw::CmdStringArg& moduleName,
2366  const Fw::CmdStringArg& name,
2367  F64 value
2368  ) = 0;
2369 
2374  virtual void GLOBAL_GET_cmdHandler(
2375  FwOpcodeType opCode,
2376  U32 cmdSeq,
2377  const Fw::CmdStringArg& moduleName,
2378  const Fw::CmdStringArg& name
2379  ) = 0;
2380 
2381  protected:
2382 
2383  // ----------------------------------------------------------------------
2384  // Command handler base-class functions
2385  //
2386  // Call these functions directly to bypass the command input port
2387  // ----------------------------------------------------------------------
2388 
2402  void RUN_cmdHandlerBase(
2403  FwOpcodeType opCode,
2404  U32 cmdSeq,
2405  Fw::CmdArgBuffer& args
2406  );
2407 
2414  void LOAD_cmdHandlerBase(
2415  FwOpcodeType opCode,
2416  U32 cmdSeq,
2417  Fw::CmdArgBuffer& args
2418  );
2419 
2423  void INVOKE_cmdHandlerBase(
2424  FwOpcodeType opCode,
2425  U32 cmdSeq,
2426  Fw::CmdArgBuffer& args
2427  );
2428 
2432  void WAIT_cmdHandlerBase(
2433  FwOpcodeType opCode,
2434  U32 cmdSeq,
2435  Fw::CmdArgBuffer& args
2436  );
2437 
2442  void CANCEL_cmdHandlerBase(
2443  FwOpcodeType opCode,
2444  U32 cmdSeq,
2445  Fw::CmdArgBuffer& args
2446  );
2447 
2455  void PAUSE_cmdHandlerBase(
2456  FwOpcodeType opCode,
2457  U32 cmdSeq,
2458  Fw::CmdArgBuffer& args
2459  );
2460 
2465  FwOpcodeType opCode,
2466  U32 cmdSeq,
2467  Fw::CmdArgBuffer& args
2468  );
2469 
2475  FwOpcodeType opCode,
2476  U32 cmdSeq,
2477  Fw::CmdArgBuffer& args
2478  );
2479 
2485  FwOpcodeType opCode,
2486  U32 cmdSeq,
2487  Fw::CmdArgBuffer& args
2488  );
2489 
2495  FwOpcodeType opCode,
2496  U32 cmdSeq,
2497  Fw::CmdArgBuffer& args
2498  );
2499 
2505  FwOpcodeType opCode,
2506  U32 cmdSeq,
2507  Fw::CmdArgBuffer& args
2508  );
2509 
2515  FwOpcodeType opCode,
2516  U32 cmdSeq,
2517  Fw::CmdArgBuffer& args
2518  );
2519 
2520  protected:
2521 
2522  // ----------------------------------------------------------------------
2523  // Pre-message hooks for async commands
2524  //
2525  // Each of these functions is invoked just before processing the
2526  // corresponding command. By default they do nothing. You can
2527  // override them to provide specific pre-command behavior.
2528  // ----------------------------------------------------------------------
2529 
2531  virtual void RUN_preMsgHook(
2532  FwOpcodeType opCode,
2533  U32 cmdSeq
2534  );
2535 
2537  virtual void LOAD_preMsgHook(
2538  FwOpcodeType opCode,
2539  U32 cmdSeq
2540  );
2541 
2543  virtual void INVOKE_preMsgHook(
2544  FwOpcodeType opCode,
2545  U32 cmdSeq
2546  );
2547 
2549  virtual void WAIT_preMsgHook(
2550  FwOpcodeType opCode,
2551  U32 cmdSeq
2552  );
2553 
2555  virtual void PAUSE_preMsgHook(
2556  FwOpcodeType opCode,
2557  U32 cmdSeq
2558  );
2559 
2561  virtual void CONTINUE_preMsgHook(
2562  FwOpcodeType opCode,
2563  U32 cmdSeq
2564  );
2565 
2567  virtual void GLOBAL_SET_I32_preMsgHook(
2568  FwOpcodeType opCode,
2569  U32 cmdSeq
2570  );
2571 
2573  virtual void GLOBAL_SET_I64_preMsgHook(
2574  FwOpcodeType opCode,
2575  U32 cmdSeq
2576  );
2577 
2579  virtual void GLOBAL_SET_F32_preMsgHook(
2580  FwOpcodeType opCode,
2581  U32 cmdSeq
2582  );
2583 
2585  virtual void GLOBAL_SET_F64_preMsgHook(
2586  FwOpcodeType opCode,
2587  U32 cmdSeq
2588  );
2589 
2591  virtual void GLOBAL_GET_preMsgHook(
2592  FwOpcodeType opCode,
2593  U32 cmdSeq
2594  );
2595 
2596  protected:
2597 
2598  // ----------------------------------------------------------------------
2599  // Event logging functions
2600  // ----------------------------------------------------------------------
2601 
2605  void log_DIAGNOSTIC_StoreAllocationSucceeded(U16 moduleCount) const;
2606 
2611 
2616  const Svc::WasmSequencer_SignalSource& signalSource,
2618  ) const;
2619 
2623  void log_WARNING_LO_ModuleNotFound(const Fw::StringBase& module_name) const;
2624 
2631  U64 requestedSize
2632  ) const;
2633 
2636  const Fw::StringBase& module_name,
2637  const Fw::StringBase& globalName,
2638  const Svc::WasmSequencer_Status& reason
2639  ) const;
2640 
2643  const Fw::StringBase& module_name,
2644  const Fw::StringBase& globalName,
2645  const Svc::WasmSequencer_Status& reason
2646  ) const;
2647 
2650  const Fw::StringBase& module_name,
2651  const Fw::StringBase& globalName,
2652  I32 value
2653  ) const;
2654 
2657  const Fw::StringBase& module_name,
2658  const Fw::StringBase& globalName,
2659  I64 value
2660  ) const;
2661 
2664  const Fw::StringBase& module_name,
2665  const Fw::StringBase& globalName,
2666  F32 value
2667  ) const;
2668 
2671  const Fw::StringBase& module_name,
2672  const Fw::StringBase& globalName,
2673  F64 value
2674  ) const;
2675 
2680  const Fw::StringBase& fileName,
2681  I32 status
2682  ) const;
2683 
2689  const Fw::StringBase& baseDir,
2690  const Fw::StringBase& fileName
2691  ) const;
2692 
2699  const Fw::StringBase& baseDir,
2700  const Fw::StringBase& fileName
2701  ) const;
2702 
2707 
2712 
2717 
2723 
2728  const Svc::WasmSequencer_HostFunction& host_function,
2729  U32 size,
2730  U32 maxSize
2731  ) const;
2732 
2737  const Svc::WasmSequencer_HostFunction& host_function,
2738  U32 size,
2739  U32 valueSize
2740  ) const;
2741 
2744  const Svc::WasmSequencer_HostFunction& host_function,
2745  const Svc::WasmSequencer_Status& code
2746  ) const;
2747 
2749  void log_WARNING_HI_InvalidBlockingTypeValue(I32 invalidValue) const;
2750 
2755  const Svc::WasmSequencer_HostFunction& host_function,
2756  I32 index,
2757  U32 numPorts
2758  ) const;
2759 
2765  const Svc::WasmSequencer_HostFunction& host_function,
2766  I32 status
2767  ) const;
2768 
2775  U32 portIndex,
2776  U32 size,
2777  U32 maxSize
2778  ) const;
2779 
2786  I32 raw,
2787  const Fw::StringBase& msg
2788  ) const;
2789 
2794 
2799 
2806  ) const;
2807 
2814  const Svc::WasmSequencer_SequencePhase& phase,
2815  I32 code
2816  ) const;
2817 
2823  const Svc::WasmSequencer_SequencePhase& phase,
2824  I32 code
2825  ) const;
2826 
2832  const Svc::WasmSequencer_SequencePhase& phase,
2833  const Svc::WasmSequencer_TrapReason& reason
2834  ) const;
2835 
2842  const Svc::WasmSequencer_SequencePhase& phase,
2843  const Svc::WasmSequencer_ExitReason& reason,
2844  const Svc::WasmSequencer_HostFunction& hostFunction
2845  ) const;
2846 
2850  void log_ACTIVITY_HI_SequencePaused() const;
2851 
2855  void log_WARNING_LO_SequenceNotRunning() const;
2856 
2862  const Svc::WasmSequencer_HostFunction& host_function,
2863  U64 micros
2864  ) const;
2865 
2873  const Svc::WasmSequencer_HostFunction& host_function,
2874  I64 id
2875  ) const;
2876 
2882  FwOpcodeType opcode,
2883  const Fw::CmdResponse& response,
2884  U16 oldSequenceIdx,
2885  U16 currentSequenceIdx
2886  ) const;
2887 
2893  FwOpcodeType opcode,
2894  const Fw::CmdResponse& response,
2895  U16 actualCmdIdx,
2896  U16 expectedCmdIdx
2897  ) const;
2898 
2901  Svc::WasmSequencer_ModuleIdx moduleIdx,
2902  const Svc::WasmSequencer_Status& status
2903  ) const;
2904 
2908  void log_WARNING_HI_LogWarningHi(const Fw::StringBase& msg) const;
2909 
2913  void log_WARNING_LO_LogWarningLo(const Fw::StringBase& msg) const;
2914 
2918  void log_ACTIVITY_HI_LogActivityHi(const Fw::StringBase& msg) const;
2919 
2923  void log_ACTIVITY_LO_LogActivityLo(const Fw::StringBase& msg) const;
2924 
2928  void log_DIAGNOSTIC_LogDiagnostic(const Fw::StringBase& msg) const;
2929 
2930  protected:
2931 
2932  // ----------------------------------------------------------------------
2933  // Telemetry serialized write
2934  // ----------------------------------------------------------------------
2935 
2940  void tlmWrite(
2941  FwChanIdType id,
2942  Fw::TlmBuffer& _tlmBuff,
2943  Fw::Time _tlmTime = Fw::Time()
2944  ) const;
2945 
2946  protected:
2947 
2948  // ----------------------------------------------------------------------
2949  // Telemetry write functions
2950  // ----------------------------------------------------------------------
2951 
2957  Fw::Time _tlmTime = Fw::Time()
2958  );
2959 
2965  Fw::Time _tlmTime = Fw::Time()
2966  );
2967 
2972  U64 arg,
2973  Fw::Time _tlmTime = Fw::Time()
2974  );
2975 
2980  U64 arg,
2981  Fw::Time _tlmTime = Fw::Time()
2982  );
2983 
2988  U64 arg,
2989  Fw::Time _tlmTime = Fw::Time()
2990  );
2991 
2996  U64 arg,
2997  Fw::Time _tlmTime = Fw::Time()
2998  );
2999 
3004  U64 arg,
3005  Fw::Time _tlmTime = Fw::Time()
3006  );
3007 
3012  const Svc::WasmSequencer_TrapReason& arg,
3013  Fw::Time _tlmTime = Fw::Time()
3014  );
3015 
3021  void tlmWrite_SeqName(
3022  const Fw::StringBase& arg,
3023  Fw::Time _tlmTime = Fw::Time()
3024  );
3025 
3026  protected:
3027 
3028  // ----------------------------------------------------------------------
3029  // Parameter hook functions
3030  // ----------------------------------------------------------------------
3031 
3035  virtual void parameterUpdated(
3036  FwPrmIdType id
3037  );
3038 
3044  virtual void parametersLoaded();
3045 
3051  virtual void parameterLoaded(
3052  FwPrmIdType id,
3053  Fw::ParamValid valid
3054  );
3055 
3056  protected:
3057 
3058  // ----------------------------------------------------------------------
3059  // Parameter get functions
3060  // ----------------------------------------------------------------------
3061 
3071  Fw::ParamValid& valid
3072  );
3073 
3085  Fw::ParamValid& valid
3086  );
3087 
3097  Fw::ParamValid& valid
3098  );
3099 
3100  protected:
3101 
3102  // ----------------------------------------------------------------------
3103  // Time
3104  // ----------------------------------------------------------------------
3105 
3109  Fw::Time getTime() const;
3110 
3111  protected:
3112 
3113  // ----------------------------------------------------------------------
3114  // Mutex operations for guarded ports
3115  //
3116  // You can override these operations to provide more sophisticated
3117  // synchronization
3118  // ----------------------------------------------------------------------
3119 
3121  virtual void lock();
3122 
3124  virtual void unLock();
3125 
3126  private:
3127 
3128  // ----------------------------------------------------------------------
3129  // Message dispatch functions
3130  // ----------------------------------------------------------------------
3131 
3133  virtual MsgDispatchStatus doDispatch();
3134 
3135  private:
3136 
3137  // ----------------------------------------------------------------------
3138  // Calls for messages received on special input ports
3139  // ----------------------------------------------------------------------
3140 
3142  static void m_p_cmdIn_in(
3143  Fw::PassiveComponentBase* callComp,
3144  FwIndexType portNum,
3145  FwOpcodeType opCode,
3146  U32 cmdSeq,
3147  Fw::CmdArgBuffer& args
3148  );
3149 
3150  private:
3151 
3152  // ----------------------------------------------------------------------
3153  // Calls for messages received on typed input ports
3154  // ----------------------------------------------------------------------
3155 
3157  static void m_p_checkTimers_in(
3158  Fw::PassiveComponentBase* callComp,
3159  FwIndexType portNum,
3160  U32 context
3161  );
3162 
3164  static void m_p_cmdResponseIn_in(
3165  Fw::PassiveComponentBase* callComp,
3166  FwIndexType portNum,
3167  FwOpcodeType opCode,
3168  U32 cmdSeq,
3169  const Fw::CmdResponse& response
3170  );
3171 
3173  static void m_p_seqCancelIn_in(
3174  Fw::PassiveComponentBase* callComp,
3175  FwIndexType portNum
3176  );
3177 
3179  static void m_p_seqRunIn_in(
3180  Fw::PassiveComponentBase* callComp,
3181  FwIndexType portNum,
3182  const Fw::StringBase& filename,
3183  const Svc::SeqArgs& args
3184  );
3185 
3187  static void m_p_writeTelemetry_in(
3188  Fw::PassiveComponentBase* callComp,
3189  FwIndexType portNum,
3190  U32 context
3191  );
3192 
3193  private:
3194 
3195  // ----------------------------------------------------------------------
3196  // Calls for messages received on serial input ports
3197  // ----------------------------------------------------------------------
3198 
3199 #if FW_PORT_SERIALIZATION
3200 
3202  static void m_p_serialIn_in(
3203  Fw::PassiveComponentBase* callComp,
3204  FwIndexType portNum,
3205  Fw::LinearBufferBase& buffer
3206  );
3207 
3208 #endif
3209 
3210  private:
3211 
3212  // ----------------------------------------------------------------------
3213  // Invocation functions for special output ports
3214  // ----------------------------------------------------------------------
3215 
3217  void cmdRegOut_out(
3218  FwIndexType portNum,
3219  FwOpcodeType opCode
3220  ) const;
3221 
3223  void cmdResponseOut_out(
3224  FwIndexType portNum,
3225  FwOpcodeType opCode,
3226  U32 cmdSeq,
3227  const Fw::CmdResponse& response
3228  ) const;
3229 
3231  void logOut_out(
3232  FwIndexType portNum,
3233  FwEventIdType id,
3234  Fw::Time& timeTag,
3235  const Fw::LogSeverity& severity,
3236  Fw::LogBuffer& args
3237  ) const;
3238 
3239 #if FW_ENABLE_TEXT_LOGGING
3240 
3242  void logTextOut_out(
3243  FwIndexType portNum,
3244  FwEventIdType id,
3245  Fw::Time& timeTag,
3246  const Fw::LogSeverity& severity,
3247  Fw::TextLogString& text
3248  ) const;
3249 
3250 #endif
3251 
3253  Fw::ParamValid prmGet_out(
3254  FwIndexType portNum,
3255  FwPrmIdType id,
3256  Fw::ParamBuffer& val
3257  ) const;
3259 
3261  void prmSet_out(
3262  FwIndexType portNum,
3263  FwPrmIdType id,
3264  Fw::ParamBuffer& val
3265  ) const;
3266 
3268  void timeCaller_out(
3269  FwIndexType portNum,
3270  Fw::Time& time
3271  ) const;
3272 
3274  void tlmOut_out(
3275  FwIndexType portNum,
3276  FwChanIdType id,
3277  Fw::Time& timeTag,
3278  Fw::TlmBuffer& val
3279  ) const;
3280 
3281  private:
3282 
3283  // ----------------------------------------------------------------------
3284  // Send signal helper functions
3285  // ----------------------------------------------------------------------
3286 
3288  void sendSignalStart(
3289  SmId smId,
3290  FwEnumStoreType signal,
3291  Fw::SerialBufferBase& buffer
3292  );
3293 
3295  void controller_sendSignalFinish(
3296  Fw::LinearBufferBase& buffer
3297  );
3298 
3300  void interpreter_sendSignalFinish(
3301  Fw::LinearBufferBase& buffer
3302  );
3303 
3304  private:
3305 
3306  // ----------------------------------------------------------------------
3307  // Helper functions for state machine dispatch
3308  // ----------------------------------------------------------------------
3309 
3311  void smDispatch(
3312  Fw::SerialBufferBase& buffer
3313  );
3314 
3316  static void deserializeSmIdAndSignal(
3317  Fw::SerialBufferBase& buffer,
3318  FwEnumStoreType& smId,
3319  FwEnumStoreType& signal
3320  );
3321 
3323  void Svc_WasmSequencer_ControllerStateMachine_smDispatch(
3324  Fw::SerialBufferBase& buffer,
3325  Svc_WasmSequencer_ControllerStateMachine& sm,
3327  );
3328 
3330  void Svc_WasmSequencer_InterpreterStateMachine_smDispatch(
3331  Fw::SerialBufferBase& buffer,
3332  Svc_WasmSequencer_InterpreterStateMachine& sm,
3334  );
3335 
3336  private:
3337 
3338  // ----------------------------------------------------------------------
3339  // Parameter set functions
3340  // ----------------------------------------------------------------------
3341 
3345  Fw::CmdResponse paramSet_HOST_FUNCTION_TIMEOUT_SECS(
3346  Fw::SerialBufferBase& val
3347  );
3348 
3352  Fw::CmdResponse paramSet_INSTRUCTION_FUEL(
3353  Fw::SerialBufferBase& val
3354  );
3355 
3359  Fw::CmdResponse paramSet_SEQ_BASE_DIR(
3360  Fw::SerialBufferBase& val
3361  );
3362 
3363  private:
3364 
3365  // ----------------------------------------------------------------------
3366  // Parameter save functions
3367  // ----------------------------------------------------------------------
3368 
3372  Fw::CmdResponse paramSave_HOST_FUNCTION_TIMEOUT_SECS();
3373 
3377  Fw::CmdResponse paramSave_INSTRUCTION_FUEL();
3378 
3382  Fw::CmdResponse paramSave_SEQ_BASE_DIR();
3383 
3384 #if !FW_DIRECT_PORT_CALLS
3385 
3386  private:
3387 
3388  // ----------------------------------------------------------------------
3389  // Special input ports
3390  // ----------------------------------------------------------------------
3391 
3393  Fw::InputCmdPort m_cmdIn_InputPort[NUM_CMDIN_INPUT_PORTS];
3394 
3395 #endif
3396 
3397 #if !FW_DIRECT_PORT_CALLS
3398 
3399  private:
3400 
3401  // ----------------------------------------------------------------------
3402  // Typed input ports
3403  // ----------------------------------------------------------------------
3404 
3406  Svc::InputSchedPort m_checkTimers_InputPort[NUM_CHECKTIMERS_INPUT_PORTS];
3407 
3409  Fw::InputCmdResponsePort m_cmdResponseIn_InputPort[NUM_CMDRESPONSEIN_INPUT_PORTS];
3410 
3413 
3415  Svc::InputCmdSeqInPort m_seqRunIn_InputPort[NUM_SEQRUNIN_INPUT_PORTS];
3416 
3418  Svc::InputSchedPort m_writeTelemetry_InputPort[NUM_WRITETELEMETRY_INPUT_PORTS];
3419 
3420 #endif
3421 
3422 #if !FW_DIRECT_PORT_CALLS
3423 
3424  private:
3425 
3426  // ----------------------------------------------------------------------
3427  // Serial input ports
3428  // ----------------------------------------------------------------------
3429 
3431  Fw::InputSerializePort m_serialIn_InputPort[NUM_SERIALIN_INPUT_PORTS];
3432 
3433 #endif
3434 
3435 #if !FW_DIRECT_PORT_CALLS
3436 
3437  private:
3438 
3439  // ----------------------------------------------------------------------
3440  // Special output ports
3441  // ----------------------------------------------------------------------
3442 
3444  Fw::OutputCmdRegPort m_cmdRegOut_OutputPort[NUM_CMDREGOUT_OUTPUT_PORTS];
3445 
3447  Fw::OutputCmdResponsePort m_cmdResponseOut_OutputPort[NUM_CMDRESPONSEOUT_OUTPUT_PORTS];
3448 
3450  Fw::OutputLogPort m_logOut_OutputPort[NUM_LOGOUT_OUTPUT_PORTS];
3451 
3452 #if FW_ENABLE_TEXT_LOGGING == 1
3453 
3455  Fw::OutputLogTextPort m_logTextOut_OutputPort[NUM_LOGTEXTOUT_OUTPUT_PORTS];
3456 
3457 #endif
3458 
3460  Fw::OutputPrmGetPort m_prmGet_OutputPort[NUM_PRMGET_OUTPUT_PORTS];
3461 
3463  Fw::OutputPrmSetPort m_prmSet_OutputPort[NUM_PRMSET_OUTPUT_PORTS];
3464 
3466  Fw::OutputTimePort m_timeCaller_OutputPort[NUM_TIMECALLER_OUTPUT_PORTS];
3467 
3469  Fw::OutputTlmPort m_tlmOut_OutputPort[NUM_TLMOUT_OUTPUT_PORTS];
3470 
3471 #endif
3472 
3473 #if !FW_DIRECT_PORT_CALLS
3474 
3475  private:
3476 
3477  // ----------------------------------------------------------------------
3478  // Typed output ports
3479  // ----------------------------------------------------------------------
3480 
3482  Fw::OutputComPort m_cmdOut_OutputPort[NUM_CMDOUT_OUTPUT_PORTS];
3483 
3485  Fw::OutputPrmGetPort m_getParam_OutputPort[NUM_GETPARAM_OUTPUT_PORTS];
3486 
3488  Fw::OutputTlmGetPort m_getTlmChan_OutputPort[NUM_GETTLMCHAN_OUTPUT_PORTS];
3489 
3491  Fw::OutputCmdResponsePort m_seqDoneOut_OutputPort[NUM_SEQDONEOUT_OUTPUT_PORTS];
3492 
3494  Svc::OutputCmdSeqInPort m_seqStartOut_OutputPort[NUM_SEQSTARTOUT_OUTPUT_PORTS];
3495 
3496 #endif
3497 
3498 #if !FW_DIRECT_PORT_CALLS
3499 
3500  private:
3501 
3502  // ----------------------------------------------------------------------
3503  // Serial output ports
3504  // ----------------------------------------------------------------------
3505 
3507  Fw::OutputSerializePort m_serialOut_OutputPort[NUM_SERIALOUT_OUTPUT_PORTS];
3508 
3509 #endif
3510 
3511  private:
3512 
3513  // ----------------------------------------------------------------------
3514  // First update flags for telemetry channels
3515  // ----------------------------------------------------------------------
3516 
3518  bool m_first_update_ControllerState = true;
3519 
3521  bool m_first_update_InterpreterState = true;
3522 
3524  bool m_first_update_SequencesSucceeded = true;
3525 
3527  bool m_first_update_SequencesFailed = true;
3528 
3530  bool m_first_update_SequencesCancelled = true;
3531 
3533  bool m_first_update_CommandsDispatched = true;
3534 
3536  bool m_first_update_CommandsFailed = true;
3537 
3539  bool m_first_update_LastTrapReason = true;
3540 
3542  bool m_first_update_SeqName = true;
3543 
3544  private:
3545 
3546  // ----------------------------------------------------------------------
3547  // Last value storage for telemetry channels
3548  // ----------------------------------------------------------------------
3549 
3551  Svc::WasmSequencer_ControllerStateMachine_State m_last_ControllerState = {};
3552 
3554  Svc::WasmSequencer_InterpreterStateMachine_State m_last_InterpreterState = {};
3555 
3557  U64 m_last_SequencesSucceeded = {};
3558 
3560  U64 m_last_SequencesFailed = {};
3561 
3563  U64 m_last_SequencesCancelled = {};
3564 
3566  U64 m_last_CommandsDispatched = {};
3567 
3569  U64 m_last_CommandsFailed = {};
3570 
3572  Svc::WasmSequencer_TrapReason m_last_LastTrapReason = {};
3573 
3575  Fw::TlmString m_last_SeqName = {};
3576 
3577  private:
3578 
3579  // ----------------------------------------------------------------------
3580  // Parameter validity flags
3581  // ----------------------------------------------------------------------
3582 
3584  Fw::ParamValid m_param_HOST_FUNCTION_TIMEOUT_SECS_valid = Fw::ParamValid::UNINIT;
3585 
3587  Fw::ParamValid m_param_INSTRUCTION_FUEL_valid = Fw::ParamValid::UNINIT;
3588 
3590  Fw::ParamValid m_param_SEQ_BASE_DIR_valid = Fw::ParamValid::UNINIT;
3591 
3592  private:
3593 
3594  // ----------------------------------------------------------------------
3595  // Parameter variables
3596  // ----------------------------------------------------------------------
3597 
3604  F32 m_HOST_FUNCTION_TIMEOUT_SECS;
3605 
3614  FwSizeType m_INSTRUCTION_FUEL;
3615 
3622  Fw::ParamString m_SEQ_BASE_DIR;
3623 
3624  private:
3625 
3626  // ----------------------------------------------------------------------
3627  // State machine instances
3628  // ----------------------------------------------------------------------
3629 
3631  Svc_WasmSequencer_ControllerStateMachine m_stateMachine_controller;
3632 
3634  Svc_WasmSequencer_InterpreterStateMachine m_stateMachine_interpreter;
3635 
3636  private:
3637 
3638  // ----------------------------------------------------------------------
3639  // Mutexes
3640  // ----------------------------------------------------------------------
3641 
3643  Os::Mutex m_guardedPortMutex;
3644 
3646  Os::Mutex m_paramLock;
3647 
3648  };
3649 
3650 }
3651 
3652 #endif
void log_ACTIVITY_LO_LogActivityLo(const Fw::StringBase &msg) const
A WARNING_HI event emitted by the guest program.
static constexpr FwIndexType getNum_serialIn_InputPorts()
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.
No sequence is running so we cannot continue from a pause.
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
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
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 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.
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
The interpreter aborted the sequence with a byte-code trap.
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
A WARNING_LO event emitted by the guest program.
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.
An ACTIVITY_LO event emitted by the guest program.
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...
A guest host function supplied a buffer too small to hold the host value being returned.
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
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
A guest serial port host function requested a port index outside the configured range.
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
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.
virtual void Svc_WasmSequencer_ControllerStateMachine_action_incrementSequenceFailure(SmId smId, Svc_WasmSequencer_ControllerStateMachine::Signal signal)=0
Failed to open the requested Wasm module file.
A command was issued in a state where it is not valid.
virtual void unLock()
Unlock the guarded mutex.
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.
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 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()
The interpreter store was allocated with capacity for the given number of modules.
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.
Failed to find a loaded module with the requested name.
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.
A guest host function supplied a buffer larger than the host maximum for that call.
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 writeTelemetry_preMsgHook(FwIndexType portNum, U32 context)
Pre-message hook for async input port writeTelemetry.
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
A sequence is starting after the main entrypoint was invoked.
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
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
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 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.
A module failed to decode/validate while loading.
Wait for the interpreter to finish and return it&#39;s result as a CmdResponse.
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
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.
Invoke a main function from a loaded module.
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)
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
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
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
A DIAGNOSTIC event emitted by the guest program.
virtual void RUN_cmdHandler(FwOpcodeType opCode, U32 cmdSeq, const Fw::CmdStringArg &fileName, const Svc::BlockState &block)=0
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
An ACTIVITY_HI event emitted by the guest program.
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
A command was issued in a state where it is not valid.
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
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.