10#if FW_ENABLE_TEXT_LOGGING
20 void SystemResourcesComponentBase ::
29 port < static_cast<FwIndexType>(this->getNum_CmdDisp_InputPorts());
32 this->m_CmdDisp_InputPort[port].init();
33 this->m_CmdDisp_InputPort[port].addCallComp(
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());
53 port < static_cast<FwIndexType>(this->getNum_run_InputPorts());
56 this->m_run_InputPort[port].init();
57 this->m_run_InputPort[port].addCallComp(
61 this->m_run_InputPort[port].setPortNum(port);
63#if FW_OBJECT_NAMES == 1
67 this->m_objName.toChar(),
70 this->m_run_InputPort[port].setObjName(portName.
toChar());
77 port < static_cast<FwIndexType>(this->getNum_CmdReg_OutputPorts());
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());
96 port < static_cast<FwIndexType>(this->getNum_CmdStatus_OutputPorts());
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());
115 port < static_cast<FwIndexType>(this->getNum_Log_OutputPorts());
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());
155 port < static_cast<FwIndexType>(this->getNum_Time_OutputPorts());
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());
174 port < static_cast<FwIndexType>(this->getNum_Tlm_OutputPorts());
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());
199 portNum < this->getNum_CmdDisp_InputPorts(),
203 return &this->m_CmdDisp_InputPort[portNum];
214 portNum < this->getNum_run_InputPorts(),
218 return &this->m_run_InputPort[portNum];
225 void SystemResourcesComponentBase ::
226 set_CmdReg_OutputPort(
232 portNum < this->getNum_CmdReg_OutputPorts(),
236 this->m_CmdReg_OutputPort[portNum].addCallPort(port);
239 void SystemResourcesComponentBase ::
240 set_CmdStatus_OutputPort(
246 portNum < this->getNum_CmdStatus_OutputPorts(),
250 this->m_CmdStatus_OutputPort[portNum].addCallPort(port);
253 void SystemResourcesComponentBase ::
260 portNum < this->getNum_Log_OutputPorts(),
264 this->m_Log_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);
285 void SystemResourcesComponentBase ::
292 portNum < this->getNum_Time_OutputPorts(),
296 this->m_Time_OutputPort[portNum].addCallPort(port);
299 void SystemResourcesComponentBase ::
306 portNum < this->getNum_Tlm_OutputPorts(),
310 this->m_Tlm_OutputPort[portNum].addCallPort(port);
313#if FW_PORT_SERIALIZATION
319 void SystemResourcesComponentBase ::
320 set_CmdReg_OutputPort(
322 Fw::InputSerializePort* port
326 portNum < this->getNum_CmdReg_OutputPorts(),
330 this->m_CmdReg_OutputPort[portNum].registerSerialPort(port);
333 void SystemResourcesComponentBase ::
334 set_CmdStatus_OutputPort(
336 Fw::InputSerializePort* port
340 portNum < this->getNum_CmdStatus_OutputPorts(),
344 this->m_CmdStatus_OutputPort[portNum].registerSerialPort(port);
347 void SystemResourcesComponentBase ::
350 Fw::InputSerializePort* port
354 portNum < this->getNum_Log_OutputPorts(),
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);
379 void SystemResourcesComponentBase ::
382 Fw::InputSerializePort* port
386 portNum < this->getNum_Time_OutputPorts(),
390 this->m_Time_OutputPort[portNum].registerSerialPort(port);
393 void SystemResourcesComponentBase ::
396 Fw::InputSerializePort* port
400 portNum < this->getNum_Tlm_OutputPorts(),
404 this->m_Tlm_OutputPort[portNum].registerSerialPort(port);
413 void SystemResourcesComponentBase ::
416 FW_ASSERT(this->m_CmdReg_OutputPort[0].isConnected());
418 this->m_CmdReg_OutputPort[0].invoke(
419 this->getIdBase() + OPCODE_ENABLE
427 SystemResourcesComponentBase ::
428 SystemResourcesComponentBase(
const char* compName) :
429 Fw::PassiveComponentBase(compName)
434 SystemResourcesComponentBase ::
435 ~SystemResourcesComponentBase()
445 getNum_CmdDisp_InputPorts()
const
455 getNum_run_InputPorts()
const
465 getNum_CmdReg_OutputPorts()
const
471 getNum_CmdStatus_OutputPorts()
const
477 getNum_Log_OutputPorts()
const
482#if FW_ENABLE_TEXT_LOGGING == 1
485 getNum_LogText_OutputPorts()
const
493 getNum_Time_OutputPorts()
const
499 getNum_Tlm_OutputPorts()
const
508 bool SystemResourcesComponentBase ::
512 portNum < this->getNum_CmdReg_OutputPorts(),
516 return this->m_CmdReg_OutputPort[portNum].isConnected();
519 bool SystemResourcesComponentBase ::
520 isConnected_CmdStatus_OutputPort(
FwIndexType portNum)
523 portNum < this->getNum_CmdStatus_OutputPorts(),
527 return this->m_CmdStatus_OutputPort[portNum].isConnected();
530 bool SystemResourcesComponentBase ::
534 portNum < this->getNum_Log_OutputPorts(),
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();
556 bool SystemResourcesComponentBase ::
560 portNum < this->getNum_Time_OutputPorts(),
564 return this->m_Time_OutputPort[portNum].isConnected();
567 bool SystemResourcesComponentBase ::
571 portNum < this->getNum_Tlm_OutputPorts(),
575 return this->m_Tlm_OutputPort[portNum].isConnected();
584 void SystemResourcesComponentBase ::
592 portNum < this->getNum_run_InputPorts(),
613 void SystemResourcesComponentBase ::
620 FW_ASSERT(this->m_CmdStatus_OutputPort[0].isConnected());
621 this->m_CmdStatus_OutputPort[0].invoke(opCode, cmdSeq, response);
630 void SystemResourcesComponentBase ::
631 ENABLE_cmdHandlerBase(
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(
673 this->ENABLE_cmdHandler(
685 void SystemResourcesComponentBase ::
686 tlmWrite_MEMORY_TOTAL(
691 if (this->m_Tlm_OutputPort[0].isConnected()) {
693 this->m_Time_OutputPort[0].isConnected() &&
696 this->m_Time_OutputPort[0].invoke(_tlmTime);
708 _id = this->getIdBase() + CHANNELID_MEMORY_TOTAL;
710 this->m_Tlm_OutputPort[0].invoke(
718 void SystemResourcesComponentBase ::
719 tlmWrite_MEMORY_USED(
724 if (this->m_Tlm_OutputPort[0].isConnected()) {
726 this->m_Time_OutputPort[0].isConnected() &&
729 this->m_Time_OutputPort[0].invoke(_tlmTime);
741 _id = this->getIdBase() + CHANNELID_MEMORY_USED;
743 this->m_Tlm_OutputPort[0].invoke(
751 void SystemResourcesComponentBase ::
752 tlmWrite_NON_VOLATILE_TOTAL(
757 if (this->m_Tlm_OutputPort[0].isConnected()) {
759 this->m_Time_OutputPort[0].isConnected() &&
762 this->m_Time_OutputPort[0].invoke(_tlmTime);
774 _id = this->getIdBase() + CHANNELID_NON_VOLATILE_TOTAL;
776 this->m_Tlm_OutputPort[0].invoke(
784 void SystemResourcesComponentBase ::
785 tlmWrite_NON_VOLATILE_FREE(
790 if (this->m_Tlm_OutputPort[0].isConnected()) {
792 this->m_Time_OutputPort[0].isConnected() &&
795 this->m_Time_OutputPort[0].invoke(_tlmTime);
807 _id = this->getIdBase() + CHANNELID_NON_VOLATILE_FREE;
809 this->m_Tlm_OutputPort[0].invoke(
817 void SystemResourcesComponentBase ::
823 if (this->m_Tlm_OutputPort[0].isConnected()) {
825 this->m_Time_OutputPort[0].isConnected() &&
828 this->m_Time_OutputPort[0].invoke(_tlmTime);
840 _id = this->getIdBase() + CHANNELID_CPU;
842 this->m_Tlm_OutputPort[0].invoke(
850 void SystemResourcesComponentBase ::
856 if (this->m_Tlm_OutputPort[0].isConnected()) {
858 this->m_Time_OutputPort[0].isConnected() &&
861 this->m_Time_OutputPort[0].invoke(_tlmTime);
873 _id = this->getIdBase() + CHANNELID_CPU_00;
875 this->m_Tlm_OutputPort[0].invoke(
883 void SystemResourcesComponentBase ::
889 if (this->m_Tlm_OutputPort[0].isConnected()) {
891 this->m_Time_OutputPort[0].isConnected() &&
894 this->m_Time_OutputPort[0].invoke(_tlmTime);
906 _id = this->getIdBase() + CHANNELID_CPU_01;
908 this->m_Tlm_OutputPort[0].invoke(
916 void SystemResourcesComponentBase ::
922 if (this->m_Tlm_OutputPort[0].isConnected()) {
924 this->m_Time_OutputPort[0].isConnected() &&
927 this->m_Time_OutputPort[0].invoke(_tlmTime);
939 _id = this->getIdBase() + CHANNELID_CPU_02;
941 this->m_Tlm_OutputPort[0].invoke(
949 void SystemResourcesComponentBase ::
955 if (this->m_Tlm_OutputPort[0].isConnected()) {
957 this->m_Time_OutputPort[0].isConnected() &&
960 this->m_Time_OutputPort[0].invoke(_tlmTime);
972 _id = this->getIdBase() + CHANNELID_CPU_03;
974 this->m_Tlm_OutputPort[0].invoke(
982 void SystemResourcesComponentBase ::
988 if (this->m_Tlm_OutputPort[0].isConnected()) {
990 this->m_Time_OutputPort[0].isConnected() &&
993 this->m_Time_OutputPort[0].invoke(_tlmTime);
1005 _id = this->getIdBase() + CHANNELID_CPU_04;
1007 this->m_Tlm_OutputPort[0].invoke(
1015 void SystemResourcesComponentBase ::
1021 if (this->m_Tlm_OutputPort[0].isConnected()) {
1023 this->m_Time_OutputPort[0].isConnected() &&
1026 this->m_Time_OutputPort[0].invoke(_tlmTime);
1038 _id = this->getIdBase() + CHANNELID_CPU_05;
1040 this->m_Tlm_OutputPort[0].invoke(
1048 void SystemResourcesComponentBase ::
1054 if (this->m_Tlm_OutputPort[0].isConnected()) {
1056 this->m_Time_OutputPort[0].isConnected() &&
1059 this->m_Time_OutputPort[0].invoke(_tlmTime);
1071 _id = this->getIdBase() + CHANNELID_CPU_06;
1073 this->m_Tlm_OutputPort[0].invoke(
1081 void SystemResourcesComponentBase ::
1087 if (this->m_Tlm_OutputPort[0].isConnected()) {
1089 this->m_Time_OutputPort[0].isConnected() &&
1092 this->m_Time_OutputPort[0].invoke(_tlmTime);
1104 _id = this->getIdBase() + CHANNELID_CPU_07;
1106 this->m_Tlm_OutputPort[0].invoke(
1114 void SystemResourcesComponentBase ::
1120 if (this->m_Tlm_OutputPort[0].isConnected()) {
1122 this->m_Time_OutputPort[0].isConnected() &&
1125 this->m_Time_OutputPort[0].invoke(_tlmTime);
1137 _id = this->getIdBase() + CHANNELID_CPU_08;
1139 this->m_Tlm_OutputPort[0].invoke(
1147 void SystemResourcesComponentBase ::
1153 if (this->m_Tlm_OutputPort[0].isConnected()) {
1155 this->m_Time_OutputPort[0].isConnected() &&
1158 this->m_Time_OutputPort[0].invoke(_tlmTime);
1170 _id = this->getIdBase() + CHANNELID_CPU_09;
1172 this->m_Tlm_OutputPort[0].invoke(
1180 void SystemResourcesComponentBase ::
1186 if (this->m_Tlm_OutputPort[0].isConnected()) {
1188 this->m_Time_OutputPort[0].isConnected() &&
1191 this->m_Time_OutputPort[0].invoke(_tlmTime);
1203 _id = this->getIdBase() + CHANNELID_CPU_10;
1205 this->m_Tlm_OutputPort[0].invoke(
1213 void SystemResourcesComponentBase ::
1219 if (this->m_Tlm_OutputPort[0].isConnected()) {
1221 this->m_Time_OutputPort[0].isConnected() &&
1224 this->m_Time_OutputPort[0].invoke(_tlmTime);
1236 _id = this->getIdBase() + CHANNELID_CPU_11;
1238 this->m_Tlm_OutputPort[0].invoke(
1246 void SystemResourcesComponentBase ::
1252 if (this->m_Tlm_OutputPort[0].isConnected()) {
1254 this->m_Time_OutputPort[0].isConnected() &&
1257 this->m_Time_OutputPort[0].invoke(_tlmTime);
1269 _id = this->getIdBase() + CHANNELID_CPU_12;
1271 this->m_Tlm_OutputPort[0].invoke(
1279 void SystemResourcesComponentBase ::
1285 if (this->m_Tlm_OutputPort[0].isConnected()) {
1287 this->m_Time_OutputPort[0].isConnected() &&
1290 this->m_Time_OutputPort[0].invoke(_tlmTime);
1302 _id = this->getIdBase() + CHANNELID_CPU_13;
1304 this->m_Tlm_OutputPort[0].invoke(
1312 void SystemResourcesComponentBase ::
1318 if (this->m_Tlm_OutputPort[0].isConnected()) {
1320 this->m_Time_OutputPort[0].isConnected() &&
1323 this->m_Time_OutputPort[0].invoke(_tlmTime);
1335 _id = this->getIdBase() + CHANNELID_CPU_14;
1337 this->m_Tlm_OutputPort[0].invoke(
1345 void SystemResourcesComponentBase ::
1351 if (this->m_Tlm_OutputPort[0].isConnected()) {
1353 this->m_Time_OutputPort[0].isConnected() &&
1356 this->m_Time_OutputPort[0].invoke(_tlmTime);
1368 _id = this->getIdBase() + CHANNELID_CPU_15;
1370 this->m_Tlm_OutputPort[0].invoke(
1385 if (this->m_Time_OutputPort[0].isConnected()) {
1387 this->m_Time_OutputPort[0].invoke(_time);
1402 void SystemResourcesComponentBase ::
1405 this->m_guardedPortMutex.lock();
1408 void SystemResourcesComponentBase ::
1411 this->m_guardedPortMutex.unLock();
1418 void SystemResourcesComponentBase ::
1430 const U32 idBase = callComp->
getIdBase();
1434 switch (opCode - idBase) {
1435 case OPCODE_ENABLE: {
1450 void SystemResourcesComponentBase ::
1458 SystemResourcesComponentBase* compPtr =
static_cast<SystemResourcesComponentBase*
>(callComp);
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 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
Auto-generated base for SystemResources component.
void ENABLE_cmdHandlerBase(FwOpcodeType opCode, U32 cmdSeq, Fw::CmdArgBuffer &args)
void run_handlerBase(FwIndexType portNum, U32 context)
Handler base-class function for input port run.
SerializeStatus
forward declaration for string
@ FW_SERIALIZE_OK
Serialization/Deserialization operation was successful.