F´ Flight Software - C/C++ Documentation  devel
A framework for building embedded system applications to NASA flight quality standards.
CommandDispatcherImpl.hpp
Go to the documentation of this file.
1 
14 #ifndef COMMANDDISPATCHERIMPL_HPP_
15 #define COMMANDDISPATCHERIMPL_HPP_
16 
18 #include <Os/Mutex.hpp>
20 
21 namespace Svc {
22 
31 
33  public:
41  CommandDispatcherImpl(const char* name);
45  virtual ~CommandDispatcherImpl();
46  PROTECTED:
47  PRIVATE:
57  void compCmdStat_handler(NATIVE_INT_TYPE portNum, FwOpcodeType opCode, U32 cmdSeq, const Fw::CmdResponse &response);
66  void seqCmdBuff_handler(NATIVE_INT_TYPE portNum, Fw::ComBuffer &data, U32 context);
75  void compCmdReg_handler(NATIVE_INT_TYPE portNum, FwOpcodeType opCode);
84  void pingIn_handler(NATIVE_INT_TYPE portNum, U32 key);
91  void CMD_NO_OP_cmdHandler(FwOpcodeType opCode, U32 cmdSeq);
100  void CMD_NO_OP_STRING_cmdHandler(FwOpcodeType opCode, U32 cmdSeq, const Fw::CmdStringArg& arg1);
110  void CMD_TEST_CMD_1_cmdHandler(FwOpcodeType opCode, U32 cmdSeq, I32 arg1, F32 arg2, U8 arg3);
120  void CMD_CLEAR_TRACKING_cmdHandler(FwOpcodeType opCode, U32 cmdSeq);
121 
132 
133  struct DispatchEntry {
134  bool used;
135  U32 opcode;
136  NATIVE_INT_TYPE port;
137  } m_entryTable[CMD_DISPATCHER_DISPATCH_TABLE_SIZE];
138 
151 
152  struct SequenceTracker {
153  bool used;
154  U32 seq;
155  FwOpcodeType opCode;
156  U32 context;
157  NATIVE_INT_TYPE callerPort;
158  } m_sequenceTracker[CMD_DISPATCHER_SEQUENCER_TABLE_SIZE];
159 
160  U32 m_seq;
161 
162  U32 m_numCmdsDispatched;
163  U32 m_numCmdErrors;
164 
165  };
166 }
167 
168 #endif /* COMMANDDISPATCHERIMPL_HPP_ */
PlatformIntType NATIVE_INT_TYPE
Definition: BasicTypes.h:55
float F32
32-bit floating point
Definition: BasicTypes.h:49
uint8_t U8
8-bit unsigned integer
Definition: BasicTypes.h:30
@ CMD_DISPATCHER_SEQUENCER_TABLE_SIZE
@ CMD_DISPATCHER_DISPATCH_TABLE_SIZE
U32 FwOpcodeType
Definition: FpConfig.h:91
Enum representing a command response.
Auto-generated base for CommandDispatcher component.
Command Dispatcher component class.
CommandDispatcherImpl(const char *name)
Command Dispatcher constructor.
virtual ~CommandDispatcherImpl()
Component destructor.