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 {
140  };
141 
143  enum {
149  };
150 
151  public:
152 
153  // ----------------------------------------------------------------------
154  // Component initialization
155  // ----------------------------------------------------------------------
156 
158  void init(
159  FwSizeType queueDepth,
160  FwEnumStoreType instance = 0
161  );
162 
163 #if !FW_DIRECT_PORT_CALLS
164 
165  public:
166 
167  // ----------------------------------------------------------------------
168  // Getters for special input ports
169  // ----------------------------------------------------------------------
170 
175  FwIndexType portNum
176  );
177 
178 #endif
179 
180 #if !FW_DIRECT_PORT_CALLS
181 
182  public:
183 
184  // ----------------------------------------------------------------------
185  // Getters for typed input ports
186  // ----------------------------------------------------------------------
187 
192  FwIndexType portNum
193  );
194 
199  FwIndexType portNum
200  );
201 
206  FwIndexType portNum
207  );
208 
213  FwIndexType portNum
214  );
215 
220  FwIndexType portNum
221  );
222 
227  FwIndexType portNum
228  );
229 
230 #endif
231 
232 #if !FW_DIRECT_PORT_CALLS
233 
234  public:
235 
236  // ----------------------------------------------------------------------
237  // Connect input ports to special output ports
238  // ----------------------------------------------------------------------
239 
240 #if FW_ENABLE_TEXT_LOGGING == 1
241 
243  void set_LogText_OutputPort(
244  FwIndexType portNum,
245  Fw::InputLogTextPort* port
246  );
247 
248 #endif
249 
252  FwIndexType portNum,
253  Fw::InputCmdRegPort* port
254  );
255 
258  FwIndexType portNum,
260  );
261 
264  FwIndexType portNum,
265  Fw::InputLogPort* port
266  );
267 
270  FwIndexType portNum,
271  Fw::InputTimePort* port
272  );
273 
276  FwIndexType portNum,
277  Fw::InputTlmPort* port
278  );
279 
280 #endif
281 
282 #if !FW_DIRECT_PORT_CALLS
283 
284  public:
285 
286  // ----------------------------------------------------------------------
287  // Connect typed input ports to typed output ports
288  // ----------------------------------------------------------------------
289 
292  FwIndexType portNum,
293  Fw::InputComPort* port
294  );
295 
298  FwIndexType portNum,
299  Svc::InputPingPort* port
300  );
301 
304  FwIndexType portNum,
306  );
307 
310  FwIndexType portNum,
312  );
313 
314 #endif
315 
316 #if !FW_DIRECT_PORT_CALLS && FW_PORT_SERIALIZATION
317 
318  public:
319 
320  // ----------------------------------------------------------------------
321  // Connect serial input ports to special output ports
322  // ----------------------------------------------------------------------
323 
324 #if FW_ENABLE_TEXT_LOGGING == 1
325 
327  void set_LogText_OutputPort(
328  FwIndexType portNum,
329  Fw::InputSerializePort* port
330  );
331 
332 #endif
333 
336  FwIndexType portNum,
337  Fw::InputSerializePort* port
338  );
339 
342  FwIndexType portNum,
343  Fw::InputSerializePort* port
344  );
345 
348  FwIndexType portNum,
349  Fw::InputSerializePort* port
350  );
351 
354  FwIndexType portNum,
355  Fw::InputSerializePort* port
356  );
357 
360  FwIndexType portNum,
361  Fw::InputSerializePort* port
362  );
363 
364 #endif
365 
366 #if !FW_DIRECT_PORT_CALLS && FW_PORT_SERIALIZATION
367 
368  public:
369 
370  // ----------------------------------------------------------------------
371  // Connect serial input ports to typed output ports
372  // ----------------------------------------------------------------------
373 
376  FwIndexType portNum,
377  Fw::InputSerializePort* port
378  );
379 
382  FwIndexType portNum,
383  Fw::InputSerializePort* port
384  );
385 
388  FwIndexType portNum,
389  Fw::InputSerializePort* port
390  );
391 
394  FwIndexType portNum,
395  Fw::InputSerializePort* port
396  );
397 
398 #endif
399 
400  public:
401 
402  // ----------------------------------------------------------------------
403  // Command registration
404  // ----------------------------------------------------------------------
405 
409  void regCommands();
410 
411  protected:
412 
413  // ----------------------------------------------------------------------
414  // Component construction and destruction
415  // ----------------------------------------------------------------------
416 
419  const char* compName = ""
420  );
421 
423  virtual ~CmdSequencerComponentBase();
424 
425  protected:
426 
427  // ----------------------------------------------------------------------
428  // Getters for numbers of special input ports
429  // ----------------------------------------------------------------------
430 
435  return NUM_CMDIN_INPUT_PORTS;
436  }
437 
438  protected:
439 
440  // ----------------------------------------------------------------------
441  // Getters for numbers of typed input ports
442  // ----------------------------------------------------------------------
443 
449  }
450 
455  return NUM_PINGIN_INPUT_PORTS;
456  }
457 
463  }
464 
470  }
471 
477  }
478 
484  }
485 
486  protected:
487 
488  // ----------------------------------------------------------------------
489  // Getters for numbers of special output ports
490  // ----------------------------------------------------------------------
491 
492 #if FW_ENABLE_TEXT_LOGGING == 1
493 
497  static constexpr FwIndexType getNum_LogText_OutputPorts() {
499  }
500 
501 #endif
502 
508  }
509 
515  }
516 
522  }
523 
529  }
530 
536  }
537 
538  protected:
539 
540  // ----------------------------------------------------------------------
541  // Getters for numbers of typed output ports
542  // ----------------------------------------------------------------------
543 
549  }
550 
556  }
557 
563  }
564 
570  }
571 
572  protected:
573 
574  // ----------------------------------------------------------------------
575  // Connection status queries for special output ports
576  // ----------------------------------------------------------------------
577 
578 #if FW_ENABLE_TEXT_LOGGING == 1
579 
583  bool isConnected_LogText_OutputPort(
584  FwIndexType portNum
585  ) const;
586 
587 #endif
588 
593  FwIndexType portNum
594  ) const;
595 
600  FwIndexType portNum
601  ) const;
602 
607  FwIndexType portNum
608  ) const;
609 
614  FwIndexType portNum
615  ) const;
616 
621  FwIndexType portNum
622  ) const;
623 
624  protected:
625 
626  // ----------------------------------------------------------------------
627  // Connection status queries for typed output ports
628  // ----------------------------------------------------------------------
629 
634  FwIndexType portNum
635  ) const;
636 
641  FwIndexType portNum
642  ) const;
643 
648  FwIndexType portNum
649  ) const;
650 
655  FwIndexType portNum
656  ) const;
657 
658 #if FW_DIRECT_PORT_CALLS
659  public:
660 #else
661  protected:
662 #endif
663 
664  // ----------------------------------------------------------------------
665  // Port handler base-class functions for special input ports
666  //
667  // Call these functions directly to bypass the corresponding ports
668  // ----------------------------------------------------------------------
669 
671  void cmdIn_handlerBase(
672  FwIndexType portNum,
673  FwOpcodeType opCode,
674  U32 cmdSeq,
675  Fw::CmdArgBuffer& args
676  );
677 
678  protected:
679 
680  // ----------------------------------------------------------------------
681  // Handlers to implement for typed input ports
682  // ----------------------------------------------------------------------
683 
685  virtual void cmdResponseIn_handler(
686  FwIndexType portNum,
687  FwOpcodeType opCode,
688  U32 cmdSeq,
689  const Fw::CmdResponse& response
690  ) = 0;
691 
693  virtual void pingIn_handler(
694  FwIndexType portNum,
695  U32 key
696  ) = 0;
697 
699  virtual void schedIn_handler(
700  FwIndexType portNum,
701  U32 context
702  ) = 0;
703 
705  virtual void seqCancelIn_handler(
706  FwIndexType portNum
707  ) = 0;
708 
710  virtual void seqDispatchIn_handler(
711  FwIndexType portNum,
712  Fw::StringBase& file_name
713  ) = 0;
714 
716  virtual void seqRunIn_handler(
717  FwIndexType portNum,
718  const Fw::StringBase& filename,
719  const Svc::SeqArgs& args
720  ) = 0;
721 
722 #if FW_DIRECT_PORT_CALLS
723  public:
724 #else
725  protected:
726 #endif
727 
728  // ----------------------------------------------------------------------
729  // Port handler base-class functions for typed input ports
730  //
731  // Call these functions directly to bypass the corresponding ports
732  // ----------------------------------------------------------------------
733 
736  FwIndexType portNum,
737  FwOpcodeType opCode,
738  U32 cmdSeq,
739  const Fw::CmdResponse& response
740  );
741 
743  void pingIn_handlerBase(
744  FwIndexType portNum,
745  U32 key
746  );
747 
749  void schedIn_handlerBase(
750  FwIndexType portNum,
751  U32 context
752  );
753 
756  FwIndexType portNum
757  );
758 
761  FwIndexType portNum,
762  Fw::StringBase& file_name
763  );
764 
767  FwIndexType portNum,
768  const Fw::StringBase& filename,
769  const Svc::SeqArgs& args
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  const Svc::SeqArgs& args
818  );
819 
820  protected:
821 
822  // ----------------------------------------------------------------------
823  // Invocation functions for typed output ports
824  // ----------------------------------------------------------------------
825 
827  void comCmdOut_out(
828  FwIndexType portNum,
829  Fw::ComBuffer& data,
830  U32 context
831  ) const;
832 
834  void pingOut_out(
835  FwIndexType portNum,
836  U32 key
837  ) const;
838 
840  void seqDone_out(
841  FwIndexType portNum,
842  FwOpcodeType opCode,
843  U32 cmdSeq,
844  const Fw::CmdResponse& response
845  ) const;
846 
848  void seqStartOut_out(
849  FwIndexType portNum,
850  const Fw::StringBase& filename,
851  const Svc::SeqArgs& args
852  ) const;
853 
854  protected:
855 
856  // ----------------------------------------------------------------------
857  // Command response
858  // ----------------------------------------------------------------------
859 
861  void cmdResponse_out(
862  FwOpcodeType opCode,
863  U32 cmdSeq,
864  Fw::CmdResponse response
865  );
866 
867  protected:
868 
869  // ----------------------------------------------------------------------
870  // Command handlers to implement
871  // ----------------------------------------------------------------------
872 
876  virtual void CS_RUN_cmdHandler(
877  FwOpcodeType opCode,
878  U32 cmdSeq,
879  const Fw::CmdStringArg& fileName,
880  const Svc::BlockState& block
881  ) = 0;
882 
886  virtual void CS_VALIDATE_cmdHandler(
887  FwOpcodeType opCode,
888  U32 cmdSeq,
889  const Fw::CmdStringArg& fileName
890  ) = 0;
891 
895  virtual void CS_CANCEL_cmdHandler(
896  FwOpcodeType opCode,
897  U32 cmdSeq
898  ) = 0;
899 
903  virtual void CS_START_cmdHandler(
904  FwOpcodeType opCode,
905  U32 cmdSeq
906  ) = 0;
907 
911  virtual void CS_STEP_cmdHandler(
912  FwOpcodeType opCode,
913  U32 cmdSeq
914  ) = 0;
915 
919  virtual void CS_AUTO_cmdHandler(
920  FwOpcodeType opCode,
921  U32 cmdSeq
922  ) = 0;
923 
927  virtual void CS_MANUAL_cmdHandler(
928  FwOpcodeType opCode,
929  U32 cmdSeq
930  ) = 0;
931 
935  virtual void CS_JOIN_WAIT_cmdHandler(
936  FwOpcodeType opCode,
937  U32 cmdSeq
938  ) = 0;
939 
940  protected:
941 
942  // ----------------------------------------------------------------------
943  // Command handler base-class functions
944  //
945  // Call these functions directly to bypass the command input port
946  // ----------------------------------------------------------------------
947 
952  FwOpcodeType opCode,
953  U32 cmdSeq,
954  Fw::CmdArgBuffer& args
955  );
956 
961  FwOpcodeType opCode,
962  U32 cmdSeq,
963  Fw::CmdArgBuffer& args
964  );
965 
970  FwOpcodeType opCode,
971  U32 cmdSeq,
972  Fw::CmdArgBuffer& args
973  );
974 
979  FwOpcodeType opCode,
980  U32 cmdSeq,
981  Fw::CmdArgBuffer& args
982  );
983 
988  FwOpcodeType opCode,
989  U32 cmdSeq,
990  Fw::CmdArgBuffer& args
991  );
992 
997  FwOpcodeType opCode,
998  U32 cmdSeq,
999  Fw::CmdArgBuffer& args
1000  );
1001 
1006  FwOpcodeType opCode,
1007  U32 cmdSeq,
1008  Fw::CmdArgBuffer& args
1009  );
1010 
1015  FwOpcodeType opCode,
1016  U32 cmdSeq,
1017  Fw::CmdArgBuffer& args
1018  );
1019 
1020  protected:
1021 
1022  // ----------------------------------------------------------------------
1023  // Pre-message hooks for async commands
1024  //
1025  // Each of these functions is invoked just before processing the
1026  // corresponding command. By default they do nothing. You can
1027  // override them to provide specific pre-command behavior.
1028  // ----------------------------------------------------------------------
1029 
1031  virtual void CS_RUN_preMsgHook(
1032  FwOpcodeType opCode,
1033  U32 cmdSeq
1034  );
1035 
1037  virtual void CS_VALIDATE_preMsgHook(
1038  FwOpcodeType opCode,
1039  U32 cmdSeq
1040  );
1041 
1043  virtual void CS_CANCEL_preMsgHook(
1044  FwOpcodeType opCode,
1045  U32 cmdSeq
1046  );
1047 
1049  virtual void CS_START_preMsgHook(
1050  FwOpcodeType opCode,
1051  U32 cmdSeq
1052  );
1053 
1055  virtual void CS_STEP_preMsgHook(
1056  FwOpcodeType opCode,
1057  U32 cmdSeq
1058  );
1059 
1061  virtual void CS_AUTO_preMsgHook(
1062  FwOpcodeType opCode,
1063  U32 cmdSeq
1064  );
1065 
1067  virtual void CS_MANUAL_preMsgHook(
1068  FwOpcodeType opCode,
1069  U32 cmdSeq
1070  );
1071 
1073  virtual void CS_JOIN_WAIT_preMsgHook(
1074  FwOpcodeType opCode,
1075  U32 cmdSeq
1076  );
1077 
1078  protected:
1079 
1080  // ----------------------------------------------------------------------
1081  // Event logging functions
1082  // ----------------------------------------------------------------------
1083 
1088  const Fw::StringBase& fileName
1089  ) const;
1090 
1095  const Fw::StringBase& fileName
1096  ) const;
1097 
1102  const Fw::StringBase& fileName
1103  ) const;
1104 
1109  const Fw::StringBase& fileName,
1110  const Svc::CmdSequencer_FileReadStage& stage,
1111  I32 error
1112  ) const;
1113 
1118  const Fw::StringBase& fileName,
1119  U32 recordNumber,
1120  I32 error
1121  ) const;
1122 
1127  const Fw::StringBase& fileName,
1128  U32 size
1129  ) const;
1130 
1135  const Fw::StringBase& fileName
1136  ) const;
1137 
1142  const Fw::StringBase& fileName,
1143  U32 storedCRC,
1144  U32 computedCRC
1145  ) const;
1146 
1151  const Fw::StringBase& fileName,
1152  U32 recordNumber,
1153  FwOpcodeType opCode
1154  ) const;
1155 
1160  const Fw::StringBase& fileName
1161  ) const;
1162 
1167  const Fw::StringBase& fileName,
1168  U32 recordNumber,
1169  FwOpcodeType opCode,
1170  U32 errorStatus
1171  ) const;
1172 
1176  void log_WARNING_HI_CS_InvalidMode() const;
1177 
1182  const Fw::StringBase& fileName,
1183  U32 header_records,
1184  U32 extra_bytes
1185  ) const;
1186 
1191  const Fw::StringBase& fileName,
1192  U16 time_base,
1193  U16 seq_time_base
1194  ) const;
1195 
1200  const Fw::StringBase& fileName,
1201  U8 currTimeBase,
1202  U8 seqTimeBase
1203  ) const;
1204 
1209  const Fw::StringBase& filename
1210  ) const;
1211 
1216  FwOpcodeType opcode
1217  ) const;
1218 
1223  const Svc::CmdSequencer_SeqMode& mode
1224  ) const;
1225 
1230 
1235  const Fw::StringBase& filename
1236  ) const;
1237 
1242  const Fw::StringBase& filename,
1243  U32 command
1244  ) const;
1245 
1250  const Fw::StringBase& filename,
1251  U32 command
1252  ) const;
1253 
1258  const Fw::StringBase& filename
1259  ) const;
1260 
1265  const Fw::StringBase& filename,
1266  U32 recordNumber,
1267  FwOpcodeType opCode
1268  ) const;
1269 
1274 
1277  const Fw::StringBase& fileName
1278  ) const;
1279 
1280  protected:
1281 
1282  // ----------------------------------------------------------------------
1283  // Telemetry serialized write
1284  // ----------------------------------------------------------------------
1285 
1290  void tlmWrite(
1291  FwChanIdType id,
1292  Fw::TlmBuffer& _tlmBuff,
1293  Fw::Time _tlmTime = Fw::Time()
1294  ) const;
1295 
1296  protected:
1297 
1298  // ----------------------------------------------------------------------
1299  // Telemetry write functions
1300  // ----------------------------------------------------------------------
1301 
1306  U32 arg,
1307  Fw::Time _tlmTime = Fw::Time()
1308  ) const;
1309 
1314  U32 arg,
1315  Fw::Time _tlmTime = Fw::Time()
1316  ) const;
1317 
1321  void tlmWrite_CS_Errors(
1322  U32 arg,
1323  Fw::Time _tlmTime = Fw::Time()
1324  ) const;
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 
1342  protected:
1343 
1344  // ----------------------------------------------------------------------
1345  // Time
1346  // ----------------------------------------------------------------------
1347 
1351  Fw::Time getTime() const;
1352 
1353  private:
1354 
1355  // ----------------------------------------------------------------------
1356  // Message dispatch functions
1357  // ----------------------------------------------------------------------
1358 
1360  virtual MsgDispatchStatus doDispatch();
1361 
1362  private:
1363 
1364  // ----------------------------------------------------------------------
1365  // Calls for messages received on special input ports
1366  // ----------------------------------------------------------------------
1367 
1369  static void m_p_cmdIn_in(
1370  Fw::PassiveComponentBase* callComp,
1371  FwIndexType portNum,
1372  FwOpcodeType opCode,
1373  U32 cmdSeq,
1374  Fw::CmdArgBuffer& args
1375  );
1376 
1377  private:
1378 
1379  // ----------------------------------------------------------------------
1380  // Calls for messages received on typed input ports
1381  // ----------------------------------------------------------------------
1382 
1384  static void m_p_cmdResponseIn_in(
1385  Fw::PassiveComponentBase* callComp,
1386  FwIndexType portNum,
1387  FwOpcodeType opCode,
1388  U32 cmdSeq,
1389  const Fw::CmdResponse& response
1390  );
1391 
1393  static void m_p_pingIn_in(
1394  Fw::PassiveComponentBase* callComp,
1395  FwIndexType portNum,
1396  U32 key
1397  );
1398 
1400  static void m_p_schedIn_in(
1401  Fw::PassiveComponentBase* callComp,
1402  FwIndexType portNum,
1403  U32 context
1404  );
1405 
1407  static void m_p_seqCancelIn_in(
1408  Fw::PassiveComponentBase* callComp,
1409  FwIndexType portNum
1410  );
1411 
1413  static void m_p_seqDispatchIn_in(
1414  Fw::PassiveComponentBase* callComp,
1415  FwIndexType portNum,
1416  Fw::StringBase& file_name
1417  );
1418 
1420  static void m_p_seqRunIn_in(
1421  Fw::PassiveComponentBase* callComp,
1422  FwIndexType portNum,
1423  const Fw::StringBase& filename,
1424  const Svc::SeqArgs& args
1425  );
1426 
1427  private:
1428 
1429  // ----------------------------------------------------------------------
1430  // Invocation functions for special output ports
1431  // ----------------------------------------------------------------------
1432 
1433 #if FW_ENABLE_TEXT_LOGGING
1434 
1436  void LogText_out(
1437  FwIndexType portNum,
1438  FwEventIdType id,
1439  Fw::Time& timeTag,
1440  const Fw::LogSeverity& severity,
1441  Fw::TextLogString& text
1442  ) const;
1443 
1444 #endif
1445 
1447  void cmdRegOut_out(
1448  FwIndexType portNum,
1449  FwOpcodeType opCode
1450  ) const;
1451 
1453  void cmdResponseOut_out(
1454  FwIndexType portNum,
1455  FwOpcodeType opCode,
1456  U32 cmdSeq,
1457  const Fw::CmdResponse& response
1458  ) const;
1459 
1461  void logOut_out(
1462  FwIndexType portNum,
1463  FwEventIdType id,
1464  Fw::Time& timeTag,
1465  const Fw::LogSeverity& severity,
1466  Fw::LogBuffer& args
1467  ) const;
1468 
1470  void timeCaller_out(
1471  FwIndexType portNum,
1472  Fw::Time& time
1473  ) const;
1474 
1476  void tlmOut_out(
1477  FwIndexType portNum,
1478  FwChanIdType id,
1479  Fw::Time& timeTag,
1480  Fw::TlmBuffer& val
1481  ) const;
1482 
1483 #if !FW_DIRECT_PORT_CALLS
1484 
1485  private:
1486 
1487  // ----------------------------------------------------------------------
1488  // Special input ports
1489  // ----------------------------------------------------------------------
1490 
1492  Fw::InputCmdPort m_cmdIn_InputPort[NUM_CMDIN_INPUT_PORTS];
1493 
1494 #endif
1495 
1496 #if !FW_DIRECT_PORT_CALLS
1497 
1498  private:
1499 
1500  // ----------------------------------------------------------------------
1501  // Typed input ports
1502  // ----------------------------------------------------------------------
1503 
1505  Fw::InputCmdResponsePort m_cmdResponseIn_InputPort[NUM_CMDRESPONSEIN_INPUT_PORTS];
1506 
1508  Svc::InputPingPort m_pingIn_InputPort[NUM_PINGIN_INPUT_PORTS];
1509 
1511  Svc::InputSchedPort m_schedIn_InputPort[NUM_SCHEDIN_INPUT_PORTS];
1512 
1515 
1517  Svc::InputFileDispatchPort m_seqDispatchIn_InputPort[NUM_SEQDISPATCHIN_INPUT_PORTS];
1518 
1520  Svc::InputCmdSeqInPort m_seqRunIn_InputPort[NUM_SEQRUNIN_INPUT_PORTS];
1521 
1522 #endif
1523 
1524 #if !FW_DIRECT_PORT_CALLS
1525 
1526  private:
1527 
1528  // ----------------------------------------------------------------------
1529  // Special output ports
1530  // ----------------------------------------------------------------------
1531 
1532 #if FW_ENABLE_TEXT_LOGGING == 1
1533 
1535  Fw::OutputLogTextPort m_LogText_OutputPort[NUM_LOGTEXT_OUTPUT_PORTS];
1536 
1537 #endif
1538 
1540  Fw::OutputCmdRegPort m_cmdRegOut_OutputPort[NUM_CMDREGOUT_OUTPUT_PORTS];
1541 
1543  Fw::OutputCmdResponsePort m_cmdResponseOut_OutputPort[NUM_CMDRESPONSEOUT_OUTPUT_PORTS];
1544 
1546  Fw::OutputLogPort m_logOut_OutputPort[NUM_LOGOUT_OUTPUT_PORTS];
1547 
1549  Fw::OutputTimePort m_timeCaller_OutputPort[NUM_TIMECALLER_OUTPUT_PORTS];
1550 
1552  Fw::OutputTlmPort m_tlmOut_OutputPort[NUM_TLMOUT_OUTPUT_PORTS];
1553 
1554 #endif
1555 
1556 #if !FW_DIRECT_PORT_CALLS
1557 
1558  private:
1559 
1560  // ----------------------------------------------------------------------
1561  // Typed output ports
1562  // ----------------------------------------------------------------------
1563 
1565  Fw::OutputComPort m_comCmdOut_OutputPort[NUM_COMCMDOUT_OUTPUT_PORTS];
1566 
1568  Svc::OutputPingPort m_pingOut_OutputPort[NUM_PINGOUT_OUTPUT_PORTS];
1569 
1572 
1574  Svc::OutputCmdSeqInPort m_seqStartOut_OutputPort[NUM_SEQSTARTOUT_OUTPUT_PORTS];
1575 
1576 #endif
1577 
1578  };
1579 
1580 }
1581 
1582 #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 tlmWrite_CS_LoadCommands(U32 arg, Fw::Time _tlmTime=Fw::Time()) const
The Sequence File Loader could not read the sequence file.
static constexpr FwIndexType getNum_cmdResponseIn_InputPorts()
A local port request to run a sequence was started.
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
The Command Sequencer received a command that was invalid for its current mode.
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
A command status came back when no sequence was running.
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.
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()
A command in a sequence was stepped through.
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
The Command Sequencer issued a command and received an error status in return.
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].
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
static constexpr FwIndexType getNum_pingOut_OutputPorts()
void log_ACTIVITY_HI_CS_PortSequenceStarted(const Fw::StringBase &filename) const
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()
The running time base doesn&#39;t match the time base in the sequence files.
void log_ACTIVITY_HI_CS_ModeSwitched(const Svc::CmdSequencer_SeqMode &mode) const
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.
A sequence related command came with no active sequence.
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()
Perform one step in a command sequence. Valid only if CmdSequencer is in MANUAL run mode...
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
Number of records in header doesn&#39;t match number in file.
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
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)
Cannot run new sequence when current sequence file is still running.
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)
virtual void seqRunIn_preMsgHook(FwIndexType portNum, const Fw::StringBase &filename, const Svc::SeqArgs &args)
Pre-message hook for async input port seqRunIn.
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()
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
Wait for the current running sequence file complete.
Wait for sequences that are running to finish. Allow user to run multiple seq files in SEQ_NO_BLOCK m...
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
The Command Sequencer issued a command and received a success status in return.
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.