10 #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 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 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)
482 #if FW_ENABLE_TEXT_LOGGING == 1 485 getNum_LogText_OutputPorts()
const 513 static_cast<FwAssertArgType>(portNum)
516 return this->m_CmdReg_OutputPort[portNum].
isConnected();
524 static_cast<FwAssertArgType>(portNum)
527 return this->m_CmdStatus_OutputPort[portNum].
isConnected();
535 static_cast<FwAssertArgType>(portNum)
538 return this->m_Log_OutputPort[portNum].
isConnected();
541 #if FW_ENABLE_TEXT_LOGGING == 1 543 bool SystemResourcesComponentBase ::
544 isConnected_LogText_OutputPort(
FwIndexType portNum)
547 portNum < this->getNum_LogText_OutputPorts(),
548 static_cast<FwAssertArgType>(portNum)
551 return this->m_LogText_OutputPort[portNum].isConnected();
561 static_cast<FwAssertArgType>(portNum)
564 return this->m_Time_OutputPort[portNum].
isConnected();
572 static_cast<FwAssertArgType>(portNum)
575 return this->m_Tlm_OutputPort[portNum].
isConnected();
593 static_cast<FwAssertArgType>(portNum)
620 FW_ASSERT(this->m_CmdStatus_OutputPort[0].isConnected());
621 this->m_CmdStatus_OutputPort[0].
invoke(opCode, cmdSeq, response);
646 if (this->m_CmdStatus_OutputPort[0].isConnected()) {
647 this->m_CmdStatus_OutputPort[0].
invoke(
656 #if FW_CMD_CHECK_RESIDUAL 660 if (this->m_CmdStatus_OutputPort[0].isConnected()) {
661 this->m_CmdStatus_OutputPort[0].
invoke(
691 if (this->m_Tlm_OutputPort[0].isConnected()) {
693 this->m_Time_OutputPort[0].isConnected() &&
696 this->m_Time_OutputPort[0].
invoke(_tlmTime);
703 static_cast<FwAssertArgType>(_stat)
710 this->m_Tlm_OutputPort[0].
invoke(
724 if (this->m_Tlm_OutputPort[0].isConnected()) {
726 this->m_Time_OutputPort[0].isConnected() &&
729 this->m_Time_OutputPort[0].
invoke(_tlmTime);
736 static_cast<FwAssertArgType>(_stat)
743 this->m_Tlm_OutputPort[0].
invoke(
757 if (this->m_Tlm_OutputPort[0].isConnected()) {
759 this->m_Time_OutputPort[0].isConnected() &&
762 this->m_Time_OutputPort[0].
invoke(_tlmTime);
769 static_cast<FwAssertArgType>(_stat)
776 this->m_Tlm_OutputPort[0].
invoke(
790 if (this->m_Tlm_OutputPort[0].isConnected()) {
792 this->m_Time_OutputPort[0].isConnected() &&
795 this->m_Time_OutputPort[0].
invoke(_tlmTime);
802 static_cast<FwAssertArgType>(_stat)
809 this->m_Tlm_OutputPort[0].
invoke(
823 if (this->m_Tlm_OutputPort[0].isConnected()) {
825 this->m_Time_OutputPort[0].isConnected() &&
828 this->m_Time_OutputPort[0].
invoke(_tlmTime);
835 static_cast<FwAssertArgType>(_stat)
842 this->m_Tlm_OutputPort[0].
invoke(
856 if (this->m_Tlm_OutputPort[0].isConnected()) {
858 this->m_Time_OutputPort[0].isConnected() &&
861 this->m_Time_OutputPort[0].
invoke(_tlmTime);
868 static_cast<FwAssertArgType>(_stat)
875 this->m_Tlm_OutputPort[0].
invoke(
889 if (this->m_Tlm_OutputPort[0].isConnected()) {
891 this->m_Time_OutputPort[0].isConnected() &&
894 this->m_Time_OutputPort[0].
invoke(_tlmTime);
901 static_cast<FwAssertArgType>(_stat)
908 this->m_Tlm_OutputPort[0].
invoke(
922 if (this->m_Tlm_OutputPort[0].isConnected()) {
924 this->m_Time_OutputPort[0].isConnected() &&
927 this->m_Time_OutputPort[0].
invoke(_tlmTime);
934 static_cast<FwAssertArgType>(_stat)
941 this->m_Tlm_OutputPort[0].
invoke(
955 if (this->m_Tlm_OutputPort[0].isConnected()) {
957 this->m_Time_OutputPort[0].isConnected() &&
960 this->m_Time_OutputPort[0].
invoke(_tlmTime);
967 static_cast<FwAssertArgType>(_stat)
974 this->m_Tlm_OutputPort[0].
invoke(
988 if (this->m_Tlm_OutputPort[0].isConnected()) {
990 this->m_Time_OutputPort[0].isConnected() &&
993 this->m_Time_OutputPort[0].
invoke(_tlmTime);
1000 static_cast<FwAssertArgType>(_stat)
1007 this->m_Tlm_OutputPort[0].
invoke(
1021 if (this->m_Tlm_OutputPort[0].isConnected()) {
1023 this->m_Time_OutputPort[0].isConnected() &&
1026 this->m_Time_OutputPort[0].
invoke(_tlmTime);
1033 static_cast<FwAssertArgType>(_stat)
1040 this->m_Tlm_OutputPort[0].
invoke(
1054 if (this->m_Tlm_OutputPort[0].isConnected()) {
1056 this->m_Time_OutputPort[0].isConnected() &&
1059 this->m_Time_OutputPort[0].
invoke(_tlmTime);
1066 static_cast<FwAssertArgType>(_stat)
1073 this->m_Tlm_OutputPort[0].
invoke(
1087 if (this->m_Tlm_OutputPort[0].isConnected()) {
1089 this->m_Time_OutputPort[0].isConnected() &&
1092 this->m_Time_OutputPort[0].
invoke(_tlmTime);
1099 static_cast<FwAssertArgType>(_stat)
1106 this->m_Tlm_OutputPort[0].
invoke(
1120 if (this->m_Tlm_OutputPort[0].isConnected()) {
1122 this->m_Time_OutputPort[0].isConnected() &&
1125 this->m_Time_OutputPort[0].
invoke(_tlmTime);
1132 static_cast<FwAssertArgType>(_stat)
1139 this->m_Tlm_OutputPort[0].
invoke(
1153 if (this->m_Tlm_OutputPort[0].isConnected()) {
1155 this->m_Time_OutputPort[0].isConnected() &&
1158 this->m_Time_OutputPort[0].
invoke(_tlmTime);
1165 static_cast<FwAssertArgType>(_stat)
1172 this->m_Tlm_OutputPort[0].
invoke(
1186 if (this->m_Tlm_OutputPort[0].isConnected()) {
1188 this->m_Time_OutputPort[0].isConnected() &&
1191 this->m_Time_OutputPort[0].
invoke(_tlmTime);
1198 static_cast<FwAssertArgType>(_stat)
1205 this->m_Tlm_OutputPort[0].
invoke(
1219 if (this->m_Tlm_OutputPort[0].isConnected()) {
1221 this->m_Time_OutputPort[0].isConnected() &&
1224 this->m_Time_OutputPort[0].
invoke(_tlmTime);
1231 static_cast<FwAssertArgType>(_stat)
1238 this->m_Tlm_OutputPort[0].
invoke(
1252 if (this->m_Tlm_OutputPort[0].isConnected()) {
1254 this->m_Time_OutputPort[0].isConnected() &&
1257 this->m_Time_OutputPort[0].
invoke(_tlmTime);
1264 static_cast<FwAssertArgType>(_stat)
1271 this->m_Tlm_OutputPort[0].
invoke(
1285 if (this->m_Tlm_OutputPort[0].isConnected()) {
1287 this->m_Time_OutputPort[0].isConnected() &&
1290 this->m_Time_OutputPort[0].
invoke(_tlmTime);
1297 static_cast<FwAssertArgType>(_stat)
1304 this->m_Tlm_OutputPort[0].
invoke(
1318 if (this->m_Tlm_OutputPort[0].isConnected()) {
1320 this->m_Time_OutputPort[0].isConnected() &&
1323 this->m_Time_OutputPort[0].
invoke(_tlmTime);
1330 static_cast<FwAssertArgType>(_stat)
1337 this->m_Tlm_OutputPort[0].
invoke(
1351 if (this->m_Tlm_OutputPort[0].isConnected()) {
1353 this->m_Time_OutputPort[0].isConnected() &&
1356 this->m_Time_OutputPort[0].
invoke(_tlmTime);
1363 static_cast<FwAssertArgType>(_stat)
1370 this->m_Tlm_OutputPort[0].
invoke(
1385 if (this->m_Time_OutputPort[0].isConnected()) {
1387 this->m_Time_OutputPort[0].
invoke(_time);
1405 this->m_guardedPortMutex.
lock();
1411 this->m_guardedPortMutex.
unLock();
1418 void SystemResourcesComponentBase ::
1430 const U32 idBase = callComp->
getIdBase();
1431 FW_ASSERT(opCode >= idBase, static_cast<FwAssertArgType>(opCode), static_cast<FwAssertArgType>(idBase));
1434 switch (opCode - idBase) {
1450 void SystemResourcesComponentBase ::
1459 compPtr->run_handlerBase(
void set_CmdStatus_OutputPort(FwIndexType portNum, Fw::InputCmdResponsePort *port)
Connect port to CmdStatus[portNum].
Channel ID for NON_VOLATILE_FREE.
Serialization/Deserialization operation was successful.
void addCallPort(InputTimePort *callPort)
Register an input port.
bool isConnected_CmdReg_OutputPort(FwIndexType portNum)
void tlmWrite_CPU_00(F32 arg, Fw::Time _tlmTime=Fw::Time()) const
void tlmWrite_CPU(F32 arg, Fw::Time _tlmTime=Fw::Time()) const
SerializeStatus serialize(U8 val)
serialize 8-bit unsigned int
virtual void ENABLE_cmdHandler(FwOpcodeType opCode, U32 cmdSeq, Svc::SystemResourceEnabled enable)=0
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
A command to enable or disable system resource telemetry.
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.
FwIndexType getNum_Time_OutputPorts() const
void addCallPort(InputCmdRegPort *callPort)
Register an input port.
Fw::InputCmdPort * get_CmdDisp_InputPort(FwIndexType portNum)
PlatformIndexType FwIndexType
FwIndexType getNum_run_InputPorts() 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.
SerializeStatus
forward declaration for string
FwIndexType getNum_CmdReg_OutputPorts() const
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
FwIndexType getNum_CmdStatus_OutputPorts() const
void tlmWrite_CPU_11(F32 arg, Fw::Time _tlmTime=Fw::Time()) const
Serializable::SizeType getBuffLeft() const
returns how much deserialization buffer is left
void init()
Initialization function.
Svc::InputSchedPort * get_run_InputPort(FwIndexType portNum)
void invoke(Fw::Time &time) const
Invoke a port interface.
const char * toChar() const
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.
No time base has been established.
virtual void unLock()
Unlock the guarded mutex.
void cmdResponse_out(FwOpcodeType opCode, U32 cmdSeq, Fw::CmdResponse response)
Emit command response.
void resetDeser()
reset deserialization to beginning
void tlmWrite_CPU_14(F32 arg, Fw::Time _tlmTime=Fw::Time()) const
void invoke(FwChanIdType id, Fw::Time &timeTag, Fw::TlmBuffer &val) const
Invoke a port interface.
FormatStatus format(const CHAR *formatString,...)
write formatted string to buffer
void init()
Initialization function.
#define PRI_PlatformIntType
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
FwIndexType getNum_Log_OutputPorts() const
SerializeStatus deserialize(U8 &val)
deserialize 8-bit unsigned int
void tlmWrite_CPU_04(F32 arg, Fw::Time _tlmTime=Fw::Time()) const
#define FW_NUM_ARRAY_ELEMENTS(a)
number of elements in an array
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
void set_Log_OutputPort(FwIndexType portNum, Fw::InputLogPort *port)
Connect port to Log[portNum].
void regCommands()
Register commands with the Command Dispatcher.
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
Channel ID for MEMORY_USED.
FwIndexType getNum_CmdDisp_InputPorts() const
void tlmWrite_CPU_03(F32 arg, Fw::Time _tlmTime=Fw::Time()) const
FwIndexType getNum_Tlm_OutputPorts() 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)
Channel ID for MEMORY_TOTAL.
void tlmWrite_NON_VOLATILE_TOTAL(U64 arg, Fw::Time _tlmTime=Fw::Time()) const
Channel ID for NON_VOLATILE_TOTAL.
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].