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"
37 
38 namespace Svc {
39 
46  {
47 
48  // ----------------------------------------------------------------------
49  // Friend classes
50  // ----------------------------------------------------------------------
51 
53  friend class CmdSequencerTesterBase;
55  friend class CmdSequencerTester;
56 
57  protected:
58 
59  // ----------------------------------------------------------------------
60  // Constants
61  // ----------------------------------------------------------------------
62 
64  enum {
66  };
67 
69  enum {
75  };
76 
78  enum {
85  };
86 
88  enum {
93  };
94 
96  enum {
97  OPCODE_CS_RUN = 0x0,
105  };
106 
108  enum {
135  };
136 
138  enum {
144  };
145 
146  public:
147 
148  // ----------------------------------------------------------------------
149  // Component initialization
150  // ----------------------------------------------------------------------
151 
153  void init(
154  FwSizeType queueDepth,
155  FwEnumStoreType instance = 0
156  );
157 
158  public:
159 
160  // ----------------------------------------------------------------------
161  // Getters for special input ports
162  // ----------------------------------------------------------------------
163 
168  FwIndexType portNum
169  );
170 
171  public:
172 
173  // ----------------------------------------------------------------------
174  // Getters for typed input ports
175  // ----------------------------------------------------------------------
176 
181  FwIndexType portNum
182  );
183 
188  FwIndexType portNum
189  );
190 
195  FwIndexType portNum
196  );
197 
202  FwIndexType portNum
203  );
204 
209  FwIndexType portNum
210  );
211 
212  public:
213 
214  // ----------------------------------------------------------------------
215  // Connect input ports to special output ports
216  // ----------------------------------------------------------------------
217 
218 #if FW_ENABLE_TEXT_LOGGING == 1
219 
221  void set_LogText_OutputPort(
222  FwIndexType portNum,
223  Fw::InputLogTextPort* port
224  );
225 
226 #endif
227 
230  FwIndexType portNum,
231  Fw::InputCmdRegPort* port
232  );
233 
236  FwIndexType portNum,
238  );
239 
242  FwIndexType portNum,
243  Fw::InputLogPort* port
244  );
245 
248  FwIndexType portNum,
249  Fw::InputTimePort* port
250  );
251 
254  FwIndexType portNum,
255  Fw::InputTlmPort* port
256  );
257 
258  public:
259 
260  // ----------------------------------------------------------------------
261  // Connect typed input ports to typed output ports
262  // ----------------------------------------------------------------------
263 
266  FwIndexType portNum,
267  Fw::InputComPort* port
268  );
269 
272  FwIndexType portNum,
273  Svc::InputPingPort* port
274  );
275 
278  FwIndexType portNum,
280  );
281 
284  FwIndexType portNum,
286  );
287 
288 #if FW_PORT_SERIALIZATION
289 
290  public:
291 
292  // ----------------------------------------------------------------------
293  // Connect serial input ports to special output ports
294  // ----------------------------------------------------------------------
295 
296 #if FW_ENABLE_TEXT_LOGGING == 1
297 
299  void set_LogText_OutputPort(
300  FwIndexType portNum,
301  Fw::InputSerializePort* port
302  );
303 
304 #endif
305 
308  FwIndexType portNum,
309  Fw::InputSerializePort* port
310  );
311 
314  FwIndexType portNum,
315  Fw::InputSerializePort* port
316  );
317 
320  FwIndexType portNum,
321  Fw::InputSerializePort* port
322  );
323 
326  FwIndexType portNum,
327  Fw::InputSerializePort* port
328  );
329 
332  FwIndexType portNum,
333  Fw::InputSerializePort* port
334  );
335 
336 #endif
337 
338 #if FW_PORT_SERIALIZATION
339 
340  public:
341 
342  // ----------------------------------------------------------------------
343  // Connect serial input ports to typed output ports
344  // ----------------------------------------------------------------------
345 
348  FwIndexType portNum,
349  Fw::InputSerializePort* port
350  );
351 
354  FwIndexType portNum,
355  Fw::InputSerializePort* port
356  );
357 
360  FwIndexType portNum,
361  Fw::InputSerializePort* port
362  );
363 
366  FwIndexType portNum,
367  Fw::InputSerializePort* port
368  );
369 
370 #endif
371 
372  public:
373 
374  // ----------------------------------------------------------------------
375  // Command registration
376  // ----------------------------------------------------------------------
377 
381  void regCommands();
382 
383  protected:
384 
385  // ----------------------------------------------------------------------
386  // Component construction and destruction
387  // ----------------------------------------------------------------------
388 
391  const char* compName = ""
392  );
393 
395  virtual ~CmdSequencerComponentBase();
396 
397  protected:
398 
399  // ----------------------------------------------------------------------
400  // Getters for numbers of special input ports
401  // ----------------------------------------------------------------------
402 
407  return NUM_CMDIN_INPUT_PORTS;
408  }
409 
410  protected:
411 
412  // ----------------------------------------------------------------------
413  // Getters for numbers of typed input ports
414  // ----------------------------------------------------------------------
415 
421  }
422 
427  return NUM_PINGIN_INPUT_PORTS;
428  }
429 
435  }
436 
442  }
443 
449  }
450 
451  protected:
452 
453  // ----------------------------------------------------------------------
454  // Getters for numbers of special output ports
455  // ----------------------------------------------------------------------
456 
457 #if FW_ENABLE_TEXT_LOGGING == 1
458 
462  static constexpr FwIndexType getNum_LogText_OutputPorts() {
464  }
465 
466 #endif
467 
473  }
474 
480  }
481 
487  }
488 
494  }
495 
501  }
502 
503  protected:
504 
505  // ----------------------------------------------------------------------
506  // Getters for numbers of typed output ports
507  // ----------------------------------------------------------------------
508 
514  }
515 
521  }
522 
528  }
529 
535  }
536 
537  protected:
538 
539  // ----------------------------------------------------------------------
540  // Connection status queries for special output ports
541  // ----------------------------------------------------------------------
542 
543 #if FW_ENABLE_TEXT_LOGGING == 1
544 
548  bool isConnected_LogText_OutputPort(
549  FwIndexType portNum
550  );
551 
552 #endif
553 
558  FwIndexType portNum
559  );
560 
565  FwIndexType portNum
566  );
567 
572  FwIndexType portNum
573  );
574 
579  FwIndexType portNum
580  );
581 
586  FwIndexType portNum
587  );
588 
589  protected:
590 
591  // ----------------------------------------------------------------------
592  // Connection status queries for typed output ports
593  // ----------------------------------------------------------------------
594 
599  FwIndexType portNum
600  );
601 
606  FwIndexType portNum
607  );
608 
613  FwIndexType portNum
614  );
615 
620  FwIndexType portNum
621  );
622 
623  protected:
624 
625  // ----------------------------------------------------------------------
626  // Handlers to implement for typed input ports
627  // ----------------------------------------------------------------------
628 
630  virtual void cmdResponseIn_handler(
631  FwIndexType portNum,
632  FwOpcodeType opCode,
633  U32 cmdSeq,
634  const Fw::CmdResponse& response
635  ) = 0;
636 
638  virtual void pingIn_handler(
639  FwIndexType portNum,
640  U32 key
641  ) = 0;
642 
644  virtual void schedIn_handler(
645  FwIndexType portNum,
646  U32 context
647  ) = 0;
648 
650  virtual void seqCancelIn_handler(
651  FwIndexType portNum
652  ) = 0;
653 
655  virtual void seqRunIn_handler(
656  FwIndexType portNum,
657  const Fw::StringBase& filename
658  ) = 0;
659 
660  protected:
661 
662  // ----------------------------------------------------------------------
663  // Port handler base-class functions for typed input ports
664  //
665  // Call these functions directly to bypass the corresponding ports
666  // ----------------------------------------------------------------------
667 
670  FwIndexType portNum,
671  FwOpcodeType opCode,
672  U32 cmdSeq,
673  const Fw::CmdResponse& response
674  );
675 
677  void pingIn_handlerBase(
678  FwIndexType portNum,
679  U32 key
680  );
681 
683  void schedIn_handlerBase(
684  FwIndexType portNum,
685  U32 context
686  );
687 
690  FwIndexType portNum
691  );
692 
695  FwIndexType portNum,
696  const Fw::StringBase& filename
697  );
698 
699  protected:
700 
701  // ----------------------------------------------------------------------
702  // Pre-message hooks for typed async input ports
703  //
704  // Each of these functions is invoked just before processing a message
705  // on the corresponding port. By default, they do nothing. You can
706  // override them to provide specific pre-message behavior.
707  // ----------------------------------------------------------------------
708 
710  virtual void cmdResponseIn_preMsgHook(
711  FwIndexType portNum,
712  FwOpcodeType opCode,
713  U32 cmdSeq,
714  const Fw::CmdResponse& response
715  );
716 
718  virtual void pingIn_preMsgHook(
719  FwIndexType portNum,
720  U32 key
721  );
722 
724  virtual void schedIn_preMsgHook(
725  FwIndexType portNum,
726  U32 context
727  );
728 
730  virtual void seqCancelIn_preMsgHook(
731  FwIndexType portNum
732  );
733 
735  virtual void seqRunIn_preMsgHook(
736  FwIndexType portNum,
737  const Fw::StringBase& filename
738  );
739 
740  protected:
741 
742  // ----------------------------------------------------------------------
743  // Invocation functions for typed output ports
744  // ----------------------------------------------------------------------
745 
747  void comCmdOut_out(
748  FwIndexType portNum,
749  Fw::ComBuffer& data,
750  U32 context
751  );
752 
754  void pingOut_out(
755  FwIndexType portNum,
756  U32 key
757  );
758 
760  void seqDone_out(
761  FwIndexType portNum,
762  FwOpcodeType opCode,
763  U32 cmdSeq,
764  const Fw::CmdResponse& response
765  );
766 
768  void seqStartOut_out(
769  FwIndexType portNum,
770  const Fw::StringBase& filename
771  );
772 
773  protected:
774 
775  // ----------------------------------------------------------------------
776  // Command response
777  // ----------------------------------------------------------------------
778 
780  void cmdResponse_out(
781  FwOpcodeType opCode,
782  U32 cmdSeq,
783  Fw::CmdResponse response
784  );
785 
786  protected:
787 
788  // ----------------------------------------------------------------------
789  // Command handlers to implement
790  // ----------------------------------------------------------------------
791 
795  virtual void CS_RUN_cmdHandler(
796  FwOpcodeType opCode,
797  U32 cmdSeq,
798  const Fw::CmdStringArg& fileName,
800  ) = 0;
801 
805  virtual void CS_VALIDATE_cmdHandler(
806  FwOpcodeType opCode,
807  U32 cmdSeq,
808  const Fw::CmdStringArg& fileName
809  ) = 0;
810 
814  virtual void CS_CANCEL_cmdHandler(
815  FwOpcodeType opCode,
816  U32 cmdSeq
817  ) = 0;
818 
822  virtual void CS_START_cmdHandler(
823  FwOpcodeType opCode,
824  U32 cmdSeq
825  ) = 0;
826 
830  virtual void CS_STEP_cmdHandler(
831  FwOpcodeType opCode,
832  U32 cmdSeq
833  ) = 0;
834 
838  virtual void CS_AUTO_cmdHandler(
839  FwOpcodeType opCode,
840  U32 cmdSeq
841  ) = 0;
842 
846  virtual void CS_MANUAL_cmdHandler(
847  FwOpcodeType opCode,
848  U32 cmdSeq
849  ) = 0;
850 
854  virtual void CS_JOIN_WAIT_cmdHandler(
855  FwOpcodeType opCode,
856  U32 cmdSeq
857  ) = 0;
858 
859  protected:
860 
861  // ----------------------------------------------------------------------
862  // Command handler base-class functions
863  //
864  // Call these functions directly to bypass the command input port
865  // ----------------------------------------------------------------------
866 
871  FwOpcodeType opCode,
872  U32 cmdSeq,
873  Fw::CmdArgBuffer& args
874  );
875 
880  FwOpcodeType opCode,
881  U32 cmdSeq,
882  Fw::CmdArgBuffer& args
883  );
884 
889  FwOpcodeType opCode,
890  U32 cmdSeq,
891  Fw::CmdArgBuffer& args
892  );
893 
898  FwOpcodeType opCode,
899  U32 cmdSeq,
900  Fw::CmdArgBuffer& args
901  );
902 
907  FwOpcodeType opCode,
908  U32 cmdSeq,
909  Fw::CmdArgBuffer& args
910  );
911 
916  FwOpcodeType opCode,
917  U32 cmdSeq,
918  Fw::CmdArgBuffer& args
919  );
920 
925  FwOpcodeType opCode,
926  U32 cmdSeq,
927  Fw::CmdArgBuffer& args
928  );
929 
934  FwOpcodeType opCode,
935  U32 cmdSeq,
936  Fw::CmdArgBuffer& args
937  );
938 
939  protected:
940 
941  // ----------------------------------------------------------------------
942  // Pre-message hooks for async commands
943  //
944  // Each of these functions is invoked just before processing the
945  // corresponding command. By default they do nothing. You can
946  // override them to provide specific pre-command behavior.
947  // ----------------------------------------------------------------------
948 
950  virtual void CS_RUN_preMsgHook(
951  FwOpcodeType opCode,
952  U32 cmdSeq
953  );
954 
956  virtual void CS_VALIDATE_preMsgHook(
957  FwOpcodeType opCode,
958  U32 cmdSeq
959  );
960 
962  virtual void CS_CANCEL_preMsgHook(
963  FwOpcodeType opCode,
964  U32 cmdSeq
965  );
966 
968  virtual void CS_START_preMsgHook(
969  FwOpcodeType opCode,
970  U32 cmdSeq
971  );
972 
974  virtual void CS_STEP_preMsgHook(
975  FwOpcodeType opCode,
976  U32 cmdSeq
977  );
978 
980  virtual void CS_AUTO_preMsgHook(
981  FwOpcodeType opCode,
982  U32 cmdSeq
983  );
984 
986  virtual void CS_MANUAL_preMsgHook(
987  FwOpcodeType opCode,
988  U32 cmdSeq
989  );
990 
992  virtual void CS_JOIN_WAIT_preMsgHook(
993  FwOpcodeType opCode,
994  U32 cmdSeq
995  );
996 
997  protected:
998 
999  // ----------------------------------------------------------------------
1000  // Event logging functions
1001  // ----------------------------------------------------------------------
1002 
1007  const Fw::StringBase& fileName
1008  ) const;
1009 
1014  const Fw::StringBase& fileName
1015  ) const;
1016 
1021  const Fw::StringBase& fileName
1022  ) const;
1023 
1028  const Fw::StringBase& fileName,
1030  I32 error
1031  ) const;
1032 
1037  const Fw::StringBase& fileName,
1038  U32 recordNumber,
1039  I32 error
1040  ) const;
1041 
1046  const Fw::StringBase& fileName,
1047  U32 size
1048  ) const;
1049 
1054  const Fw::StringBase& fileName
1055  ) const;
1056 
1061  const Fw::StringBase& fileName,
1062  U32 storedCRC,
1063  U32 computedCRC
1064  ) const;
1065 
1070  const Fw::StringBase& fileName,
1071  U32 recordNumber,
1072  FwOpcodeType opCode
1073  ) const;
1074 
1079  const Fw::StringBase& fileName
1080  ) const;
1081 
1086  const Fw::StringBase& fileName,
1087  U32 recordNumber,
1088  FwOpcodeType opCode,
1089  U32 errorStatus
1090  ) const;
1091 
1095  void log_WARNING_HI_CS_InvalidMode() const;
1096 
1101  const Fw::StringBase& fileName,
1102  U32 header_records,
1103  U32 extra_bytes
1104  ) const;
1105 
1110  const Fw::StringBase& fileName,
1111  U16 time_base,
1112  U16 seq_time_base
1113  ) const;
1114 
1119  const Fw::StringBase& fileName,
1120  U8 currTimeBase,
1121  U8 seqTimeBase
1122  ) const;
1123 
1128  const Fw::StringBase& filename
1129  ) const;
1130 
1135  FwOpcodeType opcode
1136  ) const;
1137 
1143  ) const;
1144 
1149 
1154  const Fw::StringBase& filename
1155  ) const;
1156 
1161  const Fw::StringBase& filename,
1162  U32 command
1163  ) const;
1164 
1169  const Fw::StringBase& filename,
1170  U32 command
1171  ) const;
1172 
1177  const Fw::StringBase& filename
1178  ) const;
1179 
1184  const Fw::StringBase& filename,
1185  U32 recordNumber,
1186  FwOpcodeType opCode
1187  ) const;
1188 
1193 
1196  const Fw::StringBase& fileName
1197  ) const;
1198 
1199  protected:
1200 
1201  // ----------------------------------------------------------------------
1202  // Telemetry write functions
1203  // ----------------------------------------------------------------------
1204 
1209  U32 arg,
1210  Fw::Time _tlmTime = Fw::Time()
1211  ) const;
1212 
1217  U32 arg,
1218  Fw::Time _tlmTime = Fw::Time()
1219  ) const;
1220 
1224  void tlmWrite_CS_Errors(
1225  U32 arg,
1226  Fw::Time _tlmTime = Fw::Time()
1227  ) const;
1228 
1233  U32 arg,
1234  Fw::Time _tlmTime = Fw::Time()
1235  ) const;
1236 
1241  U32 arg,
1242  Fw::Time _tlmTime = Fw::Time()
1243  ) const;
1244 
1245  protected:
1246 
1247  // ----------------------------------------------------------------------
1248  // Time
1249  // ----------------------------------------------------------------------
1250 
1254  Fw::Time getTime() const;
1255 
1256  private:
1257 
1258  // ----------------------------------------------------------------------
1259  // Message dispatch functions
1260  // ----------------------------------------------------------------------
1261 
1263  virtual MsgDispatchStatus doDispatch();
1264 
1265  private:
1266 
1267  // ----------------------------------------------------------------------
1268  // Calls for messages received on special input ports
1269  // ----------------------------------------------------------------------
1270 
1272  static void m_p_cmdIn_in(
1273  Fw::PassiveComponentBase* callComp,
1274  FwIndexType portNum,
1275  FwOpcodeType opCode,
1276  U32 cmdSeq,
1277  Fw::CmdArgBuffer& args
1278  );
1279 
1280  private:
1281 
1282  // ----------------------------------------------------------------------
1283  // Calls for messages received on typed input ports
1284  // ----------------------------------------------------------------------
1285 
1287  static void m_p_cmdResponseIn_in(
1288  Fw::PassiveComponentBase* callComp,
1289  FwIndexType portNum,
1290  FwOpcodeType opCode,
1291  U32 cmdSeq,
1292  const Fw::CmdResponse& response
1293  );
1294 
1296  static void m_p_pingIn_in(
1297  Fw::PassiveComponentBase* callComp,
1298  FwIndexType portNum,
1299  U32 key
1300  );
1301 
1303  static void m_p_schedIn_in(
1304  Fw::PassiveComponentBase* callComp,
1305  FwIndexType portNum,
1306  U32 context
1307  );
1308 
1310  static void m_p_seqCancelIn_in(
1311  Fw::PassiveComponentBase* callComp,
1312  FwIndexType portNum
1313  );
1314 
1316  static void m_p_seqRunIn_in(
1317  Fw::PassiveComponentBase* callComp,
1318  FwIndexType portNum,
1319  const Fw::StringBase& filename
1320  );
1321 
1322  private:
1323 
1324  // ----------------------------------------------------------------------
1325  // Special input ports
1326  // ----------------------------------------------------------------------
1327 
1329  Fw::InputCmdPort m_cmdIn_InputPort[NUM_CMDIN_INPUT_PORTS];
1330 
1331  private:
1332 
1333  // ----------------------------------------------------------------------
1334  // Typed input ports
1335  // ----------------------------------------------------------------------
1336 
1338  Fw::InputCmdResponsePort m_cmdResponseIn_InputPort[NUM_CMDRESPONSEIN_INPUT_PORTS];
1339 
1341  Svc::InputPingPort m_pingIn_InputPort[NUM_PINGIN_INPUT_PORTS];
1342 
1344  Svc::InputSchedPort m_schedIn_InputPort[NUM_SCHEDIN_INPUT_PORTS];
1345 
1348 
1350  Svc::InputCmdSeqInPort m_seqRunIn_InputPort[NUM_SEQRUNIN_INPUT_PORTS];
1351 
1352  private:
1353 
1354  // ----------------------------------------------------------------------
1355  // Special output ports
1356  // ----------------------------------------------------------------------
1357 
1358 #if FW_ENABLE_TEXT_LOGGING == 1
1359 
1361  Fw::OutputLogTextPort m_LogText_OutputPort[NUM_LOGTEXT_OUTPUT_PORTS];
1362 
1363 #endif
1364 
1366  Fw::OutputCmdRegPort m_cmdRegOut_OutputPort[NUM_CMDREGOUT_OUTPUT_PORTS];
1367 
1369  Fw::OutputCmdResponsePort m_cmdResponseOut_OutputPort[NUM_CMDRESPONSEOUT_OUTPUT_PORTS];
1370 
1372  Fw::OutputLogPort m_logOut_OutputPort[NUM_LOGOUT_OUTPUT_PORTS];
1373 
1375  Fw::OutputTimePort m_timeCaller_OutputPort[NUM_TIMECALLER_OUTPUT_PORTS];
1376 
1378  Fw::OutputTlmPort m_tlmOut_OutputPort[NUM_TLMOUT_OUTPUT_PORTS];
1379 
1380  private:
1381 
1382  // ----------------------------------------------------------------------
1383  // Typed output ports
1384  // ----------------------------------------------------------------------
1385 
1387  Fw::OutputComPort m_comCmdOut_OutputPort[NUM_COMCMDOUT_OUTPUT_PORTS];
1388 
1390  Svc::OutputPingPort m_pingOut_OutputPort[NUM_PINGOUT_OUTPUT_PORTS];
1391 
1394 
1396  Svc::OutputCmdSeqInPort m_seqStartOut_OutputPort[NUM_SEQSTARTOUT_OUTPUT_PORTS];
1397 
1398  };
1399 
1400 }
1401 
1402 #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
static constexpr FwIndexType getNum_cmdResponseIn_InputPorts()
static constexpr FwIndexType getNum_timeCaller_OutputPorts()
static constexpr FwIndexType getNum_cmdResponseOut_OutputPorts()
FwIdType FwOpcodeType
The type of a command opcode.
static constexpr FwIndexType getNum_logOut_OutputPorts()
void log_WARNING_HI_CS_FileSizeError(const Fw::StringBase &fileName, U32 size) const
void log_ACTIVITY_HI_CS_ModeSwitched(Svc::CmdSequencer_SeqMode mode) const
Wait for the current running sequence file complete.
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
Cannot run new sequence when current sequence file is still running.
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)
void log_ACTIVITY_HI_CS_JoinWaiting(const Fw::StringBase &filename, U32 recordNumber, FwOpcodeType opCode) const
The Command Sequencer issued a command and received a success status in return.
A command in a sequence was stepped through.
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.
The Command Sequencer issued a command and received an error status in return.
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.
static constexpr FwIndexType getNum_schedIn_InputPorts()
void log_ACTIVITY_HI_CS_CmdStarted(const Fw::StringBase &filename) const
virtual void CS_VALIDATE_cmdHandler(FwOpcodeType opCode, U32 cmdSeq, const Fw::CmdStringArg &fileName)=0
The running time base doesn&#39;t match the time base in the sequence files.
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].
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)
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)
void CS_JOIN_WAIT_cmdHandlerBase(FwOpcodeType opCode, U32 cmdSeq, Fw::CmdArgBuffer &args)
Svc::InputCmdSeqInPort * get_seqRunIn_InputPort(FwIndexType portNum)
The Sequence File Loader could not read the sequence file.
Wait for sequences that are running to finish. Allow user to run multiple seq files in SEQ_NO_BLOCK m...
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
The Command Sequencer received a command that was invalid for its current mode.
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)
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.
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()
virtual void pingIn_preMsgHook(FwIndexType portNum, U32 key)
Pre-message hook for async input port pingIn.
Svc::InputSchedPort * get_schedIn_InputPort(FwIndexType portNum)
virtual void CS_AUTO_cmdHandler(FwOpcodeType opCode, U32 cmdSeq)=0
Number of records in header doesn&#39;t match number in file.
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)
void set_seqStartOut_OutputPort(FwIndexType portNum, Svc::InputCmdSeqInPort *port)
Connect port to seqStartOut[portNum].
void log_WARNING_HI_CS_TimeBaseMismatch(const Fw::StringBase &fileName, U16 time_base, U16 seq_time_base) const
virtual void CS_STEP_preMsgHook(FwOpcodeType opCode, U32 cmdSeq)
Pre-message hook for command CS_STEP.
PlatformIndexType FwIndexType
Fw::InputCmdPort * get_cmdIn_InputPort(FwIndexType portNum)
void 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)
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
The running time base doesn&#39;t match the time base in the sequence files.
A local port request to run a sequence was started.
virtual void CS_MANUAL_cmdHandler(FwOpcodeType opCode, U32 cmdSeq)=0
CmdSequencerComponentBase(const char *compName="")
Construct CmdSequencerComponentBase object.
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
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)
void log_ACTIVITY_HI_CS_SequenceValid(const Fw::StringBase &filename) const
bool isConnected_logOut_OutputPort(FwIndexType portNum)
A sequence related command came with no active sequence.
Perform one step in a command sequence. Valid only if CmdSequencer is in MANUAL run mode...
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
A command status came back when no sequence was running.
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.