F´ Flight Software - C/C++ Documentation NASA-v1.6.0
A framework for building embedded system applications to NASA flight quality standards.
Loading...
Searching...
No Matches
CommandDispatcherImpl.hpp
Go to the documentation of this file.
1
14#ifndef COMMANDDISPATCHERIMPL_HPP_
15#define COMMANDDISPATCHERIMPL_HPP_
16
17#include <Svc/CmdDispatcher/CommandDispatcherComponentAc.hpp>
18#include <Os/Mutex.hpp>
20
21namespace Svc {
22
31
32 class CommandDispatcherImpl : public CommandDispatcherComponentBase {
33 public:
41 CommandDispatcherImpl(const char* name);
48 void init(
49 NATIVE_INT_TYPE queueDepth,
50 NATIVE_INT_TYPE instance
51 );
55 virtual ~CommandDispatcherImpl();
56 PROTECTED:
57 PRIVATE:
67 void compCmdStat_handler(NATIVE_INT_TYPE portNum, FwOpcodeType opCode, U32 cmdSeq, const Fw::CmdResponse &response);
76 void seqCmdBuff_handler(NATIVE_INT_TYPE portNum, Fw::ComBuffer &data, U32 context);
85 void compCmdReg_handler(NATIVE_INT_TYPE portNum, FwOpcodeType opCode);
94 void pingIn_handler(NATIVE_INT_TYPE portNum, U32 key);
101 void CMD_NO_OP_cmdHandler(FwOpcodeType opCode, U32 cmdSeq);
110 void CMD_NO_OP_STRING_cmdHandler(FwOpcodeType opCode, U32 cmdSeq, const Fw::CmdStringArg& arg1);
120 void CMD_TEST_CMD_1_cmdHandler(FwOpcodeType opCode, U32 cmdSeq, I32 arg1, F32 arg2, U8 arg3);
130 void CMD_CLEAR_TRACKING_cmdHandler(FwOpcodeType opCode, U32 cmdSeq);
131
142
143 struct DispatchEntry {
144 bool used;
145 U32 opcode;
146 NATIVE_INT_TYPE port;
147 } m_entryTable[CMD_DISPATCHER_DISPATCH_TABLE_SIZE];
148
161
162 struct SequenceTracker {
163 bool used;
164 U32 seq;
165 FwOpcodeType opCode;
166 U32 context;
167 NATIVE_INT_TYPE callerPort;
168 } m_sequenceTracker[CMD_DISPATCHER_SEQUENCER_TABLE_SIZE];
169
170 I32 m_seq;
171
172 U32 m_numCmdsDispatched;
173 U32 m_numCmdErrors;
174
175 };
176}
177
178#endif /* COMMANDDISPATCHERIMPL_HPP_ */
PlatformIntType NATIVE_INT_TYPE
Definition BasicTypes.h:51
float F32
32-bit floating point
Definition BasicTypes.h:45
uint8_t U8
8-bit unsigned integer
Definition BasicTypes.h:26
@ CMD_DISPATCHER_SEQUENCER_TABLE_SIZE
@ CMD_DISPATCHER_DISPATCH_TABLE_SIZE
U32 FwOpcodeType
Definition FpConfig.h:56
Command Dispatcher component class.
void init(NATIVE_INT_TYPE queueDepth, NATIVE_INT_TYPE instance)
Component initialization routine.
virtual ~CommandDispatcherImpl()
Component destructor.