7 #ifndef Svc_CommandDispatcherComponentAc_HPP 8 #define Svc_CommandDispatcherComponentAc_HPP 22 #if FW_ENABLE_TEXT_LOGGING == 1 218 #if FW_ENABLE_TEXT_LOGGING == 1 221 void set_LogText_OutputPort(
264 #if FW_PORT_SERIALIZATION 275 Fw::InputSerializePort* port
281 Fw::InputSerializePort* port
287 Fw::InputSerializePort* port
290 #if FW_ENABLE_TEXT_LOGGING == 1 293 void set_LogText_OutputPort(
295 Fw::InputSerializePort* port
303 Fw::InputSerializePort* port
309 Fw::InputSerializePort* port
314 #if FW_PORT_SERIALIZATION 325 Fw::InputSerializePort* port
331 Fw::InputSerializePort* port
337 Fw::InputSerializePort* port
361 const char* compName =
"" 448 #if FW_ENABLE_TEXT_LOGGING == 1 453 static constexpr
FwIndexType getNum_LogText_OutputPorts() {
527 #if FW_ENABLE_TEXT_LOGGING == 1 532 bool isConnected_LogText_OutputPort(
1028 virtual void lock();
1049 static void m_p_CmdDisp_in(
1064 static void m_p_compCmdReg_in(
1071 static void m_p_compCmdStat_in(
1080 static void m_p_pingIn_in(
1087 static void m_p_run_in(
1094 static void m_p_seqCmdBuff_in(
1146 #if FW_ENABLE_TEXT_LOGGING == 1 1181 std::atomic<FwIndexType> m_CommandDroppedQueueOverflowThrottle;
1190 bool m_first_update_CommandsDispatched =
true;
1193 bool m_first_update_CommandErrors =
true;
1196 bool m_first_update_CommandsDropped =
true;
1205 U32 m_last_CommandsDispatched = {};
1208 U32 m_last_CommandErrors = {};
1211 U32 m_last_CommandsDropped = {};
This log event message returns the TEST_CMD_1 arguments.
void set_seqCmdStatus_OutputPort(FwIndexType portNum, Fw::InputCmdResponsePort *port)
Connect port to seqCmdStatus[portNum].
static constexpr FwIndexType getNum_run_InputPorts()
virtual void CMD_NO_OP_preMsgHook(FwOpcodeType opCode, U32 cmdSeq)
Pre-message hook for command CMD_NO_OP.
Clear command tracking info to recover from components not returning status.
FwIdType FwOpcodeType
The type of a command opcode.
static constexpr FwIndexType getNum_Log_OutputPorts()
void log_ACTIVITY_HI_NoOpReceived() const
PlatformSizeType FwSizeType
Svc::InputSchedPort * get_run_InputPort(FwIndexType portNum)
void pingIn_handlerBase(FwIndexType portNum, U32 key)
Handler base-class function for input port pingIn.
CommandDispatcherComponentBase(const char *compName="")
Construct CommandDispatcherComponentBase object.
void regCommands()
Register commands with the Command Dispatcher.
The command dispatcher has successfully received a NO-OP command.
void log_WARNING_HI_CommandDroppedQueueOverflow(FwOpcodeType OpCode, U32 Context)
Fw::InputCmdRegPort * get_compCmdReg_InputPort(FwIndexType portNum)
void CMD_NO_OP_STRING_cmdHandlerBase(FwOpcodeType opCode, U32 cmdSeq, Fw::CmdArgBuffer &args)
Received an invalid opcode.
virtual void run_preMsgHook(FwIndexType portNum, U32 context)
Pre-message hook for async input port run.
virtual void unLock()
Unlock the guarded mutex.
Fw::InputCmdPort * get_CmdDisp_InputPort(FwIndexType portNum)
virtual void pingIn_preMsgHook(FwIndexType portNum, U32 key)
Pre-message hook for async input port pingIn.
virtual void compCmdStat_handler(FwIndexType portNum, FwOpcodeType opCode, U32 cmdSeq, const Fw::CmdResponse &response)=0
Handler for input port compCmdStat.
Exceeded the number of commands that can be simultaneously executed.
virtual void run_handler(FwIndexType portNum, U32 context)=0
Handler for input port run.
void log_ACTIVITY_HI_TestCmd1Args(I32 arg1, F32 arg2, U8 arg3) const
virtual void CMD_NO_OP_cmdHandler(FwOpcodeType opCode, U32 cmdSeq)=0
void pingOut_out(FwIndexType portNum, U32 key)
Invoke output port pingOut.
Enum representing a command response.
static constexpr FwIndexType getNum_CmdDisp_InputPorts()
friend class CommandDispatcherTester
Friend class tester implementation to support white-box testing.
virtual void pingIn_handler(FwIndexType portNum, U32 key)=0
Handler for input port pingIn.
Channel ID for CommandsDispatched.
static constexpr FwIndexType getNum_pingIn_InputPorts()
static constexpr FwIndexType getNum_pingOut_OutputPorts()
bool isConnected_CmdStatus_OutputPort(FwIndexType portNum)
void compCmdSend_out(FwIndexType portNum, FwOpcodeType opCode, U32 cmdSeq, Fw::CmdArgBuffer &args)
Invoke output port compCmdSend.
void log_DIAGNOSTIC_OpCodeReregistered(FwOpcodeType Opcode, I32 port) const
static constexpr FwIndexType getNum_CmdStatus_OutputPorts()
bool isConnected_CmdReg_OutputPort(FwIndexType portNum)
Svc::InputPingPort * get_pingIn_InputPort(FwIndexType portNum)
static constexpr FwIndexType getNum_Tlm_OutputPorts()
void init()
Object initializer.
virtual void CMD_TEST_CMD_1_preMsgHook(FwOpcodeType opCode, U32 cmdSeq)
Pre-message hook for command CMD_TEST_CMD_1.
float F32
32-bit floating point
void log_COMMAND_OpCodeCompleted(FwOpcodeType Opcode) const
void log_ACTIVITY_HI_NoOpStringReceived(const Fw::StringBase &message) const
bool isConnected_Tlm_OutputPort(FwIndexType portNum)
void tlmWrite_CommandsDispatched(U32 arg, Fw::Time _tlmTime=Fw::Time())
static constexpr FwIndexType getNum_CmdReg_OutputPorts()
Received a malformed command packet.
void set_CmdReg_OutputPort(FwIndexType portNum, Fw::InputCmdRegPort *port)
Connect port to CmdReg[portNum].
friend class CommandDispatcherTesterBase
Friend class tester to support autocoded test harness.
void set_compCmdSend_OutputPort(FwIndexType portNum, Fw::InputCmdPort *port)
Connect port to compCmdSend[portNum].
void log_WARNING_HI_MalformedCommand(Fw::DeserialStatus Status) const
void tlmWrite_CommandsDropped(U32 arg, Fw::Time _tlmTime=Fw::Time())
virtual ~CommandDispatcherComponentBase()
Destroy CommandDispatcherComponentBase object.
Status
Generic OK/ERROR status.
Fw::InputCmdResponsePort * get_compCmdStat_InputPort(FwIndexType portNum)
static constexpr FwIndexType getNum_Time_OutputPorts()
The command dispatcher has successfully received a NO-OP command from GUI with a string.
Op code dispatched event.
void log_WARNING_HI_CommandDroppedQueueOverflow_ThrottleClear()
Reset throttle value for CommandDroppedQueueOverflow.
virtual void CMD_TEST_CMD_1_cmdHandler(FwOpcodeType opCode, U32 cmdSeq, I32 arg1, F32 arg2, U8 arg3)=0
virtual void compCmdReg_handler(FwIndexType portNum, FwOpcodeType opCode)=0
Handler for input port compCmdReg.
void tlmWrite_CommandErrors(U32 arg, Fw::Time _tlmTime=Fw::Time())
virtual void compCmdStat_preMsgHook(FwIndexType portNum, FwOpcodeType opCode, U32 cmdSeq, const Fw::CmdResponse &response)
Pre-message hook for async input port compCmdStat.
This log event reports the Command Sequence Buffer port queue has overflowed.
static constexpr FwIndexType getNum_compCmdReg_InputPorts()
void log_WARNING_HI_InvalidCommand(FwOpcodeType Opcode) const
bool isConnected_Time_OutputPort(FwIndexType portNum)
void compCmdStat_handlerBase(FwIndexType portNum, FwOpcodeType opCode, U32 cmdSeq, const Fw::CmdResponse &response)
Handler base-class function for input port compCmdStat.
uint8_t U8
8-bit unsigned integer
void log_COMMAND_OpCodeError(FwOpcodeType Opcode, Fw::CmdResponse error) const
void seqCmdStatus_out(FwIndexType portNum, FwOpcodeType opCode, U32 cmdSeq, const Fw::CmdResponse &response)
Invoke output port seqCmdStatus.
PlatformIndexType FwIndexType
void run_handlerBase(FwIndexType portNum, U32 context)
Handler base-class function for input port run.
void log_DIAGNOSTIC_OpCodeRegistered(FwOpcodeType Opcode, I32 port, I32 slot) const
Log event OpCodeRegistered.
virtual void CMD_CLEAR_TRACKING_preMsgHook(FwOpcodeType opCode, U32 cmdSeq)
Pre-message hook for command CMD_CLEAR_TRACKING.
Op code reregistered event.
void set_Tlm_OutputPort(FwIndexType portNum, Fw::InputTlmPort *port)
Connect port to Tlm[portNum].
void CMD_CLEAR_TRACKING_cmdHandlerBase(FwOpcodeType opCode, U32 cmdSeq, Fw::CmdArgBuffer &args)
void seqCmdBuff_handlerBase(FwIndexType portNum, Fw::ComBuffer &data, U32 context)
Handler base-class function for input port seqCmdBuff.
virtual void CMD_NO_OP_STRING_cmdHandler(FwOpcodeType opCode, U32 cmdSeq, const Fw::CmdStringArg &arg1)=0
Auto-generated base for CommandDispatcher component.
bool isConnected_seqCmdStatus_OutputPort(FwIndexType portNum)
virtual void CMD_NO_OP_STRING_preMsgHook(FwOpcodeType opCode, U32 cmdSeq)
Pre-message hook for command CMD_NO_OP_STRING.
RateGroupDivider component implementation.
Op code completed with error event.
Throttle reset count for CommandDroppedQueueOverflow.
virtual void seqCmdBuff_overflowHook(FwIndexType portNum, Fw::ComBuffer &data, U32 context)=0
Overflow hook for async input port seqCmdBuff.
virtual void CMD_CLEAR_TRACKING_cmdHandler(FwOpcodeType opCode, U32 cmdSeq)=0
static constexpr FwIndexType getNum_seqCmdBuff_InputPorts()
bool isConnected_pingOut_OutputPort(FwIndexType portNum)
bool isConnected_Log_OutputPort(FwIndexType portNum)
Channel ID for CommandsDropped.
Channel ID for CommandErrors.
void CMD_NO_OP_cmdHandlerBase(FwOpcodeType opCode, U32 cmdSeq, Fw::CmdArgBuffer &args)
static constexpr FwIndexType getNum_compCmdSend_OutputPorts()
virtual void seqCmdBuff_handler(FwIndexType portNum, Fw::ComBuffer &data, U32 context)=0
Handler for input port seqCmdBuff.
static constexpr FwIndexType getNum_compCmdStat_InputPorts()
virtual void seqCmdBuff_preMsgHook(FwIndexType portNum, Fw::ComBuffer &data, U32 context)
Pre-message hook for async input port seqCmdBuff.
Fw::InputComPort * get_seqCmdBuff_InputPort(FwIndexType portNum)
void compCmdReg_handlerBase(FwIndexType portNum, FwOpcodeType opCode)
Handler base-class function for input port compCmdReg.
void set_pingOut_OutputPort(FwIndexType portNum, Svc::InputPingPort *port)
Connect port to pingOut[portNum].
static constexpr FwIndexType getNum_seqCmdStatus_OutputPorts()
void log_WARNING_HI_TooManyCommands(FwOpcodeType Opcode) const
bool isConnected_compCmdSend_OutputPort(FwIndexType portNum)
virtual void lock()
Lock the guarded mutex.
void cmdResponse_out(FwOpcodeType opCode, U32 cmdSeq, Fw::CmdResponse response)
Emit command response.
void log_COMMAND_OpCodeDispatched(FwOpcodeType Opcode, I32 port) const
void set_Log_OutputPort(FwIndexType portNum, Fw::InputLogPort *port)
Connect port to Log[portNum].
void set_Time_OutputPort(FwIndexType portNum, Fw::InputTimePort *port)
Connect port to Time[portNum].
void set_CmdStatus_OutputPort(FwIndexType portNum, Fw::InputCmdResponsePort *port)
Connect port to CmdStatus[portNum].
void CMD_TEST_CMD_1_cmdHandlerBase(FwOpcodeType opCode, U32 cmdSeq, Fw::CmdArgBuffer &args)