10#if FW_ENABLE_TEXT_LOGGING
20 BUFFERRETURN_BUFFERSEND,
38 class ComponentIpcSerializableBuffer :
48 MAX_DATA_SIZE =
sizeof(BuffUnion),
50 SERIALIZATION_SIZE = DATA_OFFSET + MAX_DATA_SIZE
54 return sizeof(m_buff);
61 const U8* getBuffAddr()
const {
67 U8 m_buff[SERIALIZATION_SIZE];
76 void FileDownlinkComponentBase ::
88 port < static_cast<FwIndexType>(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
102 this->m_objName.toChar(),
105 this->m_cmdIn_InputPort[port].setObjName(portName.
toChar());
112 port < static_cast<FwIndexType>(this->getNum_Run_InputPorts());
115 this->m_Run_InputPort[port].init();
116 this->m_Run_InputPort[port].addCallComp(
120 this->m_Run_InputPort[port].setPortNum(port);
122#if FW_OBJECT_NAMES == 1
126 this->m_objName.toChar(),
129 this->m_Run_InputPort[port].setObjName(portName.
toChar());
136 port < static_cast<FwIndexType>(this->getNum_SendFile_InputPorts());
139 this->m_SendFile_InputPort[port].init();
140 this->m_SendFile_InputPort[port].addCallComp(
144 this->m_SendFile_InputPort[port].setPortNum(port);
146#if FW_OBJECT_NAMES == 1
150 this->m_objName.toChar(),
153 this->m_SendFile_InputPort[port].setObjName(portName.
toChar());
160 port < static_cast<FwIndexType>(this->getNum_bufferReturn_InputPorts());
163 this->m_bufferReturn_InputPort[port].init();
164 this->m_bufferReturn_InputPort[port].addCallComp(
168 this->m_bufferReturn_InputPort[port].setPortNum(port);
170#if FW_OBJECT_NAMES == 1
174 this->m_objName.toChar(),
177 this->m_bufferReturn_InputPort[port].setObjName(portName.
toChar());
184 port < static_cast<FwIndexType>(this->getNum_pingIn_InputPorts());
187 this->m_pingIn_InputPort[port].init();
188 this->m_pingIn_InputPort[port].addCallComp(
192 this->m_pingIn_InputPort[port].setPortNum(port);
194#if FW_OBJECT_NAMES == 1
198 this->m_objName.toChar(),
201 this->m_pingIn_InputPort[port].setObjName(portName.
toChar());
208 port < static_cast<FwIndexType>(this->getNum_cmdRegOut_OutputPorts());
211 this->m_cmdRegOut_OutputPort[port].init();
213#if FW_OBJECT_NAMES == 1
217 this->m_objName.toChar(),
220 this->m_cmdRegOut_OutputPort[port].setObjName(portName.
toChar());
227 port < static_cast<FwIndexType>(this->getNum_cmdResponseOut_OutputPorts());
230 this->m_cmdResponseOut_OutputPort[port].init();
232#if FW_OBJECT_NAMES == 1
236 this->m_objName.toChar(),
239 this->m_cmdResponseOut_OutputPort[port].setObjName(portName.
toChar());
246 port < static_cast<FwIndexType>(this->getNum_eventOut_OutputPorts());
249 this->m_eventOut_OutputPort[port].init();
251#if FW_OBJECT_NAMES == 1
255 this->m_objName.toChar(),
258 this->m_eventOut_OutputPort[port].setObjName(portName.
toChar());
262#if FW_ENABLE_TEXT_LOGGING == 1
266 port < static_cast<FwIndexType>(this->getNum_textEventOut_OutputPorts());
269 this->m_textEventOut_OutputPort[port].init();
271#if FW_OBJECT_NAMES == 1
275 this->m_objName.toChar(),
278 this->m_textEventOut_OutputPort[port].setObjName(portName.
toChar());
286 port < static_cast<FwIndexType>(this->getNum_timeCaller_OutputPorts());
289 this->m_timeCaller_OutputPort[port].init();
291#if FW_OBJECT_NAMES == 1
295 this->m_objName.toChar(),
298 this->m_timeCaller_OutputPort[port].setObjName(portName.
toChar());
305 port < static_cast<FwIndexType>(this->getNum_tlmOut_OutputPorts());
308 this->m_tlmOut_OutputPort[port].init();
310#if FW_OBJECT_NAMES == 1
314 this->m_objName.toChar(),
317 this->m_tlmOut_OutputPort[port].setObjName(portName.
toChar());
324 port < static_cast<FwIndexType>(this->getNum_FileComplete_OutputPorts());
327 this->m_FileComplete_OutputPort[port].init();
329#if FW_OBJECT_NAMES == 1
333 this->m_objName.toChar(),
336 this->m_FileComplete_OutputPort[port].setObjName(portName.
toChar());
343 port < static_cast<FwIndexType>(this->getNum_bufferSendOut_OutputPorts());
346 this->m_bufferSendOut_OutputPort[port].init();
348#if FW_OBJECT_NAMES == 1
352 this->m_objName.toChar(),
355 this->m_bufferSendOut_OutputPort[port].setObjName(portName.
toChar());
362 port < static_cast<FwIndexType>(this->getNum_pingOut_OutputPorts());
365 this->m_pingOut_OutputPort[port].init();
367#if FW_OBJECT_NAMES == 1
371 this->m_objName.toChar(),
374 this->m_pingOut_OutputPort[port].setObjName(portName.
toChar());
381 static_cast<FwSizeType>(ComponentIpcSerializableBuffer::SERIALIZATION_SIZE)
397 portNum < this->getNum_cmdIn_InputPorts(),
401 return &this->m_cmdIn_InputPort[portNum];
412 portNum < this->getNum_Run_InputPorts(),
416 return &this->m_Run_InputPort[portNum];
423 portNum < this->getNum_SendFile_InputPorts(),
427 return &this->m_SendFile_InputPort[portNum];
434 portNum < this->getNum_bufferReturn_InputPorts(),
438 return &this->m_bufferReturn_InputPort[portNum];
445 portNum < this->getNum_pingIn_InputPorts(),
449 return &this->m_pingIn_InputPort[portNum];
456 void FileDownlinkComponentBase ::
457 set_cmdRegOut_OutputPort(
463 portNum < this->getNum_cmdRegOut_OutputPorts(),
467 this->m_cmdRegOut_OutputPort[portNum].addCallPort(port);
470 void FileDownlinkComponentBase ::
471 set_cmdResponseOut_OutputPort(
477 portNum < this->getNum_cmdResponseOut_OutputPorts(),
481 this->m_cmdResponseOut_OutputPort[portNum].addCallPort(port);
484 void FileDownlinkComponentBase ::
485 set_eventOut_OutputPort(
491 portNum < this->getNum_eventOut_OutputPorts(),
495 this->m_eventOut_OutputPort[portNum].addCallPort(port);
498#if FW_ENABLE_TEXT_LOGGING == 1
500 void FileDownlinkComponentBase ::
501 set_textEventOut_OutputPort(
507 portNum < this->getNum_textEventOut_OutputPorts(),
511 this->m_textEventOut_OutputPort[portNum].addCallPort(port);
516 void FileDownlinkComponentBase ::
517 set_timeCaller_OutputPort(
523 portNum < this->getNum_timeCaller_OutputPorts(),
527 this->m_timeCaller_OutputPort[portNum].addCallPort(port);
530 void FileDownlinkComponentBase ::
531 set_tlmOut_OutputPort(
537 portNum < this->getNum_tlmOut_OutputPorts(),
541 this->m_tlmOut_OutputPort[portNum].addCallPort(port);
548 void FileDownlinkComponentBase ::
549 set_FileComplete_OutputPort(
555 portNum < this->getNum_FileComplete_OutputPorts(),
559 this->m_FileComplete_OutputPort[portNum].addCallPort(port);
562 void FileDownlinkComponentBase ::
563 set_bufferSendOut_OutputPort(
569 portNum < this->getNum_bufferSendOut_OutputPorts(),
573 this->m_bufferSendOut_OutputPort[portNum].addCallPort(port);
576 void FileDownlinkComponentBase ::
577 set_pingOut_OutputPort(
583 portNum < this->getNum_pingOut_OutputPorts(),
587 this->m_pingOut_OutputPort[portNum].addCallPort(port);
590#if FW_PORT_SERIALIZATION
596 void FileDownlinkComponentBase ::
597 set_cmdRegOut_OutputPort(
599 Fw::InputSerializePort* port
603 portNum < this->getNum_cmdRegOut_OutputPorts(),
607 this->m_cmdRegOut_OutputPort[portNum].registerSerialPort(port);
610 void FileDownlinkComponentBase ::
611 set_cmdResponseOut_OutputPort(
613 Fw::InputSerializePort* port
617 portNum < this->getNum_cmdResponseOut_OutputPorts(),
621 this->m_cmdResponseOut_OutputPort[portNum].registerSerialPort(port);
624 void FileDownlinkComponentBase ::
625 set_eventOut_OutputPort(
627 Fw::InputSerializePort* port
631 portNum < this->getNum_eventOut_OutputPorts(),
635 this->m_eventOut_OutputPort[portNum].registerSerialPort(port);
638#if FW_ENABLE_TEXT_LOGGING == 1
640 void FileDownlinkComponentBase ::
641 set_textEventOut_OutputPort(
643 Fw::InputSerializePort* port
647 portNum < this->getNum_textEventOut_OutputPorts(),
651 this->m_textEventOut_OutputPort[portNum].registerSerialPort(port);
656 void FileDownlinkComponentBase ::
657 set_timeCaller_OutputPort(
659 Fw::InputSerializePort* port
663 portNum < this->getNum_timeCaller_OutputPorts(),
667 this->m_timeCaller_OutputPort[portNum].registerSerialPort(port);
670 void FileDownlinkComponentBase ::
671 set_tlmOut_OutputPort(
673 Fw::InputSerializePort* port
677 portNum < this->getNum_tlmOut_OutputPorts(),
681 this->m_tlmOut_OutputPort[portNum].registerSerialPort(port);
686#if FW_PORT_SERIALIZATION
692 void FileDownlinkComponentBase ::
693 set_FileComplete_OutputPort(
695 Fw::InputSerializePort* port
699 portNum < this->getNum_FileComplete_OutputPorts(),
703 this->m_FileComplete_OutputPort[portNum].registerSerialPort(port);
706 void FileDownlinkComponentBase ::
707 set_bufferSendOut_OutputPort(
709 Fw::InputSerializePort* port
713 portNum < this->getNum_bufferSendOut_OutputPorts(),
717 this->m_bufferSendOut_OutputPort[portNum].registerSerialPort(port);
720 void FileDownlinkComponentBase ::
721 set_pingOut_OutputPort(
723 Fw::InputSerializePort* port
727 portNum < this->getNum_pingOut_OutputPorts(),
731 this->m_pingOut_OutputPort[portNum].registerSerialPort(port);
740 void FileDownlinkComponentBase ::
743 FW_ASSERT(this->m_cmdRegOut_OutputPort[0].isConnected());
745 this->m_cmdRegOut_OutputPort[0].invoke(
746 this->getIdBase() + OPCODE_SENDFILE
749 this->m_cmdRegOut_OutputPort[0].invoke(
750 this->getIdBase() + OPCODE_CANCEL
753 this->m_cmdRegOut_OutputPort[0].invoke(
754 this->getIdBase() + OPCODE_SENDPARTIAL
762 FileDownlinkComponentBase ::
763 FileDownlinkComponentBase(
const char* compName) :
764 Fw::ActiveComponentBase(compName)
769 FileDownlinkComponentBase ::
770 ~FileDownlinkComponentBase()
780 getNum_cmdIn_InputPorts()
const
790 getNum_Run_InputPorts()
const
796 getNum_SendFile_InputPorts()
const
802 getNum_bufferReturn_InputPorts()
const
808 getNum_pingIn_InputPorts()
const
818 getNum_cmdRegOut_OutputPorts()
const
824 getNum_cmdResponseOut_OutputPorts()
const
830 getNum_eventOut_OutputPorts()
const
835#if FW_ENABLE_TEXT_LOGGING == 1
838 getNum_textEventOut_OutputPorts()
const
846 getNum_timeCaller_OutputPorts()
const
852 getNum_tlmOut_OutputPorts()
const
862 getNum_FileComplete_OutputPorts()
const
868 getNum_bufferSendOut_OutputPorts()
const
874 getNum_pingOut_OutputPorts()
const
883 bool FileDownlinkComponentBase ::
884 isConnected_cmdRegOut_OutputPort(
FwIndexType portNum)
887 portNum < this->getNum_cmdRegOut_OutputPorts(),
891 return this->m_cmdRegOut_OutputPort[portNum].isConnected();
894 bool FileDownlinkComponentBase ::
895 isConnected_cmdResponseOut_OutputPort(
FwIndexType portNum)
898 portNum < this->getNum_cmdResponseOut_OutputPorts(),
902 return this->m_cmdResponseOut_OutputPort[portNum].isConnected();
905 bool FileDownlinkComponentBase ::
906 isConnected_eventOut_OutputPort(
FwIndexType portNum)
909 portNum < this->getNum_eventOut_OutputPorts(),
913 return this->m_eventOut_OutputPort[portNum].isConnected();
916#if FW_ENABLE_TEXT_LOGGING == 1
918 bool FileDownlinkComponentBase ::
919 isConnected_textEventOut_OutputPort(
FwIndexType portNum)
922 portNum < this->getNum_textEventOut_OutputPorts(),
926 return this->m_textEventOut_OutputPort[portNum].isConnected();
931 bool FileDownlinkComponentBase ::
932 isConnected_timeCaller_OutputPort(
FwIndexType portNum)
935 portNum < this->getNum_timeCaller_OutputPorts(),
939 return this->m_timeCaller_OutputPort[portNum].isConnected();
942 bool FileDownlinkComponentBase ::
946 portNum < this->getNum_tlmOut_OutputPorts(),
950 return this->m_tlmOut_OutputPort[portNum].isConnected();
957 bool FileDownlinkComponentBase ::
958 isConnected_FileComplete_OutputPort(
FwIndexType portNum)
961 portNum < this->getNum_FileComplete_OutputPorts(),
965 return this->m_FileComplete_OutputPort[portNum].isConnected();
968 bool FileDownlinkComponentBase ::
969 isConnected_bufferSendOut_OutputPort(
FwIndexType portNum)
972 portNum < this->getNum_bufferSendOut_OutputPorts(),
976 return this->m_bufferSendOut_OutputPort[portNum].isConnected();
979 bool FileDownlinkComponentBase ::
980 isConnected_pingOut_OutputPort(
FwIndexType portNum)
983 portNum < this->getNum_pingOut_OutputPorts(),
987 return this->m_pingOut_OutputPort[portNum].isConnected();
996 void FileDownlinkComponentBase ::
1004 portNum < this->getNum_Run_InputPorts(),
1013 ComponentIpcSerializableBuffer msg;
1017 _status = msg.serialize(
1026 _status = msg.serialize(portNum);
1033 _status = msg.serialize(context);
1050 SendFile_handlerBase(
1060 portNum < this->getNum_SendFile_InputPorts(),
1070 retVal = this->SendFile_handler(
1084 void FileDownlinkComponentBase ::
1085 bufferReturn_handlerBase(
1092 portNum < this->getNum_bufferReturn_InputPorts(),
1097 bufferReturn_preMsgHook(
1101 ComponentIpcSerializableBuffer msg;
1105 _status = msg.serialize(
1114 _status = msg.serialize(portNum);
1121 _status = msg.serialize(fwBuffer);
1137 void FileDownlinkComponentBase ::
1145 portNum < this->getNum_pingIn_InputPorts(),
1154 ComponentIpcSerializableBuffer msg;
1158 _status = msg.serialize(
1167 _status = msg.serialize(portNum);
1174 _status = msg.serialize(key);
1198 void FileDownlinkComponentBase ::
1207 void FileDownlinkComponentBase ::
1208 bufferReturn_preMsgHook(
1216 void FileDownlinkComponentBase ::
1229 void FileDownlinkComponentBase ::
1236 portNum < this->getNum_FileComplete_OutputPorts(),
1239 this->m_FileComplete_OutputPort[portNum].invoke(
1244 void FileDownlinkComponentBase ::
1251 portNum < this->getNum_bufferSendOut_OutputPorts(),
1254 this->m_bufferSendOut_OutputPort[portNum].invoke(
1259 void FileDownlinkComponentBase ::
1266 portNum < this->getNum_pingOut_OutputPorts(),
1269 this->m_pingOut_OutputPort[portNum].invoke(
1278 void FileDownlinkComponentBase ::
1285 FW_ASSERT(this->m_cmdResponseOut_OutputPort[0].isConnected());
1286 this->m_cmdResponseOut_OutputPort[0].invoke(opCode, cmdSeq, response);
1295 void FileDownlinkComponentBase ::
1296 SendFile_cmdHandlerBase(
1303 this->SendFile_preMsgHook(opCode,cmdSeq);
1307 ComponentIpcSerializableBuffer msg;
1320 _status = msg.serialize(port);
1326 _status = msg.serialize(opCode);
1332 _status = msg.serialize(cmdSeq);
1338 _status = msg.serialize(args);
1354 void FileDownlinkComponentBase ::
1355 Cancel_cmdHandlerBase(
1362 this->Cancel_preMsgHook(opCode,cmdSeq);
1366 ComponentIpcSerializableBuffer msg;
1379 _status = msg.serialize(port);
1385 _status = msg.serialize(opCode);
1391 _status = msg.serialize(cmdSeq);
1397 _status = msg.serialize(args);
1413 void FileDownlinkComponentBase ::
1414 SendPartial_cmdHandlerBase(
1421 this->SendPartial_preMsgHook(opCode,cmdSeq);
1425 ComponentIpcSerializableBuffer msg;
1429 _status = msg.serialize(
static_cast<FwEnumStoreType>(CMD_SENDPARTIAL));
1438 _status = msg.serialize(port);
1444 _status = msg.serialize(opCode);
1450 _status = msg.serialize(cmdSeq);
1456 _status = msg.serialize(args);
1480 void FileDownlinkComponentBase ::
1481 SendFile_preMsgHook(
1491 void FileDownlinkComponentBase ::
1502 void FileDownlinkComponentBase ::
1503 SendPartial_preMsgHook(
1517 void FileDownlinkComponentBase ::
1518 log_WARNING_HI_FileOpenError(
const Fw::StringBase& fileName)
const
1522 if (this->m_timeCaller_OutputPort[0].isConnected()) {
1523 this->m_timeCaller_OutputPort[0].invoke(_logTime);
1528 _id = this->getIdBase() + EVENTID_FILEOPENERROR;
1531 if (this->m_eventOut_OutputPort[0].isConnected()) {
1535#if FW_AMPCS_COMPATIBLE
1550 this->m_eventOut_OutputPort[0].invoke(
1559#if FW_ENABLE_TEXT_LOGGING
1560 if (this->m_textEventOut_OutputPort[0].isConnected()) {
1561#if FW_OBJECT_NAMES == 1
1562 const char* _formatString =
1563 "(%s) %s: Could not open file %s";
1565 const char* _formatString =
1566 "%s: Could not open file %s";
1573 this->m_objName.toChar(),
1579 this->m_textEventOut_OutputPort[0].invoke(
1589 void FileDownlinkComponentBase ::
1590 log_WARNING_HI_FileReadError(
1597 if (this->m_timeCaller_OutputPort[0].isConnected()) {
1598 this->m_timeCaller_OutputPort[0].invoke(_logTime);
1603 _id = this->getIdBase() + EVENTID_FILEREADERROR;
1606 if (this->m_eventOut_OutputPort[0].isConnected()) {
1610#if FW_AMPCS_COMPATIBLE
1625#if FW_AMPCS_COMPATIBLE
1628 static_cast<U8>(
sizeof(I32))
1641 this->m_eventOut_OutputPort[0].invoke(
1650#if FW_ENABLE_TEXT_LOGGING
1651 if (this->m_textEventOut_OutputPort[0].isConnected()) {
1652#if FW_OBJECT_NAMES == 1
1653 const char* _formatString =
1654 "(%s) %s: Could not read file %s with status %" PRIi32
"";
1656 const char* _formatString =
1657 "%s: Could not read file %s with status %" PRIi32
"";
1664 this->m_objName.toChar(),
1671 this->m_textEventOut_OutputPort[0].invoke(
1681 void FileDownlinkComponentBase ::
1682 log_ACTIVITY_HI_FileSent(
1689 if (this->m_timeCaller_OutputPort[0].isConnected()) {
1690 this->m_timeCaller_OutputPort[0].invoke(_logTime);
1695 _id = this->getIdBase() + EVENTID_FILESENT;
1698 if (this->m_eventOut_OutputPort[0].isConnected()) {
1702#if FW_AMPCS_COMPATIBLE
1723 this->m_eventOut_OutputPort[0].invoke(
1732#if FW_ENABLE_TEXT_LOGGING
1733 if (this->m_textEventOut_OutputPort[0].isConnected()) {
1734#if FW_OBJECT_NAMES == 1
1735 const char* _formatString =
1736 "(%s) %s: Sent file %s to file %s";
1738 const char* _formatString =
1739 "%s: Sent file %s to file %s";
1746 this->m_objName.toChar(),
1753 this->m_textEventOut_OutputPort[0].invoke(
1763 void FileDownlinkComponentBase ::
1764 log_ACTIVITY_HI_DownlinkCanceled(
1771 if (this->m_timeCaller_OutputPort[0].isConnected()) {
1772 this->m_timeCaller_OutputPort[0].invoke(_logTime);
1777 _id = this->getIdBase() + EVENTID_DOWNLINKCANCELED;
1780 if (this->m_eventOut_OutputPort[0].isConnected()) {
1784#if FW_AMPCS_COMPATIBLE
1805 this->m_eventOut_OutputPort[0].invoke(
1814#if FW_ENABLE_TEXT_LOGGING
1815 if (this->m_textEventOut_OutputPort[0].isConnected()) {
1816#if FW_OBJECT_NAMES == 1
1817 const char* _formatString =
1818 "(%s) %s: Canceled downlink of file %s to file %s";
1820 const char* _formatString =
1821 "%s: Canceled downlink of file %s to file %s";
1828 this->m_objName.toChar(),
1830 "DownlinkCanceled ",
1835 this->m_textEventOut_OutputPort[0].invoke(
1845 void FileDownlinkComponentBase ::
1846 log_WARNING_HI_DownlinkTimeout(
1853 if (this->m_timeCaller_OutputPort[0].isConnected()) {
1854 this->m_timeCaller_OutputPort[0].invoke(_logTime);
1859 _id = this->getIdBase() + EVENTID_DOWNLINKTIMEOUT;
1862 if (this->m_eventOut_OutputPort[0].isConnected()) {
1866#if FW_AMPCS_COMPATIBLE
1887 this->m_eventOut_OutputPort[0].invoke(
1896#if FW_ENABLE_TEXT_LOGGING
1897 if (this->m_textEventOut_OutputPort[0].isConnected()) {
1898#if FW_OBJECT_NAMES == 1
1899 const char* _formatString =
1900 "(%s) %s: Timeout occurred during downlink of file %s to file %s. Downlink has been canceled.";
1902 const char* _formatString =
1903 "%s: Timeout occurred during downlink of file %s to file %s. Downlink has been canceled.";
1910 this->m_objName.toChar(),
1917 this->m_textEventOut_OutputPort[0].invoke(
1927 void FileDownlinkComponentBase ::
1928 log_WARNING_LO_DownlinkPartialWarning(
1938 if (this->m_timeCaller_OutputPort[0].isConnected()) {
1939 this->m_timeCaller_OutputPort[0].invoke(_logTime);
1944 _id = this->getIdBase() + EVENTID_DOWNLINKPARTIALWARNING;
1947 if (this->m_eventOut_OutputPort[0].isConnected()) {
1951#if FW_AMPCS_COMPATIBLE
1960#if FW_AMPCS_COMPATIBLE
1963 static_cast<U8>(
sizeof(U32))
1970 _status = _logBuff.
serialize(startOffset);
1976#if FW_AMPCS_COMPATIBLE
1979 static_cast<U8>(
sizeof(U32))
1992#if FW_AMPCS_COMPATIBLE
1995 static_cast<U8>(
sizeof(U32))
2020 this->m_eventOut_OutputPort[0].invoke(
2029#if FW_ENABLE_TEXT_LOGGING
2030 if (this->m_textEventOut_OutputPort[0].isConnected()) {
2031#if FW_OBJECT_NAMES == 1
2032 const char* _formatString =
2033 "(%s) %s: Offset %" PRIu32
" plus length %" PRIu32
" is greater than source size %" PRIu32
" for partial downlink of file %s to file %s. ";
2035 const char* _formatString =
2036 "%s: Offset %" PRIu32
" plus length %" PRIu32
" is greater than source size %" PRIu32
" for partial downlink of file %s to file %s. ";
2043 this->m_objName.toChar(),
2045 "DownlinkPartialWarning ",
2053 this->m_textEventOut_OutputPort[0].invoke(
2063 void FileDownlinkComponentBase ::
2064 log_WARNING_HI_DownlinkPartialFail(
2073 if (this->m_timeCaller_OutputPort[0].isConnected()) {
2074 this->m_timeCaller_OutputPort[0].invoke(_logTime);
2079 _id = this->getIdBase() + EVENTID_DOWNLINKPARTIALFAIL;
2082 if (this->m_eventOut_OutputPort[0].isConnected()) {
2086#if FW_AMPCS_COMPATIBLE
2107#if FW_AMPCS_COMPATIBLE
2110 static_cast<U8>(
sizeof(U32))
2117 _status = _logBuff.
serialize(startOffset);
2123#if FW_AMPCS_COMPATIBLE
2126 static_cast<U8>(
sizeof(U32))
2139 this->m_eventOut_OutputPort[0].invoke(
2148#if FW_ENABLE_TEXT_LOGGING
2149 if (this->m_textEventOut_OutputPort[0].isConnected()) {
2150#if FW_OBJECT_NAMES == 1
2151 const char* _formatString =
2152 "(%s) %s: Error occurred during partial downlink of file %s to file %s. Offset %" PRIu32
" greater than or equal to source filesize %" PRIu32
".";
2154 const char* _formatString =
2155 "%s: Error occurred during partial downlink of file %s to file %s. Offset %" PRIu32
" greater than or equal to source filesize %" PRIu32
".";
2162 this->m_objName.toChar(),
2164 "DownlinkPartialFail ",
2171 this->m_textEventOut_OutputPort[0].invoke(
2181 void FileDownlinkComponentBase ::
2182 log_WARNING_HI_SendDataFail(
2189 if (this->m_timeCaller_OutputPort[0].isConnected()) {
2190 this->m_timeCaller_OutputPort[0].invoke(_logTime);
2195 _id = this->getIdBase() + EVENTID_SENDDATAFAIL;
2198 if (this->m_eventOut_OutputPort[0].isConnected()) {
2202#if FW_AMPCS_COMPATIBLE
2217#if FW_AMPCS_COMPATIBLE
2220 static_cast<U8>(
sizeof(U32))
2227 _status = _logBuff.
serialize(byteOffset);
2233 this->m_eventOut_OutputPort[0].invoke(
2242#if FW_ENABLE_TEXT_LOGGING
2243 if (this->m_textEventOut_OutputPort[0].isConnected()) {
2244#if FW_OBJECT_NAMES == 1
2245 const char* _formatString =
2246 "(%s) %s: Failed to send data packet from file %s at byte offset %" PRIu32
".";
2248 const char* _formatString =
2249 "%s: Failed to send data packet from file %s at byte offset %" PRIu32
".";
2256 this->m_objName.toChar(),
2263 this->m_textEventOut_OutputPort[0].invoke(
2273 void FileDownlinkComponentBase ::
2274 log_ACTIVITY_HI_SendStarted(
2282 if (this->m_timeCaller_OutputPort[0].isConnected()) {
2283 this->m_timeCaller_OutputPort[0].invoke(_logTime);
2288 _id = this->getIdBase() + EVENTID_SENDSTARTED;
2291 if (this->m_eventOut_OutputPort[0].isConnected()) {
2295#if FW_AMPCS_COMPATIBLE
2304#if FW_AMPCS_COMPATIBLE
2307 static_cast<U8>(
sizeof(U32))
2332 this->m_eventOut_OutputPort[0].invoke(
2341#if FW_ENABLE_TEXT_LOGGING
2342 if (this->m_textEventOut_OutputPort[0].isConnected()) {
2343#if FW_OBJECT_NAMES == 1
2344 const char* _formatString =
2345 "(%s) %s: Downlink of %" PRIu32
" bytes started from %s to %s";
2347 const char* _formatString =
2348 "%s: Downlink of %" PRIu32
" bytes started from %s to %s";
2355 this->m_objName.toChar(),
2363 this->m_textEventOut_OutputPort[0].invoke(
2377 void FileDownlinkComponentBase ::
2383 if (this->m_tlmOut_OutputPort[0].isConnected()) {
2385 this->m_timeCaller_OutputPort[0].isConnected() &&
2388 this->m_timeCaller_OutputPort[0].invoke(_tlmTime);
2400 _id = this->getIdBase() + CHANNELID_FILESSENT;
2402 this->m_tlmOut_OutputPort[0].invoke(
2410 void FileDownlinkComponentBase ::
2411 tlmWrite_PacketsSent(
2416 if (this->m_tlmOut_OutputPort[0].isConnected()) {
2418 this->m_timeCaller_OutputPort[0].isConnected() &&
2421 this->m_timeCaller_OutputPort[0].invoke(_tlmTime);
2433 _id = this->getIdBase() + CHANNELID_PACKETSSENT;
2435 this->m_tlmOut_OutputPort[0].invoke(
2443 void FileDownlinkComponentBase ::
2449 if (this->m_tlmOut_OutputPort[0].isConnected()) {
2451 this->m_timeCaller_OutputPort[0].isConnected() &&
2454 this->m_timeCaller_OutputPort[0].invoke(_tlmTime);
2466 _id = this->getIdBase() + CHANNELID_WARNINGS;
2468 this->m_tlmOut_OutputPort[0].invoke(
2483 if (this->m_timeCaller_OutputPort[0].isConnected()) {
2485 this->m_timeCaller_OutputPort[0].invoke(_time);
2500 void FileDownlinkComponentBase ::
2503 this->m_guardedPortMutex.lock();
2506 void FileDownlinkComponentBase ::
2509 this->m_guardedPortMutex.unLock();
2519 ComponentIpcSerializableBuffer msg;
2542 MsgTypeEnum msgType =
static_cast<MsgTypeEnum
>(desMsg);
2544 if (msgType == FILEDOWNLINK_COMPONENT_EXIT) {
2545 return MSG_DISPATCH_EXIT;
2549 deserStatus = msg.deserialize(portNum);
2560 deserStatus = msg.deserialize(context);
2575 case BUFFERRETURN_BUFFERSEND: {
2578 deserStatus = msg.deserialize(fwBuffer);
2584 this->bufferReturn_handler(
2596 deserStatus = msg.deserialize(key);
2602 this->pingIn_handler(
2611 case CMD_SENDFILE: {
2614 deserStatus = msg.deserialize(opCode);
2622 deserStatus = msg.deserialize(cmdSeq);
2630 deserStatus = msg.deserialize(args);
2643 if (this->m_cmdResponseOut_OutputPort[0].isConnected()) {
2644 this->cmdResponse_out(
2658 if (this->m_cmdResponseOut_OutputPort[0].isConnected()) {
2659 this->cmdResponse_out(
2671#if FW_CMD_CHECK_RESIDUAL
2673 if (this->m_cmdResponseOut_OutputPort[0].isConnected()) {
2682 this->SendFile_cmdHandler(
2695 deserStatus = msg.deserialize(opCode);
2703 deserStatus = msg.deserialize(cmdSeq);
2711 deserStatus = msg.deserialize(args);
2722#if FW_CMD_CHECK_RESIDUAL
2724 if (this->m_cmdResponseOut_OutputPort[0].isConnected()) {
2733 this->Cancel_cmdHandler(opCode, cmdSeq);
2739 case CMD_SENDPARTIAL: {
2742 deserStatus = msg.deserialize(opCode);
2750 deserStatus = msg.deserialize(cmdSeq);
2758 deserStatus = msg.deserialize(args);
2771 if (this->m_cmdResponseOut_OutputPort[0].isConnected()) {
2772 this->cmdResponse_out(
2786 if (this->m_cmdResponseOut_OutputPort[0].isConnected()) {
2787 this->cmdResponse_out(
2801 if (this->m_cmdResponseOut_OutputPort[0].isConnected()) {
2802 this->cmdResponse_out(
2816 if (this->m_cmdResponseOut_OutputPort[0].isConnected()) {
2817 this->cmdResponse_out(
2829#if FW_CMD_CHECK_RESIDUAL
2831 if (this->m_cmdResponseOut_OutputPort[0].isConnected()) {
2840 this->SendPartial_cmdHandler(
2852 return MSG_DISPATCH_ERROR;
2855 return MSG_DISPATCH_OK;
2862 void FileDownlinkComponentBase ::
2872 FileDownlinkComponentBase* compPtr =
static_cast<FileDownlinkComponentBase*
>(callComp);
2874 const U32 idBase = callComp->
getIdBase();
2878 switch (opCode - idBase) {
2879 case OPCODE_SENDFILE: {
2880 compPtr->SendFile_cmdHandlerBase(
2888 case OPCODE_CANCEL: {
2889 compPtr->Cancel_cmdHandlerBase(
2897 case OPCODE_SENDPARTIAL: {
2898 compPtr->SendPartial_cmdHandlerBase(
2912 void FileDownlinkComponentBase ::
2920 FileDownlinkComponentBase* compPtr =
static_cast<FileDownlinkComponentBase*
>(callComp);
2921 compPtr->Run_handlerBase(
2938 FileDownlinkComponentBase* compPtr =
static_cast<FileDownlinkComponentBase*
>(callComp);
2939 return compPtr->SendFile_handlerBase(
2948 void FileDownlinkComponentBase ::
2949 m_p_bufferReturn_in(
2956 FileDownlinkComponentBase* compPtr =
static_cast<FileDownlinkComponentBase*
>(callComp);
2957 compPtr->bufferReturn_handlerBase(
2963 void FileDownlinkComponentBase ::
2971 FileDownlinkComponentBase* compPtr =
static_cast<FileDownlinkComponentBase*
>(callComp);
2972 compPtr->pingIn_handlerBase(
#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
PlatformSizeType FwSizeType
#define FW_LOG_STRING_MAX_SIZE
Max size of log string parameter type.
PlatformQueuePriorityType FwQueuePriorityType
PlatformIndexType FwIndexType
#define FW_OBJECT_NAMES
Indicates whether or not object names are stored (more memory, can be used for tracking objects)/*#en...
@ 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.
void init()
Object initializer.
const char * toChar() const
NATIVE_UINT_TYPE SizeType
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
void format(const CHAR *formatString,...)
write formatted string to buffer
virtual SerializeStatus serialize(SerializeBufferBase &buffer) const
serialization function
virtual const CHAR * toChar() const =0
@ BLOCKING
Message will block until space is available.
@ NONBLOCKING
Message will return with status when space is unavailable.
Status
status returned from the queue send function
@ OP_OK
message sent/received okay
Send file response struct.
SerializeStatus
forward declaration for string
@ FW_SERIALIZE_OK
Serialization/Deserialization operation was successful.