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"
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 
1516  virtual void writeTelemetry_preMsgHook(
1517  FwIndexType portNum,
1518  U32 context
1519  );
1520 
1521  protected:
1522 
1523  // ----------------------------------------------------------------------
1524  // Invocation functions for typed output ports
1525  // ----------------------------------------------------------------------
1526 
1528  void cmdOut_out(
1529  FwIndexType portNum,
1530  Fw::ComBuffer& data,
1531  U32 context
1532  ) const;
1533 
1536  FwIndexType portNum,
1537  FwPrmIdType id,
1538  Fw::ParamBuffer& val
1539  ) const;
1541 
1544  FwIndexType portNum,
1545  FwChanIdType id,
1546  Fw::Time& timeTag,
1547  Fw::TlmBuffer& val
1548  ) const;
1551 
1553  void seqDoneOut_out(
1554  FwIndexType portNum,
1555  FwOpcodeType opCode,
1556  U32 cmdSeq,
1557  const Fw::CmdResponse& response
1558  ) const;
1559 
1561  void seqStartOut_out(
1562  FwIndexType portNum,
1563  const Fw::StringBase& filename,
1564  const Svc::SeqArgs& args
1565  ) const;
1566 
1567  protected:
1568 
1569  // ----------------------------------------------------------------------
1570  // Invocation functions for serial output ports
1571  // ----------------------------------------------------------------------
1572 
1575  FwIndexType portNum,
1576  Fw::LinearBufferBase& buffer
1577  );
1578 
1579  protected:
1580 
1581  // ----------------------------------------------------------------------
1582  // State getter functions
1583  // ----------------------------------------------------------------------
1584 
1587 
1590 
1591  protected:
1592 
1593  // ----------------------------------------------------------------------
1594  // Signal send functions
1595  // ----------------------------------------------------------------------
1596 
1599  const Svc::WasmSequencer_LoadRequest& value
1600  );
1601 
1604  const Svc::WasmSequencer_LoadRequest& value
1605  );
1606 
1609  const Svc::WasmSequencer_InvokeRequest& value
1610  );
1611 
1614  const Svc::WasmSequencer_RequestContext& value
1615  );
1616 
1619  const Svc::WasmSequencer_RequestContext& value
1620  );
1621 
1624 
1627  const Svc::WasmSequencer_RequestContext& value
1628  );
1629 
1632  const Svc::WasmSequencer_RequestContext& value
1633  );
1634 
1637  const Svc::WasmSequencer_RequestContext& value
1638  );
1639 
1642 
1645  const Svc::WasmSequencer_CommandRequest& value
1646  );
1647 
1650 
1653 
1656  const Svc::WasmSequencer_RequestContext& value
1657  );
1658 
1661 
1664 
1667  I32 value
1668  );
1669 
1672 
1675  const Svc::WasmSequencer_HostFunction& value
1676  );
1677 
1680 
1683 
1686  const FwIndexType& value
1687  );
1688 
1691  I32 value
1692  );
1693 
1696  const Svc::WasmSequencer_TrapReason& value
1697  );
1698 
1701 
1704 
1705  protected:
1706 
1707  // ----------------------------------------------------------------------
1708  // Functions to implement for internal state machine actions
1709  // ----------------------------------------------------------------------
1710 
1715  SmId smId,
1717  const Svc::WasmSequencer_InvokeRequest& value
1718  ) = 0;
1719 
1724  SmId smId,
1726  ) = 0;
1727 
1732  SmId smId,
1734  ) = 0;
1735 
1740  SmId smId,
1742  const Svc::WasmSequencer_RequestContext& value
1743  ) = 0;
1744 
1749  SmId smId,
1751  const Svc::WasmSequencer_RequestContext& value
1752  ) = 0;
1753 
1758  SmId smId,
1760  const Svc::WasmSequencer_RequestContext& value
1761  ) = 0;
1762 
1767  SmId smId,
1769  ) = 0;
1770 
1776  SmId smId,
1778  const Svc::WasmSequencer_InvokeRequest& value
1779  ) = 0;
1780 
1786  SmId smId,
1788  const Svc::WasmSequencer_InvokeRequest& value
1789  ) = 0;
1790 
1796  SmId smId,
1798  const Svc::WasmSequencer_LoadRequest& value
1799  ) = 0;
1800 
1806  SmId smId,
1808  const Svc::WasmSequencer_RequestContext& value
1809  ) = 0;
1810 
1816  SmId smId,
1818  const Svc::WasmSequencer_RequestContext& value
1819  ) = 0;
1820 
1826  SmId smId,
1828  const Svc::WasmSequencer_LoadRequest& value
1829  ) = 0;
1830 
1835  SmId smId,
1837  const Svc::WasmSequencer_RequestContext& value
1838  ) = 0;
1839 
1844  SmId smId,
1846  const Svc::WasmSequencer_RequestContext& value
1847  ) = 0;
1848 
1853  SmId smId,
1855  const Svc::WasmSequencer_RequestContext& value
1856  ) = 0;
1857 
1862  SmId smId,
1864  const Svc::WasmSequencer_RequestContext& value
1865  ) = 0;
1866 
1871  SmId smId,
1873  const Svc::WasmSequencer_RequestContext& value
1874  ) = 0;
1875 
1880  SmId smId,
1882  const Svc::WasmSequencer_RequestContext& value
1883  ) = 0;
1884 
1889  SmId smId,
1891  const Svc::WasmSequencer_RequestContext& value
1892  ) = 0;
1893 
1898  SmId smId,
1900  const Svc::WasmSequencer_RequestContext& value
1901  ) = 0;
1902 
1907  SmId smId,
1909  const Svc::WasmSequencer_RequestContext& value
1910  ) = 0;
1911 
1916  SmId smId,
1918  ) = 0;
1919 
1925  SmId smId,
1927  const Svc::WasmSequencer_RequestContext& value
1928  ) = 0;
1929 
1934  SmId smId,
1936  const Svc::WasmSequencer_CommandRequest& value
1937  ) = 0;
1938 
1943  SmId smId,
1945  ) = 0;
1946 
1951  SmId smId,
1953  ) = 0;
1954 
1959  SmId smId,
1961  ) = 0;
1962 
1965  SmId smId,
1967  ) = 0;
1968 
1971  SmId smId,
1973  ) = 0;
1974 
1977  SmId smId,
1979  ) = 0;
1980 
1983  SmId smId,
1985  ) = 0;
1986 
1989  SmId smId,
1991  ) = 0;
1992 
1995  SmId smId,
1997  ) = 0;
1998 
2001  SmId smId,
2003  ) = 0;
2004 
2007  SmId smId,
2009  ) = 0;
2010 
2013  SmId smId,
2015  I32 value
2016  ) = 0;
2017 
2020  SmId smId,
2022  const Svc::WasmSequencer_TrapReason& value
2023  ) = 0;
2024 
2027  SmId smId,
2029  ) = 0;
2030 
2036  SmId smId,
2038  ) = 0;
2039 
2044  SmId smId,
2046  ) = 0;
2047 
2052  SmId smId,
2054  ) = 0;
2055 
2060  SmId smId,
2062  ) = 0;
2063 
2068  SmId smId,
2070  ) = 0;
2071 
2076  SmId smId,
2078  const Svc::WasmSequencer_RequestContext& value
2079  ) = 0;
2080 
2085  SmId smId,
2087  ) = 0;
2088 
2093  SmId smId,
2095  ) = 0;
2096 
2101  SmId smId,
2103  I32 value
2104  ) = 0;
2105 
2110  SmId smId,
2112  ) = 0;
2113 
2118  SmId smId,
2120  ) = 0;
2121 
2126  SmId smId,
2128  const FwIndexType& value
2129  ) = 0;
2130 
2131  protected:
2132 
2133  // ----------------------------------------------------------------------
2134  // Functions to implement for internal state machine guards
2135  // ----------------------------------------------------------------------
2136 
2141  SmId smId,
2143  ) const = 0;
2144 
2149  SmId smId,
2151  const Svc::WasmSequencer_RequestContext& value
2152  ) const = 0;
2153 
2158  SmId smId,
2160  const Svc::WasmSequencer_RequestContext& value
2161  ) const = 0;
2162 
2167  SmId smId,
2169  const Svc::WasmSequencer_RequestContext& value
2170  ) const = 0;
2171 
2176  SmId smId,
2178  ) const = 0;
2179 
2184  SmId smId,
2186  ) const = 0;
2187 
2192  SmId smId,
2194  ) const = 0;
2195 
2200  SmId smId,
2202  ) const = 0;
2203 
2208  SmId smId,
2210  const FwIndexType& value
2211  ) const = 0;
2212 
2217  SmId smId,
2219  ) const = 0;
2220 
2221  protected:
2222 
2223  // ----------------------------------------------------------------------
2224  // Command response
2225  // ----------------------------------------------------------------------
2226 
2228  void cmdResponse_out(
2229  FwOpcodeType opCode,
2230  U32 cmdSeq,
2231  Fw::CmdResponse response
2232  );
2233 
2234  protected:
2235 
2236  // ----------------------------------------------------------------------
2237  // Command handlers to implement
2238  // ----------------------------------------------------------------------
2239 
2253  virtual void RUN_cmdHandler(
2254  FwOpcodeType opCode,
2255  U32 cmdSeq,
2256  const Fw::CmdStringArg& fileName,
2257  const Svc::BlockState& block,
2258  const Svc::SeqArgs& seqArgs
2259  ) = 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  const Svc::SeqArgs& seqArgs
2284  ) = 0;
2285 
2289  virtual void WAIT_cmdHandler(
2290  FwOpcodeType opCode,
2291  U32 cmdSeq
2292  ) = 0;
2293 
2298  virtual void CANCEL_cmdHandler(
2299  FwOpcodeType opCode,
2300  U32 cmdSeq
2301  ) = 0;
2302 
2310  virtual void PAUSE_cmdHandler(
2311  FwOpcodeType opCode,
2312  U32 cmdSeq
2313  ) = 0;
2314 
2318  virtual void CONTINUE_cmdHandler(
2319  FwOpcodeType opCode,
2320  U32 cmdSeq
2321  ) = 0;
2322 
2327  virtual void GLOBAL_SET_I32_cmdHandler(
2328  FwOpcodeType opCode,
2329  U32 cmdSeq,
2330  const Fw::CmdStringArg& moduleName,
2331  const Fw::CmdStringArg& name,
2332  I32 value
2333  ) = 0;
2334 
2339  virtual void GLOBAL_SET_I64_cmdHandler(
2340  FwOpcodeType opCode,
2341  U32 cmdSeq,
2342  const Fw::CmdStringArg& moduleName,
2343  const Fw::CmdStringArg& name,
2344  I64 value
2345  ) = 0;
2346 
2351  virtual void GLOBAL_SET_F32_cmdHandler(
2352  FwOpcodeType opCode,
2353  U32 cmdSeq,
2354  const Fw::CmdStringArg& moduleName,
2355  const Fw::CmdStringArg& name,
2356  F32 value
2357  ) = 0;
2358 
2363  virtual void GLOBAL_SET_F64_cmdHandler(
2364  FwOpcodeType opCode,
2365  U32 cmdSeq,
2366  const Fw::CmdStringArg& moduleName,
2367  const Fw::CmdStringArg& name,
2368  F64 value
2369  ) = 0;
2370 
2375  virtual void GLOBAL_GET_cmdHandler(
2376  FwOpcodeType opCode,
2377  U32 cmdSeq,
2378  const Fw::CmdStringArg& moduleName,
2379  const Fw::CmdStringArg& name
2380  ) = 0;
2381 
2382  protected:
2383 
2384  // ----------------------------------------------------------------------
2385  // Command handler base-class functions
2386  //
2387  // Call these functions directly to bypass the command input port
2388  // ----------------------------------------------------------------------
2389 
2403  void RUN_cmdHandlerBase(
2404  FwOpcodeType opCode,
2405  U32 cmdSeq,
2406  Fw::CmdArgBuffer& args
2407  );
2408 
2415  void LOAD_cmdHandlerBase(
2416  FwOpcodeType opCode,
2417  U32 cmdSeq,
2418  Fw::CmdArgBuffer& args
2419  );
2420 
2424  void INVOKE_cmdHandlerBase(
2425  FwOpcodeType opCode,
2426  U32 cmdSeq,
2427  Fw::CmdArgBuffer& args
2428  );
2429 
2433  void WAIT_cmdHandlerBase(
2434  FwOpcodeType opCode,
2435  U32 cmdSeq,
2436  Fw::CmdArgBuffer& args
2437  );
2438 
2443  void CANCEL_cmdHandlerBase(
2444  FwOpcodeType opCode,
2445  U32 cmdSeq,
2446  Fw::CmdArgBuffer& args
2447  );
2448 
2456  void PAUSE_cmdHandlerBase(
2457  FwOpcodeType opCode,
2458  U32 cmdSeq,
2459  Fw::CmdArgBuffer& args
2460  );
2461 
2466  FwOpcodeType opCode,
2467  U32 cmdSeq,
2468  Fw::CmdArgBuffer& args
2469  );
2470 
2476  FwOpcodeType opCode,
2477  U32 cmdSeq,
2478  Fw::CmdArgBuffer& args
2479  );
2480 
2486  FwOpcodeType opCode,
2487  U32 cmdSeq,
2488  Fw::CmdArgBuffer& args
2489  );
2490 
2496  FwOpcodeType opCode,
2497  U32 cmdSeq,
2498  Fw::CmdArgBuffer& args
2499  );
2500 
2506  FwOpcodeType opCode,
2507  U32 cmdSeq,
2508  Fw::CmdArgBuffer& args
2509  );
2510 
2516  FwOpcodeType opCode,
2517  U32 cmdSeq,
2518  Fw::CmdArgBuffer& args
2519  );
2520 
2521  protected:
2522 
2523  // ----------------------------------------------------------------------
2524  // Pre-message hooks for async commands
2525  //
2526  // Each of these functions is invoked just before processing the
2527  // corresponding command. By default they do nothing. You can
2528  // override them to provide specific pre-command behavior.
2529  // ----------------------------------------------------------------------
2530 
2532  virtual void RUN_preMsgHook(
2533  FwOpcodeType opCode,
2534  U32 cmdSeq
2535  );
2536 
2538  virtual void LOAD_preMsgHook(
2539  FwOpcodeType opCode,
2540  U32 cmdSeq
2541  );
2542 
2544  virtual void INVOKE_preMsgHook(
2545  FwOpcodeType opCode,
2546  U32 cmdSeq
2547  );
2548 
2550  virtual void WAIT_preMsgHook(
2551  FwOpcodeType opCode,
2552  U32 cmdSeq
2553  );
2554 
2556  virtual void PAUSE_preMsgHook(
2557  FwOpcodeType opCode,
2558  U32 cmdSeq
2559  );
2560 
2562  virtual void CONTINUE_preMsgHook(
2563  FwOpcodeType opCode,
2564  U32 cmdSeq
2565  );
2566 
2568  virtual void GLOBAL_SET_I32_preMsgHook(
2569  FwOpcodeType opCode,
2570  U32 cmdSeq
2571  );
2572 
2574  virtual void GLOBAL_SET_I64_preMsgHook(
2575  FwOpcodeType opCode,
2576  U32 cmdSeq
2577  );
2578 
2580  virtual void GLOBAL_SET_F32_preMsgHook(
2581  FwOpcodeType opCode,
2582  U32 cmdSeq
2583  );
2584 
2586  virtual void GLOBAL_SET_F64_preMsgHook(
2587  FwOpcodeType opCode,
2588  U32 cmdSeq
2589  );
2590 
2592  virtual void GLOBAL_GET_preMsgHook(
2593  FwOpcodeType opCode,
2594  U32 cmdSeq
2595  );
2596 
2597  protected:
2598 
2599  // ----------------------------------------------------------------------
2600  // Event logging functions
2601  // ----------------------------------------------------------------------
2602 
2606  void log_DIAGNOSTIC_StoreAllocationSucceeded(U16 moduleCount) const;
2607 
2612 
2617  const Svc::WasmSequencer_SignalSource& signalSource,
2619  ) const;
2620 
2624  void log_WARNING_LO_ModuleNotFound(const Fw::StringBase& module_name) const;
2625 
2632  U64 requestedSize
2633  ) const;
2634 
2637  const Fw::StringBase& module_name,
2638  const Fw::StringBase& globalName,
2639  const Svc::WasmSequencer_Status& reason
2640  ) const;
2641 
2644  const Fw::StringBase& module_name,
2645  const Fw::StringBase& globalName,
2646  const Svc::WasmSequencer_Status& reason
2647  ) const;
2648 
2651  const Fw::StringBase& module_name,
2652  const Fw::StringBase& globalName,
2653  I32 value
2654  ) const;
2655 
2658  const Fw::StringBase& module_name,
2659  const Fw::StringBase& globalName,
2660  I64 value
2661  ) const;
2662 
2665  const Fw::StringBase& module_name,
2666  const Fw::StringBase& globalName,
2667  F32 value
2668  ) const;
2669 
2672  const Fw::StringBase& module_name,
2673  const Fw::StringBase& globalName,
2674  F64 value
2675  ) const;
2676 
2681  const Fw::StringBase& fileName,
2682  I32 status
2683  ) const;
2684 
2690  const Fw::StringBase& baseDir,
2691  const Fw::StringBase& fileName
2692  ) const;
2693 
2700  const Fw::StringBase& baseDir,
2701  const Fw::StringBase& fileName
2702  ) const;
2703 
2708 
2713 
2718 
2724 
2729  const Svc::WasmSequencer_HostFunction& host_function,
2730  U32 size,
2731  U32 maxSize
2732  ) const;
2733 
2738  const Svc::WasmSequencer_HostFunction& host_function,
2739  U32 size,
2740  U32 valueSize
2741  ) const;
2742 
2745  const Svc::WasmSequencer_HostFunction& host_function,
2746  const Svc::WasmSequencer_Status& code
2747  ) const;
2748 
2750  void log_WARNING_HI_InvalidBlockingTypeValue(I32 invalidValue) const;
2751 
2756  const Svc::WasmSequencer_HostFunction& host_function,
2757  I32 index,
2758  U32 numPorts
2759  ) const;
2760 
2766  const Svc::WasmSequencer_HostFunction& host_function,
2767  I32 status
2768  ) const;
2769 
2776  U32 portIndex,
2777  U32 size,
2778  U32 maxSize
2779  ) const;
2780 
2787  I32 raw,
2788  const Fw::StringBase& msg
2789  ) const;
2790 
2795 
2800 
2807  ) const;
2808 
2815  const Svc::WasmSequencer_SequencePhase& phase,
2816  I32 code
2817  ) const;
2818 
2824  const Svc::WasmSequencer_SequencePhase& phase,
2825  I32 code
2826  ) const;
2827 
2833  const Svc::WasmSequencer_SequencePhase& phase,
2834  const Svc::WasmSequencer_TrapReason& reason
2835  ) const;
2836 
2843  const Svc::WasmSequencer_SequencePhase& phase,
2844  const Svc::WasmSequencer_ExitReason& reason,
2845  const Svc::WasmSequencer_HostFunction& hostFunction
2846  ) const;
2847 
2851  void log_ACTIVITY_HI_SequencePaused() const;
2852 
2856  void log_WARNING_LO_SequenceNotRunning() const;
2857 
2863  const Svc::WasmSequencer_HostFunction& host_function,
2864  U64 micros
2865  ) const;
2866 
2874  const Svc::WasmSequencer_HostFunction& host_function,
2875  I64 id
2876  ) const;
2877 
2883  FwOpcodeType opcode,
2884  const Fw::CmdResponse& response,
2885  U16 oldSequenceIdx,
2886  U16 currentSequenceIdx
2887  ) const;
2888 
2894  FwOpcodeType opcode,
2895  const Fw::CmdResponse& response,
2896  U16 actualCmdIdx,
2897  U16 expectedCmdIdx
2898  ) const;
2899 
2902  Svc::WasmSequencer_ModuleIdx moduleIdx,
2903  const Svc::WasmSequencer_Status& status
2904  ) const;
2905 
2909  void log_WARNING_HI_LogWarningHi(const Fw::StringBase& msg) const;
2910 
2914  void log_WARNING_LO_LogWarningLo(const Fw::StringBase& msg) const;
2915 
2919  void log_ACTIVITY_HI_LogActivityHi(const Fw::StringBase& msg) const;
2920 
2924  void log_ACTIVITY_LO_LogActivityLo(const Fw::StringBase& msg) const;
2925 
2929  void log_DIAGNOSTIC_LogDiagnostic(const Fw::StringBase& msg) const;
2930 
2931  protected:
2932 
2933  // ----------------------------------------------------------------------
2934  // Telemetry serialized write
2935  // ----------------------------------------------------------------------
2936 
2941  void tlmWrite(
2942  FwChanIdType id,
2943  Fw::TlmBuffer& _tlmBuff,
2944  Fw::Time _tlmTime = Fw::Time()
2945  ) const;
2946 
2947  protected:
2948 
2949  // ----------------------------------------------------------------------
2950  // Telemetry write functions
2951  // ----------------------------------------------------------------------
2952 
2958  Fw::Time _tlmTime = Fw::Time()
2959  );
2960 
2966  Fw::Time _tlmTime = Fw::Time()
2967  );
2968 
2973  U64 arg,
2974  Fw::Time _tlmTime = Fw::Time()
2975  );
2976 
2981  U64 arg,
2982  Fw::Time _tlmTime = Fw::Time()
2983  );
2984 
2989  U64 arg,
2990  Fw::Time _tlmTime = Fw::Time()
2991  );
2992 
2997  U64 arg,
2998  Fw::Time _tlmTime = Fw::Time()
2999  );
3000 
3005  U64 arg,
3006  Fw::Time _tlmTime = Fw::Time()
3007  );
3008 
3013  const Svc::WasmSequencer_TrapReason& arg,
3014  Fw::Time _tlmTime = Fw::Time()
3015  );
3016 
3022  void tlmWrite_SeqName(
3023  const Fw::StringBase& arg,
3024  Fw::Time _tlmTime = Fw::Time()
3025  );
3026 
3027  protected:
3028 
3029  // ----------------------------------------------------------------------
3030  // Parameter hook functions
3031  // ----------------------------------------------------------------------
3032 
3036  virtual void parameterUpdated(
3037  FwPrmIdType id
3038  );
3039 
3043  virtual void parametersLoaded();
3044 
3045  protected:
3046 
3047  // ----------------------------------------------------------------------
3048  // Parameter get functions
3049  // ----------------------------------------------------------------------
3050 
3060  Fw::ParamValid& valid
3061  );
3062 
3074  Fw::ParamValid& valid
3075  );
3076 
3086  Fw::ParamValid& valid
3087  );
3088 
3089  protected:
3090 
3091  // ----------------------------------------------------------------------
3092  // Time
3093  // ----------------------------------------------------------------------
3094 
3098  Fw::Time getTime() const;
3099 
3100  protected:
3101 
3102  // ----------------------------------------------------------------------
3103  // Mutex operations for guarded ports
3104  //
3105  // You can override these operations to provide more sophisticated
3106  // synchronization
3107  // ----------------------------------------------------------------------
3108 
3110  virtual void lock();
3111 
3113  virtual void unLock();
3114 
3115  private:
3116 
3117  // ----------------------------------------------------------------------
3118  // Message dispatch functions
3119  // ----------------------------------------------------------------------
3120 
3122  virtual MsgDispatchStatus doDispatch();
3123 
3124  private:
3125 
3126  // ----------------------------------------------------------------------
3127  // Calls for messages received on special input ports
3128  // ----------------------------------------------------------------------
3129 
3131  static void m_p_cmdIn_in(
3132  Fw::PassiveComponentBase* callComp,
3133  FwIndexType portNum,
3134  FwOpcodeType opCode,
3135  U32 cmdSeq,
3136  Fw::CmdArgBuffer& args
3137  );
3138 
3139  private:
3140 
3141  // ----------------------------------------------------------------------
3142  // Calls for messages received on typed input ports
3143  // ----------------------------------------------------------------------
3144 
3146  static void m_p_checkTimers_in(
3147  Fw::PassiveComponentBase* callComp,
3148  FwIndexType portNum,
3149  U32 context
3150  );
3151 
3153  static void m_p_cmdResponseIn_in(
3154  Fw::PassiveComponentBase* callComp,
3155  FwIndexType portNum,
3156  FwOpcodeType opCode,
3157  U32 cmdSeq,
3158  const Fw::CmdResponse& response
3159  );
3160 
3162  static void m_p_seqCancelIn_in(
3163  Fw::PassiveComponentBase* callComp,
3164  FwIndexType portNum
3165  );
3166 
3168  static void m_p_seqRunIn_in(
3169  Fw::PassiveComponentBase* callComp,
3170  FwIndexType portNum,
3171  const Fw::StringBase& filename,
3172  const Svc::SeqArgs& args
3173  );
3174 
3176  static void m_p_writeTelemetry_in(
3177  Fw::PassiveComponentBase* callComp,
3178  FwIndexType portNum,
3179  U32 context
3180  );
3181 
3182  private:
3183 
3184  // ----------------------------------------------------------------------
3185  // Calls for messages received on serial input ports
3186  // ----------------------------------------------------------------------
3187 
3188 #if FW_PORT_SERIALIZATION
3189 
3191  static void m_p_serialIn_in(
3192  Fw::PassiveComponentBase* callComp,
3193  FwIndexType portNum,
3194  Fw::LinearBufferBase& buffer
3195  );
3196 
3197 #endif
3198 
3199  private:
3200 
3201  // ----------------------------------------------------------------------
3202  // Invocation functions for special output ports
3203  // ----------------------------------------------------------------------
3204 
3206  void cmdRegOut_out(
3207  FwIndexType portNum,
3208  FwOpcodeType opCode
3209  ) const;
3210 
3212  void cmdResponseOut_out(
3213  FwIndexType portNum,
3214  FwOpcodeType opCode,
3215  U32 cmdSeq,
3216  const Fw::CmdResponse& response
3217  ) const;
3218 
3220  void logOut_out(
3221  FwIndexType portNum,
3222  FwEventIdType id,
3223  Fw::Time& timeTag,
3224  const Fw::LogSeverity& severity,
3225  Fw::LogBuffer& args
3226  ) const;
3227 
3228 #if FW_ENABLE_TEXT_LOGGING
3229 
3231  void logTextOut_out(
3232  FwIndexType portNum,
3233  FwEventIdType id,
3234  Fw::Time& timeTag,
3235  const Fw::LogSeverity& severity,
3236  Fw::TextLogString& text
3237  ) const;
3238 
3239 #endif
3240 
3242  Fw::ParamValid prmGet_out(
3243  FwIndexType portNum,
3244  FwPrmIdType id,
3245  Fw::ParamBuffer& val
3246  ) const;
3248 
3250  void prmSet_out(
3251  FwIndexType portNum,
3252  FwPrmIdType id,
3253  Fw::ParamBuffer& val
3254  ) const;
3255 
3257  void timeCaller_out(
3258  FwIndexType portNum,
3259  Fw::Time& time
3260  ) const;
3261 
3263  void tlmOut_out(
3264  FwIndexType portNum,
3265  FwChanIdType id,
3266  Fw::Time& timeTag,
3267  Fw::TlmBuffer& val
3268  ) const;
3269 
3270  private:
3271 
3272  // ----------------------------------------------------------------------
3273  // Send signal helper functions
3274  // ----------------------------------------------------------------------
3275 
3277  void sendSignalStart(
3278  SmId smId,
3279  FwEnumStoreType signal,
3280  Fw::SerialBufferBase& buffer
3281  );
3282 
3284  void controller_sendSignalFinish(
3285  Fw::LinearBufferBase& buffer
3286  );
3287 
3289  void interpreter_sendSignalFinish(
3290  Fw::LinearBufferBase& buffer
3291  );
3292 
3293  private:
3294 
3295  // ----------------------------------------------------------------------
3296  // Helper functions for state machine dispatch
3297  // ----------------------------------------------------------------------
3298 
3300  void smDispatch(
3301  Fw::SerialBufferBase& buffer
3302  );
3303 
3305  static void deserializeSmIdAndSignal(
3306  Fw::SerialBufferBase& buffer,
3307  FwEnumStoreType& smId,
3308  FwEnumStoreType& signal
3309  );
3310 
3312  void Svc_WasmSequencer_ControllerStateMachine_smDispatch(
3313  Fw::SerialBufferBase& buffer,
3314  Svc_WasmSequencer_ControllerStateMachine& sm,
3316  );
3317 
3319  void Svc_WasmSequencer_InterpreterStateMachine_smDispatch(
3320  Fw::SerialBufferBase& buffer,
3321  Svc_WasmSequencer_InterpreterStateMachine& sm,
3323  );
3324 
3325  private:
3326 
3327  // ----------------------------------------------------------------------
3328  // Parameter set functions
3329  // ----------------------------------------------------------------------
3330 
3334  Fw::CmdResponse paramSet_HOST_FUNCTION_TIMEOUT_SECS(
3335  Fw::SerialBufferBase& val
3336  );
3337 
3341  Fw::CmdResponse paramSet_INSTRUCTION_FUEL(
3342  Fw::SerialBufferBase& val
3343  );
3344 
3348  Fw::CmdResponse paramSet_SEQ_BASE_DIR(
3349  Fw::SerialBufferBase& val
3350  );
3351 
3352  private:
3353 
3354  // ----------------------------------------------------------------------
3355  // Parameter save functions
3356  // ----------------------------------------------------------------------
3357 
3361  Fw::CmdResponse paramSave_HOST_FUNCTION_TIMEOUT_SECS();
3362 
3366  Fw::CmdResponse paramSave_INSTRUCTION_FUEL();
3367 
3371  Fw::CmdResponse paramSave_SEQ_BASE_DIR();
3372 
3373 #if !FW_DIRECT_PORT_CALLS
3374 
3375  private:
3376 
3377  // ----------------------------------------------------------------------
3378  // Special input ports
3379  // ----------------------------------------------------------------------
3380 
3382  Fw::InputCmdPort m_cmdIn_InputPort[NUM_CMDIN_INPUT_PORTS];
3383 
3384 #endif
3385 
3386 #if !FW_DIRECT_PORT_CALLS
3387 
3388  private:
3389 
3390  // ----------------------------------------------------------------------
3391  // Typed input ports
3392  // ----------------------------------------------------------------------
3393 
3395  Svc::InputSchedPort m_checkTimers_InputPort[NUM_CHECKTIMERS_INPUT_PORTS];
3396 
3398  Fw::InputCmdResponsePort m_cmdResponseIn_InputPort[NUM_CMDRESPONSEIN_INPUT_PORTS];
3399 
3402 
3404  Svc::InputCmdSeqInPort m_seqRunIn_InputPort[NUM_SEQRUNIN_INPUT_PORTS];
3405 
3407  Svc::InputSchedPort m_writeTelemetry_InputPort[NUM_WRITETELEMETRY_INPUT_PORTS];
3408 
3409 #endif
3410 
3411 #if !FW_DIRECT_PORT_CALLS
3412 
3413  private:
3414 
3415  // ----------------------------------------------------------------------
3416  // Serial input ports
3417  // ----------------------------------------------------------------------
3418 
3420  Fw::InputSerializePort m_serialIn_InputPort[NUM_SERIALIN_INPUT_PORTS];
3421 
3422 #endif
3423 
3424 #if !FW_DIRECT_PORT_CALLS
3425 
3426  private:
3427 
3428  // ----------------------------------------------------------------------
3429  // Special output ports
3430  // ----------------------------------------------------------------------
3431 
3433  Fw::OutputCmdRegPort m_cmdRegOut_OutputPort[NUM_CMDREGOUT_OUTPUT_PORTS];
3434 
3436  Fw::OutputCmdResponsePort m_cmdResponseOut_OutputPort[NUM_CMDRESPONSEOUT_OUTPUT_PORTS];
3437 
3439  Fw::OutputLogPort m_logOut_OutputPort[NUM_LOGOUT_OUTPUT_PORTS];
3440 
3441 #if FW_ENABLE_TEXT_LOGGING == 1
3442 
3444  Fw::OutputLogTextPort m_logTextOut_OutputPort[NUM_LOGTEXTOUT_OUTPUT_PORTS];
3445 
3446 #endif
3447 
3449  Fw::OutputPrmGetPort m_prmGet_OutputPort[NUM_PRMGET_OUTPUT_PORTS];
3450 
3452  Fw::OutputPrmSetPort m_prmSet_OutputPort[NUM_PRMSET_OUTPUT_PORTS];
3453 
3455  Fw::OutputTimePort m_timeCaller_OutputPort[NUM_TIMECALLER_OUTPUT_PORTS];
3456 
3458  Fw::OutputTlmPort m_tlmOut_OutputPort[NUM_TLMOUT_OUTPUT_PORTS];
3459 
3460 #endif
3461 
3462 #if !FW_DIRECT_PORT_CALLS
3463 
3464  private:
3465 
3466  // ----------------------------------------------------------------------
3467  // Typed output ports
3468  // ----------------------------------------------------------------------
3469 
3471  Fw::OutputComPort m_cmdOut_OutputPort[NUM_CMDOUT_OUTPUT_PORTS];
3472 
3474  Fw::OutputPrmGetPort m_getParam_OutputPort[NUM_GETPARAM_OUTPUT_PORTS];
3475 
3477  Fw::OutputTlmGetPort m_getTlmChan_OutputPort[NUM_GETTLMCHAN_OUTPUT_PORTS];
3478 
3480  Fw::OutputCmdResponsePort m_seqDoneOut_OutputPort[NUM_SEQDONEOUT_OUTPUT_PORTS];
3481 
3483  Svc::OutputCmdSeqInPort m_seqStartOut_OutputPort[NUM_SEQSTARTOUT_OUTPUT_PORTS];
3484 
3485 #endif
3486 
3487 #if !FW_DIRECT_PORT_CALLS
3488 
3489  private:
3490 
3491  // ----------------------------------------------------------------------
3492  // Serial output ports
3493  // ----------------------------------------------------------------------
3494 
3496  Fw::OutputSerializePort m_serialOut_OutputPort[NUM_SERIALOUT_OUTPUT_PORTS];
3497 
3498 #endif
3499 
3500  private:
3501 
3502  // ----------------------------------------------------------------------
3503  // First update flags for telemetry channels
3504  // ----------------------------------------------------------------------
3505 
3507  bool m_first_update_ControllerState = true;
3508 
3510  bool m_first_update_InterpreterState = true;
3511 
3513  bool m_first_update_SequencesSucceeded = true;
3514 
3516  bool m_first_update_SequencesFailed = true;
3517 
3519  bool m_first_update_SequencesCancelled = true;
3520 
3522  bool m_first_update_CommandsDispatched = true;
3523 
3525  bool m_first_update_CommandsFailed = true;
3526 
3528  bool m_first_update_LastTrapReason = true;
3529 
3531  bool m_first_update_SeqName = true;
3532 
3533  private:
3534 
3535  // ----------------------------------------------------------------------
3536  // Last value storage for telemetry channels
3537  // ----------------------------------------------------------------------
3538 
3540  Svc::WasmSequencer_ControllerStateMachine_State m_last_ControllerState = {};
3541 
3543  Svc::WasmSequencer_InterpreterStateMachine_State m_last_InterpreterState = {};
3544 
3546  U64 m_last_SequencesSucceeded = {};
3547 
3549  U64 m_last_SequencesFailed = {};
3550 
3552  U64 m_last_SequencesCancelled = {};
3553 
3555  U64 m_last_CommandsDispatched = {};
3556 
3558  U64 m_last_CommandsFailed = {};
3559 
3561  Svc::WasmSequencer_TrapReason m_last_LastTrapReason = {};
3562 
3564  Fw::TlmString m_last_SeqName = {};
3565 
3566  private:
3567 
3568  // ----------------------------------------------------------------------
3569  // Parameter validity flags
3570  // ----------------------------------------------------------------------
3571 
3573  Fw::ParamValid m_param_HOST_FUNCTION_TIMEOUT_SECS_valid = Fw::ParamValid::UNINIT;
3574 
3576  Fw::ParamValid m_param_INSTRUCTION_FUEL_valid = Fw::ParamValid::UNINIT;
3577 
3579  Fw::ParamValid m_param_SEQ_BASE_DIR_valid = Fw::ParamValid::UNINIT;
3580 
3581  private:
3582 
3583  // ----------------------------------------------------------------------
3584  // Parameter variables
3585  // ----------------------------------------------------------------------
3586 
3593  F32 m_HOST_FUNCTION_TIMEOUT_SECS;
3594 
3603  FwSizeType m_INSTRUCTION_FUEL;
3604 
3611  Fw::ParamString m_SEQ_BASE_DIR;
3612 
3613  private:
3614 
3615  // ----------------------------------------------------------------------
3616  // State machine instances
3617  // ----------------------------------------------------------------------
3618 
3620  Svc_WasmSequencer_ControllerStateMachine m_stateMachine_controller;
3621 
3623  Svc_WasmSequencer_InterpreterStateMachine m_stateMachine_interpreter;
3624 
3625  private:
3626 
3627  // ----------------------------------------------------------------------
3628  // Mutexes
3629  // ----------------------------------------------------------------------
3630 
3632  Os::Mutex m_guardedPortMutex;
3633 
3635  Os::Mutex m_paramLock;
3636 
3637  };
3638 
3639 }
3640 
3641 #endif
void log_ACTIVITY_LO_LogActivityLo(const Fw::StringBase &msg) const
An ACTIVITY_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.
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
No sequence is running so we cannot continue from a pause.
Invoke a main function from a loaded module.
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.
A WARNING_LO event emitted by the guest program.
virtual bool Svc_WasmSequencer_ControllerStateMachine_guard_cancelRequested(SmId smId, Svc_WasmSequencer_ControllerStateMachine::Signal signal) const =0
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
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...
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
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.
An ACTIVITY_LO event emitted by the guest program.
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
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.
Wait for the interpreter to finish and return it&#39;s result as a CmdResponse.
virtual void Svc_WasmSequencer_ControllerStateMachine_action_incrementSequenceFailure(SmId smId, Svc_WasmSequencer_ControllerStateMachine::Signal signal)=0
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.
Failed to open the requested Wasm module file.
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...
A command was issued in a state where it is not valid.
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
A guest serial port host function requested a port index outside the configured range.
virtual void RUN_cmdHandler(FwOpcodeType opCode, U32 cmdSeq, const Fw::CmdStringArg &fileName, const Svc::BlockState &block, const Svc::SeqArgs &seqArgs)=0
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.
A WARNING_HI event emitted by the guest program.
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.
A command was issued in a state where it is not valid.
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.
The interpreter aborted the sequence with a byte-code trap.
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
A sequence is starting after the main entrypoint was invoked.
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
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
The interpreter store was allocated with capacity for the given number of modules.
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
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.
A module failed to decode/validate while loading.
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
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.
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
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.
Failed to find a loaded module with the requested name.
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 void INVOKE_cmdHandler(FwOpcodeType opCode, U32 cmdSeq, const Fw::CmdStringArg &module, const Svc::BlockState &block, const Svc::SeqArgs &seqArgs)=0
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.
A guest host function supplied a buffer larger than the host maximum for that call.
#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.
A DIAGNOSTIC event emitted by the guest program.
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.