F´ Flight Software - C/C++ Documentation  devel
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 "FpConfig.hpp"
11 #include "Fw/Cmd/CmdPortAc.hpp"
12 #include "Fw/Cmd/CmdRegPortAc.hpp"
14 #include "Fw/Cmd/CmdString.hpp"
15 #include "Fw/Com/ComPortAc.hpp"
17 #include "Fw/Log/LogPortAc.hpp"
18 #include "Fw/Log/LogString.hpp"
19 #if FW_ENABLE_TEXT_LOGGING == 1
20 #include "Fw/Log/LogTextPortAc.hpp"
21 #endif
24 #include "Fw/Time/TimePortAc.hpp"
25 #include "Fw/Tlm/TlmPortAc.hpp"
26 #include "Fw/Tlm/TlmString.hpp"
30 #include "Svc/Ping/PingPortAc.hpp"
34 
35 namespace Svc {
36 
43  {
44 
45  // ----------------------------------------------------------------------
46  // Friend classes
47  // ----------------------------------------------------------------------
48 
51 
52  PROTECTED:
53 
54  // ----------------------------------------------------------------------
55  // Constants
56  // ----------------------------------------------------------------------
57 
59  enum {
61  };
62 
64  enum {
70  };
71 
73  enum {
80  };
81 
83  enum {
88  };
89 
91  enum {
92  OPCODE_CS_RUN = 0x0,
100  };
101 
103  enum {
129  };
130 
132  enum {
138  };
139 
140  public:
141 
142  // ----------------------------------------------------------------------
143  // Component initialization
144  // ----------------------------------------------------------------------
145 
147  void init(
148  FwSizeType queueDepth,
149  FwEnumStoreType instance = 0
150  );
151 
152  public:
153 
154  // ----------------------------------------------------------------------
155  // Getters for special input ports
156  // ----------------------------------------------------------------------
157 
162  FwIndexType portNum
163  );
164 
165  public:
166 
167  // ----------------------------------------------------------------------
168  // Getters for typed input ports
169  // ----------------------------------------------------------------------
170 
175  FwIndexType portNum
176  );
177 
182  FwIndexType portNum
183  );
184 
189  FwIndexType portNum
190  );
191 
196  FwIndexType portNum
197  );
198 
203  FwIndexType portNum
204  );
205 
206  public:
207 
208  // ----------------------------------------------------------------------
209  // Connect input ports to special output ports
210  // ----------------------------------------------------------------------
211 
212 #if FW_ENABLE_TEXT_LOGGING == 1
213 
215  void set_LogText_OutputPort(
216  FwIndexType portNum,
217  Fw::InputLogTextPort* port
218  );
219 
220 #endif
221 
224  FwIndexType portNum,
225  Fw::InputCmdRegPort* port
226  );
227 
230  FwIndexType portNum,
232  );
233 
236  FwIndexType portNum,
237  Fw::InputLogPort* port
238  );
239 
242  FwIndexType portNum,
243  Fw::InputTimePort* port
244  );
245 
248  FwIndexType portNum,
249  Fw::InputTlmPort* port
250  );
251 
252  public:
253 
254  // ----------------------------------------------------------------------
255  // Connect typed input ports to typed output ports
256  // ----------------------------------------------------------------------
257 
260  FwIndexType portNum,
261  Fw::InputComPort* port
262  );
263 
266  FwIndexType portNum,
267  Svc::InputPingPort* port
268  );
269 
272  FwIndexType portNum,
274  );
275 
278  FwIndexType portNum,
280  );
281 
282 #if FW_PORT_SERIALIZATION
283 
284  public:
285 
286  // ----------------------------------------------------------------------
287  // Connect serial input ports to special output ports
288  // ----------------------------------------------------------------------
289 
290 #if FW_ENABLE_TEXT_LOGGING == 1
291 
293  void set_LogText_OutputPort(
294  FwIndexType portNum,
295  Fw::InputSerializePort* port
296  );
297 
298 #endif
299 
302  FwIndexType portNum,
303  Fw::InputSerializePort* port
304  );
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 
330 #endif
331 
332 #if FW_PORT_SERIALIZATION
333 
334  public:
335 
336  // ----------------------------------------------------------------------
337  // Connect serial input ports to typed output ports
338  // ----------------------------------------------------------------------
339 
342  FwIndexType portNum,
343  Fw::InputSerializePort* port
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 
364 #endif
365 
366  public:
367 
368  // ----------------------------------------------------------------------
369  // Command registration
370  // ----------------------------------------------------------------------
371 
375  void regCommands();
376 
377  PROTECTED:
378 
379  // ----------------------------------------------------------------------
380  // Component construction and destruction
381  // ----------------------------------------------------------------------
382 
385  const char* compName = ""
386  );
387 
389  virtual ~CmdSequencerComponentBase();
390 
391  PROTECTED:
392 
393  // ----------------------------------------------------------------------
394  // Getters for numbers of special input ports
395  // ----------------------------------------------------------------------
396 
401 
402  PROTECTED:
403 
404  // ----------------------------------------------------------------------
405  // Getters for numbers of typed input ports
406  // ----------------------------------------------------------------------
407 
412 
417 
422 
427 
432 
433  PROTECTED:
434 
435  // ----------------------------------------------------------------------
436  // Getters for numbers of special output ports
437  // ----------------------------------------------------------------------
438 
439 #if FW_ENABLE_TEXT_LOGGING == 1
440 
444  FwIndexType getNum_LogText_OutputPorts() const;
445 
446 #endif
447 
452 
457 
462 
467 
472 
473  PROTECTED:
474 
475  // ----------------------------------------------------------------------
476  // Getters for numbers of typed output ports
477  // ----------------------------------------------------------------------
478 
483 
488 
493 
498 
499  PROTECTED:
500 
501  // ----------------------------------------------------------------------
502  // Connection status queries for special output ports
503  // ----------------------------------------------------------------------
504 
505 #if FW_ENABLE_TEXT_LOGGING == 1
506 
510  bool isConnected_LogText_OutputPort(
511  FwIndexType portNum
512  );
513 
514 #endif
515 
520  FwIndexType portNum
521  );
522 
527  FwIndexType portNum
528  );
529 
534  FwIndexType portNum
535  );
536 
541  FwIndexType portNum
542  );
543 
548  FwIndexType portNum
549  );
550 
551  PROTECTED:
552 
553  // ----------------------------------------------------------------------
554  // Connection status queries for typed output ports
555  // ----------------------------------------------------------------------
556 
561  FwIndexType portNum
562  );
563 
568  FwIndexType portNum
569  );
570 
575  FwIndexType portNum
576  );
577 
582  FwIndexType portNum
583  );
584 
585  PROTECTED:
586 
587  // ----------------------------------------------------------------------
588  // Handlers to implement for typed input ports
589  // ----------------------------------------------------------------------
590 
592  virtual void cmdResponseIn_handler(
593  FwIndexType portNum,
594  FwOpcodeType opCode,
595  U32 cmdSeq,
596  const Fw::CmdResponse& response
597  ) = 0;
598 
600  virtual void pingIn_handler(
601  FwIndexType portNum,
602  U32 key
603  ) = 0;
604 
606  virtual void schedIn_handler(
607  FwIndexType portNum,
608  U32 context
609  ) = 0;
610 
612  virtual void seqCancelIn_handler(
613  FwIndexType portNum
614  ) = 0;
615 
617  virtual void seqRunIn_handler(
618  FwIndexType portNum,
619  const Fw::StringBase& filename
620  ) = 0;
621 
622  PROTECTED:
623 
624  // ----------------------------------------------------------------------
625  // Port handler base-class functions for typed input ports
626  //
627  // Call these functions directly to bypass the corresponding ports
628  // ----------------------------------------------------------------------
629 
632  FwIndexType portNum,
633  FwOpcodeType opCode,
634  U32 cmdSeq,
635  const Fw::CmdResponse& response
636  );
637 
639  void pingIn_handlerBase(
640  FwIndexType portNum,
641  U32 key
642  );
643 
645  void schedIn_handlerBase(
646  FwIndexType portNum,
647  U32 context
648  );
649 
652  FwIndexType portNum
653  );
654 
657  FwIndexType portNum,
658  const Fw::StringBase& filename
659  );
660 
661  PROTECTED:
662 
663  // ----------------------------------------------------------------------
664  // Pre-message hooks for typed async input ports
665  //
666  // Each of these functions is invoked just before processing a message
667  // on the corresponding port. By default, they do nothing. You can
668  // override them to provide specific pre-message behavior.
669  // ----------------------------------------------------------------------
670 
672  virtual void cmdResponseIn_preMsgHook(
673  FwIndexType portNum,
674  FwOpcodeType opCode,
675  U32 cmdSeq,
676  const Fw::CmdResponse& response
677  );
678 
680  virtual void pingIn_preMsgHook(
681  FwIndexType portNum,
682  U32 key
683  );
684 
686  virtual void schedIn_preMsgHook(
687  FwIndexType portNum,
688  U32 context
689  );
690 
692  virtual void seqCancelIn_preMsgHook(
693  FwIndexType portNum
694  );
695 
697  virtual void seqRunIn_preMsgHook(
698  FwIndexType portNum,
699  const Fw::StringBase& filename
700  );
701 
702  PROTECTED:
703 
704  // ----------------------------------------------------------------------
705  // Invocation functions for typed output ports
706  // ----------------------------------------------------------------------
707 
709  void comCmdOut_out(
710  FwIndexType portNum,
711  Fw::ComBuffer& data,
712  U32 context
713  );
714 
716  void pingOut_out(
717  FwIndexType portNum,
718  U32 key
719  );
720 
722  void seqDone_out(
723  FwIndexType portNum,
724  FwOpcodeType opCode,
725  U32 cmdSeq,
726  const Fw::CmdResponse& response
727  );
728 
730  void seqStartOut_out(
731  FwIndexType portNum,
732  const Fw::StringBase& filename
733  );
734 
735  PROTECTED:
736 
737  // ----------------------------------------------------------------------
738  // Command response
739  // ----------------------------------------------------------------------
740 
742  void cmdResponse_out(
743  FwOpcodeType opCode,
744  U32 cmdSeq,
745  Fw::CmdResponse response
746  );
747 
748  PROTECTED:
749 
750  // ----------------------------------------------------------------------
751  // Command handlers to implement
752  // ----------------------------------------------------------------------
753 
757  virtual void CS_RUN_cmdHandler(
758  FwOpcodeType opCode,
759  U32 cmdSeq,
760  const Fw::CmdStringArg& fileName,
762  ) = 0;
763 
768  FwOpcodeType opCode,
769  U32 cmdSeq,
770  const Fw::CmdStringArg& fileName
771  ) = 0;
772 
776  virtual void CS_CANCEL_cmdHandler(
777  FwOpcodeType opCode,
778  U32 cmdSeq
779  ) = 0;
780 
784  virtual void CS_START_cmdHandler(
785  FwOpcodeType opCode,
786  U32 cmdSeq
787  ) = 0;
788 
792  virtual void CS_STEP_cmdHandler(
793  FwOpcodeType opCode,
794  U32 cmdSeq
795  ) = 0;
796 
800  virtual void CS_AUTO_cmdHandler(
801  FwOpcodeType opCode,
802  U32 cmdSeq
803  ) = 0;
804 
808  virtual void CS_MANUAL_cmdHandler(
809  FwOpcodeType opCode,
810  U32 cmdSeq
811  ) = 0;
812 
817  FwOpcodeType opCode,
818  U32 cmdSeq
819  ) = 0;
820 
821  PROTECTED:
822 
823  // ----------------------------------------------------------------------
824  // Command handler base-class functions
825  //
826  // Call these functions directly to bypass the command input port
827  // ----------------------------------------------------------------------
828 
833  FwOpcodeType opCode,
834  U32 cmdSeq,
835  Fw::CmdArgBuffer& args
836  );
837 
842  FwOpcodeType opCode,
843  U32 cmdSeq,
844  Fw::CmdArgBuffer& args
845  );
846 
851  FwOpcodeType opCode,
852  U32 cmdSeq,
853  Fw::CmdArgBuffer& args
854  );
855 
860  FwOpcodeType opCode,
861  U32 cmdSeq,
862  Fw::CmdArgBuffer& args
863  );
864 
869  FwOpcodeType opCode,
870  U32 cmdSeq,
871  Fw::CmdArgBuffer& args
872  );
873 
878  FwOpcodeType opCode,
879  U32 cmdSeq,
880  Fw::CmdArgBuffer& args
881  );
882 
887  FwOpcodeType opCode,
888  U32 cmdSeq,
889  Fw::CmdArgBuffer& args
890  );
891 
896  FwOpcodeType opCode,
897  U32 cmdSeq,
898  Fw::CmdArgBuffer& args
899  );
900 
901  PROTECTED:
902 
903  // ----------------------------------------------------------------------
904  // Pre-message hooks for async commands
905  //
906  // Each of these functions is invoked just before processing the
907  // corresponding command. By default they do nothing. You can
908  // override them to provide specific pre-command behavior.
909  // ----------------------------------------------------------------------
910 
912  virtual void CS_RUN_preMsgHook(
913  FwOpcodeType opCode,
914  U32 cmdSeq
915  );
916 
918  virtual void CS_VALIDATE_preMsgHook(
919  FwOpcodeType opCode,
920  U32 cmdSeq
921  );
922 
924  virtual void CS_CANCEL_preMsgHook(
925  FwOpcodeType opCode,
926  U32 cmdSeq
927  );
928 
930  virtual void CS_START_preMsgHook(
931  FwOpcodeType opCode,
932  U32 cmdSeq
933  );
934 
936  virtual void CS_STEP_preMsgHook(
937  FwOpcodeType opCode,
938  U32 cmdSeq
939  );
940 
942  virtual void CS_AUTO_preMsgHook(
943  FwOpcodeType opCode,
944  U32 cmdSeq
945  );
946 
948  virtual void CS_MANUAL_preMsgHook(
949  FwOpcodeType opCode,
950  U32 cmdSeq
951  );
952 
954  virtual void CS_JOIN_WAIT_preMsgHook(
955  FwOpcodeType opCode,
956  U32 cmdSeq
957  );
958 
959  PROTECTED:
960 
961  // ----------------------------------------------------------------------
962  // Event logging functions
963  // ----------------------------------------------------------------------
964 
969  const Fw::StringBase& fileName
970  );
971 
976  const Fw::StringBase& fileName
977  );
978 
983  const Fw::StringBase& fileName
984  );
985 
990  const Fw::StringBase& fileName,
992  I32 error
993  );
994 
999  const Fw::StringBase& fileName,
1000  U32 recordNumber,
1001  I32 error
1002  );
1003 
1008  const Fw::StringBase& fileName,
1009  U32 size
1010  );
1011 
1016  const Fw::StringBase& fileName
1017  );
1018 
1023  const Fw::StringBase& fileName,
1024  U32 storedCRC,
1025  U32 computedCRC
1026  );
1027 
1032  const Fw::StringBase& fileName,
1033  U32 recordNumber,
1034  U32 opCode
1035  );
1036 
1041  const Fw::StringBase& fileName
1042  );
1043 
1048  const Fw::StringBase& fileName,
1049  U32 recordNumber,
1050  U32 opCode,
1051  U32 errorStatus
1052  );
1053 
1058 
1063  const Fw::StringBase& fileName,
1064  U32 header_records,
1065  U32 extra_bytes
1066  );
1067 
1072  const Fw::StringBase& fileName,
1073  U16 time_base,
1074  U16 seq_time_base
1075  );
1076 
1081  const Fw::StringBase& fileName,
1082  U8 currTimeBase,
1083  U8 seqTimeBase
1084  );
1085 
1090  const Fw::StringBase& filename
1091  );
1092 
1097  U32 opcode
1098  );
1099 
1105  );
1106 
1111 
1116  const Fw::StringBase& filename
1117  );
1118 
1123  const Fw::StringBase& filename,
1124  U32 command
1125  );
1126 
1131  const Fw::StringBase& filename,
1132  U32 command
1133  );
1134 
1139  const Fw::StringBase& filename
1140  );
1141 
1146  const Fw::StringBase& filename,
1147  U32 recordNumber,
1148  U32 opCode
1149  );
1150 
1155 
1156  PROTECTED:
1157 
1158  // ----------------------------------------------------------------------
1159  // Telemetry write functions
1160  // ----------------------------------------------------------------------
1161 
1166  U32 arg,
1167  Fw::Time _tlmTime = Fw::Time()
1168  );
1169 
1174  U32 arg,
1175  Fw::Time _tlmTime = Fw::Time()
1176  );
1177 
1181  void tlmWrite_CS_Errors(
1182  U32 arg,
1183  Fw::Time _tlmTime = Fw::Time()
1184  );
1185 
1190  U32 arg,
1191  Fw::Time _tlmTime = Fw::Time()
1192  );
1193 
1198  U32 arg,
1199  Fw::Time _tlmTime = Fw::Time()
1200  );
1201 
1202  PROTECTED:
1203 
1204  // ----------------------------------------------------------------------
1205  // Time
1206  // ----------------------------------------------------------------------
1207 
1211  Fw::Time getTime();
1212 
1213  PRIVATE:
1214 
1215  // ----------------------------------------------------------------------
1216  // Message dispatch functions
1217  // ----------------------------------------------------------------------
1218 
1220  virtual MsgDispatchStatus doDispatch();
1221 
1222  PRIVATE:
1223 
1224  // ----------------------------------------------------------------------
1225  // Calls for messages received on special input ports
1226  // ----------------------------------------------------------------------
1227 
1229  static void m_p_cmdIn_in(
1230  Fw::PassiveComponentBase* callComp,
1231  FwIndexType portNum,
1232  FwOpcodeType opCode,
1233  U32 cmdSeq,
1234  Fw::CmdArgBuffer& args
1235  );
1236 
1237  PRIVATE:
1238 
1239  // ----------------------------------------------------------------------
1240  // Calls for messages received on typed input ports
1241  // ----------------------------------------------------------------------
1242 
1244  static void m_p_cmdResponseIn_in(
1245  Fw::PassiveComponentBase* callComp,
1246  FwIndexType portNum,
1247  FwOpcodeType opCode,
1248  U32 cmdSeq,
1249  const Fw::CmdResponse& response
1250  );
1251 
1253  static void m_p_pingIn_in(
1254  Fw::PassiveComponentBase* callComp,
1255  FwIndexType portNum,
1256  U32 key
1257  );
1258 
1260  static void m_p_schedIn_in(
1261  Fw::PassiveComponentBase* callComp,
1262  FwIndexType portNum,
1263  U32 context
1264  );
1265 
1267  static void m_p_seqCancelIn_in(
1268  Fw::PassiveComponentBase* callComp,
1269  FwIndexType portNum
1270  );
1271 
1273  static void m_p_seqRunIn_in(
1274  Fw::PassiveComponentBase* callComp,
1275  FwIndexType portNum,
1276  const Fw::StringBase& filename
1277  );
1278 
1279  PRIVATE:
1280 
1281  // ----------------------------------------------------------------------
1282  // Special input ports
1283  // ----------------------------------------------------------------------
1284 
1286  Fw::InputCmdPort m_cmdIn_InputPort[NUM_CMDIN_INPUT_PORTS];
1287 
1288  PRIVATE:
1289 
1290  // ----------------------------------------------------------------------
1291  // Typed input ports
1292  // ----------------------------------------------------------------------
1293 
1295  Fw::InputCmdResponsePort m_cmdResponseIn_InputPort[NUM_CMDRESPONSEIN_INPUT_PORTS];
1296 
1298  Svc::InputPingPort m_pingIn_InputPort[NUM_PINGIN_INPUT_PORTS];
1299 
1301  Svc::InputSchedPort m_schedIn_InputPort[NUM_SCHEDIN_INPUT_PORTS];
1302 
1305 
1307  Svc::InputCmdSeqInPort m_seqRunIn_InputPort[NUM_SEQRUNIN_INPUT_PORTS];
1308 
1309  PRIVATE:
1310 
1311  // ----------------------------------------------------------------------
1312  // Special output ports
1313  // ----------------------------------------------------------------------
1314 
1315 #if FW_ENABLE_TEXT_LOGGING == 1
1316 
1318  Fw::OutputLogTextPort m_LogText_OutputPort[NUM_LOGTEXT_OUTPUT_PORTS];
1319 
1320 #endif
1321 
1323  Fw::OutputCmdRegPort m_cmdRegOut_OutputPort[NUM_CMDREGOUT_OUTPUT_PORTS];
1324 
1326  Fw::OutputCmdResponsePort m_cmdResponseOut_OutputPort[NUM_CMDRESPONSEOUT_OUTPUT_PORTS];
1327 
1329  Fw::OutputLogPort m_logOut_OutputPort[NUM_LOGOUT_OUTPUT_PORTS];
1330 
1332  Fw::OutputTimePort m_timeCaller_OutputPort[NUM_TIMECALLER_OUTPUT_PORTS];
1333 
1335  Fw::OutputTlmPort m_tlmOut_OutputPort[NUM_TLMOUT_OUTPUT_PORTS];
1336 
1337  PRIVATE:
1338 
1339  // ----------------------------------------------------------------------
1340  // Typed output ports
1341  // ----------------------------------------------------------------------
1342 
1344  Fw::OutputComPort m_comCmdOut_OutputPort[NUM_COMCMDOUT_OUTPUT_PORTS];
1345 
1347  Svc::OutputPingPort m_pingOut_OutputPort[NUM_PINGOUT_OUTPUT_PORTS];
1348 
1351 
1353  Svc::OutputCmdSeqInPort m_seqStartOut_OutputPort[NUM_SEQSTARTOUT_OUTPUT_PORTS];
1354 
1355  };
1356 
1357 }
1358 
1359 #endif
uint8_t U8
8-bit unsigned integer
Definition: BasicTypes.h:30
I32 FwEnumStoreType
Definition: FpConfig.h:64
U32 FwOpcodeType
Definition: FpConfig.h:91
PlatformSizeType FwSizeType
Definition: FpConfig.h:35
PlatformIndexType FwIndexType
Definition: FpConfig.h:25
C++-compatible configuration header for fprime configuration.
Enum representing a command response.
void init()
Object initializer.
Definition: ObjBase.cpp:27
Definition: Time.hpp:9
The stage of the file read operation.
Auto-generated base for CmdSequencer component.
virtual void CS_MANUAL_cmdHandler(FwOpcodeType opCode, U32 cmdSeq)=0
void CS_MANUAL_cmdHandlerBase(FwOpcodeType opCode, U32 cmdSeq, Fw::CmdArgBuffer &args)
@ CHANNELID_CS_LOADCOMMANDS
Channel ID for CS_LoadCommands.
@ CHANNELID_CS_ERRORS
Channel ID for CS_Errors.
@ CHANNELID_CS_CANCELCOMMANDS
Channel ID for CS_CancelCommands.
@ CHANNELID_CS_COMMANDSEXECUTED
Channel ID for CS_CommandsExecuted.
@ CHANNELID_CS_SEQUENCESCOMPLETED
Channel ID for CS_SequencesCompleted.
void seqCancelIn_handlerBase(FwIndexType portNum)
Handler base-class function for input port seqCancelIn.
void log_WARNING_HI_CS_FileNotFound(const Fw::StringBase &fileName)
bool isConnected_seqStartOut_OutputPort(FwIndexType portNum)
bool isConnected_cmdResponseOut_OutputPort(FwIndexType portNum)
virtual void CS_STEP_preMsgHook(FwOpcodeType opCode, U32 cmdSeq)
Pre-message hook for command CS_STEP.
void log_ACTIVITY_HI_CS_CmdStepped(const Fw::StringBase &filename, U32 command)
FwIndexType getNum_cmdResponseOut_OutputPorts() const
virtual void CS_START_preMsgHook(FwOpcodeType opCode, U32 cmdSeq)
Pre-message hook for command CS_START.
virtual void cmdResponseIn_handler(FwIndexType portNum, FwOpcodeType opCode, U32 cmdSeq, const Fw::CmdResponse &response)=0
Handler for input port cmdResponseIn.
void tlmWrite_CS_CancelCommands(U32 arg, Fw::Time _tlmTime=Fw::Time())
virtual void seqRunIn_preMsgHook(FwIndexType portNum, const Fw::StringBase &filename)
Pre-message hook for async input port seqRunIn.
void seqDone_out(FwIndexType portNum, FwOpcodeType opCode, U32 cmdSeq, const Fw::CmdResponse &response)
Invoke output port seqDone.
void CS_RUN_cmdHandlerBase(FwOpcodeType opCode, U32 cmdSeq, Fw::CmdArgBuffer &args)
virtual void CS_CANCEL_preMsgHook(FwOpcodeType opCode, U32 cmdSeq)
Pre-message hook for command CS_CANCEL.
bool isConnected_timeCaller_OutputPort(FwIndexType portNum)
void tlmWrite_CS_CommandsExecuted(U32 arg, Fw::Time _tlmTime=Fw::Time())
virtual void seqCancelIn_preMsgHook(FwIndexType portNum)
Pre-message hook for async input port seqCancelIn.
void cmdResponseIn_handlerBase(FwIndexType portNum, FwOpcodeType opCode, U32 cmdSeq, const Fw::CmdResponse &response)
Handler base-class function for input port cmdResponseIn.
void CS_CANCEL_cmdHandlerBase(FwOpcodeType opCode, U32 cmdSeq, Fw::CmdArgBuffer &args)
void seqRunIn_handlerBase(FwIndexType portNum, const Fw::StringBase &filename)
Handler base-class function for input port seqRunIn.
void log_WARNING_HI_CS_FileReadError(const Fw::StringBase &fileName)
Fw::InputCmdPort * get_cmdIn_InputPort(FwIndexType portNum)
virtual void pingIn_preMsgHook(FwIndexType portNum, U32 key)
Pre-message hook for async input port pingIn.
virtual ~CmdSequencerComponentBase()
Destroy CmdSequencerComponentBase object.
friend class CmdSequencerComponentBaseFriend
Friend class for white-box testing.
virtual void CS_START_cmdHandler(FwOpcodeType opCode, U32 cmdSeq)=0
void set_tlmOut_OutputPort(FwIndexType portNum, Fw::InputTlmPort *port)
Connect port to tlmOut[portNum].
void CS_START_cmdHandlerBase(FwOpcodeType opCode, U32 cmdSeq, Fw::CmdArgBuffer &args)
void seqStartOut_out(FwIndexType portNum, const Fw::StringBase &filename)
Invoke output port seqStartOut.
bool isConnected_cmdRegOut_OutputPort(FwIndexType portNum)
bool isConnected_pingOut_OutputPort(FwIndexType portNum)
void log_ACTIVITY_LO_CS_CommandComplete(const Fw::StringBase &fileName, U32 recordNumber, U32 opCode)
void log_WARNING_HI_CS_RecordMismatch(const Fw::StringBase &fileName, U32 header_records, U32 extra_bytes)
void schedIn_handlerBase(FwIndexType portNum, U32 context)
Handler base-class function for input port schedIn.
void log_WARNING_HI_CS_TimeBaseMismatch(const Fw::StringBase &fileName, U16 time_base, U16 seq_time_base)
void set_cmdResponseOut_OutputPort(FwIndexType portNum, Fw::InputCmdResponsePort *port)
Connect port to cmdResponseOut[portNum].
virtual void CS_STEP_cmdHandler(FwOpcodeType opCode, U32 cmdSeq)=0
virtual void CS_JOIN_WAIT_cmdHandler(FwOpcodeType opCode, U32 cmdSeq)=0
bool isConnected_seqDone_OutputPort(FwIndexType portNum)
void log_WARNING_HI_CS_TimeContextMismatch(const Fw::StringBase &fileName, U8 currTimeBase, U8 seqTimeBase)
virtual void CS_RUN_preMsgHook(FwOpcodeType opCode, U32 cmdSeq)
Pre-message hook for command CS_RUN.
Svc::InputCmdSeqCancelPort * get_seqCancelIn_InputPort(FwIndexType portNum)
virtual void CS_AUTO_cmdHandler(FwOpcodeType opCode, U32 cmdSeq)=0
@ EVENTID_CS_TIMEBASEMISMATCH
The running time base doesn't match the time base in the sequence files.
@ EVENTID_CS_UNEXPECTEDCOMPLETION
A command status came back when no sequence was running.
@ EVENTID_CS_CMDSTARTED
A manual sequence was started.
@ EVENTID_CS_RECORDINVALID
The format of a command record was invalid.
@ EVENTID_CS_FILECRCFAILURE
The sequence file validation failed.
@ EVENTID_CS_JOINWAITINGNOTCOMPLETE
Cannot run new sequence when current sequence file is still running.
@ EVENTID_CS_PORTSEQUENCESTARTED
A local port request to run a sequence was started.
@ EVENTID_CS_SEQUENCEVALID
A sequence passed validation.
@ EVENTID_CS_SEQUENCECANCELED
A command sequence was successfully canceled.
@ EVENTID_CS_FILENOTFOUND
The sequence file was not found.
@ EVENTID_CS_FILESIZEERROR
The sequence file was too large.
@ EVENTID_CS_TIMECONTEXTMISMATCH
The running time base doesn't match the time base in the sequence files.
@ EVENTID_CS_SEQUENCECOMPLETE
A command sequence successfully completed.
@ EVENTID_CS_SEQUENCETIMEOUT
A sequence passed validation.
@ EVENTID_CS_INVALIDMODE
The Command Sequencer received a command that was invalid for its current mode.
@ EVENTID_CS_NOSEQUENCEACTIVE
A sequence related command came with no active sequence.
@ EVENTID_CS_JOINWAITING
Wait for the current running sequence file complete.
@ EVENTID_CS_CMDSTEPPED
A command in a sequence was stepped through.
@ EVENTID_CS_COMMANDERROR
The Command Sequencer issued a command and received an error status in return.
@ EVENTID_CS_FILEREADERROR
The Sequence File Loader could not read the sequence file.
@ EVENTID_CS_SEQUENCELOADED
Sequence file was successfully loaded.
@ EVENTID_CS_COMMANDCOMPLETE
The Command Sequencer issued a command and received a success status in return.
@ EVENTID_CS_RECORDMISMATCH
Number of records in header doesn't match number in file.
@ EVENTID_CS_FILEINVALID
The sequence file format was invalid.
bool isConnected_tlmOut_OutputPort(FwIndexType portNum)
void log_ACTIVITY_HI_CS_SequenceComplete(const Fw::StringBase &fileName)
void log_WARNING_HI_CS_SequenceTimeout(const Fw::StringBase &filename, U32 command)
virtual void pingIn_handler(FwIndexType portNum, U32 key)=0
Handler for input port pingIn.
void tlmWrite_CS_Errors(U32 arg, Fw::Time _tlmTime=Fw::Time())
Svc::InputSchedPort * get_schedIn_InputPort(FwIndexType portNum)
Svc::InputCmdSeqInPort * get_seqRunIn_InputPort(FwIndexType portNum)
void pingOut_out(FwIndexType portNum, U32 key)
Invoke output port pingOut.
void set_timeCaller_OutputPort(FwIndexType portNum, Fw::InputTimePort *port)
Connect port to timeCaller[portNum].
void CS_AUTO_cmdHandlerBase(FwOpcodeType opCode, U32 cmdSeq, Fw::CmdArgBuffer &args)
void log_ACTIVITY_HI_CS_ModeSwitched(Svc::CmdSequencer_SeqMode mode)
Fw::InputCmdResponsePort * get_cmdResponseIn_InputPort(FwIndexType portNum)
void set_comCmdOut_OutputPort(FwIndexType portNum, Fw::InputComPort *port)
Connect port to comCmdOut[portNum].
void regCommands()
Register commands with the Command Dispatcher.
void set_seqDone_OutputPort(FwIndexType portNum, Fw::InputCmdResponsePort *port)
Connect port to seqDone[portNum].
virtual void CS_VALIDATE_preMsgHook(FwOpcodeType opCode, U32 cmdSeq)
Pre-message hook for command CS_VALIDATE.
void log_ACTIVITY_HI_CS_SequenceCanceled(const Fw::StringBase &fileName)
void log_WARNING_HI_CS_FileInvalid(const Fw::StringBase &fileName, Svc::CmdSequencer_FileReadStage stage, I32 error)
void log_WARNING_HI_CS_FileCrcFailure(const Fw::StringBase &fileName, U32 storedCRC, U32 computedCRC)
virtual void CS_MANUAL_preMsgHook(FwOpcodeType opCode, U32 cmdSeq)
Pre-message hook for command CS_MANUAL.
bool isConnected_logOut_OutputPort(FwIndexType portNum)
void cmdResponse_out(FwOpcodeType opCode, U32 cmdSeq, Fw::CmdResponse response)
Emit command response.
void log_ACTIVITY_HI_CS_PortSequenceStarted(const Fw::StringBase &filename)
bool isConnected_comCmdOut_OutputPort(FwIndexType portNum)
FwIndexType getNum_cmdResponseIn_InputPorts() const
void pingIn_handlerBase(FwIndexType portNum, U32 key)
Handler base-class function for input port pingIn.
void set_logOut_OutputPort(FwIndexType portNum, Fw::InputLogPort *port)
Connect port to logOut[portNum].
virtual void schedIn_handler(FwIndexType portNum, U32 context)=0
Handler for input port schedIn.
virtual void seqRunIn_handler(FwIndexType portNum, const Fw::StringBase &filename)=0
Handler for input port seqRunIn.
virtual void cmdResponseIn_preMsgHook(FwIndexType portNum, FwOpcodeType opCode, U32 cmdSeq, const Fw::CmdResponse &response)
Pre-message hook for async input port cmdResponseIn.
void log_ACTIVITY_HI_CS_SequenceValid(const Fw::StringBase &filename)
void set_pingOut_OutputPort(FwIndexType portNum, Svc::InputPingPort *port)
Connect port to pingOut[portNum].
Svc::InputPingPort * get_pingIn_InputPort(FwIndexType portNum)
virtual void CS_CANCEL_cmdHandler(FwOpcodeType opCode, U32 cmdSeq)=0
void comCmdOut_out(FwIndexType portNum, Fw::ComBuffer &data, U32 context)
Invoke output port comCmdOut.
void CS_VALIDATE_cmdHandlerBase(FwOpcodeType opCode, U32 cmdSeq, Fw::CmdArgBuffer &args)
FwIndexType getNum_seqStartOut_OutputPorts() const
void log_WARNING_HI_CS_RecordInvalid(const Fw::StringBase &fileName, U32 recordNumber, I32 error)
void CS_STEP_cmdHandlerBase(FwOpcodeType opCode, U32 cmdSeq, Fw::CmdArgBuffer &args)
void log_ACTIVITY_LO_CS_SequenceLoaded(const Fw::StringBase &fileName)
void log_WARNING_HI_CS_FileSizeError(const Fw::StringBase &fileName, U32 size)
virtual void CS_JOIN_WAIT_preMsgHook(FwOpcodeType opCode, U32 cmdSeq)
Pre-message hook for command CS_JOIN_WAIT.
virtual void schedIn_preMsgHook(FwIndexType portNum, U32 context)
Pre-message hook for async input port schedIn.
CmdSequencerComponentBase(const char *compName="")
Construct CmdSequencerComponentBase object.
virtual void CS_AUTO_preMsgHook(FwOpcodeType opCode, U32 cmdSeq)
Pre-message hook for command CS_AUTO.
virtual void CS_RUN_cmdHandler(FwOpcodeType opCode, U32 cmdSeq, const Fw::CmdStringArg &fileName, Svc::CmdSequencer_BlockState block)=0
void log_ACTIVITY_HI_CS_JoinWaiting(const Fw::StringBase &filename, U32 recordNumber, U32 opCode)
void set_cmdRegOut_OutputPort(FwIndexType portNum, Fw::InputCmdRegPort *port)
Connect port to cmdRegOut[portNum].
void CS_JOIN_WAIT_cmdHandlerBase(FwOpcodeType opCode, U32 cmdSeq, Fw::CmdArgBuffer &args)
void set_seqStartOut_OutputPort(FwIndexType portNum, Svc::InputCmdSeqInPort *port)
Connect port to seqStartOut[portNum].
@ OPCODE_CS_CANCEL
Cancel a command sequence.
@ OPCODE_CS_STEP
Perform one step in a command sequence. Valid only if CmdSequencer is in MANUAL run mode.
@ OPCODE_CS_MANUAL
Set the run mode to MANUAL.
@ OPCODE_CS_VALIDATE
Validate a command sequence file.
@ OPCODE_CS_RUN
Run a command sequence file.
@ OPCODE_CS_START
Start running a command sequence.
@ OPCODE_CS_AUTO
Set the run mode to AUTO.
@ OPCODE_CS_JOIN_WAIT
Wait for sequences that are running to finish. Allow user to run multiple seq files in SEQ_NO_BLOCK m...
void log_WARNING_HI_CS_CommandError(const Fw::StringBase &fileName, U32 recordNumber, U32 opCode, U32 errorStatus)
void log_ACTIVITY_HI_CS_CmdStarted(const Fw::StringBase &filename)
virtual void seqCancelIn_handler(FwIndexType portNum)=0
Handler for input port seqCancelIn.
void tlmWrite_CS_LoadCommands(U32 arg, Fw::Time _tlmTime=Fw::Time())
void tlmWrite_CS_SequencesCompleted(U32 arg, Fw::Time _tlmTime=Fw::Time())
virtual void CS_VALIDATE_cmdHandler(FwOpcodeType opCode, U32 cmdSeq, const Fw::CmdStringArg &fileName)=0