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"
35 
36 namespace Svc {
37 
44  {
45 
46  // ----------------------------------------------------------------------
47  // Friend classes
48  // ----------------------------------------------------------------------
49 
54 
55  protected:
56 
57  // ----------------------------------------------------------------------
58  // Constants
59  // ----------------------------------------------------------------------
60 
62  enum {
64  };
65 
67  enum {
73  };
74 
76  enum {
83  };
84 
86  enum {
90  };
91 
93  enum {
98  };
99 
101  enum {
114  };
115 
117  enum {
119  };
120 
122  enum {
126  };
127 
128  public:
129 
130  // ----------------------------------------------------------------------
131  // Component initialization
132  // ----------------------------------------------------------------------
133 
135  void init(
136  FwSizeType queueDepth,
137  FwEnumStoreType instance = 0
138  );
139 
140  public:
141 
142  // ----------------------------------------------------------------------
143  // Getters for special input ports
144  // ----------------------------------------------------------------------
145 
150  FwIndexType portNum
151  );
152 
153  public:
154 
155  // ----------------------------------------------------------------------
156  // Getters for typed input ports
157  // ----------------------------------------------------------------------
158 
163  FwIndexType portNum
164  );
165 
170  FwIndexType portNum
171  );
172 
177  FwIndexType portNum
178  );
179 
184  FwIndexType portNum
185  );
186 
191  FwIndexType portNum
192  );
193 
194  public:
195 
196  // ----------------------------------------------------------------------
197  // Connect input ports to special output ports
198  // ----------------------------------------------------------------------
199 
202  FwIndexType portNum,
203  Fw::InputCmdRegPort* port
204  );
205 
208  FwIndexType portNum,
210  );
211 
213  void set_Log_OutputPort(
214  FwIndexType portNum,
215  Fw::InputLogPort* port
216  );
217 
218 #if FW_ENABLE_TEXT_LOGGING == 1
219 
221  void set_LogText_OutputPort(
222  FwIndexType portNum,
223  Fw::InputLogTextPort* port
224  );
225 
226 #endif
227 
229  void set_Time_OutputPort(
230  FwIndexType portNum,
231  Fw::InputTimePort* port
232  );
233 
235  void set_Tlm_OutputPort(
236  FwIndexType portNum,
237  Fw::InputTlmPort* port
238  );
239 
240  public:
241 
242  // ----------------------------------------------------------------------
243  // Connect typed input ports to typed output ports
244  // ----------------------------------------------------------------------
245 
248  FwIndexType portNum,
249  Fw::InputCmdPort* port
250  );
251 
254  FwIndexType portNum,
255  Svc::InputPingPort* port
256  );
257 
260  FwIndexType portNum,
262  );
263 
264 #if FW_PORT_SERIALIZATION
265 
266  public:
267 
268  // ----------------------------------------------------------------------
269  // Connect serial input ports to special output ports
270  // ----------------------------------------------------------------------
271 
274  FwIndexType portNum,
275  Fw::InputSerializePort* port
276  );
277 
280  FwIndexType portNum,
281  Fw::InputSerializePort* port
282  );
283 
285  void set_Log_OutputPort(
286  FwIndexType portNum,
287  Fw::InputSerializePort* port
288  );
289 
290 #if FW_ENABLE_TEXT_LOGGING == 1
291 
293  void set_LogText_OutputPort(
294  FwIndexType portNum,
295  Fw::InputSerializePort* port
296  );
297 
298 #endif
299 
301  void set_Time_OutputPort(
302  FwIndexType portNum,
303  Fw::InputSerializePort* port
304  );
305 
307  void set_Tlm_OutputPort(
308  FwIndexType portNum,
309  Fw::InputSerializePort* port
310  );
311 
312 #endif
313 
314 #if FW_PORT_SERIALIZATION
315 
316  public:
317 
318  // ----------------------------------------------------------------------
319  // Connect serial input ports to typed output ports
320  // ----------------------------------------------------------------------
321 
324  FwIndexType portNum,
325  Fw::InputSerializePort* port
326  );
327 
330  FwIndexType portNum,
331  Fw::InputSerializePort* port
332  );
333 
336  FwIndexType portNum,
337  Fw::InputSerializePort* port
338  );
339 
340 #endif
341 
342  public:
343 
344  // ----------------------------------------------------------------------
345  // Command registration
346  // ----------------------------------------------------------------------
347 
351  void regCommands();
352 
353  protected:
354 
355  // ----------------------------------------------------------------------
356  // Component construction and destruction
357  // ----------------------------------------------------------------------
358 
361  const char* compName = ""
362  );
363 
366 
367  protected:
368 
369  // ----------------------------------------------------------------------
370  // Getters for numbers of special input ports
371  // ----------------------------------------------------------------------
372 
378  }
379 
380  protected:
381 
382  // ----------------------------------------------------------------------
383  // Getters for numbers of typed input ports
384  // ----------------------------------------------------------------------
385 
391  }
392 
398  }
399 
404  return NUM_PINGIN_INPUT_PORTS;
405  }
406 
410  static constexpr FwIndexType getNum_run_InputPorts() {
411  return NUM_RUN_INPUT_PORTS;
412  }
413 
419  }
420 
421  protected:
422 
423  // ----------------------------------------------------------------------
424  // Getters for numbers of special output ports
425  // ----------------------------------------------------------------------
426 
432  }
433 
439  }
440 
444  static constexpr FwIndexType getNum_Log_OutputPorts() {
445  return NUM_LOG_OUTPUT_PORTS;
446  }
447 
448 #if FW_ENABLE_TEXT_LOGGING == 1
449 
453  static constexpr FwIndexType getNum_LogText_OutputPorts() {
455  }
456 
457 #endif
458 
463  return NUM_TIME_OUTPUT_PORTS;
464  }
465 
469  static constexpr FwIndexType getNum_Tlm_OutputPorts() {
470  return NUM_TLM_OUTPUT_PORTS;
471  }
472 
473  protected:
474 
475  // ----------------------------------------------------------------------
476  // Getters for numbers of typed output ports
477  // ----------------------------------------------------------------------
478 
484  }
485 
491  }
492 
498  }
499 
500  protected:
501 
502  // ----------------------------------------------------------------------
503  // Connection status queries for special output ports
504  // ----------------------------------------------------------------------
505 
510  FwIndexType portNum
511  );
512 
517  FwIndexType portNum
518  );
519 
524  FwIndexType portNum
525  );
526 
527 #if FW_ENABLE_TEXT_LOGGING == 1
528 
532  bool isConnected_LogText_OutputPort(
533  FwIndexType portNum
534  );
535 
536 #endif
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 
579  protected:
580 
581  // ----------------------------------------------------------------------
582  // Handlers to implement for typed input ports
583  // ----------------------------------------------------------------------
584 
586  virtual void compCmdReg_handler(
587  FwIndexType portNum,
588  FwOpcodeType opCode
589  ) = 0;
590 
592  virtual void compCmdStat_handler(
593  FwIndexType portNum,
594  FwOpcodeType opCode,
595  U32 cmdSeq,
596  const Fw::CmdResponse& response
597  ) = 0;
598 
600  virtual void pingIn_handler(
601  FwIndexType portNum,
602  U32 key
603  ) = 0;
604 
606  virtual void run_handler(
607  FwIndexType portNum,
608  U32 context
609  ) = 0;
610 
612  virtual void seqCmdBuff_handler(
613  FwIndexType portNum,
614  Fw::ComBuffer& data,
615  U32 context
616  ) = 0;
617 
618  protected:
619 
620  // ----------------------------------------------------------------------
621  // Port handler base-class functions for typed input ports
622  //
623  // Call these functions directly to bypass the corresponding ports
624  // ----------------------------------------------------------------------
625 
628  FwIndexType portNum,
629  FwOpcodeType opCode
630  );
631 
634  FwIndexType portNum,
635  FwOpcodeType opCode,
636  U32 cmdSeq,
637  const Fw::CmdResponse& response
638  );
639 
641  void pingIn_handlerBase(
642  FwIndexType portNum,
643  U32 key
644  );
645 
647  void run_handlerBase(
648  FwIndexType portNum,
649  U32 context
650  );
651 
654  FwIndexType portNum,
655  Fw::ComBuffer& data,
656  U32 context
657  );
658 
659  protected:
660 
661  // ----------------------------------------------------------------------
662  // Pre-message hooks for typed async input ports
663  //
664  // Each of these functions is invoked just before processing a message
665  // on the corresponding port. By default, they do nothing. You can
666  // override them to provide specific pre-message behavior.
667  // ----------------------------------------------------------------------
668 
670  virtual void compCmdStat_preMsgHook(
671  FwIndexType portNum,
672  FwOpcodeType opCode,
673  U32 cmdSeq,
674  const Fw::CmdResponse& response
675  );
676 
678  virtual void pingIn_preMsgHook(
679  FwIndexType portNum,
680  U32 key
681  );
682 
684  virtual void run_preMsgHook(
685  FwIndexType portNum,
686  U32 context
687  );
688 
690  virtual void seqCmdBuff_preMsgHook(
691  FwIndexType portNum,
692  Fw::ComBuffer& data,
693  U32 context
694  );
695 
696  protected:
697 
698  // ----------------------------------------------------------------------
699  // Hooks for typed async input ports
700  //
701  // Each of these functions is invoked when placing a message on the
702  // queue would cause the queue to overlow. You should override them to provide
703  // specific overflow behavior.
704  // ----------------------------------------------------------------------
705 
707  virtual void seqCmdBuff_overflowHook(
708  FwIndexType portNum,
709  Fw::ComBuffer& data,
710  U32 context
711  ) = 0;
712 
713  protected:
714 
715  // ----------------------------------------------------------------------
716  // Invocation functions for typed output ports
717  // ----------------------------------------------------------------------
718 
720  void compCmdSend_out(
721  FwIndexType portNum,
722  FwOpcodeType opCode,
723  U32 cmdSeq,
724  Fw::CmdArgBuffer& args
725  );
726 
728  void pingOut_out(
729  FwIndexType portNum,
730  U32 key
731  );
732 
734  void seqCmdStatus_out(
735  FwIndexType portNum,
736  FwOpcodeType opCode,
737  U32 cmdSeq,
738  const Fw::CmdResponse& response
739  );
740 
741  protected:
742 
743  // ----------------------------------------------------------------------
744  // Command response
745  // ----------------------------------------------------------------------
746 
748  void cmdResponse_out(
749  FwOpcodeType opCode,
750  U32 cmdSeq,
751  Fw::CmdResponse response
752  );
753 
754  protected:
755 
756  // ----------------------------------------------------------------------
757  // Command handlers to implement
758  // ----------------------------------------------------------------------
759 
763  virtual void CMD_NO_OP_cmdHandler(
764  FwOpcodeType opCode,
765  U32 cmdSeq
766  ) = 0;
767 
771  virtual void CMD_NO_OP_STRING_cmdHandler(
772  FwOpcodeType opCode,
773  U32 cmdSeq,
774  const Fw::CmdStringArg& arg1
775  ) = 0;
776 
780  virtual void CMD_TEST_CMD_1_cmdHandler(
781  FwOpcodeType opCode,
782  U32 cmdSeq,
783  I32 arg1,
784  F32 arg2,
785  U8 arg3
786  ) = 0;
787 
791  virtual void CMD_CLEAR_TRACKING_cmdHandler(
792  FwOpcodeType opCode,
793  U32 cmdSeq
794  ) = 0;
795 
796  protected:
797 
798  // ----------------------------------------------------------------------
799  // Command handler base-class functions
800  //
801  // Call these functions directly to bypass the command input port
802  // ----------------------------------------------------------------------
803 
808  FwOpcodeType opCode,
809  U32 cmdSeq,
810  Fw::CmdArgBuffer& args
811  );
812 
817  FwOpcodeType opCode,
818  U32 cmdSeq,
819  Fw::CmdArgBuffer& args
820  );
821 
826  FwOpcodeType opCode,
827  U32 cmdSeq,
828  Fw::CmdArgBuffer& args
829  );
830 
835  FwOpcodeType opCode,
836  U32 cmdSeq,
837  Fw::CmdArgBuffer& args
838  );
839 
840  protected:
841 
842  // ----------------------------------------------------------------------
843  // Pre-message hooks for async commands
844  //
845  // Each of these functions is invoked just before processing the
846  // corresponding command. By default they do nothing. You can
847  // override them to provide specific pre-command behavior.
848  // ----------------------------------------------------------------------
849 
851  virtual void CMD_NO_OP_preMsgHook(
852  FwOpcodeType opCode,
853  U32 cmdSeq
854  );
855 
857  virtual void CMD_NO_OP_STRING_preMsgHook(
858  FwOpcodeType opCode,
859  U32 cmdSeq
860  );
861 
863  virtual void CMD_TEST_CMD_1_preMsgHook(
864  FwOpcodeType opCode,
865  U32 cmdSeq
866  );
867 
869  virtual void CMD_CLEAR_TRACKING_preMsgHook(
870  FwOpcodeType opCode,
871  U32 cmdSeq
872  );
873 
874  protected:
875 
876  // ----------------------------------------------------------------------
877  // Event logging functions
878  // ----------------------------------------------------------------------
879 
882  FwOpcodeType Opcode,
883  I32 port,
884  I32 slot
885  ) const;
886 
891  FwOpcodeType Opcode,
892  I32 port
893  ) const;
894 
899  FwOpcodeType Opcode
900  ) const;
901 
906  FwOpcodeType Opcode,
907  Fw::CmdResponse error
908  ) const;
909 
915  ) const;
916 
921  FwOpcodeType Opcode
922  ) const;
923 
928  FwOpcodeType Opcode
929  ) const;
930 
934  void log_ACTIVITY_HI_NoOpReceived() const;
935 
940  const Fw::StringBase& message
941  ) const;
942 
947  I32 arg1,
948  F32 arg2,
949  U8 arg3
950  ) const;
951 
956  FwOpcodeType Opcode,
957  I32 port
958  ) const;
959 
964  FwOpcodeType OpCode,
965  U32 Context
966  );
967 
968  protected:
969 
970  // ----------------------------------------------------------------------
971  // Event throttle reset functions
972  // ----------------------------------------------------------------------
973 
976 
977  protected:
978 
979  // ----------------------------------------------------------------------
980  // Telemetry write functions
981  // ----------------------------------------------------------------------
982 
987  U32 arg,
988  Fw::Time _tlmTime = Fw::Time()
989  );
990 
995  U32 arg,
996  Fw::Time _tlmTime = Fw::Time()
997  );
998 
1003  U32 arg,
1004  Fw::Time _tlmTime = Fw::Time()
1005  );
1006 
1007  protected:
1008 
1009  // ----------------------------------------------------------------------
1010  // Time
1011  // ----------------------------------------------------------------------
1012 
1016  Fw::Time getTime() const;
1017 
1018  protected:
1019 
1020  // ----------------------------------------------------------------------
1021  // Mutex operations for guarded ports
1022  //
1023  // You can override these operations to provide more sophisticated
1024  // synchronization
1025  // ----------------------------------------------------------------------
1026 
1028  virtual void lock();
1029 
1031  virtual void unLock();
1032 
1033  private:
1034 
1035  // ----------------------------------------------------------------------
1036  // Message dispatch functions
1037  // ----------------------------------------------------------------------
1038 
1040  virtual MsgDispatchStatus doDispatch();
1041 
1042  private:
1043 
1044  // ----------------------------------------------------------------------
1045  // Calls for messages received on special input ports
1046  // ----------------------------------------------------------------------
1047 
1049  static void m_p_CmdDisp_in(
1050  Fw::PassiveComponentBase* callComp,
1051  FwIndexType portNum,
1052  FwOpcodeType opCode,
1053  U32 cmdSeq,
1054  Fw::CmdArgBuffer& args
1055  );
1056 
1057  private:
1058 
1059  // ----------------------------------------------------------------------
1060  // Calls for messages received on typed input ports
1061  // ----------------------------------------------------------------------
1062 
1064  static void m_p_compCmdReg_in(
1065  Fw::PassiveComponentBase* callComp,
1066  FwIndexType portNum,
1067  FwOpcodeType opCode
1068  );
1069 
1071  static void m_p_compCmdStat_in(
1072  Fw::PassiveComponentBase* callComp,
1073  FwIndexType portNum,
1074  FwOpcodeType opCode,
1075  U32 cmdSeq,
1076  const Fw::CmdResponse& response
1077  );
1078 
1080  static void m_p_pingIn_in(
1081  Fw::PassiveComponentBase* callComp,
1082  FwIndexType portNum,
1083  U32 key
1084  );
1085 
1087  static void m_p_run_in(
1088  Fw::PassiveComponentBase* callComp,
1089  FwIndexType portNum,
1090  U32 context
1091  );
1092 
1094  static void m_p_seqCmdBuff_in(
1095  Fw::PassiveComponentBase* callComp,
1096  FwIndexType portNum,
1097  Fw::ComBuffer& data,
1098  U32 context
1099  );
1100 
1101  private:
1102 
1103  // ----------------------------------------------------------------------
1104  // Special input ports
1105  // ----------------------------------------------------------------------
1106 
1108  Fw::InputCmdPort m_CmdDisp_InputPort[NUM_CMDDISP_INPUT_PORTS];
1109 
1110  private:
1111 
1112  // ----------------------------------------------------------------------
1113  // Typed input ports
1114  // ----------------------------------------------------------------------
1115 
1117  Fw::InputCmdRegPort m_compCmdReg_InputPort[NUM_COMPCMDREG_INPUT_PORTS];
1118 
1120  Fw::InputCmdResponsePort m_compCmdStat_InputPort[NUM_COMPCMDSTAT_INPUT_PORTS];
1121 
1123  Svc::InputPingPort m_pingIn_InputPort[NUM_PINGIN_INPUT_PORTS];
1124 
1126  Svc::InputSchedPort m_run_InputPort[NUM_RUN_INPUT_PORTS];
1127 
1129  Fw::InputComPort m_seqCmdBuff_InputPort[NUM_SEQCMDBUFF_INPUT_PORTS];
1130 
1131  private:
1132 
1133  // ----------------------------------------------------------------------
1134  // Special output ports
1135  // ----------------------------------------------------------------------
1136 
1138  Fw::OutputCmdRegPort m_CmdReg_OutputPort[NUM_CMDREG_OUTPUT_PORTS];
1139 
1141  Fw::OutputCmdResponsePort m_CmdStatus_OutputPort[NUM_CMDSTATUS_OUTPUT_PORTS];
1142 
1144  Fw::OutputLogPort m_Log_OutputPort[NUM_LOG_OUTPUT_PORTS];
1145 
1146 #if FW_ENABLE_TEXT_LOGGING == 1
1147 
1149  Fw::OutputLogTextPort m_LogText_OutputPort[NUM_LOGTEXT_OUTPUT_PORTS];
1150 
1151 #endif
1152 
1154  Fw::OutputTimePort m_Time_OutputPort[NUM_TIME_OUTPUT_PORTS];
1155 
1157  Fw::OutputTlmPort m_Tlm_OutputPort[NUM_TLM_OUTPUT_PORTS];
1158 
1159  private:
1160 
1161  // ----------------------------------------------------------------------
1162  // Typed output ports
1163  // ----------------------------------------------------------------------
1164 
1166  Fw::OutputCmdPort m_compCmdSend_OutputPort[NUM_COMPCMDSEND_OUTPUT_PORTS];
1167 
1169  Svc::OutputPingPort m_pingOut_OutputPort[NUM_PINGOUT_OUTPUT_PORTS];
1170 
1172  Fw::OutputCmdResponsePort m_seqCmdStatus_OutputPort[NUM_SEQCMDSTATUS_OUTPUT_PORTS];
1173 
1174  private:
1175 
1176  // ----------------------------------------------------------------------
1177  // Counter values for event throttling
1178  // ----------------------------------------------------------------------
1179 
1181  std::atomic<FwIndexType> m_CommandDroppedQueueOverflowThrottle;
1182 
1183  private:
1184 
1185  // ----------------------------------------------------------------------
1186  // First update flags for telemetry channels
1187  // ----------------------------------------------------------------------
1188 
1190  bool m_first_update_CommandsDispatched = true;
1191 
1193  bool m_first_update_CommandErrors = true;
1194 
1196  bool m_first_update_CommandsDropped = true;
1197 
1198  private:
1199 
1200  // ----------------------------------------------------------------------
1201  // Last value storage for telemetry channels
1202  // ----------------------------------------------------------------------
1203 
1205  U32 m_last_CommandsDispatched = {};
1206 
1208  U32 m_last_CommandErrors = {};
1209 
1211  U32 m_last_CommandsDropped = {};
1212 
1213  private:
1214 
1215  // ----------------------------------------------------------------------
1216  // Mutexes
1217  // ----------------------------------------------------------------------
1218 
1220  Os::Mutex m_guardedPortMutex;
1221 
1222  };
1223 
1224 }
1225 
1226 #endif
This log event message returns the TEST_CMD_1 arguments.
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.
Clear command tracking info to recover from components not returning status.
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.
The command dispatcher has successfully received a NO-OP command.
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.
Exceeded the number of commands that can be simultaneously executed.
virtual void run_handler(FwIndexType portNum, U32 context)=0
Handler for input port run.
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.
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())
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()
The command dispatcher has successfully received a NO-OP command from GUI with a string.
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.
This log event reports the Command Sequence Buffer port queue has overflowed.
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.
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.
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.
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)