11#if FW_ENABLE_TEXT_LOGGING
28 class ComponentIpcSerializableBuffer :
43 return sizeof(m_buff);
50 const U8* getBuffAddr()
const {
56 U8 m_buff[SERIALIZATION_SIZE];
65 void GroundInterfaceComponentBase ::
74 port < static_cast<PlatformIntType>(this->getNum_downlinkPort_InputPorts());
77 this->m_downlinkPort_InputPort[port].init();
78 this->m_downlinkPort_InputPort[port].addCallComp(
82 this->m_downlinkPort_InputPort[port].setPortNum(port);
84#if FW_OBJECT_NAMES == 1
93 this->m_downlinkPort_InputPort[port].setObjName(portName);
100 port < static_cast<PlatformIntType>(this->getNum_fileDownlinkBufferSendIn_InputPorts());
103 this->m_fileDownlinkBufferSendIn_InputPort[port].init();
104 this->m_fileDownlinkBufferSendIn_InputPort[port].addCallComp(
106 m_p_fileDownlinkBufferSendIn_in
108 this->m_fileDownlinkBufferSendIn_InputPort[port].setPortNum(port);
110#if FW_OBJECT_NAMES == 1
119 this->m_fileDownlinkBufferSendIn_InputPort[port].setObjName(portName);
126 port < static_cast<PlatformIntType>(this->getNum_readCallback_InputPorts());
129 this->m_readCallback_InputPort[port].init();
130 this->m_readCallback_InputPort[port].addCallComp(
134 this->m_readCallback_InputPort[port].setPortNum(port);
136#if FW_OBJECT_NAMES == 1
145 this->m_readCallback_InputPort[port].setObjName(portName);
152 port < static_cast<PlatformIntType>(this->getNum_schedIn_InputPorts());
155 this->m_schedIn_InputPort[port].init();
156 this->m_schedIn_InputPort[port].addCallComp(
160 this->m_schedIn_InputPort[port].setPortNum(port);
162#if FW_OBJECT_NAMES == 1
171 this->m_schedIn_InputPort[port].setObjName(portName);
178 port < static_cast<PlatformIntType>(this->getNum_Log_OutputPorts());
181 this->m_Log_OutputPort[port].init();
183#if FW_OBJECT_NAMES == 1
192 this->m_Log_OutputPort[port].setObjName(portName);
196#if FW_ENABLE_TEXT_LOGGING == 1
200 port < static_cast<PlatformIntType>(this->getNum_LogText_OutputPorts());
203 this->m_LogText_OutputPort[port].init();
205#if FW_OBJECT_NAMES == 1
214 this->m_LogText_OutputPort[port].setObjName(portName);
222 port < static_cast<PlatformIntType>(this->getNum_Time_OutputPorts());
225 this->m_Time_OutputPort[port].init();
227#if FW_OBJECT_NAMES == 1
236 this->m_Time_OutputPort[port].setObjName(portName);
243 port < static_cast<PlatformIntType>(this->getNum_fileDownlinkBufferSendOut_OutputPorts());
246 this->m_fileDownlinkBufferSendOut_OutputPort[port].init();
248#if FW_OBJECT_NAMES == 1
257 this->m_fileDownlinkBufferSendOut_OutputPort[port].setObjName(portName);
264 port < static_cast<PlatformIntType>(this->getNum_fileUplinkBufferGet_OutputPorts());
267 this->m_fileUplinkBufferGet_OutputPort[port].init();
269#if FW_OBJECT_NAMES == 1
278 this->m_fileUplinkBufferGet_OutputPort[port].setObjName(portName);
285 port < static_cast<PlatformIntType>(this->getNum_fileUplinkBufferSendOut_OutputPorts());
288 this->m_fileUplinkBufferSendOut_OutputPort[port].init();
290#if FW_OBJECT_NAMES == 1
299 this->m_fileUplinkBufferSendOut_OutputPort[port].setObjName(portName);
306 port < static_cast<PlatformIntType>(this->getNum_readPoll_OutputPorts());
309 this->m_readPoll_OutputPort[port].init();
311#if FW_OBJECT_NAMES == 1
320 this->m_readPoll_OutputPort[port].setObjName(portName);
327 port < static_cast<PlatformIntType>(this->getNum_uplinkPort_OutputPorts());
330 this->m_uplinkPort_OutputPort[port].init();
332#if FW_OBJECT_NAMES == 1
341 this->m_uplinkPort_OutputPort[port].setObjName(portName);
348 port < static_cast<PlatformIntType>(this->getNum_write_OutputPorts());
351 this->m_write_OutputPort[port].init();
353#if FW_OBJECT_NAMES == 1
362 this->m_write_OutputPort[port].setObjName(portName);
65 void GroundInterfaceComponentBase :: {
…}
375 portNum < this->getNum_downlinkPort_InputPorts(),
379 return &this->m_downlinkPort_InputPort[portNum];
386 portNum < this->getNum_fileDownlinkBufferSendIn_InputPorts(),
390 return &this->m_fileDownlinkBufferSendIn_InputPort[portNum];
397 portNum < this->getNum_readCallback_InputPorts(),
401 return &this->m_readCallback_InputPort[portNum];
408 portNum < this->getNum_schedIn_InputPorts(),
412 return &this->m_schedIn_InputPort[portNum];
419 void GroundInterfaceComponentBase ::
426 portNum < this->getNum_Log_OutputPorts(),
430 this->m_Log_OutputPort[portNum].addCallPort(port);
419 void GroundInterfaceComponentBase :: {
…}
433#if FW_ENABLE_TEXT_LOGGING == 1
435 void GroundInterfaceComponentBase ::
436 set_LogText_OutputPort(
442 portNum < this->getNum_LogText_OutputPorts(),
446 this->m_LogText_OutputPort[portNum].addCallPort(port);
451 void GroundInterfaceComponentBase ::
458 portNum < this->getNum_Time_OutputPorts(),
462 this->m_Time_OutputPort[portNum].addCallPort(port);
451 void GroundInterfaceComponentBase :: {
…}
469 void GroundInterfaceComponentBase ::
470 set_fileDownlinkBufferSendOut_OutputPort(
476 portNum < this->getNum_fileDownlinkBufferSendOut_OutputPorts(),
480 this->m_fileDownlinkBufferSendOut_OutputPort[portNum].addCallPort(port);
469 void GroundInterfaceComponentBase :: {
…}
483 void GroundInterfaceComponentBase ::
484 set_fileUplinkBufferGet_OutputPort(
490 portNum < this->getNum_fileUplinkBufferGet_OutputPorts(),
494 this->m_fileUplinkBufferGet_OutputPort[portNum].addCallPort(port);
483 void GroundInterfaceComponentBase :: {
…}
497 void GroundInterfaceComponentBase ::
498 set_fileUplinkBufferSendOut_OutputPort(
504 portNum < this->getNum_fileUplinkBufferSendOut_OutputPorts(),
508 this->m_fileUplinkBufferSendOut_OutputPort[portNum].addCallPort(port);
497 void GroundInterfaceComponentBase :: {
…}
511 void GroundInterfaceComponentBase ::
512 set_readPoll_OutputPort(
518 portNum < this->getNum_readPoll_OutputPorts(),
522 this->m_readPoll_OutputPort[portNum].addCallPort(port);
511 void GroundInterfaceComponentBase :: {
…}
525 void GroundInterfaceComponentBase ::
526 set_uplinkPort_OutputPort(
532 portNum < this->getNum_uplinkPort_OutputPorts(),
536 this->m_uplinkPort_OutputPort[portNum].addCallPort(port);
525 void GroundInterfaceComponentBase :: {
…}
539 void GroundInterfaceComponentBase ::
540 set_write_OutputPort(
546 portNum < this->getNum_write_OutputPorts(),
550 this->m_write_OutputPort[portNum].addCallPort(port);
539 void GroundInterfaceComponentBase :: {
…}
553#if FW_PORT_SERIALIZATION
559 void GroundInterfaceComponentBase ::
562 Fw::InputSerializePort* port
566 portNum < this->getNum_Log_OutputPorts(),
570 this->m_Log_OutputPort[portNum].registerSerialPort(port);
573#if FW_ENABLE_TEXT_LOGGING == 1
575 void GroundInterfaceComponentBase ::
576 set_LogText_OutputPort(
578 Fw::InputSerializePort* port
582 portNum < this->getNum_LogText_OutputPorts(),
586 this->m_LogText_OutputPort[portNum].registerSerialPort(port);
591 void GroundInterfaceComponentBase ::
594 Fw::InputSerializePort* port
598 portNum < this->getNum_Time_OutputPorts(),
602 this->m_Time_OutputPort[portNum].registerSerialPort(port);
607#if FW_PORT_SERIALIZATION
613 void GroundInterfaceComponentBase ::
614 set_fileDownlinkBufferSendOut_OutputPort(
616 Fw::InputSerializePort* port
620 portNum < this->getNum_fileDownlinkBufferSendOut_OutputPorts(),
624 this->m_fileDownlinkBufferSendOut_OutputPort[portNum].registerSerialPort(port);
627 void GroundInterfaceComponentBase ::
628 set_fileUplinkBufferSendOut_OutputPort(
630 Fw::InputSerializePort* port
634 portNum < this->getNum_fileUplinkBufferSendOut_OutputPorts(),
638 this->m_fileUplinkBufferSendOut_OutputPort[portNum].registerSerialPort(port);
641 void GroundInterfaceComponentBase ::
642 set_readPoll_OutputPort(
644 Fw::InputSerializePort* port
648 portNum < this->getNum_readPoll_OutputPorts(),
652 this->m_readPoll_OutputPort[portNum].registerSerialPort(port);
655 void GroundInterfaceComponentBase ::
656 set_uplinkPort_OutputPort(
658 Fw::InputSerializePort* port
662 portNum < this->getNum_uplinkPort_OutputPorts(),
666 this->m_uplinkPort_OutputPort[portNum].registerSerialPort(port);
669 void GroundInterfaceComponentBase ::
670 set_write_OutputPort(
672 Fw::InputSerializePort* port
676 portNum < this->getNum_write_OutputPorts(),
680 this->m_write_OutputPort[portNum].registerSerialPort(port);
689 GroundInterfaceComponentBase ::
690 GroundInterfaceComponentBase(
const char* compName) :
691 Fw::PassiveComponentBase(compName)
689 GroundInterfaceComponentBase :: {
…}
696 GroundInterfaceComponentBase ::
697 ~GroundInterfaceComponentBase()
696 GroundInterfaceComponentBase :: {
…}
707 getNum_downlinkPort_InputPorts()
713 getNum_fileDownlinkBufferSendIn_InputPorts()
719 getNum_readCallback_InputPorts()
725 getNum_schedIn_InputPorts()
735 getNum_Log_OutputPorts()
740#if FW_ENABLE_TEXT_LOGGING == 1
743 getNum_LogText_OutputPorts()
751 getNum_Time_OutputPorts()
761 getNum_fileDownlinkBufferSendOut_OutputPorts()
767 getNum_fileUplinkBufferGet_OutputPorts()
773 getNum_fileUplinkBufferSendOut_OutputPorts()
779 getNum_readPoll_OutputPorts()
785 getNum_uplinkPort_OutputPorts()
791 getNum_write_OutputPorts()
800 bool GroundInterfaceComponentBase ::
804 portNum < this->getNum_Log_OutputPorts(),
808 return this->m_Log_OutputPort[portNum].isConnected();
800 bool GroundInterfaceComponentBase :: {
…}
811#if FW_ENABLE_TEXT_LOGGING == 1
813 bool GroundInterfaceComponentBase ::
817 portNum < this->getNum_LogText_OutputPorts(),
821 return this->m_LogText_OutputPort[portNum].isConnected();
826 bool GroundInterfaceComponentBase ::
830 portNum < this->getNum_Time_OutputPorts(),
834 return this->m_Time_OutputPort[portNum].isConnected();
826 bool GroundInterfaceComponentBase :: {
…}
841 bool GroundInterfaceComponentBase ::
842 isConnected_fileDownlinkBufferSendOut_OutputPort(
NATIVE_INT_TYPE portNum)
845 portNum < this->getNum_fileDownlinkBufferSendOut_OutputPorts(),
849 return this->m_fileDownlinkBufferSendOut_OutputPort[portNum].isConnected();
841 bool GroundInterfaceComponentBase :: {
…}
852 bool GroundInterfaceComponentBase ::
856 portNum < this->getNum_fileUplinkBufferGet_OutputPorts(),
860 return this->m_fileUplinkBufferGet_OutputPort[portNum].isConnected();
852 bool GroundInterfaceComponentBase :: {
…}
863 bool GroundInterfaceComponentBase ::
864 isConnected_fileUplinkBufferSendOut_OutputPort(
NATIVE_INT_TYPE portNum)
867 portNum < this->getNum_fileUplinkBufferSendOut_OutputPorts(),
871 return this->m_fileUplinkBufferSendOut_OutputPort[portNum].isConnected();
863 bool GroundInterfaceComponentBase :: {
…}
874 bool GroundInterfaceComponentBase ::
878 portNum < this->getNum_readPoll_OutputPorts(),
882 return this->m_readPoll_OutputPort[portNum].isConnected();
874 bool GroundInterfaceComponentBase :: {
…}
885 bool GroundInterfaceComponentBase ::
889 portNum < this->getNum_uplinkPort_OutputPorts(),
893 return this->m_uplinkPort_OutputPort[portNum].isConnected();
885 bool GroundInterfaceComponentBase :: {
…}
896 bool GroundInterfaceComponentBase ::
900 portNum < this->getNum_write_OutputPorts(),
904 return this->m_write_OutputPort[portNum].isConnected();
896 bool GroundInterfaceComponentBase :: {
…}
913 void GroundInterfaceComponentBase ::
914 downlinkPort_handlerBase(
922 portNum < this->getNum_downlinkPort_InputPorts(),
930 this->downlinkPort_handler(
913 void GroundInterfaceComponentBase :: {
…}
940 void GroundInterfaceComponentBase ::
941 fileDownlinkBufferSendIn_handlerBase(
948 portNum < this->getNum_fileDownlinkBufferSendIn_InputPorts(),
956 this->fileDownlinkBufferSendIn_handler(
940 void GroundInterfaceComponentBase :: {
…}
965 void GroundInterfaceComponentBase ::
966 readCallback_handlerBase(
973 portNum < this->getNum_readCallback_InputPorts(),
981 this->readCallback_handler(
965 void GroundInterfaceComponentBase :: {
…}
990 void GroundInterfaceComponentBase ::
998 portNum < this->getNum_schedIn_InputPorts(),
1006 this->schedIn_handler(
990 void GroundInterfaceComponentBase :: {
…}
1019 void GroundInterfaceComponentBase ::
1020 fileDownlinkBufferSendOut_out(
1026 portNum < this->getNum_fileDownlinkBufferSendOut_OutputPorts(),
1029 this->m_fileDownlinkBufferSendOut_OutputPort[portNum].invoke(
1019 void GroundInterfaceComponentBase :: {
…}
1035 fileUplinkBufferGet_out(
1041 portNum < this->getNum_fileUplinkBufferGet_OutputPorts(),
1044 return this->m_fileUplinkBufferGet_OutputPort[portNum].invoke(
1049 void GroundInterfaceComponentBase ::
1050 fileUplinkBufferSendOut_out(
1056 portNum < this->getNum_fileUplinkBufferSendOut_OutputPorts(),
1059 this->m_fileUplinkBufferSendOut_OutputPort[portNum].invoke(
1049 void GroundInterfaceComponentBase :: {
…}
1064 void GroundInterfaceComponentBase ::
1071 portNum < this->getNum_readPoll_OutputPorts(),
1074 this->m_readPoll_OutputPort[portNum].invoke(
1064 void GroundInterfaceComponentBase :: {
…}
1079 void GroundInterfaceComponentBase ::
1087 portNum < this->getNum_uplinkPort_OutputPorts(),
1090 this->m_uplinkPort_OutputPort[portNum].invoke(
1079 void GroundInterfaceComponentBase :: {
…}
1096 void GroundInterfaceComponentBase ::
1103 portNum < this->getNum_write_OutputPorts(),
1106 this->m_write_OutputPort[portNum].invoke(
1096 void GroundInterfaceComponentBase :: {
…}
1115 void GroundInterfaceComponentBase ::
1116 log_WARNING_HI_GroundInterfaceError()
1120 if (this->m_Time_OutputPort[0].isConnected()) {
1121 this->m_Time_OutputPort[0].invoke(_logTime);
1126 _id = this->getIdBase() + EVENTID_GROUNDINTERFACEERROR;
1129 if (this->m_Log_OutputPort[0].isConnected()) {
1132#if FW_AMPCS_COMPATIBLE
1142 this->m_Log_OutputPort[0].invoke(
1151#if FW_ENABLE_TEXT_LOGGING
1152 if (this->m_LogText_OutputPort[0].isConnected()) {
1153#if FW_OBJECT_NAMES == 1
1154 const char* _formatString =
1155 "(%s) %s: Ground interface encountered an error";
1157 const char* _formatString =
1158 "%s: Ground interface encountered an error";
1170 "GroundInterfaceError "
1176 this->m_LogText_OutputPort[0].invoke(
1115 void GroundInterfaceComponentBase :: {
…}
1193 if (this->m_Time_OutputPort[0].isConnected()) {
1195 this->m_Time_OutputPort[0].invoke(_time);
1210 void GroundInterfaceComponentBase ::
1213 this->m_guardedPortMutex.lock();
1210 void GroundInterfaceComponentBase :: {
…}
1216 void GroundInterfaceComponentBase ::
1219 this->m_guardedPortMutex.unLock();
1216 void GroundInterfaceComponentBase :: {
…}
1226 void GroundInterfaceComponentBase ::
1227 m_p_downlinkPort_in(
1243 void GroundInterfaceComponentBase ::
1244 m_p_fileDownlinkBufferSendIn_in(
1251 GroundInterfaceComponentBase* compPtr =
static_cast<GroundInterfaceComponentBase*
>(callComp);
1258 void GroundInterfaceComponentBase ::
1259 m_p_readCallback_in(
1266 GroundInterfaceComponentBase* compPtr =
static_cast<GroundInterfaceComponentBase*
>(callComp);
1267 compPtr->readCallback_handlerBase(
1273 void GroundInterfaceComponentBase ::
1281 GroundInterfaceComponentBase* compPtr =
static_cast<GroundInterfaceComponentBase*
>(callComp);
1282 compPtr->schedIn_handlerBase(
PlatformIntType NATIVE_INT_TYPE
uint8_t U8
8-bit unsigned integer
#define FW_NUM_ARRAY_ELEMENTS(a)
number of elements in an array
PlatformUIntType NATIVE_UINT_TYPE
int PlatformIntType
DefaultTypes.hpp provides fallback defaults for the platform types.
#define PRI_PlatformIntType
@ TB_NONE
No time base has been established.
PlatformAssertArgType FwAssertArgType
#define FW_LOG_TEXT_BUFFER_SIZE
Max size of string for text log message.
#define FW_OBJECT_NAMES
Indicates whether or not object names are stored (more memory, can be used for tracking objects)
@ WARNING_HI
A serious but recoverable event.
void init()
Object initializer.
SerializeStatus serialize(U8 val)
serialize 8-bit unsigned int
Auto-generated base for GroundInterface component.
void downlinkPort_handlerBase(NATIVE_INT_TYPE portNum, Fw::ComBuffer &data, U32 context)
Handler base-class function for input port downlinkPort.
void fileDownlinkBufferSendIn_handlerBase(NATIVE_INT_TYPE portNum, Fw::Buffer &fwBuffer)
Handler base-class function for input port fileDownlinkBufferSendIn.
SerializeStatus
forward declaration for string
@ FW_SERIALIZE_OK
Serialization/Deserialization operation was successful.