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 101 "%s_cmdIn_InputPort[%" PRI_PlatformIntType
"]",
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 125 "%s_Run_InputPort[%" PRI_PlatformIntType
"]",
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 149 "%s_SendFile_InputPort[%" PRI_PlatformIntType
"]",
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 173 "%s_bufferReturn_InputPort[%" PRI_PlatformIntType
"]",
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 197 "%s_pingIn_InputPort[%" PRI_PlatformIntType
"]",
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 216 "%s_cmdRegOut_OutputPort[%" PRI_PlatformIntType
"]",
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 235 "%s_cmdResponseOut_OutputPort[%" PRI_PlatformIntType
"]",
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 254 "%s_eventOut_OutputPort[%" PRI_PlatformIntType
"]",
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 274 "%s_textEventOut_OutputPort[%" PRI_PlatformIntType
"]",
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 294 "%s_timeCaller_OutputPort[%" PRI_PlatformIntType
"]",
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 313 "%s_tlmOut_OutputPort[%" PRI_PlatformIntType
"]",
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 332 "%s_FileComplete_OutputPort[%" PRI_PlatformIntType
"]",
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 351 "%s_bufferSendOut_OutputPort[%" PRI_PlatformIntType
"]",
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 370 "%s_pingOut_OutputPort[%" PRI_PlatformIntType
"]",
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)
1241 this->m_FileComplete_OutputPort[portNum].isConnected(),
1242 static_cast<FwAssertArgType>(portNum)
1244 this->m_FileComplete_OutputPort[portNum].
invoke(
1257 static_cast<FwAssertArgType>(portNum)
1261 this->m_bufferSendOut_OutputPort[portNum].isConnected(),
1262 static_cast<FwAssertArgType>(portNum)
1264 this->m_bufferSendOut_OutputPort[portNum].
invoke(
1277 static_cast<FwAssertArgType>(portNum)
1281 this->m_pingOut_OutputPort[portNum].isConnected(),
1282 static_cast<FwAssertArgType>(portNum)
1284 this->m_pingOut_OutputPort[portNum].
invoke(
1300 FW_ASSERT(this->m_cmdResponseOut_OutputPort[0].isConnected());
1301 this->m_cmdResponseOut_OutputPort[0].
invoke(opCode, cmdSeq, response);
1322 ComponentIpcSerializableBuffer msg;
1326 _status = msg.serialize(static_cast<FwEnumStoreType>(CMD_SENDFILE));
1329 static_cast<FwAssertArgType>(_status)
1335 _status = msg.serialize(port);
1338 static_cast<FwAssertArgType>(_status)
1341 _status = msg.serialize(opCode);
1344 static_cast<FwAssertArgType>(_status)
1347 _status = msg.serialize(cmdSeq);
1350 static_cast<FwAssertArgType>(_status)
1353 _status = msg.serialize(args);
1356 static_cast<FwAssertArgType>(_status)
1365 static_cast<FwAssertArgType>(qStatus)
1381 ComponentIpcSerializableBuffer msg;
1385 _status = msg.serialize(static_cast<FwEnumStoreType>(CMD_CANCEL));
1388 static_cast<FwAssertArgType>(_status)
1394 _status = msg.serialize(port);
1397 static_cast<FwAssertArgType>(_status)
1400 _status = msg.serialize(opCode);
1403 static_cast<FwAssertArgType>(_status)
1406 _status = msg.serialize(cmdSeq);
1409 static_cast<FwAssertArgType>(_status)
1412 _status = msg.serialize(args);
1415 static_cast<FwAssertArgType>(_status)
1424 static_cast<FwAssertArgType>(qStatus)
1440 ComponentIpcSerializableBuffer msg;
1444 _status = msg.serialize(static_cast<FwEnumStoreType>(CMD_SENDPARTIAL));
1447 static_cast<FwAssertArgType>(_status)
1453 _status = msg.serialize(port);
1456 static_cast<FwAssertArgType>(_status)
1459 _status = msg.serialize(opCode);
1462 static_cast<FwAssertArgType>(_status)
1465 _status = msg.serialize(cmdSeq);
1468 static_cast<FwAssertArgType>(_status)
1471 _status = msg.serialize(args);
1474 static_cast<FwAssertArgType>(_status)
1483 static_cast<FwAssertArgType>(qStatus)
1537 if (this->m_timeCaller_OutputPort[0].isConnected()) {
1538 this->m_timeCaller_OutputPort[0].
invoke(_logTime);
1546 if (this->m_eventOut_OutputPort[0].isConnected()) {
1550 #if FW_AMPCS_COMPATIBLE 1552 _status = _logBuff.
serialize(static_cast<U8>(1));
1555 static_cast<FwAssertArgType>(_status)
1562 static_cast<FwAssertArgType>(_status)
1565 this->m_eventOut_OutputPort[0].
invoke(
1574 #if FW_ENABLE_TEXT_LOGGING 1575 if (this->m_textEventOut_OutputPort[0].isConnected()) {
1576 #if FW_OBJECT_NAMES == 1 1577 const char* _formatString =
1578 "(%s) %s: Could not open file %s";
1580 const char* _formatString =
1581 "%s: Could not open file %s";
1588 this->m_objName.toChar(),
1594 this->m_textEventOut_OutputPort[0].invoke(
1612 if (this->m_timeCaller_OutputPort[0].isConnected()) {
1613 this->m_timeCaller_OutputPort[0].
invoke(_logTime);
1621 if (this->m_eventOut_OutputPort[0].isConnected()) {
1625 #if FW_AMPCS_COMPATIBLE 1627 _status = _logBuff.
serialize(static_cast<U8>(2));
1630 static_cast<FwAssertArgType>(_status)
1637 static_cast<FwAssertArgType>(_status)
1640 #if FW_AMPCS_COMPATIBLE 1643 static_cast<U8>(
sizeof(I32))
1647 static_cast<FwAssertArgType>(_status)
1653 static_cast<FwAssertArgType>(_status)
1656 this->m_eventOut_OutputPort[0].
invoke(
1665 #if FW_ENABLE_TEXT_LOGGING 1666 if (this->m_textEventOut_OutputPort[0].isConnected()) {
1667 #if FW_OBJECT_NAMES == 1 1668 const char* _formatString =
1669 "(%s) %s: Could not read file %s with status %" PRIi32
"";
1671 const char* _formatString =
1672 "%s: Could not read file %s with status %" PRIi32
"";
1679 this->m_objName.toChar(),
1686 this->m_textEventOut_OutputPort[0].invoke(
1704 if (this->m_timeCaller_OutputPort[0].isConnected()) {
1705 this->m_timeCaller_OutputPort[0].
invoke(_logTime);
1713 if (this->m_eventOut_OutputPort[0].isConnected()) {
1717 #if FW_AMPCS_COMPATIBLE 1719 _status = _logBuff.
serialize(static_cast<U8>(2));
1722 static_cast<FwAssertArgType>(_status)
1729 static_cast<FwAssertArgType>(_status)
1735 static_cast<FwAssertArgType>(_status)
1738 this->m_eventOut_OutputPort[0].
invoke(
1747 #if FW_ENABLE_TEXT_LOGGING 1748 if (this->m_textEventOut_OutputPort[0].isConnected()) {
1749 #if FW_OBJECT_NAMES == 1 1750 const char* _formatString =
1751 "(%s) %s: Sent file %s to file %s";
1753 const char* _formatString =
1754 "%s: Sent file %s to file %s";
1761 this->m_objName.toChar(),
1768 this->m_textEventOut_OutputPort[0].invoke(
1786 if (this->m_timeCaller_OutputPort[0].isConnected()) {
1787 this->m_timeCaller_OutputPort[0].
invoke(_logTime);
1795 if (this->m_eventOut_OutputPort[0].isConnected()) {
1799 #if FW_AMPCS_COMPATIBLE 1801 _status = _logBuff.
serialize(static_cast<U8>(2));
1804 static_cast<FwAssertArgType>(_status)
1811 static_cast<FwAssertArgType>(_status)
1817 static_cast<FwAssertArgType>(_status)
1820 this->m_eventOut_OutputPort[0].
invoke(
1829 #if FW_ENABLE_TEXT_LOGGING 1830 if (this->m_textEventOut_OutputPort[0].isConnected()) {
1831 #if FW_OBJECT_NAMES == 1 1832 const char* _formatString =
1833 "(%s) %s: Canceled downlink of file %s to file %s";
1835 const char* _formatString =
1836 "%s: Canceled downlink of file %s to file %s";
1843 this->m_objName.toChar(),
1845 "DownlinkCanceled ",
1850 this->m_textEventOut_OutputPort[0].invoke(
1868 if (this->m_timeCaller_OutputPort[0].isConnected()) {
1869 this->m_timeCaller_OutputPort[0].
invoke(_logTime);
1877 if (this->m_eventOut_OutputPort[0].isConnected()) {
1881 #if FW_AMPCS_COMPATIBLE 1883 _status = _logBuff.
serialize(static_cast<U8>(2));
1886 static_cast<FwAssertArgType>(_status)
1893 static_cast<FwAssertArgType>(_status)
1899 static_cast<FwAssertArgType>(_status)
1902 this->m_eventOut_OutputPort[0].
invoke(
1911 #if FW_ENABLE_TEXT_LOGGING 1912 if (this->m_textEventOut_OutputPort[0].isConnected()) {
1913 #if FW_OBJECT_NAMES == 1 1914 const char* _formatString =
1915 "(%s) %s: Timeout occurred during downlink of file %s to file %s. Downlink has been canceled.";
1917 const char* _formatString =
1918 "%s: Timeout occurred during downlink of file %s to file %s. Downlink has been canceled.";
1925 this->m_objName.toChar(),
1932 this->m_textEventOut_OutputPort[0].invoke(
1953 if (this->m_timeCaller_OutputPort[0].isConnected()) {
1954 this->m_timeCaller_OutputPort[0].
invoke(_logTime);
1962 if (this->m_eventOut_OutputPort[0].isConnected()) {
1966 #if FW_AMPCS_COMPATIBLE 1968 _status = _logBuff.
serialize(static_cast<U8>(5));
1971 static_cast<FwAssertArgType>(_status)
1975 #if FW_AMPCS_COMPATIBLE 1978 static_cast<U8>(
sizeof(U32))
1982 static_cast<FwAssertArgType>(_status)
1985 _status = _logBuff.
serialize(startOffset);
1988 static_cast<FwAssertArgType>(_status)
1991 #if FW_AMPCS_COMPATIBLE 1994 static_cast<U8>(
sizeof(U32))
1998 static_cast<FwAssertArgType>(_status)
2004 static_cast<FwAssertArgType>(_status)
2007 #if FW_AMPCS_COMPATIBLE 2010 static_cast<U8>(
sizeof(U32))
2014 static_cast<FwAssertArgType>(_status)
2020 static_cast<FwAssertArgType>(_status)
2026 static_cast<FwAssertArgType>(_status)
2032 static_cast<FwAssertArgType>(_status)
2035 this->m_eventOut_OutputPort[0].
invoke(
2044 #if FW_ENABLE_TEXT_LOGGING 2045 if (this->m_textEventOut_OutputPort[0].isConnected()) {
2046 #if FW_OBJECT_NAMES == 1 2047 const char* _formatString =
2048 "(%s) %s: Offset %" PRIu32
" plus length %" PRIu32
" is greater than source size %" PRIu32
" for partial downlink of file %s to file %s. ";
2050 const char* _formatString =
2051 "%s: Offset %" PRIu32
" plus length %" PRIu32
" is greater than source size %" PRIu32
" for partial downlink of file %s to file %s. ";
2058 this->m_objName.toChar(),
2060 "DownlinkPartialWarning ",
2068 this->m_textEventOut_OutputPort[0].invoke(
2088 if (this->m_timeCaller_OutputPort[0].isConnected()) {
2089 this->m_timeCaller_OutputPort[0].
invoke(_logTime);
2097 if (this->m_eventOut_OutputPort[0].isConnected()) {
2101 #if FW_AMPCS_COMPATIBLE 2103 _status = _logBuff.
serialize(static_cast<U8>(4));
2106 static_cast<FwAssertArgType>(_status)
2113 static_cast<FwAssertArgType>(_status)
2119 static_cast<FwAssertArgType>(_status)
2122 #if FW_AMPCS_COMPATIBLE 2125 static_cast<U8>(
sizeof(U32))
2129 static_cast<FwAssertArgType>(_status)
2132 _status = _logBuff.
serialize(startOffset);
2135 static_cast<FwAssertArgType>(_status)
2138 #if FW_AMPCS_COMPATIBLE 2141 static_cast<U8>(
sizeof(U32))
2145 static_cast<FwAssertArgType>(_status)
2151 static_cast<FwAssertArgType>(_status)
2154 this->m_eventOut_OutputPort[0].
invoke(
2163 #if FW_ENABLE_TEXT_LOGGING 2164 if (this->m_textEventOut_OutputPort[0].isConnected()) {
2165 #if FW_OBJECT_NAMES == 1 2166 const char* _formatString =
2167 "(%s) %s: Error occurred during partial downlink of file %s to file %s. Offset %" PRIu32
" greater than or equal to source filesize %" PRIu32
".";
2169 const char* _formatString =
2170 "%s: Error occurred during partial downlink of file %s to file %s. Offset %" PRIu32
" greater than or equal to source filesize %" PRIu32
".";
2177 this->m_objName.toChar(),
2179 "DownlinkPartialFail ",
2186 this->m_textEventOut_OutputPort[0].invoke(
2204 if (this->m_timeCaller_OutputPort[0].isConnected()) {
2205 this->m_timeCaller_OutputPort[0].
invoke(_logTime);
2213 if (this->m_eventOut_OutputPort[0].isConnected()) {
2217 #if FW_AMPCS_COMPATIBLE 2219 _status = _logBuff.
serialize(static_cast<U8>(2));
2222 static_cast<FwAssertArgType>(_status)
2229 static_cast<FwAssertArgType>(_status)
2232 #if FW_AMPCS_COMPATIBLE 2235 static_cast<U8>(
sizeof(U32))
2239 static_cast<FwAssertArgType>(_status)
2242 _status = _logBuff.
serialize(byteOffset);
2245 static_cast<FwAssertArgType>(_status)
2248 this->m_eventOut_OutputPort[0].
invoke(
2257 #if FW_ENABLE_TEXT_LOGGING 2258 if (this->m_textEventOut_OutputPort[0].isConnected()) {
2259 #if FW_OBJECT_NAMES == 1 2260 const char* _formatString =
2261 "(%s) %s: Failed to send data packet from file %s at byte offset %" PRIu32
".";
2263 const char* _formatString =
2264 "%s: Failed to send data packet from file %s at byte offset %" PRIu32
".";
2271 this->m_objName.toChar(),
2278 this->m_textEventOut_OutputPort[0].invoke(
2297 if (this->m_timeCaller_OutputPort[0].isConnected()) {
2298 this->m_timeCaller_OutputPort[0].
invoke(_logTime);
2306 if (this->m_eventOut_OutputPort[0].isConnected()) {
2310 #if FW_AMPCS_COMPATIBLE 2312 _status = _logBuff.
serialize(static_cast<U8>(3));
2315 static_cast<FwAssertArgType>(_status)
2319 #if FW_AMPCS_COMPATIBLE 2322 static_cast<U8>(
sizeof(U32))
2326 static_cast<FwAssertArgType>(_status)
2332 static_cast<FwAssertArgType>(_status)
2338 static_cast<FwAssertArgType>(_status)
2344 static_cast<FwAssertArgType>(_status)
2347 this->m_eventOut_OutputPort[0].
invoke(
2356 #if FW_ENABLE_TEXT_LOGGING 2357 if (this->m_textEventOut_OutputPort[0].isConnected()) {
2358 #if FW_OBJECT_NAMES == 1 2359 const char* _formatString =
2360 "(%s) %s: Downlink of %" PRIu32
" bytes started from %s to %s";
2362 const char* _formatString =
2363 "%s: Downlink of %" PRIu32
" bytes started from %s to %s";
2370 this->m_objName.toChar(),
2378 this->m_textEventOut_OutputPort[0].invoke(
2398 if (this->m_tlmOut_OutputPort[0].isConnected()) {
2400 this->m_timeCaller_OutputPort[0].isConnected() &&
2403 this->m_timeCaller_OutputPort[0].
invoke(_tlmTime);
2410 static_cast<FwAssertArgType>(_stat)
2417 this->m_tlmOut_OutputPort[0].
invoke(
2431 if (this->m_tlmOut_OutputPort[0].isConnected()) {
2433 this->m_timeCaller_OutputPort[0].isConnected() &&
2436 this->m_timeCaller_OutputPort[0].
invoke(_tlmTime);
2443 static_cast<FwAssertArgType>(_stat)
2450 this->m_tlmOut_OutputPort[0].
invoke(
2464 if (this->m_tlmOut_OutputPort[0].isConnected()) {
2466 this->m_timeCaller_OutputPort[0].isConnected() &&
2469 this->m_timeCaller_OutputPort[0].
invoke(_tlmTime);
2476 static_cast<FwAssertArgType>(_stat)
2483 this->m_tlmOut_OutputPort[0].
invoke(
2498 if (this->m_timeCaller_OutputPort[0].isConnected()) {
2500 this->m_timeCaller_OutputPort[0].
invoke(_time);
2518 this->m_guardedPortMutex.
lock();
2524 this->m_guardedPortMutex.
unLock();
2534 ComponentIpcSerializableBuffer _msg;
2544 static_cast<FwAssertArgType>(_msgStatus)
2554 static_cast<FwAssertArgType>(_deserStatus)
2557 MsgTypeEnum _msgType =
static_cast<MsgTypeEnum
>(_desMsg);
2559 if (_msgType == FILEDOWNLINK_COMPONENT_EXIT) {
2564 _deserStatus = _msg.deserialize(portNum);
2567 static_cast<FwAssertArgType>(_deserStatus)
2575 _deserStatus = _msg.deserialize(context);
2578 static_cast<FwAssertArgType>(_deserStatus)
2590 case BUFFERRETURN_BUFFERSEND: {
2593 _deserStatus = _msg.deserialize(fwBuffer);
2596 static_cast<FwAssertArgType>(_deserStatus)
2611 _deserStatus = _msg.deserialize(key);
2614 static_cast<FwAssertArgType>(_deserStatus)
2626 case CMD_SENDFILE: {
2629 _deserStatus = _msg.deserialize(_opCode);
2632 static_cast<FwAssertArgType>(_deserStatus)
2637 _deserStatus = _msg.deserialize(_cmdSeq);
2640 static_cast<FwAssertArgType>(_deserStatus)
2645 _deserStatus = _msg.deserialize(args);
2648 static_cast<FwAssertArgType>(_deserStatus)
2658 if (this->m_cmdResponseOut_OutputPort[0].isConnected()) {
2673 if (this->m_cmdResponseOut_OutputPort[0].isConnected()) {
2686 #if FW_CMD_CHECK_RESIDUAL 2688 if (this->m_cmdResponseOut_OutputPort[0].isConnected()) {
2710 _deserStatus = _msg.deserialize(_opCode);
2713 static_cast<FwAssertArgType>(_deserStatus)
2718 _deserStatus = _msg.deserialize(_cmdSeq);
2721 static_cast<FwAssertArgType>(_deserStatus)
2726 _deserStatus = _msg.deserialize(args);
2729 static_cast<FwAssertArgType>(_deserStatus)
2737 #if FW_CMD_CHECK_RESIDUAL 2739 if (this->m_cmdResponseOut_OutputPort[0].isConnected()) {
2754 case CMD_SENDPARTIAL: {
2757 _deserStatus = _msg.deserialize(_opCode);
2760 static_cast<FwAssertArgType>(_deserStatus)
2765 _deserStatus = _msg.deserialize(_cmdSeq);
2768 static_cast<FwAssertArgType>(_deserStatus)
2773 _deserStatus = _msg.deserialize(args);
2776 static_cast<FwAssertArgType>(_deserStatus)
2786 if (this->m_cmdResponseOut_OutputPort[0].isConnected()) {
2801 if (this->m_cmdResponseOut_OutputPort[0].isConnected()) {
2816 if (this->m_cmdResponseOut_OutputPort[0].isConnected()) {
2831 if (this->m_cmdResponseOut_OutputPort[0].isConnected()) {
2844 #if FW_CMD_CHECK_RESIDUAL 2846 if (this->m_cmdResponseOut_OutputPort[0].isConnected()) {
2877 void FileDownlinkComponentBase ::
2889 const U32 idBase = callComp->
getIdBase();
2890 FW_ASSERT(opCode >= idBase, static_cast<FwAssertArgType>(opCode), static_cast<FwAssertArgType>(idBase));
2893 switch (opCode - idBase) {
2895 compPtr->SendFile_cmdHandlerBase(
2904 compPtr->Cancel_cmdHandlerBase(
2913 compPtr->SendPartial_cmdHandlerBase(
2927 void FileDownlinkComponentBase ::
2936 compPtr->Run_handlerBase(
2954 return compPtr->SendFile_handlerBase(
2963 void FileDownlinkComponentBase ::
2964 m_p_bufferReturn_in(
2972 compPtr->bufferReturn_handlerBase(
2978 void FileDownlinkComponentBase ::
2987 compPtr->pingIn_handlerBase(
Serialization/Deserialization operation was successful.
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.
FwIndexType getNum_eventOut_OutputPorts() const
FwIndexType getNum_cmdResponseOut_OutputPorts() const
Status
status returned from the queue send function
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)
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
Read a named file off the disk. Divide it into packets and send the packets for transmission to the g...
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
Os::Queue m_queue
queue object for active component
The File Downlink component has detected a timeout. Downlink has been canceled.
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
The File Downlink component has detected a timeout. Downlink has been canceled.
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.
The File Downlink component canceled downlink of a file.
void bufferReturn_handlerBase(FwIndexType portNum, Fw::Buffer &fwBuffer)
Handler base-class function for input port bufferReturn.
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.
The File Downlink component started a file download.
Serializable::SizeType getBuffLeft() const
returns how much deserialization buffer is left
void init()
Initialization function.
message to exit active component task
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.
Channel ID for PacketsSent.
virtual void Cancel_preMsgHook(FwOpcodeType opCode, U32 cmdSeq)
Pre-message hook for command Cancel.
bool isConnected_pingOut_OutputPort(FwIndexType portNum)
An error occurred reading a file.
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
Channel ID for FilesSent.
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.
An error occurred opening a file.
Fw::InputCmdPort * get_cmdIn_InputPort(FwIndexType portNum)
void invoke(FwChanIdType id, Fw::Time &timeTag, Fw::TlmBuffer &val) const
Invoke a port interface.
FormatStatus format(const CHAR *formatString,...)
write formatted string to buffer
void init()
Initialization function.
FwIndexType getNum_bufferReturn_InputPorts() const
Cancel the downlink in progress, if any.
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.
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)
Read a named file off the disk from a starting position. Divide it into packets and send the packets ...
void set_tlmOut_OutputPort(FwIndexType portNum, Fw::InputTlmPort *port)
Connect port to tlmOut[portNum].
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
The File Downlink component has detected a timeout. Downlink has been canceled.
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.
The File Downlink component generated an error when trying to send a data packet. ...
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
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.
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) ...
#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