F´ Flight Software - C/C++ Documentation
A framework for building embedded system applications to NASA flight quality standards.
CommandDispatcherComponentAc.hpp
Go to the documentation of this file.
1 // ======================================================================
2 // \title CommandDispatcherComponentAc.hpp
3 // \author Generated by fpp-to-cpp
4 // \brief hpp file for CommandDispatcher component base class
5 // ======================================================================
6 
7 #ifndef Svc_CommandDispatcherComponentAc_HPP
8 #define Svc_CommandDispatcherComponentAc_HPP
9 
10 #include <atomic>
11 
12 #include "Fw/Cmd/CmdPortAc.hpp"
13 #include "Fw/Cmd/CmdRegPortAc.hpp"
16 #include "Fw/Cmd/CmdString.hpp"
17 #include "Fw/Com/ComPortAc.hpp"
19 #include "Fw/FPrimeBasicTypes.hpp"
20 #include "Fw/Log/LogPortAc.hpp"
21 #include "Fw/Log/LogString.hpp"
22 #if FW_ENABLE_TEXT_LOGGING == 1
23 #include "Fw/Log/LogTextPortAc.hpp"
24 #endif
27 #include "Fw/Time/TimePortAc.hpp"
28 #include "Fw/Tlm/TlmPortAc.hpp"
29 #include "Fw/Tlm/TlmString.hpp"
31 #include "Os/Mutex.hpp"
32 #include "Svc/Ping/PingPortAc.hpp"
36 
37 namespace Svc {
38 
45  {
46 
47  // ----------------------------------------------------------------------
48  // Friend classes
49  // ----------------------------------------------------------------------
50 
55 
56  protected:
57 
58  // ----------------------------------------------------------------------
59  // Constants
60  // ----------------------------------------------------------------------
61 
63  enum {
65  };
66 
68  enum {
74  };
75 
77  enum {
84  };
85 
87  enum {
91  };
92 
94  enum {
99  };
100 
102  enum {
115  };
116 
118  enum {
120  };
121 
123  enum {
127  };
128 
129  public:
130 
131  // ----------------------------------------------------------------------
132  // Component initialization
133  // ----------------------------------------------------------------------
134 
136  void init(
137  FwSizeType queueDepth,
138  FwEnumStoreType instance = 0
139  );
140 
141  public:
142 
143  // ----------------------------------------------------------------------
144  // Getters for special input ports
145  // ----------------------------------------------------------------------
146 
151  FwIndexType portNum
152  );
153 
154  public:
155 
156  // ----------------------------------------------------------------------
157  // Getters for typed input ports
158  // ----------------------------------------------------------------------
159 
164  FwIndexType portNum
165  );
166 
171  FwIndexType portNum
172  );
173 
178  FwIndexType portNum
179  );
180 
185  FwIndexType portNum
186  );
187 
192  FwIndexType portNum
193  );
194 
195  public:
196 
197  // ----------------------------------------------------------------------
198  // Connect input ports to special output ports
199  // ----------------------------------------------------------------------
200 
203  FwIndexType portNum,
204  Fw::InputCmdRegPort* port
205  );
206 
209  FwIndexType portNum,
211  );
212 
214  void set_Log_OutputPort(
215  FwIndexType portNum,
216  Fw::InputLogPort* port
217  );
218 
219 #if FW_ENABLE_TEXT_LOGGING == 1
220 
222  void set_LogText_OutputPort(
223  FwIndexType portNum,
224  Fw::InputLogTextPort* port
225  );
226 
227 #endif
228 
230  void set_Time_OutputPort(
231  FwIndexType portNum,
232  Fw::InputTimePort* port
233  );
234 
236  void set_Tlm_OutputPort(
237  FwIndexType portNum,
238  Fw::InputTlmPort* port
239  );
240 
241  public:
242 
243  // ----------------------------------------------------------------------
244  // Connect typed input ports to typed output ports
245  // ----------------------------------------------------------------------
246 
249  FwIndexType portNum,
250  Fw::InputCmdPort* port
251  );
252 
255  FwIndexType portNum,
256  Svc::InputPingPort* port
257  );
258 
261  FwIndexType portNum,
263  );
264 
265 #if FW_PORT_SERIALIZATION
266 
267  public:
268 
269  // ----------------------------------------------------------------------
270  // Connect serial input ports to special output ports
271  // ----------------------------------------------------------------------
272 
275  FwIndexType portNum,
276  Fw::InputSerializePort* port
277  );
278 
281  FwIndexType portNum,
282  Fw::InputSerializePort* port
283  );
284 
286  void set_Log_OutputPort(
287  FwIndexType portNum,
288  Fw::InputSerializePort* port
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 
302  void set_Time_OutputPort(
303  FwIndexType portNum,
304  Fw::InputSerializePort* port
305  );
306 
308  void set_Tlm_OutputPort(
309  FwIndexType portNum,
310  Fw::InputSerializePort* port
311  );
312 
313 #endif
314 
315 #if FW_PORT_SERIALIZATION
316 
317  public:
318 
319  // ----------------------------------------------------------------------
320  // Connect serial input ports to typed output ports
321  // ----------------------------------------------------------------------
322 
325  FwIndexType portNum,
326  Fw::InputSerializePort* port
327  );
328 
331  FwIndexType portNum,
332  Fw::InputSerializePort* port
333  );
334 
337  FwIndexType portNum,
338  Fw::InputSerializePort* port
339  );
340 
341 #endif
342 
343  public:
344 
345  // ----------------------------------------------------------------------
346  // Command registration
347  // ----------------------------------------------------------------------
348 
352  void regCommands();
353 
354  protected:
355 
356  // ----------------------------------------------------------------------
357  // Component construction and destruction
358  // ----------------------------------------------------------------------
359 
362  const char* compName = ""
363  );
364 
367 
368  protected:
369 
370  // ----------------------------------------------------------------------
371  // Getters for numbers of special input ports
372  // ----------------------------------------------------------------------
373 
379  }
380 
381  protected:
382 
383  // ----------------------------------------------------------------------
384  // Getters for numbers of typed input ports
385  // ----------------------------------------------------------------------
386 
392  }
393 
399  }
400 
405  return NUM_PINGIN_INPUT_PORTS;
406  }
407 
411  static constexpr FwIndexType getNum_run_InputPorts() {
412  return NUM_RUN_INPUT_PORTS;
413  }
414 
420  }
421 
422  protected:
423 
424  // ----------------------------------------------------------------------
425  // Getters for numbers of special output ports
426  // ----------------------------------------------------------------------
427 
433  }
434 
440  }
441 
445  static constexpr FwIndexType getNum_Log_OutputPorts() {
446  return NUM_LOG_OUTPUT_PORTS;
447  }
448 
449 #if FW_ENABLE_TEXT_LOGGING == 1
450 
454  static constexpr FwIndexType getNum_LogText_OutputPorts() {
456  }
457 
458 #endif
459 
464  return NUM_TIME_OUTPUT_PORTS;
465  }
466 
470  static constexpr FwIndexType getNum_Tlm_OutputPorts() {
471  return NUM_TLM_OUTPUT_PORTS;
472  }
473 
474  protected:
475 
476  // ----------------------------------------------------------------------
477  // Getters for numbers of typed output ports
478  // ----------------------------------------------------------------------
479 
485  }
486 
492  }
493 
499  }
500 
501  protected:
502 
503  // ----------------------------------------------------------------------
504  // Connection status queries for special output ports
505  // ----------------------------------------------------------------------
506 
511  FwIndexType portNum
512  );
513 
518  FwIndexType portNum
519  );
520 
525  FwIndexType portNum
526  );
527 
528 #if FW_ENABLE_TEXT_LOGGING == 1
529 
533  bool isConnected_LogText_OutputPort(
534  FwIndexType portNum
535  );
536 
537 #endif
538 
543  FwIndexType portNum
544  );
545 
550  FwIndexType portNum
551  );
552 
553  protected:
554 
555  // ----------------------------------------------------------------------
556  // Connection status queries for typed output ports
557  // ----------------------------------------------------------------------
558 
563  FwIndexType portNum
564  );
565 
570  FwIndexType portNum
571  );
572 
577  FwIndexType portNum
578  );
579 
580  protected:
581 
582  // ----------------------------------------------------------------------
583  // Handlers to implement for typed input ports
584  // ----------------------------------------------------------------------
585 
587  virtual void compCmdReg_handler(
588  FwIndexType portNum,
589  FwOpcodeType opCode
590  ) = 0;
591 
593  virtual void compCmdStat_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 run_handler(
608  FwIndexType portNum,
609  U32 context
610  ) = 0;
611 
613  virtual void seqCmdBuff_handler(
614  FwIndexType portNum,
615  Fw::ComBuffer& data,
616  U32 context
617  ) = 0;
618 
619  protected:
620 
621  // ----------------------------------------------------------------------
622  // Port handler base-class functions for typed input ports
623  //
624  // Call these functions directly to bypass the corresponding ports
625  // ----------------------------------------------------------------------
626 
629  FwIndexType portNum,
630  FwOpcodeType opCode
631  );
632 
635  FwIndexType portNum,
636  FwOpcodeType opCode,
637  U32 cmdSeq,
638  const Fw::CmdResponse& response
639  );
640 
642  void pingIn_handlerBase(
643  FwIndexType portNum,
644  U32 key
645  );
646 
648  void run_handlerBase(
649  FwIndexType portNum,
650  U32 context
651  );
652 
655  FwIndexType portNum,
656  Fw::ComBuffer& data,
657  U32 context
658  );
659 
660  protected:
661 
662  // ----------------------------------------------------------------------
663  // Pre-message hooks for typed async input ports
664  //
665  // Each of these functions is invoked just before processing a message
666  // on the corresponding port. By default, they do nothing. You can
667  // override them to provide specific pre-message behavior.
668  // ----------------------------------------------------------------------
669 
671  virtual void compCmdStat_preMsgHook(
672  FwIndexType portNum,
673  FwOpcodeType opCode,
674  U32 cmdSeq,
675  const Fw::CmdResponse& response
676  );
677 
679  virtual void pingIn_preMsgHook(
680  FwIndexType portNum,
681  U32 key
682  );
683 
685  virtual void run_preMsgHook(
686  FwIndexType portNum,
687  U32 context
688  );
689 
691  virtual void seqCmdBuff_preMsgHook(
692  FwIndexType portNum,
693  Fw::ComBuffer& data,
694  U32 context
695  );
696 
697  protected:
698 
699  // ----------------------------------------------------------------------
700  // Hooks for typed async input ports
701  //
702  // Each of these functions is invoked when placing a message on the
703  // queue would cause the queue to overlow. You should override them to provide
704  // specific overflow behavior.
705  // ----------------------------------------------------------------------
706 
708  virtual void seqCmdBuff_overflowHook(
709  FwIndexType portNum,
710  Fw::ComBuffer& data,
711  U32 context
712  ) = 0;
713 
714  protected:
715 
716  // ----------------------------------------------------------------------
717  // Invocation functions for typed output ports
718  // ----------------------------------------------------------------------
719 
721  void compCmdSend_out(
722  FwIndexType portNum,
723  FwOpcodeType opCode,
724  U32 cmdSeq,
725  Fw::CmdArgBuffer& args
726  );
727 
729  void pingOut_out(
730  FwIndexType portNum,
731  U32 key
732  );
733 
735  void seqCmdStatus_out(
736  FwIndexType portNum,
737  FwOpcodeType opCode,
738  U32 cmdSeq,
739  const Fw::CmdResponse& response
740  );
741 
742  protected:
743 
744  // ----------------------------------------------------------------------
745  // Command response
746  // ----------------------------------------------------------------------
747 
749  void cmdResponse_out(
750  FwOpcodeType opCode,
751  U32 cmdSeq,
752  Fw::CmdResponse response
753  );
754 
755  protected:
756 
757  // ----------------------------------------------------------------------
758  // Command handlers to implement
759  // ----------------------------------------------------------------------
760 
764  virtual void CMD_NO_OP_cmdHandler(
765  FwOpcodeType opCode,
766  U32 cmdSeq
767  ) = 0;
768 
772  virtual void CMD_NO_OP_STRING_cmdHandler(
773  FwOpcodeType opCode,
774  U32 cmdSeq,
775  const Fw::CmdStringArg& arg1
776  ) = 0;
777 
781  virtual void CMD_TEST_CMD_1_cmdHandler(
782  FwOpcodeType opCode,
783  U32 cmdSeq,
784  I32 arg1,
785  F32 arg2,
786  U8 arg3
787  ) = 0;
788 
792  virtual void CMD_CLEAR_TRACKING_cmdHandler(
793  FwOpcodeType opCode,
794  U32 cmdSeq
795  ) = 0;
796 
797  protected:
798 
799  // ----------------------------------------------------------------------
800  // Command handler base-class functions
801  //
802  // Call these functions directly to bypass the command input port
803  // ----------------------------------------------------------------------
804 
809  FwOpcodeType opCode,
810  U32 cmdSeq,
811  Fw::CmdArgBuffer& args
812  );
813 
818  FwOpcodeType opCode,
819  U32 cmdSeq,
820  Fw::CmdArgBuffer& args
821  );
822 
827  FwOpcodeType opCode,
828  U32 cmdSeq,
829  Fw::CmdArgBuffer& args
830  );
831 
836  FwOpcodeType opCode,
837  U32 cmdSeq,
838  Fw::CmdArgBuffer& args
839  );
840 
841  protected:
842 
843  // ----------------------------------------------------------------------
844  // Pre-message hooks for async commands
845  //
846  // Each of these functions is invoked just before processing the
847  // corresponding command. By default they do nothing. You can
848  // override them to provide specific pre-command behavior.
849  // ----------------------------------------------------------------------
850 
852  virtual void CMD_NO_OP_preMsgHook(
853  FwOpcodeType opCode,
854  U32 cmdSeq
855  );
856 
858  virtual void CMD_NO_OP_STRING_preMsgHook(
859  FwOpcodeType opCode,
860  U32 cmdSeq
861  );
862 
864  virtual void CMD_TEST_CMD_1_preMsgHook(
865  FwOpcodeType opCode,
866  U32 cmdSeq
867  );
868 
870  virtual void CMD_CLEAR_TRACKING_preMsgHook(
871  FwOpcodeType opCode,
872  U32 cmdSeq
873  );
874 
875  protected:
876 
877  // ----------------------------------------------------------------------
878  // Event logging functions
879  // ----------------------------------------------------------------------
880 
883  FwOpcodeType Opcode,
884  I32 port,
885  I32 slot
886  ) const;
887 
892  FwOpcodeType Opcode,
893  I32 port
894  ) const;
895 
900  FwOpcodeType Opcode
901  ) const;
902 
907  FwOpcodeType Opcode,
908  Fw::CmdResponse error
909  ) const;
910 
916  ) const;
917 
922  FwOpcodeType Opcode
923  ) const;
924 
929  FwOpcodeType Opcode
930  ) const;
931 
935  void log_ACTIVITY_HI_NoOpReceived() const;
936 
941  const Fw::StringBase& message
942  ) const;
943 
948  I32 arg1,
949  F32 arg2,
950  U8 arg3
951  ) const;
952 
957  FwOpcodeType Opcode,
958  I32 port
959  ) const;
960 
965  FwOpcodeType OpCode,
966  U32 Context
967  );
968 
969  protected:
970 
971  // ----------------------------------------------------------------------
972  // Event throttle reset functions
973  // ----------------------------------------------------------------------
974 
977 
978  protected:
979 
980  // ----------------------------------------------------------------------
981  // Telemetry write functions
982  // ----------------------------------------------------------------------
983 
988  U32 arg,
989  Fw::Time _tlmTime = Fw::Time()
990  );
991 
996  U32 arg,
997  Fw::Time _tlmTime = Fw::Time()
998  );
999 
1004  U32 arg,
1005  Fw::Time _tlmTime = Fw::Time()
1006  );
1007 
1008  protected:
1009 
1010  // ----------------------------------------------------------------------
1011  // Time
1012  // ----------------------------------------------------------------------
1013 
1017  Fw::Time getTime() const;
1018 
1019  protected:
1020 
1021  // ----------------------------------------------------------------------
1022  // Mutex operations for guarded ports
1023  //
1024  // You can override these operations to provide more sophisticated
1025  // synchronization
1026  // ----------------------------------------------------------------------
1027 
1029  virtual void lock();
1030 
1032  virtual void unLock();
1033 
1034  private:
1035 
1036  // ----------------------------------------------------------------------
1037  // Message dispatch functions
1038  // ----------------------------------------------------------------------
1039 
1041  virtual MsgDispatchStatus doDispatch();
1042 
1043  private:
1044 
1045  // ----------------------------------------------------------------------
1046  // Calls for messages received on special input ports
1047  // ----------------------------------------------------------------------
1048 
1050  static void m_p_CmdDisp_in(
1051  Fw::PassiveComponentBase* callComp,
1052  FwIndexType portNum,
1053  FwOpcodeType opCode,
1054  U32 cmdSeq,
1055  Fw::CmdArgBuffer& args
1056  );
1057 
1058  private:
1059 
1060  // ----------------------------------------------------------------------
1061  // Calls for messages received on typed input ports
1062  // ----------------------------------------------------------------------
1063 
1065  static void m_p_compCmdReg_in(
1066  Fw::PassiveComponentBase* callComp,
1067  FwIndexType portNum,
1068  FwOpcodeType opCode
1069  );
1070 
1072  static void m_p_compCmdStat_in(
1073  Fw::PassiveComponentBase* callComp,
1074  FwIndexType portNum,
1075  FwOpcodeType opCode,
1076  U32 cmdSeq,
1077  const Fw::CmdResponse& response
1078  );
1079 
1081  static void m_p_pingIn_in(
1082  Fw::PassiveComponentBase* callComp,
1083  FwIndexType portNum,
1084  U32 key
1085  );
1086 
1088  static void m_p_run_in(
1089  Fw::PassiveComponentBase* callComp,
1090  FwIndexType portNum,
1091  U32 context
1092  );
1093 
1095  static void m_p_seqCmdBuff_in(
1096  Fw::PassiveComponentBase* callComp,
1097  FwIndexType portNum,
1098  Fw::ComBuffer& data,
1099  U32 context
1100  );
1101 
1102  private:
1103 
1104  // ----------------------------------------------------------------------
1105  // Special input ports
1106  // ----------------------------------------------------------------------
1107 
1109  Fw::InputCmdPort m_CmdDisp_InputPort[NUM_CMDDISP_INPUT_PORTS];
1110 
1111  private:
1112 
1113  // ----------------------------------------------------------------------
1114  // Typed input ports
1115  // ----------------------------------------------------------------------
1116 
1118  Fw::InputCmdRegPort m_compCmdReg_InputPort[NUM_COMPCMDREG_INPUT_PORTS];
1119 
1121  Fw::InputCmdResponsePort m_compCmdStat_InputPort[NUM_COMPCMDSTAT_INPUT_PORTS];
1122 
1124  Svc::InputPingPort m_pingIn_InputPort[NUM_PINGIN_INPUT_PORTS];
1125 
1127  Svc::InputSchedPort m_run_InputPort[NUM_RUN_INPUT_PORTS];
1128 
1130  Fw::InputComPort m_seqCmdBuff_InputPort[NUM_SEQCMDBUFF_INPUT_PORTS];
1131 
1132  private:
1133 
1134  // ----------------------------------------------------------------------
1135  // Special output ports
1136  // ----------------------------------------------------------------------
1137 
1139  Fw::OutputCmdRegPort m_CmdReg_OutputPort[NUM_CMDREG_OUTPUT_PORTS];
1140 
1142  Fw::OutputCmdResponsePort m_CmdStatus_OutputPort[NUM_CMDSTATUS_OUTPUT_PORTS];
1143 
1145  Fw::OutputLogPort m_Log_OutputPort[NUM_LOG_OUTPUT_PORTS];
1146 
1147 #if FW_ENABLE_TEXT_LOGGING == 1
1148 
1150  Fw::OutputLogTextPort m_LogText_OutputPort[NUM_LOGTEXT_OUTPUT_PORTS];
1151 
1152 #endif
1153 
1155  Fw::OutputTimePort m_Time_OutputPort[NUM_TIME_OUTPUT_PORTS];
1156 
1158  Fw::OutputTlmPort m_Tlm_OutputPort[NUM_TLM_OUTPUT_PORTS];
1159 
1160  private:
1161 
1162  // ----------------------------------------------------------------------
1163  // Typed output ports
1164  // ----------------------------------------------------------------------
1165 
1167  Fw::OutputCmdPort m_compCmdSend_OutputPort[NUM_COMPCMDSEND_OUTPUT_PORTS];
1168 
1170  Svc::OutputPingPort m_pingOut_OutputPort[NUM_PINGOUT_OUTPUT_PORTS];
1171 
1173  Fw::OutputCmdResponsePort m_seqCmdStatus_OutputPort[NUM_SEQCMDSTATUS_OUTPUT_PORTS];
1174 
1175  private:
1176 
1177  // ----------------------------------------------------------------------
1178  // Counter values for event throttling
1179  // ----------------------------------------------------------------------
1180 
1182  std::atomic<FwIndexType> m_CommandDroppedQueueOverflowThrottle;
1183 
1184  private:
1185 
1186  // ----------------------------------------------------------------------
1187  // First update flags for telemetry channels
1188  // ----------------------------------------------------------------------
1189 
1191  bool m_first_update_CommandsDispatched = true;
1192 
1194  bool m_first_update_CommandErrors = true;
1195 
1197  bool m_first_update_CommandsDropped = true;
1198 
1199  private:
1200 
1201  // ----------------------------------------------------------------------
1202  // Last value storage for telemetry channels
1203  // ----------------------------------------------------------------------
1204 
1206  U32 m_last_CommandsDispatched = {};
1207 
1209  U32 m_last_CommandErrors = {};
1210 
1212  U32 m_last_CommandsDropped = {};
1213 
1214  private:
1215 
1216  // ----------------------------------------------------------------------
1217  // Mutexes
1218  // ----------------------------------------------------------------------
1219 
1221  Os::Mutex m_guardedPortMutex;
1222 
1223  };
1224 
1225 }
1226 
1227 #endif
void set_seqCmdStatus_OutputPort(FwIndexType portNum, Fw::InputCmdResponsePort *port)
Connect port to seqCmdStatus[portNum].
static constexpr FwIndexType getNum_run_InputPorts()
virtual void CMD_NO_OP_preMsgHook(FwOpcodeType opCode, U32 cmdSeq)
Pre-message hook for command CMD_NO_OP.
FwIdType FwOpcodeType
The type of a command opcode.
static constexpr FwIndexType getNum_Log_OutputPorts()
PlatformSizeType FwSizeType
Svc::InputSchedPort * get_run_InputPort(FwIndexType portNum)
void pingIn_handlerBase(FwIndexType portNum, U32 key)
Handler base-class function for input port pingIn.
CommandDispatcherComponentBase(const char *compName="")
Construct CommandDispatcherComponentBase object.
I32 FwEnumStoreType
void regCommands()
Register commands with the Command Dispatcher.
void log_WARNING_HI_CommandDroppedQueueOverflow(FwOpcodeType OpCode, U32 Context)
Fw::InputCmdRegPort * get_compCmdReg_InputPort(FwIndexType portNum)
void CMD_NO_OP_STRING_cmdHandlerBase(FwOpcodeType opCode, U32 cmdSeq, Fw::CmdArgBuffer &args)
Deserialization status.
virtual void run_preMsgHook(FwIndexType portNum, U32 context)
Pre-message hook for async input port run.
virtual void unLock()
Unlock the guarded mutex.
Fw::InputCmdPort * get_CmdDisp_InputPort(FwIndexType portNum)
virtual void pingIn_preMsgHook(FwIndexType portNum, U32 key)
Pre-message hook for async input port pingIn.
virtual void compCmdStat_handler(FwIndexType portNum, FwOpcodeType opCode, U32 cmdSeq, const Fw::CmdResponse &response)=0
Handler for input port compCmdStat.
virtual void run_handler(FwIndexType portNum, U32 context)=0
Handler for input port run.
The command dispatcher has successfully received a NO-OP command from GUI with a string.
void log_ACTIVITY_HI_TestCmd1Args(I32 arg1, F32 arg2, U8 arg3) const
virtual void CMD_NO_OP_cmdHandler(FwOpcodeType opCode, U32 cmdSeq)=0
void pingOut_out(FwIndexType portNum, U32 key)
Invoke output port pingOut.
Clear command tracking info to recover from components not returning status.
Enum representing a command response.
static constexpr FwIndexType getNum_CmdDisp_InputPorts()
friend class CommandDispatcherTester
Friend class tester implementation to support white-box testing.
virtual void pingIn_handler(FwIndexType portNum, U32 key)=0
Handler for input port pingIn.
static constexpr FwIndexType getNum_pingIn_InputPorts()
static constexpr FwIndexType getNum_pingOut_OutputPorts()
bool isConnected_CmdStatus_OutputPort(FwIndexType portNum)
void compCmdSend_out(FwIndexType portNum, FwOpcodeType opCode, U32 cmdSeq, Fw::CmdArgBuffer &args)
Invoke output port compCmdSend.
void log_DIAGNOSTIC_OpCodeReregistered(FwOpcodeType Opcode, I32 port) const
static constexpr FwIndexType getNum_CmdStatus_OutputPorts()
Svc::InputPingPort * get_pingIn_InputPort(FwIndexType portNum)
static constexpr FwIndexType getNum_Tlm_OutputPorts()
void init()
Object initializer.
Definition: ObjBase.cpp:24
virtual void CMD_TEST_CMD_1_preMsgHook(FwOpcodeType opCode, U32 cmdSeq)
Pre-message hook for command CMD_TEST_CMD_1.
float F32
32-bit floating point
Definition: BasicTypes.h:83
void log_COMMAND_OpCodeCompleted(FwOpcodeType Opcode) const
void log_ACTIVITY_HI_NoOpStringReceived(const Fw::StringBase &message) const
void tlmWrite_CommandsDispatched(U32 arg, Fw::Time _tlmTime=Fw::Time())
static constexpr FwIndexType getNum_CmdReg_OutputPorts()
void set_CmdReg_OutputPort(FwIndexType portNum, Fw::InputCmdRegPort *port)
Connect port to CmdReg[portNum].
friend class CommandDispatcherTesterBase
Friend class tester to support autocoded test harness.
void set_compCmdSend_OutputPort(FwIndexType portNum, Fw::InputCmdPort *port)
Connect port to compCmdSend[portNum].
void log_WARNING_HI_MalformedCommand(Fw::DeserialStatus Status) const
void tlmWrite_CommandsDropped(U32 arg, Fw::Time _tlmTime=Fw::Time())
Exceeded the number of commands that can be simultaneously executed.
virtual ~CommandDispatcherComponentBase()
Destroy CommandDispatcherComponentBase object.
Status
Generic OK/ERROR status.
Definition: Os.hpp:25
Fw::InputCmdResponsePort * get_compCmdStat_InputPort(FwIndexType portNum)
static constexpr FwIndexType getNum_Time_OutputPorts()
void log_WARNING_HI_CommandDroppedQueueOverflow_ThrottleClear()
Reset throttle value for CommandDroppedQueueOverflow.
virtual void CMD_TEST_CMD_1_cmdHandler(FwOpcodeType opCode, U32 cmdSeq, I32 arg1, F32 arg2, U8 arg3)=0
virtual void compCmdReg_handler(FwIndexType portNum, FwOpcodeType opCode)=0
Handler for input port compCmdReg.
void tlmWrite_CommandErrors(U32 arg, Fw::Time _tlmTime=Fw::Time())
virtual void compCmdStat_preMsgHook(FwIndexType portNum, FwOpcodeType opCode, U32 cmdSeq, const Fw::CmdResponse &response)
Pre-message hook for async input port compCmdStat.
static constexpr FwIndexType getNum_compCmdReg_InputPorts()
void log_WARNING_HI_InvalidCommand(FwOpcodeType Opcode) const
void compCmdStat_handlerBase(FwIndexType portNum, FwOpcodeType opCode, U32 cmdSeq, const Fw::CmdResponse &response)
Handler base-class function for input port compCmdStat.
This log event reports the Command Sequence Buffer port queue has overflowed.
uint8_t U8
8-bit unsigned integer
Definition: BasicTypes.h:53
void log_COMMAND_OpCodeError(FwOpcodeType Opcode, Fw::CmdResponse error) const
void seqCmdStatus_out(FwIndexType portNum, FwOpcodeType opCode, U32 cmdSeq, const Fw::CmdResponse &response)
Invoke output port seqCmdStatus.
PlatformIndexType FwIndexType
void run_handlerBase(FwIndexType portNum, U32 context)
Handler base-class function for input port run.
void log_DIAGNOSTIC_OpCodeRegistered(FwOpcodeType Opcode, I32 port, I32 slot) const
Log event OpCodeRegistered.
virtual void CMD_CLEAR_TRACKING_preMsgHook(FwOpcodeType opCode, U32 cmdSeq)
Pre-message hook for command CMD_CLEAR_TRACKING.
void set_Tlm_OutputPort(FwIndexType portNum, Fw::InputTlmPort *port)
Connect port to Tlm[portNum].
void CMD_CLEAR_TRACKING_cmdHandlerBase(FwOpcodeType opCode, U32 cmdSeq, Fw::CmdArgBuffer &args)
void seqCmdBuff_handlerBase(FwIndexType portNum, Fw::ComBuffer &data, U32 context)
Handler base-class function for input port seqCmdBuff.
virtual void CMD_NO_OP_STRING_cmdHandler(FwOpcodeType opCode, U32 cmdSeq, const Fw::CmdStringArg &arg1)=0
Auto-generated base for CommandDispatcher component.
bool isConnected_seqCmdStatus_OutputPort(FwIndexType portNum)
virtual void CMD_NO_OP_STRING_preMsgHook(FwOpcodeType opCode, U32 cmdSeq)
Pre-message hook for command CMD_NO_OP_STRING.
RateGroupDivider component implementation.
The command dispatcher has successfully received a NO-OP command.
virtual void seqCmdBuff_overflowHook(FwIndexType portNum, Fw::ComBuffer &data, U32 context)=0
Overflow hook for async input port seqCmdBuff.
virtual void CMD_CLEAR_TRACKING_cmdHandler(FwOpcodeType opCode, U32 cmdSeq)=0
static constexpr FwIndexType getNum_seqCmdBuff_InputPorts()
void CMD_NO_OP_cmdHandlerBase(FwOpcodeType opCode, U32 cmdSeq, Fw::CmdArgBuffer &args)
static constexpr FwIndexType getNum_compCmdSend_OutputPorts()
virtual void seqCmdBuff_handler(FwIndexType portNum, Fw::ComBuffer &data, U32 context)=0
Handler for input port seqCmdBuff.
static constexpr FwIndexType getNum_compCmdStat_InputPorts()
virtual void seqCmdBuff_preMsgHook(FwIndexType portNum, Fw::ComBuffer &data, U32 context)
Pre-message hook for async input port seqCmdBuff.
Fw::InputComPort * get_seqCmdBuff_InputPort(FwIndexType portNum)
void compCmdReg_handlerBase(FwIndexType portNum, FwOpcodeType opCode)
Handler base-class function for input port compCmdReg.
This log event message returns the TEST_CMD_1 arguments.
void set_pingOut_OutputPort(FwIndexType portNum, Svc::InputPingPort *port)
Connect port to pingOut[portNum].
static constexpr FwIndexType getNum_seqCmdStatus_OutputPorts()
void log_WARNING_HI_TooManyCommands(FwOpcodeType Opcode) const
bool isConnected_compCmdSend_OutputPort(FwIndexType portNum)
virtual void lock()
Lock the guarded mutex.
void cmdResponse_out(FwOpcodeType opCode, U32 cmdSeq, Fw::CmdResponse response)
Emit command response.
void log_COMMAND_OpCodeDispatched(FwOpcodeType Opcode, I32 port) const
void set_Log_OutputPort(FwIndexType portNum, Fw::InputLogPort *port)
Connect port to Log[portNum].
void set_Time_OutputPort(FwIndexType portNum, Fw::InputTimePort *port)
Connect port to Time[portNum].
void set_CmdStatus_OutputPort(FwIndexType portNum, Fw::InputCmdResponsePort *port)
Connect port to CmdStatus[portNum].
void CMD_TEST_CMD_1_cmdHandlerBase(FwOpcodeType opCode, U32 cmdSeq, Fw::CmdArgBuffer &args)