9 #if FW_ENABLE_TEXT_LOGGING 32 this->m_CmdDisp_InputPort[port].
init();
37 this->m_CmdDisp_InputPort[port].
setPortNum(port);
39 #if FW_OBJECT_NAMES == 1 43 this->m_objName.toChar(),
46 this->m_CmdDisp_InputPort[port].setObjName(portName.
toChar());
56 this->m_run_InputPort[port].
init();
63 #if FW_OBJECT_NAMES == 1 67 this->m_objName.toChar(),
70 this->m_run_InputPort[port].setObjName(portName.
toChar());
80 this->m_CmdReg_OutputPort[port].
init();
82 #if FW_OBJECT_NAMES == 1 86 this->m_objName.toChar(),
89 this->m_CmdReg_OutputPort[port].setObjName(portName.
toChar());
99 this->m_CmdStatus_OutputPort[port].
init();
101 #if FW_OBJECT_NAMES == 1 105 this->m_objName.toChar(),
108 this->m_CmdStatus_OutputPort[port].setObjName(portName.
toChar());
118 this->m_Log_OutputPort[port].
init();
120 #if FW_OBJECT_NAMES == 1 124 this->m_objName.toChar(),
127 this->m_Log_OutputPort[port].setObjName(portName.
toChar());
131 #if FW_ENABLE_TEXT_LOGGING == 1 135 port < static_cast<FwIndexType>(this->getNum_LogText_OutputPorts());
138 this->m_LogText_OutputPort[port].
init();
140 #if FW_OBJECT_NAMES == 1 144 this->m_objName.toChar(),
147 this->m_LogText_OutputPort[port].setObjName(portName.
toChar());
158 this->m_Time_OutputPort[port].
init();
160 #if FW_OBJECT_NAMES == 1 164 this->m_objName.toChar(),
167 this->m_Time_OutputPort[port].setObjName(portName.
toChar());
177 this->m_Tlm_OutputPort[port].
init();
179 #if FW_OBJECT_NAMES == 1 183 this->m_objName.toChar(),
186 this->m_Tlm_OutputPort[port].setObjName(portName.
toChar());
200 static_cast<FwAssertArgType>(portNum)
203 return &this->m_CmdDisp_InputPort[portNum];
215 static_cast<FwAssertArgType>(portNum)
218 return &this->m_run_InputPort[portNum];
233 static_cast<FwAssertArgType>(portNum)
236 this->m_CmdReg_OutputPort[portNum].
addCallPort(port);
247 static_cast<FwAssertArgType>(portNum)
250 this->m_CmdStatus_OutputPort[portNum].
addCallPort(port);
261 static_cast<FwAssertArgType>(portNum)
267 #if FW_ENABLE_TEXT_LOGGING == 1 269 void SystemResourcesComponentBase ::
270 set_LogText_OutputPort(
276 (0 <= portNum) && (portNum < this->getNum_LogText_OutputPorts()),
277 static_cast<FwAssertArgType>(portNum)
280 this->m_LogText_OutputPort[portNum].addCallPort(port);
293 static_cast<FwAssertArgType>(portNum)
296 this->m_Time_OutputPort[portNum].
addCallPort(port);
307 static_cast<FwAssertArgType>(portNum)
313 #if FW_PORT_SERIALIZATION 322 Fw::InputSerializePort* port
327 static_cast<FwAssertArgType>(portNum)
330 this->m_CmdReg_OutputPort[portNum].registerSerialPort(port);
336 Fw::InputSerializePort* port
341 static_cast<FwAssertArgType>(portNum)
344 this->m_CmdStatus_OutputPort[portNum].registerSerialPort(port);
350 Fw::InputSerializePort* port
355 static_cast<FwAssertArgType>(portNum)
358 this->m_Log_OutputPort[portNum].registerSerialPort(port);
361 #if FW_ENABLE_TEXT_LOGGING == 1 363 void SystemResourcesComponentBase ::
364 set_LogText_OutputPort(
366 Fw::InputSerializePort* port
370 (0 <= portNum) && (portNum < this->getNum_LogText_OutputPorts()),
371 static_cast<FwAssertArgType>(portNum)
374 this->m_LogText_OutputPort[portNum].registerSerialPort(port);
382 Fw::InputSerializePort* port
387 static_cast<FwAssertArgType>(portNum)
390 this->m_Time_OutputPort[portNum].registerSerialPort(port);
396 Fw::InputSerializePort* port
401 static_cast<FwAssertArgType>(portNum)
404 this->m_Tlm_OutputPort[portNum].registerSerialPort(port);
416 FW_ASSERT(this->m_CmdReg_OutputPort[0].isConnected());
418 this->m_CmdReg_OutputPort[0].
invoke(
429 Fw::PassiveComponentBase(compName)
449 static_cast<FwAssertArgType>(portNum)
452 return this->m_CmdReg_OutputPort[portNum].
isConnected();
460 static_cast<FwAssertArgType>(portNum)
463 return this->m_CmdStatus_OutputPort[portNum].
isConnected();
471 static_cast<FwAssertArgType>(portNum)
474 return this->m_Log_OutputPort[portNum].
isConnected();
477 #if FW_ENABLE_TEXT_LOGGING == 1 479 bool SystemResourcesComponentBase ::
480 isConnected_LogText_OutputPort(
FwIndexType portNum)
483 (0 <= portNum) && (portNum < this->getNum_LogText_OutputPorts()),
484 static_cast<FwAssertArgType>(portNum)
487 return this->m_LogText_OutputPort[portNum].isConnected();
497 static_cast<FwAssertArgType>(portNum)
500 return this->m_Time_OutputPort[portNum].
isConnected();
508 static_cast<FwAssertArgType>(portNum)
511 return this->m_Tlm_OutputPort[portNum].
isConnected();
529 static_cast<FwAssertArgType>(portNum)
556 FW_ASSERT(this->m_CmdStatus_OutputPort[0].isConnected());
557 this->m_CmdStatus_OutputPort[0].
invoke(opCode, cmdSeq, response);
582 if (this->m_CmdStatus_OutputPort[0].isConnected()) {
583 this->m_CmdStatus_OutputPort[0].
invoke(
592 #if FW_CMD_CHECK_RESIDUAL 596 if (this->m_CmdStatus_OutputPort[0].isConnected()) {
597 this->m_CmdStatus_OutputPort[0].
invoke(
627 if (this->m_Tlm_OutputPort[0].isConnected()) {
629 this->m_Time_OutputPort[0].isConnected() &&
632 this->m_Time_OutputPort[0].
invoke(_tlmTime);
639 static_cast<FwAssertArgType>(_stat)
646 this->m_Tlm_OutputPort[0].
invoke(
660 if (this->m_Tlm_OutputPort[0].isConnected()) {
662 this->m_Time_OutputPort[0].isConnected() &&
665 this->m_Time_OutputPort[0].
invoke(_tlmTime);
672 static_cast<FwAssertArgType>(_stat)
679 this->m_Tlm_OutputPort[0].
invoke(
693 if (this->m_Tlm_OutputPort[0].isConnected()) {
695 this->m_Time_OutputPort[0].isConnected() &&
698 this->m_Time_OutputPort[0].
invoke(_tlmTime);
705 static_cast<FwAssertArgType>(_stat)
712 this->m_Tlm_OutputPort[0].
invoke(
726 if (this->m_Tlm_OutputPort[0].isConnected()) {
728 this->m_Time_OutputPort[0].isConnected() &&
731 this->m_Time_OutputPort[0].
invoke(_tlmTime);
738 static_cast<FwAssertArgType>(_stat)
745 this->m_Tlm_OutputPort[0].
invoke(
759 if (this->m_Tlm_OutputPort[0].isConnected()) {
761 this->m_Time_OutputPort[0].isConnected() &&
764 this->m_Time_OutputPort[0].
invoke(_tlmTime);
771 static_cast<FwAssertArgType>(_stat)
778 this->m_Tlm_OutputPort[0].
invoke(
792 if (this->m_Tlm_OutputPort[0].isConnected()) {
794 this->m_Time_OutputPort[0].isConnected() &&
797 this->m_Time_OutputPort[0].
invoke(_tlmTime);
804 static_cast<FwAssertArgType>(_stat)
811 this->m_Tlm_OutputPort[0].
invoke(
825 if (this->m_Tlm_OutputPort[0].isConnected()) {
827 this->m_Time_OutputPort[0].isConnected() &&
830 this->m_Time_OutputPort[0].
invoke(_tlmTime);
837 static_cast<FwAssertArgType>(_stat)
844 this->m_Tlm_OutputPort[0].
invoke(
858 if (this->m_Tlm_OutputPort[0].isConnected()) {
860 this->m_Time_OutputPort[0].isConnected() &&
863 this->m_Time_OutputPort[0].
invoke(_tlmTime);
870 static_cast<FwAssertArgType>(_stat)
877 this->m_Tlm_OutputPort[0].
invoke(
891 if (this->m_Tlm_OutputPort[0].isConnected()) {
893 this->m_Time_OutputPort[0].isConnected() &&
896 this->m_Time_OutputPort[0].
invoke(_tlmTime);
903 static_cast<FwAssertArgType>(_stat)
910 this->m_Tlm_OutputPort[0].
invoke(
924 if (this->m_Tlm_OutputPort[0].isConnected()) {
926 this->m_Time_OutputPort[0].isConnected() &&
929 this->m_Time_OutputPort[0].
invoke(_tlmTime);
936 static_cast<FwAssertArgType>(_stat)
943 this->m_Tlm_OutputPort[0].
invoke(
957 if (this->m_Tlm_OutputPort[0].isConnected()) {
959 this->m_Time_OutputPort[0].isConnected() &&
962 this->m_Time_OutputPort[0].
invoke(_tlmTime);
969 static_cast<FwAssertArgType>(_stat)
976 this->m_Tlm_OutputPort[0].
invoke(
990 if (this->m_Tlm_OutputPort[0].isConnected()) {
992 this->m_Time_OutputPort[0].isConnected() &&
995 this->m_Time_OutputPort[0].
invoke(_tlmTime);
1002 static_cast<FwAssertArgType>(_stat)
1009 this->m_Tlm_OutputPort[0].
invoke(
1023 if (this->m_Tlm_OutputPort[0].isConnected()) {
1025 this->m_Time_OutputPort[0].isConnected() &&
1028 this->m_Time_OutputPort[0].
invoke(_tlmTime);
1035 static_cast<FwAssertArgType>(_stat)
1042 this->m_Tlm_OutputPort[0].
invoke(
1056 if (this->m_Tlm_OutputPort[0].isConnected()) {
1058 this->m_Time_OutputPort[0].isConnected() &&
1061 this->m_Time_OutputPort[0].
invoke(_tlmTime);
1068 static_cast<FwAssertArgType>(_stat)
1075 this->m_Tlm_OutputPort[0].
invoke(
1089 if (this->m_Tlm_OutputPort[0].isConnected()) {
1091 this->m_Time_OutputPort[0].isConnected() &&
1094 this->m_Time_OutputPort[0].
invoke(_tlmTime);
1101 static_cast<FwAssertArgType>(_stat)
1108 this->m_Tlm_OutputPort[0].
invoke(
1122 if (this->m_Tlm_OutputPort[0].isConnected()) {
1124 this->m_Time_OutputPort[0].isConnected() &&
1127 this->m_Time_OutputPort[0].
invoke(_tlmTime);
1134 static_cast<FwAssertArgType>(_stat)
1141 this->m_Tlm_OutputPort[0].
invoke(
1155 if (this->m_Tlm_OutputPort[0].isConnected()) {
1157 this->m_Time_OutputPort[0].isConnected() &&
1160 this->m_Time_OutputPort[0].
invoke(_tlmTime);
1167 static_cast<FwAssertArgType>(_stat)
1174 this->m_Tlm_OutputPort[0].
invoke(
1188 if (this->m_Tlm_OutputPort[0].isConnected()) {
1190 this->m_Time_OutputPort[0].isConnected() &&
1193 this->m_Time_OutputPort[0].
invoke(_tlmTime);
1200 static_cast<FwAssertArgType>(_stat)
1207 this->m_Tlm_OutputPort[0].
invoke(
1221 if (this->m_Tlm_OutputPort[0].isConnected()) {
1223 this->m_Time_OutputPort[0].isConnected() &&
1226 this->m_Time_OutputPort[0].
invoke(_tlmTime);
1233 static_cast<FwAssertArgType>(_stat)
1240 this->m_Tlm_OutputPort[0].
invoke(
1254 if (this->m_Tlm_OutputPort[0].isConnected()) {
1256 this->m_Time_OutputPort[0].isConnected() &&
1259 this->m_Time_OutputPort[0].
invoke(_tlmTime);
1266 static_cast<FwAssertArgType>(_stat)
1273 this->m_Tlm_OutputPort[0].
invoke(
1287 if (this->m_Tlm_OutputPort[0].isConnected()) {
1289 this->m_Time_OutputPort[0].isConnected() &&
1292 this->m_Time_OutputPort[0].
invoke(_tlmTime);
1299 static_cast<FwAssertArgType>(_stat)
1306 this->m_Tlm_OutputPort[0].
invoke(
1321 if (this->m_Time_OutputPort[0].isConnected()) {
1323 this->m_Time_OutputPort[0].
invoke(_time);
1341 this->m_guardedPortMutex.
lock();
1347 this->m_guardedPortMutex.
unLock();
1354 void SystemResourcesComponentBase ::
1366 const U32 idBase = callComp->
getIdBase();
1367 FW_ASSERT(opCode >= idBase, static_cast<FwAssertArgType>(opCode), static_cast<FwAssertArgType>(idBase));
1370 switch (opCode - idBase) {
1386 void SystemResourcesComponentBase ::
1395 compPtr->run_handlerBase(
void set_CmdStatus_OutputPort(FwIndexType portNum, Fw::InputCmdResponsePort *port)
Connect port to CmdStatus[portNum].
Channel ID for NON_VOLATILE_TOTAL.
Serialization/Deserialization operation was successful.
void addCallPort(InputTimePort *callPort)
Register an input port.
bool isConnected_CmdReg_OutputPort(FwIndexType portNum)
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()
Channel ID for NON_VOLATILE_FREE.
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
void unLock()
unlock the mutex and assert success
void tlmWrite_CPU_09(F32 arg, Fw::Time _tlmTime=Fw::Time()) const
void set_Tlm_OutputPort(FwIndexType portNum, Fw::InputTlmPort *port)
Connect port to Tlm[portNum].
bool isConnected_Log_OutputPort(FwIndexType 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)
Channel ID for MEMORY_TOTAL.
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 MEMORY_USED.
SerializeStatus
forward declaration for string
float F32
32-bit floating point
SystemResourcesComponentBase(const char *compName="")
Construct SystemResourcesComponentBase object.
bool isConnected_Tlm_OutputPort(FwIndexType portNum)
void invoke(FwOpcodeType opCode) const
Invoke a port interface.
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 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 interface.
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 interface.
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.
void tlmWrite_CPU_14(F32 arg, Fw::Time _tlmTime=Fw::Time()) const
static constexpr FwIndexType getNum_Tlm_OutputPorts()
void invoke(FwChanIdType id, Fw::Time &timeTag, Fw::TlmBuffer &val) const
Invoke a port interface.
static constexpr FwIndexType getNum_run_InputPorts()
FormatStatus format(const CHAR *formatString,...)
write formatted string to buffer
void init()
Initialization function.
A command to enable or disable system resource telemetry.
Command failed to deserialize.
void tlmWrite_CPU_15(F32 arg, Fw::Time _tlmTime=Fw::Time()) const
bool isConnected_CmdStatus_OutputPort(FwIndexType portNum)
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()
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.
void tlmWrite_CPU_03(F32 arg, 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
virtual void lock()
Lock the guarded mutex.
bool isConnected_Time_OutputPort(FwIndexType portNum)
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].