F´ Flight Software - C/C++ Documentation
A framework for building embedded system applications to NASA flight quality standards.
CmdSequencerComponentAc.hpp
Go to the documentation of this file.
1 // ======================================================================
2 // \title CmdSequencerComponentAc.hpp
3 // \author Generated by fpp-to-cpp
4 // \brief hpp file for CmdSequencer component base class
5 // ======================================================================
6 
7 #ifndef Svc_CmdSequencerComponentAc_HPP
8 #define Svc_CmdSequencerComponentAc_HPP
9 
10 #include <atomic>
11 
12 #include "Fw/Cmd/CmdPortAc.hpp"
13 #include "Fw/Cmd/CmdRegPortAc.hpp"
15 #include "Fw/Cmd/CmdString.hpp"
16 #include "Fw/Com/ComPortAc.hpp"
18 #include "Fw/FPrimeBasicTypes.hpp"
19 #include "Fw/Log/LogPortAc.hpp"
20 #include "Fw/Log/LogString.hpp"
21 #include "Fw/Log/LogTextPortAc.hpp"
22 #if !FW_DIRECT_PORT_CALLS
24 #endif
25 #if !FW_DIRECT_PORT_CALLS
27 #endif
28 #include "Fw/Time/TimePortAc.hpp"
29 #include "Fw/Tlm/TlmPortAc.hpp"
30 #include "Fw/Tlm/TlmString.hpp"
33 #include "Svc/Ping/PingPortAc.hpp"
41 
42 namespace Svc {
43 
50  {
51 
52  // ----------------------------------------------------------------------
53  // Friend classes
54  // ----------------------------------------------------------------------
55 
57  friend class CmdSequencerTesterBase;
59  friend class CmdSequencerTester;
60 
61  protected:
62 
63  // ----------------------------------------------------------------------
64  // Constants
65  // ----------------------------------------------------------------------
66 
68  enum {
70  };
71 
73  enum {
80  };
81 
83  enum {
90  };
91 
93  enum {
98  };
99 
101  enum {
110  };
111 
113  enum {
143  };
144 
146  enum {
153  };
154 
155  public:
156 
157  // ----------------------------------------------------------------------
158  // Component initialization
159  // ----------------------------------------------------------------------
160 
162  void init(
163  FwSizeType queueDepth,
164  FwEnumStoreType instance = 0
165  );
166 
167 #if !FW_DIRECT_PORT_CALLS
168 
169  public:
170 
171  // ----------------------------------------------------------------------
172  // Getters for special input ports
173  // ----------------------------------------------------------------------
174 
179  FwIndexType portNum
180  );
181 
182 #endif
183 
184 #if !FW_DIRECT_PORT_CALLS
185 
186  public:
187 
188  // ----------------------------------------------------------------------
189  // Getters for typed input ports
190  // ----------------------------------------------------------------------
191 
196  FwIndexType portNum
197  );
198 
203  FwIndexType portNum
204  );
205 
210  FwIndexType portNum
211  );
212 
217  FwIndexType portNum
218  );
219 
224  FwIndexType portNum
225  );
226 
231  FwIndexType portNum
232  );
233 
234 #endif
235 
236 #if !FW_DIRECT_PORT_CALLS
237 
238  public:
239 
240  // ----------------------------------------------------------------------
241  // Connect input ports to special output ports
242  // ----------------------------------------------------------------------
243 
244 #if FW_ENABLE_TEXT_LOGGING == 1
245 
247  void set_LogText_OutputPort(
248  FwIndexType portNum,
249  Fw::InputLogTextPort* port
250  );
251 
252 #endif
253 
256  FwIndexType portNum,
257  Fw::InputCmdRegPort* port
258  );
259 
262  FwIndexType portNum,
264  );
265 
268  FwIndexType portNum,
269  Fw::InputLogPort* port
270  );
271 
274  FwIndexType portNum,
275  Fw::InputTimePort* port
276  );
277 
280  FwIndexType portNum,
281  Fw::InputTlmPort* port
282  );
283 
284 #endif
285 
286 #if !FW_DIRECT_PORT_CALLS
287 
288  public:
289 
290  // ----------------------------------------------------------------------
291  // Connect typed input ports to typed output ports
292  // ----------------------------------------------------------------------
293 
296  FwIndexType portNum,
297  Fw::InputComPort* port
298  );
299 
302  FwIndexType portNum,
303  Svc::InputPingPort* port
304  );
305 
308  FwIndexType portNum,
310  );
311 
314  FwIndexType portNum,
316  );
317 
318 #endif
319 
320 #if !FW_DIRECT_PORT_CALLS && FW_PORT_SERIALIZATION
321 
322  public:
323 
324  // ----------------------------------------------------------------------
325  // Connect serial input ports to special output ports
326  // ----------------------------------------------------------------------
327 
328 #if FW_ENABLE_TEXT_LOGGING == 1
329 
331  void set_LogText_OutputPort(
332  FwIndexType portNum,
333  Fw::InputSerializePort* port
334  );
335 
336 #endif
337 
340  FwIndexType portNum,
341  Fw::InputSerializePort* port
342  );
343 
346  FwIndexType portNum,
347  Fw::InputSerializePort* port
348  );
349 
352  FwIndexType portNum,
353  Fw::InputSerializePort* port
354  );
355 
358  FwIndexType portNum,
359  Fw::InputSerializePort* port
360  );
361 
364  FwIndexType portNum,
365  Fw::InputSerializePort* port
366  );
367 
368 #endif
369 
370 #if !FW_DIRECT_PORT_CALLS && FW_PORT_SERIALIZATION
371 
372  public:
373 
374  // ----------------------------------------------------------------------
375  // Connect serial input ports to typed output ports
376  // ----------------------------------------------------------------------
377 
380  FwIndexType portNum,
381  Fw::InputSerializePort* port
382  );
383 
386  FwIndexType portNum,
387  Fw::InputSerializePort* port
388  );
389 
392  FwIndexType portNum,
393  Fw::InputSerializePort* port
394  );
395 
398  FwIndexType portNum,
399  Fw::InputSerializePort* port
400  );
401 
402 #endif
403 
404  public:
405 
406  // ----------------------------------------------------------------------
407  // Command registration
408  // ----------------------------------------------------------------------
409 
413  void regCommands();
414 
415  protected:
416 
417  // ----------------------------------------------------------------------
418  // Component construction and destruction
419  // ----------------------------------------------------------------------
420 
423  const char* compName = ""
424  );
425 
427  virtual ~CmdSequencerComponentBase();
428 
429  protected:
430 
431  // ----------------------------------------------------------------------
432  // Getters for numbers of special input ports
433  // ----------------------------------------------------------------------
434 
439  return NUM_CMDIN_INPUT_PORTS;
440  }
441 
442  protected:
443 
444  // ----------------------------------------------------------------------
445  // Getters for numbers of typed input ports
446  // ----------------------------------------------------------------------
447 
453  }
454 
459  return NUM_PINGIN_INPUT_PORTS;
460  }
461 
467  }
468 
474  }
475 
481  }
482 
488  }
489 
490  protected:
491 
492  // ----------------------------------------------------------------------
493  // Getters for numbers of special output ports
494  // ----------------------------------------------------------------------
495 
496 #if FW_ENABLE_TEXT_LOGGING == 1
497 
501  static constexpr FwIndexType getNum_LogText_OutputPorts() {
503  }
504 
505 #endif
506 
512  }
513 
519  }
520 
526  }
527 
533  }
534 
540  }
541 
542  protected:
543 
544  // ----------------------------------------------------------------------
545  // Getters for numbers of typed output ports
546  // ----------------------------------------------------------------------
547 
553  }
554 
560  }
561 
567  }
568 
574  }
575 
576  protected:
577 
578  // ----------------------------------------------------------------------
579  // Connection status queries for special output ports
580  // ----------------------------------------------------------------------
581 
582 #if FW_ENABLE_TEXT_LOGGING == 1
583 
587  bool isConnected_LogText_OutputPort(
588  FwIndexType portNum
589  ) const;
590 
591 #endif
592 
597  FwIndexType portNum
598  ) const;
599 
604  FwIndexType portNum
605  ) const;
606 
611  FwIndexType portNum
612  ) const;
613 
618  FwIndexType portNum
619  ) const;
620 
625  FwIndexType portNum
626  ) const;
627 
628  protected:
629 
630  // ----------------------------------------------------------------------
631  // Connection status queries for typed output ports
632  // ----------------------------------------------------------------------
633 
638  FwIndexType portNum
639  ) const;
640 
645  FwIndexType portNum
646  ) const;
647 
652  FwIndexType portNum
653  ) const;
654 
659  FwIndexType portNum
660  ) const;
661 
662 #if FW_DIRECT_PORT_CALLS
663  public:
664 #else
665  protected:
666 #endif
667 
668  // ----------------------------------------------------------------------
669  // Port handler base-class functions for special input ports
670  //
671  // Call these functions directly to bypass the corresponding ports
672  // ----------------------------------------------------------------------
673 
675  void cmdIn_handlerBase(
676  FwIndexType portNum,
677  FwOpcodeType opCode,
678  U32 cmdSeq,
679  Fw::CmdArgBuffer& args
680  );
681 
682  protected:
683 
684  // ----------------------------------------------------------------------
685  // Handlers to implement for typed input ports
686  // ----------------------------------------------------------------------
687 
689  virtual void cmdResponseIn_handler(
690  FwIndexType portNum,
691  FwOpcodeType opCode,
692  U32 cmdSeq,
693  const Fw::CmdResponse& response
694  ) = 0;
695 
697  virtual void pingIn_handler(
698  FwIndexType portNum,
699  U32 key
700  ) = 0;
701 
703  virtual void schedIn_handler(
704  FwIndexType portNum,
705  U32 context
706  ) = 0;
707 
709  virtual void seqCancelIn_handler(
710  FwIndexType portNum
711  ) = 0;
712 
714  virtual void seqDispatchIn_handler(
715  FwIndexType portNum,
716  Fw::StringBase& file_name
717  ) = 0;
718 
720  virtual void seqRunIn_handler(
721  FwIndexType portNum,
722  const Fw::StringBase& filename,
723  const Svc::SeqArgs& args
724  ) = 0;
725 
726 #if FW_DIRECT_PORT_CALLS
727  public:
728 #else
729  protected:
730 #endif
731 
732  // ----------------------------------------------------------------------
733  // Port handler base-class functions for typed input ports
734  //
735  // Call these functions directly to bypass the corresponding ports
736  // ----------------------------------------------------------------------
737 
740  FwIndexType portNum,
741  FwOpcodeType opCode,
742  U32 cmdSeq,
743  const Fw::CmdResponse& response
744  );
745 
747  void pingIn_handlerBase(
748  FwIndexType portNum,
749  U32 key
750  );
751 
753  void schedIn_handlerBase(
754  FwIndexType portNum,
755  U32 context
756  );
757 
760  FwIndexType portNum
761  );
762 
765  FwIndexType portNum,
766  Fw::StringBase& file_name
767  );
768 
771  FwIndexType portNum,
772  const Fw::StringBase& filename,
773  const Svc::SeqArgs& args
774  );
775 
776  protected:
777 
778  // ----------------------------------------------------------------------
779  // Pre-message hooks for typed async input ports
780  //
781  // Each of these functions is invoked just before processing a message
782  // on the corresponding port. By default, they do nothing. You can
783  // override them to provide specific pre-message behavior.
784  // ----------------------------------------------------------------------
785 
787  virtual void cmdResponseIn_preMsgHook(
788  FwIndexType portNum,
789  FwOpcodeType opCode,
790  U32 cmdSeq,
791  const Fw::CmdResponse& response
792  );
793 
795  virtual void pingIn_preMsgHook(
796  FwIndexType portNum,
797  U32 key
798  );
799 
801  virtual void schedIn_preMsgHook(
802  FwIndexType portNum,
803  U32 context
804  );
805 
807  virtual void seqCancelIn_preMsgHook(
808  FwIndexType portNum
809  );
810 
812  virtual void seqDispatchIn_preMsgHook(
813  FwIndexType portNum,
814  Fw::StringBase& file_name
815  );
816 
818  virtual void seqRunIn_preMsgHook(
819  FwIndexType portNum,
820  const Fw::StringBase& filename,
821  const Svc::SeqArgs& args
822  );
823 
824  protected:
825 
826  // ----------------------------------------------------------------------
827  // Invocation functions for typed output ports
828  // ----------------------------------------------------------------------
829 
831  void comCmdOut_out(
832  FwIndexType portNum,
833  Fw::ComBuffer& data,
834  U32 context
835  ) const;
836 
838  void pingOut_out(
839  FwIndexType portNum,
840  U32 key
841  ) const;
842 
844  void seqDone_out(
845  FwIndexType portNum,
846  FwOpcodeType opCode,
847  U32 cmdSeq,
848  const Fw::CmdResponse& response
849  ) const;
850 
852  void seqStartOut_out(
853  FwIndexType portNum,
854  const Fw::StringBase& filename,
855  const Svc::SeqArgs& args
856  ) const;
857 
858  protected:
859 
860  // ----------------------------------------------------------------------
861  // Command response
862  // ----------------------------------------------------------------------
863 
865  void cmdResponse_out(
866  FwOpcodeType opCode,
867  U32 cmdSeq,
868  Fw::CmdResponse response
869  );
870 
871  protected:
872 
873  // ----------------------------------------------------------------------
874  // Command handlers to implement
875  // ----------------------------------------------------------------------
876 
880  virtual void CS_RUN_cmdHandler(
881  FwOpcodeType opCode,
882  U32 cmdSeq,
883  const Fw::CmdStringArg& fileName,
884  const Svc::BlockState& block
885  ) = 0;
886 
890  virtual void CS_VALIDATE_cmdHandler(
891  FwOpcodeType opCode,
892  U32 cmdSeq,
893  const Fw::CmdStringArg& fileName
894  ) = 0;
895 
899  virtual void CS_CANCEL_cmdHandler(
900  FwOpcodeType opCode,
901  U32 cmdSeq
902  ) = 0;
903 
907  virtual void CS_START_cmdHandler(
908  FwOpcodeType opCode,
909  U32 cmdSeq
910  ) = 0;
911 
915  virtual void CS_STEP_cmdHandler(
916  FwOpcodeType opCode,
917  U32 cmdSeq
918  ) = 0;
919 
923  virtual void CS_AUTO_cmdHandler(
924  FwOpcodeType opCode,
925  U32 cmdSeq
926  ) = 0;
927 
931  virtual void CS_MANUAL_cmdHandler(
932  FwOpcodeType opCode,
933  U32 cmdSeq
934  ) = 0;
935 
939  virtual void CS_JOIN_WAIT_cmdHandler(
940  FwOpcodeType opCode,
941  U32 cmdSeq
942  ) = 0;
943 
944  protected:
945 
946  // ----------------------------------------------------------------------
947  // Command handler base-class functions
948  //
949  // Call these functions directly to bypass the command input port
950  // ----------------------------------------------------------------------
951 
956  FwOpcodeType opCode,
957  U32 cmdSeq,
958  Fw::CmdArgBuffer& args
959  );
960 
965  FwOpcodeType opCode,
966  U32 cmdSeq,
967  Fw::CmdArgBuffer& args
968  );
969 
974  FwOpcodeType opCode,
975  U32 cmdSeq,
976  Fw::CmdArgBuffer& args
977  );
978 
983  FwOpcodeType opCode,
984  U32 cmdSeq,
985  Fw::CmdArgBuffer& args
986  );
987 
992  FwOpcodeType opCode,
993  U32 cmdSeq,
994  Fw::CmdArgBuffer& args
995  );
996 
1001  FwOpcodeType opCode,
1002  U32 cmdSeq,
1003  Fw::CmdArgBuffer& args
1004  );
1005 
1010  FwOpcodeType opCode,
1011  U32 cmdSeq,
1012  Fw::CmdArgBuffer& args
1013  );
1014 
1019  FwOpcodeType opCode,
1020  U32 cmdSeq,
1021  Fw::CmdArgBuffer& args
1022  );
1023 
1024  protected:
1025 
1026  // ----------------------------------------------------------------------
1027  // Pre-message hooks for async commands
1028  //
1029  // Each of these functions is invoked just before processing the
1030  // corresponding command. By default they do nothing. You can
1031  // override them to provide specific pre-command behavior.
1032  // ----------------------------------------------------------------------
1033 
1035  virtual void CS_RUN_preMsgHook(
1036  FwOpcodeType opCode,
1037  U32 cmdSeq
1038  );
1039 
1041  virtual void CS_VALIDATE_preMsgHook(
1042  FwOpcodeType opCode,
1043  U32 cmdSeq
1044  );
1045 
1047  virtual void CS_CANCEL_preMsgHook(
1048  FwOpcodeType opCode,
1049  U32 cmdSeq
1050  );
1051 
1053  virtual void CS_START_preMsgHook(
1054  FwOpcodeType opCode,
1055  U32 cmdSeq
1056  );
1057 
1059  virtual void CS_STEP_preMsgHook(
1060  FwOpcodeType opCode,
1061  U32 cmdSeq
1062  );
1063 
1065  virtual void CS_AUTO_preMsgHook(
1066  FwOpcodeType opCode,
1067  U32 cmdSeq
1068  );
1069 
1071  virtual void CS_MANUAL_preMsgHook(
1072  FwOpcodeType opCode,
1073  U32 cmdSeq
1074  );
1075 
1077  virtual void CS_JOIN_WAIT_preMsgHook(
1078  FwOpcodeType opCode,
1079  U32 cmdSeq
1080  );
1081 
1082  protected:
1083 
1084  // ----------------------------------------------------------------------
1085  // Event logging functions
1086  // ----------------------------------------------------------------------
1087 
1092  const Fw::StringBase& fileName
1093  ) const;
1094 
1099  const Fw::StringBase& fileName
1100  ) const;
1101 
1106  const Fw::StringBase& fileName
1107  ) const;
1108 
1113  const Fw::StringBase& fileName,
1114  const Svc::CmdSequencer_FileReadStage& stage,
1115  I32 error
1116  ) const;
1117 
1122  const Fw::StringBase& fileName,
1123  U32 recordNumber,
1124  I32 error
1125  ) const;
1126 
1131  const Fw::StringBase& fileName,
1132  U32 size
1133  ) const;
1134 
1139  const Fw::StringBase& fileName
1140  ) const;
1141 
1146  const Fw::StringBase& fileName,
1147  U32 storedCRC,
1148  U32 computedCRC
1149  ) const;
1150 
1155  const Fw::StringBase& fileName,
1156  U32 recordNumber,
1157  FwOpcodeType opCode
1158  ) const;
1159 
1164  const Fw::StringBase& fileName
1165  ) const;
1166 
1171  const Fw::StringBase& fileName,
1172  U32 recordNumber,
1173  FwOpcodeType opCode,
1174  U32 errorStatus
1175  ) const;
1176 
1180  void log_WARNING_HI_CS_InvalidMode() const;
1181 
1186  const Fw::StringBase& fileName,
1187  U32 header_records,
1188  U32 extra_bytes
1189  ) const;
1190 
1195  const Fw::StringBase& fileName,
1196  U16 time_base,
1197  U16 seq_time_base
1198  ) const;
1199 
1204  const Fw::StringBase& fileName,
1205  U8 currTimeBase,
1206  U8 seqTimeBase
1207  ) const;
1208 
1213  const Fw::StringBase& filename
1214  ) const;
1215 
1220  FwOpcodeType opcode
1221  ) const;
1222 
1227  const Svc::CmdSequencer_SeqMode& mode
1228  ) const;
1229 
1234 
1239  const Fw::StringBase& filename
1240  ) const;
1241 
1246  const Fw::StringBase& filename,
1247  U32 command
1248  ) const;
1249 
1254  const Fw::StringBase& filename,
1255  U32 command
1256  ) const;
1257 
1262  const Fw::StringBase& filename
1263  ) const;
1264 
1269  const Fw::StringBase& filename,
1270  U32 recordNumber,
1271  FwOpcodeType opCode
1272  ) const;
1273 
1278 
1283  const Fw::StringBase& fileName
1284  ) const;
1285 
1291  const Fw::StringBase& fileName,
1292  U32 seconds,
1293  U32 useconds
1294  ) const;
1295 
1300  const Fw::StringBase& fileName,
1301  const Fw::StringBase& sandboxDir
1302  ) const;
1303 
1304  protected:
1305 
1306  // ----------------------------------------------------------------------
1307  // Telemetry serialized write
1308  // ----------------------------------------------------------------------
1309 
1314  void tlmWrite(
1315  FwChanIdType id,
1316  Fw::TlmBuffer& _tlmBuff,
1317  Fw::Time _tlmTime = Fw::Time()
1318  ) const;
1319 
1320  protected:
1321 
1322  // ----------------------------------------------------------------------
1323  // Telemetry write functions
1324  // ----------------------------------------------------------------------
1325 
1330  U32 arg,
1331  Fw::Time _tlmTime = Fw::Time()
1332  ) const;
1333 
1338  U32 arg,
1339  Fw::Time _tlmTime = Fw::Time()
1340  ) const;
1341 
1345  void tlmWrite_CS_Errors(
1346  U32 arg,
1347  Fw::Time _tlmTime = Fw::Time()
1348  ) const;
1349 
1354  U32 arg,
1355  Fw::Time _tlmTime = Fw::Time()
1356  ) const;
1357 
1362  U32 arg,
1363  Fw::Time _tlmTime = Fw::Time()
1364  ) const;
1365 
1370  const Fw::StringBase& arg,
1371  Fw::Time _tlmTime = Fw::Time()
1372  );
1373 
1374  protected:
1375 
1376  // ----------------------------------------------------------------------
1377  // Time
1378  // ----------------------------------------------------------------------
1379 
1383  Fw::Time getTime() const;
1384 
1385  private:
1386 
1387  // ----------------------------------------------------------------------
1388  // Message dispatch functions
1389  // ----------------------------------------------------------------------
1390 
1392  virtual MsgDispatchStatus doDispatch();
1393 
1394  private:
1395 
1396  // ----------------------------------------------------------------------
1397  // Calls for messages received on special input ports
1398  // ----------------------------------------------------------------------
1399 
1401  static void m_p_cmdIn_in(
1402  Fw::PassiveComponentBase* callComp,
1403  FwIndexType portNum,
1404  FwOpcodeType opCode,
1405  U32 cmdSeq,
1406  Fw::CmdArgBuffer& args
1407  );
1408 
1409  private:
1410 
1411  // ----------------------------------------------------------------------
1412  // Calls for messages received on typed input ports
1413  // ----------------------------------------------------------------------
1414 
1416  static void m_p_cmdResponseIn_in(
1417  Fw::PassiveComponentBase* callComp,
1418  FwIndexType portNum,
1419  FwOpcodeType opCode,
1420  U32 cmdSeq,
1421  const Fw::CmdResponse& response
1422  );
1423 
1425  static void m_p_pingIn_in(
1426  Fw::PassiveComponentBase* callComp,
1427  FwIndexType portNum,
1428  U32 key
1429  );
1430 
1432  static void m_p_schedIn_in(
1433  Fw::PassiveComponentBase* callComp,
1434  FwIndexType portNum,
1435  U32 context
1436  );
1437 
1439  static void m_p_seqCancelIn_in(
1440  Fw::PassiveComponentBase* callComp,
1441  FwIndexType portNum
1442  );
1443 
1445  static void m_p_seqDispatchIn_in(
1446  Fw::PassiveComponentBase* callComp,
1447  FwIndexType portNum,
1448  Fw::StringBase& file_name
1449  );
1450 
1452  static void m_p_seqRunIn_in(
1453  Fw::PassiveComponentBase* callComp,
1454  FwIndexType portNum,
1455  const Fw::StringBase& filename,
1456  const Svc::SeqArgs& args
1457  );
1458 
1459  private:
1460 
1461  // ----------------------------------------------------------------------
1462  // Invocation functions for special output ports
1463  // ----------------------------------------------------------------------
1464 
1465 #if FW_ENABLE_TEXT_LOGGING
1466 
1468  void LogText_out(
1469  FwIndexType portNum,
1470  FwEventIdType id,
1471  Fw::Time& timeTag,
1472  const Fw::LogSeverity& severity,
1473  Fw::TextLogString& text
1474  ) const;
1475 
1476 #endif
1477 
1479  void cmdRegOut_out(
1480  FwIndexType portNum,
1481  FwOpcodeType opCode
1482  ) const;
1483 
1485  void cmdResponseOut_out(
1486  FwIndexType portNum,
1487  FwOpcodeType opCode,
1488  U32 cmdSeq,
1489  const Fw::CmdResponse& response
1490  ) const;
1491 
1493  void logOut_out(
1494  FwIndexType portNum,
1495  FwEventIdType id,
1496  Fw::Time& timeTag,
1497  const Fw::LogSeverity& severity,
1498  Fw::LogBuffer& args
1499  ) const;
1500 
1502  void timeCaller_out(
1503  FwIndexType portNum,
1504  Fw::Time& time
1505  ) const;
1506 
1508  void tlmOut_out(
1509  FwIndexType portNum,
1510  FwChanIdType id,
1511  Fw::Time& timeTag,
1512  Fw::TlmBuffer& val
1513  ) const;
1514 
1515 #if !FW_DIRECT_PORT_CALLS
1516 
1517  private:
1518 
1519  // ----------------------------------------------------------------------
1520  // Special input ports
1521  // ----------------------------------------------------------------------
1522 
1524  Fw::InputCmdPort m_cmdIn_InputPort[NUM_CMDIN_INPUT_PORTS];
1525 
1526 #endif
1527 
1528 #if !FW_DIRECT_PORT_CALLS
1529 
1530  private:
1531 
1532  // ----------------------------------------------------------------------
1533  // Typed input ports
1534  // ----------------------------------------------------------------------
1535 
1537  Fw::InputCmdResponsePort m_cmdResponseIn_InputPort[NUM_CMDRESPONSEIN_INPUT_PORTS];
1538 
1540  Svc::InputPingPort m_pingIn_InputPort[NUM_PINGIN_INPUT_PORTS];
1541 
1543  Svc::InputSchedPort m_schedIn_InputPort[NUM_SCHEDIN_INPUT_PORTS];
1544 
1547 
1549  Svc::InputFileDispatchPort m_seqDispatchIn_InputPort[NUM_SEQDISPATCHIN_INPUT_PORTS];
1550 
1552  Svc::InputCmdSeqInPort m_seqRunIn_InputPort[NUM_SEQRUNIN_INPUT_PORTS];
1553 
1554 #endif
1555 
1556 #if !FW_DIRECT_PORT_CALLS
1557 
1558  private:
1559 
1560  // ----------------------------------------------------------------------
1561  // Special output ports
1562  // ----------------------------------------------------------------------
1563 
1564 #if FW_ENABLE_TEXT_LOGGING == 1
1565 
1567  Fw::OutputLogTextPort m_LogText_OutputPort[NUM_LOGTEXT_OUTPUT_PORTS];
1568 
1569 #endif
1570 
1572  Fw::OutputCmdRegPort m_cmdRegOut_OutputPort[NUM_CMDREGOUT_OUTPUT_PORTS];
1573 
1575  Fw::OutputCmdResponsePort m_cmdResponseOut_OutputPort[NUM_CMDRESPONSEOUT_OUTPUT_PORTS];
1576 
1578  Fw::OutputLogPort m_logOut_OutputPort[NUM_LOGOUT_OUTPUT_PORTS];
1579 
1581  Fw::OutputTimePort m_timeCaller_OutputPort[NUM_TIMECALLER_OUTPUT_PORTS];
1582 
1584  Fw::OutputTlmPort m_tlmOut_OutputPort[NUM_TLMOUT_OUTPUT_PORTS];
1585 
1586 #endif
1587 
1588 #if !FW_DIRECT_PORT_CALLS
1589 
1590  private:
1591 
1592  // ----------------------------------------------------------------------
1593  // Typed output ports
1594  // ----------------------------------------------------------------------
1595 
1597  Fw::OutputComPort m_comCmdOut_OutputPort[NUM_COMCMDOUT_OUTPUT_PORTS];
1598 
1600  Svc::OutputPingPort m_pingOut_OutputPort[NUM_PINGOUT_OUTPUT_PORTS];
1601 
1604 
1606  Svc::OutputCmdSeqInPort m_seqStartOut_OutputPort[NUM_SEQSTARTOUT_OUTPUT_PORTS];
1607 
1608 #endif
1609 
1610  private:
1611 
1612  // ----------------------------------------------------------------------
1613  // First update flags for telemetry channels
1614  // ----------------------------------------------------------------------
1615 
1617  bool m_first_update_CS_CurrentSequence = true;
1618 
1619  private:
1620 
1621  // ----------------------------------------------------------------------
1622  // Last value storage for telemetry channels
1623  // ----------------------------------------------------------------------
1624 
1626  Fw::TlmString m_last_CS_CurrentSequence = {};
1627 
1628  };
1629 
1630 }
1631 
1632 #endif
void set_timeCaller_OutputPort(FwIndexType portNum, Fw::InputTimePort *port)
Connect port to timeCaller[portNum].
static constexpr FwIndexType getNum_cmdIn_InputPorts()
void log_WARNING_HI_CS_TimeContextMismatch(const Fw::StringBase &fileName, U8 currTimeBase, U8 seqTimeBase) const
The Command Sequencer received a command that was invalid for its current mode.
static constexpr FwIndexType getNum_tlmOut_OutputPorts()
void set_tlmOut_OutputPort(FwIndexType portNum, Fw::InputTlmPort *port)
Connect port to tlmOut[portNum].
void tlmWrite_CS_LoadCommands(U32 arg, Fw::Time _tlmTime=Fw::Time()) const
static constexpr FwIndexType getNum_cmdResponseIn_InputPorts()
virtual void seqRunIn_handler(FwIndexType portNum, const Fw::StringBase &filename, const Svc::SeqArgs &args)=0
Handler for input port seqRunIn.
static constexpr FwIndexType getNum_timeCaller_OutputPorts()
static constexpr FwIndexType getNum_cmdResponseOut_OutputPorts()
FwIdType FwOpcodeType
The type of a command opcode.
static constexpr FwIndexType getNum_logOut_OutputPorts()
virtual void seqDispatchIn_handler(FwIndexType portNum, Fw::StringBase &file_name)=0
Handler for input port seqDispatchIn.
void log_WARNING_HI_CS_FileSizeError(const Fw::StringBase &fileName, U32 size) const
void log_WARNING_HI_CS_FileInvalid(const Fw::StringBase &fileName, const Svc::CmdSequencer_FileReadStage &stage, I32 error) const
bool isConnected_cmdResponseOut_OutputPort(FwIndexType portNum) const
void cmdResponseIn_handlerBase(FwIndexType portNum, FwOpcodeType opCode, U32 cmdSeq, const Fw::CmdResponse &response)
Handler base-class function for input port cmdResponseIn.
Cannot run new sequence when current sequence file is still running.
PlatformSizeType FwSizeType
I32 FwEnumStoreType
void tlmWrite_CS_Errors(U32 arg, Fw::Time _tlmTime=Fw::Time()) const
void log_WARNING_HI_CS_FileNotFound(const Fw::StringBase &fileName) const
void CS_VALIDATE_cmdHandlerBase(FwOpcodeType opCode, U32 cmdSeq, Fw::CmdArgBuffer &args)
static constexpr FwIndexType getNum_seqDispatchIn_InputPorts()
void log_ACTIVITY_HI_CS_JoinWaiting(const Fw::StringBase &filename, U32 recordNumber, FwOpcodeType opCode) const
void CS_MANUAL_cmdHandlerBase(FwOpcodeType opCode, U32 cmdSeq, Fw::CmdArgBuffer &args)
Svc::InputPingPort * get_pingIn_InputPort(FwIndexType portNum)
void regCommands()
Register commands with the Command Dispatcher.
The Command Sequencer issued a command and received a success status in return.
virtual void schedIn_preMsgHook(FwIndexType portNum, U32 context)
Pre-message hook for async input port schedIn.
void log_WARNING_HI_CS_UnexpectedCompletion(FwOpcodeType opcode) const
virtual void CS_AUTO_preMsgHook(FwOpcodeType opCode, U32 cmdSeq)
Pre-message hook for command CS_AUTO.
The stage of the file read operation.
void log_ACTIVITY_LO_CS_SequenceLoaded(const Fw::StringBase &fileName) const
The Command Sequencer issued a command and received an error status in return.
friend class CmdSequencerTester
Friend class tester implementation to support white-box testing.
void CS_STEP_cmdHandlerBase(FwOpcodeType opCode, U32 cmdSeq, Fw::CmdArgBuffer &args)
static constexpr FwIndexType getNum_seqRunIn_InputPorts()
static constexpr FwIndexType getNum_schedIn_InputPorts()
void tlmWrite_CS_CurrentSequence(const Fw::StringBase &arg, Fw::Time _tlmTime=Fw::Time())
void log_ACTIVITY_HI_CS_CmdStarted(const Fw::StringBase &filename) const
virtual void CS_VALIDATE_cmdHandler(FwOpcodeType opCode, U32 cmdSeq, const Fw::CmdStringArg &fileName)=0
Fw::InputCmdResponsePort * get_cmdResponseIn_InputPort(FwIndexType portNum)
static constexpr FwIndexType getNum_seqDone_OutputPorts()
virtual void seqCancelIn_handler(FwIndexType portNum)=0
Handler for input port seqCancelIn.
void set_pingOut_OutputPort(FwIndexType portNum, Svc::InputPingPort *port)
Connect port to pingOut[portNum].
void pingIn_handlerBase(FwIndexType portNum, U32 key)
Handler base-class function for input port pingIn.
Enum representing a command response.
void schedIn_handlerBase(FwIndexType portNum, U32 context)
Handler base-class function for input port schedIn.
bool isConnected_seqDone_OutputPort(FwIndexType portNum) const
void CS_START_cmdHandlerBase(FwOpcodeType opCode, U32 cmdSeq, Fw::CmdArgBuffer &args)
void log_WARNING_HI_CS_SequenceTimeout(const Fw::StringBase &filename, U32 command) const
bool isConnected_seqStartOut_OutputPort(FwIndexType portNum) const
virtual void CS_CANCEL_preMsgHook(FwOpcodeType opCode, U32 cmdSeq)
Pre-message hook for command CS_CANCEL.
void init()
Object initializer.
Definition: ObjBase.cpp:24
void cmdIn_handlerBase(FwIndexType portNum, FwOpcodeType opCode, U32 cmdSeq, Fw::CmdArgBuffer &args)
Handler base-class function for input port cmdIn.
void set_seqDone_OutputPort(FwIndexType portNum, Fw::InputCmdResponsePort *port)
Connect port to seqDone[portNum].
Number of records in header doesn&#39;t match number in file.
virtual void CS_RUN_preMsgHook(FwOpcodeType opCode, U32 cmdSeq)
Pre-message hook for command CS_RUN.
void tlmWrite_CS_CancelCommands(U32 arg, Fw::Time _tlmTime=Fw::Time()) const
FwIdType FwEventIdType
The type of an event identifier.
virtual ~CmdSequencerComponentBase()
Destroy CmdSequencerComponentBase object.
void tlmWrite_CS_CommandsExecuted(U32 arg, Fw::Time _tlmTime=Fw::Time()) const
A sequence file name resolved outside the directory set with configureSandbox.
static constexpr FwIndexType getNum_pingOut_OutputPorts()
void log_ACTIVITY_HI_CS_PortSequenceStarted(const Fw::StringBase &filename) const
A sequence related command came with no active sequence.
void seqStartOut_out(FwIndexType portNum, const Fw::StringBase &filename, const Svc::SeqArgs &args) const
Invoke output port seqStartOut.
void log_WARNING_HI_CS_RecordInvalid(const Fw::StringBase &fileName, U32 recordNumber, I32 error) const
void log_ACTIVITY_HI_CS_SequenceCanceled(const Fw::StringBase &fileName) const
bool isConnected_logOut_OutputPort(FwIndexType portNum) const
friend class CmdSequencerTesterBase
Friend class tester to support autocoded test harness.
void log_WARNING_HI_CS_RecordMismatch(const Fw::StringBase &fileName, U32 header_records, U32 extra_bytes) const
bool isConnected_cmdRegOut_OutputPort(FwIndexType portNum) const
virtual void CS_RUN_cmdHandler(FwOpcodeType opCode, U32 cmdSeq, const Fw::CmdStringArg &fileName, const Svc::BlockState &block)=0
virtual void cmdResponseIn_preMsgHook(FwIndexType portNum, FwOpcodeType opCode, U32 cmdSeq, const Fw::CmdResponse &response)
Pre-message hook for async input port cmdResponseIn.
void CS_JOIN_WAIT_cmdHandlerBase(FwOpcodeType opCode, U32 cmdSeq, Fw::CmdArgBuffer &args)
Svc::InputCmdSeqInPort * get_seqRunIn_InputPort(FwIndexType portNum)
void seqRunIn_handlerBase(FwIndexType portNum, const Fw::StringBase &filename, const Svc::SeqArgs &args)
Handler base-class function for input port seqRunIn.
void set_cmdResponseOut_OutputPort(FwIndexType portNum, Fw::InputCmdResponsePort *port)
Connect port to cmdResponseOut[portNum].
FwIdType FwChanIdType
The type of a telemetry channel identifier.
void set_cmdRegOut_OutputPort(FwIndexType portNum, Fw::InputCmdRegPort *port)
Connect port to cmdRegOut[portNum].
virtual void CS_START_cmdHandler(FwOpcodeType opCode, U32 cmdSeq)=0
Sequencer blocking state.
static constexpr FwIndexType getNum_cmdRegOut_OutputPorts()
void log_ACTIVITY_HI_CS_ModeSwitched(const Svc::CmdSequencer_SeqMode &mode) const
A command in a sequence was stepped through.
Enum representing event severity.
void CS_AUTO_cmdHandlerBase(FwOpcodeType opCode, U32 cmdSeq, Fw::CmdArgBuffer &args)
virtual void CS_START_preMsgHook(FwOpcodeType opCode, U32 cmdSeq)
Pre-message hook for command CS_START.
uint8_t U8
8-bit unsigned integer
Definition: BasicTypes.h:54
void set_comCmdOut_OutputPort(FwIndexType portNum, Fw::InputComPort *port)
Connect port to comCmdOut[portNum].
static constexpr FwIndexType getNum_seqStartOut_OutputPorts()
virtual void pingIn_preMsgHook(FwIndexType portNum, U32 key)
Pre-message hook for async input port pingIn.
Svc::InputSchedPort * get_schedIn_InputPort(FwIndexType portNum)
virtual void CS_AUTO_cmdHandler(FwOpcodeType opCode, U32 cmdSeq)=0
Wait for the current running sequence file complete.
The running time base doesn&#39;t match the time base in the sequence files.
void log_WARNING_HI_CS_FileCrcFailure(const Fw::StringBase &fileName, U32 storedCRC, U32 computedCRC) const
void log_WARNING_HI_CS_FileOutsideSandbox(const Fw::StringBase &fileName, const Fw::StringBase &sandboxDir) const
bool isConnected_timeCaller_OutputPort(FwIndexType portNum) const
virtual void CS_MANUAL_preMsgHook(FwOpcodeType opCode, U32 cmdSeq)
Pre-message hook for command CS_MANUAL.
bool isConnected_pingOut_OutputPort(FwIndexType portNum) const
void CS_CANCEL_cmdHandlerBase(FwOpcodeType opCode, U32 cmdSeq, Fw::CmdArgBuffer &args)
void set_seqStartOut_OutputPort(FwIndexType portNum, Svc::InputCmdSeqInPort *port)
Connect port to seqStartOut[portNum].
void log_WARNING_HI_CS_TimeBaseMismatch(const Fw::StringBase &fileName, U16 time_base, U16 seq_time_base) const
void tlmWrite(FwChanIdType id, Fw::TlmBuffer &_tlmBuff, Fw::Time _tlmTime=Fw::Time()) const
virtual void CS_STEP_preMsgHook(FwOpcodeType opCode, U32 cmdSeq)
Pre-message hook for command CS_STEP.
PlatformIndexType FwIndexType
Fw::InputCmdPort * get_cmdIn_InputPort(FwIndexType portNum)
The sequence file contains no command records.
virtual void seqRunIn_preMsgHook(FwIndexType portNum, const Fw::StringBase &filename, const Svc::SeqArgs &args)
Pre-message hook for async input port seqRunIn.
Wait for sequences that are running to finish. Allow user to run multiple seq files in SEQ_NO_BLOCK m...
Perform one step in a command sequence. Valid only if CmdSequencer is in MANUAL run mode...
void seqCancelIn_handlerBase(FwIndexType portNum)
Handler base-class function for input port seqCancelIn.
Auto-generated base for CmdSequencer component.
A local port request to run a sequence was started.
void CS_RUN_cmdHandlerBase(FwOpcodeType opCode, U32 cmdSeq, Fw::CmdArgBuffer &args)
The Sequence File Loader could not read the sequence file.
Svc::InputFileDispatchPort * get_seqDispatchIn_InputPort(FwIndexType portNum)
void comCmdOut_out(FwIndexType portNum, Fw::ComBuffer &data, U32 context) const
Invoke output port comCmdOut.
static constexpr FwIndexType getNum_seqCancelIn_InputPorts()
virtual void pingIn_handler(FwIndexType portNum, U32 key)=0
Handler for input port pingIn.
RateGroupDivider component implementation.
virtual void CS_VALIDATE_preMsgHook(FwOpcodeType opCode, U32 cmdSeq)
Pre-message hook for command CS_VALIDATE.
void log_ACTIVITY_HI_CS_SequenceComplete(const Fw::StringBase &fileName) const
virtual void CS_STEP_cmdHandler(FwOpcodeType opCode, U32 cmdSeq)=0
void seqDone_out(FwIndexType portNum, FwOpcodeType opCode, U32 cmdSeq, const Fw::CmdResponse &response) const
Invoke output port seqDone.
void log_WARNING_LO_CS_StepRecordPending(const Fw::StringBase &fileName, U32 seconds, U32 useconds) const
void log_ACTIVITY_LO_CS_CommandComplete(const Fw::StringBase &fileName, U32 recordNumber, FwOpcodeType opCode) const
virtual void CS_MANUAL_cmdHandler(FwOpcodeType opCode, U32 cmdSeq)=0
CmdSequencerComponentBase(const char *compName="")
Construct CmdSequencerComponentBase object.
A command status came back when no sequence was running.
void seqDispatchIn_handlerBase(FwIndexType portNum, Fw::StringBase &file_name)
Handler base-class function for input port seqDispatchIn.
static constexpr FwIndexType getNum_pingIn_InputPorts()
virtual void cmdResponseIn_handler(FwIndexType portNum, FwOpcodeType opCode, U32 cmdSeq, const Fw::CmdResponse &response)=0
Handler for input port cmdResponseIn.
void log_WARNING_LO_CS_NoRecords(const Fw::StringBase &fileName) const
virtual void CS_JOIN_WAIT_cmdHandler(FwOpcodeType opCode, U32 cmdSeq)=0
virtual void seqCancelIn_preMsgHook(FwIndexType portNum)
Pre-message hook for async input port seqCancelIn.
virtual void schedIn_handler(FwIndexType portNum, U32 context)=0
Handler for input port schedIn.
void log_WARNING_HI_CS_CommandError(const Fw::StringBase &fileName, U32 recordNumber, FwOpcodeType opCode, U32 errorStatus) const
virtual void CS_CANCEL_cmdHandler(FwOpcodeType opCode, U32 cmdSeq)=0
void set_logOut_OutputPort(FwIndexType portNum, Fw::InputLogPort *port)
Connect port to logOut[portNum].
static constexpr FwIndexType getNum_comCmdOut_OutputPorts()
Svc::InputCmdSeqCancelPort * get_seqCancelIn_InputPort(FwIndexType portNum)
bool isConnected_tlmOut_OutputPort(FwIndexType portNum) const
void pingOut_out(FwIndexType portNum, U32 key) const
Invoke output port pingOut.
virtual void seqDispatchIn_preMsgHook(FwIndexType portNum, Fw::StringBase &file_name)
Pre-message hook for async input port seqDispatchIn.
bool isConnected_comCmdOut_OutputPort(FwIndexType portNum) const
void log_ACTIVITY_HI_CS_SequenceValid(const Fw::StringBase &filename) const
void log_WARNING_HI_CS_FileReadError(const Fw::StringBase &fileName) const
void cmdResponse_out(FwOpcodeType opCode, U32 cmdSeq, Fw::CmdResponse response)
Emit command response.
void tlmWrite_CS_SequencesCompleted(U32 arg, Fw::Time _tlmTime=Fw::Time()) const
void log_ACTIVITY_HI_CS_CmdStepped(const Fw::StringBase &filename, U32 command) const
The running time base doesn&#39;t match the time base in the sequence files.
virtual void CS_JOIN_WAIT_preMsgHook(FwOpcodeType opCode, U32 cmdSeq)
Pre-message hook for command CS_JOIN_WAIT.