7 #ifndef Svc_CommandDispatcherComponentAc_HPP
8 #define Svc_CommandDispatcherComponentAc_HPP
20 #if FW_ENABLE_TEXT_LOGGING == 1
197 #if FW_ENABLE_TEXT_LOGGING == 1
200 void set_LogText_OutputPort(
243 #if FW_PORT_SERIALIZATION
254 Fw::InputSerializePort* port
260 Fw::InputSerializePort* port
266 Fw::InputSerializePort* port
269 #if FW_ENABLE_TEXT_LOGGING == 1
272 void set_LogText_OutputPort(
274 Fw::InputSerializePort* port
282 Fw::InputSerializePort* port
288 Fw::InputSerializePort* port
293 #if FW_PORT_SERIALIZATION
304 Fw::InputSerializePort* port
310 Fw::InputSerializePort* port
316 Fw::InputSerializePort* port
340 const char* compName =
""
404 #if FW_ENABLE_TEXT_LOGGING == 1
471 #if FW_ENABLE_TEXT_LOGGING == 1
476 bool isConnected_LogText_OutputPort(
933 static void m_p_CmdDisp_in(
948 static void m_p_compCmdReg_in(
955 static void m_p_compCmdStat_in(
964 static void m_p_pingIn_in(
971 static void m_p_seqCmdBuff_in(
1020 #if FW_ENABLE_TEXT_LOGGING == 1
1055 bool m_first_update_CommandsDispatched;
1058 bool m_first_update_CommandErrors;
1067 U32 m_last_CommandsDispatched;
1070 U32 m_last_CommandErrors;
float F32
32-bit floating point
uint8_t U8
8-bit unsigned integer
PlatformSizeType FwSizeType
PlatformIndexType FwIndexType
C++-compatible configuration header for fprime configuration.
Enum representing a command response.
void init()
Object initializer.
Auto-generated base for CommandDispatcher component.
void set_CmdStatus_OutputPort(FwIndexType portNum, Fw::InputCmdResponsePort *port)
Connect port to CmdStatus[portNum].
virtual void pingIn_preMsgHook(FwIndexType portNum, U32 key)
Pre-message hook for async input port pingIn.
void log_DIAGNOSTIC_OpCodeReregistered(U32 Opcode, I32 port)
bool isConnected_seqCmdStatus_OutputPort(FwIndexType portNum)
virtual void CMD_TEST_CMD_1_preMsgHook(FwOpcodeType opCode, U32 cmdSeq)
Pre-message hook for command CMD_TEST_CMD_1.
FwIndexType getNum_Time_OutputPorts() const
void log_ACTIVITY_HI_TestCmd1Args(I32 arg1, F32 arg2, U8 arg3)
virtual void compCmdStat_handler(FwIndexType portNum, FwOpcodeType opCode, U32 cmdSeq, const Fw::CmdResponse &response)=0
Handler for input port compCmdStat.
void log_ACTIVITY_HI_NoOpReceived()
virtual void CMD_NO_OP_STRING_preMsgHook(FwOpcodeType opCode, U32 cmdSeq)
Pre-message hook for command CMD_NO_OP_STRING.
FwIndexType getNum_compCmdSend_OutputPorts() const
@ NUM_CMDDISP_INPUT_PORTS
void regCommands()
Register commands with the Command Dispatcher.
void CMD_NO_OP_cmdHandlerBase(FwOpcodeType opCode, U32 cmdSeq, Fw::CmdArgBuffer &args)
void log_DIAGNOSTIC_OpCodeRegistered(U32 Opcode, I32 port, I32 slot)
Log event OpCodeRegistered.
CommandDispatcherComponentBase(const char *compName="")
Construct CommandDispatcherComponentBase object.
FwIndexType getNum_compCmdReg_InputPorts() const
virtual void CMD_NO_OP_preMsgHook(FwOpcodeType opCode, U32 cmdSeq)
Pre-message hook for command CMD_NO_OP.
bool isConnected_pingOut_OutputPort(FwIndexType portNum)
void log_COMMAND_OpCodeCompleted(U32 Opcode)
virtual void compCmdReg_handler(FwIndexType portNum, FwOpcodeType opCode)=0
Handler for input port compCmdReg.
@ EVENTID_OPCODEDISPATCHED
Op code dispatched event.
@ EVENTID_MALFORMEDCOMMAND
Received a malformed command packet.
@ EVENTID_INVALIDCOMMAND
Received an invalid opcode.
@ EVENTID_NOOPRECEIVED
The command dispatcher has successfully received a NO-OP command.
@ EVENTID_TOOMANYCOMMANDS
Exceeded the number of commands that can be simultaneously executed.
@ EVENTID_NOOPSTRINGRECEIVED
The command dispatcher has successfully received a NO-OP command from GUI with a string.
@ EVENTID_TESTCMD1ARGS
This log event message returns the TEST_CMD_1 arguments.
@ EVENTID_OPCODECOMPLETED
Op code completed event.
@ EVENTID_OPCODEREREGISTERED
Op code reregistered event.
@ EVENTID_OPCODEERROR
Op code completed with error event.
@ EVENTID_OPCODEREGISTERED
FwIndexType getNum_CmdReg_OutputPorts() const
void seqCmdBuff_handlerBase(FwIndexType portNum, Fw::ComBuffer &data, U32 context)
Handler base-class function for input port seqCmdBuff.
void set_Log_OutputPort(FwIndexType portNum, Fw::InputLogPort *port)
Connect port to Log[portNum].
virtual void unLock()
Unlock the guarded mutex.
Fw::InputCmdResponsePort * get_compCmdStat_InputPort(FwIndexType portNum)
virtual void seqCmdBuff_preMsgHook(FwIndexType portNum, Fw::ComBuffer &data, U32 context)
Pre-message hook for async input port seqCmdBuff.
void tlmWrite_CommandErrors(U32 arg, Fw::Time _tlmTime=Fw::Time())
void set_Tlm_OutputPort(FwIndexType portNum, Fw::InputTlmPort *port)
Connect port to Tlm[portNum].
FwIndexType getNum_seqCmdBuff_InputPorts() const
virtual void pingIn_handler(FwIndexType portNum, U32 key)=0
Handler for input port pingIn.
@ NUM_COMPCMDSTAT_INPUT_PORTS
@ NUM_COMPCMDREG_INPUT_PORTS
@ NUM_SEQCMDBUFF_INPUT_PORTS
FwIndexType getNum_CmdDisp_InputPorts() const
FwIndexType getNum_seqCmdStatus_OutputPorts() const
void compCmdReg_handlerBase(FwIndexType portNum, FwOpcodeType opCode)
Handler base-class function for input port compCmdReg.
void set_Time_OutputPort(FwIndexType portNum, Fw::InputTimePort *port)
Connect port to Time[portNum].
bool isConnected_compCmdSend_OutputPort(FwIndexType portNum)
friend class CommandDispatcherComponentBaseFriend
Friend class for white-box testing.
void log_WARNING_HI_MalformedCommand(Fw::DeserialStatus Status)
void log_ACTIVITY_HI_NoOpStringReceived(const Fw::StringBase &message)
void log_COMMAND_OpCodeDispatched(U32 Opcode, I32 port)
void set_seqCmdStatus_OutputPort(FwIndexType portNum, Fw::InputCmdResponsePort *port)
Connect port to seqCmdStatus[portNum].
void cmdResponse_out(FwOpcodeType opCode, U32 cmdSeq, Fw::CmdResponse response)
Emit command response.
Svc::InputPingPort * get_pingIn_InputPort(FwIndexType portNum)
Fw::InputCmdRegPort * get_compCmdReg_InputPort(FwIndexType portNum)
void log_WARNING_HI_TooManyCommands(U32 Opcode)
Fw::InputCmdPort * get_CmdDisp_InputPort(FwIndexType portNum)
bool isConnected_CmdReg_OutputPort(FwIndexType portNum)
virtual void CMD_CLEAR_TRACKING_cmdHandler(FwOpcodeType opCode, U32 cmdSeq)=0
void compCmdStat_handlerBase(FwIndexType portNum, FwOpcodeType opCode, U32 cmdSeq, const Fw::CmdResponse &response)
Handler base-class function for input port compCmdStat.
virtual void compCmdStat_preMsgHook(FwIndexType portNum, FwOpcodeType opCode, U32 cmdSeq, const Fw::CmdResponse &response)
Pre-message hook for async input port compCmdStat.
virtual void CMD_NO_OP_STRING_cmdHandler(FwOpcodeType opCode, U32 cmdSeq, const Fw::CmdStringArg &arg1)=0
void set_CmdReg_OutputPort(FwIndexType portNum, Fw::InputCmdRegPort *port)
Connect port to CmdReg[portNum].
@ NUM_PINGOUT_OUTPUT_PORTS
@ NUM_SEQCMDSTATUS_OUTPUT_PORTS
@ NUM_COMPCMDSEND_OUTPUT_PORTS
void pingOut_out(FwIndexType portNum, U32 key)
Invoke output port pingOut.
virtual void CMD_CLEAR_TRACKING_preMsgHook(FwOpcodeType opCode, U32 cmdSeq)
Pre-message hook for command CMD_CLEAR_TRACKING.
void log_WARNING_HI_InvalidCommand(U32 Opcode)
virtual ~CommandDispatcherComponentBase()
Destroy CommandDispatcherComponentBase object.
@ NUM_LOGTEXT_OUTPUT_PORTS
@ NUM_CMDREG_OUTPUT_PORTS
@ NUM_CMDSTATUS_OUTPUT_PORTS
FwIndexType getNum_Tlm_OutputPorts() const
virtual void CMD_NO_OP_cmdHandler(FwOpcodeType opCode, U32 cmdSeq)=0
void seqCmdStatus_out(FwIndexType portNum, FwOpcodeType opCode, U32 cmdSeq, const Fw::CmdResponse &response)
Invoke output port seqCmdStatus.
void set_compCmdSend_OutputPort(FwIndexType portNum, Fw::InputCmdPort *port)
Connect port to compCmdSend[portNum].
bool isConnected_CmdStatus_OutputPort(FwIndexType portNum)
@ CHANNELID_COMMANDSDISPATCHED
Channel ID for CommandsDispatched.
@ CHANNELID_COMMANDERRORS
Channel ID for CommandErrors.
void compCmdSend_out(FwIndexType portNum, FwOpcodeType opCode, U32 cmdSeq, Fw::CmdArgBuffer &args)
Invoke output port compCmdSend.
virtual void seqCmdBuff_handler(FwIndexType portNum, Fw::ComBuffer &data, U32 context)=0
Handler for input port seqCmdBuff.
void CMD_TEST_CMD_1_cmdHandlerBase(FwOpcodeType opCode, U32 cmdSeq, Fw::CmdArgBuffer &args)
bool isConnected_Tlm_OutputPort(FwIndexType portNum)
FwIndexType getNum_pingIn_InputPorts() const
void tlmWrite_CommandsDispatched(U32 arg, Fw::Time _tlmTime=Fw::Time())
FwIndexType getNum_pingOut_OutputPorts() const
void set_pingOut_OutputPort(FwIndexType portNum, Svc::InputPingPort *port)
Connect port to pingOut[portNum].
void CMD_NO_OP_STRING_cmdHandlerBase(FwOpcodeType opCode, U32 cmdSeq, Fw::CmdArgBuffer &args)
FwIndexType getNum_Log_OutputPorts() const
bool isConnected_Time_OutputPort(FwIndexType portNum)
virtual void lock()
Lock the guarded mutex.
void CMD_CLEAR_TRACKING_cmdHandlerBase(FwOpcodeType opCode, U32 cmdSeq, Fw::CmdArgBuffer &args)
virtual void CMD_TEST_CMD_1_cmdHandler(FwOpcodeType opCode, U32 cmdSeq, I32 arg1, F32 arg2, U8 arg3)=0
@ OPCODE_CMD_NO_OP
No-op command.
@ OPCODE_CMD_NO_OP_STRING
No-op string command.
@ OPCODE_CMD_CLEAR_TRACKING
Clear command tracking info to recover from components not returning status.
@ OPCODE_CMD_TEST_CMD_1
No-op command.
FwIndexType getNum_compCmdStat_InputPorts() const
Fw::InputComPort * get_seqCmdBuff_InputPort(FwIndexType portNum)
void log_COMMAND_OpCodeError(U32 Opcode, Fw::CmdResponse error)
void pingIn_handlerBase(FwIndexType portNum, U32 key)
Handler base-class function for input port pingIn.
bool isConnected_Log_OutputPort(FwIndexType portNum)
FwIndexType getNum_CmdStatus_OutputPorts() const
Status
Generic OK/ERROR status.