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];
91 this->m_cmdIn_InputPort[port].
init();
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());
115 this->m_Run_InputPort[port].
init();
122 #if FW_OBJECT_NAMES == 1 126 this->m_objName.toChar(),
129 this->m_Run_InputPort[port].setObjName(portName.
toChar());
139 this->m_SendFile_InputPort[port].
init();
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());
163 this->m_bufferReturn_InputPort[port].
init();
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());
187 this->m_pingIn_InputPort[port].
init();
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());
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());
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());
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());
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());
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());
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());
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());
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)
385 static_cast<FwAssertArgType>(qStat)
398 static_cast<FwAssertArgType>(portNum)
401 return &this->m_cmdIn_InputPort[portNum];
413 static_cast<FwAssertArgType>(portNum)
416 return &this->m_Run_InputPort[portNum];
424 static_cast<FwAssertArgType>(portNum)
427 return &this->m_SendFile_InputPort[portNum];
435 static_cast<FwAssertArgType>(portNum)
438 return &this->m_bufferReturn_InputPort[portNum];
446 static_cast<FwAssertArgType>(portNum)
449 return &this->m_pingIn_InputPort[portNum];
464 static_cast<FwAssertArgType>(portNum)
467 this->m_cmdRegOut_OutputPort[portNum].
addCallPort(port);
478 static_cast<FwAssertArgType>(portNum)
481 this->m_cmdResponseOut_OutputPort[portNum].
addCallPort(port);
492 static_cast<FwAssertArgType>(portNum)
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(),
508 static_cast<FwAssertArgType>(portNum)
511 this->m_textEventOut_OutputPort[portNum].addCallPort(port);
524 static_cast<FwAssertArgType>(portNum)
527 this->m_timeCaller_OutputPort[portNum].
addCallPort(port);
538 static_cast<FwAssertArgType>(portNum)
541 this->m_tlmOut_OutputPort[portNum].
addCallPort(port);
556 static_cast<FwAssertArgType>(portNum)
559 this->m_FileComplete_OutputPort[portNum].
addCallPort(port);
570 static_cast<FwAssertArgType>(portNum)
573 this->m_bufferSendOut_OutputPort[portNum].
addCallPort(port);
584 static_cast<FwAssertArgType>(portNum)
587 this->m_pingOut_OutputPort[portNum].
addCallPort(port);
590 #if FW_PORT_SERIALIZATION 599 Fw::InputSerializePort* port
604 static_cast<FwAssertArgType>(portNum)
607 this->m_cmdRegOut_OutputPort[portNum].registerSerialPort(port);
613 Fw::InputSerializePort* port
618 static_cast<FwAssertArgType>(portNum)
621 this->m_cmdResponseOut_OutputPort[portNum].registerSerialPort(port);
627 Fw::InputSerializePort* port
632 static_cast<FwAssertArgType>(portNum)
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(),
648 static_cast<FwAssertArgType>(portNum)
651 this->m_textEventOut_OutputPort[portNum].registerSerialPort(port);
659 Fw::InputSerializePort* port
664 static_cast<FwAssertArgType>(portNum)
667 this->m_timeCaller_OutputPort[portNum].registerSerialPort(port);
673 Fw::InputSerializePort* port
678 static_cast<FwAssertArgType>(portNum)
681 this->m_tlmOut_OutputPort[portNum].registerSerialPort(port);
686 #if FW_PORT_SERIALIZATION 695 Fw::InputSerializePort* port
700 static_cast<FwAssertArgType>(portNum)
703 this->m_FileComplete_OutputPort[portNum].registerSerialPort(port);
709 Fw::InputSerializePort* port
714 static_cast<FwAssertArgType>(portNum)
717 this->m_bufferSendOut_OutputPort[portNum].registerSerialPort(port);
723 Fw::InputSerializePort* port
728 static_cast<FwAssertArgType>(portNum)
731 this->m_pingOut_OutputPort[portNum].registerSerialPort(port);
743 FW_ASSERT(this->m_cmdRegOut_OutputPort[0].isConnected());
745 this->m_cmdRegOut_OutputPort[0].
invoke(
749 this->m_cmdRegOut_OutputPort[0].
invoke(
753 this->m_cmdRegOut_OutputPort[0].
invoke(
764 Fw::ActiveComponentBase(compName)
835 #if FW_ENABLE_TEXT_LOGGING == 1 838 getNum_textEventOut_OutputPorts()
const 888 static_cast<FwAssertArgType>(portNum)
891 return this->m_cmdRegOut_OutputPort[portNum].
isConnected();
899 static_cast<FwAssertArgType>(portNum)
902 return this->m_cmdResponseOut_OutputPort[portNum].
isConnected();
910 static_cast<FwAssertArgType>(portNum)
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(),
923 static_cast<FwAssertArgType>(portNum)
926 return this->m_textEventOut_OutputPort[portNum].isConnected();
936 static_cast<FwAssertArgType>(portNum)
939 return this->m_timeCaller_OutputPort[portNum].
isConnected();
947 static_cast<FwAssertArgType>(portNum)
950 return this->m_tlmOut_OutputPort[portNum].
isConnected();
962 static_cast<FwAssertArgType>(portNum)
965 return this->m_FileComplete_OutputPort[portNum].
isConnected();
973 static_cast<FwAssertArgType>(portNum)
976 return this->m_bufferSendOut_OutputPort[portNum].
isConnected();
984 static_cast<FwAssertArgType>(portNum)
987 return this->m_pingOut_OutputPort[portNum].
isConnected();
1005 static_cast<FwAssertArgType>(portNum)
1013 ComponentIpcSerializableBuffer msg;
1017 _status = msg.serialize(
1018 static_cast<FwEnumStoreType>(RUN_SCHED)
1022 static_cast<FwAssertArgType>(_status)
1026 _status = msg.serialize(portNum);
1029 static_cast<FwAssertArgType>(_status)
1033 _status = msg.serialize(context);
1036 static_cast<FwAssertArgType>(_status)
1045 static_cast<FwAssertArgType>(qStatus)
1061 static_cast<FwAssertArgType>(portNum)
1093 static_cast<FwAssertArgType>(portNum)
1101 ComponentIpcSerializableBuffer msg;
1105 _status = msg.serialize(
1106 static_cast<FwEnumStoreType>(BUFFERRETURN_BUFFERSEND)
1110 static_cast<FwAssertArgType>(_status)
1114 _status = msg.serialize(portNum);
1117 static_cast<FwAssertArgType>(_status)
1121 _status = msg.serialize(fwBuffer);
1124 static_cast<FwAssertArgType>(_status)
1133 static_cast<FwAssertArgType>(qStatus)
1146 static_cast<FwAssertArgType>(portNum)
1154 ComponentIpcSerializableBuffer msg;
1158 _status = msg.serialize(
1159 static_cast<FwEnumStoreType>(PINGIN_PING)
1163 static_cast<FwAssertArgType>(_status)
1167 _status = msg.serialize(portNum);
1170 static_cast<FwAssertArgType>(_status)
1174 _status = msg.serialize(key);
1177 static_cast<FwAssertArgType>(_status)
1186 static_cast<FwAssertArgType>(qStatus)
1237 static_cast<FwAssertArgType>(portNum)
1239 this->m_FileComplete_OutputPort[portNum].
invoke(
1252 static_cast<FwAssertArgType>(portNum)
1254 this->m_bufferSendOut_OutputPort[portNum].
invoke(
1267 static_cast<FwAssertArgType>(portNum)
1269 this->m_pingOut_OutputPort[portNum].
invoke(
1285 FW_ASSERT(this->m_cmdResponseOut_OutputPort[0].isConnected());
1286 this->m_cmdResponseOut_OutputPort[0].
invoke(opCode, cmdSeq, response);
1307 ComponentIpcSerializableBuffer msg;
1311 _status = msg.serialize(static_cast<FwEnumStoreType>(CMD_SENDFILE));
1314 static_cast<FwAssertArgType>(_status)
1320 _status = msg.serialize(port);
1323 static_cast<FwAssertArgType>(_status)
1326 _status = msg.serialize(opCode);
1329 static_cast<FwAssertArgType>(_status)
1332 _status = msg.serialize(cmdSeq);
1335 static_cast<FwAssertArgType>(_status)
1338 _status = msg.serialize(args);
1341 static_cast<FwAssertArgType>(_status)
1350 static_cast<FwAssertArgType>(qStatus)
1366 ComponentIpcSerializableBuffer msg;
1370 _status = msg.serialize(static_cast<FwEnumStoreType>(CMD_CANCEL));
1373 static_cast<FwAssertArgType>(_status)
1379 _status = msg.serialize(port);
1382 static_cast<FwAssertArgType>(_status)
1385 _status = msg.serialize(opCode);
1388 static_cast<FwAssertArgType>(_status)
1391 _status = msg.serialize(cmdSeq);
1394 static_cast<FwAssertArgType>(_status)
1397 _status = msg.serialize(args);
1400 static_cast<FwAssertArgType>(_status)
1409 static_cast<FwAssertArgType>(qStatus)
1425 ComponentIpcSerializableBuffer msg;
1429 _status = msg.serialize(static_cast<FwEnumStoreType>(CMD_SENDPARTIAL));
1432 static_cast<FwAssertArgType>(_status)
1438 _status = msg.serialize(port);
1441 static_cast<FwAssertArgType>(_status)
1444 _status = msg.serialize(opCode);
1447 static_cast<FwAssertArgType>(_status)
1450 _status = msg.serialize(cmdSeq);
1453 static_cast<FwAssertArgType>(_status)
1456 _status = msg.serialize(args);
1459 static_cast<FwAssertArgType>(_status)
1468 static_cast<FwAssertArgType>(qStatus)
1522 if (this->m_timeCaller_OutputPort[0].isConnected()) {
1523 this->m_timeCaller_OutputPort[0].
invoke(_logTime);
1531 if (this->m_eventOut_OutputPort[0].isConnected()) {
1535 #if FW_AMPCS_COMPATIBLE 1537 _status = _logBuff.
serialize(static_cast<U8>(1));
1540 static_cast<FwAssertArgType>(_status)
1547 static_cast<FwAssertArgType>(_status)
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(
1597 if (this->m_timeCaller_OutputPort[0].isConnected()) {
1598 this->m_timeCaller_OutputPort[0].
invoke(_logTime);
1606 if (this->m_eventOut_OutputPort[0].isConnected()) {
1610 #if FW_AMPCS_COMPATIBLE 1612 _status = _logBuff.
serialize(static_cast<U8>(2));
1615 static_cast<FwAssertArgType>(_status)
1622 static_cast<FwAssertArgType>(_status)
1625 #if FW_AMPCS_COMPATIBLE 1628 static_cast<U8>(
sizeof(I32))
1632 static_cast<FwAssertArgType>(_status)
1638 static_cast<FwAssertArgType>(_status)
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(
1689 if (this->m_timeCaller_OutputPort[0].isConnected()) {
1690 this->m_timeCaller_OutputPort[0].
invoke(_logTime);
1698 if (this->m_eventOut_OutputPort[0].isConnected()) {
1702 #if FW_AMPCS_COMPATIBLE 1704 _status = _logBuff.
serialize(static_cast<U8>(2));
1707 static_cast<FwAssertArgType>(_status)
1714 static_cast<FwAssertArgType>(_status)
1720 static_cast<FwAssertArgType>(_status)
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(
1771 if (this->m_timeCaller_OutputPort[0].isConnected()) {
1772 this->m_timeCaller_OutputPort[0].
invoke(_logTime);
1780 if (this->m_eventOut_OutputPort[0].isConnected()) {
1784 #if FW_AMPCS_COMPATIBLE 1786 _status = _logBuff.
serialize(static_cast<U8>(2));
1789 static_cast<FwAssertArgType>(_status)
1796 static_cast<FwAssertArgType>(_status)
1802 static_cast<FwAssertArgType>(_status)
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(
1853 if (this->m_timeCaller_OutputPort[0].isConnected()) {
1854 this->m_timeCaller_OutputPort[0].
invoke(_logTime);
1862 if (this->m_eventOut_OutputPort[0].isConnected()) {
1866 #if FW_AMPCS_COMPATIBLE 1868 _status = _logBuff.
serialize(static_cast<U8>(2));
1871 static_cast<FwAssertArgType>(_status)
1878 static_cast<FwAssertArgType>(_status)
1884 static_cast<FwAssertArgType>(_status)
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(
1938 if (this->m_timeCaller_OutputPort[0].isConnected()) {
1939 this->m_timeCaller_OutputPort[0].
invoke(_logTime);
1947 if (this->m_eventOut_OutputPort[0].isConnected()) {
1951 #if FW_AMPCS_COMPATIBLE 1953 _status = _logBuff.
serialize(static_cast<U8>(5));
1956 static_cast<FwAssertArgType>(_status)
1960 #if FW_AMPCS_COMPATIBLE 1963 static_cast<U8>(
sizeof(U32))
1967 static_cast<FwAssertArgType>(_status)
1970 _status = _logBuff.
serialize(startOffset);
1973 static_cast<FwAssertArgType>(_status)
1976 #if FW_AMPCS_COMPATIBLE 1979 static_cast<U8>(
sizeof(U32))
1983 static_cast<FwAssertArgType>(_status)
1989 static_cast<FwAssertArgType>(_status)
1992 #if FW_AMPCS_COMPATIBLE 1995 static_cast<U8>(
sizeof(U32))
1999 static_cast<FwAssertArgType>(_status)
2005 static_cast<FwAssertArgType>(_status)
2011 static_cast<FwAssertArgType>(_status)
2017 static_cast<FwAssertArgType>(_status)
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(
2073 if (this->m_timeCaller_OutputPort[0].isConnected()) {
2074 this->m_timeCaller_OutputPort[0].
invoke(_logTime);
2082 if (this->m_eventOut_OutputPort[0].isConnected()) {
2086 #if FW_AMPCS_COMPATIBLE 2088 _status = _logBuff.
serialize(static_cast<U8>(4));
2091 static_cast<FwAssertArgType>(_status)
2098 static_cast<FwAssertArgType>(_status)
2104 static_cast<FwAssertArgType>(_status)
2107 #if FW_AMPCS_COMPATIBLE 2110 static_cast<U8>(
sizeof(U32))
2114 static_cast<FwAssertArgType>(_status)
2117 _status = _logBuff.
serialize(startOffset);
2120 static_cast<FwAssertArgType>(_status)
2123 #if FW_AMPCS_COMPATIBLE 2126 static_cast<U8>(
sizeof(U32))
2130 static_cast<FwAssertArgType>(_status)
2136 static_cast<FwAssertArgType>(_status)
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(
2189 if (this->m_timeCaller_OutputPort[0].isConnected()) {
2190 this->m_timeCaller_OutputPort[0].
invoke(_logTime);
2198 if (this->m_eventOut_OutputPort[0].isConnected()) {
2202 #if FW_AMPCS_COMPATIBLE 2204 _status = _logBuff.
serialize(static_cast<U8>(2));
2207 static_cast<FwAssertArgType>(_status)
2214 static_cast<FwAssertArgType>(_status)
2217 #if FW_AMPCS_COMPATIBLE 2220 static_cast<U8>(
sizeof(U32))
2224 static_cast<FwAssertArgType>(_status)
2227 _status = _logBuff.
serialize(byteOffset);
2230 static_cast<FwAssertArgType>(_status)
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(
2282 if (this->m_timeCaller_OutputPort[0].isConnected()) {
2283 this->m_timeCaller_OutputPort[0].
invoke(_logTime);
2291 if (this->m_eventOut_OutputPort[0].isConnected()) {
2295 #if FW_AMPCS_COMPATIBLE 2297 _status = _logBuff.
serialize(static_cast<U8>(3));
2300 static_cast<FwAssertArgType>(_status)
2304 #if FW_AMPCS_COMPATIBLE 2307 static_cast<U8>(
sizeof(U32))
2311 static_cast<FwAssertArgType>(_status)
2317 static_cast<FwAssertArgType>(_status)
2323 static_cast<FwAssertArgType>(_status)
2329 static_cast<FwAssertArgType>(_status)
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(
2383 if (this->m_tlmOut_OutputPort[0].isConnected()) {
2385 this->m_timeCaller_OutputPort[0].isConnected() &&
2388 this->m_timeCaller_OutputPort[0].
invoke(_tlmTime);
2395 static_cast<FwAssertArgType>(_stat)
2402 this->m_tlmOut_OutputPort[0].
invoke(
2416 if (this->m_tlmOut_OutputPort[0].isConnected()) {
2418 this->m_timeCaller_OutputPort[0].isConnected() &&
2421 this->m_timeCaller_OutputPort[0].
invoke(_tlmTime);
2428 static_cast<FwAssertArgType>(_stat)
2435 this->m_tlmOut_OutputPort[0].
invoke(
2449 if (this->m_tlmOut_OutputPort[0].isConnected()) {
2451 this->m_timeCaller_OutputPort[0].isConnected() &&
2454 this->m_timeCaller_OutputPort[0].
invoke(_tlmTime);
2461 static_cast<FwAssertArgType>(_stat)
2468 this->m_tlmOut_OutputPort[0].
invoke(
2483 if (this->m_timeCaller_OutputPort[0].isConnected()) {
2485 this->m_timeCaller_OutputPort[0].
invoke(_time);
2503 this->m_guardedPortMutex.
lock();
2509 this->m_guardedPortMutex.
unLock();
2519 ComponentIpcSerializableBuffer msg;
2529 static_cast<FwAssertArgType>(msgStatus)
2539 static_cast<FwAssertArgType>(deserStatus)
2542 MsgTypeEnum msgType =
static_cast<MsgTypeEnum
>(desMsg);
2544 if (msgType == FILEDOWNLINK_COMPONENT_EXIT) {
2549 deserStatus = msg.deserialize(portNum);
2552 static_cast<FwAssertArgType>(deserStatus)
2560 deserStatus = msg.deserialize(context);
2563 static_cast<FwAssertArgType>(deserStatus)
2575 case BUFFERRETURN_BUFFERSEND: {
2578 deserStatus = msg.deserialize(fwBuffer);
2581 static_cast<FwAssertArgType>(deserStatus)
2596 deserStatus = msg.deserialize(key);
2599 static_cast<FwAssertArgType>(deserStatus)
2611 case CMD_SENDFILE: {
2614 deserStatus = msg.deserialize(opCode);
2617 static_cast<FwAssertArgType>(deserStatus)
2622 deserStatus = msg.deserialize(cmdSeq);
2625 static_cast<FwAssertArgType>(deserStatus)
2630 deserStatus = msg.deserialize(args);
2633 static_cast<FwAssertArgType>(deserStatus)
2643 if (this->m_cmdResponseOut_OutputPort[0].isConnected()) {
2658 if (this->m_cmdResponseOut_OutputPort[0].isConnected()) {
2671 #if FW_CMD_CHECK_RESIDUAL 2673 if (this->m_cmdResponseOut_OutputPort[0].isConnected()) {
2695 deserStatus = msg.deserialize(opCode);
2698 static_cast<FwAssertArgType>(deserStatus)
2703 deserStatus = msg.deserialize(cmdSeq);
2706 static_cast<FwAssertArgType>(deserStatus)
2711 deserStatus = msg.deserialize(args);
2714 static_cast<FwAssertArgType>(deserStatus)
2722 #if FW_CMD_CHECK_RESIDUAL 2724 if (this->m_cmdResponseOut_OutputPort[0].isConnected()) {
2739 case CMD_SENDPARTIAL: {
2742 deserStatus = msg.deserialize(opCode);
2745 static_cast<FwAssertArgType>(deserStatus)
2750 deserStatus = msg.deserialize(cmdSeq);
2753 static_cast<FwAssertArgType>(deserStatus)
2758 deserStatus = msg.deserialize(args);
2761 static_cast<FwAssertArgType>(deserStatus)
2771 if (this->m_cmdResponseOut_OutputPort[0].isConnected()) {
2786 if (this->m_cmdResponseOut_OutputPort[0].isConnected()) {
2801 if (this->m_cmdResponseOut_OutputPort[0].isConnected()) {
2816 if (this->m_cmdResponseOut_OutputPort[0].isConnected()) {
2829 #if FW_CMD_CHECK_RESIDUAL 2831 if (this->m_cmdResponseOut_OutputPort[0].isConnected()) {
2862 void FileDownlinkComponentBase ::
2874 const U32 idBase = callComp->
getIdBase();
2875 FW_ASSERT(opCode >= idBase, static_cast<FwAssertArgType>(opCode), static_cast<FwAssertArgType>(idBase));
2878 switch (opCode - idBase) {
2880 compPtr->SendFile_cmdHandlerBase(
2889 compPtr->Cancel_cmdHandlerBase(
2898 compPtr->SendPartial_cmdHandlerBase(
2912 void FileDownlinkComponentBase ::
2921 compPtr->Run_handlerBase(
2939 return compPtr->SendFile_handlerBase(
2948 void FileDownlinkComponentBase ::
2949 m_p_bufferReturn_in(
2957 compPtr->bufferReturn_handlerBase(
2963 void FileDownlinkComponentBase ::
2972 compPtr->pingIn_handlerBase(
Serialization/Deserialization operation was successful.
Cancel the downlink in progress, if any.
void addCallPort(InputTimePort *callPort)
Register an input port.
bool isConnected_timeCaller_OutputPort(FwIndexType portNum)
FwIndexType getNum_cmdIn_InputPorts() const
void Cancel_cmdHandlerBase(FwOpcodeType opCode, U32 cmdSeq, Fw::CmdArgBuffer &args)
void regCommands()
Register commands with the Command Dispatcher.
The File Downlink component successfully sent a file.
Channel ID for FilesSent.
FwIndexType getNum_eventOut_OutputPorts() const
FwIndexType getNum_cmdResponseOut_OutputPorts() const
NATIVE_UINT_TYPE SizeType
Status
status returned from the queue send function
The File Downlink component has detected a timeout. Downlink has been canceled.
SerializeStatus serialize(U8 val)
serialize 8-bit unsigned int
void tlmWrite_PacketsSent(U32 arg, Fw::Time _tlmTime=Fw::Time()) const
void set_cmdRegOut_OutputPort(FwIndexType portNum, Fw::InputCmdRegPort *port)
Connect port to cmdRegOut[portNum].
bool isConnected_bufferSendOut_OutputPort(FwIndexType portNum)
The File Downlink component generated an error when trying to send a data packet. ...
Svc::InputSendFileRequestPort * get_SendFile_InputPort(FwIndexType portNum)
void unLock()
unlock the mutex and assert success
PlatformSizeType FwSizeType
void invoke(U32 key) const
Invoke a port interface.
virtual void unLock()
Unlock the guarded mutex.
FwIndexType getNum_pingOut_OutputPorts() const
FwIndexType getNum_tlmOut_OutputPorts() const
void pingOut_out(FwIndexType portNum, U32 key)
Invoke output port pingOut.
FwIndexType getNum_bufferSendOut_OutputPorts() const
void init()
Initialization function.
Enum representing a command response.
FwIndexType getNum_FileComplete_OutputPorts() const
FwIndexType getNum_cmdRegOut_OutputPorts() const
void addCallPort(InputCmdRegPort *callPort)
Register an input port.
virtual void SendPartial_preMsgHook(FwOpcodeType opCode, U32 cmdSeq)
Pre-message hook for command SendPartial.
void set_cmdResponseOut_OutputPort(FwIndexType portNum, Fw::InputCmdResponsePort *port)
Connect port to cmdResponseOut[portNum].
PlatformIndexType FwIndexType
The File Downlink component has detected a timeout. Downlink has been canceled.
Os::Queue m_queue
queue object for active component
void addCallPort(InputTlmPort *callPort)
Register an input port.
void init()
Object initializer.
void log_ACTIVITY_HI_DownlinkCanceled(const Fw::StringBase &sourceFileName, const Fw::StringBase &destFileName) const
void log_WARNING_HI_DownlinkTimeout(const Fw::StringBase &sourceFileName, const Fw::StringBase &destFileName) const
SerializeStatus
forward declaration for string
Message will block until space is available.
virtual void pingIn_preMsgHook(FwIndexType portNum, U32 key)
Pre-message hook for async input port pingIn.
void bufferReturn_handlerBase(FwIndexType portNum, Fw::Buffer &fwBuffer)
Handler base-class function for input port bufferReturn.
The File Downlink component started a file download.
bool isConnected_tlmOut_OutputPort(FwIndexType portNum)
void set_eventOut_OutputPort(FwIndexType portNum, Fw::InputLogPort *port)
Connect port to eventOut[portNum].
Svc::InputSchedPort * get_Run_InputPort(FwIndexType portNum)
void invoke(FwOpcodeType opCode) const
Invoke a port interface.
An error occurred reading a file.
Serializable::SizeType getBuffLeft() const
returns how much deserialization buffer is left
void init()
Initialization function.
The File Downlink component canceled downlink of a file.
void log_WARNING_HI_FileOpenError(const Fw::StringBase &fileName) const
void log_WARNING_LO_DownlinkPartialWarning(U32 startOffset, U32 length, U32 filesize, const Fw::StringBase &sourceFileName, const Fw::StringBase &destFileName) const
Os::Queue::Status createQueue(FwSizeType depth, FwSizeType msgSize)
virtual void Cancel_cmdHandler(FwOpcodeType opCode, U32 cmdSeq)=0
#define FW_MIN(a, b)
MIN macro.
virtual void pingIn_handler(FwIndexType portNum, U32 key)=0
Handler for input port pingIn.
A less serious but recoverable event.
void invoke(Fw::Buffer &fwBuffer) const
Invoke a port interface.
Read a named file off the disk from a starting position. Divide it into packets and send the packets ...
virtual void Cancel_preMsgHook(FwOpcodeType opCode, U32 cmdSeq)
Pre-message hook for command Cancel.
bool isConnected_pingOut_OutputPort(FwIndexType portNum)
void init()
Initialization function.
bool isConnected_cmdRegOut_OutputPort(FwIndexType portNum)
void addCallPort(InputBufferSendPort *callPort)
Register an input port.
void invoke(Fw::Time &time) const
Invoke a port interface.
virtual void Run_preMsgHook(FwIndexType portNum, U32 context)
Pre-message hook for async input port Run.
void SendFile_cmdHandlerBase(FwOpcodeType opCode, U32 cmdSeq, Fw::CmdArgBuffer &args)
Svc::InputPingPort * get_pingIn_InputPort(FwIndexType portNum)
const char * toChar() const
void invoke(FwOpcodeType opCode, U32 cmdSeq, const Fw::CmdResponse &response) const
Invoke a port interface.
No time base has been established.
bool isConnected_eventOut_OutputPort(FwIndexType portNum)
void addCallPort(InputPingPort *callPort)
Register an input port.
Status send(const U8 *buffer, FwSizeType size, FwQueuePriorityType priority, BlockingType blockType) override
send a message into the queue through delegate
void resetDeser()
reset deserialization to beginning
void set_pingOut_OutputPort(FwIndexType portNum, Svc::InputPingPort *port)
Connect port to pingOut[portNum].
void cmdResponse_out(FwOpcodeType opCode, U32 cmdSeq, Fw::CmdResponse response)
Emit command response.
void bufferSendOut_out(FwIndexType portNum, Fw::Buffer &fwBuffer)
Invoke output port bufferSendOut.
A serious but recoverable event.
Errors dispatching messages.
virtual ~FileDownlinkComponentBase()
Destroy FileDownlinkComponentBase object.
Fw::InputCmdPort * get_cmdIn_InputPort(FwIndexType portNum)
void invoke(FwChanIdType id, Fw::Time &timeTag, Fw::TlmBuffer &val) const
Invoke a port interface.
Read a named file off the disk. Divide it into packets and send the packets for transmission to the g...
FormatStatus format(const CHAR *formatString,...)
write formatted string to buffer
void init()
Initialization function.
FwIndexType getNum_bufferReturn_InputPorts() const
FwIndexType getNum_timeCaller_OutputPorts() const
void set_timeCaller_OutputPort(FwIndexType portNum, Fw::InputTimePort *port)
Connect port to timeCaller[portNum].
bool isConnected_cmdResponseOut_OutputPort(FwIndexType portNum)
uint8_t U8
8-bit unsigned integer
void log_ACTIVITY_HI_FileSent(const Fw::StringBase &sourceFileName, const Fw::StringBase &destFileName) const
void init()
Initialization function.
#define PRI_PlatformIntType
Command failed to deserialize.
Svc::SendFileResponse SendFile_handlerBase(FwIndexType portNum, const Fw::StringBase &sourceFileName, const Fw::StringBase &destFileName, U32 offset, U32 length)
Handler base-class function for input port SendFile.
virtual void lock()
Lock the guarded mutex.
Important informational events.
void tlmWrite_Warnings(U32 arg, Fw::Time _tlmTime=Fw::Time()) const
void init()
Initialization function.
void log_WARNING_HI_SendDataFail(const Fw::StringBase &sourceFileName, U32 byteOffset) const
void invoke(FwEventIdType id, Fw::Time &timeTag, const Fw::LogSeverity &severity, Fw::LogBuffer &args) const
Invoke a port interface.
void log_WARNING_HI_FileReadError(const Fw::StringBase &fileName, I32 status) const
void set_bufferSendOut_OutputPort(FwIndexType portNum, Fw::InputBufferSendPort *port)
Connect port to bufferSendOut[portNum].
PlatformQueuePriorityType FwQueuePriorityType
FwIndexType getNum_pingIn_InputPorts() const
Fw::InputBufferSendPort * get_bufferReturn_InputPort(FwIndexType portNum)
void set_tlmOut_OutputPort(FwIndexType portNum, Fw::InputTlmPort *port)
Connect port to tlmOut[portNum].
message to exit active component task
A message was sent requesting an exit of the loop.
SerializeStatus deserialize(U8 &val)
deserialize 8-bit unsigned int
FileDownlinkComponentBase(const char *compName="")
Construct FileDownlinkComponentBase object.
virtual void SendFile_preMsgHook(FwOpcodeType opCode, U32 cmdSeq)
Pre-message hook for command SendFile.
virtual Svc::SendFileResponse SendFile_handler(FwIndexType portNum, const Fw::StringBase &sourceFileName, const Fw::StringBase &destFileName, U32 offset, U32 length)=0
Handler for input port SendFile.
Send file response struct.
#define FW_NUM_ARRAY_ELEMENTS(a)
number of elements in an array
void addCallPort(InputLogPort *callPort)
Register an input port.
void init()
Initialization function.
virtual void SendFile_cmdHandler(FwOpcodeType opCode, U32 cmdSeq, const Fw::CmdStringArg &sourceFileName, const Fw::CmdStringArg &destFileName)=0
virtual void SendPartial_cmdHandler(FwOpcodeType opCode, U32 cmdSeq, const Fw::CmdStringArg &sourceFileName, const Fw::CmdStringArg &destFileName, U32 startOffset, U32 length)=0
message sent/received okay
void tlmWrite_FilesSent(U32 arg, Fw::Time _tlmTime=Fw::Time()) const
virtual void bufferReturn_handler(FwIndexType portNum, Fw::Buffer &fwBuffer)=0
Handler for input port bufferReturn.
void invoke(const Svc::SendFileResponse &resp) const
Invoke a port interface.
void SendPartial_cmdHandlerBase(FwOpcodeType opCode, U32 cmdSeq, Fw::CmdArgBuffer &args)
bool isConnected_FileComplete_OutputPort(FwIndexType portNum)
virtual SerializeStatus serialize(SerializeBufferBase &buffer) const
serialization function
An error occurred opening a file.
Message will return with status when space is unavailable.
void set_FileComplete_OutputPort(FwIndexType portNum, Svc::InputSendFileCompletePort *port)
Connect port to FileComplete[portNum].
void pingIn_handlerBase(FwIndexType portNum, U32 key)
Handler base-class function for input port pingIn.
FwIndexType getNum_SendFile_InputPorts() const
Status receive(U8 *destination, FwSizeType capacity, BlockingType blockType, FwSizeType &actualSize, FwQueuePriorityType &priority) override
receive a message from the queue through delegate
void log_ACTIVITY_HI_SendStarted(U32 fileSize, const Fw::StringBase &sourceFileName, const Fw::StringBase &destFileName) const
void log_WARNING_HI_DownlinkPartialFail(const Fw::StringBase &sourceFileName, const Fw::StringBase &destFileName, U32 startOffset, U32 filesize) const
void Run_handlerBase(FwIndexType portNum, U32 context)
Handler base-class function for input port Run.
void init()
Initialization function.
virtual void bufferReturn_preMsgHook(FwIndexType portNum, Fw::Buffer &fwBuffer)
Pre-message hook for async input port bufferReturn.
virtual void Run_handler(FwIndexType portNum, U32 context)=0
Handler for input port Run.
void FileComplete_out(FwIndexType portNum, const Svc::SendFileResponse &resp)
Invoke output port FileComplete.
Channel ID for PacketsSent.
FwIndexType getNum_Run_InputPorts() const
void addCallPort(InputSendFileCompletePort *callPort)
Register an input port.
#define FW_OBJECT_NAMES
Indicates whether or not object names are stored (more memory, can be used for tracking objects) ...
The File Downlink component has detected a timeout. Downlink has been canceled.
#define FW_LOG_STRING_MAX_SIZE
Max size of log string parameter type.
virtual const CHAR * toChar() const =0
void addCallPort(InputCmdResponsePort *callPort)
Register an input port.
void lock()
lock the mutex and assert success