F´ Flight Software - C/C++ Documentation
A framework for building embedded system applications to NASA flight quality standards.
SeqDispatcherComponentAc.hpp
Go to the documentation of this file.
1 // ======================================================================
2 // \title SeqDispatcherComponentAc.hpp
3 // \author Generated by fpp-to-cpp
4 // \brief hpp file for SeqDispatcher component base class
5 // ======================================================================
6 
7 #ifndef Svc_SeqDispatcherComponentAc_HPP
8 #define Svc_SeqDispatcherComponentAc_HPP
9 
10 #include <atomic>
11 
12 #include "Fw/Cmd/CmdPortAc.hpp"
13 #include "Fw/Cmd/CmdRegPortAc.hpp"
15 #include "Fw/Cmd/CmdString.hpp"
17 #include "Fw/FPrimeBasicTypes.hpp"
18 #include "Fw/Log/LogPortAc.hpp"
19 #include "Fw/Log/LogString.hpp"
20 #include "Fw/Log/LogTextPortAc.hpp"
21 #if !FW_DIRECT_PORT_CALLS
23 #endif
24 #if !FW_DIRECT_PORT_CALLS
26 #endif
27 #include "Fw/Time/TimePortAc.hpp"
28 #include "Fw/Tlm/TlmPortAc.hpp"
29 #include "Fw/Tlm/TlmString.hpp"
36 
37 namespace Svc {
38 
45  {
46 
47  // ----------------------------------------------------------------------
48  // Friend classes
49  // ----------------------------------------------------------------------
50 
54  friend class SeqDispatcherTester;
55 
56  protected:
57 
58  // ----------------------------------------------------------------------
59  // Constants
60  // ----------------------------------------------------------------------
61 
63  enum {
65  };
66 
68  enum {
72  };
73 
75  enum {
82  };
83 
85  enum {
88  };
89 
91  enum {
92  OPCODE_RUN = 0x0,
97  };
99 
101  enum {
110  };
111 
113  enum {
118  };
119 
120  public:
121 
122  // ----------------------------------------------------------------------
123  // Component initialization
124  // ----------------------------------------------------------------------
125 
127  void init(
128  FwSizeType queueDepth,
129  FwEnumStoreType instance = 0
130  );
131 
132 #if !FW_DIRECT_PORT_CALLS
133 
134  public:
135 
136  // ----------------------------------------------------------------------
137  // Getters for special input ports
138  // ----------------------------------------------------------------------
139 
144  FwIndexType portNum
145  );
146 
147 #endif
148 
149 #if !FW_DIRECT_PORT_CALLS
150 
151  public:
152 
153  // ----------------------------------------------------------------------
154  // Getters for typed input ports
155  // ----------------------------------------------------------------------
156 
161  FwIndexType portNum
162  );
163 
168  FwIndexType portNum
169  );
170 
175  FwIndexType portNum
176  );
177 
178 #endif
179 
180 #if !FW_DIRECT_PORT_CALLS
181 
182  public:
183 
184  // ----------------------------------------------------------------------
185  // Connect input ports to special output ports
186  // ----------------------------------------------------------------------
187 
190  FwIndexType portNum,
191  Fw::InputCmdRegPort* port
192  );
193 
196  FwIndexType portNum,
198  );
199 
202  FwIndexType portNum,
203  Fw::InputLogPort* port
204  );
205 
206 #if FW_ENABLE_TEXT_LOGGING == 1
207 
209  void set_logTextOut_OutputPort(
210  FwIndexType portNum,
211  Fw::InputLogTextPort* port
212  );
213 
214 #endif
215 
218  FwIndexType portNum,
219  Fw::InputTimePort* port
220  );
221 
224  FwIndexType portNum,
225  Fw::InputTlmPort* port
226  );
227 
228 #endif
229 
230 #if !FW_DIRECT_PORT_CALLS
231 
232  public:
233 
234  // ----------------------------------------------------------------------
235  // Connect typed input ports to typed output ports
236  // ----------------------------------------------------------------------
237 
240  FwIndexType portNum,
242  );
243 
246  FwIndexType portNum,
248  );
249 
250 #endif
251 
252 #if !FW_DIRECT_PORT_CALLS && FW_PORT_SERIALIZATION
253 
254  public:
255 
256  // ----------------------------------------------------------------------
257  // Connect serial input ports to special output ports
258  // ----------------------------------------------------------------------
259 
262  FwIndexType portNum,
263  Fw::InputSerializePort* port
264  );
265 
268  FwIndexType portNum,
269  Fw::InputSerializePort* port
270  );
271 
274  FwIndexType portNum,
275  Fw::InputSerializePort* port
276  );
277 
278 #if FW_ENABLE_TEXT_LOGGING == 1
279 
281  void set_logTextOut_OutputPort(
282  FwIndexType portNum,
283  Fw::InputSerializePort* port
284  );
285 
286 #endif
287 
290  FwIndexType portNum,
291  Fw::InputSerializePort* port
292  );
293 
296  FwIndexType portNum,
297  Fw::InputSerializePort* port
298  );
299 
300 #endif
301 
302 #if !FW_DIRECT_PORT_CALLS && FW_PORT_SERIALIZATION
303 
304  public:
305 
306  // ----------------------------------------------------------------------
307  // Connect serial input ports to typed output ports
308  // ----------------------------------------------------------------------
309 
312  FwIndexType portNum,
313  Fw::InputSerializePort* port
314  );
315 
318  FwIndexType portNum,
319  Fw::InputSerializePort* port
320  );
321 
322 #endif
323 
324  public:
325 
326  // ----------------------------------------------------------------------
327  // Command registration
328  // ----------------------------------------------------------------------
329 
333  void regCommands();
334 
335  protected:
336 
337  // ----------------------------------------------------------------------
338  // Component construction and destruction
339  // ----------------------------------------------------------------------
340 
343  const char* compName = ""
344  );
345 
347  virtual ~SeqDispatcherComponentBase();
348 
349  protected:
350 
351  // ----------------------------------------------------------------------
352  // Getters for numbers of special input ports
353  // ----------------------------------------------------------------------
354 
359  return NUM_CMDIN_INPUT_PORTS;
360  }
361 
362  protected:
363 
364  // ----------------------------------------------------------------------
365  // Getters for numbers of typed input ports
366  // ----------------------------------------------------------------------
367 
373  }
374 
380  }
381 
387  }
388 
389  protected:
390 
391  // ----------------------------------------------------------------------
392  // Getters for numbers of special output ports
393  // ----------------------------------------------------------------------
394 
400  }
401 
407  }
408 
414  }
415 
416 #if FW_ENABLE_TEXT_LOGGING == 1
417 
421  static constexpr FwIndexType getNum_logTextOut_OutputPorts() {
423  }
424 
425 #endif
426 
432  }
433 
439  }
440 
441  protected:
442 
443  // ----------------------------------------------------------------------
444  // Getters for numbers of typed output ports
445  // ----------------------------------------------------------------------
446 
452  }
453 
459  }
460 
461  protected:
462 
463  // ----------------------------------------------------------------------
464  // Connection status queries for special output ports
465  // ----------------------------------------------------------------------
466 
471  FwIndexType portNum
472  ) const;
473 
478  FwIndexType portNum
479  ) const;
480 
485  FwIndexType portNum
486  ) const;
487 
488 #if FW_ENABLE_TEXT_LOGGING == 1
489 
493  bool isConnected_logTextOut_OutputPort(
494  FwIndexType portNum
495  ) const;
496 
497 #endif
498 
503  FwIndexType portNum
504  ) const;
505 
510  FwIndexType portNum
511  ) const;
512 
513  protected:
514 
515  // ----------------------------------------------------------------------
516  // Connection status queries for typed output ports
517  // ----------------------------------------------------------------------
518 
523  FwIndexType portNum
524  ) const;
525 
530  FwIndexType portNum
531  ) const;
532 
533 #if FW_DIRECT_PORT_CALLS
534  public:
535 #else
536  protected:
537 #endif
538 
539  // ----------------------------------------------------------------------
540  // Port handler base-class functions for special input ports
541  //
542  // Call these functions directly to bypass the corresponding ports
543  // ----------------------------------------------------------------------
544 
546  void cmdIn_handlerBase(
547  FwIndexType portNum,
548  FwOpcodeType opCode,
549  U32 cmdSeq,
550  Fw::CmdArgBuffer& args
551  );
552 
553  protected:
554 
555  // ----------------------------------------------------------------------
556  // Handlers to implement for typed input ports
557  // ----------------------------------------------------------------------
558 
560  virtual void seqDoneIn_handler(
561  FwIndexType portNum,
562  FwOpcodeType opCode,
563  U32 cmdSeq,
564  const Fw::CmdResponse& response
565  ) = 0;
566 
568  virtual void seqRunIn_handler(
569  FwIndexType portNum,
570  const Fw::StringBase& filename,
571  const Svc::SeqArgs& args
572  ) = 0;
573 
575  virtual void seqStartIn_handler(
576  FwIndexType portNum,
577  const Fw::StringBase& filename,
578  const Svc::SeqArgs& args
579  ) = 0;
580 
581 #if FW_DIRECT_PORT_CALLS
582  public:
583 #else
584  protected:
585 #endif
586 
587  // ----------------------------------------------------------------------
588  // Port handler base-class functions for typed input ports
589  //
590  // Call these functions directly to bypass the corresponding ports
591  // ----------------------------------------------------------------------
592 
595  FwIndexType portNum,
596  FwOpcodeType opCode,
597  U32 cmdSeq,
598  const Fw::CmdResponse& response
599  );
600 
603  FwIndexType portNum,
604  const Fw::StringBase& filename,
605  const Svc::SeqArgs& args
606  );
607 
610  FwIndexType portNum,
611  const Fw::StringBase& filename,
612  const Svc::SeqArgs& args
613  );
614 
615  protected:
616 
617  // ----------------------------------------------------------------------
618  // Pre-message hooks for typed async input ports
619  //
620  // Each of these functions is invoked just before processing a message
621  // on the corresponding port. By default, they do nothing. You can
622  // override them to provide specific pre-message behavior.
623  // ----------------------------------------------------------------------
624 
626  virtual void seqDoneIn_preMsgHook(
627  FwIndexType portNum,
628  FwOpcodeType opCode,
629  U32 cmdSeq,
630  const Fw::CmdResponse& response
631  );
632 
634  virtual void seqRunIn_preMsgHook(
635  FwIndexType portNum,
636  const Fw::StringBase& filename,
637  const Svc::SeqArgs& args
638  );
639 
641  virtual void seqStartIn_preMsgHook(
642  FwIndexType portNum,
643  const Fw::StringBase& filename,
644  const Svc::SeqArgs& args
645  );
646 
647  protected:
648 
649  // ----------------------------------------------------------------------
650  // Invocation functions for typed output ports
651  // ----------------------------------------------------------------------
652 
654  void seqCancelOut_out(
655  FwIndexType portNum
656  ) const;
657 
659  void seqRunOut_out(
660  FwIndexType portNum,
661  const Fw::StringBase& filename,
662  const Svc::SeqArgs& args
663  ) const;
664 
665  protected:
666 
667  // ----------------------------------------------------------------------
668  // Command response
669  // ----------------------------------------------------------------------
670 
672  void cmdResponse_out(
673  FwOpcodeType opCode,
674  U32 cmdSeq,
675  Fw::CmdResponse response
676  );
677 
678  protected:
679 
680  // ----------------------------------------------------------------------
681  // Command handlers to implement
682  // ----------------------------------------------------------------------
683 
687  virtual void RUN_cmdHandler(
688  FwOpcodeType opCode,
689  U32 cmdSeq,
690  const Fw::CmdStringArg& fileName,
691  const Svc::BlockState& block
692  ) = 0;
693 
697  virtual void RUN_ARGS_cmdHandler(
698  FwOpcodeType opCode,
699  U32 cmdSeq,
700  const Fw::CmdStringArg& fileName,
701  const Svc::BlockState& block,
702  const Svc::SeqArgs& buffer
703  ) = 0;
704 
708  virtual void LOG_STATUS_cmdHandler(
709  FwOpcodeType opCode,
710  U32 cmdSeq
711  ) = 0;
712 
716  virtual void CANCEL_NAME_cmdHandler(
717  FwOpcodeType opCode,
718  U32 cmdSeq,
719  const Fw::CmdStringArg& fileName
720  ) = 0;
721 
726  virtual void CANCEL_ALL_cmdHandler(
727  FwOpcodeType opCode,
728  U32 cmdSeq
729  ) = 0;
730 
731  protected:
732 
733  // ----------------------------------------------------------------------
734  // Command handler base-class functions
735  //
736  // Call these functions directly to bypass the command input port
737  // ----------------------------------------------------------------------
738 
742  void RUN_cmdHandlerBase(
743  FwOpcodeType opCode,
744  U32 cmdSeq,
745  Fw::CmdArgBuffer& args
746  );
747 
752  FwOpcodeType opCode,
753  U32 cmdSeq,
754  Fw::CmdArgBuffer& args
755  );
756 
761  FwOpcodeType opCode,
762  U32 cmdSeq,
763  Fw::CmdArgBuffer& args
764  );
765 
770  FwOpcodeType opCode,
771  U32 cmdSeq,
772  Fw::CmdArgBuffer& args
773  );
774 
780  FwOpcodeType opCode,
781  U32 cmdSeq,
782  Fw::CmdArgBuffer& args
783  );
784 
785  protected:
786 
787  // ----------------------------------------------------------------------
788  // Pre-message hooks for async commands
789  //
790  // Each of these functions is invoked just before processing the
791  // corresponding command. By default they do nothing. You can
792  // override them to provide specific pre-command behavior.
793  // ----------------------------------------------------------------------
794 
796  virtual void RUN_preMsgHook(
797  FwOpcodeType opCode,
798  U32 cmdSeq
799  );
800 
802  virtual void RUN_ARGS_preMsgHook(
803  FwOpcodeType opCode,
804  U32 cmdSeq
805  );
806 
808  virtual void LOG_STATUS_preMsgHook(
809  FwOpcodeType opCode,
810  U32 cmdSeq
811  );
812 
814  virtual void CANCEL_NAME_preMsgHook(
815  FwOpcodeType opCode,
816  U32 cmdSeq
817  );
818 
820  virtual void CANCEL_ALL_preMsgHook(
821  FwOpcodeType opCode,
822  U32 cmdSeq
823  );
824 
825  protected:
826 
827  // ----------------------------------------------------------------------
828  // Event logging functions
829  // ----------------------------------------------------------------------
830 
832  void log_WARNING_HI_InvalidSequencer(U16 idx) const;
833 
836 
838  void log_WARNING_LO_UnknownSequenceFinished(U16 idx) const;
839 
842  U16 idx,
843  const Fw::StringBase& newSequence,
844  const Fw::StringBase& sequenceInInternalState
845  ) const;
846 
849  U16 idx,
850  const Fw::StringBase& newSequence
851  ) const;
852 
855  U16 idx,
857  const Fw::StringBase& filename
858  ) const;
859 
862  U16 idx,
863  const Fw::StringBase& filename
864  ) const;
865 
867  void log_WARNING_LO_CancelSequenceNotFound(const Fw::StringBase& filename) const;
868 
869  protected:
870 
871  // ----------------------------------------------------------------------
872  // Telemetry serialized write
873  // ----------------------------------------------------------------------
874 
879  void tlmWrite(
880  FwChanIdType id,
881  Fw::TlmBuffer& _tlmBuff,
882  Fw::Time _tlmTime = Fw::Time()
883  ) const;
884 
885  protected:
886 
887  // ----------------------------------------------------------------------
888  // Telemetry write functions
889  // ----------------------------------------------------------------------
890 
895  U32 arg,
896  Fw::Time _tlmTime = Fw::Time()
897  ) const;
898 
904  void tlmWrite_errorCount(
905  U32 arg,
906  Fw::Time _tlmTime = Fw::Time()
907  ) const;
908 
913  U32 arg,
914  Fw::Time _tlmTime = Fw::Time()
915  ) const;
916 
921  U32 arg,
922  Fw::Time _tlmTime = Fw::Time()
923  ) const;
924 
925  protected:
926 
927  // ----------------------------------------------------------------------
928  // Time
929  // ----------------------------------------------------------------------
930 
934  Fw::Time getTime() const;
935 
936  private:
937 
938  // ----------------------------------------------------------------------
939  // Message dispatch functions
940  // ----------------------------------------------------------------------
941 
943  virtual MsgDispatchStatus doDispatch();
944 
945  private:
946 
947  // ----------------------------------------------------------------------
948  // Calls for messages received on special input ports
949  // ----------------------------------------------------------------------
950 
952  static void m_p_cmdIn_in(
953  Fw::PassiveComponentBase* callComp,
954  FwIndexType portNum,
955  FwOpcodeType opCode,
956  U32 cmdSeq,
957  Fw::CmdArgBuffer& args
958  );
959 
960  private:
961 
962  // ----------------------------------------------------------------------
963  // Calls for messages received on typed input ports
964  // ----------------------------------------------------------------------
965 
967  static void m_p_seqDoneIn_in(
968  Fw::PassiveComponentBase* callComp,
969  FwIndexType portNum,
970  FwOpcodeType opCode,
971  U32 cmdSeq,
972  const Fw::CmdResponse& response
973  );
974 
976  static void m_p_seqRunIn_in(
977  Fw::PassiveComponentBase* callComp,
978  FwIndexType portNum,
979  const Fw::StringBase& filename,
980  const Svc::SeqArgs& args
981  );
982 
984  static void m_p_seqStartIn_in(
985  Fw::PassiveComponentBase* callComp,
986  FwIndexType portNum,
987  const Fw::StringBase& filename,
988  const Svc::SeqArgs& args
989  );
990 
991  private:
992 
993  // ----------------------------------------------------------------------
994  // Invocation functions for special output ports
995  // ----------------------------------------------------------------------
996 
998  void cmdRegOut_out(
999  FwIndexType portNum,
1000  FwOpcodeType opCode
1001  ) const;
1002 
1004  void cmdResponseOut_out(
1005  FwIndexType portNum,
1006  FwOpcodeType opCode,
1007  U32 cmdSeq,
1008  const Fw::CmdResponse& response
1009  ) const;
1010 
1012  void logOut_out(
1013  FwIndexType portNum,
1014  FwEventIdType id,
1015  Fw::Time& timeTag,
1016  const Fw::LogSeverity& severity,
1017  Fw::LogBuffer& args
1018  ) const;
1019 
1020 #if FW_ENABLE_TEXT_LOGGING
1021 
1023  void logTextOut_out(
1024  FwIndexType portNum,
1025  FwEventIdType id,
1026  Fw::Time& timeTag,
1027  const Fw::LogSeverity& severity,
1028  Fw::TextLogString& text
1029  ) const;
1030 
1031 #endif
1032 
1034  void timeCaller_out(
1035  FwIndexType portNum,
1036  Fw::Time& time
1037  ) const;
1038 
1040  void tlmOut_out(
1041  FwIndexType portNum,
1042  FwChanIdType id,
1043  Fw::Time& timeTag,
1044  Fw::TlmBuffer& val
1045  ) const;
1046 
1047 #if !FW_DIRECT_PORT_CALLS
1048 
1049  private:
1050 
1051  // ----------------------------------------------------------------------
1052  // Special input ports
1053  // ----------------------------------------------------------------------
1054 
1056  Fw::InputCmdPort m_cmdIn_InputPort[NUM_CMDIN_INPUT_PORTS];
1057 
1058 #endif
1059 
1060 #if !FW_DIRECT_PORT_CALLS
1061 
1062  private:
1063 
1064  // ----------------------------------------------------------------------
1065  // Typed input ports
1066  // ----------------------------------------------------------------------
1067 
1069  Fw::InputCmdResponsePort m_seqDoneIn_InputPort[NUM_SEQDONEIN_INPUT_PORTS];
1070 
1072  Svc::InputCmdSeqInPort m_seqRunIn_InputPort[NUM_SEQRUNIN_INPUT_PORTS];
1073 
1075  Svc::InputCmdSeqInPort m_seqStartIn_InputPort[NUM_SEQSTARTIN_INPUT_PORTS];
1076 
1077 #endif
1078 
1079 #if !FW_DIRECT_PORT_CALLS
1080 
1081  private:
1082 
1083  // ----------------------------------------------------------------------
1084  // Special output ports
1085  // ----------------------------------------------------------------------
1086 
1088  Fw::OutputCmdRegPort m_cmdRegOut_OutputPort[NUM_CMDREGOUT_OUTPUT_PORTS];
1089 
1091  Fw::OutputCmdResponsePort m_cmdResponseOut_OutputPort[NUM_CMDRESPONSEOUT_OUTPUT_PORTS];
1092 
1094  Fw::OutputLogPort m_logOut_OutputPort[NUM_LOGOUT_OUTPUT_PORTS];
1095 
1096 #if FW_ENABLE_TEXT_LOGGING == 1
1097 
1099  Fw::OutputLogTextPort m_logTextOut_OutputPort[NUM_LOGTEXTOUT_OUTPUT_PORTS];
1100 
1101 #endif
1102 
1104  Fw::OutputTimePort m_timeCaller_OutputPort[NUM_TIMECALLER_OUTPUT_PORTS];
1105 
1107  Fw::OutputTlmPort m_tlmOut_OutputPort[NUM_TLMOUT_OUTPUT_PORTS];
1108 
1109 #endif
1110 
1111 #if !FW_DIRECT_PORT_CALLS
1112 
1113  private:
1114 
1115  // ----------------------------------------------------------------------
1116  // Typed output ports
1117  // ----------------------------------------------------------------------
1118 
1121 
1123  Svc::OutputCmdSeqInPort m_seqRunOut_OutputPort[NUM_SEQRUNOUT_OUTPUT_PORTS];
1124 
1125 #endif
1126 
1127  };
1128 
1129 }
1130 
1131 #endif
Fw::InputCmdResponsePort * get_seqDoneIn_InputPort(FwIndexType portNum)
virtual void seqDoneIn_preMsgHook(FwIndexType portNum, FwOpcodeType opCode, U32 cmdSeq, const Fw::CmdResponse &response)
Pre-message hook for async input port seqDoneIn.
void tlmWrite_sequencersAvailable(U32 arg, Fw::Time _tlmTime=Fw::Time()) const
virtual void LOG_STATUS_preMsgHook(FwOpcodeType opCode, U32 cmdSeq)
Pre-message hook for command LOG_STATUS.
void tlmWrite_errorCount(U32 arg, Fw::Time _tlmTime=Fw::Time()) const
FwIdType FwOpcodeType
The type of a command opcode.
PlatformSizeType FwSizeType
Svc::InputCmdSeqInPort * get_seqRunIn_InputPort(FwIndexType portNum)
I32 FwEnumStoreType
virtual void RUN_preMsgHook(FwOpcodeType opCode, U32 cmdSeq)
Pre-message hook for command RUN.
friend class SeqDispatcherTester
Friend class tester implementation to support white-box testing.
bool isConnected_seqRunOut_OutputPort(FwIndexType portNum) const
static constexpr FwIndexType getNum_seqDoneIn_InputPorts()
Svc::InputCmdSeqInPort * get_seqStartIn_InputPort(FwIndexType portNum)
friend class SeqDispatcherTesterBase
Friend class tester to support autocoded test harness.
bool isConnected_timeCaller_OutputPort(FwIndexType portNum) const
virtual void RUN_ARGS_cmdHandler(FwOpcodeType opCode, U32 cmdSeq, const Fw::CmdStringArg &fileName, const Svc::BlockState &block, const Svc::SeqArgs &buffer)=0
Dispatches a sequence to the first available sequencer.
Cancels any running sequence matching the given file name.
Logs via Events the state of each connected command sequencer.
virtual void seqStartIn_handler(FwIndexType portNum, const Fw::StringBase &filename, const Svc::SeqArgs &args)=0
Handler for input port seqStartIn.
virtual void CANCEL_NAME_cmdHandler(FwOpcodeType opCode, U32 cmdSeq, const Fw::CmdStringArg &fileName)=0
virtual void RUN_ARGS_preMsgHook(FwOpcodeType opCode, U32 cmdSeq)
Pre-message hook for command RUN_ARGS.
Enum representing a command response.
void set_tlmOut_OutputPort(FwIndexType portNum, Fw::InputTlmPort *port)
Connect port to tlmOut[portNum].
void regCommands()
Register commands with the Command Dispatcher.
virtual void seqRunIn_preMsgHook(FwIndexType portNum, const Fw::StringBase &filename, const Svc::SeqArgs &args)
Pre-message hook for async input port seqRunIn.
void tlmWrite_canceledCount(U32 arg, Fw::Time _tlmTime=Fw::Time()) const
void CANCEL_ALL_cmdHandlerBase(FwOpcodeType opCode, U32 cmdSeq, Fw::CmdArgBuffer &args)
void seqDoneIn_handlerBase(FwIndexType portNum, FwOpcodeType opCode, U32 cmdSeq, const Fw::CmdResponse &response)
Handler base-class function for input port seqDoneIn.
void set_logOut_OutputPort(FwIndexType portNum, Fw::InputLogPort *port)
Connect port to logOut[portNum].
void set_cmdResponseOut_OutputPort(FwIndexType portNum, Fw::InputCmdResponsePort *port)
Connect port to cmdResponseOut[portNum].
static constexpr FwIndexType getNum_logOut_OutputPorts()
virtual void CANCEL_ALL_preMsgHook(FwOpcodeType opCode, U32 cmdSeq)
Pre-message hook for command CANCEL_ALL.
Dispatches a sequence with arguments to the first available sequencer.
void RUN_cmdHandlerBase(FwOpcodeType opCode, U32 cmdSeq, Fw::CmdArgBuffer &args)
void init()
Object initializer.
Definition: ObjBase.cpp:24
bool isConnected_logOut_OutputPort(FwIndexType portNum) const
static constexpr FwIndexType getNum_cmdRegOut_OutputPorts()
virtual void LOG_STATUS_cmdHandler(FwOpcodeType opCode, U32 cmdSeq)=0
bool isConnected_seqCancelOut_OutputPort(FwIndexType portNum) const
void log_WARNING_LO_CancelSequenceNotFound(const Fw::StringBase &filename) const
Log event CancelSequenceNotFound.
void log_WARNING_LO_UnknownSequenceFinished(U16 idx) const
Log event UnknownSequenceFinished.
virtual ~SeqDispatcherComponentBase()
Destroy SeqDispatcherComponentBase object.
FwIdType FwEventIdType
The type of an event identifier.
static constexpr FwIndexType getNum_seqRunOut_OutputPorts()
Fw::InputCmdPort * get_cmdIn_InputPort(FwIndexType portNum)
void set_seqRunOut_OutputPort(FwIndexType portNum, Svc::InputCmdSeqInPort *port)
Connect port to seqRunOut[portNum].
virtual void CANCEL_ALL_cmdHandler(FwOpcodeType opCode, U32 cmdSeq)=0
void set_seqCancelOut_OutputPort(FwIndexType portNum, Svc::InputCmdSeqCancelPort *port)
Connect port to seqCancelOut[portNum].
FwIdType FwChanIdType
The type of a telemetry channel identifier.
SeqDispatcherComponentBase(const char *compName="")
Construct SeqDispatcherComponentBase object.
static constexpr FwIndexType getNum_cmdIn_InputPorts()
Sequencer blocking state.
bool isConnected_cmdResponseOut_OutputPort(FwIndexType portNum) const
static constexpr FwIndexType getNum_cmdResponseOut_OutputPorts()
void seqRunOut_out(FwIndexType portNum, const Fw::StringBase &filename, const Svc::SeqArgs &args) const
Invoke output port seqRunOut.
void log_WARNING_LO_UnexpectedSequenceStarted(U16 idx, const Fw::StringBase &newSequence) const
Log event UnexpectedSequenceStarted.
Enum representing event severity.
bool isConnected_tlmOut_OutputPort(FwIndexType portNum) const
virtual void seqStartIn_preMsgHook(FwIndexType portNum, const Fw::StringBase &filename, const Svc::SeqArgs &args)
Pre-message hook for async input port seqStartIn.
bool isConnected_cmdRegOut_OutputPort(FwIndexType portNum) const
void seqStartIn_handlerBase(FwIndexType portNum, const Fw::StringBase &filename, const Svc::SeqArgs &args)
Handler base-class function for input port seqStartIn.
void tlmWrite(FwChanIdType id, Fw::TlmBuffer &_tlmBuff, Fw::Time _tlmTime=Fw::Time()) const
void log_WARNING_HI_NoAvailableSequencers() const
Log event NoAvailableSequencers.
void log_ACTIVITY_LO_LogSequencerStatus(U16 idx, const Svc::SeqDispatcher_CmdSequencerState &state, const Fw::StringBase &filename) const
Log event LogSequencerStatus.
void RUN_ARGS_cmdHandlerBase(FwOpcodeType opCode, U32 cmdSeq, Fw::CmdArgBuffer &args)
PlatformIndexType FwIndexType
void seqRunIn_handlerBase(FwIndexType portNum, const Fw::StringBase &filename, const Svc::SeqArgs &args)
Handler base-class function for input port seqRunIn.
Auto-generated base for SeqDispatcher component.
static constexpr FwIndexType getNum_tlmOut_OutputPorts()
virtual void seqDoneIn_handler(FwIndexType portNum, FwOpcodeType opCode, U32 cmdSeq, const Fw::CmdResponse &response)=0
Handler for input port seqDoneIn.
void LOG_STATUS_cmdHandlerBase(FwOpcodeType opCode, U32 cmdSeq, Fw::CmdArgBuffer &args)
RateGroupDivider component implementation.
void log_WARNING_HI_InvalidSequencer(U16 idx) const
Log event InvalidSequencer.
void set_cmdRegOut_OutputPort(FwIndexType portNum, Fw::InputCmdRegPort *port)
Connect port to cmdRegOut[portNum].
static constexpr FwIndexType getNum_seqCancelOut_OutputPorts()
static constexpr FwIndexType getNum_seqRunIn_InputPorts()
void CANCEL_NAME_cmdHandlerBase(FwOpcodeType opCode, U32 cmdSeq, Fw::CmdArgBuffer &args)
virtual void RUN_cmdHandler(FwOpcodeType opCode, U32 cmdSeq, const Fw::CmdStringArg &fileName, const Svc::BlockState &block)=0
static constexpr FwIndexType getNum_timeCaller_OutputPorts()
void seqCancelOut_out(FwIndexType portNum) const
Invoke output port seqCancelOut.
void cmdResponse_out(FwOpcodeType opCode, U32 cmdSeq, Fw::CmdResponse response)
Emit command response.
void cmdIn_handlerBase(FwIndexType portNum, FwOpcodeType opCode, U32 cmdSeq, Fw::CmdArgBuffer &args)
Handler base-class function for input port cmdIn.
void log_ACTIVITY_HI_SequenceCanceled(U16 idx, const Fw::StringBase &filename) const
Log event SequenceCanceled.
void log_WARNING_HI_ConflictingSequenceStarted(U16 idx, const Fw::StringBase &newSequence, const Fw::StringBase &sequenceInInternalState) const
Log event ConflictingSequenceStarted.
virtual void CANCEL_NAME_preMsgHook(FwOpcodeType opCode, U32 cmdSeq)
Pre-message hook for command CANCEL_NAME.
virtual void seqRunIn_handler(FwIndexType portNum, const Fw::StringBase &filename, const Svc::SeqArgs &args)=0
Handler for input port seqRunIn.
static constexpr FwIndexType getNum_seqStartIn_InputPorts()
void tlmWrite_dispatchedCount(U32 arg, Fw::Time _tlmTime=Fw::Time()) const
void set_timeCaller_OutputPort(FwIndexType portNum, Fw::InputTimePort *port)
Connect port to timeCaller[portNum].