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());
203 return &this->m_CmdDisp_InputPort[portNum];
218 return &this->m_run_InputPort[portNum];
236 this->m_CmdReg_OutputPort[portNum].
addCallPort(port);
250 this->m_CmdStatus_OutputPort[portNum].
addCallPort(port);
267 #if FW_ENABLE_TEXT_LOGGING == 1
269 void SystemResourcesComponentBase ::
270 set_LogText_OutputPort(
276 portNum < this->getNum_LogText_OutputPorts(),
280 this->m_LogText_OutputPort[portNum].addCallPort(port);
296 this->m_Time_OutputPort[portNum].
addCallPort(port);
313 #if FW_PORT_SERIALIZATION
322 Fw::InputSerializePort* port
330 this->m_CmdReg_OutputPort[portNum].registerSerialPort(port);
336 Fw::InputSerializePort* port
344 this->m_CmdStatus_OutputPort[portNum].registerSerialPort(port);
350 Fw::InputSerializePort* port
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(),
374 this->m_LogText_OutputPort[portNum].registerSerialPort(port);
382 Fw::InputSerializePort* port
390 this->m_Time_OutputPort[portNum].registerSerialPort(port);
396 Fw::InputSerializePort* port
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
516 return this->m_CmdReg_OutputPort[portNum].
isConnected();
527 return this->m_CmdStatus_OutputPort[portNum].
isConnected();
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(),
551 return this->m_LogText_OutputPort[portNum].isConnected();
564 return this->m_Time_OutputPort[portNum].
isConnected();
575 return this->m_Tlm_OutputPort[portNum].
isConnected();
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);
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);
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);
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);
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);
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);
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);
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);
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);
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);
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);
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);
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);
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);
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);
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);
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);
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);
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);
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);
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);
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();
1434 switch (opCode - idBase) {
1450 void SystemResourcesComponentBase ::
1459 compPtr->run_handlerBase(
float F32
32-bit floating point
#define FW_NUM_ARRAY_ELEMENTS(a)
number of elements in an array
#define PRI_PlatformIntType
@ TB_NONE
No time base has been established.
PlatformAssertArgType FwAssertArgType
PlatformIndexType FwIndexType
Enum representing a command response.
@ FORMAT_ERROR
Command failed to deserialize.
void init()
Object initializer.
const char * toChar() const
void addCallPort(InputCmdRegPort *callPort)
Register an input port.
void invoke(FwOpcodeType opCode)
Invoke a port interface.
void init()
Initialization function.
void init()
Initialization function.
void addCallPort(InputCmdResponsePort *callPort)
Register an input port.
void invoke(FwOpcodeType opCode, U32 cmdSeq, const Fw::CmdResponse &response)
Invoke a port interface.
void init()
Initialization function.
void addCallPort(InputLogPort *callPort)
Register an input port.
void addCallPort(InputTimePort *callPort)
Register an input port.
void invoke(Fw::Time &time)
Invoke a port interface.
void init()
Initialization function.
void addCallPort(InputTlmPort *callPort)
Register an input port.
void init()
Initialization function.
void invoke(FwChanIdType id, Fw::Time &timeTag, Fw::TlmBuffer &val)
Invoke a port interface.
void resetDeser()
reset deserialization to beginning
Serializable::SizeType getBuffLeft() const
returns how much deserialization buffer is left
SerializeStatus deserialize(U8 &val)
deserialize 8-bit unsigned int
SerializeStatus serialize(U8 val)
serialize 8-bit unsigned int
void format(const CHAR *formatString,...)
write formatted string to buffer
void unLock()
unlock the mutex and assert success
void lock()
lock the mutex and assert success
Auto-generated base for SystemResources component.
void tlmWrite_CPU_01(F32 arg, Fw::Time _tlmTime=Fw::Time())
void cmdResponse_out(FwOpcodeType opCode, U32 cmdSeq, Fw::CmdResponse response)
Emit command response.
virtual void run_handler(FwIndexType portNum, U32 context)=0
Handler for input port run.
void set_Time_OutputPort(FwIndexType portNum, Fw::InputTimePort *port)
Connect port to Time[portNum].
void tlmWrite_CPU_02(F32 arg, Fw::Time _tlmTime=Fw::Time())
void tlmWrite_CPU_14(F32 arg, Fw::Time _tlmTime=Fw::Time())
void set_Tlm_OutputPort(FwIndexType portNum, Fw::InputTlmPort *port)
Connect port to Tlm[portNum].
Svc::InputSchedPort * get_run_InputPort(FwIndexType portNum)
virtual void unLock()
Unlock the guarded mutex.
void tlmWrite_MEMORY_USED(U64 arg, Fw::Time _tlmTime=Fw::Time())
void tlmWrite_NON_VOLATILE_TOTAL(U64 arg, Fw::Time _tlmTime=Fw::Time())
void set_Log_OutputPort(FwIndexType portNum, Fw::InputLogPort *port)
Connect port to Log[portNum].
void tlmWrite_NON_VOLATILE_FREE(U64 arg, Fw::Time _tlmTime=Fw::Time())
FwIndexType getNum_Log_OutputPorts() const
FwIndexType getNum_Time_OutputPorts() const
FwIndexType getNum_CmdReg_OutputPorts() const
FwIndexType getNum_CmdDisp_InputPorts() const
SystemResourcesComponentBase(const char *compName="")
Construct SystemResourcesComponentBase object.
void tlmWrite_CPU_00(F32 arg, Fw::Time _tlmTime=Fw::Time())
bool isConnected_CmdReg_OutputPort(FwIndexType portNum)
void tlmWrite_CPU_09(F32 arg, Fw::Time _tlmTime=Fw::Time())
FwIndexType getNum_CmdStatus_OutputPorts() const
void ENABLE_cmdHandlerBase(FwOpcodeType opCode, U32 cmdSeq, Fw::CmdArgBuffer &args)
void tlmWrite_CPU_10(F32 arg, Fw::Time _tlmTime=Fw::Time())
bool isConnected_Tlm_OutputPort(FwIndexType portNum)
Fw::InputCmdPort * get_CmdDisp_InputPort(FwIndexType portNum)
void tlmWrite_CPU_06(F32 arg, Fw::Time _tlmTime=Fw::Time())
void tlmWrite_CPU_08(F32 arg, Fw::Time _tlmTime=Fw::Time())
bool isConnected_Time_OutputPort(FwIndexType portNum)
void tlmWrite_MEMORY_TOTAL(U64 arg, Fw::Time _tlmTime=Fw::Time())
void run_handlerBase(FwIndexType portNum, U32 context)
Handler base-class function for input port run.
void tlmWrite_CPU_07(F32 arg, Fw::Time _tlmTime=Fw::Time())
virtual void lock()
Lock the guarded mutex.
FwIndexType getNum_run_InputPorts() const
void set_CmdStatus_OutputPort(FwIndexType portNum, Fw::InputCmdResponsePort *port)
Connect port to CmdStatus[portNum].
void tlmWrite_CPU_15(F32 arg, Fw::Time _tlmTime=Fw::Time())
@ OPCODE_ENABLE
A command to enable or disable system resource telemetry.
void tlmWrite_CPU_04(F32 arg, Fw::Time _tlmTime=Fw::Time())
void tlmWrite_CPU(F32 arg, Fw::Time _tlmTime=Fw::Time())
FwIndexType getNum_Tlm_OutputPorts() const
bool isConnected_Log_OutputPort(FwIndexType portNum)
void regCommands()
Register commands with the Command Dispatcher.
void tlmWrite_CPU_12(F32 arg, Fw::Time _tlmTime=Fw::Time())
void tlmWrite_CPU_05(F32 arg, Fw::Time _tlmTime=Fw::Time())
virtual void ENABLE_cmdHandler(FwOpcodeType opCode, U32 cmdSeq, Svc::SystemResourceEnabled enable)=0
bool isConnected_CmdStatus_OutputPort(FwIndexType portNum)
void tlmWrite_CPU_11(F32 arg, Fw::Time _tlmTime=Fw::Time())
void tlmWrite_CPU_03(F32 arg, Fw::Time _tlmTime=Fw::Time())
@ CHANNELID_CPU_00
Channel ID for CPU_00.
@ CHANNELID_CPU_06
Channel ID for CPU_06.
@ CHANNELID_CPU_05
Channel ID for CPU_05.
@ CHANNELID_CPU_08
Channel ID for CPU_08.
@ CHANNELID_NON_VOLATILE_TOTAL
Channel ID for NON_VOLATILE_TOTAL.
@ CHANNELID_CPU_13
Channel ID for CPU_13.
@ CHANNELID_CPU_04
Channel ID for CPU_04.
@ CHANNELID_CPU_11
Channel ID for CPU_11.
@ CHANNELID_MEMORY_USED
Channel ID for MEMORY_USED.
@ CHANNELID_CPU_14
Channel ID for CPU_14.
@ CHANNELID_CPU_07
Channel ID for CPU_07.
@ CHANNELID_CPU
Channel ID for CPU.
@ CHANNELID_CPU_01
Channel ID for CPU_01.
@ CHANNELID_CPU_03
Channel ID for CPU_03.
@ CHANNELID_CPU_15
Channel ID for CPU_15.
@ CHANNELID_CPU_10
Channel ID for CPU_10.
@ CHANNELID_MEMORY_TOTAL
Channel ID for MEMORY_TOTAL.
@ CHANNELID_NON_VOLATILE_FREE
Channel ID for NON_VOLATILE_FREE.
@ CHANNELID_CPU_09
Channel ID for CPU_09.
@ CHANNELID_CPU_12
Channel ID for CPU_12.
@ CHANNELID_CPU_02
Channel ID for CPU_02.
virtual ~SystemResourcesComponentBase()
Destroy SystemResourcesComponentBase object.
void tlmWrite_CPU_13(F32 arg, Fw::Time _tlmTime=Fw::Time())
void set_CmdReg_OutputPort(FwIndexType portNum, Fw::InputCmdRegPort *port)
Connect port to CmdReg[portNum].
SerializeStatus
forward declaration for string
@ FW_SERIALIZE_OK
Serialization/Deserialization operation was successful.