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
107 this->m_cmdIn_InputPort[port].setObjName(portName);
114 port < static_cast<PlatformIntType>(this->getNum_Run_InputPorts());
117 this->m_Run_InputPort[port].init();
118 this->m_Run_InputPort[port].addCallComp(
122 this->m_Run_InputPort[port].setPortNum(port);
124#if FW_OBJECT_NAMES == 1
133 this->m_Run_InputPort[port].setObjName(portName);
140 port < static_cast<PlatformIntType>(this->getNum_SendFile_InputPorts());
143 this->m_SendFile_InputPort[port].init();
144 this->m_SendFile_InputPort[port].addCallComp(
148 this->m_SendFile_InputPort[port].setPortNum(port);
150#if FW_OBJECT_NAMES == 1
159 this->m_SendFile_InputPort[port].setObjName(portName);
166 port < static_cast<PlatformIntType>(this->getNum_bufferReturn_InputPorts());
169 this->m_bufferReturn_InputPort[port].init();
170 this->m_bufferReturn_InputPort[port].addCallComp(
174 this->m_bufferReturn_InputPort[port].setPortNum(port);
176#if FW_OBJECT_NAMES == 1
185 this->m_bufferReturn_InputPort[port].setObjName(portName);
192 port < static_cast<PlatformIntType>(this->getNum_pingIn_InputPorts());
195 this->m_pingIn_InputPort[port].init();
196 this->m_pingIn_InputPort[port].addCallComp(
200 this->m_pingIn_InputPort[port].setPortNum(port);
202#if FW_OBJECT_NAMES == 1
211 this->m_pingIn_InputPort[port].setObjName(portName);
218 port < static_cast<PlatformIntType>(this->getNum_cmdRegOut_OutputPorts());
221 this->m_cmdRegOut_OutputPort[port].init();
223#if FW_OBJECT_NAMES == 1
232 this->m_cmdRegOut_OutputPort[port].setObjName(portName);
239 port < static_cast<PlatformIntType>(this->getNum_cmdResponseOut_OutputPorts());
242 this->m_cmdResponseOut_OutputPort[port].init();
244#if FW_OBJECT_NAMES == 1
253 this->m_cmdResponseOut_OutputPort[port].setObjName(portName);
260 port < static_cast<PlatformIntType>(this->getNum_eventOut_OutputPorts());
263 this->m_eventOut_OutputPort[port].init();
265#if FW_OBJECT_NAMES == 1
274 this->m_eventOut_OutputPort[port].setObjName(portName);
278#if FW_ENABLE_TEXT_LOGGING == 1
282 port < static_cast<PlatformIntType>(this->getNum_textEventOut_OutputPorts());
285 this->m_textEventOut_OutputPort[port].init();
287#if FW_OBJECT_NAMES == 1
296 this->m_textEventOut_OutputPort[port].setObjName(portName);
304 port < static_cast<PlatformIntType>(this->getNum_timeCaller_OutputPorts());
307 this->m_timeCaller_OutputPort[port].init();
309#if FW_OBJECT_NAMES == 1
318 this->m_timeCaller_OutputPort[port].setObjName(portName);
325 port < static_cast<PlatformIntType>(this->getNum_tlmOut_OutputPorts());
328 this->m_tlmOut_OutputPort[port].init();
330#if FW_OBJECT_NAMES == 1
339 this->m_tlmOut_OutputPort[port].setObjName(portName);
346 port < static_cast<PlatformIntType>(this->getNum_FileComplete_OutputPorts());
349 this->m_FileComplete_OutputPort[port].init();
351#if FW_OBJECT_NAMES == 1
360 this->m_FileComplete_OutputPort[port].setObjName(portName);
367 port < static_cast<PlatformIntType>(this->getNum_bufferSendOut_OutputPorts());
370 this->m_bufferSendOut_OutputPort[port].init();
372#if FW_OBJECT_NAMES == 1
381 this->m_bufferSendOut_OutputPort[port].setObjName(portName);
388 port < static_cast<PlatformIntType>(this->getNum_pingOut_OutputPorts());
391 this->m_pingOut_OutputPort[port].init();
393#if FW_OBJECT_NAMES == 1
402 this->m_pingOut_OutputPort[port].setObjName(portName);
408 ComponentIpcSerializableBuffer::SERIALIZATION_SIZE
76 void FileDownlinkComponentBase :: {
…}
424 portNum < this->getNum_cmdIn_InputPorts(),
428 return &this->m_cmdIn_InputPort[portNum];
439 portNum < this->getNum_Run_InputPorts(),
443 return &this->m_Run_InputPort[portNum];
450 portNum < this->getNum_SendFile_InputPorts(),
454 return &this->m_SendFile_InputPort[portNum];
461 portNum < this->getNum_bufferReturn_InputPorts(),
465 return &this->m_bufferReturn_InputPort[portNum];
472 portNum < this->getNum_pingIn_InputPorts(),
476 return &this->m_pingIn_InputPort[portNum];
483 void FileDownlinkComponentBase ::
484 set_cmdRegOut_OutputPort(
490 portNum < this->getNum_cmdRegOut_OutputPorts(),
494 this->m_cmdRegOut_OutputPort[portNum].addCallPort(port);
483 void FileDownlinkComponentBase :: {
…}
497 void FileDownlinkComponentBase ::
498 set_cmdResponseOut_OutputPort(
504 portNum < this->getNum_cmdResponseOut_OutputPorts(),
508 this->m_cmdResponseOut_OutputPort[portNum].addCallPort(port);
497 void FileDownlinkComponentBase :: {
…}
511 void FileDownlinkComponentBase ::
512 set_eventOut_OutputPort(
518 portNum < this->getNum_eventOut_OutputPorts(),
522 this->m_eventOut_OutputPort[portNum].addCallPort(port);
511 void FileDownlinkComponentBase :: {
…}
525#if FW_ENABLE_TEXT_LOGGING == 1
527 void FileDownlinkComponentBase ::
528 set_textEventOut_OutputPort(
534 portNum < this->getNum_textEventOut_OutputPorts(),
538 this->m_textEventOut_OutputPort[portNum].addCallPort(port);
543 void FileDownlinkComponentBase ::
544 set_timeCaller_OutputPort(
550 portNum < this->getNum_timeCaller_OutputPorts(),
554 this->m_timeCaller_OutputPort[portNum].addCallPort(port);
543 void FileDownlinkComponentBase :: {
…}
557 void FileDownlinkComponentBase ::
558 set_tlmOut_OutputPort(
564 portNum < this->getNum_tlmOut_OutputPorts(),
568 this->m_tlmOut_OutputPort[portNum].addCallPort(port);
557 void FileDownlinkComponentBase :: {
…}
575 void FileDownlinkComponentBase ::
576 set_FileComplete_OutputPort(
582 portNum < this->getNum_FileComplete_OutputPorts(),
586 this->m_FileComplete_OutputPort[portNum].addCallPort(port);
575 void FileDownlinkComponentBase :: {
…}
589 void FileDownlinkComponentBase ::
590 set_bufferSendOut_OutputPort(
596 portNum < this->getNum_bufferSendOut_OutputPorts(),
600 this->m_bufferSendOut_OutputPort[portNum].addCallPort(port);
589 void FileDownlinkComponentBase :: {
…}
603 void FileDownlinkComponentBase ::
604 set_pingOut_OutputPort(
610 portNum < this->getNum_pingOut_OutputPorts(),
614 this->m_pingOut_OutputPort[portNum].addCallPort(port);
603 void FileDownlinkComponentBase :: {
…}
617#if FW_PORT_SERIALIZATION
623 void FileDownlinkComponentBase ::
624 set_cmdRegOut_OutputPort(
626 Fw::InputSerializePort* port
630 portNum < this->getNum_cmdRegOut_OutputPorts(),
634 this->m_cmdRegOut_OutputPort[portNum].registerSerialPort(port);
637 void FileDownlinkComponentBase ::
638 set_cmdResponseOut_OutputPort(
640 Fw::InputSerializePort* port
644 portNum < this->getNum_cmdResponseOut_OutputPorts(),
648 this->m_cmdResponseOut_OutputPort[portNum].registerSerialPort(port);
651 void FileDownlinkComponentBase ::
652 set_eventOut_OutputPort(
654 Fw::InputSerializePort* port
658 portNum < this->getNum_eventOut_OutputPorts(),
662 this->m_eventOut_OutputPort[portNum].registerSerialPort(port);
665#if FW_ENABLE_TEXT_LOGGING == 1
667 void FileDownlinkComponentBase ::
668 set_textEventOut_OutputPort(
670 Fw::InputSerializePort* port
674 portNum < this->getNum_textEventOut_OutputPorts(),
678 this->m_textEventOut_OutputPort[portNum].registerSerialPort(port);
683 void FileDownlinkComponentBase ::
684 set_timeCaller_OutputPort(
686 Fw::InputSerializePort* port
690 portNum < this->getNum_timeCaller_OutputPorts(),
694 this->m_timeCaller_OutputPort[portNum].registerSerialPort(port);
697 void FileDownlinkComponentBase ::
698 set_tlmOut_OutputPort(
700 Fw::InputSerializePort* port
704 portNum < this->getNum_tlmOut_OutputPorts(),
708 this->m_tlmOut_OutputPort[portNum].registerSerialPort(port);
713#if FW_PORT_SERIALIZATION
719 void FileDownlinkComponentBase ::
720 set_FileComplete_OutputPort(
722 Fw::InputSerializePort* port
726 portNum < this->getNum_FileComplete_OutputPorts(),
730 this->m_FileComplete_OutputPort[portNum].registerSerialPort(port);
733 void FileDownlinkComponentBase ::
734 set_bufferSendOut_OutputPort(
736 Fw::InputSerializePort* port
740 portNum < this->getNum_bufferSendOut_OutputPorts(),
744 this->m_bufferSendOut_OutputPort[portNum].registerSerialPort(port);
747 void FileDownlinkComponentBase ::
748 set_pingOut_OutputPort(
750 Fw::InputSerializePort* port
754 portNum < this->getNum_pingOut_OutputPorts(),
758 this->m_pingOut_OutputPort[portNum].registerSerialPort(port);
767 void FileDownlinkComponentBase ::
770 FW_ASSERT(this->m_cmdRegOut_OutputPort[0].isConnected());
772 this->m_cmdRegOut_OutputPort[0].invoke(
773 this->getIdBase() + OPCODE_SENDFILE
776 this->m_cmdRegOut_OutputPort[0].invoke(
777 this->getIdBase() + OPCODE_CANCEL
780 this->m_cmdRegOut_OutputPort[0].invoke(
781 this->getIdBase() + OPCODE_SENDPARTIAL
767 void FileDownlinkComponentBase :: {
…}
789 FileDownlinkComponentBase ::
790 FileDownlinkComponentBase(
const char* compName) :
791 Fw::ActiveComponentBase(compName)
789 FileDownlinkComponentBase :: {
…}
796 FileDownlinkComponentBase ::
797 ~FileDownlinkComponentBase()
796 FileDownlinkComponentBase :: {
…}
807 getNum_cmdIn_InputPorts()
const
817 getNum_Run_InputPorts()
const
823 getNum_SendFile_InputPorts()
const
829 getNum_bufferReturn_InputPorts()
const
835 getNum_pingIn_InputPorts()
const
845 getNum_cmdRegOut_OutputPorts()
const
851 getNum_cmdResponseOut_OutputPorts()
const
857 getNum_eventOut_OutputPorts()
const
862#if FW_ENABLE_TEXT_LOGGING == 1
865 getNum_textEventOut_OutputPorts()
const
873 getNum_timeCaller_OutputPorts()
const
879 getNum_tlmOut_OutputPorts()
const
889 getNum_FileComplete_OutputPorts()
const
895 getNum_bufferSendOut_OutputPorts()
const
901 getNum_pingOut_OutputPorts()
const
910 bool FileDownlinkComponentBase ::
914 portNum < this->getNum_cmdRegOut_OutputPorts(),
918 return this->m_cmdRegOut_OutputPort[portNum].isConnected();
910 bool FileDownlinkComponentBase :: {
…}
921 bool FileDownlinkComponentBase ::
925 portNum < this->getNum_cmdResponseOut_OutputPorts(),
929 return this->m_cmdResponseOut_OutputPort[portNum].isConnected();
921 bool FileDownlinkComponentBase :: {
…}
932 bool FileDownlinkComponentBase ::
936 portNum < this->getNum_eventOut_OutputPorts(),
940 return this->m_eventOut_OutputPort[portNum].isConnected();
932 bool FileDownlinkComponentBase :: {
…}
943#if FW_ENABLE_TEXT_LOGGING == 1
945 bool FileDownlinkComponentBase ::
949 portNum < this->getNum_textEventOut_OutputPorts(),
953 return this->m_textEventOut_OutputPort[portNum].isConnected();
958 bool FileDownlinkComponentBase ::
962 portNum < this->getNum_timeCaller_OutputPorts(),
966 return this->m_timeCaller_OutputPort[portNum].isConnected();
958 bool FileDownlinkComponentBase :: {
…}
969 bool FileDownlinkComponentBase ::
973 portNum < this->getNum_tlmOut_OutputPorts(),
977 return this->m_tlmOut_OutputPort[portNum].isConnected();
969 bool FileDownlinkComponentBase :: {
…}
984 bool FileDownlinkComponentBase ::
988 portNum < this->getNum_FileComplete_OutputPorts(),
992 return this->m_FileComplete_OutputPort[portNum].isConnected();
984 bool FileDownlinkComponentBase :: {
…}
995 bool FileDownlinkComponentBase ::
999 portNum < this->getNum_bufferSendOut_OutputPorts(),
1003 return this->m_bufferSendOut_OutputPort[portNum].isConnected();
995 bool FileDownlinkComponentBase :: {
…}
1006 bool FileDownlinkComponentBase ::
1010 portNum < this->getNum_pingOut_OutputPorts(),
1014 return this->m_pingOut_OutputPort[portNum].isConnected();
1006 bool FileDownlinkComponentBase :: {
…}
1023 void FileDownlinkComponentBase ::
1031 portNum < this->getNum_Run_InputPorts(),
1040 ComponentIpcSerializableBuffer msg;
1044 _status = msg.serialize(
1053 _status = msg.serialize(portNum);
1060 _status = msg.serialize(context);
1023 void FileDownlinkComponentBase :: {
…}
1077 SendFile_handlerBase(
1087 portNum < this->getNum_SendFile_InputPorts(),
1097 retVal = this->SendFile_handler(
1111 void FileDownlinkComponentBase ::
1112 bufferReturn_handlerBase(
1119 portNum < this->getNum_bufferReturn_InputPorts(),
1124 bufferReturn_preMsgHook(
1128 ComponentIpcSerializableBuffer msg;
1132 _status = msg.serialize(
1141 _status = msg.serialize(portNum);
1148 _status = msg.serialize(fwBuffer);
1111 void FileDownlinkComponentBase :: {
…}
1164 void FileDownlinkComponentBase ::
1172 portNum < this->getNum_pingIn_InputPorts(),
1181 ComponentIpcSerializableBuffer msg;
1185 _status = msg.serialize(
1194 _status = msg.serialize(portNum);
1201 _status = msg.serialize(key);
1164 void FileDownlinkComponentBase :: {
…}
1225 void FileDownlinkComponentBase ::
1225 void FileDownlinkComponentBase :: {
…}
1234 void FileDownlinkComponentBase ::
1235 bufferReturn_preMsgHook(
1234 void FileDownlinkComponentBase :: {
…}
1243 void FileDownlinkComponentBase ::
1243 void FileDownlinkComponentBase :: {
…}
1256 void FileDownlinkComponentBase ::
1263 portNum < this->getNum_FileComplete_OutputPorts(),
1266 this->m_FileComplete_OutputPort[portNum].invoke(
1256 void FileDownlinkComponentBase :: {
…}
1271 void FileDownlinkComponentBase ::
1278 portNum < this->getNum_bufferSendOut_OutputPorts(),
1281 this->m_bufferSendOut_OutputPort[portNum].invoke(
1271 void FileDownlinkComponentBase :: {
…}
1286 void FileDownlinkComponentBase ::
1293 portNum < this->getNum_pingOut_OutputPorts(),
1296 this->m_pingOut_OutputPort[portNum].invoke(
1286 void FileDownlinkComponentBase :: {
…}
1305 void FileDownlinkComponentBase ::
1312 FW_ASSERT(this->m_cmdResponseOut_OutputPort[0].isConnected());
1313 this->m_cmdResponseOut_OutputPort[0].invoke(opCode, cmdSeq, response);
1305 void FileDownlinkComponentBase :: {
…}
1322 void FileDownlinkComponentBase ::
1323 SendFile_cmdHandlerBase(
1330 this->SendFile_preMsgHook(opCode,cmdSeq);
1334 ComponentIpcSerializableBuffer msg;
1347 _status = msg.serialize(port);
1353 _status = msg.serialize(opCode);
1359 _status = msg.serialize(cmdSeq);
1365 _status = msg.serialize(args);
1322 void FileDownlinkComponentBase :: {
…}
1381 void FileDownlinkComponentBase ::
1382 Cancel_cmdHandlerBase(
1389 this->Cancel_preMsgHook(opCode,cmdSeq);
1393 ComponentIpcSerializableBuffer msg;
1406 _status = msg.serialize(port);
1412 _status = msg.serialize(opCode);
1418 _status = msg.serialize(cmdSeq);
1424 _status = msg.serialize(args);
1381 void FileDownlinkComponentBase :: {
…}
1440 void FileDownlinkComponentBase ::
1441 SendPartial_cmdHandlerBase(
1448 this->SendPartial_preMsgHook(opCode,cmdSeq);
1452 ComponentIpcSerializableBuffer msg;
1456 _status = msg.serialize(
static_cast<NATIVE_INT_TYPE>(CMD_SENDPARTIAL));
1465 _status = msg.serialize(port);
1471 _status = msg.serialize(opCode);
1477 _status = msg.serialize(cmdSeq);
1483 _status = msg.serialize(args);
1440 void FileDownlinkComponentBase :: {
…}
1507 void FileDownlinkComponentBase ::
1508 SendFile_preMsgHook(
1507 void FileDownlinkComponentBase :: {
…}
1516 void FileDownlinkComponentBase ::
1516 void FileDownlinkComponentBase :: {
…}
1525 void FileDownlinkComponentBase ::
1526 SendPartial_preMsgHook(
1525 void FileDownlinkComponentBase :: {
…}
1538 void FileDownlinkComponentBase ::
1543 if (this->m_timeCaller_OutputPort[0].isConnected()) {
1544 this->m_timeCaller_OutputPort[0].invoke(_logTime);
1549 _id = this->getIdBase() + EVENTID_FILEOPENERROR;
1552 if (this->m_eventOut_OutputPort[0].isConnected()) {
1556#if FW_AMPCS_COMPATIBLE
1565 _status = fileName.
serialize(_logBuff, 100);
1571 this->m_eventOut_OutputPort[0].invoke(
1580#if FW_ENABLE_TEXT_LOGGING
1581 if (this->m_textEventOut_OutputPort[0].isConnected()) {
1582#if FW_OBJECT_NAMES == 1
1583 const char* _formatString =
1584 "(%s) %s: Could not open file %s";
1586 const char* _formatString =
1587 "%s: Could not open file %s";
1606 this->m_textEventOut_OutputPort[0].invoke(
1538 void FileDownlinkComponentBase :: {
…}
1616 void FileDownlinkComponentBase ::
1617 log_WARNING_HI_FileReadError(
1624 if (this->m_timeCaller_OutputPort[0].isConnected()) {
1625 this->m_timeCaller_OutputPort[0].invoke(_logTime);
1630 _id = this->getIdBase() + EVENTID_FILEREADERROR;
1633 if (this->m_eventOut_OutputPort[0].isConnected()) {
1637#if FW_AMPCS_COMPATIBLE
1646 _status = fileName.
serialize(_logBuff, 100);
1652#if FW_AMPCS_COMPATIBLE
1655 static_cast<U8>(
sizeof(I32))
1668 this->m_eventOut_OutputPort[0].invoke(
1677#if FW_ENABLE_TEXT_LOGGING
1678 if (this->m_textEventOut_OutputPort[0].isConnected()) {
1679#if FW_OBJECT_NAMES == 1
1680 const char* _formatString =
1681 "(%s) %s: Could not read file %s with status %" PRIi32
"";
1683 const char* _formatString =
1684 "%s: Could not read file %s with status %" PRIi32
"";
1704 this->m_textEventOut_OutputPort[0].invoke(
1616 void FileDownlinkComponentBase :: {
…}
1714 void FileDownlinkComponentBase ::
1715 log_ACTIVITY_HI_FileSent(
1722 if (this->m_timeCaller_OutputPort[0].isConnected()) {
1723 this->m_timeCaller_OutputPort[0].invoke(_logTime);
1728 _id = this->getIdBase() + EVENTID_FILESENT;
1731 if (this->m_eventOut_OutputPort[0].isConnected()) {
1735#if FW_AMPCS_COMPATIBLE
1744 _status = sourceFileName.
serialize(_logBuff, 100);
1750 _status = destFileName.
serialize(_logBuff, 100);
1756 this->m_eventOut_OutputPort[0].invoke(
1765#if FW_ENABLE_TEXT_LOGGING
1766 if (this->m_textEventOut_OutputPort[0].isConnected()) {
1767#if FW_OBJECT_NAMES == 1
1768 const char* _formatString =
1769 "(%s) %s: Sent file %s to file %s";
1771 const char* _formatString =
1772 "%s: Sent file %s to file %s";
1792 this->m_textEventOut_OutputPort[0].invoke(
1714 void FileDownlinkComponentBase :: {
…}
1802 void FileDownlinkComponentBase ::
1803 log_ACTIVITY_HI_DownlinkCanceled(
1810 if (this->m_timeCaller_OutputPort[0].isConnected()) {
1811 this->m_timeCaller_OutputPort[0].invoke(_logTime);
1816 _id = this->getIdBase() + EVENTID_DOWNLINKCANCELED;
1819 if (this->m_eventOut_OutputPort[0].isConnected()) {
1823#if FW_AMPCS_COMPATIBLE
1832 _status = sourceFileName.
serialize(_logBuff, 100);
1838 _status = destFileName.
serialize(_logBuff, 100);
1844 this->m_eventOut_OutputPort[0].invoke(
1853#if FW_ENABLE_TEXT_LOGGING
1854 if (this->m_textEventOut_OutputPort[0].isConnected()) {
1855#if FW_OBJECT_NAMES == 1
1856 const char* _formatString =
1857 "(%s) %s: Canceled downlink of file %s to file %s";
1859 const char* _formatString =
1860 "%s: Canceled downlink of file %s to file %s";
1872 "DownlinkCanceled ",
1880 this->m_textEventOut_OutputPort[0].invoke(
1802 void FileDownlinkComponentBase :: {
…}
1890 void FileDownlinkComponentBase ::
1891 log_WARNING_HI_DownlinkTimeout(
1898 if (this->m_timeCaller_OutputPort[0].isConnected()) {
1899 this->m_timeCaller_OutputPort[0].invoke(_logTime);
1904 _id = this->getIdBase() + EVENTID_DOWNLINKTIMEOUT;
1907 if (this->m_eventOut_OutputPort[0].isConnected()) {
1911#if FW_AMPCS_COMPATIBLE
1920 _status = sourceFileName.
serialize(_logBuff, 100);
1926 _status = destFileName.
serialize(_logBuff, 100);
1932 this->m_eventOut_OutputPort[0].invoke(
1941#if FW_ENABLE_TEXT_LOGGING
1942 if (this->m_textEventOut_OutputPort[0].isConnected()) {
1943#if FW_OBJECT_NAMES == 1
1944 const char* _formatString =
1945 "(%s) %s: Timeout occurred during downlink of file %s to file %s. Downlink has been canceled.";
1947 const char* _formatString =
1948 "%s: Timeout occurred during downlink of file %s to file %s. Downlink has been canceled.";
1968 this->m_textEventOut_OutputPort[0].invoke(
1890 void FileDownlinkComponentBase :: {
…}
1978 void FileDownlinkComponentBase ::
1979 log_WARNING_LO_DownlinkPartialWarning(
1989 if (this->m_timeCaller_OutputPort[0].isConnected()) {
1990 this->m_timeCaller_OutputPort[0].invoke(_logTime);
1995 _id = this->getIdBase() + EVENTID_DOWNLINKPARTIALWARNING;
1998 if (this->m_eventOut_OutputPort[0].isConnected()) {
2002#if FW_AMPCS_COMPATIBLE
2011#if FW_AMPCS_COMPATIBLE
2014 static_cast<U8>(
sizeof(U32))
2021 _status = _logBuff.
serialize(startOffset);
2027#if FW_AMPCS_COMPATIBLE
2030 static_cast<U8>(
sizeof(U32))
2043#if FW_AMPCS_COMPATIBLE
2046 static_cast<U8>(
sizeof(U32))
2059 _status = sourceFileName.
serialize(_logBuff, 100);
2065 _status = destFileName.
serialize(_logBuff, 100);
2071 this->m_eventOut_OutputPort[0].invoke(
2080#if FW_ENABLE_TEXT_LOGGING
2081 if (this->m_textEventOut_OutputPort[0].isConnected()) {
2082#if FW_OBJECT_NAMES == 1
2083 const char* _formatString =
2084 "(%s) %s: Offset %" PRIu32
" plus length %" PRIu32
" is greater than source size %" PRIu32
" for partial downlink of file %s to file %s. ";
2086 const char* _formatString =
2087 "%s: Offset %" PRIu32
" plus length %" PRIu32
" is greater than source size %" PRIu32
" for partial downlink of file %s to file %s. ";
2099 "DownlinkPartialWarning ",
2110 this->m_textEventOut_OutputPort[0].invoke(
1978 void FileDownlinkComponentBase :: {
…}
2120 void FileDownlinkComponentBase ::
2121 log_WARNING_HI_DownlinkPartialFail(
2130 if (this->m_timeCaller_OutputPort[0].isConnected()) {
2131 this->m_timeCaller_OutputPort[0].invoke(_logTime);
2136 _id = this->getIdBase() + EVENTID_DOWNLINKPARTIALFAIL;
2139 if (this->m_eventOut_OutputPort[0].isConnected()) {
2143#if FW_AMPCS_COMPATIBLE
2152 _status = sourceFileName.
serialize(_logBuff, 100);
2158 _status = destFileName.
serialize(_logBuff, 100);
2164#if FW_AMPCS_COMPATIBLE
2167 static_cast<U8>(
sizeof(U32))
2174 _status = _logBuff.
serialize(startOffset);
2180#if FW_AMPCS_COMPATIBLE
2183 static_cast<U8>(
sizeof(U32))
2196 this->m_eventOut_OutputPort[0].invoke(
2205#if FW_ENABLE_TEXT_LOGGING
2206 if (this->m_textEventOut_OutputPort[0].isConnected()) {
2207#if FW_OBJECT_NAMES == 1
2208 const char* _formatString =
2209 "(%s) %s: Error occurred during partial downlink of file %s to file %s. Offset %" PRIu32
" greater than or equal to source filesize %" PRIu32
".";
2211 const char* _formatString =
2212 "%s: Error occurred during partial downlink of file %s to file %s. Offset %" PRIu32
" greater than or equal to source filesize %" PRIu32
".";
2224 "DownlinkPartialFail ",
2234 this->m_textEventOut_OutputPort[0].invoke(
2120 void FileDownlinkComponentBase :: {
…}
2244 void FileDownlinkComponentBase ::
2245 log_WARNING_HI_SendDataFail(
2252 if (this->m_timeCaller_OutputPort[0].isConnected()) {
2253 this->m_timeCaller_OutputPort[0].invoke(_logTime);
2258 _id = this->getIdBase() + EVENTID_SENDDATAFAIL;
2261 if (this->m_eventOut_OutputPort[0].isConnected()) {
2265#if FW_AMPCS_COMPATIBLE
2274 _status = sourceFileName.
serialize(_logBuff, 100);
2280#if FW_AMPCS_COMPATIBLE
2283 static_cast<U8>(
sizeof(U32))
2290 _status = _logBuff.
serialize(byteOffset);
2296 this->m_eventOut_OutputPort[0].invoke(
2305#if FW_ENABLE_TEXT_LOGGING
2306 if (this->m_textEventOut_OutputPort[0].isConnected()) {
2307#if FW_OBJECT_NAMES == 1
2308 const char* _formatString =
2309 "(%s) %s: Failed to send data packet from file %s at byte offset %" PRIu32
".";
2311 const char* _formatString =
2312 "%s: Failed to send data packet from file %s at byte offset %" PRIu32
".";
2332 this->m_textEventOut_OutputPort[0].invoke(
2244 void FileDownlinkComponentBase :: {
…}
2342 void FileDownlinkComponentBase ::
2343 log_ACTIVITY_HI_SendStarted(
2351 if (this->m_timeCaller_OutputPort[0].isConnected()) {
2352 this->m_timeCaller_OutputPort[0].invoke(_logTime);
2357 _id = this->getIdBase() + EVENTID_SENDSTARTED;
2360 if (this->m_eventOut_OutputPort[0].isConnected()) {
2364#if FW_AMPCS_COMPATIBLE
2373#if FW_AMPCS_COMPATIBLE
2376 static_cast<U8>(
sizeof(U32))
2389 _status = sourceFileName.
serialize(_logBuff, 100);
2395 _status = destFileName.
serialize(_logBuff, 100);
2401 this->m_eventOut_OutputPort[0].invoke(
2410#if FW_ENABLE_TEXT_LOGGING
2411 if (this->m_textEventOut_OutputPort[0].isConnected()) {
2412#if FW_OBJECT_NAMES == 1
2413 const char* _formatString =
2414 "(%s) %s: Downlink of %" PRIu32
" bytes started from %s to %s";
2416 const char* _formatString =
2417 "%s: Downlink of %" PRIu32
" bytes started from %s to %s";
2438 this->m_textEventOut_OutputPort[0].invoke(
2342 void FileDownlinkComponentBase :: {
…}
2452 void FileDownlinkComponentBase ::
2458 if (this->m_tlmOut_OutputPort[0].isConnected()) {
2460 this->m_timeCaller_OutputPort[0].isConnected() &&
2463 this->m_timeCaller_OutputPort[0].invoke(_tlmTime);
2475 _id = this->getIdBase() + CHANNELID_FILESSENT;
2477 this->m_tlmOut_OutputPort[0].invoke(
2452 void FileDownlinkComponentBase :: {
…}
2485 void FileDownlinkComponentBase ::
2486 tlmWrite_PacketsSent(
2491 if (this->m_tlmOut_OutputPort[0].isConnected()) {
2493 this->m_timeCaller_OutputPort[0].isConnected() &&
2496 this->m_timeCaller_OutputPort[0].invoke(_tlmTime);
2508 _id = this->getIdBase() + CHANNELID_PACKETSSENT;
2510 this->m_tlmOut_OutputPort[0].invoke(
2485 void FileDownlinkComponentBase :: {
…}
2518 void FileDownlinkComponentBase ::
2524 if (this->m_tlmOut_OutputPort[0].isConnected()) {
2526 this->m_timeCaller_OutputPort[0].isConnected() &&
2529 this->m_timeCaller_OutputPort[0].invoke(_tlmTime);
2541 _id = this->getIdBase() + CHANNELID_WARNINGS;
2543 this->m_tlmOut_OutputPort[0].invoke(
2518 void FileDownlinkComponentBase :: {
…}
2558 if (this->m_timeCaller_OutputPort[0].isConnected()) {
2560 this->m_timeCaller_OutputPort[0].invoke(_time);
2575 void FileDownlinkComponentBase ::
2578 this->m_guardedPortMutex.lock();
2575 void FileDownlinkComponentBase :: {
…}
2581 void FileDownlinkComponentBase ::
2584 this->m_guardedPortMutex.unLock();
2581 void FileDownlinkComponentBase :: {
…}
2594 ComponentIpcSerializableBuffer msg;
2617 MsgTypeEnum msgType =
static_cast<MsgTypeEnum
>(desMsg);
2619 if (msgType == FILEDOWNLINK_COMPONENT_EXIT) {
2620 return MSG_DISPATCH_EXIT;
2624 deserStatus = msg.deserialize(portNum);
2635 deserStatus = msg.deserialize(context);
2650 case BUFFERRETURN_BUFFERSEND: {
2653 deserStatus = msg.deserialize(fwBuffer);
2659 this->bufferReturn_handler(
2671 deserStatus = msg.deserialize(key);
2677 this->pingIn_handler(
2686 case CMD_SENDFILE: {
2689 deserStatus = msg.deserialize(opCode);
2697 deserStatus = msg.deserialize(cmdSeq);
2705 deserStatus = msg.deserialize(args);
2718 if (this->m_cmdResponseOut_OutputPort[0].isConnected()) {
2719 this->cmdResponse_out(
2733 if (this->m_cmdResponseOut_OutputPort[0].isConnected()) {
2734 this->cmdResponse_out(
2746#if FW_CMD_CHECK_RESIDUAL
2748 if (this->m_cmdResponseOut_OutputPort[0].isConnected()) {
2757 this->SendFile_cmdHandler(
2770 deserStatus = msg.deserialize(opCode);
2778 deserStatus = msg.deserialize(cmdSeq);
2786 deserStatus = msg.deserialize(args);
2797#if FW_CMD_CHECK_RESIDUAL
2799 if (this->m_cmdResponseOut_OutputPort[0].isConnected()) {
2808 this->Cancel_cmdHandler(opCode, cmdSeq);
2814 case CMD_SENDPARTIAL: {
2817 deserStatus = msg.deserialize(opCode);
2825 deserStatus = msg.deserialize(cmdSeq);
2833 deserStatus = msg.deserialize(args);
2846 if (this->m_cmdResponseOut_OutputPort[0].isConnected()) {
2847 this->cmdResponse_out(
2861 if (this->m_cmdResponseOut_OutputPort[0].isConnected()) {
2862 this->cmdResponse_out(
2876 if (this->m_cmdResponseOut_OutputPort[0].isConnected()) {
2877 this->cmdResponse_out(
2891 if (this->m_cmdResponseOut_OutputPort[0].isConnected()) {
2892 this->cmdResponse_out(
2904#if FW_CMD_CHECK_RESIDUAL
2906 if (this->m_cmdResponseOut_OutputPort[0].isConnected()) {
2915 this->SendPartial_cmdHandler(
2927 return MSG_DISPATCH_ERROR;
2930 return MSG_DISPATCH_OK;
2937 void FileDownlinkComponentBase ::
2947 FileDownlinkComponentBase* compPtr =
static_cast<FileDownlinkComponentBase*
>(callComp);
2949 const U32 idBase = callComp->
getIdBase();
2950 FW_ASSERT(opCode >= idBase, opCode, idBase);
2953 switch (opCode - idBase) {
2954 case OPCODE_SENDFILE: {
2955 compPtr->SendFile_cmdHandlerBase(
2963 case OPCODE_CANCEL: {
2964 compPtr->Cancel_cmdHandlerBase(
2972 case OPCODE_SENDPARTIAL: {
2973 compPtr->SendPartial_cmdHandlerBase(
2987 void FileDownlinkComponentBase ::
2995 FileDownlinkComponentBase* compPtr =
static_cast<FileDownlinkComponentBase*
>(callComp);
2996 compPtr->Run_handlerBase(
3013 FileDownlinkComponentBase* compPtr =
static_cast<FileDownlinkComponentBase*
>(callComp);
3014 return compPtr->SendFile_handlerBase(
3023 void FileDownlinkComponentBase ::
3024 m_p_bufferReturn_in(
3031 FileDownlinkComponentBase* compPtr =
static_cast<FileDownlinkComponentBase*
>(callComp);
3032 compPtr->bufferReturn_handlerBase(
3038 void FileDownlinkComponentBase ::
3046 FileDownlinkComponentBase* compPtr =
static_cast<FileDownlinkComponentBase*
>(callComp);
3047 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.