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
26 #include "Fw/Time/TimePortAc.hpp"
27 #include "Fw/Tlm/TlmPortAc.hpp"
28 #include "Fw/Tlm/TlmString.hpp"
32 #include "Svc/Ping/PingPortAc.hpp"
38 
39 namespace Svc {
40 
47  {
48 
49  // ----------------------------------------------------------------------
50  // Friend classes
51  // ----------------------------------------------------------------------
52 
54  friend class CmdSequencerTesterBase;
56  friend class CmdSequencerTester;
57 
58  protected:
59 
60  // ----------------------------------------------------------------------
61  // Constants
62  // ----------------------------------------------------------------------
63 
65  enum {
67  };
68 
70  enum {
77  };
78 
80  enum {
87  };
88 
90  enum {
95  };
96 
98  enum {
99  OPCODE_CS_RUN = 0x0,
107  };
108 
110  enum {
137  };
138 
140  enum {
146  };
147 
148  public:
149 
150  // ----------------------------------------------------------------------
151  // Component initialization
152  // ----------------------------------------------------------------------
153 
155  void init(
156  FwSizeType queueDepth,
157  FwEnumStoreType instance = 0
158  );
159 
160  public:
161 
162  // ----------------------------------------------------------------------
163  // Getters for special input ports
164  // ----------------------------------------------------------------------
165 
170  FwIndexType portNum
171  );
172 
173  public:
174 
175  // ----------------------------------------------------------------------
176  // Getters for typed input ports
177  // ----------------------------------------------------------------------
178 
183  FwIndexType portNum
184  );
185 
190  FwIndexType portNum
191  );
192 
197  FwIndexType portNum
198  );
199 
204  FwIndexType portNum
205  );
206 
211  FwIndexType portNum
212  );
213 
218  FwIndexType portNum
219  );
220 
221  public:
222 
223  // ----------------------------------------------------------------------
224  // Connect input ports to special output ports
225  // ----------------------------------------------------------------------
226 
227 #if FW_ENABLE_TEXT_LOGGING == 1
228 
230  void set_LogText_OutputPort(
231  FwIndexType portNum,
232  Fw::InputLogTextPort* port
233  );
234 
235 #endif
236 
239  FwIndexType portNum,
240  Fw::InputCmdRegPort* port
241  );
242 
245  FwIndexType portNum,
247  );
248 
251  FwIndexType portNum,
252  Fw::InputLogPort* port
253  );
254 
257  FwIndexType portNum,
258  Fw::InputTimePort* port
259  );
260 
263  FwIndexType portNum,
264  Fw::InputTlmPort* port
265  );
266 
267  public:
268 
269  // ----------------------------------------------------------------------
270  // Connect typed input ports to typed output ports
271  // ----------------------------------------------------------------------
272 
275  FwIndexType portNum,
276  Fw::InputComPort* port
277  );
278 
281  FwIndexType portNum,
282  Svc::InputPingPort* port
283  );
284 
287  FwIndexType portNum,
289  );
290 
293  FwIndexType portNum,
295  );
296 
297 #if FW_PORT_SERIALIZATION
298 
299  public:
300 
301  // ----------------------------------------------------------------------
302  // Connect serial input ports to special output ports
303  // ----------------------------------------------------------------------
304 
305 #if FW_ENABLE_TEXT_LOGGING == 1
306 
308  void set_LogText_OutputPort(
309  FwIndexType portNum,
310  Fw::InputSerializePort* port
311  );
312 
313 #endif
314 
317  FwIndexType portNum,
318  Fw::InputSerializePort* port
319  );
320 
323  FwIndexType portNum,
324  Fw::InputSerializePort* port
325  );
326 
329  FwIndexType portNum,
330  Fw::InputSerializePort* port
331  );
332 
335  FwIndexType portNum,
336  Fw::InputSerializePort* port
337  );
338 
341  FwIndexType portNum,
342  Fw::InputSerializePort* port
343  );
344 
345 #endif
346 
347 #if FW_PORT_SERIALIZATION
348 
349  public:
350 
351  // ----------------------------------------------------------------------
352  // Connect serial input ports to typed output ports
353  // ----------------------------------------------------------------------
354 
357  FwIndexType portNum,
358  Fw::InputSerializePort* port
359  );
360 
363  FwIndexType portNum,
364  Fw::InputSerializePort* port
365  );
366 
369  FwIndexType portNum,
370  Fw::InputSerializePort* port
371  );
372 
375  FwIndexType portNum,
376  Fw::InputSerializePort* port
377  );
378 
379 #endif
380 
381  public:
382 
383  // ----------------------------------------------------------------------
384  // Command registration
385  // ----------------------------------------------------------------------
386 
390  void regCommands();
391 
392  protected:
393 
394  // ----------------------------------------------------------------------
395  // Component construction and destruction
396  // ----------------------------------------------------------------------
397 
400  const char* compName = ""
401  );
402 
404  virtual ~CmdSequencerComponentBase();
405 
406  protected:
407 
408  // ----------------------------------------------------------------------
409  // Getters for numbers of special input ports
410  // ----------------------------------------------------------------------
411 
416  return NUM_CMDIN_INPUT_PORTS;
417  }
418 
419  protected:
420 
421  // ----------------------------------------------------------------------
422  // Getters for numbers of typed input ports
423  // ----------------------------------------------------------------------
424 
430  }
431 
436  return NUM_PINGIN_INPUT_PORTS;
437  }
438 
444  }
445 
451  }
452 
458  }
459 
465  }
466 
467  protected:
468 
469  // ----------------------------------------------------------------------
470  // Getters for numbers of special output ports
471  // ----------------------------------------------------------------------
472 
473 #if FW_ENABLE_TEXT_LOGGING == 1
474 
478  static constexpr FwIndexType getNum_LogText_OutputPorts() {
480  }
481 
482 #endif
483 
489  }
490 
496  }
497 
503  }
504 
510  }
511 
517  }
518 
519  protected:
520 
521  // ----------------------------------------------------------------------
522  // Getters for numbers of typed output ports
523  // ----------------------------------------------------------------------
524 
530  }
531 
537  }
538 
544  }
545 
551  }
552 
553  protected:
554 
555  // ----------------------------------------------------------------------
556  // Connection status queries for special output ports
557  // ----------------------------------------------------------------------
558 
559 #if FW_ENABLE_TEXT_LOGGING == 1
560 
564  bool isConnected_LogText_OutputPort(
565  FwIndexType portNum
566  );
567 
568 #endif
569 
574  FwIndexType portNum
575  );
576 
581  FwIndexType portNum
582  );
583 
588  FwIndexType portNum
589  );
590 
595  FwIndexType portNum
596  );
597 
602  FwIndexType portNum
603  );
604 
605  protected:
606 
607  // ----------------------------------------------------------------------
608  // Connection status queries for typed output ports
609  // ----------------------------------------------------------------------
610 
615  FwIndexType portNum
616  );
617 
622  FwIndexType portNum
623  );
624 
629  FwIndexType portNum
630  );
631 
636  FwIndexType portNum
637  );
638 
639  protected:
640 
641  // ----------------------------------------------------------------------
642  // Handlers to implement for typed input ports
643  // ----------------------------------------------------------------------
644 
646  virtual void cmdResponseIn_handler(
647  FwIndexType portNum,
648  FwOpcodeType opCode,
649  U32 cmdSeq,
650  const Fw::CmdResponse& response
651  ) = 0;
652 
654  virtual void pingIn_handler(
655  FwIndexType portNum,
656  U32 key
657  ) = 0;
658 
660  virtual void schedIn_handler(
661  FwIndexType portNum,
662  U32 context
663  ) = 0;
664 
666  virtual void seqCancelIn_handler(
667  FwIndexType portNum
668  ) = 0;
669 
671  virtual void seqDispatchIn_handler(
672  FwIndexType portNum,
673  Fw::StringBase& file_name
674  ) = 0;
675 
677  virtual void seqRunIn_handler(
678  FwIndexType portNum,
679  const Fw::StringBase& filename
680  ) = 0;
681 
682  protected:
683 
684  // ----------------------------------------------------------------------
685  // Port handler base-class functions for typed input ports
686  //
687  // Call these functions directly to bypass the corresponding ports
688  // ----------------------------------------------------------------------
689 
692  FwIndexType portNum,
693  FwOpcodeType opCode,
694  U32 cmdSeq,
695  const Fw::CmdResponse& response
696  );
697 
699  void pingIn_handlerBase(
700  FwIndexType portNum,
701  U32 key
702  );
703 
705  void schedIn_handlerBase(
706  FwIndexType portNum,
707  U32 context
708  );
709 
712  FwIndexType portNum
713  );
714 
717  FwIndexType portNum,
718  Fw::StringBase& file_name
719  );
720 
723  FwIndexType portNum,
724  const Fw::StringBase& filename
725  );
726 
727  protected:
728 
729  // ----------------------------------------------------------------------
730  // Pre-message hooks for typed async input ports
731  //
732  // Each of these functions is invoked just before processing a message
733  // on the corresponding port. By default, they do nothing. You can
734  // override them to provide specific pre-message behavior.
735  // ----------------------------------------------------------------------
736 
738  virtual void cmdResponseIn_preMsgHook(
739  FwIndexType portNum,
740  FwOpcodeType opCode,
741  U32 cmdSeq,
742  const Fw::CmdResponse& response
743  );
744 
746  virtual void pingIn_preMsgHook(
747  FwIndexType portNum,
748  U32 key
749  );
750 
752  virtual void schedIn_preMsgHook(
753  FwIndexType portNum,
754  U32 context
755  );
756 
758  virtual void seqCancelIn_preMsgHook(
759  FwIndexType portNum
760  );
761 
763  virtual void seqDispatchIn_preMsgHook(
764  FwIndexType portNum,
765  Fw::StringBase& file_name
766  );
767 
769  virtual void seqRunIn_preMsgHook(
770  FwIndexType portNum,
771  const Fw::StringBase& filename
772  );
773 
774  protected:
775 
776  // ----------------------------------------------------------------------
777  // Invocation functions for typed output ports
778  // ----------------------------------------------------------------------
779 
781  void comCmdOut_out(
782  FwIndexType portNum,
783  Fw::ComBuffer& data,
784  U32 context
785  );
786 
788  void pingOut_out(
789  FwIndexType portNum,
790  U32 key
791  );
792 
794  void seqDone_out(
795  FwIndexType portNum,
796  FwOpcodeType opCode,
797  U32 cmdSeq,
798  const Fw::CmdResponse& response
799  );
800 
802  void seqStartOut_out(
803  FwIndexType portNum,
804  const Fw::StringBase& filename
805  );
806 
807  protected:
808 
809  // ----------------------------------------------------------------------
810  // Command response
811  // ----------------------------------------------------------------------
812 
814  void cmdResponse_out(
815  FwOpcodeType opCode,
816  U32 cmdSeq,
817  Fw::CmdResponse response
818  );
819 
820  protected:
821 
822  // ----------------------------------------------------------------------
823  // Command handlers to implement
824  // ----------------------------------------------------------------------
825 
829  virtual void CS_RUN_cmdHandler(
830  FwOpcodeType opCode,
831  U32 cmdSeq,
832  const Fw::CmdStringArg& fileName,
834  ) = 0;
835 
839  virtual void CS_VALIDATE_cmdHandler(
840  FwOpcodeType opCode,
841  U32 cmdSeq,
842  const Fw::CmdStringArg& fileName
843  ) = 0;
844 
848  virtual void CS_CANCEL_cmdHandler(
849  FwOpcodeType opCode,
850  U32 cmdSeq
851  ) = 0;
852 
856  virtual void CS_START_cmdHandler(
857  FwOpcodeType opCode,
858  U32 cmdSeq
859  ) = 0;
860 
864  virtual void CS_STEP_cmdHandler(
865  FwOpcodeType opCode,
866  U32 cmdSeq
867  ) = 0;
868 
872  virtual void CS_AUTO_cmdHandler(
873  FwOpcodeType opCode,
874  U32 cmdSeq
875  ) = 0;
876 
880  virtual void CS_MANUAL_cmdHandler(
881  FwOpcodeType opCode,
882  U32 cmdSeq
883  ) = 0;
884 
888  virtual void CS_JOIN_WAIT_cmdHandler(
889  FwOpcodeType opCode,
890  U32 cmdSeq
891  ) = 0;
892 
893  protected:
894 
895  // ----------------------------------------------------------------------
896  // Command handler base-class functions
897  //
898  // Call these functions directly to bypass the command input port
899  // ----------------------------------------------------------------------
900 
905  FwOpcodeType opCode,
906  U32 cmdSeq,
907  Fw::CmdArgBuffer& args
908  );
909 
914  FwOpcodeType opCode,
915  U32 cmdSeq,
916  Fw::CmdArgBuffer& args
917  );
918 
923  FwOpcodeType opCode,
924  U32 cmdSeq,
925  Fw::CmdArgBuffer& args
926  );
927 
932  FwOpcodeType opCode,
933  U32 cmdSeq,
934  Fw::CmdArgBuffer& args
935  );
936 
941  FwOpcodeType opCode,
942  U32 cmdSeq,
943  Fw::CmdArgBuffer& args
944  );
945 
950  FwOpcodeType opCode,
951  U32 cmdSeq,
952  Fw::CmdArgBuffer& args
953  );
954 
959  FwOpcodeType opCode,
960  U32 cmdSeq,
961  Fw::CmdArgBuffer& args
962  );
963 
968  FwOpcodeType opCode,
969  U32 cmdSeq,
970  Fw::CmdArgBuffer& args
971  );
972 
973  protected:
974 
975  // ----------------------------------------------------------------------
976  // Pre-message hooks for async commands
977  //
978  // Each of these functions is invoked just before processing the
979  // corresponding command. By default they do nothing. You can
980  // override them to provide specific pre-command behavior.
981  // ----------------------------------------------------------------------
982 
984  virtual void CS_RUN_preMsgHook(
985  FwOpcodeType opCode,
986  U32 cmdSeq
987  );
988 
990  virtual void CS_VALIDATE_preMsgHook(
991  FwOpcodeType opCode,
992  U32 cmdSeq
993  );
994 
996  virtual void CS_CANCEL_preMsgHook(
997  FwOpcodeType opCode,
998  U32 cmdSeq
999  );
1000 
1002  virtual void CS_START_preMsgHook(
1003  FwOpcodeType opCode,
1004  U32 cmdSeq
1005  );
1006 
1008  virtual void CS_STEP_preMsgHook(
1009  FwOpcodeType opCode,
1010  U32 cmdSeq
1011  );
1012 
1014  virtual void CS_AUTO_preMsgHook(
1015  FwOpcodeType opCode,
1016  U32 cmdSeq
1017  );
1018 
1020  virtual void CS_MANUAL_preMsgHook(
1021  FwOpcodeType opCode,
1022  U32 cmdSeq
1023  );
1024 
1026  virtual void CS_JOIN_WAIT_preMsgHook(
1027  FwOpcodeType opCode,
1028  U32 cmdSeq
1029  );
1030 
1031  protected:
1032 
1033  // ----------------------------------------------------------------------
1034  // Event logging functions
1035  // ----------------------------------------------------------------------
1036 
1041  const Fw::StringBase& fileName
1042  ) const;
1043 
1048  const Fw::StringBase& fileName
1049  ) const;
1050 
1055  const Fw::StringBase& fileName
1056  ) const;
1057 
1062  const Fw::StringBase& fileName,
1064  I32 error
1065  ) const;
1066 
1071  const Fw::StringBase& fileName,
1072  U32 recordNumber,
1073  I32 error
1074  ) const;
1075 
1080  const Fw::StringBase& fileName,
1081  U32 size
1082  ) const;
1083 
1088  const Fw::StringBase& fileName
1089  ) const;
1090 
1095  const Fw::StringBase& fileName,
1096  U32 storedCRC,
1097  U32 computedCRC
1098  ) const;
1099 
1104  const Fw::StringBase& fileName,
1105  U32 recordNumber,
1106  FwOpcodeType opCode
1107  ) const;
1108 
1113  const Fw::StringBase& fileName
1114  ) const;
1115 
1120  const Fw::StringBase& fileName,
1121  U32 recordNumber,
1122  FwOpcodeType opCode,
1123  U32 errorStatus
1124  ) const;
1125 
1129  void log_WARNING_HI_CS_InvalidMode() const;
1130 
1135  const Fw::StringBase& fileName,
1136  U32 header_records,
1137  U32 extra_bytes
1138  ) const;
1139 
1144  const Fw::StringBase& fileName,
1145  U16 time_base,
1146  U16 seq_time_base
1147  ) const;
1148 
1153  const Fw::StringBase& fileName,
1154  U8 currTimeBase,
1155  U8 seqTimeBase
1156  ) const;
1157 
1162  const Fw::StringBase& filename
1163  ) const;
1164 
1169  FwOpcodeType opcode
1170  ) const;
1171 
1177  ) const;
1178 
1183 
1188  const Fw::StringBase& filename
1189  ) const;
1190 
1195  const Fw::StringBase& filename,
1196  U32 command
1197  ) const;
1198 
1203  const Fw::StringBase& filename,
1204  U32 command
1205  ) const;
1206 
1211  const Fw::StringBase& filename
1212  ) const;
1213 
1218  const Fw::StringBase& filename,
1219  U32 recordNumber,
1220  FwOpcodeType opCode
1221  ) const;
1222 
1227 
1230  const Fw::StringBase& fileName
1231  ) const;
1232 
1233  protected:
1234 
1235  // ----------------------------------------------------------------------
1236  // Telemetry write functions
1237  // ----------------------------------------------------------------------
1238 
1243  U32 arg,
1244  Fw::Time _tlmTime = Fw::Time()
1245  ) const;
1246 
1251  U32 arg,
1252  Fw::Time _tlmTime = Fw::Time()
1253  ) const;
1254 
1258  void tlmWrite_CS_Errors(
1259  U32 arg,
1260  Fw::Time _tlmTime = Fw::Time()
1261  ) const;
1262 
1267  U32 arg,
1268  Fw::Time _tlmTime = Fw::Time()
1269  ) const;
1270 
1275  U32 arg,
1276  Fw::Time _tlmTime = Fw::Time()
1277  ) const;
1278 
1279  protected:
1280 
1281  // ----------------------------------------------------------------------
1282  // Time
1283  // ----------------------------------------------------------------------
1284 
1288  Fw::Time getTime() const;
1289 
1290  private:
1291 
1292  // ----------------------------------------------------------------------
1293  // Message dispatch functions
1294  // ----------------------------------------------------------------------
1295 
1297  virtual MsgDispatchStatus doDispatch();
1298 
1299  private:
1300 
1301  // ----------------------------------------------------------------------
1302  // Calls for messages received on special input ports
1303  // ----------------------------------------------------------------------
1304 
1306  static void m_p_cmdIn_in(
1307  Fw::PassiveComponentBase* callComp,
1308  FwIndexType portNum,
1309  FwOpcodeType opCode,
1310  U32 cmdSeq,
1311  Fw::CmdArgBuffer& args
1312  );
1313 
1314  private:
1315 
1316  // ----------------------------------------------------------------------
1317  // Calls for messages received on typed input ports
1318  // ----------------------------------------------------------------------
1319 
1321  static void m_p_cmdResponseIn_in(
1322  Fw::PassiveComponentBase* callComp,
1323  FwIndexType portNum,
1324  FwOpcodeType opCode,
1325  U32 cmdSeq,
1326  const Fw::CmdResponse& response
1327  );
1328 
1330  static void m_p_pingIn_in(
1331  Fw::PassiveComponentBase* callComp,
1332  FwIndexType portNum,
1333  U32 key
1334  );
1335 
1337  static void m_p_schedIn_in(
1338  Fw::PassiveComponentBase* callComp,
1339  FwIndexType portNum,
1340  U32 context
1341  );
1342 
1344  static void m_p_seqCancelIn_in(
1345  Fw::PassiveComponentBase* callComp,
1346  FwIndexType portNum
1347  );
1348 
1350  static void m_p_seqDispatchIn_in(
1351  Fw::PassiveComponentBase* callComp,
1352  FwIndexType portNum,
1353  Fw::StringBase& file_name
1354  );
1355 
1357  static void m_p_seqRunIn_in(
1358  Fw::PassiveComponentBase* callComp,
1359  FwIndexType portNum,
1360  const Fw::StringBase& filename
1361  );
1362 
1363  private:
1364 
1365  // ----------------------------------------------------------------------
1366  // Special input ports
1367  // ----------------------------------------------------------------------
1368 
1370  Fw::InputCmdPort m_cmdIn_InputPort[NUM_CMDIN_INPUT_PORTS];
1371 
1372  private:
1373 
1374  // ----------------------------------------------------------------------
1375  // Typed input ports
1376  // ----------------------------------------------------------------------
1377 
1379  Fw::InputCmdResponsePort m_cmdResponseIn_InputPort[NUM_CMDRESPONSEIN_INPUT_PORTS];
1380 
1382  Svc::InputPingPort m_pingIn_InputPort[NUM_PINGIN_INPUT_PORTS];
1383 
1385  Svc::InputSchedPort m_schedIn_InputPort[NUM_SCHEDIN_INPUT_PORTS];
1386 
1389 
1391  Svc::InputFileDispatchPort m_seqDispatchIn_InputPort[NUM_SEQDISPATCHIN_INPUT_PORTS];
1392 
1394  Svc::InputCmdSeqInPort m_seqRunIn_InputPort[NUM_SEQRUNIN_INPUT_PORTS];
1395 
1396  private:
1397 
1398  // ----------------------------------------------------------------------
1399  // Special output ports
1400  // ----------------------------------------------------------------------
1401 
1402 #if FW_ENABLE_TEXT_LOGGING == 1
1403 
1405  Fw::OutputLogTextPort m_LogText_OutputPort[NUM_LOGTEXT_OUTPUT_PORTS];
1406 
1407 #endif
1408 
1410  Fw::OutputCmdRegPort m_cmdRegOut_OutputPort[NUM_CMDREGOUT_OUTPUT_PORTS];
1411 
1413  Fw::OutputCmdResponsePort m_cmdResponseOut_OutputPort[NUM_CMDRESPONSEOUT_OUTPUT_PORTS];
1414 
1416  Fw::OutputLogPort m_logOut_OutputPort[NUM_LOGOUT_OUTPUT_PORTS];
1417 
1419  Fw::OutputTimePort m_timeCaller_OutputPort[NUM_TIMECALLER_OUTPUT_PORTS];
1420 
1422  Fw::OutputTlmPort m_tlmOut_OutputPort[NUM_TLMOUT_OUTPUT_PORTS];
1423 
1424  private:
1425 
1426  // ----------------------------------------------------------------------
1427  // Typed output ports
1428  // ----------------------------------------------------------------------
1429 
1431  Fw::OutputComPort m_comCmdOut_OutputPort[NUM_COMCMDOUT_OUTPUT_PORTS];
1432 
1434  Svc::OutputPingPort m_pingOut_OutputPort[NUM_PINGOUT_OUTPUT_PORTS];
1435 
1438 
1440  Svc::OutputCmdSeqInPort m_seqStartOut_OutputPort[NUM_SEQSTARTOUT_OUTPUT_PORTS];
1441 
1442  };
1443 
1444 }
1445 
1446 #endif
void set_timeCaller_OutputPort(FwIndexType portNum, Fw::InputTimePort *port)
Connect port to timeCaller[portNum].
The Command Sequencer received a command that was invalid for its current mode.
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
static constexpr FwIndexType getNum_cmdResponseIn_InputPorts()
Cannot run new sequence when current sequence file is still running.
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_ACTIVITY_HI_CS_ModeSwitched(Svc::CmdSequencer_SeqMode mode) const
bool isConnected_comCmdOut_OutputPort(FwIndexType portNum)
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
The Sequence File Loader could not read the sequence file.
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()
void pingOut_out(FwIndexType portNum, U32 key)
Invoke output port pingOut.
The Command Sequencer issued a command and received a success 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()
void comCmdOut_out(FwIndexType portNum, Fw::ComBuffer &data, U32 context)
Invoke output port comCmdOut.
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.
void seqDone_out(FwIndexType portNum, FwOpcodeType opCode, U32 cmdSeq, const Fw::CmdResponse &response)
Invoke output port seqDone.
Enum representing a command response.
void schedIn_handlerBase(FwIndexType portNum, U32 context)
Handler base-class function for input port schedIn.
void seqRunIn_handlerBase(FwIndexType portNum, const Fw::StringBase &filename)
Handler base-class function for input port seqRunIn.
void CS_START_cmdHandlerBase(FwOpcodeType opCode, U32 cmdSeq, Fw::CmdArgBuffer &args)
void log_WARNING_HI_CS_SequenceTimeout(const Fw::StringBase &filename, U32 command) const
virtual void CS_CANCEL_preMsgHook(FwOpcodeType opCode, U32 cmdSeq)
Pre-message hook for command CS_CANCEL.
bool isConnected_cmdResponseOut_OutputPort(FwIndexType portNum)
void init()
Object initializer.
Definition: ObjBase.cpp:24
void seqStartOut_out(FwIndexType portNum, const Fw::StringBase &filename)
Invoke output port seqStartOut.
void set_seqDone_OutputPort(FwIndexType portNum, Fw::InputCmdResponsePort *port)
Connect port to seqDone[portNum].
Wait for sequences that are running to finish. Allow user to run multiple seq files in SEQ_NO_BLOCK m...
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
virtual ~CmdSequencerComponentBase()
Destroy CmdSequencerComponentBase object.
void tlmWrite_CS_CommandsExecuted(U32 arg, Fw::Time _tlmTime=Fw::Time()) const
static constexpr FwIndexType getNum_pingOut_OutputPorts()
virtual void seqRunIn_preMsgHook(FwIndexType portNum, const Fw::StringBase &filename)
Pre-message hook for async input port seqRunIn.
void log_ACTIVITY_HI_CS_PortSequenceStarted(const Fw::StringBase &filename) const
void log_WARNING_HI_CS_RecordInvalid(const Fw::StringBase &fileName, U32 recordNumber, I32 error) const
void log_ACTIVITY_HI_CS_SequenceCanceled(const Fw::StringBase &fileName) const
virtual void CS_RUN_cmdHandler(FwOpcodeType opCode, U32 cmdSeq, const Fw::CmdStringArg &fileName, Svc::CmdSequencer_BlockState block)=0
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_pingOut_OutputPort(FwIndexType portNum)
A sequence related command came with no active sequence.
virtual void cmdResponseIn_preMsgHook(FwIndexType portNum, FwOpcodeType opCode, U32 cmdSeq, const Fw::CmdResponse &response)
Pre-message hook for async input port cmdResponseIn.
bool isConnected_seqStartOut_OutputPort(FwIndexType portNum)
A local port request to run a sequence was started.
void CS_JOIN_WAIT_cmdHandlerBase(FwOpcodeType opCode, U32 cmdSeq, Fw::CmdArgBuffer &args)
Svc::InputCmdSeqInPort * get_seqRunIn_InputPort(FwIndexType portNum)
void set_cmdResponseOut_OutputPort(FwIndexType portNum, Fw::InputCmdResponsePort *port)
Connect port to cmdResponseOut[portNum].
void set_cmdRegOut_OutputPort(FwIndexType portNum, Fw::InputCmdRegPort *port)
Connect port to cmdRegOut[portNum].
virtual void CS_START_cmdHandler(FwOpcodeType opCode, U32 cmdSeq)=0
virtual void seqRunIn_handler(FwIndexType portNum, const Fw::StringBase &filename)=0
Handler for input port seqRunIn.
static constexpr FwIndexType getNum_cmdRegOut_OutputPorts()
bool isConnected_timeCaller_OutputPort(FwIndexType portNum)
The Command Sequencer issued a command and received an error status in return.
void CS_AUTO_cmdHandlerBase(FwOpcodeType opCode, U32 cmdSeq, Fw::CmdArgBuffer &args)
Wait for the current running sequence file complete.
virtual void CS_START_preMsgHook(FwOpcodeType opCode, U32 cmdSeq)
Pre-message hook for command CS_START.
bool isConnected_seqDone_OutputPort(FwIndexType portNum)
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()
A command status came back when no sequence was running.
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
virtual void CS_MANUAL_preMsgHook(FwOpcodeType opCode, U32 cmdSeq)
Pre-message hook for command CS_MANUAL.
bool isConnected_cmdRegOut_OutputPort(FwIndexType portNum)
void CS_CANCEL_cmdHandlerBase(FwOpcodeType opCode, U32 cmdSeq, Fw::CmdArgBuffer &args)
Perform one step in a command sequence. Valid only if CmdSequencer is in MANUAL run mode...
void set_seqStartOut_OutputPort(FwIndexType portNum, Svc::InputCmdSeqInPort *port)
Connect port to seqStartOut[portNum].
void log_WARNING_HI_CS_TimeBaseMismatch(const Fw::StringBase &fileName, U16 time_base, U16 seq_time_base) const
virtual void CS_STEP_preMsgHook(FwOpcodeType opCode, U32 cmdSeq)
Pre-message hook for command CS_STEP.
PlatformIndexType FwIndexType
Fw::InputCmdPort * get_cmdIn_InputPort(FwIndexType portNum)
Number of records in header doesn&#39;t match number in file.
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)
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 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
The running time base doesn&#39;t match the time base in the sequence files.
A command in a sequence was stepped through.
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)
virtual void seqDispatchIn_preMsgHook(FwIndexType portNum, Fw::StringBase &file_name)
Pre-message hook for async input port seqDispatchIn.
void log_ACTIVITY_HI_CS_SequenceValid(const Fw::StringBase &filename) const
bool isConnected_logOut_OutputPort(FwIndexType portNum)
The running time base doesn&#39;t match the time base in the sequence files.
void log_WARNING_HI_CS_FileReadError(const Fw::StringBase &fileName) const
bool isConnected_tlmOut_OutputPort(FwIndexType portNum)
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.