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 {
87  };
88 
90  enum {
91  OPCODE_CS_RUN = 0x0,
99  };
100 
102  enum {
128  };
129 
131  enum {
137  };
138 
139  public:
140 
141  // ----------------------------------------------------------------------
142  // Component initialization
143  // ----------------------------------------------------------------------
144 
146  void init(
147  FwQueueSizeType queueDepth,
148  FwEnumStoreType instance = 0
149  );
150 
151  public:
152 
153  // ----------------------------------------------------------------------
154  // Getters for special input ports
155  // ----------------------------------------------------------------------
156 
161  FwIndexType portNum
162  );
163 
164  public:
165 
166  // ----------------------------------------------------------------------
167  // Getters for typed input ports
168  // ----------------------------------------------------------------------
169 
174  FwIndexType portNum
175  );
176 
181  FwIndexType portNum
182  );
183 
188  FwIndexType portNum
189  );
190 
195  FwIndexType portNum
196  );
197 
202  FwIndexType portNum
203  );
204 
205  public:
206 
207  // ----------------------------------------------------------------------
208  // Connect input ports to special output ports
209  // ----------------------------------------------------------------------
210 
211 #if FW_ENABLE_TEXT_LOGGING == 1
212 
214  void set_LogText_OutputPort(
215  FwIndexType portNum,
216  Fw::InputLogTextPort* port
217  );
218 
219 #endif
220 
223  FwIndexType portNum,
224  Fw::InputCmdRegPort* port
225  );
226 
229  FwIndexType portNum,
231  );
232 
235  FwIndexType portNum,
236  Fw::InputLogPort* port
237  );
238 
241  FwIndexType portNum,
242  Fw::InputTimePort* port
243  );
244 
247  FwIndexType portNum,
248  Fw::InputTlmPort* port
249  );
250 
251  public:
252 
253  // ----------------------------------------------------------------------
254  // Connect typed input ports to typed output ports
255  // ----------------------------------------------------------------------
256 
259  FwIndexType portNum,
260  Fw::InputComPort* port
261  );
262 
265  FwIndexType portNum,
266  Svc::InputPingPort* port
267  );
268 
271  FwIndexType portNum,
273  );
274 
275 #if FW_PORT_SERIALIZATION
276 
277  public:
278 
279  // ----------------------------------------------------------------------
280  // Connect serial input ports to special output ports
281  // ----------------------------------------------------------------------
282 
283 #if FW_ENABLE_TEXT_LOGGING == 1
284 
286  void set_LogText_OutputPort(
287  FwIndexType portNum,
288  Fw::InputSerializePort* port
289  );
290 
291 #endif
292 
295  FwIndexType portNum,
296  Fw::InputSerializePort* port
297  );
298 
301  FwIndexType portNum,
302  Fw::InputSerializePort* port
303  );
304 
307  FwIndexType portNum,
308  Fw::InputSerializePort* port
309  );
310 
313  FwIndexType portNum,
314  Fw::InputSerializePort* port
315  );
316 
319  FwIndexType portNum,
320  Fw::InputSerializePort* port
321  );
322 
323 #endif
324 
325 #if FW_PORT_SERIALIZATION
326 
327  public:
328 
329  // ----------------------------------------------------------------------
330  // Connect serial input ports to typed output ports
331  // ----------------------------------------------------------------------
332 
335  FwIndexType portNum,
336  Fw::InputSerializePort* port
337  );
338 
341  FwIndexType portNum,
342  Fw::InputSerializePort* port
343  );
344 
347  FwIndexType portNum,
348  Fw::InputSerializePort* port
349  );
350 
351 #endif
352 
353  public:
354 
355  // ----------------------------------------------------------------------
356  // Command registration
357  // ----------------------------------------------------------------------
358 
362  void regCommands();
363 
364  PROTECTED:
365 
366  // ----------------------------------------------------------------------
367  // Component construction and destruction
368  // ----------------------------------------------------------------------
369 
372  const char* compName = ""
373  );
374 
376  virtual ~CmdSequencerComponentBase();
377 
378  PROTECTED:
379 
380  // ----------------------------------------------------------------------
381  // Getters for numbers of special input ports
382  // ----------------------------------------------------------------------
383 
388 
389  PROTECTED:
390 
391  // ----------------------------------------------------------------------
392  // Getters for numbers of typed input ports
393  // ----------------------------------------------------------------------
394 
399 
404 
409 
414 
419 
420  PROTECTED:
421 
422  // ----------------------------------------------------------------------
423  // Getters for numbers of special output ports
424  // ----------------------------------------------------------------------
425 
426 #if FW_ENABLE_TEXT_LOGGING == 1
427 
431  FwIndexType getNum_LogText_OutputPorts() const;
432 
433 #endif
434 
439 
444 
449 
454 
459 
460  PROTECTED:
461 
462  // ----------------------------------------------------------------------
463  // Getters for numbers of typed output ports
464  // ----------------------------------------------------------------------
465 
470 
475 
480 
481  PROTECTED:
482 
483  // ----------------------------------------------------------------------
484  // Connection status queries for special output ports
485  // ----------------------------------------------------------------------
486 
487 #if FW_ENABLE_TEXT_LOGGING == 1
488 
492  bool isConnected_LogText_OutputPort(
493  FwIndexType portNum
494  );
495 
496 #endif
497 
502  FwIndexType portNum
503  );
504 
509  FwIndexType portNum
510  );
511 
516  FwIndexType portNum
517  );
518 
523  FwIndexType portNum
524  );
525 
530  FwIndexType portNum
531  );
532 
533  PROTECTED:
534 
535  // ----------------------------------------------------------------------
536  // Connection status queries for typed output ports
537  // ----------------------------------------------------------------------
538 
543  FwIndexType portNum
544  );
545 
550  FwIndexType portNum
551  );
552 
557  FwIndexType portNum
558  );
559 
560  PROTECTED:
561 
562  // ----------------------------------------------------------------------
563  // Handlers to implement for typed input ports
564  // ----------------------------------------------------------------------
565 
567  virtual void cmdResponseIn_handler(
568  FwIndexType portNum,
569  FwOpcodeType opCode,
570  U32 cmdSeq,
571  const Fw::CmdResponse& response
572  ) = 0;
573 
575  virtual void pingIn_handler(
576  FwIndexType portNum,
577  U32 key
578  ) = 0;
579 
581  virtual void schedIn_handler(
582  FwIndexType portNum,
583  U32 context
584  ) = 0;
585 
587  virtual void seqCancelIn_handler(
588  FwIndexType portNum
589  ) = 0;
590 
592  virtual void seqRunIn_handler(
593  FwIndexType portNum,
594  Fw::String& filename
595  ) = 0;
596 
597  PROTECTED:
598 
599  // ----------------------------------------------------------------------
600  // Port handler base-class functions for typed input ports
601  //
602  // Call these functions directly to bypass the corresponding ports
603  // ----------------------------------------------------------------------
604 
607  FwIndexType portNum,
608  FwOpcodeType opCode,
609  U32 cmdSeq,
610  const Fw::CmdResponse& response
611  );
612 
614  void pingIn_handlerBase(
615  FwIndexType portNum,
616  U32 key
617  );
618 
620  void schedIn_handlerBase(
621  FwIndexType portNum,
622  U32 context
623  );
624 
627  FwIndexType portNum
628  );
629 
632  FwIndexType portNum,
633  Fw::String& filename
634  );
635 
636  PROTECTED:
637 
638  // ----------------------------------------------------------------------
639  // Pre-message hooks for typed async input ports
640  //
641  // Each of these functions is invoked just before processing a message
642  // on the corresponding port. By default, they do nothing. You can
643  // override them to provide specific pre-message behavior.
644  // ----------------------------------------------------------------------
645 
647  virtual void cmdResponseIn_preMsgHook(
648  FwIndexType portNum,
649  FwOpcodeType opCode,
650  U32 cmdSeq,
651  const Fw::CmdResponse& response
652  );
653 
655  virtual void pingIn_preMsgHook(
656  FwIndexType portNum,
657  U32 key
658  );
659 
661  virtual void schedIn_preMsgHook(
662  FwIndexType portNum,
663  U32 context
664  );
665 
667  virtual void seqCancelIn_preMsgHook(
668  FwIndexType portNum
669  );
670 
672  virtual void seqRunIn_preMsgHook(
673  FwIndexType portNum,
674  Fw::String& filename
675  );
676 
677  PROTECTED:
678 
679  // ----------------------------------------------------------------------
680  // Invocation functions for typed output ports
681  // ----------------------------------------------------------------------
682 
684  void comCmdOut_out(
685  FwIndexType portNum,
686  Fw::ComBuffer& data,
687  U32 context
688  );
689 
691  void pingOut_out(
692  FwIndexType portNum,
693  U32 key
694  );
695 
697  void seqDone_out(
698  FwIndexType portNum,
699  FwOpcodeType opCode,
700  U32 cmdSeq,
701  const Fw::CmdResponse& response
702  );
703 
704  PROTECTED:
705 
706  // ----------------------------------------------------------------------
707  // Command response
708  // ----------------------------------------------------------------------
709 
711  void cmdResponse_out(
712  FwOpcodeType opCode,
713  U32 cmdSeq,
714  Fw::CmdResponse response
715  );
716 
717  PROTECTED:
718 
719  // ----------------------------------------------------------------------
720  // Command handlers to implement
721  // ----------------------------------------------------------------------
722 
726  virtual void CS_RUN_cmdHandler(
727  FwOpcodeType opCode,
728  U32 cmdSeq,
729  const Fw::CmdStringArg& fileName,
731  ) = 0;
732 
737  FwOpcodeType opCode,
738  U32 cmdSeq,
739  const Fw::CmdStringArg& fileName
740  ) = 0;
741 
745  virtual void CS_CANCEL_cmdHandler(
746  FwOpcodeType opCode,
747  U32 cmdSeq
748  ) = 0;
749 
753  virtual void CS_START_cmdHandler(
754  FwOpcodeType opCode,
755  U32 cmdSeq
756  ) = 0;
757 
761  virtual void CS_STEP_cmdHandler(
762  FwOpcodeType opCode,
763  U32 cmdSeq
764  ) = 0;
765 
769  virtual void CS_AUTO_cmdHandler(
770  FwOpcodeType opCode,
771  U32 cmdSeq
772  ) = 0;
773 
777  virtual void CS_MANUAL_cmdHandler(
778  FwOpcodeType opCode,
779  U32 cmdSeq
780  ) = 0;
781 
786  FwOpcodeType opCode,
787  U32 cmdSeq
788  ) = 0;
789 
790  PROTECTED:
791 
792  // ----------------------------------------------------------------------
793  // Command handler base-class functions
794  //
795  // Call these functions directly to bypass the command input port
796  // ----------------------------------------------------------------------
797 
802  FwOpcodeType opCode,
803  U32 cmdSeq,
804  Fw::CmdArgBuffer& args
805  );
806 
811  FwOpcodeType opCode,
812  U32 cmdSeq,
813  Fw::CmdArgBuffer& args
814  );
815 
820  FwOpcodeType opCode,
821  U32 cmdSeq,
822  Fw::CmdArgBuffer& args
823  );
824 
829  FwOpcodeType opCode,
830  U32 cmdSeq,
831  Fw::CmdArgBuffer& args
832  );
833 
838  FwOpcodeType opCode,
839  U32 cmdSeq,
840  Fw::CmdArgBuffer& args
841  );
842 
847  FwOpcodeType opCode,
848  U32 cmdSeq,
849  Fw::CmdArgBuffer& args
850  );
851 
856  FwOpcodeType opCode,
857  U32 cmdSeq,
858  Fw::CmdArgBuffer& args
859  );
860 
865  FwOpcodeType opCode,
866  U32 cmdSeq,
867  Fw::CmdArgBuffer& args
868  );
869 
870  PROTECTED:
871 
872  // ----------------------------------------------------------------------
873  // Pre-message hooks for async commands
874  //
875  // Each of these functions is invoked just before processing the
876  // corresponding command. By default they do nothing. You can
877  // override them to provide specific pre-command behavior.
878  // ----------------------------------------------------------------------
879 
881  virtual void CS_RUN_preMsgHook(
882  FwOpcodeType opCode,
883  U32 cmdSeq
884  );
885 
887  virtual void CS_VALIDATE_preMsgHook(
888  FwOpcodeType opCode,
889  U32 cmdSeq
890  );
891 
893  virtual void CS_CANCEL_preMsgHook(
894  FwOpcodeType opCode,
895  U32 cmdSeq
896  );
897 
899  virtual void CS_START_preMsgHook(
900  FwOpcodeType opCode,
901  U32 cmdSeq
902  );
903 
905  virtual void CS_STEP_preMsgHook(
906  FwOpcodeType opCode,
907  U32 cmdSeq
908  );
909 
911  virtual void CS_AUTO_preMsgHook(
912  FwOpcodeType opCode,
913  U32 cmdSeq
914  );
915 
917  virtual void CS_MANUAL_preMsgHook(
918  FwOpcodeType opCode,
919  U32 cmdSeq
920  );
921 
923  virtual void CS_JOIN_WAIT_preMsgHook(
924  FwOpcodeType opCode,
925  U32 cmdSeq
926  );
927 
928  PROTECTED:
929 
930  // ----------------------------------------------------------------------
931  // Event logging functions
932  // ----------------------------------------------------------------------
933 
938  const Fw::StringBase& fileName
939  );
940 
945  const Fw::StringBase& fileName
946  );
947 
952  const Fw::StringBase& fileName
953  );
954 
959  const Fw::StringBase& fileName,
961  I32 error
962  );
963 
968  const Fw::StringBase& fileName,
969  U32 recordNumber,
970  I32 error
971  );
972 
977  const Fw::StringBase& fileName,
978  U32 size
979  );
980 
985  const Fw::StringBase& fileName
986  );
987 
992  const Fw::StringBase& fileName,
993  U32 storedCRC,
994  U32 computedCRC
995  );
996 
1001  const Fw::StringBase& fileName,
1002  U32 recordNumber,
1003  U32 opCode
1004  );
1005 
1010  const Fw::StringBase& fileName
1011  );
1012 
1017  const Fw::StringBase& fileName,
1018  U32 recordNumber,
1019  U32 opCode,
1020  U32 errorStatus
1021  );
1022 
1027 
1032  const Fw::StringBase& fileName,
1033  U32 header_records,
1034  U32 extra_bytes
1035  );
1036 
1041  const Fw::StringBase& fileName,
1042  U16 time_base,
1043  U16 seq_time_base
1044  );
1045 
1050  const Fw::StringBase& fileName,
1051  U8 currTimeBase,
1052  U8 seqTimeBase
1053  );
1054 
1059  const Fw::StringBase& filename
1060  );
1061 
1066  U32 opcode
1067  );
1068 
1074  );
1075 
1080 
1085  const Fw::StringBase& filename
1086  );
1087 
1092  const Fw::StringBase& filename,
1093  U32 command
1094  );
1095 
1100  const Fw::StringBase& filename,
1101  U32 command
1102  );
1103 
1108  const Fw::StringBase& filename
1109  );
1110 
1115  const Fw::StringBase& filename,
1116  U32 recordNumber,
1117  U32 opCode
1118  );
1119 
1124 
1125  PROTECTED:
1126 
1127  // ----------------------------------------------------------------------
1128  // Telemetry write functions
1129  // ----------------------------------------------------------------------
1130 
1135  U32 arg,
1136  Fw::Time _tlmTime = Fw::Time()
1137  );
1138 
1143  U32 arg,
1144  Fw::Time _tlmTime = Fw::Time()
1145  );
1146 
1150  void tlmWrite_CS_Errors(
1151  U32 arg,
1152  Fw::Time _tlmTime = Fw::Time()
1153  );
1154 
1159  U32 arg,
1160  Fw::Time _tlmTime = Fw::Time()
1161  );
1162 
1167  U32 arg,
1168  Fw::Time _tlmTime = Fw::Time()
1169  );
1170 
1171  PROTECTED:
1172 
1173  // ----------------------------------------------------------------------
1174  // Time
1175  // ----------------------------------------------------------------------
1176 
1180  Fw::Time getTime();
1181 
1182  PRIVATE:
1183 
1184  // ----------------------------------------------------------------------
1185  // Message dispatch functions
1186  // ----------------------------------------------------------------------
1187 
1189  virtual MsgDispatchStatus doDispatch();
1190 
1191  PRIVATE:
1192 
1193  // ----------------------------------------------------------------------
1194  // Calls for messages received on special input ports
1195  // ----------------------------------------------------------------------
1196 
1198  static void m_p_cmdIn_in(
1199  Fw::PassiveComponentBase* callComp,
1200  FwIndexType portNum,
1201  FwOpcodeType opCode,
1202  U32 cmdSeq,
1203  Fw::CmdArgBuffer& args
1204  );
1205 
1206  PRIVATE:
1207 
1208  // ----------------------------------------------------------------------
1209  // Calls for messages received on typed input ports
1210  // ----------------------------------------------------------------------
1211 
1213  static void m_p_cmdResponseIn_in(
1214  Fw::PassiveComponentBase* callComp,
1215  FwIndexType portNum,
1216  FwOpcodeType opCode,
1217  U32 cmdSeq,
1218  const Fw::CmdResponse& response
1219  );
1220 
1222  static void m_p_pingIn_in(
1223  Fw::PassiveComponentBase* callComp,
1224  FwIndexType portNum,
1225  U32 key
1226  );
1227 
1229  static void m_p_schedIn_in(
1230  Fw::PassiveComponentBase* callComp,
1231  FwIndexType portNum,
1232  U32 context
1233  );
1234 
1236  static void m_p_seqCancelIn_in(
1237  Fw::PassiveComponentBase* callComp,
1238  FwIndexType portNum
1239  );
1240 
1242  static void m_p_seqRunIn_in(
1243  Fw::PassiveComponentBase* callComp,
1244  FwIndexType portNum,
1245  Fw::String& filename
1246  );
1247 
1248  PRIVATE:
1249 
1250  // ----------------------------------------------------------------------
1251  // Special input ports
1252  // ----------------------------------------------------------------------
1253 
1255  Fw::InputCmdPort m_cmdIn_InputPort[NUM_CMDIN_INPUT_PORTS];
1256 
1257  PRIVATE:
1258 
1259  // ----------------------------------------------------------------------
1260  // Typed input ports
1261  // ----------------------------------------------------------------------
1262 
1264  Fw::InputCmdResponsePort m_cmdResponseIn_InputPort[NUM_CMDRESPONSEIN_INPUT_PORTS];
1265 
1267  Svc::InputPingPort m_pingIn_InputPort[NUM_PINGIN_INPUT_PORTS];
1268 
1270  Svc::InputSchedPort m_schedIn_InputPort[NUM_SCHEDIN_INPUT_PORTS];
1271 
1274 
1276  Svc::InputCmdSeqInPort m_seqRunIn_InputPort[NUM_SEQRUNIN_INPUT_PORTS];
1277 
1278  PRIVATE:
1279 
1280  // ----------------------------------------------------------------------
1281  // Special output ports
1282  // ----------------------------------------------------------------------
1283 
1284 #if FW_ENABLE_TEXT_LOGGING == 1
1285 
1287  Fw::OutputLogTextPort m_LogText_OutputPort[NUM_LOGTEXT_OUTPUT_PORTS];
1288 
1289 #endif
1290 
1292  Fw::OutputCmdRegPort m_cmdRegOut_OutputPort[NUM_CMDREGOUT_OUTPUT_PORTS];
1293 
1295  Fw::OutputCmdResponsePort m_cmdResponseOut_OutputPort[NUM_CMDRESPONSEOUT_OUTPUT_PORTS];
1296 
1298  Fw::OutputLogPort m_logOut_OutputPort[NUM_LOGOUT_OUTPUT_PORTS];
1299 
1301  Fw::OutputTimePort m_timeCaller_OutputPort[NUM_TIMECALLER_OUTPUT_PORTS];
1302 
1304  Fw::OutputTlmPort m_tlmOut_OutputPort[NUM_TLMOUT_OUTPUT_PORTS];
1305 
1306  PRIVATE:
1307 
1308  // ----------------------------------------------------------------------
1309  // Typed output ports
1310  // ----------------------------------------------------------------------
1311 
1313  Fw::OutputComPort m_comCmdOut_OutputPort[NUM_COMCMDOUT_OUTPUT_PORTS];
1314 
1316  Svc::OutputPingPort m_pingOut_OutputPort[NUM_PINGOUT_OUTPUT_PORTS];
1317 
1320 
1321  };
1322 
1323 }
1324 
1325 #endif
uint8_t U8
8-bit unsigned integer
Definition: BasicTypes.h:26
I32 FwEnumStoreType
Definition: FpConfig.h:51
FwIndexType FwQueueSizeType
Definition: FpConfig.h:117
U32 FwOpcodeType
Definition: FpConfig.h:78
PlatformIndexType FwIndexType
Definition: FpConfig.h:20
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)
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_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())
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 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.
virtual void seqRunIn_preMsgHook(FwIndexType portNum, Fw::String &filename)
Pre-message hook for async input port seqRunIn.
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)
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)
@ 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 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)
@ 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.
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
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.
@ 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...
virtual void seqRunIn_handler(FwIndexType portNum, Fw::String &filename)=0
Handler for input port seqRunIn.
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 seqRunIn_handlerBase(FwIndexType portNum, Fw::String &filename)
Handler base-class function for input port seqRunIn.
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 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)
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 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