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"
35 #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  const Svc::SeqArgs& args
722  ) = 0;
723 
724 #if FW_DIRECT_PORT_CALLS
725  public:
726 #else
727  protected:
728 #endif
729 
730  // ----------------------------------------------------------------------
731  // Port handler base-class functions for typed input ports
732  //
733  // Call these functions directly to bypass the corresponding ports
734  // ----------------------------------------------------------------------
735 
738  FwIndexType portNum,
739  FwOpcodeType opCode,
740  U32 cmdSeq,
741  const Fw::CmdResponse& response
742  );
743 
745  void pingIn_handlerBase(
746  FwIndexType portNum,
747  U32 key
748  );
749 
751  void schedIn_handlerBase(
752  FwIndexType portNum,
753  U32 context
754  );
755 
758  FwIndexType portNum
759  );
760 
763  FwIndexType portNum,
764  Fw::StringBase& file_name
765  );
766 
769  FwIndexType portNum,
770  const Fw::StringBase& filename,
771  const Svc::SeqArgs& args
772  );
773 
774  protected:
775 
776  // ----------------------------------------------------------------------
777  // Pre-message hooks for typed async input ports
778  //
779  // Each of these functions is invoked just before processing a message
780  // on the corresponding port. By default, they do nothing. You can
781  // override them to provide specific pre-message behavior.
782  // ----------------------------------------------------------------------
783 
785  virtual void cmdResponseIn_preMsgHook(
786  FwIndexType portNum,
787  FwOpcodeType opCode,
788  U32 cmdSeq,
789  const Fw::CmdResponse& response
790  );
791 
793  virtual void pingIn_preMsgHook(
794  FwIndexType portNum,
795  U32 key
796  );
797 
799  virtual void schedIn_preMsgHook(
800  FwIndexType portNum,
801  U32 context
802  );
803 
805  virtual void seqCancelIn_preMsgHook(
806  FwIndexType portNum
807  );
808 
810  virtual void seqDispatchIn_preMsgHook(
811  FwIndexType portNum,
812  Fw::StringBase& file_name
813  );
814 
816  virtual void seqRunIn_preMsgHook(
817  FwIndexType portNum,
818  const Fw::StringBase& filename,
819  const Svc::SeqArgs& args
820  );
821 
822  protected:
823 
824  // ----------------------------------------------------------------------
825  // Invocation functions for typed output ports
826  // ----------------------------------------------------------------------
827 
829  void comCmdOut_out(
830  FwIndexType portNum,
831  Fw::ComBuffer& data,
832  U32 context
833  ) const;
834 
836  void pingOut_out(
837  FwIndexType portNum,
838  U32 key
839  ) const;
840 
842  void seqDone_out(
843  FwIndexType portNum,
844  FwOpcodeType opCode,
845  U32 cmdSeq,
846  const Fw::CmdResponse& response
847  ) const;
848 
850  void seqStartOut_out(
851  FwIndexType portNum,
852  const Fw::StringBase& filename,
853  const Svc::SeqArgs& args
854  ) const;
855 
856  protected:
857 
858  // ----------------------------------------------------------------------
859  // Command response
860  // ----------------------------------------------------------------------
861 
863  void cmdResponse_out(
864  FwOpcodeType opCode,
865  U32 cmdSeq,
866  Fw::CmdResponse response
867  );
868 
869  protected:
870 
871  // ----------------------------------------------------------------------
872  // Command handlers to implement
873  // ----------------------------------------------------------------------
874 
878  virtual void CS_RUN_cmdHandler(
879  FwOpcodeType opCode,
880  U32 cmdSeq,
881  const Fw::CmdStringArg& fileName,
882  Svc::BlockState block
883  ) = 0;
884 
888  virtual void CS_VALIDATE_cmdHandler(
889  FwOpcodeType opCode,
890  U32 cmdSeq,
891  const Fw::CmdStringArg& fileName
892  ) = 0;
893 
897  virtual void CS_CANCEL_cmdHandler(
898  FwOpcodeType opCode,
899  U32 cmdSeq
900  ) = 0;
901 
905  virtual void CS_START_cmdHandler(
906  FwOpcodeType opCode,
907  U32 cmdSeq
908  ) = 0;
909 
913  virtual void CS_STEP_cmdHandler(
914  FwOpcodeType opCode,
915  U32 cmdSeq
916  ) = 0;
917 
921  virtual void CS_AUTO_cmdHandler(
922  FwOpcodeType opCode,
923  U32 cmdSeq
924  ) = 0;
925 
929  virtual void CS_MANUAL_cmdHandler(
930  FwOpcodeType opCode,
931  U32 cmdSeq
932  ) = 0;
933 
937  virtual void CS_JOIN_WAIT_cmdHandler(
938  FwOpcodeType opCode,
939  U32 cmdSeq
940  ) = 0;
941 
942  protected:
943 
944  // ----------------------------------------------------------------------
945  // Command handler base-class functions
946  //
947  // Call these functions directly to bypass the command input port
948  // ----------------------------------------------------------------------
949 
954  FwOpcodeType opCode,
955  U32 cmdSeq,
956  Fw::CmdArgBuffer& args
957  );
958 
963  FwOpcodeType opCode,
964  U32 cmdSeq,
965  Fw::CmdArgBuffer& args
966  );
967 
972  FwOpcodeType opCode,
973  U32 cmdSeq,
974  Fw::CmdArgBuffer& args
975  );
976 
981  FwOpcodeType opCode,
982  U32 cmdSeq,
983  Fw::CmdArgBuffer& args
984  );
985 
990  FwOpcodeType opCode,
991  U32 cmdSeq,
992  Fw::CmdArgBuffer& args
993  );
994 
999  FwOpcodeType opCode,
1000  U32 cmdSeq,
1001  Fw::CmdArgBuffer& args
1002  );
1003 
1008  FwOpcodeType opCode,
1009  U32 cmdSeq,
1010  Fw::CmdArgBuffer& args
1011  );
1012 
1017  FwOpcodeType opCode,
1018  U32 cmdSeq,
1019  Fw::CmdArgBuffer& args
1020  );
1021 
1022  protected:
1023 
1024  // ----------------------------------------------------------------------
1025  // Pre-message hooks for async commands
1026  //
1027  // Each of these functions is invoked just before processing the
1028  // corresponding command. By default they do nothing. You can
1029  // override them to provide specific pre-command behavior.
1030  // ----------------------------------------------------------------------
1031 
1033  virtual void CS_RUN_preMsgHook(
1034  FwOpcodeType opCode,
1035  U32 cmdSeq
1036  );
1037 
1039  virtual void CS_VALIDATE_preMsgHook(
1040  FwOpcodeType opCode,
1041  U32 cmdSeq
1042  );
1043 
1045  virtual void CS_CANCEL_preMsgHook(
1046  FwOpcodeType opCode,
1047  U32 cmdSeq
1048  );
1049 
1051  virtual void CS_START_preMsgHook(
1052  FwOpcodeType opCode,
1053  U32 cmdSeq
1054  );
1055 
1057  virtual void CS_STEP_preMsgHook(
1058  FwOpcodeType opCode,
1059  U32 cmdSeq
1060  );
1061 
1063  virtual void CS_AUTO_preMsgHook(
1064  FwOpcodeType opCode,
1065  U32 cmdSeq
1066  );
1067 
1069  virtual void CS_MANUAL_preMsgHook(
1070  FwOpcodeType opCode,
1071  U32 cmdSeq
1072  );
1073 
1075  virtual void CS_JOIN_WAIT_preMsgHook(
1076  FwOpcodeType opCode,
1077  U32 cmdSeq
1078  );
1079 
1080  protected:
1081 
1082  // ----------------------------------------------------------------------
1083  // Event logging functions
1084  // ----------------------------------------------------------------------
1085 
1090  const Fw::StringBase& fileName
1091  ) const;
1092 
1097  const Fw::StringBase& fileName
1098  ) const;
1099 
1104  const Fw::StringBase& fileName
1105  ) const;
1106 
1111  const Fw::StringBase& fileName,
1113  I32 error
1114  ) const;
1115 
1120  const Fw::StringBase& fileName,
1121  U32 recordNumber,
1122  I32 error
1123  ) const;
1124 
1129  const Fw::StringBase& fileName,
1130  U32 size
1131  ) const;
1132 
1137  const Fw::StringBase& fileName
1138  ) const;
1139 
1144  const Fw::StringBase& fileName,
1145  U32 storedCRC,
1146  U32 computedCRC
1147  ) const;
1148 
1153  const Fw::StringBase& fileName,
1154  U32 recordNumber,
1155  FwOpcodeType opCode
1156  ) const;
1157 
1162  const Fw::StringBase& fileName
1163  ) const;
1164 
1169  const Fw::StringBase& fileName,
1170  U32 recordNumber,
1171  FwOpcodeType opCode,
1172  U32 errorStatus
1173  ) const;
1174 
1178  void log_WARNING_HI_CS_InvalidMode() const;
1179 
1184  const Fw::StringBase& fileName,
1185  U32 header_records,
1186  U32 extra_bytes
1187  ) const;
1188 
1193  const Fw::StringBase& fileName,
1194  U16 time_base,
1195  U16 seq_time_base
1196  ) const;
1197 
1202  const Fw::StringBase& fileName,
1203  U8 currTimeBase,
1204  U8 seqTimeBase
1205  ) const;
1206 
1211  const Fw::StringBase& filename
1212  ) const;
1213 
1218  FwOpcodeType opcode
1219  ) const;
1220 
1226  ) const;
1227 
1232 
1237  const Fw::StringBase& filename
1238  ) const;
1239 
1244  const Fw::StringBase& filename,
1245  U32 command
1246  ) const;
1247 
1252  const Fw::StringBase& filename,
1253  U32 command
1254  ) const;
1255 
1260  const Fw::StringBase& filename
1261  ) const;
1262 
1267  const Fw::StringBase& filename,
1268  U32 recordNumber,
1269  FwOpcodeType opCode
1270  ) const;
1271 
1276 
1279  const Fw::StringBase& fileName
1280  ) const;
1281 
1282  protected:
1283 
1284  // ----------------------------------------------------------------------
1285  // Telemetry serialized write
1286  // ----------------------------------------------------------------------
1287 
1292  void tlmWrite(
1293  FwChanIdType id,
1294  Fw::TlmBuffer& _tlmBuff,
1295  Fw::Time _tlmTime = Fw::Time()
1296  ) const;
1297 
1298  protected:
1299 
1300  // ----------------------------------------------------------------------
1301  // Telemetry write functions
1302  // ----------------------------------------------------------------------
1303 
1308  U32 arg,
1309  Fw::Time _tlmTime = Fw::Time()
1310  ) const;
1311 
1316  U32 arg,
1317  Fw::Time _tlmTime = Fw::Time()
1318  ) const;
1319 
1323  void tlmWrite_CS_Errors(
1324  U32 arg,
1325  Fw::Time _tlmTime = Fw::Time()
1326  ) const;
1327 
1332  U32 arg,
1333  Fw::Time _tlmTime = Fw::Time()
1334  ) const;
1335 
1340  U32 arg,
1341  Fw::Time _tlmTime = Fw::Time()
1342  ) const;
1343 
1344  protected:
1345 
1346  // ----------------------------------------------------------------------
1347  // Time
1348  // ----------------------------------------------------------------------
1349 
1353  Fw::Time getTime() const;
1354 
1355  private:
1356 
1357  // ----------------------------------------------------------------------
1358  // Message dispatch functions
1359  // ----------------------------------------------------------------------
1360 
1362  virtual MsgDispatchStatus doDispatch();
1363 
1364  private:
1365 
1366  // ----------------------------------------------------------------------
1367  // Calls for messages received on special input ports
1368  // ----------------------------------------------------------------------
1369 
1371  static void m_p_cmdIn_in(
1372  Fw::PassiveComponentBase* callComp,
1373  FwIndexType portNum,
1374  FwOpcodeType opCode,
1375  U32 cmdSeq,
1376  Fw::CmdArgBuffer& args
1377  );
1378 
1379  private:
1380 
1381  // ----------------------------------------------------------------------
1382  // Calls for messages received on typed input ports
1383  // ----------------------------------------------------------------------
1384 
1386  static void m_p_cmdResponseIn_in(
1387  Fw::PassiveComponentBase* callComp,
1388  FwIndexType portNum,
1389  FwOpcodeType opCode,
1390  U32 cmdSeq,
1391  const Fw::CmdResponse& response
1392  );
1393 
1395  static void m_p_pingIn_in(
1396  Fw::PassiveComponentBase* callComp,
1397  FwIndexType portNum,
1398  U32 key
1399  );
1400 
1402  static void m_p_schedIn_in(
1403  Fw::PassiveComponentBase* callComp,
1404  FwIndexType portNum,
1405  U32 context
1406  );
1407 
1409  static void m_p_seqCancelIn_in(
1410  Fw::PassiveComponentBase* callComp,
1411  FwIndexType portNum
1412  );
1413 
1415  static void m_p_seqDispatchIn_in(
1416  Fw::PassiveComponentBase* callComp,
1417  FwIndexType portNum,
1418  Fw::StringBase& file_name
1419  );
1420 
1422  static void m_p_seqRunIn_in(
1423  Fw::PassiveComponentBase* callComp,
1424  FwIndexType portNum,
1425  const Fw::StringBase& filename,
1426  const Svc::SeqArgs& args
1427  );
1428 
1429  private:
1430 
1431  // ----------------------------------------------------------------------
1432  // Invocation functions for special output ports
1433  // ----------------------------------------------------------------------
1434 
1435 #if FW_ENABLE_TEXT_LOGGING
1436 
1438  void LogText_out(
1439  FwIndexType portNum,
1440  FwEventIdType id,
1441  Fw::Time& timeTag,
1442  const Fw::LogSeverity& severity,
1443  Fw::TextLogString& text
1444  ) const;
1445 
1446 #endif
1447 
1449  void cmdRegOut_out(
1450  FwIndexType portNum,
1451  FwOpcodeType opCode
1452  ) const;
1453 
1455  void cmdResponseOut_out(
1456  FwIndexType portNum,
1457  FwOpcodeType opCode,
1458  U32 cmdSeq,
1459  const Fw::CmdResponse& response
1460  ) const;
1461 
1463  void logOut_out(
1464  FwIndexType portNum,
1465  FwEventIdType id,
1466  Fw::Time& timeTag,
1467  const Fw::LogSeverity& severity,
1468  Fw::LogBuffer& args
1469  ) const;
1470 
1472  void timeCaller_out(
1473  FwIndexType portNum,
1474  Fw::Time& time
1475  ) const;
1476 
1478  void tlmOut_out(
1479  FwIndexType portNum,
1480  FwChanIdType id,
1481  Fw::Time& timeTag,
1482  Fw::TlmBuffer& val
1483  ) const;
1484 
1485 #if !FW_DIRECT_PORT_CALLS
1486 
1487  private:
1488 
1489  // ----------------------------------------------------------------------
1490  // Special input ports
1491  // ----------------------------------------------------------------------
1492 
1494  Fw::InputCmdPort m_cmdIn_InputPort[NUM_CMDIN_INPUT_PORTS];
1495 
1496 #endif
1497 
1498 #if !FW_DIRECT_PORT_CALLS
1499 
1500  private:
1501 
1502  // ----------------------------------------------------------------------
1503  // Typed input ports
1504  // ----------------------------------------------------------------------
1505 
1507  Fw::InputCmdResponsePort m_cmdResponseIn_InputPort[NUM_CMDRESPONSEIN_INPUT_PORTS];
1508 
1510  Svc::InputPingPort m_pingIn_InputPort[NUM_PINGIN_INPUT_PORTS];
1511 
1513  Svc::InputSchedPort m_schedIn_InputPort[NUM_SCHEDIN_INPUT_PORTS];
1514 
1517 
1519  Svc::InputFileDispatchPort m_seqDispatchIn_InputPort[NUM_SEQDISPATCHIN_INPUT_PORTS];
1520 
1522  Svc::InputCmdSeqInPort m_seqRunIn_InputPort[NUM_SEQRUNIN_INPUT_PORTS];
1523 
1524 #endif
1525 
1526 #if !FW_DIRECT_PORT_CALLS
1527 
1528  private:
1529 
1530  // ----------------------------------------------------------------------
1531  // Special output ports
1532  // ----------------------------------------------------------------------
1533 
1534 #if FW_ENABLE_TEXT_LOGGING == 1
1535 
1537  Fw::OutputLogTextPort m_LogText_OutputPort[NUM_LOGTEXT_OUTPUT_PORTS];
1538 
1539 #endif
1540 
1542  Fw::OutputCmdRegPort m_cmdRegOut_OutputPort[NUM_CMDREGOUT_OUTPUT_PORTS];
1543 
1545  Fw::OutputCmdResponsePort m_cmdResponseOut_OutputPort[NUM_CMDRESPONSEOUT_OUTPUT_PORTS];
1546 
1548  Fw::OutputLogPort m_logOut_OutputPort[NUM_LOGOUT_OUTPUT_PORTS];
1549 
1551  Fw::OutputTimePort m_timeCaller_OutputPort[NUM_TIMECALLER_OUTPUT_PORTS];
1552 
1554  Fw::OutputTlmPort m_tlmOut_OutputPort[NUM_TLMOUT_OUTPUT_PORTS];
1555 
1556 #endif
1557 
1558 #if !FW_DIRECT_PORT_CALLS
1559 
1560  private:
1561 
1562  // ----------------------------------------------------------------------
1563  // Typed output ports
1564  // ----------------------------------------------------------------------
1565 
1567  Fw::OutputComPort m_comCmdOut_OutputPort[NUM_COMCMDOUT_OUTPUT_PORTS];
1568 
1570  Svc::OutputPingPort m_pingOut_OutputPort[NUM_PINGOUT_OUTPUT_PORTS];
1571 
1574 
1576  Svc::OutputCmdSeqInPort m_seqStartOut_OutputPort[NUM_SEQSTARTOUT_OUTPUT_PORTS];
1577 
1578 #endif
1579 
1580  };
1581 
1582 }
1583 
1584 #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()
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
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)
virtual void CS_RUN_cmdHandler(FwOpcodeType opCode, U32 cmdSeq, const Fw::CmdStringArg &fileName, Svc::BlockState block)=0
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.
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()
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
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 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
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.
Sequencer blocking state.
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
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()
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.