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(
422 this->m_CmdReg_OutputPort[0].
invoke(
433 Fw::PassiveComponentBase(compName)
486 #if FW_ENABLE_TEXT_LOGGING == 1
489 getNum_LogText_OutputPorts()
const
520 return this->m_CmdReg_OutputPort[portNum].
isConnected();
531 return this->m_CmdStatus_OutputPort[portNum].
isConnected();
542 return this->m_Log_OutputPort[portNum].
isConnected();
545 #if FW_ENABLE_TEXT_LOGGING == 1
547 bool SystemResourcesComponentBase ::
548 isConnected_LogText_OutputPort(
FwIndexType portNum)
551 portNum < this->getNum_LogText_OutputPorts(),
555 return this->m_LogText_OutputPort[portNum].isConnected();
568 return this->m_Time_OutputPort[portNum].
isConnected();
579 return this->m_Tlm_OutputPort[portNum].
isConnected();
624 FW_ASSERT(this->m_CmdStatus_OutputPort[0].isConnected());
625 this->m_CmdStatus_OutputPort[0].
invoke(opCode, cmdSeq, response);
650 if (this->m_CmdStatus_OutputPort[0].isConnected()) {
651 this->m_CmdStatus_OutputPort[0].
invoke(
660 #if FW_CMD_CHECK_RESIDUAL
664 if (this->m_CmdStatus_OutputPort[0].isConnected()) {
665 this->m_CmdStatus_OutputPort[0].
invoke(
692 #if FW_CMD_CHECK_RESIDUAL
696 if (this->m_CmdStatus_OutputPort[0].isConnected()) {
697 this->m_CmdStatus_OutputPort[0].
invoke(
723 if (this->m_Time_OutputPort[0].isConnected()) {
724 this->m_Time_OutputPort[0].
invoke(_logTime);
732 if (this->m_Log_OutputPort[0].isConnected()) {
736 #if FW_AMPCS_COMPATIBLE
751 this->m_Log_OutputPort[0].
invoke(
760 #if FW_ENABLE_TEXT_LOGGING
761 if (this->m_LogText_OutputPort[0].isConnected()) {
762 #if FW_OBJECT_NAMES == 1
763 const char* _formatString =
764 "(%s) %s: Framework Version: [%s]";
766 const char* _formatString =
767 "%s: Framework Version: [%s]";
774 this->m_objName.toChar(),
776 "FRAMEWORK_VERSION ",
780 this->m_LogText_OutputPort[0].invoke(
795 if (this->m_Time_OutputPort[0].isConnected()) {
796 this->m_Time_OutputPort[0].
invoke(_logTime);
804 if (this->m_Log_OutputPort[0].isConnected()) {
808 #if FW_AMPCS_COMPATIBLE
823 this->m_Log_OutputPort[0].
invoke(
832 #if FW_ENABLE_TEXT_LOGGING
833 if (this->m_LogText_OutputPort[0].isConnected()) {
834 #if FW_OBJECT_NAMES == 1
835 const char* _formatString =
836 "(%s) %s: Project Version: [%s]";
838 const char* _formatString =
839 "%s: Project Version: [%s]";
846 this->m_objName.toChar(),
852 this->m_LogText_OutputPort[0].invoke(
872 if (this->m_Tlm_OutputPort[0].isConnected()) {
874 this->m_Time_OutputPort[0].isConnected() &&
877 this->m_Time_OutputPort[0].
invoke(_tlmTime);
891 this->m_Tlm_OutputPort[0].
invoke(
905 if (this->m_Tlm_OutputPort[0].isConnected()) {
907 this->m_Time_OutputPort[0].isConnected() &&
910 this->m_Time_OutputPort[0].
invoke(_tlmTime);
924 this->m_Tlm_OutputPort[0].
invoke(
938 if (this->m_Tlm_OutputPort[0].isConnected()) {
940 this->m_Time_OutputPort[0].isConnected() &&
943 this->m_Time_OutputPort[0].
invoke(_tlmTime);
957 this->m_Tlm_OutputPort[0].
invoke(
971 if (this->m_Tlm_OutputPort[0].isConnected()) {
973 this->m_Time_OutputPort[0].isConnected() &&
976 this->m_Time_OutputPort[0].
invoke(_tlmTime);
990 this->m_Tlm_OutputPort[0].
invoke(
1004 if (this->m_Tlm_OutputPort[0].isConnected()) {
1006 this->m_Time_OutputPort[0].isConnected() &&
1009 this->m_Time_OutputPort[0].
invoke(_tlmTime);
1023 this->m_Tlm_OutputPort[0].
invoke(
1037 if (this->m_Tlm_OutputPort[0].isConnected()) {
1039 this->m_Time_OutputPort[0].isConnected() &&
1042 this->m_Time_OutputPort[0].
invoke(_tlmTime);
1056 this->m_Tlm_OutputPort[0].
invoke(
1070 if (this->m_Tlm_OutputPort[0].isConnected()) {
1072 this->m_Time_OutputPort[0].isConnected() &&
1075 this->m_Time_OutputPort[0].
invoke(_tlmTime);
1089 this->m_Tlm_OutputPort[0].
invoke(
1103 if (this->m_Tlm_OutputPort[0].isConnected()) {
1105 this->m_Time_OutputPort[0].isConnected() &&
1108 this->m_Time_OutputPort[0].
invoke(_tlmTime);
1122 this->m_Tlm_OutputPort[0].
invoke(
1136 if (this->m_Tlm_OutputPort[0].isConnected()) {
1138 this->m_Time_OutputPort[0].isConnected() &&
1141 this->m_Time_OutputPort[0].
invoke(_tlmTime);
1155 this->m_Tlm_OutputPort[0].
invoke(
1169 if (this->m_Tlm_OutputPort[0].isConnected()) {
1171 this->m_Time_OutputPort[0].isConnected() &&
1174 this->m_Time_OutputPort[0].
invoke(_tlmTime);
1188 this->m_Tlm_OutputPort[0].
invoke(
1202 if (this->m_Tlm_OutputPort[0].isConnected()) {
1204 this->m_Time_OutputPort[0].isConnected() &&
1207 this->m_Time_OutputPort[0].
invoke(_tlmTime);
1221 this->m_Tlm_OutputPort[0].
invoke(
1235 if (this->m_Tlm_OutputPort[0].isConnected()) {
1237 this->m_Time_OutputPort[0].isConnected() &&
1240 this->m_Time_OutputPort[0].
invoke(_tlmTime);
1254 this->m_Tlm_OutputPort[0].
invoke(
1268 if (this->m_Tlm_OutputPort[0].isConnected()) {
1270 this->m_Time_OutputPort[0].isConnected() &&
1273 this->m_Time_OutputPort[0].
invoke(_tlmTime);
1287 this->m_Tlm_OutputPort[0].
invoke(
1301 if (this->m_Tlm_OutputPort[0].isConnected()) {
1303 this->m_Time_OutputPort[0].isConnected() &&
1306 this->m_Time_OutputPort[0].
invoke(_tlmTime);
1320 this->m_Tlm_OutputPort[0].
invoke(
1334 if (this->m_Tlm_OutputPort[0].isConnected()) {
1336 this->m_Time_OutputPort[0].isConnected() &&
1339 this->m_Time_OutputPort[0].
invoke(_tlmTime);
1353 this->m_Tlm_OutputPort[0].
invoke(
1367 if (this->m_Tlm_OutputPort[0].isConnected()) {
1369 this->m_Time_OutputPort[0].isConnected() &&
1372 this->m_Time_OutputPort[0].
invoke(_tlmTime);
1386 this->m_Tlm_OutputPort[0].
invoke(
1400 if (this->m_Tlm_OutputPort[0].isConnected()) {
1402 this->m_Time_OutputPort[0].isConnected() &&
1405 this->m_Time_OutputPort[0].
invoke(_tlmTime);
1419 this->m_Tlm_OutputPort[0].
invoke(
1433 if (this->m_Tlm_OutputPort[0].isConnected()) {
1435 this->m_Time_OutputPort[0].isConnected() &&
1438 this->m_Time_OutputPort[0].
invoke(_tlmTime);
1452 this->m_Tlm_OutputPort[0].
invoke(
1466 if (this->m_Tlm_OutputPort[0].isConnected()) {
1468 this->m_Time_OutputPort[0].isConnected() &&
1471 this->m_Time_OutputPort[0].
invoke(_tlmTime);
1485 this->m_Tlm_OutputPort[0].
invoke(
1499 if (this->m_Tlm_OutputPort[0].isConnected()) {
1501 this->m_Time_OutputPort[0].isConnected() &&
1504 this->m_Time_OutputPort[0].
invoke(_tlmTime);
1518 this->m_Tlm_OutputPort[0].
invoke(
1532 if (this->m_Tlm_OutputPort[0].isConnected()) {
1534 this->m_Time_OutputPort[0].isConnected() &&
1537 this->m_Time_OutputPort[0].
invoke(_tlmTime);
1551 this->m_Tlm_OutputPort[0].
invoke(
1565 if (this->m_Tlm_OutputPort[0].isConnected()) {
1567 this->m_Time_OutputPort[0].isConnected() &&
1570 this->m_Time_OutputPort[0].
invoke(_tlmTime);
1584 this->m_Tlm_OutputPort[0].
invoke(
1598 if (this->m_Tlm_OutputPort[0].isConnected()) {
1600 this->m_Time_OutputPort[0].isConnected() &&
1603 this->m_Time_OutputPort[0].
invoke(_tlmTime);
1617 this->m_Tlm_OutputPort[0].
invoke(
1632 if (this->m_Time_OutputPort[0].isConnected()) {
1634 this->m_Time_OutputPort[0].
invoke(_time);
1652 this->m_guardedPortMutex.
lock();
1658 this->m_guardedPortMutex.
unLock();
1665 void SystemResourcesComponentBase ::
1677 const U32 idBase = callComp->
getIdBase();
1681 switch (opCode - idBase) {
1706 void SystemResourcesComponentBase ::
1715 compPtr->run_handlerBase(
float F32
32-bit floating point
#define FW_MIN(a, b)
MIN macro.
uint8_t U8
8-bit unsigned integer
#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
#define FW_TLM_STRING_MAX_SIZE
Max size of channelized telemetry string type.
#define FW_LOG_STRING_MAX_SIZE
Max size of log string parameter type.
PlatformIndexType FwIndexType
#define FW_OBJECT_NAMES
Indicates whether or not object names are stored (more memory, can be used for tracking objects)
Enum representing a command response.
@ FORMAT_ERROR
Command failed to deserialize.
@ ACTIVITY_LO
Less important informational events.
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 invoke(FwEventIdType id, Fw::Time &timeTag, const Fw::LogSeverity &severity, Fw::LogBuffer &args)
Invoke a port interface.
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
virtual const CHAR * toChar() const =0
void format(const CHAR *formatString,...)
write formatted string to buffer
virtual SerializeStatus serialize(SerializeBufferBase &buffer) const
serialization function
void unLock()
unlock the mutex
void lock()
lock the mutex
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 tlmWrite_FRAMEWORK_VERSION(const Fw::StringBase &arg, Fw::Time _tlmTime=Fw::Time())
void set_Log_OutputPort(FwIndexType portNum, Fw::InputLogPort *port)
Connect port to Log[portNum].
@ 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_FRAMEWORK_VERSION
Channel ID for FRAMEWORK_VERSION.
@ 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_PROJECT_VERSION
Channel ID for PROJECT_VERSION.
@ 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.
void tlmWrite_NON_VOLATILE_FREE(U64 arg, Fw::Time _tlmTime=Fw::Time())
void tlmWrite_PROJECT_VERSION(const Fw::StringBase &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())
@ OPCODE_ENABLE
A command to enable or disable system resource telemetry.
@ OPCODE_VERSION
Report version as EVR.
FwIndexType getNum_CmdStatus_OutputPorts() const
void ENABLE_cmdHandlerBase(FwOpcodeType opCode, U32 cmdSeq, Fw::CmdArgBuffer &args)
void log_ACTIVITY_LO_FRAMEWORK_VERSION(const Fw::StringBase &version)
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)
virtual void VERSION_cmdHandler(FwOpcodeType opCode, U32 cmdSeq)=0
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())
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 VERSION_cmdHandlerBase(FwOpcodeType opCode, U32 cmdSeq, Fw::CmdArgBuffer &args)
void tlmWrite_CPU_03(F32 arg, Fw::Time _tlmTime=Fw::Time())
@ EVENTID_FRAMEWORK_VERSION
Version of the git repository.
@ EVENTID_PROJECT_VERSION
Version of the git repository.
void log_ACTIVITY_LO_PROJECT_VERSION(const Fw::StringBase &version)
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.