9 #if FW_ENABLE_TEXT_LOGGING 26 #if !FW_DIRECT_PORT_CALLS 33 this->m_CmdDisp_InputPort[port].
init();
38 this->m_CmdDisp_InputPort[port].
setPortNum(port);
40 #if FW_OBJECT_NAMES == 1 44 this->m_objName.toChar(),
47 this->m_CmdDisp_InputPort[port].setObjName(portName.
toChar());
52 #if !FW_DIRECT_PORT_CALLS 59 this->m_run_InputPort[port].
init();
66 #if FW_OBJECT_NAMES == 1 70 this->m_objName.toChar(),
73 this->m_run_InputPort[port].setObjName(portName.
toChar());
78 #if !FW_DIRECT_PORT_CALLS 85 this->m_CmdReg_OutputPort[port].
init();
87 #if FW_OBJECT_NAMES == 1 91 this->m_objName.toChar(),
94 this->m_CmdReg_OutputPort[port].setObjName(portName.
toChar());
99 #if !FW_DIRECT_PORT_CALLS 106 this->m_CmdStatus_OutputPort[port].
init();
108 #if FW_OBJECT_NAMES == 1 112 this->m_objName.toChar(),
115 this->m_CmdStatus_OutputPort[port].setObjName(portName.
toChar());
120 #if !FW_DIRECT_PORT_CALLS 127 this->m_Log_OutputPort[port].
init();
129 #if FW_OBJECT_NAMES == 1 133 this->m_objName.toChar(),
136 this->m_Log_OutputPort[port].setObjName(portName.
toChar());
141 #if !FW_DIRECT_PORT_CALLS && FW_ENABLE_TEXT_LOGGING 145 port < static_cast<FwIndexType>(this->getNum_LogText_OutputPorts());
148 this->m_LogText_OutputPort[port].
init();
150 #if FW_OBJECT_NAMES == 1 154 this->m_objName.toChar(),
157 this->m_LogText_OutputPort[port].setObjName(portName.
toChar());
162 #if !FW_DIRECT_PORT_CALLS 169 this->m_Time_OutputPort[port].
init();
171 #if FW_OBJECT_NAMES == 1 175 this->m_objName.toChar(),
178 this->m_Time_OutputPort[port].setObjName(portName.
toChar());
183 #if !FW_DIRECT_PORT_CALLS 190 this->m_Tlm_OutputPort[port].
init();
192 #if FW_OBJECT_NAMES == 1 196 this->m_objName.toChar(),
199 this->m_Tlm_OutputPort[port].setObjName(portName.
toChar());
205 #if !FW_DIRECT_PORT_CALLS 216 static_cast<FwAssertArgType>(portNum)
219 return &this->m_CmdDisp_InputPort[portNum];
224 #if !FW_DIRECT_PORT_CALLS 235 static_cast<FwAssertArgType>(portNum)
238 return &this->m_run_InputPort[portNum];
243 #if !FW_DIRECT_PORT_CALLS 257 static_cast<FwAssertArgType>(portNum)
260 this->m_CmdReg_OutputPort[portNum].
addCallPort(port);
271 static_cast<FwAssertArgType>(portNum)
274 this->m_CmdStatus_OutputPort[portNum].
addCallPort(port);
285 static_cast<FwAssertArgType>(portNum)
291 #if FW_ENABLE_TEXT_LOGGING == 1 293 void SystemResourcesComponentBase ::
294 set_LogText_OutputPort(
300 (0 <= portNum) && (portNum < this->getNum_LogText_OutputPorts()),
301 static_cast<FwAssertArgType>(portNum)
304 this->m_LogText_OutputPort[portNum].addCallPort(port);
317 static_cast<FwAssertArgType>(portNum)
320 this->m_Time_OutputPort[portNum].
addCallPort(port);
331 static_cast<FwAssertArgType>(portNum)
339 #if !FW_DIRECT_PORT_CALLS && FW_PORT_SERIALIZATION 348 Fw::InputSerializePort* port
353 static_cast<FwAssertArgType>(portNum)
356 this->m_CmdReg_OutputPort[portNum].registerSerialPort(port);
362 Fw::InputSerializePort* port
367 static_cast<FwAssertArgType>(portNum)
370 this->m_CmdStatus_OutputPort[portNum].registerSerialPort(port);
376 Fw::InputSerializePort* port
381 static_cast<FwAssertArgType>(portNum)
384 this->m_Log_OutputPort[portNum].registerSerialPort(port);
387 #if FW_ENABLE_TEXT_LOGGING == 1 389 void SystemResourcesComponentBase ::
390 set_LogText_OutputPort(
392 Fw::InputSerializePort* port
396 (0 <= portNum) && (portNum < this->getNum_LogText_OutputPorts()),
397 static_cast<FwAssertArgType>(portNum)
400 this->m_LogText_OutputPort[portNum].registerSerialPort(port);
408 Fw::InputSerializePort* port
413 static_cast<FwAssertArgType>(portNum)
416 this->m_Time_OutputPort[portNum].registerSerialPort(port);
422 Fw::InputSerializePort* port
427 static_cast<FwAssertArgType>(portNum)
430 this->m_Tlm_OutputPort[portNum].registerSerialPort(port);
456 Fw::PassiveComponentBase(compName)
467 #if !FW_DIRECT_PORT_CALLS 478 static_cast<FwAssertArgType>(portNum)
481 return this->m_CmdReg_OutputPort[portNum].
isConnected();
489 static_cast<FwAssertArgType>(portNum)
492 return this->m_CmdStatus_OutputPort[portNum].
isConnected();
500 static_cast<FwAssertArgType>(portNum)
503 return this->m_Log_OutputPort[portNum].
isConnected();
506 #if FW_ENABLE_TEXT_LOGGING == 1 508 bool SystemResourcesComponentBase ::
509 isConnected_LogText_OutputPort(
FwIndexType portNum)
const 512 (0 <= portNum) && (portNum < this->getNum_LogText_OutputPorts()),
513 static_cast<FwAssertArgType>(portNum)
516 return this->m_LogText_OutputPort[portNum].isConnected();
526 static_cast<FwAssertArgType>(portNum)
529 return this->m_Time_OutputPort[portNum].
isConnected();
537 static_cast<FwAssertArgType>(portNum)
540 return this->m_Tlm_OutputPort[portNum].
isConnected();
561 FW_ASSERT(opCode >= idBase, static_cast<FwAssertArgType>(opCode), static_cast<FwAssertArgType>(idBase));
564 switch (opCode - idBase) {
594 static_cast<FwAssertArgType>(portNum)
622 this->CmdStatus_out(0, opCode, cmdSeq, response);
658 #if FW_CMD_CHECK_RESIDUAL 700 this->Time_out(0, _tlmTime);
730 static_cast<FwAssertArgType>(_stat)
752 static_cast<FwAssertArgType>(_stat)
774 static_cast<FwAssertArgType>(_stat)
796 static_cast<FwAssertArgType>(_stat)
818 static_cast<FwAssertArgType>(_stat)
840 static_cast<FwAssertArgType>(_stat)
862 static_cast<FwAssertArgType>(_stat)
884 static_cast<FwAssertArgType>(_stat)
906 static_cast<FwAssertArgType>(_stat)
928 static_cast<FwAssertArgType>(_stat)
950 static_cast<FwAssertArgType>(_stat)
972 static_cast<FwAssertArgType>(_stat)
994 static_cast<FwAssertArgType>(_stat)
1016 static_cast<FwAssertArgType>(_stat)
1038 static_cast<FwAssertArgType>(_stat)
1060 static_cast<FwAssertArgType>(_stat)
1082 static_cast<FwAssertArgType>(_stat)
1104 static_cast<FwAssertArgType>(_stat)
1126 static_cast<FwAssertArgType>(_stat)
1148 static_cast<FwAssertArgType>(_stat)
1170 static_cast<FwAssertArgType>(_stat)
1190 this->Time_out(0, _time);
1208 this->m_guardedPortMutex.
lock();
1214 this->m_guardedPortMutex.
unLock();
1221 void SystemResourcesComponentBase ::
1244 void SystemResourcesComponentBase ::
1253 compPtr->run_handlerBase(
1259 #if !FW_DIRECT_PORT_CALLS 1265 void SystemResourcesComponentBase ::
1273 static_cast<FwAssertArgType>(portNum)
1277 this->m_CmdReg_OutputPort[portNum].isConnected(),
1278 static_cast<FwAssertArgType>(portNum)
1280 this->m_CmdReg_OutputPort[portNum].
invoke(
1285 void SystemResourcesComponentBase ::
1295 static_cast<FwAssertArgType>(portNum)
1299 this->m_CmdStatus_OutputPort[portNum].isConnected(),
1300 static_cast<FwAssertArgType>(portNum)
1302 this->m_CmdStatus_OutputPort[portNum].
invoke(
1309 void SystemResourcesComponentBase ::
1317 static_cast<FwAssertArgType>(portNum)
1321 this->m_Time_OutputPort[portNum].isConnected(),
1322 static_cast<FwAssertArgType>(portNum)
1324 this->m_Time_OutputPort[portNum].
invoke(
1329 void SystemResourcesComponentBase ::
1339 static_cast<FwAssertArgType>(portNum)
1343 this->m_Tlm_OutputPort[portNum].isConnected(),
1344 static_cast<FwAssertArgType>(portNum)
1346 this->m_Tlm_OutputPort[portNum].
invoke(
void set_CmdStatus_OutputPort(FwIndexType portNum, Fw::InputCmdResponsePort *port)
Connect port to CmdStatus[portNum].
Serialization/Deserialization operation was successful.
void addCallPort(InputTimePort *callPort)
Register an input port.
FwIdType FwOpcodeType
The type of a command opcode.
void tlmWrite_CPU_00(F32 arg, Fw::Time _tlmTime=Fw::Time()) const
SerializeStatus serializeFrom(U8 val, Endianness mode=Endianness::BIG) override
Serialize an 8-bit unsigned integer value.
FwIdType getIdBase() const
void tlmWrite_CPU(F32 arg, Fw::Time _tlmTime=Fw::Time()) const
static constexpr FwIndexType getNum_Time_OutputPorts()
virtual void ENABLE_cmdHandler(FwOpcodeType opCode, U32 cmdSeq, Svc::SystemResourceEnabled enable)=0
static constexpr FwIndexType getNum_CmdStatus_OutputPorts()
void tlmWrite_MEMORY_USED(U64 arg, Fw::Time _tlmTime=Fw::Time()) const
void tlmWrite_NON_VOLATILE_FREE(U64 arg, Fw::Time _tlmTime=Fw::Time()) const
bool isConnected_Time_OutputPort(FwIndexType portNum) const
void unLock()
unlock the mutex and assert success
void tlmWrite_CPU_09(F32 arg, Fw::Time _tlmTime=Fw::Time()) const
Channel ID for NON_VOLATILE_FREE.
void set_Tlm_OutputPort(FwIndexType portNum, Fw::InputTlmPort *port)
Connect port to Tlm[portNum].
void tlmWrite_CPU_02(F32 arg, Fw::Time _tlmTime=Fw::Time()) const
void init()
Initialization function.
Enum representing a command response.
No time base has been established (Required)
void addCallPort(InputCmdRegPort *callPort)
Register an input port.
Fw::InputCmdPort * get_CmdDisp_InputPort(FwIndexType portNum)
bool isConnected_Log_OutputPort(FwIndexType portNum) const
void tlmWrite_CPU_10(F32 arg, Fw::Time _tlmTime=Fw::Time()) const
void addCallPort(InputTlmPort *callPort)
Register an input port.
void init()
Object initializer.
Channel ID for NON_VOLATILE_TOTAL.
SerializeStatus
forward declaration for string
float F32
32-bit floating point
SystemResourcesComponentBase(const char *compName="")
Construct SystemResourcesComponentBase object.
void invoke(FwOpcodeType opCode) const
Invoke a port connection.
void tlmWrite_CPU_13(F32 arg, Fw::Time _tlmTime=Fw::Time()) const
void tlmWrite_CPU_11(F32 arg, Fw::Time _tlmTime=Fw::Time()) const
void CmdDisp_handlerBase(FwIndexType portNum, FwOpcodeType opCode, U32 cmdSeq, Fw::CmdArgBuffer &args)
Handler base-class function for input port CmdDisp.
void init()
Initialization function.
Svc::InputSchedPort * get_run_InputPort(FwIndexType portNum)
static constexpr FwIndexType getNum_CmdDisp_InputPorts()
void invoke(Fw::Time &time) const
Invoke a port connection.
Serializable::SizeType getDeserializeSizeLeft() const override
Get remaining deserialization buffer size.
const char * toChar() const
Convert to a C-style char*.
void invoke(FwOpcodeType opCode, U32 cmdSeq, const Fw::CmdResponse &response) const
Invoke a port connection.
virtual void run_handler(FwIndexType portNum, U32 context)=0
Handler for input port run.
FwIdType FwChanIdType
The type of a telemetry channel identifier.
virtual void unLock()
Unlock the guarded mutex.
void cmdResponse_out(FwOpcodeType opCode, U32 cmdSeq, Fw::CmdResponse response)
Emit command response.
void resetDeser() override
Reset deserialization pointer to beginning of buffer.
bool isConnected_Tlm_OutputPort(FwIndexType portNum) const
void tlmWrite_CPU_14(F32 arg, Fw::Time _tlmTime=Fw::Time()) const
static constexpr FwIndexType getNum_Tlm_OutputPorts()
A command to enable or disable system resource telemetry.
void invoke(FwChanIdType id, Fw::Time &timeTag, Fw::TlmBuffer &val) const
Invoke a port connection.
static constexpr FwIndexType getNum_run_InputPorts()
FormatStatus format(const CHAR *formatString,...)
write formatted string to buffer
void init()
Initialization function.
Command failed to deserialize.
bool isConnected_CmdStatus_OutputPort(FwIndexType portNum) const
void tlmWrite_CPU_15(F32 arg, Fw::Time _tlmTime=Fw::Time()) const
void tlmWrite_CPU_01(F32 arg, Fw::Time _tlmTime=Fw::Time()) const
Auto-generated base for SystemResources component.
void tlmWrite_CPU_07(F32 arg, Fw::Time _tlmTime=Fw::Time()) const
static constexpr FwIndexType getNum_CmdReg_OutputPorts()
Channel ID for MEMORY_USED.
PlatformIndexType FwIndexType
void tlmWrite_CPU_04(F32 arg, Fw::Time _tlmTime=Fw::Time()) const
void addCallPort(InputLogPort *callPort)
Register an input port.
void init()
Initialization function.
void ENABLE_cmdHandlerBase(FwOpcodeType opCode, U32 cmdSeq, Fw::CmdArgBuffer &args)
void tlmWrite_CPU_08(F32 arg, Fw::Time _tlmTime=Fw::Time()) const
RateGroupDivider component implementation.
void set_Log_OutputPort(FwIndexType portNum, Fw::InputLogPort *port)
Connect port to Log[portNum].
void regCommands()
Register commands with the Command Dispatcher.
SerializeStatus deserializeTo(U8 &val, Endianness mode=Endianness::BIG) override
Deserialize an 8-bit unsigned integer value.
virtual ~SystemResourcesComponentBase()
Destroy SystemResourcesComponentBase object.
void tlmWrite_CPU_06(F32 arg, Fw::Time _tlmTime=Fw::Time()) const
void set_CmdReg_OutputPort(FwIndexType portNum, Fw::InputCmdRegPort *port)
Connect port to CmdReg[portNum].
void tlmWrite_CPU_12(F32 arg, Fw::Time _tlmTime=Fw::Time()) const
Implementation of malloc based allocator.
Channel ID for MEMORY_TOTAL.
void tlmWrite_CPU_03(F32 arg, Fw::Time _tlmTime=Fw::Time()) const
void tlmWrite(FwChanIdType id, Fw::TlmBuffer &_tlmBuff, Fw::Time _tlmTime=Fw::Time()) const
void init()
Initialization function.
void run_handlerBase(FwIndexType portNum, U32 context)
Handler base-class function for input port run.
void tlmWrite_MEMORY_TOTAL(U64 arg, Fw::Time _tlmTime=Fw::Time()) const
bool isConnected_CmdReg_OutputPort(FwIndexType portNum) const
virtual void lock()
Lock the guarded mutex.
static constexpr FwIndexType getNum_Log_OutputPorts()
void tlmWrite_NON_VOLATILE_TOTAL(U64 arg, Fw::Time _tlmTime=Fw::Time()) const
void tlmWrite_CPU_05(F32 arg, Fw::Time _tlmTime=Fw::Time()) const
void addCallPort(InputCmdResponsePort *callPort)
Register an input port.
void lock()
lock the mutex and assert success
void set_Time_OutputPort(FwIndexType portNum, Fw::InputTimePort *port)
Connect port to Time[portNum].