F´ Flight Software - C/C++ Documentation
A framework for building embedded system applications to NASA flight quality standards.
CommandDispatcherImpl.hpp
Go to the documentation of this file.
1 
13 #ifndef COMMANDDISPATCHERIMPL_HPP_
14 #define COMMANDDISPATCHERIMPL_HPP_
15 
16 #include <Os/Mutex.hpp>
18 #include <config/CommandDispatcherImplCfg.hpp>
19 
20 namespace Svc {
21 
30 
33 
34  public:
42  CommandDispatcherImpl(const char* name);
46  virtual ~CommandDispatcherImpl();
47 
48  protected:
49  private:
59  void compCmdStat_handler(FwIndexType portNum,
60  FwOpcodeType opCode,
61  U32 cmdSeq,
62  const Fw::CmdResponse& response) override;
71  void seqCmdBuff_handler(FwIndexType portNum, Fw::ComBuffer& data, U32 context) override;
80  void compCmdReg_handler(FwIndexType portNum, FwOpcodeType opCode) override;
89  void pingIn_handler(FwIndexType portNum, U32 key) override;
90 
94  void run_handler(FwIndexType portNum,
95  U32 context
96  ) override;
97 
104  void CMD_NO_OP_cmdHandler(FwOpcodeType opCode, U32 cmdSeq) override;
113  void CMD_NO_OP_STRING_cmdHandler(FwOpcodeType opCode, U32 cmdSeq, const Fw::CmdStringArg& arg1) override;
123  void CMD_TEST_CMD_1_cmdHandler(FwOpcodeType opCode, U32 cmdSeq, I32 arg1, F32 arg2, U8 arg3) override;
133  void CMD_CLEAR_TRACKING_cmdHandler(FwOpcodeType opCode, U32 cmdSeq) override;
134 
143  void seqCmdBuff_overflowHook(FwIndexType portNum, Fw::ComBuffer& data, U32 context) override;
144 
155 
156  struct DispatchEntry {
157  bool used;
158  FwOpcodeType opcode;
159  FwIndexType port;
160  } m_entryTable[CMD_DISPATCHER_DISPATCH_TABLE_SIZE];
161 
174 
175  struct SequenceTracker {
176  bool used;
177  U32 seq;
178  FwOpcodeType opCode;
179  U32 context;
180  FwIndexType callerPort;
181  } m_sequenceTracker[CMD_DISPATCHER_SEQUENCER_TABLE_SIZE];
182 
183  U32 m_seq;
184 
185  U32 m_numCmdsDispatched;
186  U32 m_numCmdErrors;
187  U32 m_numCmdsDropped;
188 };
189 } // namespace Svc
190 
191 #endif /* COMMANDDISPATCHERIMPL_HPP_ */
FwIdType FwOpcodeType
The type of a command opcode.
Enum representing a command response.
float F32
32-bit floating point
Definition: BasicTypes.h:83
virtual ~CommandDispatcherImpl()
Component destructor.
CommandDispatcherImpl(const char *name)
Command Dispatcher constructor.
uint8_t U8
8-bit unsigned integer
Definition: BasicTypes.h:53
PlatformIndexType FwIndexType
Auto-generated base for CommandDispatcher component.
RateGroupDivider component implementation.
Command Dispatcher component class.