|
F´ Flight Software - C/C++ Documentation
NASA-v1.5.0
A framework for building embedded system applications to NASA flight quality standards.
|
Command Dispatcher component class. More...
#include <Svc/CmdDispatcher/CommandDispatcherImpl.hpp>
Classes | |
| struct | DispatchEntry |
| table used to store opcode to port mappings More... | |
| struct | SequenceTracker |
| table used to store opcode that are being executed More... | |
Command Dispatcher component class.
The command dispatcher takes incoming Fw::Com packets that contain encoded commands. It extracts the opcode and looks it up in a table that is populated by components at registration time. If a component is connected to the seqCmdStatus port with the same number as the port that submitted the command, the command status will be returned.
Definition at line 32 of file CommandDispatcherImpl.hpp.
| Svc::CommandDispatcherImpl::CommandDispatcherImpl | ( | const char * | name | ) |
Command Dispatcher constructor.
The constructor initializes the state of the component. In this component, the opcode dispatch and tracking tables are initialized.
| name | the component instance name |
Definition at line 14 of file CommandDispatcherImpl.cpp.
|
virtual |
Component destructor.
The destructor for this component is empty
Definition at line 24 of file CommandDispatcherImpl.cpp.
|
virtual |
A command to clear the command tracking.
This command will clear the table tracking the completion of commands. It is meant to be used if the tracking table has gotten full because of a software failure. It is dangerous in that it can clear a command that a sequencer is watiting for.
| opCode | the CLEAR_TRACKING opcode. |
| cmdSeq | the assigned sequence number for the command |
Implements Svc::CommandDispatcherComponentBase.
Definition at line 221 of file CommandDispatcherImpl.cpp.
| void Svc::CommandDispatcherImpl::CMD_NO_OP_cmdHandler | ( | FwOpcodeType | opCode, |
| U32 | cmdSeq | ||
| ) |
NO_OP command handler.
A test command that does nothing
| opCode | the NO_OP opcode. |
| cmdSeq | the assigned sequence number for the command |
Definition at line 202 of file CommandDispatcherImpl.cpp.
|
virtual |
NO_OP with string command handler.
A test command that receives a string an sends an event with the string as an argument
| opCode | the NO_OP_STRING opcode. |
| cmdSeq | the assigned sequence number for the command |
| arg1 | the string argument |
Implements Svc::CommandDispatcherComponentBase.
Definition at line 209 of file CommandDispatcherImpl.cpp.
|
virtual |
A test command with different argument types.
A test command that receives a set of arguments of different types
| opCode | the TEST_CMD_1 opcode. |
| cmdSeq | the assigned sequence number for the command |
| arg1 | the I32 argument |
| arg2 | the F32 argument |
| arg3 | the U8 argument |
Implements Svc::CommandDispatcherComponentBase.
Definition at line 216 of file CommandDispatcherImpl.cpp.
| void Svc::CommandDispatcherImpl::compCmdReg_handler | ( | NATIVE_INT_TYPE | portNum, |
| FwOpcodeType | opCode | ||
| ) |
component command registration handler
The command registration handler is called to register new opcodes. The port number called is used to indicate which port should be used to dispatch the opcode.
| portNum | the number of the incoming port. |
| opCode | the opcode being registered. |
Definition at line 34 of file CommandDispatcherImpl.cpp.
| void Svc::CommandDispatcherImpl::init | ( | NATIVE_INT_TYPE | queueDepth, |
| NATIVE_INT_TYPE | instance | ||
| ) |
Component initialization routine.
The initialization function calls the initialization routine for the base class.
| queueDepth | the depth of the message queue for the component initialization function |
| queueDepth | The queue depth |
| instance | The instance number |
Definition at line 27 of file CommandDispatcherImpl.cpp.
|
virtual |
component ping handler
The ping handler responds to messages to verify that the task is still executing. Will call output poing port
| portNum | the number of the incoming port. |
| opCode | the opcode being registered. |
| key | the key value that is returned with the ping response |
Implements Svc::CommandDispatcherComponentBase.
Definition at line 229 of file CommandDispatcherImpl.cpp.
|
virtual |
component command buffer handler
The command buffer handler is called to submit a new command packet to be decoded
| portNum | the number of the incoming port. |
| data | the buffer containing the command. |
| context | a user value returned with the statuss |
Implements Svc::CommandDispatcherComponentBase.
Definition at line 109 of file CommandDispatcherImpl.cpp.
| PROTECTED Svc::CommandDispatcherImpl::__pad0__ |
Definition at line 56 of file CommandDispatcherImpl.hpp.
| PROTECTED FwOpcodeType U32 Svc::CommandDispatcherImpl::cmdSeq |
Definition at line 67 of file CommandDispatcherImpl.hpp.
| struct Svc::CommandDispatcherImpl::DispatchEntry Svc::CommandDispatcherImpl::m_entryTable[CMD_DISPATCHER_DISPATCH_TABLE_SIZE] |
table of dispatch entries
| U32 Svc::CommandDispatcherImpl::m_numCmdErrors |
number of commands with an error
Definition at line 173 of file CommandDispatcherImpl.hpp.
| U32 Svc::CommandDispatcherImpl::m_numCmdsDispatched |
number of commands dispatched
Definition at line 172 of file CommandDispatcherImpl.hpp.
| I32 Svc::CommandDispatcherImpl::m_seq |
current command sequence number
Definition at line 170 of file CommandDispatcherImpl.hpp.
| struct Svc::CommandDispatcherImpl::SequenceTracker Svc::CommandDispatcherImpl::m_sequenceTracker[CMD_DISPATCHER_SEQUENCER_TABLE_SIZE] |
sequence tracking port for command completions;
| PROTECTED FwOpcodeType Svc::CommandDispatcherImpl::opCode |
Definition at line 67 of file CommandDispatcherImpl.hpp.
| PROTECTED FwOpcodeType U32 Fw::CommandResponse Svc::CommandDispatcherImpl::response |
Definition at line 67 of file CommandDispatcherImpl.hpp.