![]() |
F´ Flight Software - C/C++ Documentation
A framework for building embedded system applications to NASA flight quality standards.
|
Command Dispatcher component class. More...
#include <Svc/CmdDispatcher/CommandDispatcherImpl.hpp>
Additional Inherited Members | |
![]() | |
enum | { ACTIVE_COMPONENT_EXIT } |
![]() | |
enum | MsgDispatchStatus { MSG_DISPATCH_OK, MSG_DISPATCH_EMPTY, MSG_DISPATCH_ERROR, MSG_DISPATCH_EXIT } |
![]() | |
enum | { NUM_CMDDISP_INPUT_PORTS = 1 } |
Enumerations for numbers of special input ports. More... | |
enum | { NUM_COMPCMDREG_INPUT_PORTS = 30, NUM_COMPCMDSTAT_INPUT_PORTS = 1, NUM_PINGIN_INPUT_PORTS = 1, NUM_SEQCMDBUFF_INPUT_PORTS = 5 } |
Enumerations for numbers of typed input ports. More... | |
enum | { NUM_CMDREG_OUTPUT_PORTS = 1, NUM_CMDSTATUS_OUTPUT_PORTS = 1, NUM_LOG_OUTPUT_PORTS = 1, NUM_LOGTEXT_OUTPUT_PORTS = 1, NUM_TIME_OUTPUT_PORTS = 1, NUM_TLM_OUTPUT_PORTS = 1 } |
Enumerations for numbers of special output ports. More... | |
enum | { NUM_COMPCMDSEND_OUTPUT_PORTS = 30, NUM_PINGOUT_OUTPUT_PORTS = 1, NUM_SEQCMDSTATUS_OUTPUT_PORTS = 5 } |
Enumerations for numbers of typed output ports. More... | |
enum | { OPCODE_CMD_NO_OP = 0x0, OPCODE_CMD_NO_OP_STRING = 0x1, OPCODE_CMD_TEST_CMD_1 = 0x2, OPCODE_CMD_CLEAR_TRACKING = 0x3 } |
Command opcodes. More... | |
enum | { EVENTID_OPCODEREGISTERED = 0x0, EVENTID_OPCODEDISPATCHED = 0x1, EVENTID_OPCODECOMPLETED = 0x2, EVENTID_OPCODEERROR = 0x3, EVENTID_MALFORMEDCOMMAND = 0x4, EVENTID_INVALIDCOMMAND = 0x5, EVENTID_TOOMANYCOMMANDS = 0x6, EVENTID_NOOPRECEIVED = 0x7, EVENTID_NOOPSTRINGRECEIVED = 0x8, EVENTID_TESTCMD1ARGS = 0x9, EVENTID_OPCODEREREGISTERED = 0xa } |
Event IDs. More... | |
enum | { CHANNELID_COMMANDSDISPATCHED = 0x0, CHANNELID_COMMANDERRORS = 0x1 } |
Channel IDs. More... | |
![]() | |
enum | Lifecycle { CREATED, DISPATCHING, FINALIZING, DONE } |
Tracks the lifecycle of the component. More... | |
![]() | |
CommandDispatcherComponentBase (const char *compName="") | |
Construct CommandDispatcherComponentBase object. More... | |
virtual | ~CommandDispatcherComponentBase () |
Destroy CommandDispatcherComponentBase object. More... | |
FwIndexType | getNum_CmdDisp_InputPorts () const |
FwIndexType | getNum_compCmdReg_InputPorts () const |
FwIndexType | getNum_compCmdStat_InputPorts () const |
FwIndexType | getNum_pingIn_InputPorts () const |
FwIndexType | getNum_seqCmdBuff_InputPorts () const |
FwIndexType | getNum_CmdReg_OutputPorts () const |
FwIndexType | getNum_CmdStatus_OutputPorts () const |
FwIndexType | getNum_Log_OutputPorts () const |
FwIndexType | getNum_Time_OutputPorts () const |
FwIndexType | getNum_Tlm_OutputPorts () const |
FwIndexType | getNum_compCmdSend_OutputPorts () const |
FwIndexType | getNum_pingOut_OutputPorts () const |
FwIndexType | getNum_seqCmdStatus_OutputPorts () const |
bool | isConnected_CmdReg_OutputPort (FwIndexType portNum) |
bool | isConnected_CmdStatus_OutputPort (FwIndexType portNum) |
bool | isConnected_Log_OutputPort (FwIndexType portNum) |
bool | isConnected_Time_OutputPort (FwIndexType portNum) |
bool | isConnected_Tlm_OutputPort (FwIndexType portNum) |
bool | isConnected_compCmdSend_OutputPort (FwIndexType portNum) |
bool | isConnected_pingOut_OutputPort (FwIndexType portNum) |
bool | isConnected_seqCmdStatus_OutputPort (FwIndexType portNum) |
void | compCmdReg_handlerBase (FwIndexType portNum, FwOpcodeType opCode) |
Handler base-class function for input port compCmdReg. More... | |
void | compCmdStat_handlerBase (FwIndexType portNum, FwOpcodeType opCode, U32 cmdSeq, const Fw::CmdResponse &response) |
Handler base-class function for input port compCmdStat. More... | |
void | pingIn_handlerBase (FwIndexType portNum, U32 key) |
Handler base-class function for input port pingIn. More... | |
void | seqCmdBuff_handlerBase (FwIndexType portNum, Fw::ComBuffer &data, U32 context) |
Handler base-class function for input port seqCmdBuff. More... | |
virtual void | compCmdStat_preMsgHook (FwIndexType portNum, FwOpcodeType opCode, U32 cmdSeq, const Fw::CmdResponse &response) |
Pre-message hook for async input port compCmdStat. More... | |
virtual void | pingIn_preMsgHook (FwIndexType portNum, U32 key) |
Pre-message hook for async input port pingIn. More... | |
virtual void | seqCmdBuff_preMsgHook (FwIndexType portNum, Fw::ComBuffer &data, U32 context) |
Pre-message hook for async input port seqCmdBuff. More... | |
void | compCmdSend_out (FwIndexType portNum, FwOpcodeType opCode, U32 cmdSeq, Fw::CmdArgBuffer &args) |
Invoke output port compCmdSend. More... | |
void | pingOut_out (FwIndexType portNum, U32 key) |
Invoke output port pingOut. More... | |
void | seqCmdStatus_out (FwIndexType portNum, FwOpcodeType opCode, U32 cmdSeq, const Fw::CmdResponse &response) |
Invoke output port seqCmdStatus. More... | |
void | cmdResponse_out (FwOpcodeType opCode, U32 cmdSeq, Fw::CmdResponse response) |
Emit command response. More... | |
void | CMD_NO_OP_cmdHandlerBase (FwOpcodeType opCode, U32 cmdSeq, Fw::CmdArgBuffer &args) |
void | CMD_NO_OP_STRING_cmdHandlerBase (FwOpcodeType opCode, U32 cmdSeq, Fw::CmdArgBuffer &args) |
void | CMD_TEST_CMD_1_cmdHandlerBase (FwOpcodeType opCode, U32 cmdSeq, Fw::CmdArgBuffer &args) |
void | CMD_CLEAR_TRACKING_cmdHandlerBase (FwOpcodeType opCode, U32 cmdSeq, Fw::CmdArgBuffer &args) |
virtual void | CMD_NO_OP_preMsgHook (FwOpcodeType opCode, U32 cmdSeq) |
Pre-message hook for command CMD_NO_OP. More... | |
virtual void | CMD_NO_OP_STRING_preMsgHook (FwOpcodeType opCode, U32 cmdSeq) |
Pre-message hook for command CMD_NO_OP_STRING. More... | |
virtual void | CMD_TEST_CMD_1_preMsgHook (FwOpcodeType opCode, U32 cmdSeq) |
Pre-message hook for command CMD_TEST_CMD_1. More... | |
virtual void | CMD_CLEAR_TRACKING_preMsgHook (FwOpcodeType opCode, U32 cmdSeq) |
Pre-message hook for command CMD_CLEAR_TRACKING. More... | |
void | log_DIAGNOSTIC_OpCodeRegistered (U32 Opcode, I32 port, I32 slot) const |
Log event OpCodeRegistered. More... | |
void | log_COMMAND_OpCodeDispatched (U32 Opcode, I32 port) const |
void | log_COMMAND_OpCodeCompleted (U32 Opcode) const |
void | log_COMMAND_OpCodeError (U32 Opcode, Fw::CmdResponse error) const |
void | log_WARNING_HI_MalformedCommand (Fw::DeserialStatus Status) const |
void | log_WARNING_HI_InvalidCommand (U32 Opcode) const |
void | log_WARNING_HI_TooManyCommands (U32 Opcode) const |
void | log_ACTIVITY_HI_NoOpReceived () const |
void | log_ACTIVITY_HI_NoOpStringReceived (const Fw::StringBase &message) const |
void | log_ACTIVITY_HI_TestCmd1Args (I32 arg1, F32 arg2, U8 arg3) const |
void | log_DIAGNOSTIC_OpCodeReregistered (U32 Opcode, I32 port) const |
void | tlmWrite_CommandsDispatched (U32 arg, Fw::Time _tlmTime=Fw::Time()) |
void | tlmWrite_CommandErrors (U32 arg, Fw::Time _tlmTime=Fw::Time()) |
Fw::Time | getTime () const |
virtual void | lock () |
Lock the guarded mutex. More... | |
virtual void | unLock () |
Unlock the guarded mutex. More... | |
![]() | |
ActiveComponentBase (const char *name) | |
Constructor. More... | |
virtual | ~ActiveComponentBase () |
Destructor. More... | |
void | init (FwEnumStoreType instance) |
initialization code More... | |
virtual void | preamble () |
A function that will be called before the event loop is entered. More... | |
MsgDispatchStatus | dispatch () |
The function that will dispatching messages. More... | |
virtual void | finalizer () |
A function that will be called after exiting the loop. More... | |
![]() | |
QueuedComponentBase (const char *name) | |
Constructor. More... | |
virtual | ~QueuedComponentBase () |
Destructor. More... | |
void | init (FwEnumStoreType instance) |
initialization function More... | |
Os::Queue::Status | createQueue (FwSizeType depth, FwSizeType msgSize) |
FwSizeType | getNumMsgsDropped () |
return number of messages dropped More... | |
void | incNumMsgDropped () |
increment the number of messages dropped More... | |
![]() | |
PassiveComponentBase (const char *name) | |
Named constructor. More... | |
virtual | ~PassiveComponentBase () |
Destructor. More... | |
void | init (FwEnumStoreType instance) |
Initialization function. More... | |
FwEnumStoreType | getInstance () const |
![]() | |
ObjBase (const char *name) | |
ObjBase constructor. More... | |
virtual | ~ObjBase () |
Destructor. More... | |
void | init () |
Object initializer. More... | |
![]() | |
Os::Task | m_task |
task object for active component More... | |
![]() | |
Os::Queue | m_queue |
queue object for active component 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 18 of file CommandDispatcherImpl.cpp.
|
virtual |
Component destructor.
The destructor for this component is empty
Definition at line 28 of file CommandDispatcherImpl.cpp.