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"
39 
40 namespace Svc {
41 
48  {
49 
50  // ----------------------------------------------------------------------
51  // Friend classes
52  // ----------------------------------------------------------------------
53 
55  friend class CmdSequencerTesterBase;
57  friend class CmdSequencerTester;
58 
59  protected:
60 
61  // ----------------------------------------------------------------------
62  // Constants
63  // ----------------------------------------------------------------------
64 
66  enum {
68  };
69 
71  enum {
78  };
79 
81  enum {
88  };
89 
91  enum {
96  };
97 
99  enum {
108  };
109 
111  enum {
138  };
139 
141  enum {
147  };
148 
149  public:
150 
151  // ----------------------------------------------------------------------
152  // Component initialization
153  // ----------------------------------------------------------------------
154 
156  void init(
157  FwSizeType queueDepth,
158  FwEnumStoreType instance = 0
159  );
160 
161  public:
162 
163  // ----------------------------------------------------------------------
164  // Getters for special input ports
165  // ----------------------------------------------------------------------
166 
171  FwIndexType portNum
172  );
173 
174  public:
175 
176  // ----------------------------------------------------------------------
177  // Getters for typed input ports
178  // ----------------------------------------------------------------------
179 
184  FwIndexType portNum
185  );
186 
191  FwIndexType portNum
192  );
193 
198  FwIndexType portNum
199  );
200 
205  FwIndexType portNum
206  );
207 
212  FwIndexType portNum
213  );
214 
219  FwIndexType portNum
220  );
221 
222  public:
223 
224  // ----------------------------------------------------------------------
225  // Connect input ports to special output ports
226  // ----------------------------------------------------------------------
227 
228 #if FW_ENABLE_TEXT_LOGGING == 1
229 
231  void set_LogText_OutputPort(
232  FwIndexType portNum,
233  Fw::InputLogTextPort* port
234  );
235 
236 #endif
237 
240  FwIndexType portNum,
241  Fw::InputCmdRegPort* port
242  );
243 
246  FwIndexType portNum,
248  );
249 
252  FwIndexType portNum,
253  Fw::InputLogPort* port
254  );
255 
258  FwIndexType portNum,
259  Fw::InputTimePort* port
260  );
261 
264  FwIndexType portNum,
265  Fw::InputTlmPort* port
266  );
267 
268  public:
269 
270  // ----------------------------------------------------------------------
271  // Connect typed input ports to typed output ports
272  // ----------------------------------------------------------------------
273 
276  FwIndexType portNum,
277  Fw::InputComPort* port
278  );
279 
282  FwIndexType portNum,
283  Svc::InputPingPort* port
284  );
285 
288  FwIndexType portNum,
290  );
291 
294  FwIndexType portNum,
296  );
297 
298 #if FW_PORT_SERIALIZATION
299 
300  public:
301 
302  // ----------------------------------------------------------------------
303  // Connect serial input ports to special output ports
304  // ----------------------------------------------------------------------
305 
306 #if FW_ENABLE_TEXT_LOGGING == 1
307 
309  void set_LogText_OutputPort(
310  FwIndexType portNum,
311  Fw::InputSerializePort* port
312  );
313 
314 #endif
315 
318  FwIndexType portNum,
319  Fw::InputSerializePort* port
320  );
321 
324  FwIndexType portNum,
325  Fw::InputSerializePort* port
326  );
327 
330  FwIndexType portNum,
331  Fw::InputSerializePort* port
332  );
333 
336  FwIndexType portNum,
337  Fw::InputSerializePort* port
338  );
339 
342  FwIndexType portNum,
343  Fw::InputSerializePort* port
344  );
345 
346 #endif
347 
348 #if FW_PORT_SERIALIZATION
349 
350  public:
351 
352  // ----------------------------------------------------------------------
353  // Connect serial input ports to typed output ports
354  // ----------------------------------------------------------------------
355 
358  FwIndexType portNum,
359  Fw::InputSerializePort* port
360  );
361 
364  FwIndexType portNum,
365  Fw::InputSerializePort* port
366  );
367 
370  FwIndexType portNum,
371  Fw::InputSerializePort* port
372  );
373 
376  FwIndexType portNum,
377  Fw::InputSerializePort* port
378  );
379 
380 #endif
381 
382  public:
383 
384  // ----------------------------------------------------------------------
385  // Command registration
386  // ----------------------------------------------------------------------
387 
391  void regCommands();
392 
393  protected:
394 
395  // ----------------------------------------------------------------------
396  // Component construction and destruction
397  // ----------------------------------------------------------------------
398 
401  const char* compName = ""
402  );
403 
405  virtual ~CmdSequencerComponentBase();
406 
407  protected:
408 
409  // ----------------------------------------------------------------------
410  // Getters for numbers of special input ports
411  // ----------------------------------------------------------------------
412 
417  return NUM_CMDIN_INPUT_PORTS;
418  }
419 
420  protected:
421 
422  // ----------------------------------------------------------------------
423  // Getters for numbers of typed input ports
424  // ----------------------------------------------------------------------
425 
431  }
432 
437  return NUM_PINGIN_INPUT_PORTS;
438  }
439 
445  }
446 
452  }
453 
459  }
460 
466  }
467 
468  protected:
469 
470  // ----------------------------------------------------------------------
471  // Getters for numbers of special output ports
472  // ----------------------------------------------------------------------
473 
474 #if FW_ENABLE_TEXT_LOGGING == 1
475 
479  static constexpr FwIndexType getNum_LogText_OutputPorts() {
481  }
482 
483 #endif
484 
490  }
491 
497  }
498 
504  }
505 
511  }
512 
518  }
519 
520  protected:
521 
522  // ----------------------------------------------------------------------
523  // Getters for numbers of typed output ports
524  // ----------------------------------------------------------------------
525 
531  }
532 
538  }
539 
545  }
546 
552  }
553 
554  protected:
555 
556  // ----------------------------------------------------------------------
557  // Connection status queries for special output ports
558  // ----------------------------------------------------------------------
559 
560 #if FW_ENABLE_TEXT_LOGGING == 1
561 
565  bool isConnected_LogText_OutputPort(
566  FwIndexType portNum
567  );
568 
569 #endif
570 
575  FwIndexType portNum
576  );
577 
582  FwIndexType portNum
583  );
584 
589  FwIndexType portNum
590  );
591 
596  FwIndexType portNum
597  );
598 
603  FwIndexType portNum
604  );
605 
606  protected:
607 
608  // ----------------------------------------------------------------------
609  // Connection status queries for typed output ports
610  // ----------------------------------------------------------------------
611 
616  FwIndexType portNum
617  );
618 
623  FwIndexType portNum
624  );
625 
630  FwIndexType portNum
631  );
632 
637  FwIndexType portNum
638  );
639 
640  protected:
641 
642  // ----------------------------------------------------------------------
643  // Handlers to implement for typed input ports
644  // ----------------------------------------------------------------------
645 
647  virtual void cmdResponseIn_handler(
648  FwIndexType portNum,
649  FwOpcodeType opCode,
650  U32 cmdSeq,
651  const Fw::CmdResponse& response
652  ) = 0;
653 
655  virtual void pingIn_handler(
656  FwIndexType portNum,
657  U32 key
658  ) = 0;
659 
661  virtual void schedIn_handler(
662  FwIndexType portNum,
663  U32 context
664  ) = 0;
665 
667  virtual void seqCancelIn_handler(
668  FwIndexType portNum
669  ) = 0;
670 
672  virtual void seqDispatchIn_handler(
673  FwIndexType portNum,
674  Fw::StringBase& file_name
675  ) = 0;
676 
678  virtual void seqRunIn_handler(
679  FwIndexType portNum,
680  const Fw::StringBase& filename
681  ) = 0;
682 
683  protected:
684 
685  // ----------------------------------------------------------------------
686  // Port handler base-class functions for typed input ports
687  //
688  // Call these functions directly to bypass the corresponding ports
689  // ----------------------------------------------------------------------
690 
693  FwIndexType portNum,
694  FwOpcodeType opCode,
695  U32 cmdSeq,
696  const Fw::CmdResponse& response
697  );
698 
700  void pingIn_handlerBase(
701  FwIndexType portNum,
702  U32 key
703  );
704 
706  void schedIn_handlerBase(
707  FwIndexType portNum,
708  U32 context
709  );
710 
713  FwIndexType portNum
714  );
715 
718  FwIndexType portNum,
719  Fw::StringBase& file_name
720  );
721 
724  FwIndexType portNum,
725  const Fw::StringBase& filename
726  );
727 
728  protected:
729 
730  // ----------------------------------------------------------------------
731  // Pre-message hooks for typed async input ports
732  //
733  // Each of these functions is invoked just before processing a message
734  // on the corresponding port. By default, they do nothing. You can
735  // override them to provide specific pre-message behavior.
736  // ----------------------------------------------------------------------
737 
739  virtual void cmdResponseIn_preMsgHook(
740  FwIndexType portNum,
741  FwOpcodeType opCode,
742  U32 cmdSeq,
743  const Fw::CmdResponse& response
744  );
745 
747  virtual void pingIn_preMsgHook(
748  FwIndexType portNum,
749  U32 key
750  );
751 
753  virtual void schedIn_preMsgHook(
754  FwIndexType portNum,
755  U32 context
756  );
757 
759  virtual void seqCancelIn_preMsgHook(
760  FwIndexType portNum
761  );
762 
764  virtual void seqDispatchIn_preMsgHook(
765  FwIndexType portNum,
766  Fw::StringBase& file_name
767  );
768 
770  virtual void seqRunIn_preMsgHook(
771  FwIndexType portNum,
772  const Fw::StringBase& filename
773  );
774 
775  protected:
776 
777  // ----------------------------------------------------------------------
778  // Invocation functions for typed output ports
779  // ----------------------------------------------------------------------
780 
782  void comCmdOut_out(
783  FwIndexType portNum,
784  Fw::ComBuffer& data,
785  U32 context
786  );
787 
789  void pingOut_out(
790  FwIndexType portNum,
791  U32 key
792  );
793 
795  void seqDone_out(
796  FwIndexType portNum,
797  FwOpcodeType opCode,
798  U32 cmdSeq,
799  const Fw::CmdResponse& response
800  );
801 
803  void seqStartOut_out(
804  FwIndexType portNum,
805  const Fw::StringBase& filename
806  );
807 
808  protected:
809 
810  // ----------------------------------------------------------------------
811  // Command response
812  // ----------------------------------------------------------------------
813 
815  void cmdResponse_out(
816  FwOpcodeType opCode,
817  U32 cmdSeq,
818  Fw::CmdResponse response
819  );
820 
821  protected:
822 
823  // ----------------------------------------------------------------------
824  // Command handlers to implement
825  // ----------------------------------------------------------------------
826 
830  virtual void CS_RUN_cmdHandler(
831  FwOpcodeType opCode,
832  U32 cmdSeq,
833  const Fw::CmdStringArg& fileName,
835  ) = 0;
836 
840  virtual void CS_VALIDATE_cmdHandler(
841  FwOpcodeType opCode,
842  U32 cmdSeq,
843  const Fw::CmdStringArg& fileName
844  ) = 0;
845 
849  virtual void CS_CANCEL_cmdHandler(
850  FwOpcodeType opCode,
851  U32 cmdSeq
852  ) = 0;
853 
857  virtual void CS_START_cmdHandler(
858  FwOpcodeType opCode,
859  U32 cmdSeq
860  ) = 0;
861 
865  virtual void CS_STEP_cmdHandler(
866  FwOpcodeType opCode,
867  U32 cmdSeq
868  ) = 0;
869 
873  virtual void CS_AUTO_cmdHandler(
874  FwOpcodeType opCode,
875  U32 cmdSeq
876  ) = 0;
877 
881  virtual void CS_MANUAL_cmdHandler(
882  FwOpcodeType opCode,
883  U32 cmdSeq
884  ) = 0;
885 
889  virtual void CS_JOIN_WAIT_cmdHandler(
890  FwOpcodeType opCode,
891  U32 cmdSeq
892  ) = 0;
893 
894  protected:
895 
896  // ----------------------------------------------------------------------
897  // Command handler base-class functions
898  //
899  // Call these functions directly to bypass the command input port
900  // ----------------------------------------------------------------------
901 
906  FwOpcodeType opCode,
907  U32 cmdSeq,
908  Fw::CmdArgBuffer& args
909  );
910 
915  FwOpcodeType opCode,
916  U32 cmdSeq,
917  Fw::CmdArgBuffer& args
918  );
919 
924  FwOpcodeType opCode,
925  U32 cmdSeq,
926  Fw::CmdArgBuffer& args
927  );
928 
933  FwOpcodeType opCode,
934  U32 cmdSeq,
935  Fw::CmdArgBuffer& args
936  );
937 
942  FwOpcodeType opCode,
943  U32 cmdSeq,
944  Fw::CmdArgBuffer& args
945  );
946 
951  FwOpcodeType opCode,
952  U32 cmdSeq,
953  Fw::CmdArgBuffer& args
954  );
955 
960  FwOpcodeType opCode,
961  U32 cmdSeq,
962  Fw::CmdArgBuffer& args
963  );
964 
969  FwOpcodeType opCode,
970  U32 cmdSeq,
971  Fw::CmdArgBuffer& args
972  );
973 
974  protected:
975 
976  // ----------------------------------------------------------------------
977  // Pre-message hooks for async commands
978  //
979  // Each of these functions is invoked just before processing the
980  // corresponding command. By default they do nothing. You can
981  // override them to provide specific pre-command behavior.
982  // ----------------------------------------------------------------------
983 
985  virtual void CS_RUN_preMsgHook(
986  FwOpcodeType opCode,
987  U32 cmdSeq
988  );
989 
991  virtual void CS_VALIDATE_preMsgHook(
992  FwOpcodeType opCode,
993  U32 cmdSeq
994  );
995 
997  virtual void CS_CANCEL_preMsgHook(
998  FwOpcodeType opCode,
999  U32 cmdSeq
1000  );
1001 
1003  virtual void CS_START_preMsgHook(
1004  FwOpcodeType opCode,
1005  U32 cmdSeq
1006  );
1007 
1009  virtual void CS_STEP_preMsgHook(
1010  FwOpcodeType opCode,
1011  U32 cmdSeq
1012  );
1013 
1015  virtual void CS_AUTO_preMsgHook(
1016  FwOpcodeType opCode,
1017  U32 cmdSeq
1018  );
1019 
1021  virtual void CS_MANUAL_preMsgHook(
1022  FwOpcodeType opCode,
1023  U32 cmdSeq
1024  );
1025 
1027  virtual void CS_JOIN_WAIT_preMsgHook(
1028  FwOpcodeType opCode,
1029  U32 cmdSeq
1030  );
1031 
1032  protected:
1033 
1034  // ----------------------------------------------------------------------
1035  // Event logging functions
1036  // ----------------------------------------------------------------------
1037 
1042  const Fw::StringBase& fileName
1043  ) const;
1044 
1049  const Fw::StringBase& fileName
1050  ) const;
1051 
1056  const Fw::StringBase& fileName
1057  ) const;
1058 
1063  const Fw::StringBase& fileName,
1065  I32 error
1066  ) const;
1067 
1072  const Fw::StringBase& fileName,
1073  U32 recordNumber,
1074  I32 error
1075  ) const;
1076 
1081  const Fw::StringBase& fileName,
1082  U32 size
1083  ) const;
1084 
1089  const Fw::StringBase& fileName
1090  ) const;
1091 
1096  const Fw::StringBase& fileName,
1097  U32 storedCRC,
1098  U32 computedCRC
1099  ) const;
1100 
1105  const Fw::StringBase& fileName,
1106  U32 recordNumber,
1107  FwOpcodeType opCode
1108  ) const;
1109 
1114  const Fw::StringBase& fileName
1115  ) const;
1116 
1121  const Fw::StringBase& fileName,
1122  U32 recordNumber,
1123  FwOpcodeType opCode,
1124  U32 errorStatus
1125  ) const;
1126 
1130  void log_WARNING_HI_CS_InvalidMode() const;
1131 
1136  const Fw::StringBase& fileName,
1137  U32 header_records,
1138  U32 extra_bytes
1139  ) const;
1140 
1145  const Fw::StringBase& fileName,
1146  U16 time_base,
1147  U16 seq_time_base
1148  ) const;
1149 
1154  const Fw::StringBase& fileName,
1155  U8 currTimeBase,
1156  U8 seqTimeBase
1157  ) const;
1158 
1163  const Fw::StringBase& filename
1164  ) const;
1165 
1170  FwOpcodeType opcode
1171  ) const;
1172 
1178  ) const;
1179 
1184 
1189  const Fw::StringBase& filename
1190  ) const;
1191 
1196  const Fw::StringBase& filename,
1197  U32 command
1198  ) const;
1199 
1204  const Fw::StringBase& filename,
1205  U32 command
1206  ) const;
1207 
1212  const Fw::StringBase& filename
1213  ) const;
1214 
1219  const Fw::StringBase& filename,
1220  U32 recordNumber,
1221  FwOpcodeType opCode
1222  ) const;
1223 
1228 
1231  const Fw::StringBase& fileName
1232  ) const;
1233 
1234  protected:
1235 
1236  // ----------------------------------------------------------------------
1237  // Telemetry write functions
1238  // ----------------------------------------------------------------------
1239 
1244  U32 arg,
1245  Fw::Time _tlmTime = Fw::Time()
1246  ) const;
1247 
1252  U32 arg,
1253  Fw::Time _tlmTime = Fw::Time()
1254  ) const;
1255 
1259  void tlmWrite_CS_Errors(
1260  U32 arg,
1261  Fw::Time _tlmTime = Fw::Time()
1262  ) const;
1263 
1268  U32 arg,
1269  Fw::Time _tlmTime = Fw::Time()
1270  ) const;
1271 
1276  U32 arg,
1277  Fw::Time _tlmTime = Fw::Time()
1278  ) const;
1279 
1280  protected:
1281 
1282  // ----------------------------------------------------------------------
1283  // Time
1284  // ----------------------------------------------------------------------
1285 
1289  Fw::Time getTime() const;
1290 
1291  private:
1292 
1293  // ----------------------------------------------------------------------
1294  // Message dispatch functions
1295  // ----------------------------------------------------------------------
1296 
1298  virtual MsgDispatchStatus doDispatch();
1299 
1300  private:
1301 
1302  // ----------------------------------------------------------------------
1303  // Calls for messages received on special input ports
1304  // ----------------------------------------------------------------------
1305 
1307  static void m_p_cmdIn_in(
1308  Fw::PassiveComponentBase* callComp,
1309  FwIndexType portNum,
1310  FwOpcodeType opCode,
1311  U32 cmdSeq,
1312  Fw::CmdArgBuffer& args
1313  );
1314 
1315  private:
1316 
1317  // ----------------------------------------------------------------------
1318  // Calls for messages received on typed input ports
1319  // ----------------------------------------------------------------------
1320 
1322  static void m_p_cmdResponseIn_in(
1323  Fw::PassiveComponentBase* callComp,
1324  FwIndexType portNum,
1325  FwOpcodeType opCode,
1326  U32 cmdSeq,
1327  const Fw::CmdResponse& response
1328  );
1329 
1331  static void m_p_pingIn_in(
1332  Fw::PassiveComponentBase* callComp,
1333  FwIndexType portNum,
1334  U32 key
1335  );
1336 
1338  static void m_p_schedIn_in(
1339  Fw::PassiveComponentBase* callComp,
1340  FwIndexType portNum,
1341  U32 context
1342  );
1343 
1345  static void m_p_seqCancelIn_in(
1346  Fw::PassiveComponentBase* callComp,
1347  FwIndexType portNum
1348  );
1349 
1351  static void m_p_seqDispatchIn_in(
1352  Fw::PassiveComponentBase* callComp,
1353  FwIndexType portNum,
1354  Fw::StringBase& file_name
1355  );
1356 
1358  static void m_p_seqRunIn_in(
1359  Fw::PassiveComponentBase* callComp,
1360  FwIndexType portNum,
1361  const Fw::StringBase& filename
1362  );
1363 
1364  private:
1365 
1366  // ----------------------------------------------------------------------
1367  // Special input ports
1368  // ----------------------------------------------------------------------
1369 
1371  Fw::InputCmdPort m_cmdIn_InputPort[NUM_CMDIN_INPUT_PORTS];
1372 
1373  private:
1374 
1375  // ----------------------------------------------------------------------
1376  // Typed input ports
1377  // ----------------------------------------------------------------------
1378 
1380  Fw::InputCmdResponsePort m_cmdResponseIn_InputPort[NUM_CMDRESPONSEIN_INPUT_PORTS];
1381 
1383  Svc::InputPingPort m_pingIn_InputPort[NUM_PINGIN_INPUT_PORTS];
1384 
1386  Svc::InputSchedPort m_schedIn_InputPort[NUM_SCHEDIN_INPUT_PORTS];
1387 
1390 
1392  Svc::InputFileDispatchPort m_seqDispatchIn_InputPort[NUM_SEQDISPATCHIN_INPUT_PORTS];
1393 
1395  Svc::InputCmdSeqInPort m_seqRunIn_InputPort[NUM_SEQRUNIN_INPUT_PORTS];
1396 
1397  private:
1398 
1399  // ----------------------------------------------------------------------
1400  // Special output ports
1401  // ----------------------------------------------------------------------
1402 
1403 #if FW_ENABLE_TEXT_LOGGING == 1
1404 
1406  Fw::OutputLogTextPort m_LogText_OutputPort[NUM_LOGTEXT_OUTPUT_PORTS];
1407 
1408 #endif
1409 
1411  Fw::OutputCmdRegPort m_cmdRegOut_OutputPort[NUM_CMDREGOUT_OUTPUT_PORTS];
1412 
1414  Fw::OutputCmdResponsePort m_cmdResponseOut_OutputPort[NUM_CMDRESPONSEOUT_OUTPUT_PORTS];
1415 
1417  Fw::OutputLogPort m_logOut_OutputPort[NUM_LOGOUT_OUTPUT_PORTS];
1418 
1420  Fw::OutputTimePort m_timeCaller_OutputPort[NUM_TIMECALLER_OUTPUT_PORTS];
1421 
1423  Fw::OutputTlmPort m_tlmOut_OutputPort[NUM_TLMOUT_OUTPUT_PORTS];
1424 
1425  private:
1426 
1427  // ----------------------------------------------------------------------
1428  // Typed output ports
1429  // ----------------------------------------------------------------------
1430 
1432  Fw::OutputComPort m_comCmdOut_OutputPort[NUM_COMCMDOUT_OUTPUT_PORTS];
1433 
1435  Svc::OutputPingPort m_pingOut_OutputPort[NUM_PINGOUT_OUTPUT_PORTS];
1436 
1439 
1441  Svc::OutputCmdSeqInPort m_seqStartOut_OutputPort[NUM_SEQSTARTOUT_OUTPUT_PORTS];
1442 
1443  };
1444 
1445 }
1446 
1447 #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
A local port request to run a sequence was started.
A command in a sequence was stepped through.
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()
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
Number of records in header doesn&#39;t match number in file.
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.
The Command Sequencer issued a command and received a success 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
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.
Wait for sequences that are running to finish. Allow user to run multiple seq files in SEQ_NO_BLOCK m...
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.
Perform one step in a command sequence. Valid only if CmdSequencer is in MANUAL run mode...
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.
A command status came back when no sequence was running.
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)
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 running time base doesn&#39;t match the time base in the sequence files.
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)
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
void log_WARNING_HI_CS_FileCrcFailure(const Fw::StringBase &fileName, U32 storedCRC, U32 computedCRC) const
The running time base doesn&#39;t match the time base in the sequence files.
The Sequence File Loader could not read the sequence file.
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)
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 Command Sequencer received a command that was invalid for its current mode.
virtual void CS_CANCEL_cmdHandler(FwOpcodeType opCode, U32 cmdSeq)=0
Wait for the current running sequence file complete.
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)
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
Cannot run new sequence when current sequence file is still running.
A sequence related command came with no active sequence.
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.