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 {
150  };
151 
152  public:
153 
154  // ----------------------------------------------------------------------
155  // Component initialization
156  // ----------------------------------------------------------------------
157 
159  void init(
160  FwSizeType queueDepth,
161  FwEnumStoreType instance = 0
162  );
163 
164 #if !FW_DIRECT_PORT_CALLS
165 
166  public:
167 
168  // ----------------------------------------------------------------------
169  // Getters for special input ports
170  // ----------------------------------------------------------------------
171 
176  FwIndexType portNum
177  );
178 
179 #endif
180 
181 #if !FW_DIRECT_PORT_CALLS
182 
183  public:
184 
185  // ----------------------------------------------------------------------
186  // Getters for typed input ports
187  // ----------------------------------------------------------------------
188 
193  FwIndexType portNum
194  );
195 
200  FwIndexType portNum
201  );
202 
207  FwIndexType portNum
208  );
209 
214  FwIndexType portNum
215  );
216 
221  FwIndexType portNum
222  );
223 
228  FwIndexType portNum
229  );
230 
231 #endif
232 
233 #if !FW_DIRECT_PORT_CALLS
234 
235  public:
236 
237  // ----------------------------------------------------------------------
238  // Connect input ports to special output ports
239  // ----------------------------------------------------------------------
240 
241 #if FW_ENABLE_TEXT_LOGGING == 1
242 
244  void set_LogText_OutputPort(
245  FwIndexType portNum,
246  Fw::InputLogTextPort* port
247  );
248 
249 #endif
250 
253  FwIndexType portNum,
254  Fw::InputCmdRegPort* port
255  );
256 
259  FwIndexType portNum,
261  );
262 
265  FwIndexType portNum,
266  Fw::InputLogPort* port
267  );
268 
271  FwIndexType portNum,
272  Fw::InputTimePort* port
273  );
274 
277  FwIndexType portNum,
278  Fw::InputTlmPort* port
279  );
280 
281 #endif
282 
283 #if !FW_DIRECT_PORT_CALLS
284 
285  public:
286 
287  // ----------------------------------------------------------------------
288  // Connect typed input ports to typed output ports
289  // ----------------------------------------------------------------------
290 
293  FwIndexType portNum,
294  Fw::InputComPort* port
295  );
296 
299  FwIndexType portNum,
300  Svc::InputPingPort* port
301  );
302 
305  FwIndexType portNum,
307  );
308 
311  FwIndexType portNum,
313  );
314 
315 #endif
316 
317 #if !FW_DIRECT_PORT_CALLS && FW_PORT_SERIALIZATION
318 
319  public:
320 
321  // ----------------------------------------------------------------------
322  // Connect serial input ports to special output ports
323  // ----------------------------------------------------------------------
324 
325 #if FW_ENABLE_TEXT_LOGGING == 1
326 
328  void set_LogText_OutputPort(
329  FwIndexType portNum,
330  Fw::InputSerializePort* port
331  );
332 
333 #endif
334 
337  FwIndexType portNum,
338  Fw::InputSerializePort* port
339  );
340 
343  FwIndexType portNum,
344  Fw::InputSerializePort* port
345  );
346 
349  FwIndexType portNum,
350  Fw::InputSerializePort* port
351  );
352 
355  FwIndexType portNum,
356  Fw::InputSerializePort* port
357  );
358 
361  FwIndexType portNum,
362  Fw::InputSerializePort* port
363  );
364 
365 #endif
366 
367 #if !FW_DIRECT_PORT_CALLS && FW_PORT_SERIALIZATION
368 
369  public:
370 
371  // ----------------------------------------------------------------------
372  // Connect serial input ports to typed output ports
373  // ----------------------------------------------------------------------
374 
377  FwIndexType portNum,
378  Fw::InputSerializePort* port
379  );
380 
383  FwIndexType portNum,
384  Fw::InputSerializePort* port
385  );
386 
389  FwIndexType portNum,
390  Fw::InputSerializePort* port
391  );
392 
395  FwIndexType portNum,
396  Fw::InputSerializePort* port
397  );
398 
399 #endif
400 
401  public:
402 
403  // ----------------------------------------------------------------------
404  // Command registration
405  // ----------------------------------------------------------------------
406 
410  void regCommands();
411 
412  protected:
413 
414  // ----------------------------------------------------------------------
415  // Component construction and destruction
416  // ----------------------------------------------------------------------
417 
420  const char* compName = ""
421  );
422 
424  virtual ~CmdSequencerComponentBase();
425 
426  protected:
427 
428  // ----------------------------------------------------------------------
429  // Getters for numbers of special input ports
430  // ----------------------------------------------------------------------
431 
436  return NUM_CMDIN_INPUT_PORTS;
437  }
438 
439  protected:
440 
441  // ----------------------------------------------------------------------
442  // Getters for numbers of typed input ports
443  // ----------------------------------------------------------------------
444 
450  }
451 
456  return NUM_PINGIN_INPUT_PORTS;
457  }
458 
464  }
465 
471  }
472 
478  }
479 
485  }
486 
487  protected:
488 
489  // ----------------------------------------------------------------------
490  // Getters for numbers of special output ports
491  // ----------------------------------------------------------------------
492 
493 #if FW_ENABLE_TEXT_LOGGING == 1
494 
498  static constexpr FwIndexType getNum_LogText_OutputPorts() {
500  }
501 
502 #endif
503 
509  }
510 
516  }
517 
523  }
524 
530  }
531 
537  }
538 
539  protected:
540 
541  // ----------------------------------------------------------------------
542  // Getters for numbers of typed output ports
543  // ----------------------------------------------------------------------
544 
550  }
551 
557  }
558 
564  }
565 
571  }
572 
573  protected:
574 
575  // ----------------------------------------------------------------------
576  // Connection status queries for special output ports
577  // ----------------------------------------------------------------------
578 
579 #if FW_ENABLE_TEXT_LOGGING == 1
580 
584  bool isConnected_LogText_OutputPort(
585  FwIndexType portNum
586  ) const;
587 
588 #endif
589 
594  FwIndexType portNum
595  ) const;
596 
601  FwIndexType portNum
602  ) const;
603 
608  FwIndexType portNum
609  ) const;
610 
615  FwIndexType portNum
616  ) const;
617 
622  FwIndexType portNum
623  ) const;
624 
625  protected:
626 
627  // ----------------------------------------------------------------------
628  // Connection status queries for typed output ports
629  // ----------------------------------------------------------------------
630 
635  FwIndexType portNum
636  ) const;
637 
642  FwIndexType portNum
643  ) const;
644 
649  FwIndexType portNum
650  ) const;
651 
656  FwIndexType portNum
657  ) const;
658 
659 #if FW_DIRECT_PORT_CALLS
660  public:
661 #else
662  protected:
663 #endif
664 
665  // ----------------------------------------------------------------------
666  // Port handler base-class functions for special input ports
667  //
668  // Call these functions directly to bypass the corresponding ports
669  // ----------------------------------------------------------------------
670 
672  void cmdIn_handlerBase(
673  FwIndexType portNum,
674  FwOpcodeType opCode,
675  U32 cmdSeq,
676  Fw::CmdArgBuffer& args
677  );
678 
679  protected:
680 
681  // ----------------------------------------------------------------------
682  // Handlers to implement for typed input ports
683  // ----------------------------------------------------------------------
684 
686  virtual void cmdResponseIn_handler(
687  FwIndexType portNum,
688  FwOpcodeType opCode,
689  U32 cmdSeq,
690  const Fw::CmdResponse& response
691  ) = 0;
692 
694  virtual void pingIn_handler(
695  FwIndexType portNum,
696  U32 key
697  ) = 0;
698 
700  virtual void schedIn_handler(
701  FwIndexType portNum,
702  U32 context
703  ) = 0;
704 
706  virtual void seqCancelIn_handler(
707  FwIndexType portNum
708  ) = 0;
709 
711  virtual void seqDispatchIn_handler(
712  FwIndexType portNum,
713  Fw::StringBase& file_name
714  ) = 0;
715 
717  virtual void seqRunIn_handler(
718  FwIndexType portNum,
719  const Fw::StringBase& filename,
720  const Svc::SeqArgs& args
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  const Svc::SeqArgs& args
771  );
772 
773  protected:
774 
775  // ----------------------------------------------------------------------
776  // Pre-message hooks for typed async input ports
777  //
778  // Each of these functions is invoked just before processing a message
779  // on the corresponding port. By default, they do nothing. You can
780  // override them to provide specific pre-message behavior.
781  // ----------------------------------------------------------------------
782 
784  virtual void cmdResponseIn_preMsgHook(
785  FwIndexType portNum,
786  FwOpcodeType opCode,
787  U32 cmdSeq,
788  const Fw::CmdResponse& response
789  );
790 
792  virtual void pingIn_preMsgHook(
793  FwIndexType portNum,
794  U32 key
795  );
796 
798  virtual void schedIn_preMsgHook(
799  FwIndexType portNum,
800  U32 context
801  );
802 
804  virtual void seqCancelIn_preMsgHook(
805  FwIndexType portNum
806  );
807 
809  virtual void seqDispatchIn_preMsgHook(
810  FwIndexType portNum,
811  Fw::StringBase& file_name
812  );
813 
815  virtual void seqRunIn_preMsgHook(
816  FwIndexType portNum,
817  const Fw::StringBase& filename,
818  const Svc::SeqArgs& args
819  );
820 
821  protected:
822 
823  // ----------------------------------------------------------------------
824  // Invocation functions for typed output ports
825  // ----------------------------------------------------------------------
826 
828  void comCmdOut_out(
829  FwIndexType portNum,
830  Fw::ComBuffer& data,
831  U32 context
832  ) const;
833 
835  void pingOut_out(
836  FwIndexType portNum,
837  U32 key
838  ) const;
839 
841  void seqDone_out(
842  FwIndexType portNum,
843  FwOpcodeType opCode,
844  U32 cmdSeq,
845  const Fw::CmdResponse& response
846  ) const;
847 
849  void seqStartOut_out(
850  FwIndexType portNum,
851  const Fw::StringBase& filename,
852  const Svc::SeqArgs& args
853  ) const;
854 
855  protected:
856 
857  // ----------------------------------------------------------------------
858  // Command response
859  // ----------------------------------------------------------------------
860 
862  void cmdResponse_out(
863  FwOpcodeType opCode,
864  U32 cmdSeq,
865  Fw::CmdResponse response
866  );
867 
868  protected:
869 
870  // ----------------------------------------------------------------------
871  // Command handlers to implement
872  // ----------------------------------------------------------------------
873 
877  virtual void CS_RUN_cmdHandler(
878  FwOpcodeType opCode,
879  U32 cmdSeq,
880  const Fw::CmdStringArg& fileName,
881  const Svc::BlockState& block
882  ) = 0;
883 
887  virtual void CS_VALIDATE_cmdHandler(
888  FwOpcodeType opCode,
889  U32 cmdSeq,
890  const Fw::CmdStringArg& fileName
891  ) = 0;
892 
896  virtual void CS_CANCEL_cmdHandler(
897  FwOpcodeType opCode,
898  U32 cmdSeq
899  ) = 0;
900 
904  virtual void CS_START_cmdHandler(
905  FwOpcodeType opCode,
906  U32 cmdSeq
907  ) = 0;
908 
912  virtual void CS_STEP_cmdHandler(
913  FwOpcodeType opCode,
914  U32 cmdSeq
915  ) = 0;
916 
920  virtual void CS_AUTO_cmdHandler(
921  FwOpcodeType opCode,
922  U32 cmdSeq
923  ) = 0;
924 
928  virtual void CS_MANUAL_cmdHandler(
929  FwOpcodeType opCode,
930  U32 cmdSeq
931  ) = 0;
932 
936  virtual void CS_JOIN_WAIT_cmdHandler(
937  FwOpcodeType opCode,
938  U32 cmdSeq
939  ) = 0;
940 
941  protected:
942 
943  // ----------------------------------------------------------------------
944  // Command handler base-class functions
945  //
946  // Call these functions directly to bypass the command input port
947  // ----------------------------------------------------------------------
948 
953  FwOpcodeType opCode,
954  U32 cmdSeq,
955  Fw::CmdArgBuffer& args
956  );
957 
962  FwOpcodeType opCode,
963  U32 cmdSeq,
964  Fw::CmdArgBuffer& args
965  );
966 
971  FwOpcodeType opCode,
972  U32 cmdSeq,
973  Fw::CmdArgBuffer& args
974  );
975 
980  FwOpcodeType opCode,
981  U32 cmdSeq,
982  Fw::CmdArgBuffer& args
983  );
984 
989  FwOpcodeType opCode,
990  U32 cmdSeq,
991  Fw::CmdArgBuffer& args
992  );
993 
998  FwOpcodeType opCode,
999  U32 cmdSeq,
1000  Fw::CmdArgBuffer& args
1001  );
1002 
1007  FwOpcodeType opCode,
1008  U32 cmdSeq,
1009  Fw::CmdArgBuffer& args
1010  );
1011 
1016  FwOpcodeType opCode,
1017  U32 cmdSeq,
1018  Fw::CmdArgBuffer& args
1019  );
1020 
1021  protected:
1022 
1023  // ----------------------------------------------------------------------
1024  // Pre-message hooks for async commands
1025  //
1026  // Each of these functions is invoked just before processing the
1027  // corresponding command. By default they do nothing. You can
1028  // override them to provide specific pre-command behavior.
1029  // ----------------------------------------------------------------------
1030 
1032  virtual void CS_RUN_preMsgHook(
1033  FwOpcodeType opCode,
1034  U32 cmdSeq
1035  );
1036 
1038  virtual void CS_VALIDATE_preMsgHook(
1039  FwOpcodeType opCode,
1040  U32 cmdSeq
1041  );
1042 
1044  virtual void CS_CANCEL_preMsgHook(
1045  FwOpcodeType opCode,
1046  U32 cmdSeq
1047  );
1048 
1050  virtual void CS_START_preMsgHook(
1051  FwOpcodeType opCode,
1052  U32 cmdSeq
1053  );
1054 
1056  virtual void CS_STEP_preMsgHook(
1057  FwOpcodeType opCode,
1058  U32 cmdSeq
1059  );
1060 
1062  virtual void CS_AUTO_preMsgHook(
1063  FwOpcodeType opCode,
1064  U32 cmdSeq
1065  );
1066 
1068  virtual void CS_MANUAL_preMsgHook(
1069  FwOpcodeType opCode,
1070  U32 cmdSeq
1071  );
1072 
1074  virtual void CS_JOIN_WAIT_preMsgHook(
1075  FwOpcodeType opCode,
1076  U32 cmdSeq
1077  );
1078 
1079  protected:
1080 
1081  // ----------------------------------------------------------------------
1082  // Event logging functions
1083  // ----------------------------------------------------------------------
1084 
1089  const Fw::StringBase& fileName
1090  ) const;
1091 
1096  const Fw::StringBase& fileName
1097  ) const;
1098 
1103  const Fw::StringBase& fileName
1104  ) const;
1105 
1110  const Fw::StringBase& fileName,
1111  const Svc::CmdSequencer_FileReadStage& stage,
1112  I32 error
1113  ) const;
1114 
1119  const Fw::StringBase& fileName,
1120  U32 recordNumber,
1121  I32 error
1122  ) const;
1123 
1128  const Fw::StringBase& fileName,
1129  U32 size
1130  ) const;
1131 
1136  const Fw::StringBase& fileName
1137  ) const;
1138 
1143  const Fw::StringBase& fileName,
1144  U32 storedCRC,
1145  U32 computedCRC
1146  ) const;
1147 
1152  const Fw::StringBase& fileName,
1153  U32 recordNumber,
1154  FwOpcodeType opCode
1155  ) const;
1156 
1161  const Fw::StringBase& fileName
1162  ) const;
1163 
1168  const Fw::StringBase& fileName,
1169  U32 recordNumber,
1170  FwOpcodeType opCode,
1171  U32 errorStatus
1172  ) const;
1173 
1177  void log_WARNING_HI_CS_InvalidMode() const;
1178 
1183  const Fw::StringBase& fileName,
1184  U32 header_records,
1185  U32 extra_bytes
1186  ) const;
1187 
1192  const Fw::StringBase& fileName,
1193  U16 time_base,
1194  U16 seq_time_base
1195  ) const;
1196 
1201  const Fw::StringBase& fileName,
1202  U8 currTimeBase,
1203  U8 seqTimeBase
1204  ) const;
1205 
1210  const Fw::StringBase& filename
1211  ) const;
1212 
1217  FwOpcodeType opcode
1218  ) const;
1219 
1224  const Svc::CmdSequencer_SeqMode& mode
1225  ) const;
1226 
1231 
1236  const Fw::StringBase& filename
1237  ) const;
1238 
1243  const Fw::StringBase& filename,
1244  U32 command
1245  ) const;
1246 
1251  const Fw::StringBase& filename,
1252  U32 command
1253  ) const;
1254 
1259  const Fw::StringBase& filename
1260  ) const;
1261 
1266  const Fw::StringBase& filename,
1267  U32 recordNumber,
1268  FwOpcodeType opCode
1269  ) const;
1270 
1275 
1278  const Fw::StringBase& fileName
1279  ) const;
1280 
1281  protected:
1282 
1283  // ----------------------------------------------------------------------
1284  // Telemetry serialized write
1285  // ----------------------------------------------------------------------
1286 
1291  void tlmWrite(
1292  FwChanIdType id,
1293  Fw::TlmBuffer& _tlmBuff,
1294  Fw::Time _tlmTime = Fw::Time()
1295  ) const;
1296 
1297  protected:
1298 
1299  // ----------------------------------------------------------------------
1300  // Telemetry write functions
1301  // ----------------------------------------------------------------------
1302 
1307  U32 arg,
1308  Fw::Time _tlmTime = Fw::Time()
1309  ) const;
1310 
1315  U32 arg,
1316  Fw::Time _tlmTime = Fw::Time()
1317  ) const;
1318 
1322  void tlmWrite_CS_Errors(
1323  U32 arg,
1324  Fw::Time _tlmTime = Fw::Time()
1325  ) const;
1326 
1331  U32 arg,
1332  Fw::Time _tlmTime = Fw::Time()
1333  ) const;
1334 
1339  U32 arg,
1340  Fw::Time _tlmTime = Fw::Time()
1341  ) const;
1342 
1347  const Fw::StringBase& arg,
1348  Fw::Time _tlmTime = Fw::Time()
1349  );
1350 
1351  protected:
1352 
1353  // ----------------------------------------------------------------------
1354  // Time
1355  // ----------------------------------------------------------------------
1356 
1360  Fw::Time getTime() const;
1361 
1362  private:
1363 
1364  // ----------------------------------------------------------------------
1365  // Message dispatch functions
1366  // ----------------------------------------------------------------------
1367 
1369  virtual MsgDispatchStatus doDispatch();
1370 
1371  private:
1372 
1373  // ----------------------------------------------------------------------
1374  // Calls for messages received on special input ports
1375  // ----------------------------------------------------------------------
1376 
1378  static void m_p_cmdIn_in(
1379  Fw::PassiveComponentBase* callComp,
1380  FwIndexType portNum,
1381  FwOpcodeType opCode,
1382  U32 cmdSeq,
1383  Fw::CmdArgBuffer& args
1384  );
1385 
1386  private:
1387 
1388  // ----------------------------------------------------------------------
1389  // Calls for messages received on typed input ports
1390  // ----------------------------------------------------------------------
1391 
1393  static void m_p_cmdResponseIn_in(
1394  Fw::PassiveComponentBase* callComp,
1395  FwIndexType portNum,
1396  FwOpcodeType opCode,
1397  U32 cmdSeq,
1398  const Fw::CmdResponse& response
1399  );
1400 
1402  static void m_p_pingIn_in(
1403  Fw::PassiveComponentBase* callComp,
1404  FwIndexType portNum,
1405  U32 key
1406  );
1407 
1409  static void m_p_schedIn_in(
1410  Fw::PassiveComponentBase* callComp,
1411  FwIndexType portNum,
1412  U32 context
1413  );
1414 
1416  static void m_p_seqCancelIn_in(
1417  Fw::PassiveComponentBase* callComp,
1418  FwIndexType portNum
1419  );
1420 
1422  static void m_p_seqDispatchIn_in(
1423  Fw::PassiveComponentBase* callComp,
1424  FwIndexType portNum,
1425  Fw::StringBase& file_name
1426  );
1427 
1429  static void m_p_seqRunIn_in(
1430  Fw::PassiveComponentBase* callComp,
1431  FwIndexType portNum,
1432  const Fw::StringBase& filename,
1433  const Svc::SeqArgs& args
1434  );
1435 
1436  private:
1437 
1438  // ----------------------------------------------------------------------
1439  // Invocation functions for special output ports
1440  // ----------------------------------------------------------------------
1441 
1442 #if FW_ENABLE_TEXT_LOGGING
1443 
1445  void LogText_out(
1446  FwIndexType portNum,
1447  FwEventIdType id,
1448  Fw::Time& timeTag,
1449  const Fw::LogSeverity& severity,
1450  Fw::TextLogString& text
1451  ) const;
1452 
1453 #endif
1454 
1456  void cmdRegOut_out(
1457  FwIndexType portNum,
1458  FwOpcodeType opCode
1459  ) const;
1460 
1462  void cmdResponseOut_out(
1463  FwIndexType portNum,
1464  FwOpcodeType opCode,
1465  U32 cmdSeq,
1466  const Fw::CmdResponse& response
1467  ) const;
1468 
1470  void logOut_out(
1471  FwIndexType portNum,
1472  FwEventIdType id,
1473  Fw::Time& timeTag,
1474  const Fw::LogSeverity& severity,
1475  Fw::LogBuffer& args
1476  ) const;
1477 
1479  void timeCaller_out(
1480  FwIndexType portNum,
1481  Fw::Time& time
1482  ) const;
1483 
1485  void tlmOut_out(
1486  FwIndexType portNum,
1487  FwChanIdType id,
1488  Fw::Time& timeTag,
1489  Fw::TlmBuffer& val
1490  ) const;
1491 
1492 #if !FW_DIRECT_PORT_CALLS
1493 
1494  private:
1495 
1496  // ----------------------------------------------------------------------
1497  // Special input ports
1498  // ----------------------------------------------------------------------
1499 
1501  Fw::InputCmdPort m_cmdIn_InputPort[NUM_CMDIN_INPUT_PORTS];
1502 
1503 #endif
1504 
1505 #if !FW_DIRECT_PORT_CALLS
1506 
1507  private:
1508 
1509  // ----------------------------------------------------------------------
1510  // Typed input ports
1511  // ----------------------------------------------------------------------
1512 
1514  Fw::InputCmdResponsePort m_cmdResponseIn_InputPort[NUM_CMDRESPONSEIN_INPUT_PORTS];
1515 
1517  Svc::InputPingPort m_pingIn_InputPort[NUM_PINGIN_INPUT_PORTS];
1518 
1520  Svc::InputSchedPort m_schedIn_InputPort[NUM_SCHEDIN_INPUT_PORTS];
1521 
1524 
1526  Svc::InputFileDispatchPort m_seqDispatchIn_InputPort[NUM_SEQDISPATCHIN_INPUT_PORTS];
1527 
1529  Svc::InputCmdSeqInPort m_seqRunIn_InputPort[NUM_SEQRUNIN_INPUT_PORTS];
1530 
1531 #endif
1532 
1533 #if !FW_DIRECT_PORT_CALLS
1534 
1535  private:
1536 
1537  // ----------------------------------------------------------------------
1538  // Special output ports
1539  // ----------------------------------------------------------------------
1540 
1541 #if FW_ENABLE_TEXT_LOGGING == 1
1542 
1544  Fw::OutputLogTextPort m_LogText_OutputPort[NUM_LOGTEXT_OUTPUT_PORTS];
1545 
1546 #endif
1547 
1549  Fw::OutputCmdRegPort m_cmdRegOut_OutputPort[NUM_CMDREGOUT_OUTPUT_PORTS];
1550 
1552  Fw::OutputCmdResponsePort m_cmdResponseOut_OutputPort[NUM_CMDRESPONSEOUT_OUTPUT_PORTS];
1553 
1555  Fw::OutputLogPort m_logOut_OutputPort[NUM_LOGOUT_OUTPUT_PORTS];
1556 
1558  Fw::OutputTimePort m_timeCaller_OutputPort[NUM_TIMECALLER_OUTPUT_PORTS];
1559 
1561  Fw::OutputTlmPort m_tlmOut_OutputPort[NUM_TLMOUT_OUTPUT_PORTS];
1562 
1563 #endif
1564 
1565 #if !FW_DIRECT_PORT_CALLS
1566 
1567  private:
1568 
1569  // ----------------------------------------------------------------------
1570  // Typed output ports
1571  // ----------------------------------------------------------------------
1572 
1574  Fw::OutputComPort m_comCmdOut_OutputPort[NUM_COMCMDOUT_OUTPUT_PORTS];
1575 
1577  Svc::OutputPingPort m_pingOut_OutputPort[NUM_PINGOUT_OUTPUT_PORTS];
1578 
1581 
1583  Svc::OutputCmdSeqInPort m_seqStartOut_OutputPort[NUM_SEQSTARTOUT_OUTPUT_PORTS];
1584 
1585 #endif
1586 
1587  private:
1588 
1589  // ----------------------------------------------------------------------
1590  // First update flags for telemetry channels
1591  // ----------------------------------------------------------------------
1592 
1594  bool m_first_update_CS_CurrentSequence = true;
1595 
1596  private:
1597 
1598  // ----------------------------------------------------------------------
1599  // Last value storage for telemetry channels
1600  // ----------------------------------------------------------------------
1601 
1603  Fw::TlmString m_last_CS_CurrentSequence = {};
1604 
1605  };
1606 
1607 }
1608 
1609 #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
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.
Wait for the current running sequence file complete.
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.
A sequence related command came with no active sequence.
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()
static constexpr FwIndexType getNum_schedIn_InputPorts()
void tlmWrite_CS_CurrentSequence(const Fw::StringBase &arg, Fw::Time _tlmTime=Fw::Time())
The Command Sequencer issued a command and received a success status in return.
void log_ACTIVITY_HI_CS_CmdStarted(const Fw::StringBase &filename) const
A command status came back when no sequence was running.
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)
The Command Sequencer issued a command and received an error status in return.
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
A command in a sequence was stepped through.
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.
The running time base doesn&#39;t match the time base in the sequence files.
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.
The Sequence File Loader could not read the sequence file.
static constexpr FwIndexType getNum_cmdRegOut_OutputPorts()
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.
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
void log_WARNING_HI_CS_FileCrcFailure(const Fw::StringBase &fileName, U32 storedCRC, U32 computedCRC) const
Wait for sequences that are running to finish. Allow user to run multiple seq files in SEQ_NO_BLOCK m...
bool isConnected_timeCaller_OutputPort(FwIndexType portNum) const
The running time base doesn&#39;t match the time base in the sequence files.
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 Command Sequencer received a command that was invalid for its current mode.
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.
Cannot run new sequence when current sequence file is still running.
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.
Perform one step in a command sequence. Valid only if CmdSequencer is in MANUAL run mode...
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
A local port request to run a sequence was started.
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
Number of records in header doesn&#39;t match number in file.
virtual void CS_JOIN_WAIT_preMsgHook(FwOpcodeType opCode, U32 cmdSeq)
Pre-message hook for command CS_JOIN_WAIT.