![]() |
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>
Friends | |
| class | CommandDispatcherTester |
Additional Inherited Members | |
Public Types inherited from Fw::ActiveComponentBase | |
| enum | { ACTIVE_COMPONENT_EXIT } |
Public Types inherited from Fw::QueuedComponentBase | |
| enum | MsgDispatchStatus { MSG_DISPATCH_OK, MSG_DISPATCH_EMPTY, MSG_DISPATCH_ERROR, MSG_DISPATCH_EXIT } |
Protected Types inherited from Svc::CommandDispatcherComponentBase | |
| 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_RUN_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, EVENTID_COMMANDDROPPEDQUEUEOVERFLOW = 0xb } |
| Event IDs. More... | |
| enum | { EVENTID_COMMANDDROPPEDQUEUEOVERFLOW_THROTTLE = 5 } |
| Event throttle values: sets initial value of countdown variables. More... | |
| enum | { CHANNELID_COMMANDSDISPATCHED = 0x0, CHANNELID_COMMANDERRORS = 0x1, CHANNELID_COMMANDSDROPPED = 0x2 } |
| Channel IDs. More... | |
Protected Types inherited from Fw::ActiveComponentBase | |
| enum | Lifecycle { CREATED, DISPATCHING, FINALIZING, DONE } |
| Tracks the lifecycle of the component. More... | |
Protected Member Functions inherited from Svc::CommandDispatcherComponentBase | |
| CommandDispatcherComponentBase (const char *compName="") | |
| Construct CommandDispatcherComponentBase object. More... | |
| virtual | ~CommandDispatcherComponentBase () |
| Destroy CommandDispatcherComponentBase object. More... | |
| 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 | run_handlerBase (FwIndexType portNum, U32 context) |
| Handler base-class function for input port run. 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 | run_preMsgHook (FwIndexType portNum, U32 context) |
| Pre-message hook for async input port run. 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 (FwOpcodeType Opcode, I32 port, I32 slot) const |
| Log event OpCodeRegistered. More... | |
| void | log_COMMAND_OpCodeDispatched (FwOpcodeType Opcode, I32 port) const |
| void | log_COMMAND_OpCodeCompleted (FwOpcodeType Opcode) const |
| void | log_COMMAND_OpCodeError (FwOpcodeType Opcode, Fw::CmdResponse error) const |
| void | log_WARNING_HI_MalformedCommand (Fw::DeserialStatus Status) const |
| void | log_WARNING_HI_InvalidCommand (FwOpcodeType Opcode) const |
| void | log_WARNING_HI_TooManyCommands (FwOpcodeType 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 (FwOpcodeType Opcode, I32 port) const |
| void | log_WARNING_HI_CommandDroppedQueueOverflow (FwOpcodeType OpCode, U32 Context) |
| void | log_WARNING_HI_CommandDroppedQueueOverflow_ThrottleClear () |
| Reset throttle value for CommandDroppedQueueOverflow. More... | |
| void | tlmWrite_CommandsDispatched (U32 arg, Fw::Time _tlmTime=Fw::Time()) |
| void | tlmWrite_CommandErrors (U32 arg, Fw::Time _tlmTime=Fw::Time()) |
| void | tlmWrite_CommandsDropped (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... | |
Protected Member Functions inherited from Fw::ActiveComponentBase | |
| 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... | |
Protected Member Functions inherited from Fw::QueuedComponentBase | |
| 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... | |
Protected Member Functions inherited from Fw::PassiveComponentBase | |
| PassiveComponentBase (const char *name) | |
| Named constructor. More... | |
| virtual | ~PassiveComponentBase () |
| Destructor. More... | |
| void | init (FwEnumStoreType instance) |
| Initialization function. More... | |
| FwEnumStoreType | getInstance () const |
Protected Member Functions inherited from Fw::ObjBase | |
| ObjBase (const char *name) | |
| ObjBase constructor. More... | |
| virtual | ~ObjBase () |
| Destructor. More... | |
| void | init () |
| Object initializer. More... | |
Static Protected Member Functions inherited from Svc::CommandDispatcherComponentBase | |
| static constexpr FwIndexType | getNum_CmdDisp_InputPorts () |
| static constexpr FwIndexType | getNum_compCmdReg_InputPorts () |
| static constexpr FwIndexType | getNum_compCmdStat_InputPorts () |
| static constexpr FwIndexType | getNum_pingIn_InputPorts () |
| static constexpr FwIndexType | getNum_run_InputPorts () |
| static constexpr FwIndexType | getNum_seqCmdBuff_InputPorts () |
| static constexpr FwIndexType | getNum_CmdReg_OutputPorts () |
| static constexpr FwIndexType | getNum_CmdStatus_OutputPorts () |
| static constexpr FwIndexType | getNum_Log_OutputPorts () |
| static constexpr FwIndexType | getNum_Time_OutputPorts () |
| static constexpr FwIndexType | getNum_Tlm_OutputPorts () |
| static constexpr FwIndexType | getNum_compCmdSend_OutputPorts () |
| static constexpr FwIndexType | getNum_pingOut_OutputPorts () |
| static constexpr FwIndexType | getNum_seqCmdStatus_OutputPorts () |
Protected Attributes inherited from Fw::ActiveComponentBase | |
| Os::Task | m_task |
| task object for active component More... | |
Protected Attributes inherited from Fw::QueuedComponentBase | |
| 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 31 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 20 of file CommandDispatcherImpl.cpp.
|
virtual |
Component destructor.
The destructor for this component is empty
Definition at line 26 of file CommandDispatcherImpl.cpp.
|
friend |
Definition at line 32 of file CommandDispatcherImpl.hpp.