F´ Flight Software - C/C++ Documentation  devel
A framework for building embedded system applications to NASA flight quality standards.
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
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 {
130  };
131 
133  enum {
139  };
140 
141  public:
142 
143  // ----------------------------------------------------------------------
144  // Component initialization
145  // ----------------------------------------------------------------------
146 
148  void init(
149  FwSizeType queueDepth,
150  FwEnumStoreType instance = 0
151  );
152 
153  public:
154 
155  // ----------------------------------------------------------------------
156  // Getters for special input ports
157  // ----------------------------------------------------------------------
158 
163  FwIndexType portNum
164  );
165 
166  public:
167 
168  // ----------------------------------------------------------------------
169  // Getters for typed input ports
170  // ----------------------------------------------------------------------
171 
176  FwIndexType portNum
177  );
178 
183  FwIndexType portNum
184  );
185 
190  FwIndexType portNum
191  );
192 
197  FwIndexType portNum
198  );
199 
204  FwIndexType portNum
205  );
206 
207  public:
208 
209  // ----------------------------------------------------------------------
210  // Connect input ports to special output ports
211  // ----------------------------------------------------------------------
212 
213 #if FW_ENABLE_TEXT_LOGGING == 1
214 
216  void set_LogText_OutputPort(
217  FwIndexType portNum,
218  Fw::InputLogTextPort* port
219  );
220 
221 #endif
222 
225  FwIndexType portNum,
226  Fw::InputCmdRegPort* port
227  );
228 
231  FwIndexType portNum,
233  );
234 
237  FwIndexType portNum,
238  Fw::InputLogPort* port
239  );
240 
243  FwIndexType portNum,
244  Fw::InputTimePort* port
245  );
246 
249  FwIndexType portNum,
250  Fw::InputTlmPort* port
251  );
252 
253  public:
254 
255  // ----------------------------------------------------------------------
256  // Connect typed input ports to typed output ports
257  // ----------------------------------------------------------------------
258 
261  FwIndexType portNum,
262  Fw::InputComPort* port
263  );
264 
267  FwIndexType portNum,
268  Svc::InputPingPort* port
269  );
270 
273  FwIndexType portNum,
275  );
276 
279  FwIndexType portNum,
281  );
282 
283 #if FW_PORT_SERIALIZATION
284 
285  public:
286 
287  // ----------------------------------------------------------------------
288  // Connect serial input ports to special output ports
289  // ----------------------------------------------------------------------
290 
291 #if FW_ENABLE_TEXT_LOGGING == 1
292 
294  void set_LogText_OutputPort(
295  FwIndexType portNum,
296  Fw::InputSerializePort* port
297  );
298 
299 #endif
300 
303  FwIndexType portNum,
304  Fw::InputSerializePort* port
305  );
306 
309  FwIndexType portNum,
310  Fw::InputSerializePort* port
311  );
312 
315  FwIndexType portNum,
316  Fw::InputSerializePort* port
317  );
318 
321  FwIndexType portNum,
322  Fw::InputSerializePort* port
323  );
324 
327  FwIndexType portNum,
328  Fw::InputSerializePort* port
329  );
330 
331 #endif
332 
333 #if FW_PORT_SERIALIZATION
334 
335  public:
336 
337  // ----------------------------------------------------------------------
338  // Connect serial input ports to typed output ports
339  // ----------------------------------------------------------------------
340 
343  FwIndexType portNum,
344  Fw::InputSerializePort* port
345  );
346 
349  FwIndexType portNum,
350  Fw::InputSerializePort* port
351  );
352 
355  FwIndexType portNum,
356  Fw::InputSerializePort* port
357  );
358 
361  FwIndexType portNum,
362  Fw::InputSerializePort* port
363  );
364 
365 #endif
366 
367  public:
368 
369  // ----------------------------------------------------------------------
370  // Command registration
371  // ----------------------------------------------------------------------
372 
376  void regCommands();
377 
378  PROTECTED:
379 
380  // ----------------------------------------------------------------------
381  // Component construction and destruction
382  // ----------------------------------------------------------------------
383 
386  const char* compName = ""
387  );
388 
390  virtual ~CmdSequencerComponentBase();
391 
392  PROTECTED:
393 
394  // ----------------------------------------------------------------------
395  // Getters for numbers of special input ports
396  // ----------------------------------------------------------------------
397 
402 
403  PROTECTED:
404 
405  // ----------------------------------------------------------------------
406  // Getters for numbers of typed input ports
407  // ----------------------------------------------------------------------
408 
413 
418 
423 
428 
433 
434  PROTECTED:
435 
436  // ----------------------------------------------------------------------
437  // Getters for numbers of special output ports
438  // ----------------------------------------------------------------------
439 
440 #if FW_ENABLE_TEXT_LOGGING == 1
441 
445  FwIndexType getNum_LogText_OutputPorts() const;
446 
447 #endif
448 
453 
458 
463 
468 
473 
474  PROTECTED:
475 
476  // ----------------------------------------------------------------------
477  // Getters for numbers of typed output ports
478  // ----------------------------------------------------------------------
479 
484 
489 
494 
499 
500  PROTECTED:
501 
502  // ----------------------------------------------------------------------
503  // Connection status queries for special output ports
504  // ----------------------------------------------------------------------
505 
506 #if FW_ENABLE_TEXT_LOGGING == 1
507 
511  bool isConnected_LogText_OutputPort(
512  FwIndexType portNum
513  );
514 
515 #endif
516 
521  FwIndexType portNum
522  );
523 
528  FwIndexType portNum
529  );
530 
535  FwIndexType portNum
536  );
537 
542  FwIndexType portNum
543  );
544 
549  FwIndexType portNum
550  );
551 
552  PROTECTED:
553 
554  // ----------------------------------------------------------------------
555  // Connection status queries for typed output ports
556  // ----------------------------------------------------------------------
557 
562  FwIndexType portNum
563  );
564 
569  FwIndexType portNum
570  );
571 
576  FwIndexType portNum
577  );
578 
583  FwIndexType portNum
584  );
585 
586  PROTECTED:
587 
588  // ----------------------------------------------------------------------
589  // Handlers to implement for typed input ports
590  // ----------------------------------------------------------------------
591 
593  virtual void cmdResponseIn_handler(
594  FwIndexType portNum,
595  FwOpcodeType opCode,
596  U32 cmdSeq,
597  const Fw::CmdResponse& response
598  ) = 0;
599 
601  virtual void pingIn_handler(
602  FwIndexType portNum,
603  U32 key
604  ) = 0;
605 
607  virtual void schedIn_handler(
608  FwIndexType portNum,
609  U32 context
610  ) = 0;
611 
613  virtual void seqCancelIn_handler(
614  FwIndexType portNum
615  ) = 0;
616 
618  virtual void seqRunIn_handler(
619  FwIndexType portNum,
620  const Fw::StringBase& filename
621  ) = 0;
622 
623  PROTECTED:
624 
625  // ----------------------------------------------------------------------
626  // Port handler base-class functions for typed input ports
627  //
628  // Call these functions directly to bypass the corresponding ports
629  // ----------------------------------------------------------------------
630 
633  FwIndexType portNum,
634  FwOpcodeType opCode,
635  U32 cmdSeq,
636  const Fw::CmdResponse& response
637  );
638 
640  void pingIn_handlerBase(
641  FwIndexType portNum,
642  U32 key
643  );
644 
646  void schedIn_handlerBase(
647  FwIndexType portNum,
648  U32 context
649  );
650 
653  FwIndexType portNum
654  );
655 
658  FwIndexType portNum,
659  const Fw::StringBase& filename
660  );
661 
662  PROTECTED:
663 
664  // ----------------------------------------------------------------------
665  // Pre-message hooks for typed async input ports
666  //
667  // Each of these functions is invoked just before processing a message
668  // on the corresponding port. By default, they do nothing. You can
669  // override them to provide specific pre-message behavior.
670  // ----------------------------------------------------------------------
671 
673  virtual void cmdResponseIn_preMsgHook(
674  FwIndexType portNum,
675  FwOpcodeType opCode,
676  U32 cmdSeq,
677  const Fw::CmdResponse& response
678  );
679 
681  virtual void pingIn_preMsgHook(
682  FwIndexType portNum,
683  U32 key
684  );
685 
687  virtual void schedIn_preMsgHook(
688  FwIndexType portNum,
689  U32 context
690  );
691 
693  virtual void seqCancelIn_preMsgHook(
694  FwIndexType portNum
695  );
696 
698  virtual void seqRunIn_preMsgHook(
699  FwIndexType portNum,
700  const Fw::StringBase& filename
701  );
702 
703  PROTECTED:
704 
705  // ----------------------------------------------------------------------
706  // Invocation functions for typed output ports
707  // ----------------------------------------------------------------------
708 
710  void comCmdOut_out(
711  FwIndexType portNum,
712  Fw::ComBuffer& data,
713  U32 context
714  );
715 
717  void pingOut_out(
718  FwIndexType portNum,
719  U32 key
720  );
721 
723  void seqDone_out(
724  FwIndexType portNum,
725  FwOpcodeType opCode,
726  U32 cmdSeq,
727  const Fw::CmdResponse& response
728  );
729 
731  void seqStartOut_out(
732  FwIndexType portNum,
733  const Fw::StringBase& filename
734  );
735 
736  PROTECTED:
737 
738  // ----------------------------------------------------------------------
739  // Command response
740  // ----------------------------------------------------------------------
741 
743  void cmdResponse_out(
744  FwOpcodeType opCode,
745  U32 cmdSeq,
746  Fw::CmdResponse response
747  );
748 
749  PROTECTED:
750 
751  // ----------------------------------------------------------------------
752  // Command handlers to implement
753  // ----------------------------------------------------------------------
754 
758  virtual void CS_RUN_cmdHandler(
759  FwOpcodeType opCode,
760  U32 cmdSeq,
761  const Fw::CmdStringArg& fileName,
763  ) = 0;
764 
769  FwOpcodeType opCode,
770  U32 cmdSeq,
771  const Fw::CmdStringArg& fileName
772  ) = 0;
773 
777  virtual void CS_CANCEL_cmdHandler(
778  FwOpcodeType opCode,
779  U32 cmdSeq
780  ) = 0;
781 
785  virtual void CS_START_cmdHandler(
786  FwOpcodeType opCode,
787  U32 cmdSeq
788  ) = 0;
789 
793  virtual void CS_STEP_cmdHandler(
794  FwOpcodeType opCode,
795  U32 cmdSeq
796  ) = 0;
797 
801  virtual void CS_AUTO_cmdHandler(
802  FwOpcodeType opCode,
803  U32 cmdSeq
804  ) = 0;
805 
809  virtual void CS_MANUAL_cmdHandler(
810  FwOpcodeType opCode,
811  U32 cmdSeq
812  ) = 0;
813 
818  FwOpcodeType opCode,
819  U32 cmdSeq
820  ) = 0;
821 
822  PROTECTED:
823 
824  // ----------------------------------------------------------------------
825  // Command handler base-class functions
826  //
827  // Call these functions directly to bypass the command input port
828  // ----------------------------------------------------------------------
829 
834  FwOpcodeType opCode,
835  U32 cmdSeq,
836  Fw::CmdArgBuffer& args
837  );
838 
843  FwOpcodeType opCode,
844  U32 cmdSeq,
845  Fw::CmdArgBuffer& args
846  );
847 
852  FwOpcodeType opCode,
853  U32 cmdSeq,
854  Fw::CmdArgBuffer& args
855  );
856 
861  FwOpcodeType opCode,
862  U32 cmdSeq,
863  Fw::CmdArgBuffer& args
864  );
865 
870  FwOpcodeType opCode,
871  U32 cmdSeq,
872  Fw::CmdArgBuffer& args
873  );
874 
879  FwOpcodeType opCode,
880  U32 cmdSeq,
881  Fw::CmdArgBuffer& args
882  );
883 
888  FwOpcodeType opCode,
889  U32 cmdSeq,
890  Fw::CmdArgBuffer& args
891  );
892 
897  FwOpcodeType opCode,
898  U32 cmdSeq,
899  Fw::CmdArgBuffer& args
900  );
901 
902  PROTECTED:
903 
904  // ----------------------------------------------------------------------
905  // Pre-message hooks for async commands
906  //
907  // Each of these functions is invoked just before processing the
908  // corresponding command. By default they do nothing. You can
909  // override them to provide specific pre-command behavior.
910  // ----------------------------------------------------------------------
911 
913  virtual void CS_RUN_preMsgHook(
914  FwOpcodeType opCode,
915  U32 cmdSeq
916  );
917 
919  virtual void CS_VALIDATE_preMsgHook(
920  FwOpcodeType opCode,
921  U32 cmdSeq
922  );
923 
925  virtual void CS_CANCEL_preMsgHook(
926  FwOpcodeType opCode,
927  U32 cmdSeq
928  );
929 
931  virtual void CS_START_preMsgHook(
932  FwOpcodeType opCode,
933  U32 cmdSeq
934  );
935 
937  virtual void CS_STEP_preMsgHook(
938  FwOpcodeType opCode,
939  U32 cmdSeq
940  );
941 
943  virtual void CS_AUTO_preMsgHook(
944  FwOpcodeType opCode,
945  U32 cmdSeq
946  );
947 
949  virtual void CS_MANUAL_preMsgHook(
950  FwOpcodeType opCode,
951  U32 cmdSeq
952  );
953 
955  virtual void CS_JOIN_WAIT_preMsgHook(
956  FwOpcodeType opCode,
957  U32 cmdSeq
958  );
959 
960  PROTECTED:
961 
962  // ----------------------------------------------------------------------
963  // Event logging functions
964  // ----------------------------------------------------------------------
965 
970  const Fw::StringBase& fileName
971  );
972 
977  const Fw::StringBase& fileName
978  );
979 
984  const Fw::StringBase& fileName
985  );
986 
991  const Fw::StringBase& fileName,
993  I32 error
994  );
995 
1000  const Fw::StringBase& fileName,
1001  U32 recordNumber,
1002  I32 error
1003  );
1004 
1009  const Fw::StringBase& fileName,
1010  U32 size
1011  );
1012 
1017  const Fw::StringBase& fileName
1018  );
1019 
1024  const Fw::StringBase& fileName,
1025  U32 storedCRC,
1026  U32 computedCRC
1027  );
1028 
1033  const Fw::StringBase& fileName,
1034  U32 recordNumber,
1035  U32 opCode
1036  );
1037 
1042  const Fw::StringBase& fileName
1043  );
1044 
1049  const Fw::StringBase& fileName,
1050  U32 recordNumber,
1051  U32 opCode,
1052  U32 errorStatus
1053  );
1054 
1059 
1064  const Fw::StringBase& fileName,
1065  U32 header_records,
1066  U32 extra_bytes
1067  );
1068 
1073  const Fw::StringBase& fileName,
1074  U16 time_base,
1075  U16 seq_time_base
1076  );
1077 
1082  const Fw::StringBase& fileName,
1083  U8 currTimeBase,
1084  U8 seqTimeBase
1085  );
1086 
1091  const Fw::StringBase& filename
1092  );
1093 
1098  U32 opcode
1099  );
1100 
1106  );
1107 
1112 
1117  const Fw::StringBase& filename
1118  );
1119 
1124  const Fw::StringBase& filename,
1125  U32 command
1126  );
1127 
1132  const Fw::StringBase& filename,
1133  U32 command
1134  );
1135 
1140  const Fw::StringBase& filename
1141  );
1142 
1147  const Fw::StringBase& filename,
1148  U32 recordNumber,
1149  U32 opCode
1150  );
1151 
1156 
1159  const Fw::StringBase& fileName
1160  );
1161 
1162  PROTECTED:
1163 
1164  // ----------------------------------------------------------------------
1165  // Telemetry write functions
1166  // ----------------------------------------------------------------------
1167 
1172  U32 arg,
1173  Fw::Time _tlmTime = Fw::Time()
1174  );
1175 
1180  U32 arg,
1181  Fw::Time _tlmTime = Fw::Time()
1182  );
1183 
1187  void tlmWrite_CS_Errors(
1188  U32 arg,
1189  Fw::Time _tlmTime = Fw::Time()
1190  );
1191 
1196  U32 arg,
1197  Fw::Time _tlmTime = Fw::Time()
1198  );
1199 
1204  U32 arg,
1205  Fw::Time _tlmTime = Fw::Time()
1206  );
1207 
1208  PROTECTED:
1209 
1210  // ----------------------------------------------------------------------
1211  // Time
1212  // ----------------------------------------------------------------------
1213 
1217  Fw::Time getTime();
1218 
1219  PRIVATE:
1220 
1221  // ----------------------------------------------------------------------
1222  // Message dispatch functions
1223  // ----------------------------------------------------------------------
1224 
1226  virtual MsgDispatchStatus doDispatch();
1227 
1228  PRIVATE:
1229 
1230  // ----------------------------------------------------------------------
1231  // Calls for messages received on special input ports
1232  // ----------------------------------------------------------------------
1233 
1235  static void m_p_cmdIn_in(
1236  Fw::PassiveComponentBase* callComp,
1237  FwIndexType portNum,
1238  FwOpcodeType opCode,
1239  U32 cmdSeq,
1240  Fw::CmdArgBuffer& args
1241  );
1242 
1243  PRIVATE:
1244 
1245  // ----------------------------------------------------------------------
1246  // Calls for messages received on typed input ports
1247  // ----------------------------------------------------------------------
1248 
1250  static void m_p_cmdResponseIn_in(
1251  Fw::PassiveComponentBase* callComp,
1252  FwIndexType portNum,
1253  FwOpcodeType opCode,
1254  U32 cmdSeq,
1255  const Fw::CmdResponse& response
1256  );
1257 
1259  static void m_p_pingIn_in(
1260  Fw::PassiveComponentBase* callComp,
1261  FwIndexType portNum,
1262  U32 key
1263  );
1264 
1266  static void m_p_schedIn_in(
1267  Fw::PassiveComponentBase* callComp,
1268  FwIndexType portNum,
1269  U32 context
1270  );
1271 
1273  static void m_p_seqCancelIn_in(
1274  Fw::PassiveComponentBase* callComp,
1275  FwIndexType portNum
1276  );
1277 
1279  static void m_p_seqRunIn_in(
1280  Fw::PassiveComponentBase* callComp,
1281  FwIndexType portNum,
1282  const Fw::StringBase& filename
1283  );
1284 
1285  PRIVATE:
1286 
1287  // ----------------------------------------------------------------------
1288  // Special input ports
1289  // ----------------------------------------------------------------------
1290 
1292  Fw::InputCmdPort m_cmdIn_InputPort[NUM_CMDIN_INPUT_PORTS];
1293 
1294  PRIVATE:
1295 
1296  // ----------------------------------------------------------------------
1297  // Typed input ports
1298  // ----------------------------------------------------------------------
1299 
1301  Fw::InputCmdResponsePort m_cmdResponseIn_InputPort[NUM_CMDRESPONSEIN_INPUT_PORTS];
1302 
1304  Svc::InputPingPort m_pingIn_InputPort[NUM_PINGIN_INPUT_PORTS];
1305 
1307  Svc::InputSchedPort m_schedIn_InputPort[NUM_SCHEDIN_INPUT_PORTS];
1308 
1311 
1313  Svc::InputCmdSeqInPort m_seqRunIn_InputPort[NUM_SEQRUNIN_INPUT_PORTS];
1314 
1315  PRIVATE:
1316 
1317  // ----------------------------------------------------------------------
1318  // Special output ports
1319  // ----------------------------------------------------------------------
1320 
1321 #if FW_ENABLE_TEXT_LOGGING == 1
1322 
1324  Fw::OutputLogTextPort m_LogText_OutputPort[NUM_LOGTEXT_OUTPUT_PORTS];
1325 
1326 #endif
1327 
1329  Fw::OutputCmdRegPort m_cmdRegOut_OutputPort[NUM_CMDREGOUT_OUTPUT_PORTS];
1330 
1332  Fw::OutputCmdResponsePort m_cmdResponseOut_OutputPort[NUM_CMDRESPONSEOUT_OUTPUT_PORTS];
1333 
1335  Fw::OutputLogPort m_logOut_OutputPort[NUM_LOGOUT_OUTPUT_PORTS];
1336 
1338  Fw::OutputTimePort m_timeCaller_OutputPort[NUM_TIMECALLER_OUTPUT_PORTS];
1339 
1341  Fw::OutputTlmPort m_tlmOut_OutputPort[NUM_TLMOUT_OUTPUT_PORTS];
1342 
1343  PRIVATE:
1344 
1345  // ----------------------------------------------------------------------
1346  // Typed output ports
1347  // ----------------------------------------------------------------------
1348 
1350  Fw::OutputComPort m_comCmdOut_OutputPort[NUM_COMCMDOUT_OUTPUT_PORTS];
1351 
1353  Svc::OutputPingPort m_pingOut_OutputPort[NUM_PINGOUT_OUTPUT_PORTS];
1354 
1357 
1359  Svc::OutputCmdSeqInPort m_seqStartOut_OutputPort[NUM_SEQSTARTOUT_OUTPUT_PORTS];
1360 
1361  };
1362 
1363 }
1364 
1365 #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)
@ 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 seqCancelIn_handlerBase(FwIndexType portNum)
Handler base-class function for input port seqCancelIn.
void log_WARNING_HI_CS_FileNotFound(const Fw::StringBase &fileName)
void log_WARNING_LO_CS_NoRecords(const Fw::StringBase &fileName)
Log event CS_NoRecords.
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.
@ 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 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
@ 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...
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].
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