11#if FW_ENABLE_TEXT_LOGGING
21 BUFFERRETURN_BUFFERSEND,
39 class ComponentIpcSerializableBuffer :
54 return sizeof(m_buff);
61 const U8* getBuffAddr()
const {
67 U8 m_buff[SERIALIZATION_SIZE];
76 void FileDownlinkComponentBase ::
88 port < static_cast<PlatformIntType>(this->getNum_cmdIn_InputPorts());
91 this->m_cmdIn_InputPort[port].init();
92 this->m_cmdIn_InputPort[port].addCallComp(
96 this->m_cmdIn_InputPort[port].setPortNum(port);
98#if FW_OBJECT_NAMES == 1
105 char portName[2*FW_OBJ_NAME_MAX_SIZE];
113 this->m_cmdIn_InputPort[port].setObjName(portName);
120 port < static_cast<PlatformIntType>(this->getNum_Run_InputPorts());
123 this->m_Run_InputPort[port].init();
124 this->m_Run_InputPort[port].addCallComp(
128 this->m_Run_InputPort[port].setPortNum(port);
130#if FW_OBJECT_NAMES == 1
137 char portName[2*FW_OBJ_NAME_MAX_SIZE];
145 this->m_Run_InputPort[port].setObjName(portName);
152 port < static_cast<PlatformIntType>(this->getNum_SendFile_InputPorts());
155 this->m_SendFile_InputPort[port].init();
156 this->m_SendFile_InputPort[port].addCallComp(
160 this->m_SendFile_InputPort[port].setPortNum(port);
162#if FW_OBJECT_NAMES == 1
169 char portName[2*FW_OBJ_NAME_MAX_SIZE];
177 this->m_SendFile_InputPort[port].setObjName(portName);
184 port < static_cast<PlatformIntType>(this->getNum_bufferReturn_InputPorts());
187 this->m_bufferReturn_InputPort[port].init();
188 this->m_bufferReturn_InputPort[port].addCallComp(
192 this->m_bufferReturn_InputPort[port].setPortNum(port);
194#if FW_OBJECT_NAMES == 1
201 char portName[2*FW_OBJ_NAME_MAX_SIZE];
209 this->m_bufferReturn_InputPort[port].setObjName(portName);
216 port < static_cast<PlatformIntType>(this->getNum_pingIn_InputPorts());
219 this->m_pingIn_InputPort[port].init();
220 this->m_pingIn_InputPort[port].addCallComp(
224 this->m_pingIn_InputPort[port].setPortNum(port);
226#if FW_OBJECT_NAMES == 1
233 char portName[2*FW_OBJ_NAME_MAX_SIZE];
241 this->m_pingIn_InputPort[port].setObjName(portName);
248 port < static_cast<PlatformIntType>(this->getNum_cmdRegOut_OutputPorts());
251 this->m_cmdRegOut_OutputPort[port].init();
253#if FW_OBJECT_NAMES == 1
260 char portName[2*FW_OBJ_NAME_MAX_SIZE];
268 this->m_cmdRegOut_OutputPort[port].setObjName(portName);
275 port < static_cast<PlatformIntType>(this->getNum_cmdResponseOut_OutputPorts());
278 this->m_cmdResponseOut_OutputPort[port].init();
280#if FW_OBJECT_NAMES == 1
287 char portName[2*FW_OBJ_NAME_MAX_SIZE];
295 this->m_cmdResponseOut_OutputPort[port].setObjName(portName);
302 port < static_cast<PlatformIntType>(this->getNum_eventOut_OutputPorts());
305 this->m_eventOut_OutputPort[port].init();
307#if FW_OBJECT_NAMES == 1
314 char portName[2*FW_OBJ_NAME_MAX_SIZE];
322 this->m_eventOut_OutputPort[port].setObjName(portName);
326#if FW_ENABLE_TEXT_LOGGING == 1
330 port < static_cast<PlatformIntType>(this->getNum_textEventOut_OutputPorts());
333 this->m_textEventOut_OutputPort[port].init();
335#if FW_OBJECT_NAMES == 1
342 char portName[2*FW_OBJ_NAME_MAX_SIZE];
350 this->m_textEventOut_OutputPort[port].setObjName(portName);
358 port < static_cast<PlatformIntType>(this->getNum_timeCaller_OutputPorts());
361 this->m_timeCaller_OutputPort[port].init();
363#if FW_OBJECT_NAMES == 1
370 char portName[2*FW_OBJ_NAME_MAX_SIZE];
378 this->m_timeCaller_OutputPort[port].setObjName(portName);
385 port < static_cast<PlatformIntType>(this->getNum_tlmOut_OutputPorts());
388 this->m_tlmOut_OutputPort[port].init();
390#if FW_OBJECT_NAMES == 1
397 char portName[2*FW_OBJ_NAME_MAX_SIZE];
405 this->m_tlmOut_OutputPort[port].setObjName(portName);
412 port < static_cast<PlatformIntType>(this->getNum_FileComplete_OutputPorts());
415 this->m_FileComplete_OutputPort[port].init();
417#if FW_OBJECT_NAMES == 1
424 char portName[2*FW_OBJ_NAME_MAX_SIZE];
432 this->m_FileComplete_OutputPort[port].setObjName(portName);
439 port < static_cast<PlatformIntType>(this->getNum_bufferSendOut_OutputPorts());
442 this->m_bufferSendOut_OutputPort[port].init();
444#if FW_OBJECT_NAMES == 1
451 char portName[2*FW_OBJ_NAME_MAX_SIZE];
459 this->m_bufferSendOut_OutputPort[port].setObjName(portName);
466 port < static_cast<PlatformIntType>(this->getNum_pingOut_OutputPorts());
469 this->m_pingOut_OutputPort[port].init();
471#if FW_OBJECT_NAMES == 1
478 char portName[2*FW_OBJ_NAME_MAX_SIZE];
486 this->m_pingOut_OutputPort[port].setObjName(portName);
492 ComponentIpcSerializableBuffer::SERIALIZATION_SIZE
76 void FileDownlinkComponentBase :: {
…}
508 portNum < this->getNum_cmdIn_InputPorts(),
512 return &this->m_cmdIn_InputPort[portNum];
523 portNum < this->getNum_Run_InputPorts(),
527 return &this->m_Run_InputPort[portNum];
534 portNum < this->getNum_SendFile_InputPorts(),
538 return &this->m_SendFile_InputPort[portNum];
545 portNum < this->getNum_bufferReturn_InputPorts(),
549 return &this->m_bufferReturn_InputPort[portNum];
556 portNum < this->getNum_pingIn_InputPorts(),
560 return &this->m_pingIn_InputPort[portNum];
567 void FileDownlinkComponentBase ::
568 set_cmdRegOut_OutputPort(
574 portNum < this->getNum_cmdRegOut_OutputPorts(),
578 this->m_cmdRegOut_OutputPort[portNum].addCallPort(port);
567 void FileDownlinkComponentBase :: {
…}
581 void FileDownlinkComponentBase ::
582 set_cmdResponseOut_OutputPort(
588 portNum < this->getNum_cmdResponseOut_OutputPorts(),
592 this->m_cmdResponseOut_OutputPort[portNum].addCallPort(port);
581 void FileDownlinkComponentBase :: {
…}
595 void FileDownlinkComponentBase ::
596 set_eventOut_OutputPort(
602 portNum < this->getNum_eventOut_OutputPorts(),
606 this->m_eventOut_OutputPort[portNum].addCallPort(port);
595 void FileDownlinkComponentBase :: {
…}
609#if FW_ENABLE_TEXT_LOGGING == 1
611 void FileDownlinkComponentBase ::
612 set_textEventOut_OutputPort(
618 portNum < this->getNum_textEventOut_OutputPorts(),
622 this->m_textEventOut_OutputPort[portNum].addCallPort(port);
627 void FileDownlinkComponentBase ::
628 set_timeCaller_OutputPort(
634 portNum < this->getNum_timeCaller_OutputPorts(),
638 this->m_timeCaller_OutputPort[portNum].addCallPort(port);
627 void FileDownlinkComponentBase :: {
…}
641 void FileDownlinkComponentBase ::
642 set_tlmOut_OutputPort(
648 portNum < this->getNum_tlmOut_OutputPorts(),
652 this->m_tlmOut_OutputPort[portNum].addCallPort(port);
641 void FileDownlinkComponentBase :: {
…}
659 void FileDownlinkComponentBase ::
660 set_FileComplete_OutputPort(
666 portNum < this->getNum_FileComplete_OutputPorts(),
670 this->m_FileComplete_OutputPort[portNum].addCallPort(port);
659 void FileDownlinkComponentBase :: {
…}
673 void FileDownlinkComponentBase ::
674 set_bufferSendOut_OutputPort(
680 portNum < this->getNum_bufferSendOut_OutputPorts(),
684 this->m_bufferSendOut_OutputPort[portNum].addCallPort(port);
673 void FileDownlinkComponentBase :: {
…}
687 void FileDownlinkComponentBase ::
688 set_pingOut_OutputPort(
694 portNum < this->getNum_pingOut_OutputPorts(),
698 this->m_pingOut_OutputPort[portNum].addCallPort(port);
687 void FileDownlinkComponentBase :: {
…}
701#if FW_PORT_SERIALIZATION
707 void FileDownlinkComponentBase ::
708 set_cmdRegOut_OutputPort(
710 Fw::InputSerializePort* port
714 portNum < this->getNum_cmdRegOut_OutputPorts(),
718 this->m_cmdRegOut_OutputPort[portNum].registerSerialPort(port);
721 void FileDownlinkComponentBase ::
722 set_cmdResponseOut_OutputPort(
724 Fw::InputSerializePort* port
728 portNum < this->getNum_cmdResponseOut_OutputPorts(),
732 this->m_cmdResponseOut_OutputPort[portNum].registerSerialPort(port);
735 void FileDownlinkComponentBase ::
736 set_eventOut_OutputPort(
738 Fw::InputSerializePort* port
742 portNum < this->getNum_eventOut_OutputPorts(),
746 this->m_eventOut_OutputPort[portNum].registerSerialPort(port);
749#if FW_ENABLE_TEXT_LOGGING == 1
751 void FileDownlinkComponentBase ::
752 set_textEventOut_OutputPort(
754 Fw::InputSerializePort* port
758 portNum < this->getNum_textEventOut_OutputPorts(),
762 this->m_textEventOut_OutputPort[portNum].registerSerialPort(port);
767 void FileDownlinkComponentBase ::
768 set_timeCaller_OutputPort(
770 Fw::InputSerializePort* port
774 portNum < this->getNum_timeCaller_OutputPorts(),
778 this->m_timeCaller_OutputPort[portNum].registerSerialPort(port);
781 void FileDownlinkComponentBase ::
782 set_tlmOut_OutputPort(
784 Fw::InputSerializePort* port
788 portNum < this->getNum_tlmOut_OutputPorts(),
792 this->m_tlmOut_OutputPort[portNum].registerSerialPort(port);
797#if FW_PORT_SERIALIZATION
803 void FileDownlinkComponentBase ::
804 set_FileComplete_OutputPort(
806 Fw::InputSerializePort* port
810 portNum < this->getNum_FileComplete_OutputPorts(),
814 this->m_FileComplete_OutputPort[portNum].registerSerialPort(port);
817 void FileDownlinkComponentBase ::
818 set_bufferSendOut_OutputPort(
820 Fw::InputSerializePort* port
824 portNum < this->getNum_bufferSendOut_OutputPorts(),
828 this->m_bufferSendOut_OutputPort[portNum].registerSerialPort(port);
831 void FileDownlinkComponentBase ::
832 set_pingOut_OutputPort(
834 Fw::InputSerializePort* port
838 portNum < this->getNum_pingOut_OutputPorts(),
842 this->m_pingOut_OutputPort[portNum].registerSerialPort(port);
851 void FileDownlinkComponentBase ::
854 FW_ASSERT(this->m_cmdRegOut_OutputPort[0].isConnected());
856 this->m_cmdRegOut_OutputPort[0].invoke(
857 this->getIdBase() + OPCODE_SENDFILE
860 this->m_cmdRegOut_OutputPort[0].invoke(
861 this->getIdBase() + OPCODE_CANCEL
864 this->m_cmdRegOut_OutputPort[0].invoke(
865 this->getIdBase() + OPCODE_SENDPARTIAL
851 void FileDownlinkComponentBase :: {
…}
873 FileDownlinkComponentBase ::
874 FileDownlinkComponentBase(
const char* compName) :
875 Fw::ActiveComponentBase(compName)
873 FileDownlinkComponentBase :: {
…}
880 FileDownlinkComponentBase ::
881 ~FileDownlinkComponentBase()
880 FileDownlinkComponentBase :: {
…}
891 getNum_cmdIn_InputPorts()
const
901 getNum_Run_InputPorts()
const
907 getNum_SendFile_InputPorts()
const
913 getNum_bufferReturn_InputPorts()
const
919 getNum_pingIn_InputPorts()
const
929 getNum_cmdRegOut_OutputPorts()
const
935 getNum_cmdResponseOut_OutputPorts()
const
941 getNum_eventOut_OutputPorts()
const
946#if FW_ENABLE_TEXT_LOGGING == 1
949 getNum_textEventOut_OutputPorts()
const
957 getNum_timeCaller_OutputPorts()
const
963 getNum_tlmOut_OutputPorts()
const
973 getNum_FileComplete_OutputPorts()
const
979 getNum_bufferSendOut_OutputPorts()
const
985 getNum_pingOut_OutputPorts()
const
994 bool FileDownlinkComponentBase ::
998 portNum < this->getNum_cmdRegOut_OutputPorts(),
1002 return this->m_cmdRegOut_OutputPort[portNum].isConnected();
994 bool FileDownlinkComponentBase :: {
…}
1005 bool FileDownlinkComponentBase ::
1009 portNum < this->getNum_cmdResponseOut_OutputPorts(),
1013 return this->m_cmdResponseOut_OutputPort[portNum].isConnected();
1005 bool FileDownlinkComponentBase :: {
…}
1016 bool FileDownlinkComponentBase ::
1020 portNum < this->getNum_eventOut_OutputPorts(),
1024 return this->m_eventOut_OutputPort[portNum].isConnected();
1016 bool FileDownlinkComponentBase :: {
…}
1027#if FW_ENABLE_TEXT_LOGGING == 1
1029 bool FileDownlinkComponentBase ::
1033 portNum < this->getNum_textEventOut_OutputPorts(),
1037 return this->m_textEventOut_OutputPort[portNum].isConnected();
1042 bool FileDownlinkComponentBase ::
1046 portNum < this->getNum_timeCaller_OutputPorts(),
1050 return this->m_timeCaller_OutputPort[portNum].isConnected();
1042 bool FileDownlinkComponentBase :: {
…}
1053 bool FileDownlinkComponentBase ::
1057 portNum < this->getNum_tlmOut_OutputPorts(),
1061 return this->m_tlmOut_OutputPort[portNum].isConnected();
1053 bool FileDownlinkComponentBase :: {
…}
1068 bool FileDownlinkComponentBase ::
1072 portNum < this->getNum_FileComplete_OutputPorts(),
1076 return this->m_FileComplete_OutputPort[portNum].isConnected();
1068 bool FileDownlinkComponentBase :: {
…}
1079 bool FileDownlinkComponentBase ::
1083 portNum < this->getNum_bufferSendOut_OutputPorts(),
1087 return this->m_bufferSendOut_OutputPort[portNum].isConnected();
1079 bool FileDownlinkComponentBase :: {
…}
1090 bool FileDownlinkComponentBase ::
1094 portNum < this->getNum_pingOut_OutputPorts(),
1098 return this->m_pingOut_OutputPort[portNum].isConnected();
1090 bool FileDownlinkComponentBase :: {
…}
1107 void FileDownlinkComponentBase ::
1115 portNum < this->getNum_Run_InputPorts(),
1124 ComponentIpcSerializableBuffer msg;
1128 _status = msg.serialize(
1137 _status = msg.serialize(portNum);
1144 _status = msg.serialize(context);
1107 void FileDownlinkComponentBase :: {
…}
1161 SendFile_handlerBase(
1171 portNum < this->getNum_SendFile_InputPorts(),
1181 retVal = this->SendFile_handler(
1195 void FileDownlinkComponentBase ::
1196 bufferReturn_handlerBase(
1203 portNum < this->getNum_bufferReturn_InputPorts(),
1208 bufferReturn_preMsgHook(
1212 ComponentIpcSerializableBuffer msg;
1216 _status = msg.serialize(
1225 _status = msg.serialize(portNum);
1232 _status = msg.serialize(fwBuffer);
1195 void FileDownlinkComponentBase :: {
…}
1248 void FileDownlinkComponentBase ::
1256 portNum < this->getNum_pingIn_InputPorts(),
1265 ComponentIpcSerializableBuffer msg;
1269 _status = msg.serialize(
1278 _status = msg.serialize(portNum);
1285 _status = msg.serialize(key);
1248 void FileDownlinkComponentBase :: {
…}
1309 void FileDownlinkComponentBase ::
1309 void FileDownlinkComponentBase :: {
…}
1318 void FileDownlinkComponentBase ::
1319 bufferReturn_preMsgHook(
1318 void FileDownlinkComponentBase :: {
…}
1327 void FileDownlinkComponentBase ::
1327 void FileDownlinkComponentBase :: {
…}
1340 void FileDownlinkComponentBase ::
1347 portNum < this->getNum_FileComplete_OutputPorts(),
1350 this->m_FileComplete_OutputPort[portNum].invoke(
1340 void FileDownlinkComponentBase :: {
…}
1355 void FileDownlinkComponentBase ::
1362 portNum < this->getNum_bufferSendOut_OutputPorts(),
1365 this->m_bufferSendOut_OutputPort[portNum].invoke(
1355 void FileDownlinkComponentBase :: {
…}
1370 void FileDownlinkComponentBase ::
1377 portNum < this->getNum_pingOut_OutputPorts(),
1380 this->m_pingOut_OutputPort[portNum].invoke(
1370 void FileDownlinkComponentBase :: {
…}
1389 void FileDownlinkComponentBase ::
1396 FW_ASSERT(this->m_cmdResponseOut_OutputPort[0].isConnected());
1397 this->m_cmdResponseOut_OutputPort[0].invoke(opCode, cmdSeq, response);
1389 void FileDownlinkComponentBase :: {
…}
1406 void FileDownlinkComponentBase ::
1407 SendFile_cmdHandlerBase(
1414 this->SendFile_preMsgHook(opCode,cmdSeq);
1418 ComponentIpcSerializableBuffer msg;
1431 _status = msg.serialize(port);
1437 _status = msg.serialize(opCode);
1443 _status = msg.serialize(cmdSeq);
1449 _status = msg.serialize(args);
1406 void FileDownlinkComponentBase :: {
…}
1465 void FileDownlinkComponentBase ::
1466 Cancel_cmdHandlerBase(
1473 this->Cancel_preMsgHook(opCode,cmdSeq);
1477 ComponentIpcSerializableBuffer msg;
1490 _status = msg.serialize(port);
1496 _status = msg.serialize(opCode);
1502 _status = msg.serialize(cmdSeq);
1508 _status = msg.serialize(args);
1465 void FileDownlinkComponentBase :: {
…}
1524 void FileDownlinkComponentBase ::
1525 SendPartial_cmdHandlerBase(
1532 this->SendPartial_preMsgHook(opCode,cmdSeq);
1536 ComponentIpcSerializableBuffer msg;
1540 _status = msg.serialize(
static_cast<NATIVE_INT_TYPE>(CMD_SENDPARTIAL));
1549 _status = msg.serialize(port);
1555 _status = msg.serialize(opCode);
1561 _status = msg.serialize(cmdSeq);
1567 _status = msg.serialize(args);
1524 void FileDownlinkComponentBase :: {
…}
1591 void FileDownlinkComponentBase ::
1592 SendFile_preMsgHook(
1591 void FileDownlinkComponentBase :: {
…}
1602 void FileDownlinkComponentBase ::
1602 void FileDownlinkComponentBase :: {
…}
1613 void FileDownlinkComponentBase ::
1614 SendPartial_preMsgHook(
1613 void FileDownlinkComponentBase :: {
…}
1628 void FileDownlinkComponentBase ::
1633 if (this->m_timeCaller_OutputPort[0].isConnected()) {
1634 this->m_timeCaller_OutputPort[0].invoke(_logTime);
1639 _id = this->getIdBase() + EVENTID_FILEOPENERROR;
1642 if (this->m_eventOut_OutputPort[0].isConnected()) {
1646#if FW_AMPCS_COMPATIBLE
1655 _status = fileName.
serialize(_logBuff, 100);
1661 this->m_eventOut_OutputPort[0].invoke(
1670#if FW_ENABLE_TEXT_LOGGING
1671 if (this->m_textEventOut_OutputPort[0].isConnected()) {
1672#if FW_OBJECT_NAMES == 1
1673 const char* _formatString =
1674 "(%s) %s: Could not open file %s";
1676 const char* _formatString =
1677 "%s: Could not open file %s";
1696 this->m_textEventOut_OutputPort[0].invoke(
1628 void FileDownlinkComponentBase :: {
…}
1706 void FileDownlinkComponentBase ::
1707 log_WARNING_HI_FileReadError(
1714 if (this->m_timeCaller_OutputPort[0].isConnected()) {
1715 this->m_timeCaller_OutputPort[0].invoke(_logTime);
1720 _id = this->getIdBase() + EVENTID_FILEREADERROR;
1723 if (this->m_eventOut_OutputPort[0].isConnected()) {
1727#if FW_AMPCS_COMPATIBLE
1736 _status = fileName.
serialize(_logBuff, 100);
1742#if FW_AMPCS_COMPATIBLE
1745 static_cast<U8>(
sizeof(I32))
1758 this->m_eventOut_OutputPort[0].invoke(
1767#if FW_ENABLE_TEXT_LOGGING
1768 if (this->m_textEventOut_OutputPort[0].isConnected()) {
1769#if FW_OBJECT_NAMES == 1
1770 const char* _formatString =
1771 "(%s) %s: Could not read file %s with status %" PRIi32
"";
1773 const char* _formatString =
1774 "%s: Could not read file %s with status %" PRIi32
"";
1794 this->m_textEventOut_OutputPort[0].invoke(
1706 void FileDownlinkComponentBase :: {
…}
1804 void FileDownlinkComponentBase ::
1805 log_ACTIVITY_HI_FileSent(
1812 if (this->m_timeCaller_OutputPort[0].isConnected()) {
1813 this->m_timeCaller_OutputPort[0].invoke(_logTime);
1818 _id = this->getIdBase() + EVENTID_FILESENT;
1821 if (this->m_eventOut_OutputPort[0].isConnected()) {
1825#if FW_AMPCS_COMPATIBLE
1834 _status = sourceFileName.
serialize(_logBuff, 100);
1840 _status = destFileName.
serialize(_logBuff, 100);
1846 this->m_eventOut_OutputPort[0].invoke(
1855#if FW_ENABLE_TEXT_LOGGING
1856 if (this->m_textEventOut_OutputPort[0].isConnected()) {
1857#if FW_OBJECT_NAMES == 1
1858 const char* _formatString =
1859 "(%s) %s: Sent file %s to file %s";
1861 const char* _formatString =
1862 "%s: Sent file %s to file %s";
1882 this->m_textEventOut_OutputPort[0].invoke(
1804 void FileDownlinkComponentBase :: {
…}
1892 void FileDownlinkComponentBase ::
1893 log_ACTIVITY_HI_DownlinkCanceled(
1900 if (this->m_timeCaller_OutputPort[0].isConnected()) {
1901 this->m_timeCaller_OutputPort[0].invoke(_logTime);
1906 _id = this->getIdBase() + EVENTID_DOWNLINKCANCELED;
1909 if (this->m_eventOut_OutputPort[0].isConnected()) {
1913#if FW_AMPCS_COMPATIBLE
1922 _status = sourceFileName.
serialize(_logBuff, 100);
1928 _status = destFileName.
serialize(_logBuff, 100);
1934 this->m_eventOut_OutputPort[0].invoke(
1943#if FW_ENABLE_TEXT_LOGGING
1944 if (this->m_textEventOut_OutputPort[0].isConnected()) {
1945#if FW_OBJECT_NAMES == 1
1946 const char* _formatString =
1947 "(%s) %s: Canceled downlink of file %s to file %s";
1949 const char* _formatString =
1950 "%s: Canceled downlink of file %s to file %s";
1962 "DownlinkCanceled ",
1970 this->m_textEventOut_OutputPort[0].invoke(
1892 void FileDownlinkComponentBase :: {
…}
1980 void FileDownlinkComponentBase ::
1981 log_WARNING_HI_DownlinkTimeout(
1988 if (this->m_timeCaller_OutputPort[0].isConnected()) {
1989 this->m_timeCaller_OutputPort[0].invoke(_logTime);
1994 _id = this->getIdBase() + EVENTID_DOWNLINKTIMEOUT;
1997 if (this->m_eventOut_OutputPort[0].isConnected()) {
2001#if FW_AMPCS_COMPATIBLE
2010 _status = sourceFileName.
serialize(_logBuff, 100);
2016 _status = destFileName.
serialize(_logBuff, 100);
2022 this->m_eventOut_OutputPort[0].invoke(
2031#if FW_ENABLE_TEXT_LOGGING
2032 if (this->m_textEventOut_OutputPort[0].isConnected()) {
2033#if FW_OBJECT_NAMES == 1
2034 const char* _formatString =
2035 "(%s) %s: Timeout occurred during downlink of file %s to file %s. Downlink has been canceled.";
2037 const char* _formatString =
2038 "%s: Timeout occurred during downlink of file %s to file %s. Downlink has been canceled.";
2058 this->m_textEventOut_OutputPort[0].invoke(
1980 void FileDownlinkComponentBase :: {
…}
2068 void FileDownlinkComponentBase ::
2069 log_WARNING_LO_DownlinkPartialWarning(
2079 if (this->m_timeCaller_OutputPort[0].isConnected()) {
2080 this->m_timeCaller_OutputPort[0].invoke(_logTime);
2085 _id = this->getIdBase() + EVENTID_DOWNLINKPARTIALWARNING;
2088 if (this->m_eventOut_OutputPort[0].isConnected()) {
2092#if FW_AMPCS_COMPATIBLE
2101#if FW_AMPCS_COMPATIBLE
2104 static_cast<U8>(
sizeof(U32))
2111 _status = _logBuff.
serialize(startOffset);
2117#if FW_AMPCS_COMPATIBLE
2120 static_cast<U8>(
sizeof(U32))
2133#if FW_AMPCS_COMPATIBLE
2136 static_cast<U8>(
sizeof(U32))
2149 _status = sourceFileName.
serialize(_logBuff, 100);
2155 _status = destFileName.
serialize(_logBuff, 100);
2161 this->m_eventOut_OutputPort[0].invoke(
2170#if FW_ENABLE_TEXT_LOGGING
2171 if (this->m_textEventOut_OutputPort[0].isConnected()) {
2172#if FW_OBJECT_NAMES == 1
2173 const char* _formatString =
2174 "(%s) %s: Offset %" PRIu32
" plus length %" PRIu32
" is greater than source size %" PRIu32
" for partial downlink of file %s to file %s. ";
2176 const char* _formatString =
2177 "%s: Offset %" PRIu32
" plus length %" PRIu32
" is greater than source size %" PRIu32
" for partial downlink of file %s to file %s. ";
2189 "DownlinkPartialWarning ",
2200 this->m_textEventOut_OutputPort[0].invoke(
2068 void FileDownlinkComponentBase :: {
…}
2210 void FileDownlinkComponentBase ::
2211 log_WARNING_HI_DownlinkPartialFail(
2220 if (this->m_timeCaller_OutputPort[0].isConnected()) {
2221 this->m_timeCaller_OutputPort[0].invoke(_logTime);
2226 _id = this->getIdBase() + EVENTID_DOWNLINKPARTIALFAIL;
2229 if (this->m_eventOut_OutputPort[0].isConnected()) {
2233#if FW_AMPCS_COMPATIBLE
2242 _status = sourceFileName.
serialize(_logBuff, 100);
2248 _status = destFileName.
serialize(_logBuff, 100);
2254#if FW_AMPCS_COMPATIBLE
2257 static_cast<U8>(
sizeof(U32))
2264 _status = _logBuff.
serialize(startOffset);
2270#if FW_AMPCS_COMPATIBLE
2273 static_cast<U8>(
sizeof(U32))
2286 this->m_eventOut_OutputPort[0].invoke(
2295#if FW_ENABLE_TEXT_LOGGING
2296 if (this->m_textEventOut_OutputPort[0].isConnected()) {
2297#if FW_OBJECT_NAMES == 1
2298 const char* _formatString =
2299 "(%s) %s: Error occurred during partial downlink of file %s to file %s. Offset %" PRIu32
" greater than or equal to source filesize %" PRIu32
".";
2301 const char* _formatString =
2302 "%s: Error occurred during partial downlink of file %s to file %s. Offset %" PRIu32
" greater than or equal to source filesize %" PRIu32
".";
2314 "DownlinkPartialFail ",
2324 this->m_textEventOut_OutputPort[0].invoke(
2210 void FileDownlinkComponentBase :: {
…}
2334 void FileDownlinkComponentBase ::
2335 log_WARNING_HI_SendDataFail(
2342 if (this->m_timeCaller_OutputPort[0].isConnected()) {
2343 this->m_timeCaller_OutputPort[0].invoke(_logTime);
2348 _id = this->getIdBase() + EVENTID_SENDDATAFAIL;
2351 if (this->m_eventOut_OutputPort[0].isConnected()) {
2355#if FW_AMPCS_COMPATIBLE
2364 _status = sourceFileName.
serialize(_logBuff, 100);
2370#if FW_AMPCS_COMPATIBLE
2373 static_cast<U8>(
sizeof(U32))
2380 _status = _logBuff.
serialize(byteOffset);
2386 this->m_eventOut_OutputPort[0].invoke(
2395#if FW_ENABLE_TEXT_LOGGING
2396 if (this->m_textEventOut_OutputPort[0].isConnected()) {
2397#if FW_OBJECT_NAMES == 1
2398 const char* _formatString =
2399 "(%s) %s: Failed to send data packet from file %s at byte offset %" PRIu32
".";
2401 const char* _formatString =
2402 "%s: Failed to send data packet from file %s at byte offset %" PRIu32
".";
2422 this->m_textEventOut_OutputPort[0].invoke(
2334 void FileDownlinkComponentBase :: {
…}
2432 void FileDownlinkComponentBase ::
2433 log_ACTIVITY_HI_SendStarted(
2441 if (this->m_timeCaller_OutputPort[0].isConnected()) {
2442 this->m_timeCaller_OutputPort[0].invoke(_logTime);
2447 _id = this->getIdBase() + EVENTID_SENDSTARTED;
2450 if (this->m_eventOut_OutputPort[0].isConnected()) {
2454#if FW_AMPCS_COMPATIBLE
2463#if FW_AMPCS_COMPATIBLE
2466 static_cast<U8>(
sizeof(U32))
2479 _status = sourceFileName.
serialize(_logBuff, 100);
2485 _status = destFileName.
serialize(_logBuff, 100);
2491 this->m_eventOut_OutputPort[0].invoke(
2500#if FW_ENABLE_TEXT_LOGGING
2501 if (this->m_textEventOut_OutputPort[0].isConnected()) {
2502#if FW_OBJECT_NAMES == 1
2503 const char* _formatString =
2504 "(%s) %s: Downlink of %" PRIu32
" bytes started from %s to %s";
2506 const char* _formatString =
2507 "%s: Downlink of %" PRIu32
" bytes started from %s to %s";
2528 this->m_textEventOut_OutputPort[0].invoke(
2432 void FileDownlinkComponentBase :: {
…}
2542 void FileDownlinkComponentBase ::
2548 if (this->m_tlmOut_OutputPort[0].isConnected()) {
2550 this->m_timeCaller_OutputPort[0].isConnected() &&
2553 this->m_timeCaller_OutputPort[0].invoke(_tlmTime);
2565 _id = this->getIdBase() + CHANNELID_FILESSENT;
2567 this->m_tlmOut_OutputPort[0].invoke(
2542 void FileDownlinkComponentBase :: {
…}
2575 void FileDownlinkComponentBase ::
2576 tlmWrite_PacketsSent(
2581 if (this->m_tlmOut_OutputPort[0].isConnected()) {
2583 this->m_timeCaller_OutputPort[0].isConnected() &&
2586 this->m_timeCaller_OutputPort[0].invoke(_tlmTime);
2598 _id = this->getIdBase() + CHANNELID_PACKETSSENT;
2600 this->m_tlmOut_OutputPort[0].invoke(
2575 void FileDownlinkComponentBase :: {
…}
2608 void FileDownlinkComponentBase ::
2614 if (this->m_tlmOut_OutputPort[0].isConnected()) {
2616 this->m_timeCaller_OutputPort[0].isConnected() &&
2619 this->m_timeCaller_OutputPort[0].invoke(_tlmTime);
2631 _id = this->getIdBase() + CHANNELID_WARNINGS;
2633 this->m_tlmOut_OutputPort[0].invoke(
2608 void FileDownlinkComponentBase :: {
…}
2648 if (this->m_timeCaller_OutputPort[0].isConnected()) {
2650 this->m_timeCaller_OutputPort[0].invoke(_time);
2665 void FileDownlinkComponentBase ::
2668 this->m_guardedPortMutex.lock();
2665 void FileDownlinkComponentBase :: {
…}
2671 void FileDownlinkComponentBase ::
2674 this->m_guardedPortMutex.unLock();
2671 void FileDownlinkComponentBase :: {
…}
2684 ComponentIpcSerializableBuffer msg;
2707 MsgTypeEnum msgType =
static_cast<MsgTypeEnum
>(desMsg);
2709 if (msgType == FILEDOWNLINK_COMPONENT_EXIT) {
2710 return MSG_DISPATCH_EXIT;
2714 deserStatus = msg.deserialize(portNum);
2725 deserStatus = msg.deserialize(context);
2740 case BUFFERRETURN_BUFFERSEND: {
2743 deserStatus = msg.deserialize(fwBuffer);
2749 this->bufferReturn_handler(
2761 deserStatus = msg.deserialize(key);
2767 this->pingIn_handler(
2776 case CMD_SENDFILE: {
2779 deserStatus = msg.deserialize(opCode);
2787 deserStatus = msg.deserialize(cmdSeq);
2795 deserStatus = msg.deserialize(args);
2808 if (this->m_cmdResponseOut_OutputPort[0].isConnected()) {
2809 this->cmdResponse_out(
2823 if (this->m_cmdResponseOut_OutputPort[0].isConnected()) {
2824 this->cmdResponse_out(
2836#if FW_CMD_CHECK_RESIDUAL
2838 if (this->m_cmdResponseOut_OutputPort[0].isConnected()) {
2847 this->SendFile_cmdHandler(
2860 deserStatus = msg.deserialize(opCode);
2868 deserStatus = msg.deserialize(cmdSeq);
2876 deserStatus = msg.deserialize(args);
2887#if FW_CMD_CHECK_RESIDUAL
2889 if (this->m_cmdResponseOut_OutputPort[0].isConnected()) {
2898 this->Cancel_cmdHandler(opCode, cmdSeq);
2904 case CMD_SENDPARTIAL: {
2907 deserStatus = msg.deserialize(opCode);
2915 deserStatus = msg.deserialize(cmdSeq);
2923 deserStatus = msg.deserialize(args);
2936 if (this->m_cmdResponseOut_OutputPort[0].isConnected()) {
2937 this->cmdResponse_out(
2951 if (this->m_cmdResponseOut_OutputPort[0].isConnected()) {
2952 this->cmdResponse_out(
2966 if (this->m_cmdResponseOut_OutputPort[0].isConnected()) {
2967 this->cmdResponse_out(
2981 if (this->m_cmdResponseOut_OutputPort[0].isConnected()) {
2982 this->cmdResponse_out(
2994#if FW_CMD_CHECK_RESIDUAL
2996 if (this->m_cmdResponseOut_OutputPort[0].isConnected()) {
3005 this->SendPartial_cmdHandler(
3017 return MSG_DISPATCH_ERROR;
3020 return MSG_DISPATCH_OK;
3027 void FileDownlinkComponentBase ::
3037 FileDownlinkComponentBase* compPtr =
static_cast<FileDownlinkComponentBase*
>(callComp);
3039 const U32 idBase = callComp->
getIdBase();
3040 FW_ASSERT(opCode >= idBase, opCode, idBase);
3043 switch (opCode - idBase) {
3044 case OPCODE_SENDFILE: {
3045 compPtr->SendFile_cmdHandlerBase(
3053 case OPCODE_CANCEL: {
3054 compPtr->Cancel_cmdHandlerBase(
3062 case OPCODE_SENDPARTIAL: {
3063 compPtr->SendPartial_cmdHandlerBase(
3077 void FileDownlinkComponentBase ::
3085 FileDownlinkComponentBase* compPtr =
static_cast<FileDownlinkComponentBase*
>(callComp);
3086 compPtr->Run_handlerBase(
3103 FileDownlinkComponentBase* compPtr =
static_cast<FileDownlinkComponentBase*
>(callComp);
3104 return compPtr->SendFile_handlerBase(
3113 void FileDownlinkComponentBase ::
3114 m_p_bufferReturn_in(
3121 FileDownlinkComponentBase* compPtr =
static_cast<FileDownlinkComponentBase*
>(callComp);
3122 compPtr->bufferReturn_handlerBase(
3128 void FileDownlinkComponentBase ::
3136 FileDownlinkComponentBase* compPtr =
static_cast<FileDownlinkComponentBase*
>(callComp);
3137 compPtr->pingIn_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)
@ ACTIVE_COMPONENT_EXIT
message to exit active component task
Enum representing a command response.
@ FORMAT_ERROR
Command failed to deserialize.
@ WARNING_HI
A serious but recoverable event.
@ ACTIVITY_HI
Important informational events.
@ WARNING_LO
A less serious but recoverable event.
const char * toChar() const override
SerializeStatus serialize(SerializeBufferBase &buffer) const override
serialization function
void init()
Object initializer.
NATIVE_UINT_TYPE getBuffLeft() const
returns how much deserialization buffer is left
void resetDeser()
reset deserialization to beginning
SerializeStatus deserialize(U8 &val)
deserialize 8-bit unsigned int
SerializeStatus serialize(U8 val)
serialize 8-bit unsigned int
@ QUEUE_OK
message sent/received okay
@ QUEUE_BLOCKING
Queue receive blocks until a message arrives.
@ QUEUE_NONBLOCKING
Queue receive always returns even if there is no message.
Send file response struct.
SerializeStatus
forward declaration for string
@ FW_SERIALIZE_OK
Serialization/Deserialization operation was successful.