17 #if FW_ENABLE_TEXT_LOGGING
32 BUFFERSENDIN_BUFFERSEND,
46 class ComponentIpcSerializableBuffer :
61 return sizeof(m_buff);
64 U8* getBuffAddr(
void) {
68 const U8* getBuffAddr(
void)
const {
74 U8 m_buff[SERIALIZATION_SIZE];
88 return &this->m_bufferSendIn_InputPort[
portNum];
109 this->m_timeCaller_OutputPort[
portNum].addCallPort(port);
152 #if FW_ENABLE_TEXT_LOGGING == 1
153 void FileUplinkComponentBase ::
154 set_LogText_OutputPort(
160 this->m_LogText_OutputPort[
portNum].addCallPort(port);
168 #if FW_PORT_SERIALIZATION
173 Fw::InputSerializePort *port
177 return this->m_timeCaller_OutputPort[
portNum].registerSerialPort(port);
183 Fw::InputSerializePort *port
193 Fw::InputSerializePort *port
203 Fw::InputSerializePort *port
213 Fw::InputSerializePort *port
220 #if FW_ENABLE_TEXT_LOGGING == 1
221 void FileUplinkComponentBase ::
222 set_LogText_OutputPort(
224 Fw::InputSerializePort *port
228 return this->m_LogText_OutputPort[
portNum].registerSerialPort(port);
238 FileUplinkComponentBase ::
239 #if FW_OBJECT_NAMES == 1
240 FileUplinkComponentBase(
const char* compName) :
241 Fw::ActiveComponentBase(compName)
243 FileUplinkComponentBase() :
244 Fw::ActiveComponentBase()
249 this->m_FileUplink_FileWriteErrorThrottle = 0;
250 this->m_FileUplink_InvalidReceiveModeThrottle = 0;
251 this->m_FileUplink_PacketOutOfBoundsThrottle = 0;
252 this->m_FileUplink_PacketOutOfOrderThrottle = 0;
269 port < this->getNum_bufferSendIn_InputPorts();
273 this->m_bufferSendIn_InputPort[port].init();
274 this->m_bufferSendIn_InputPort[port].addCallComp(
278 this->m_bufferSendIn_InputPort[port].setPortNum(port);
280 #if FW_OBJECT_NAMES == 1
285 "%s_bufferSendIn_InputPort[%d]",
289 this->m_bufferSendIn_InputPort[port].setObjName(portName);
308 #if FW_OBJECT_NAMES == 1
313 "%s_pingIn_InputPort[%d]",
325 port < this->getNum_timeCaller_OutputPorts();
328 this->m_timeCaller_OutputPort[port].
init();
330 #if FW_OBJECT_NAMES == 1
335 "%s_timeCaller_OutputPort[%d]",
339 this->m_timeCaller_OutputPort[port].setObjName(portName);
352 #if FW_OBJECT_NAMES == 1
357 "%s_bufferSendOut_OutputPort[%d]",
374 #if FW_OBJECT_NAMES == 1
379 "%s_tlmOut_OutputPort[%d]",
396 #if FW_OBJECT_NAMES == 1
401 "%s_eventOut_OutputPort[%d]",
418 #if FW_OBJECT_NAMES == 1
423 "%s_pingOut_OutputPort[%d]",
433 #if FW_ENABLE_TEXT_LOGGING == 1
436 port < this->getNum_LogText_OutputPorts();
439 this->m_LogText_OutputPort[port].
init();
441 #if FW_OBJECT_NAMES == 1
446 "%s_LogText_OutputPort[%d]",
450 this->m_LogText_OutputPort[port].setObjName(portName);
459 ComponentIpcSerializableBuffer::SERIALIZATION_SIZE
477 void FileUplinkComponentBase ::
502 getNum_bufferSendIn_InputPorts(
void)
505 this->m_bufferSendIn_InputPort
510 getNum_timeCaller_OutputPorts(
void)
513 this->m_timeCaller_OutputPort
557 #if FW_ENABLE_TEXT_LOGGING == 1
559 getNum_LogText_OutputPorts(
void)
562 this->m_LogText_OutputPort
571 bool FileUplinkComponentBase ::
575 portNum < this->getNum_timeCaller_OutputPorts(),
578 return this->m_timeCaller_OutputPort[
portNum].isConnected();
621 #if FW_ENABLE_TEXT_LOGGING == 1
622 bool FileUplinkComponentBase ::
626 portNum < this->getNum_LogText_OutputPorts(),
629 return this->m_LogText_OutputPort[
portNum].isConnected();
637 void FileUplinkComponentBase ::
638 tlmWrite_FileUplink_FilesReceived(U32 arg)
643 if (this->m_timeCaller_OutputPort[0].isConnected()) {
644 this->m_timeCaller_OutputPort[0].invoke( _tlmTime);
655 _id = this->
getIdBase() + CHANNELID_FILEUPLINK_FILESRECEIVED;
672 if (this->m_timeCaller_OutputPort[0].isConnected()) {
673 this->m_timeCaller_OutputPort[0].invoke( _tlmTime);
701 if (this->m_timeCaller_OutputPort[0].isConnected()) {
702 this->m_timeCaller_OutputPort[0].invoke( _tlmTime);
731 if (this->m_timeCaller_OutputPort[0].isConnected()) {
733 this->m_timeCaller_OutputPort[0].invoke(_time);
744 void FileUplinkComponentBase ::
745 log_WARNING_HI_FileUplink_BadChecksum(
753 if (this->m_timeCaller_OutputPort[0].isConnected()) {
754 this->m_timeCaller_OutputPort[0].invoke( _logTime);
759 _id = this->
getIdBase() + EVENTID_FILEUPLINK_BADCHECKSUM;
767 #if FW_AMPCS_COMPATIBLE
783 #if FW_AMPCS_COMPATIBLE
800 #if FW_AMPCS_COMPATIBLE
803 static_cast<U8>(
sizeof(
read))
827 #if FW_ENABLE_TEXT_LOGGING
828 if (this->m_LogText_OutputPort[0].isConnected()) {
830 #if FW_OBJECT_NAMES == 1
831 const char* _formatString =
832 "(%s) %s: Bad checksum value during receipt of file %s: computed 0x%08X, read 0x%08X";
834 const char* _formatString =
835 "%s: Bad checksum value during receipt of file %s: computed 0x%08X, read 0x%08X";
847 "FileUplink_BadChecksum "
856 this->m_LogText_OutputPort[0].invoke(
877 if (this->m_timeCaller_OutputPort[0].isConnected()) {
878 this->m_timeCaller_OutputPort[0].invoke( _logTime);
891 #if FW_AMPCS_COMPATIBLE
917 #if FW_ENABLE_TEXT_LOGGING
918 if (this->m_LogText_OutputPort[0].isConnected()) {
920 #if FW_OBJECT_NAMES == 1
921 const char* _formatString =
922 "(%s) %s: Could not open file %s";
924 const char* _formatString =
925 "%s: Could not open file %s";
937 "FileUplink_FileOpenError "
944 this->m_LogText_OutputPort[0].invoke(
965 if (this->m_timeCaller_OutputPort[0].isConnected()) {
966 this->m_timeCaller_OutputPort[0].invoke( _logTime);
979 #if FW_AMPCS_COMPATIBLE
1005 #if FW_ENABLE_TEXT_LOGGING
1006 if (this->m_LogText_OutputPort[0].isConnected()) {
1008 #if FW_OBJECT_NAMES == 1
1009 const char* _formatString =
1010 "(%s) %s: Received file %s";
1012 const char* _formatString =
1013 "%s: Received file %s";
1025 "FileUplink_FileReceived "
1032 this->m_LogText_OutputPort[0].invoke(
1054 this->m_FileUplink_FileWriteErrorThrottle++;
1059 if (this->m_timeCaller_OutputPort[0].isConnected()) {
1060 this->m_timeCaller_OutputPort[0].invoke( _logTime);
1073 #if FW_AMPCS_COMPATIBLE
1099 #if FW_ENABLE_TEXT_LOGGING
1100 if (this->m_LogText_OutputPort[0].isConnected()) {
1102 #if FW_OBJECT_NAMES == 1
1103 const char* _formatString =
1104 "(%s) %s: Could not write to file %s";
1106 const char* _formatString =
1107 "%s: Could not write to file %s";
1119 "FileUplink_FileWriteError "
1126 this->m_LogText_OutputPort[0].invoke(
1139 this->m_FileUplink_FileWriteErrorThrottle = 0;
1144 U32 packetType, U32 mode
1157 if (this->m_timeCaller_OutputPort[0].isConnected()) {
1158 this->m_timeCaller_OutputPort[0].invoke( _logTime);
1171 #if FW_AMPCS_COMPATIBLE
1180 #if FW_AMPCS_COMPATIBLE
1183 static_cast<U8>(
sizeof(packetType))
1191 _status = _logBuff.
serialize(packetType);
1197 #if FW_AMPCS_COMPATIBLE
1200 static_cast<U8>(
sizeof(mode))
1224 #if FW_ENABLE_TEXT_LOGGING
1225 if (this->m_LogText_OutputPort[0].isConnected()) {
1227 #if FW_OBJECT_NAMES == 1
1228 const char* _formatString =
1229 "(%s) %s: Packet type %u received in mode %u";
1231 const char* _formatString =
1232 "%s: Packet type %u received in mode %u";
1244 "FileUplink_InvalidReceiveMode "
1252 this->m_LogText_OutputPort[0].invoke(
1283 if (this->m_timeCaller_OutputPort[0].isConnected()) {
1284 this->m_timeCaller_OutputPort[0].invoke( _logTime);
1297 #if FW_AMPCS_COMPATIBLE
1306 #if FW_AMPCS_COMPATIBLE
1309 static_cast<U8>(
sizeof(packetIndex))
1317 _status = _logBuff.
serialize(packetIndex);
1340 #if FW_ENABLE_TEXT_LOGGING
1341 if (this->m_LogText_OutputPort[0].isConnected()) {
1343 #if FW_OBJECT_NAMES == 1
1344 const char* _formatString =
1345 "(%s) %s: Packet %u out of bounds for file %s";
1347 const char* _formatString =
1348 "%s: Packet %u out of bounds for file %s";
1360 "FileUplink_PacketOutOfBounds "
1368 this->m_LogText_OutputPort[0].invoke(
1386 U32 packetIndex, U32 lastPacketIndex
1399 if (this->m_timeCaller_OutputPort[0].isConnected()) {
1400 this->m_timeCaller_OutputPort[0].invoke( _logTime);
1413 #if FW_AMPCS_COMPATIBLE
1422 #if FW_AMPCS_COMPATIBLE
1425 static_cast<U8>(
sizeof(packetIndex))
1433 _status = _logBuff.
serialize(packetIndex);
1439 #if FW_AMPCS_COMPATIBLE
1442 static_cast<U8>(
sizeof(lastPacketIndex))
1450 _status = _logBuff.
serialize(lastPacketIndex);
1466 #if FW_ENABLE_TEXT_LOGGING
1467 if (this->m_LogText_OutputPort[0].isConnected()) {
1469 #if FW_OBJECT_NAMES == 1
1470 const char* _formatString =
1471 "(%s) %s: Received packet %u after packet %u";
1473 const char* _formatString =
1474 "%s: Received packet %u after packet %u";
1486 "FileUplink_PacketOutOfOrder "
1494 this->m_LogText_OutputPort[0].invoke(
1519 if (this->m_timeCaller_OutputPort[0].isConnected()) {
1520 this->m_timeCaller_OutputPort[0].invoke( _logTime);
1531 #if FW_AMPCS_COMPATIBLE
1534 _zero_status = _logBuff.
serialize(
static_cast<U8>(0));
1551 #if FW_ENABLE_TEXT_LOGGING
1552 if (this->m_LogText_OutputPort[0].isConnected()) {
1554 #if FW_OBJECT_NAMES == 1
1555 const char* _formatString =
1556 "(%s) %s: Received CANCEL packet";
1558 const char* _formatString =
1559 "%s: Received CANCEL packet";
1571 "FileUplink_UplinkCanceled "
1577 this->m_LogText_OutputPort[0].invoke(
1593 void FileUplinkComponentBase ::
1594 m_p_bufferSendIn_in(
1623 void FileUplinkComponentBase ::
1624 bufferSendIn_handlerBase(
1634 bufferSendIn_preMsgHook(
1639 ComponentIpcSerializableBuffer msg;
1642 _status = msg.serialize(
1650 _status = msg.serialize(
portNum);
1692 ComponentIpcSerializableBuffer msg;
1695 _status = msg.serialize(
1703 _status = msg.serialize(
portNum);
1710 _status = msg.serialize(key);
1733 void FileUplinkComponentBase ::
1734 bufferSendIn_preMsgHook(
1759 ComponentIpcSerializableBuffer msg;
1778 MsgTypeEnum msgType =
static_cast<MsgTypeEnum
>(desMsg);
1780 if (msgType == FILEUPLINK_COMPONENT_EXIT) {
1785 deserStatus = msg.deserialize(
portNum);
1794 case BUFFERSENDIN_BUFFERSEND: {
1798 deserStatus = msg.deserialize(
fwBuffer);
1805 this->bufferSendIn_handler(
1819 deserStatus = msg.deserialize(key);