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 #if FW_ENABLE_TEXT_LOGGING == 1
22 #include "Fw/Log/LogTextPortAc.hpp"
23 #endif
24 #if !FW_DIRECT_PORT_CALLS
26 #endif
27 #if !FW_DIRECT_PORT_CALLS
29 #endif
30 #include "Fw/Time/TimePortAc.hpp"
31 #include "Fw/Tlm/TlmPortAc.hpp"
32 #include "Fw/Tlm/TlmString.hpp"
36 #include "Svc/Ping/PingPortAc.hpp"
43 
44 namespace Svc {
45 
52  {
53 
54  // ----------------------------------------------------------------------
55  // Friend classes
56  // ----------------------------------------------------------------------
57 
59  friend class CmdSequencerTesterBase;
61  friend class CmdSequencerTester;
62 
63  protected:
64 
65  // ----------------------------------------------------------------------
66  // Constants
67  // ----------------------------------------------------------------------
68 
70  enum {
72  };
73 
75  enum {
82  };
83 
85  enum {
92  };
93 
95  enum {
100  };
101 
103  enum {
112  };
113 
115  enum {
142  };
143 
145  enum {
151  };
152 
153  public:
154 
155  // ----------------------------------------------------------------------
156  // Component initialization
157  // ----------------------------------------------------------------------
158 
160  void init(
161  FwSizeType queueDepth,
162  FwEnumStoreType instance = 0
163  );
164 
165 #if !FW_DIRECT_PORT_CALLS
166 
167  public:
168 
169  // ----------------------------------------------------------------------
170  // Getters for special input ports
171  // ----------------------------------------------------------------------
172 
177  FwIndexType portNum
178  );
179 
180 #endif
181 
182 #if !FW_DIRECT_PORT_CALLS
183 
184  public:
185 
186  // ----------------------------------------------------------------------
187  // Getters for typed input ports
188  // ----------------------------------------------------------------------
189 
194  FwIndexType portNum
195  );
196 
201  FwIndexType portNum
202  );
203 
208  FwIndexType portNum
209  );
210 
215  FwIndexType portNum
216  );
217 
222  FwIndexType portNum
223  );
224 
229  FwIndexType portNum
230  );
231 
232 #endif
233 
234 #if !FW_DIRECT_PORT_CALLS
235 
236  public:
237 
238  // ----------------------------------------------------------------------
239  // Connect input ports to special output ports
240  // ----------------------------------------------------------------------
241 
242 #if FW_ENABLE_TEXT_LOGGING == 1
243 
245  void set_LogText_OutputPort(
246  FwIndexType portNum,
247  Fw::InputLogTextPort* port
248  );
249 
250 #endif
251 
254  FwIndexType portNum,
255  Fw::InputCmdRegPort* port
256  );
257 
260  FwIndexType portNum,
262  );
263 
266  FwIndexType portNum,
267  Fw::InputLogPort* port
268  );
269 
272  FwIndexType portNum,
273  Fw::InputTimePort* port
274  );
275 
278  FwIndexType portNum,
279  Fw::InputTlmPort* port
280  );
281 
282 #endif
283 
284 #if !FW_DIRECT_PORT_CALLS
285 
286  public:
287 
288  // ----------------------------------------------------------------------
289  // Connect typed input ports to typed output ports
290  // ----------------------------------------------------------------------
291 
294  FwIndexType portNum,
295  Fw::InputComPort* port
296  );
297 
300  FwIndexType portNum,
301  Svc::InputPingPort* port
302  );
303 
306  FwIndexType portNum,
308  );
309 
312  FwIndexType portNum,
314  );
315 
316 #endif
317 
318 #if !FW_DIRECT_PORT_CALLS && FW_PORT_SERIALIZATION
319 
320  public:
321 
322  // ----------------------------------------------------------------------
323  // Connect serial input ports to special output ports
324  // ----------------------------------------------------------------------
325 
326 #if FW_ENABLE_TEXT_LOGGING == 1
327 
329  void set_LogText_OutputPort(
330  FwIndexType portNum,
331  Fw::InputSerializePort* port
332  );
333 
334 #endif
335 
338  FwIndexType portNum,
339  Fw::InputSerializePort* port
340  );
341 
344  FwIndexType portNum,
345  Fw::InputSerializePort* port
346  );
347 
350  FwIndexType portNum,
351  Fw::InputSerializePort* port
352  );
353 
356  FwIndexType portNum,
357  Fw::InputSerializePort* port
358  );
359 
362  FwIndexType portNum,
363  Fw::InputSerializePort* port
364  );
365 
366 #endif
367 
368 #if !FW_DIRECT_PORT_CALLS && FW_PORT_SERIALIZATION
369 
370  public:
371 
372  // ----------------------------------------------------------------------
373  // Connect serial input ports to typed output ports
374  // ----------------------------------------------------------------------
375 
378  FwIndexType portNum,
379  Fw::InputSerializePort* port
380  );
381 
384  FwIndexType portNum,
385  Fw::InputSerializePort* port
386  );
387 
390  FwIndexType portNum,
391  Fw::InputSerializePort* port
392  );
393 
396  FwIndexType portNum,
397  Fw::InputSerializePort* port
398  );
399 
400 #endif
401 
402  public:
403 
404  // ----------------------------------------------------------------------
405  // Command registration
406  // ----------------------------------------------------------------------
407 
411  void regCommands();
412 
413  protected:
414 
415  // ----------------------------------------------------------------------
416  // Component construction and destruction
417  // ----------------------------------------------------------------------
418 
421  const char* compName = ""
422  );
423 
425  virtual ~CmdSequencerComponentBase();
426 
427  protected:
428 
429  // ----------------------------------------------------------------------
430  // Getters for numbers of special input ports
431  // ----------------------------------------------------------------------
432 
437  return NUM_CMDIN_INPUT_PORTS;
438  }
439 
440  protected:
441 
442  // ----------------------------------------------------------------------
443  // Getters for numbers of typed input ports
444  // ----------------------------------------------------------------------
445 
451  }
452 
457  return NUM_PINGIN_INPUT_PORTS;
458  }
459 
465  }
466 
472  }
473 
479  }
480 
486  }
487 
488  protected:
489 
490  // ----------------------------------------------------------------------
491  // Getters for numbers of special output ports
492  // ----------------------------------------------------------------------
493 
494 #if FW_ENABLE_TEXT_LOGGING == 1
495 
499  static constexpr FwIndexType getNum_LogText_OutputPorts() {
501  }
502 
503 #endif
504 
510  }
511 
517  }
518 
524  }
525 
531  }
532 
538  }
539 
540  protected:
541 
542  // ----------------------------------------------------------------------
543  // Getters for numbers of typed output ports
544  // ----------------------------------------------------------------------
545 
551  }
552 
558  }
559 
565  }
566 
572  }
573 
574  protected:
575 
576  // ----------------------------------------------------------------------
577  // Connection status queries for special output ports
578  // ----------------------------------------------------------------------
579 
580 #if FW_ENABLE_TEXT_LOGGING == 1
581 
585  bool isConnected_LogText_OutputPort(
586  FwIndexType portNum
587  ) const;
588 
589 #endif
590 
595  FwIndexType portNum
596  ) const;
597 
602  FwIndexType portNum
603  ) const;
604 
609  FwIndexType portNum
610  ) const;
611 
616  FwIndexType portNum
617  ) const;
618 
623  FwIndexType portNum
624  ) const;
625 
626  protected:
627 
628  // ----------------------------------------------------------------------
629  // Connection status queries for typed output ports
630  // ----------------------------------------------------------------------
631 
636  FwIndexType portNum
637  ) const;
638 
643  FwIndexType portNum
644  ) const;
645 
650  FwIndexType portNum
651  ) const;
652 
657  FwIndexType portNum
658  ) const;
659 
660 #if FW_DIRECT_PORT_CALLS
661  public:
662 #else
663  protected:
664 #endif
665 
666  // ----------------------------------------------------------------------
667  // Port handler base-class functions for special input ports
668  //
669  // Call these functions directly to bypass the corresponding ports
670  // ----------------------------------------------------------------------
671 
673  void cmdIn_handlerBase(
674  FwIndexType portNum,
675  FwOpcodeType opCode,
676  U32 cmdSeq,
677  Fw::CmdArgBuffer& args
678  );
679 
680  protected:
681 
682  // ----------------------------------------------------------------------
683  // Handlers to implement for typed input ports
684  // ----------------------------------------------------------------------
685 
687  virtual void cmdResponseIn_handler(
688  FwIndexType portNum,
689  FwOpcodeType opCode,
690  U32 cmdSeq,
691  const Fw::CmdResponse& response
692  ) = 0;
693 
695  virtual void pingIn_handler(
696  FwIndexType portNum,
697  U32 key
698  ) = 0;
699 
701  virtual void schedIn_handler(
702  FwIndexType portNum,
703  U32 context
704  ) = 0;
705 
707  virtual void seqCancelIn_handler(
708  FwIndexType portNum
709  ) = 0;
710 
712  virtual void seqDispatchIn_handler(
713  FwIndexType portNum,
714  Fw::StringBase& file_name
715  ) = 0;
716 
718  virtual void seqRunIn_handler(
719  FwIndexType portNum,
720  const Fw::StringBase& filename
721  ) = 0;
722 
723 #if FW_DIRECT_PORT_CALLS
724  public:
725 #else
726  protected:
727 #endif
728 
729  // ----------------------------------------------------------------------
730  // Port handler base-class functions for typed input ports
731  //
732  // Call these functions directly to bypass the corresponding ports
733  // ----------------------------------------------------------------------
734 
737  FwIndexType portNum,
738  FwOpcodeType opCode,
739  U32 cmdSeq,
740  const Fw::CmdResponse& response
741  );
742 
744  void pingIn_handlerBase(
745  FwIndexType portNum,
746  U32 key
747  );
748 
750  void schedIn_handlerBase(
751  FwIndexType portNum,
752  U32 context
753  );
754 
757  FwIndexType portNum
758  );
759 
762  FwIndexType portNum,
763  Fw::StringBase& file_name
764  );
765 
768  FwIndexType portNum,
769  const Fw::StringBase& filename
770  );
771 
772  protected:
773 
774  // ----------------------------------------------------------------------
775  // Pre-message hooks for typed async input ports
776  //
777  // Each of these functions is invoked just before processing a message
778  // on the corresponding port. By default, they do nothing. You can
779  // override them to provide specific pre-message behavior.
780  // ----------------------------------------------------------------------
781 
783  virtual void cmdResponseIn_preMsgHook(
784  FwIndexType portNum,
785  FwOpcodeType opCode,
786  U32 cmdSeq,
787  const Fw::CmdResponse& response
788  );
789 
791  virtual void pingIn_preMsgHook(
792  FwIndexType portNum,
793  U32 key
794  );
795 
797  virtual void schedIn_preMsgHook(
798  FwIndexType portNum,
799  U32 context
800  );
801 
803  virtual void seqCancelIn_preMsgHook(
804  FwIndexType portNum
805  );
806 
808  virtual void seqDispatchIn_preMsgHook(
809  FwIndexType portNum,
810  Fw::StringBase& file_name
811  );
812 
814  virtual void seqRunIn_preMsgHook(
815  FwIndexType portNum,
816  const Fw::StringBase& filename
817  );
818 
819  protected:
820 
821  // ----------------------------------------------------------------------
822  // Invocation functions for typed output ports
823  // ----------------------------------------------------------------------
824 
826  void comCmdOut_out(
827  FwIndexType portNum,
828  Fw::ComBuffer& data,
829  U32 context
830  ) const;
831 
833  void pingOut_out(
834  FwIndexType portNum,
835  U32 key
836  ) const;
837 
839  void seqDone_out(
840  FwIndexType portNum,
841  FwOpcodeType opCode,
842  U32 cmdSeq,
843  const Fw::CmdResponse& response
844  ) const;
845 
847  void seqStartOut_out(
848  FwIndexType portNum,
849  const Fw::StringBase& filename
850  ) const;
851 
852  protected:
853 
854  // ----------------------------------------------------------------------
855  // Command response
856  // ----------------------------------------------------------------------
857 
859  void cmdResponse_out(
860  FwOpcodeType opCode,
861  U32 cmdSeq,
862  Fw::CmdResponse response
863  );
864 
865  protected:
866 
867  // ----------------------------------------------------------------------
868  // Command handlers to implement
869  // ----------------------------------------------------------------------
870 
874  virtual void CS_RUN_cmdHandler(
875  FwOpcodeType opCode,
876  U32 cmdSeq,
877  const Fw::CmdStringArg& fileName,
879  ) = 0;
880 
884  virtual void CS_VALIDATE_cmdHandler(
885  FwOpcodeType opCode,
886  U32 cmdSeq,
887  const Fw::CmdStringArg& fileName
888  ) = 0;
889 
893  virtual void CS_CANCEL_cmdHandler(
894  FwOpcodeType opCode,
895  U32 cmdSeq
896  ) = 0;
897 
901  virtual void CS_START_cmdHandler(
902  FwOpcodeType opCode,
903  U32 cmdSeq
904  ) = 0;
905 
909  virtual void CS_STEP_cmdHandler(
910  FwOpcodeType opCode,
911  U32 cmdSeq
912  ) = 0;
913 
917  virtual void CS_AUTO_cmdHandler(
918  FwOpcodeType opCode,
919  U32 cmdSeq
920  ) = 0;
921 
925  virtual void CS_MANUAL_cmdHandler(
926  FwOpcodeType opCode,
927  U32 cmdSeq
928  ) = 0;
929 
933  virtual void CS_JOIN_WAIT_cmdHandler(
934  FwOpcodeType opCode,
935  U32 cmdSeq
936  ) = 0;
937 
938  protected:
939 
940  // ----------------------------------------------------------------------
941  // Command handler base-class functions
942  //
943  // Call these functions directly to bypass the command input port
944  // ----------------------------------------------------------------------
945 
950  FwOpcodeType opCode,
951  U32 cmdSeq,
952  Fw::CmdArgBuffer& args
953  );
954 
959  FwOpcodeType opCode,
960  U32 cmdSeq,
961  Fw::CmdArgBuffer& args
962  );
963 
968  FwOpcodeType opCode,
969  U32 cmdSeq,
970  Fw::CmdArgBuffer& args
971  );
972 
977  FwOpcodeType opCode,
978  U32 cmdSeq,
979  Fw::CmdArgBuffer& args
980  );
981 
986  FwOpcodeType opCode,
987  U32 cmdSeq,
988  Fw::CmdArgBuffer& args
989  );
990 
995  FwOpcodeType opCode,
996  U32 cmdSeq,
997  Fw::CmdArgBuffer& args
998  );
999 
1004  FwOpcodeType opCode,
1005  U32 cmdSeq,
1006  Fw::CmdArgBuffer& args
1007  );
1008 
1013  FwOpcodeType opCode,
1014  U32 cmdSeq,
1015  Fw::CmdArgBuffer& args
1016  );
1017 
1018  protected:
1019 
1020  // ----------------------------------------------------------------------
1021  // Pre-message hooks for async commands
1022  //
1023  // Each of these functions is invoked just before processing the
1024  // corresponding command. By default they do nothing. You can
1025  // override them to provide specific pre-command behavior.
1026  // ----------------------------------------------------------------------
1027 
1029  virtual void CS_RUN_preMsgHook(
1030  FwOpcodeType opCode,
1031  U32 cmdSeq
1032  );
1033 
1035  virtual void CS_VALIDATE_preMsgHook(
1036  FwOpcodeType opCode,
1037  U32 cmdSeq
1038  );
1039 
1041  virtual void CS_CANCEL_preMsgHook(
1042  FwOpcodeType opCode,
1043  U32 cmdSeq
1044  );
1045 
1047  virtual void CS_START_preMsgHook(
1048  FwOpcodeType opCode,
1049  U32 cmdSeq
1050  );
1051 
1053  virtual void CS_STEP_preMsgHook(
1054  FwOpcodeType opCode,
1055  U32 cmdSeq
1056  );
1057 
1059  virtual void CS_AUTO_preMsgHook(
1060  FwOpcodeType opCode,
1061  U32 cmdSeq
1062  );
1063 
1065  virtual void CS_MANUAL_preMsgHook(
1066  FwOpcodeType opCode,
1067  U32 cmdSeq
1068  );
1069 
1071  virtual void CS_JOIN_WAIT_preMsgHook(
1072  FwOpcodeType opCode,
1073  U32 cmdSeq
1074  );
1075 
1076  protected:
1077 
1078  // ----------------------------------------------------------------------
1079  // Event logging functions
1080  // ----------------------------------------------------------------------
1081 
1086  const Fw::StringBase& fileName
1087  ) const;
1088 
1093  const Fw::StringBase& fileName
1094  ) const;
1095 
1100  const Fw::StringBase& fileName
1101  ) const;
1102 
1107  const Fw::StringBase& fileName,
1109  I32 error
1110  ) const;
1111 
1116  const Fw::StringBase& fileName,
1117  U32 recordNumber,
1118  I32 error
1119  ) const;
1120 
1125  const Fw::StringBase& fileName,
1126  U32 size
1127  ) const;
1128 
1133  const Fw::StringBase& fileName
1134  ) const;
1135 
1140  const Fw::StringBase& fileName,
1141  U32 storedCRC,
1142  U32 computedCRC
1143  ) const;
1144 
1149  const Fw::StringBase& fileName,
1150  U32 recordNumber,
1151  FwOpcodeType opCode
1152  ) const;
1153 
1158  const Fw::StringBase& fileName
1159  ) const;
1160 
1165  const Fw::StringBase& fileName,
1166  U32 recordNumber,
1167  FwOpcodeType opCode,
1168  U32 errorStatus
1169  ) const;
1170 
1174  void log_WARNING_HI_CS_InvalidMode() const;
1175 
1180  const Fw::StringBase& fileName,
1181  U32 header_records,
1182  U32 extra_bytes
1183  ) const;
1184 
1189  const Fw::StringBase& fileName,
1190  U16 time_base,
1191  U16 seq_time_base
1192  ) const;
1193 
1198  const Fw::StringBase& fileName,
1199  U8 currTimeBase,
1200  U8 seqTimeBase
1201  ) const;
1202 
1207  const Fw::StringBase& filename
1208  ) const;
1209 
1214  FwOpcodeType opcode
1215  ) const;
1216 
1222  ) const;
1223 
1228 
1233  const Fw::StringBase& filename
1234  ) const;
1235 
1240  const Fw::StringBase& filename,
1241  U32 command
1242  ) const;
1243 
1248  const Fw::StringBase& filename,
1249  U32 command
1250  ) const;
1251 
1256  const Fw::StringBase& filename
1257  ) const;
1258 
1263  const Fw::StringBase& filename,
1264  U32 recordNumber,
1265  FwOpcodeType opCode
1266  ) const;
1267 
1272 
1275  const Fw::StringBase& fileName
1276  ) const;
1277 
1278  protected:
1279 
1280  // ----------------------------------------------------------------------
1281  // Telemetry write functions
1282  // ----------------------------------------------------------------------
1283 
1288  U32 arg,
1289  Fw::Time _tlmTime = Fw::Time()
1290  ) const;
1291 
1296  U32 arg,
1297  Fw::Time _tlmTime = Fw::Time()
1298  ) const;
1299 
1303  void tlmWrite_CS_Errors(
1304  U32 arg,
1305  Fw::Time _tlmTime = Fw::Time()
1306  ) const;
1307 
1312  U32 arg,
1313  Fw::Time _tlmTime = Fw::Time()
1314  ) const;
1315 
1320  U32 arg,
1321  Fw::Time _tlmTime = Fw::Time()
1322  ) const;
1323 
1324  protected:
1325 
1326  // ----------------------------------------------------------------------
1327  // Time
1328  // ----------------------------------------------------------------------
1329 
1333  Fw::Time getTime() const;
1334 
1335  private:
1336 
1337  // ----------------------------------------------------------------------
1338  // Message dispatch functions
1339  // ----------------------------------------------------------------------
1340 
1342  virtual MsgDispatchStatus doDispatch();
1343 
1344  private:
1345 
1346  // ----------------------------------------------------------------------
1347  // Calls for messages received on special input ports
1348  // ----------------------------------------------------------------------
1349 
1351  static void m_p_cmdIn_in(
1352  Fw::PassiveComponentBase* callComp,
1353  FwIndexType portNum,
1354  FwOpcodeType opCode,
1355  U32 cmdSeq,
1356  Fw::CmdArgBuffer& args
1357  );
1358 
1359  private:
1360 
1361  // ----------------------------------------------------------------------
1362  // Calls for messages received on typed input ports
1363  // ----------------------------------------------------------------------
1364 
1366  static void m_p_cmdResponseIn_in(
1367  Fw::PassiveComponentBase* callComp,
1368  FwIndexType portNum,
1369  FwOpcodeType opCode,
1370  U32 cmdSeq,
1371  const Fw::CmdResponse& response
1372  );
1373 
1375  static void m_p_pingIn_in(
1376  Fw::PassiveComponentBase* callComp,
1377  FwIndexType portNum,
1378  U32 key
1379  );
1380 
1382  static void m_p_schedIn_in(
1383  Fw::PassiveComponentBase* callComp,
1384  FwIndexType portNum,
1385  U32 context
1386  );
1387 
1389  static void m_p_seqCancelIn_in(
1390  Fw::PassiveComponentBase* callComp,
1391  FwIndexType portNum
1392  );
1393 
1395  static void m_p_seqDispatchIn_in(
1396  Fw::PassiveComponentBase* callComp,
1397  FwIndexType portNum,
1398  Fw::StringBase& file_name
1399  );
1400 
1402  static void m_p_seqRunIn_in(
1403  Fw::PassiveComponentBase* callComp,
1404  FwIndexType portNum,
1405  const Fw::StringBase& filename
1406  );
1407 
1408  private:
1409 
1410  // ----------------------------------------------------------------------
1411  // Invocation functions for special output ports
1412  // ----------------------------------------------------------------------
1413 
1414 #if FW_ENABLE_TEXT_LOGGING
1415 
1417  void LogText_out(
1418  FwIndexType portNum,
1419  FwEventIdType id,
1420  Fw::Time& timeTag,
1421  const Fw::LogSeverity& severity,
1422  Fw::TextLogString& text
1423  ) const;
1424 
1425 #endif
1426 
1428  void cmdRegOut_out(
1429  FwIndexType portNum,
1430  FwOpcodeType opCode
1431  ) const;
1432 
1434  void cmdResponseOut_out(
1435  FwIndexType portNum,
1436  FwOpcodeType opCode,
1437  U32 cmdSeq,
1438  const Fw::CmdResponse& response
1439  ) const;
1440 
1442  void logOut_out(
1443  FwIndexType portNum,
1444  FwEventIdType id,
1445  Fw::Time& timeTag,
1446  const Fw::LogSeverity& severity,
1447  Fw::LogBuffer& args
1448  ) const;
1449 
1451  void timeCaller_out(
1452  FwIndexType portNum,
1453  Fw::Time& time
1454  ) const;
1455 
1457  void tlmOut_out(
1458  FwIndexType portNum,
1459  FwChanIdType id,
1460  Fw::Time& timeTag,
1461  Fw::TlmBuffer& val
1462  ) const;
1463 
1464 #if !FW_DIRECT_PORT_CALLS
1465 
1466  private:
1467 
1468  // ----------------------------------------------------------------------
1469  // Special input ports
1470  // ----------------------------------------------------------------------
1471 
1473  Fw::InputCmdPort m_cmdIn_InputPort[NUM_CMDIN_INPUT_PORTS];
1474 
1475 #endif
1476 
1477 #if !FW_DIRECT_PORT_CALLS
1478 
1479  private:
1480 
1481  // ----------------------------------------------------------------------
1482  // Typed input ports
1483  // ----------------------------------------------------------------------
1484 
1486  Fw::InputCmdResponsePort m_cmdResponseIn_InputPort[NUM_CMDRESPONSEIN_INPUT_PORTS];
1487 
1489  Svc::InputPingPort m_pingIn_InputPort[NUM_PINGIN_INPUT_PORTS];
1490 
1492  Svc::InputSchedPort m_schedIn_InputPort[NUM_SCHEDIN_INPUT_PORTS];
1493 
1496 
1498  Svc::InputFileDispatchPort m_seqDispatchIn_InputPort[NUM_SEQDISPATCHIN_INPUT_PORTS];
1499 
1501  Svc::InputCmdSeqInPort m_seqRunIn_InputPort[NUM_SEQRUNIN_INPUT_PORTS];
1502 
1503 #endif
1504 
1505 #if !FW_DIRECT_PORT_CALLS
1506 
1507  private:
1508 
1509  // ----------------------------------------------------------------------
1510  // Special output ports
1511  // ----------------------------------------------------------------------
1512 
1513 #if FW_ENABLE_TEXT_LOGGING == 1
1514 
1516  Fw::OutputLogTextPort m_LogText_OutputPort[NUM_LOGTEXT_OUTPUT_PORTS];
1517 
1518 #endif
1519 
1521  Fw::OutputCmdRegPort m_cmdRegOut_OutputPort[NUM_CMDREGOUT_OUTPUT_PORTS];
1522 
1524  Fw::OutputCmdResponsePort m_cmdResponseOut_OutputPort[NUM_CMDRESPONSEOUT_OUTPUT_PORTS];
1525 
1527  Fw::OutputLogPort m_logOut_OutputPort[NUM_LOGOUT_OUTPUT_PORTS];
1528 
1530  Fw::OutputTimePort m_timeCaller_OutputPort[NUM_TIMECALLER_OUTPUT_PORTS];
1531 
1533  Fw::OutputTlmPort m_tlmOut_OutputPort[NUM_TLMOUT_OUTPUT_PORTS];
1534 
1535 #endif
1536 
1537 #if !FW_DIRECT_PORT_CALLS
1538 
1539  private:
1540 
1541  // ----------------------------------------------------------------------
1542  // Typed output ports
1543  // ----------------------------------------------------------------------
1544 
1546  Fw::OutputComPort m_comCmdOut_OutputPort[NUM_COMCMDOUT_OUTPUT_PORTS];
1547 
1549  Svc::OutputPingPort m_pingOut_OutputPort[NUM_PINGOUT_OUTPUT_PORTS];
1550 
1553 
1555  Svc::OutputCmdSeqInPort m_seqStartOut_OutputPort[NUM_SEQSTARTOUT_OUTPUT_PORTS];
1556 
1557 #endif
1558 
1559  };
1560 
1561 }
1562 
1563 #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
static constexpr FwIndexType getNum_tlmOut_OutputPorts()
void set_tlmOut_OutputPort(FwIndexType portNum, Fw::InputTlmPort *port)
Connect port to tlmOut[portNum].
void log_WARNING_HI_CS_FileInvalid(const Fw::StringBase &fileName, Svc::CmdSequencer_FileReadStage stage, I32 error) const
void tlmWrite_CS_LoadCommands(U32 arg, Fw::Time _tlmTime=Fw::Time()) const
A sequence related command came with no active sequence.
static constexpr FwIndexType getNum_cmdResponseIn_InputPorts()
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
bool isConnected_cmdResponseOut_OutputPort(FwIndexType portNum) const
void log_ACTIVITY_HI_CS_ModeSwitched(Svc::CmdSequencer_SeqMode mode) const
void cmdResponseIn_handlerBase(FwIndexType portNum, FwOpcodeType opCode, U32 cmdSeq, const Fw::CmdResponse &response)
Handler base-class function for input port cmdResponseIn.
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.
virtual void schedIn_preMsgHook(FwIndexType portNum, U32 context)
Pre-message hook for async input port schedIn.
Wait for the current running sequence file complete.
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
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()
The Command Sequencer issued a command and received an error status in return.
static constexpr FwIndexType getNum_schedIn_InputPorts()
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.
void seqRunIn_handlerBase(FwIndexType portNum, const Fw::StringBase &filename)
Handler base-class function for input port seqRunIn.
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.
Wait for sequences that are running to finish. Allow user to run multiple seq files in SEQ_NO_BLOCK m...
void set_seqDone_OutputPort(FwIndexType portNum, Fw::InputCmdResponsePort *port)
Connect port to seqDone[portNum].
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.
A local port request to run a sequence was started.
void tlmWrite_CS_CommandsExecuted(U32 arg, Fw::Time _tlmTime=Fw::Time()) const
The Sequence File Loader could not read the sequence file.
static constexpr FwIndexType getNum_pingOut_OutputPorts()
virtual void seqRunIn_preMsgHook(FwIndexType portNum, const Fw::StringBase &filename)
Pre-message hook for async input port seqRunIn.
void log_ACTIVITY_HI_CS_PortSequenceStarted(const Fw::StringBase &filename) const
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
virtual void CS_RUN_cmdHandler(FwOpcodeType opCode, U32 cmdSeq, const Fw::CmdStringArg &fileName, Svc::CmdSequencer_BlockState block)=0
The running time base doesn&#39;t match the time base in the sequence files.
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
A command status came back when no sequence was running.
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 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
Perform one step in a command sequence. Valid only if CmdSequencer is in MANUAL run mode...
The running time base doesn&#39;t match the time base in the sequence files.
virtual void seqRunIn_handler(FwIndexType portNum, const Fw::StringBase &filename)=0
Handler for input port seqRunIn.
static constexpr FwIndexType getNum_cmdRegOut_OutputPorts()
The Command Sequencer received a command that was invalid for its current mode.
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:53
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
The Command Sequencer issued a command and received a success status in return.
void log_WARNING_HI_CS_FileCrcFailure(const Fw::StringBase &fileName, U32 storedCRC, U32 computedCRC) const
bool isConnected_timeCaller_OutputPort(FwIndexType portNum) const
A command in a sequence was stepped through.
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
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)
void seqStartOut_out(FwIndexType portNum, const Fw::StringBase &filename) const
Invoke output port seqStartOut.
void seqCancelIn_handlerBase(FwIndexType portNum)
Handler base-class function for input port seqCancelIn.
Auto-generated base for CmdSequencer component.
void CS_RUN_cmdHandlerBase(FwOpcodeType opCode, U32 cmdSeq, Fw::CmdArgBuffer &args)
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_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.
void seqDispatchIn_handlerBase(FwIndexType portNum, Fw::StringBase &file_name)
Handler base-class function for input port seqDispatchIn.
static constexpr FwIndexType getNum_pingIn_InputPorts()
Cannot run new sequence when current sequence file is still running.
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
Log event CS_NoRecords.
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
virtual void CS_JOIN_WAIT_preMsgHook(FwOpcodeType opCode, U32 cmdSeq)
Pre-message hook for command CS_JOIN_WAIT.
Number of records in header doesn&#39;t match number in file.