9 #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
53 ComponentIpcSerializableBuffer() :
Fw::LinearBufferBase(m_buff, sizeof(m_buff)) {
59 U8 m_buff[SERIALIZATION_SIZE];
77 #if !FW_DIRECT_PORT_CALLS 84 this->m_cmdIn_InputPort[port].
init();
89 this->m_cmdIn_InputPort[port].
setPortNum(port);
91 #if FW_OBJECT_NAMES == 1 95 this->m_objName.toChar(),
98 this->m_cmdIn_InputPort[port].setObjName(portName.
toChar());
103 #if !FW_DIRECT_PORT_CALLS 110 this->m_Run_InputPort[port].
init();
117 #if FW_OBJECT_NAMES == 1 121 this->m_objName.toChar(),
124 this->m_Run_InputPort[port].setObjName(portName.
toChar());
129 #if !FW_DIRECT_PORT_CALLS 136 this->m_SendFile_InputPort[port].
init();
141 this->m_SendFile_InputPort[port].
setPortNum(port);
143 #if FW_OBJECT_NAMES == 1 147 this->m_objName.toChar(),
150 this->m_SendFile_InputPort[port].setObjName(portName.
toChar());
155 #if !FW_DIRECT_PORT_CALLS 162 this->m_bufferReturn_InputPort[port].
init();
167 this->m_bufferReturn_InputPort[port].
setPortNum(port);
169 #if FW_OBJECT_NAMES == 1 173 this->m_objName.toChar(),
176 this->m_bufferReturn_InputPort[port].setObjName(portName.
toChar());
181 #if !FW_DIRECT_PORT_CALLS 188 this->m_pingIn_InputPort[port].
init();
193 this->m_pingIn_InputPort[port].
setPortNum(port);
195 #if FW_OBJECT_NAMES == 1 199 this->m_objName.toChar(),
202 this->m_pingIn_InputPort[port].setObjName(portName.
toChar());
207 #if !FW_DIRECT_PORT_CALLS 214 this->m_cmdRegOut_OutputPort[port].
init();
216 #if FW_OBJECT_NAMES == 1 220 this->m_objName.toChar(),
223 this->m_cmdRegOut_OutputPort[port].setObjName(portName.
toChar());
228 #if !FW_DIRECT_PORT_CALLS 235 this->m_cmdResponseOut_OutputPort[port].
init();
237 #if FW_OBJECT_NAMES == 1 241 this->m_objName.toChar(),
244 this->m_cmdResponseOut_OutputPort[port].setObjName(portName.
toChar());
249 #if !FW_DIRECT_PORT_CALLS 256 this->m_eventOut_OutputPort[port].
init();
258 #if FW_OBJECT_NAMES == 1 262 this->m_objName.toChar(),
265 this->m_eventOut_OutputPort[port].setObjName(portName.
toChar());
270 #if !FW_DIRECT_PORT_CALLS && FW_ENABLE_TEXT_LOGGING 274 port < static_cast<FwIndexType>(this->getNum_textEventOut_OutputPorts());
277 this->m_textEventOut_OutputPort[port].
init();
279 #if FW_OBJECT_NAMES == 1 283 this->m_objName.toChar(),
286 this->m_textEventOut_OutputPort[port].setObjName(portName.
toChar());
291 #if !FW_DIRECT_PORT_CALLS 298 this->m_timeCaller_OutputPort[port].
init();
300 #if FW_OBJECT_NAMES == 1 304 this->m_objName.toChar(),
307 this->m_timeCaller_OutputPort[port].setObjName(portName.
toChar());
312 #if !FW_DIRECT_PORT_CALLS 319 this->m_tlmOut_OutputPort[port].
init();
321 #if FW_OBJECT_NAMES == 1 325 this->m_objName.toChar(),
328 this->m_tlmOut_OutputPort[port].setObjName(portName.
toChar());
333 #if !FW_DIRECT_PORT_CALLS 340 this->m_FileComplete_OutputPort[port].
init();
342 #if FW_OBJECT_NAMES == 1 346 this->m_objName.toChar(),
349 this->m_FileComplete_OutputPort[port].setObjName(portName.
toChar());
354 #if !FW_DIRECT_PORT_CALLS 361 this->m_bufferSendOut_OutputPort[port].
init();
363 #if FW_OBJECT_NAMES == 1 367 this->m_objName.toChar(),
370 this->m_bufferSendOut_OutputPort[port].setObjName(portName.
toChar());
375 #if !FW_DIRECT_PORT_CALLS 382 this->m_pingOut_OutputPort[port].
init();
384 #if FW_OBJECT_NAMES == 1 388 this->m_objName.toChar(),
391 this->m_pingOut_OutputPort[port].setObjName(portName.
toChar());
399 static_cast<FwSizeType>(ComponentIpcSerializableBuffer::SERIALIZATION_SIZE)
403 static_cast<FwAssertArgType>(qStat)
407 #if !FW_DIRECT_PORT_CALLS 418 static_cast<FwAssertArgType>(portNum)
421 return &this->m_cmdIn_InputPort[portNum];
426 #if !FW_DIRECT_PORT_CALLS 437 static_cast<FwAssertArgType>(portNum)
440 return &this->m_Run_InputPort[portNum];
448 static_cast<FwAssertArgType>(portNum)
451 return &this->m_SendFile_InputPort[portNum];
459 static_cast<FwAssertArgType>(portNum)
462 return &this->m_bufferReturn_InputPort[portNum];
470 static_cast<FwAssertArgType>(portNum)
473 return &this->m_pingIn_InputPort[portNum];
478 #if !FW_DIRECT_PORT_CALLS 492 static_cast<FwAssertArgType>(portNum)
495 this->m_cmdRegOut_OutputPort[portNum].
addCallPort(port);
506 static_cast<FwAssertArgType>(portNum)
509 this->m_cmdResponseOut_OutputPort[portNum].
addCallPort(port);
520 static_cast<FwAssertArgType>(portNum)
523 this->m_eventOut_OutputPort[portNum].
addCallPort(port);
526 #if FW_ENABLE_TEXT_LOGGING == 1 528 void FileDownlinkComponentBase ::
529 set_textEventOut_OutputPort(
535 (0 <= portNum) && (portNum < this->getNum_textEventOut_OutputPorts()),
536 static_cast<FwAssertArgType>(portNum)
539 this->m_textEventOut_OutputPort[portNum].addCallPort(port);
552 static_cast<FwAssertArgType>(portNum)
555 this->m_timeCaller_OutputPort[portNum].
addCallPort(port);
566 static_cast<FwAssertArgType>(portNum)
569 this->m_tlmOut_OutputPort[portNum].
addCallPort(port);
574 #if !FW_DIRECT_PORT_CALLS 588 static_cast<FwAssertArgType>(portNum)
591 this->m_FileComplete_OutputPort[portNum].
addCallPort(port);
602 static_cast<FwAssertArgType>(portNum)
605 this->m_bufferSendOut_OutputPort[portNum].
addCallPort(port);
616 static_cast<FwAssertArgType>(portNum)
619 this->m_pingOut_OutputPort[portNum].
addCallPort(port);
624 #if !FW_DIRECT_PORT_CALLS && FW_PORT_SERIALIZATION 633 Fw::InputSerializePort* port
638 static_cast<FwAssertArgType>(portNum)
641 this->m_cmdRegOut_OutputPort[portNum].registerSerialPort(port);
647 Fw::InputSerializePort* port
652 static_cast<FwAssertArgType>(portNum)
655 this->m_cmdResponseOut_OutputPort[portNum].registerSerialPort(port);
661 Fw::InputSerializePort* port
666 static_cast<FwAssertArgType>(portNum)
669 this->m_eventOut_OutputPort[portNum].registerSerialPort(port);
672 #if FW_ENABLE_TEXT_LOGGING == 1 674 void FileDownlinkComponentBase ::
675 set_textEventOut_OutputPort(
677 Fw::InputSerializePort* port
681 (0 <= portNum) && (portNum < this->getNum_textEventOut_OutputPorts()),
682 static_cast<FwAssertArgType>(portNum)
685 this->m_textEventOut_OutputPort[portNum].registerSerialPort(port);
693 Fw::InputSerializePort* port
698 static_cast<FwAssertArgType>(portNum)
701 this->m_timeCaller_OutputPort[portNum].registerSerialPort(port);
707 Fw::InputSerializePort* port
712 static_cast<FwAssertArgType>(portNum)
715 this->m_tlmOut_OutputPort[portNum].registerSerialPort(port);
720 #if !FW_DIRECT_PORT_CALLS && FW_PORT_SERIALIZATION 729 Fw::InputSerializePort* port
734 static_cast<FwAssertArgType>(portNum)
737 this->m_FileComplete_OutputPort[portNum].registerSerialPort(port);
743 Fw::InputSerializePort* port
748 static_cast<FwAssertArgType>(portNum)
751 this->m_bufferSendOut_OutputPort[portNum].registerSerialPort(port);
757 Fw::InputSerializePort* port
762 static_cast<FwAssertArgType>(portNum)
765 this->m_pingOut_OutputPort[portNum].registerSerialPort(port);
801 Fw::ActiveComponentBase(compName)
812 #if !FW_DIRECT_PORT_CALLS 823 static_cast<FwAssertArgType>(portNum)
826 return this->m_cmdRegOut_OutputPort[portNum].
isConnected();
834 static_cast<FwAssertArgType>(portNum)
837 return this->m_cmdResponseOut_OutputPort[portNum].
isConnected();
845 static_cast<FwAssertArgType>(portNum)
848 return this->m_eventOut_OutputPort[portNum].
isConnected();
851 #if FW_ENABLE_TEXT_LOGGING == 1 853 bool FileDownlinkComponentBase ::
854 isConnected_textEventOut_OutputPort(
FwIndexType portNum)
const 857 (0 <= portNum) && (portNum < this->getNum_textEventOut_OutputPorts()),
858 static_cast<FwAssertArgType>(portNum)
861 return this->m_textEventOut_OutputPort[portNum].isConnected();
871 static_cast<FwAssertArgType>(portNum)
874 return this->m_timeCaller_OutputPort[portNum].
isConnected();
882 static_cast<FwAssertArgType>(portNum)
885 return this->m_tlmOut_OutputPort[portNum].
isConnected();
890 #if !FW_DIRECT_PORT_CALLS 901 static_cast<FwAssertArgType>(portNum)
904 return this->m_FileComplete_OutputPort[portNum].
isConnected();
912 static_cast<FwAssertArgType>(portNum)
915 return this->m_bufferSendOut_OutputPort[portNum].
isConnected();
923 static_cast<FwAssertArgType>(portNum)
926 return this->m_pingOut_OutputPort[portNum].
isConnected();
947 FW_ASSERT(opCode >= idBase, static_cast<FwAssertArgType>(opCode), static_cast<FwAssertArgType>(idBase));
950 switch (opCode - idBase) {
998 static_cast<FwAssertArgType>(portNum)
1006 ComponentIpcSerializableBuffer msg;
1010 _status = msg.serializeFrom(
1011 static_cast<FwEnumStoreType>(RUN_SCHED)
1015 static_cast<FwAssertArgType>(_status)
1019 _status = msg.serializeFrom(portNum);
1022 static_cast<FwAssertArgType>(_status)
1026 _status = msg.serializeFrom(context);
1029 static_cast<FwAssertArgType>(_status)
1038 static_cast<FwAssertArgType>(qStatus)
1054 static_cast<FwAssertArgType>(portNum)
1086 static_cast<FwAssertArgType>(portNum)
1094 ComponentIpcSerializableBuffer msg;
1098 _status = msg.serializeFrom(
1099 static_cast<FwEnumStoreType>(BUFFERRETURN_BUFFERSEND)
1103 static_cast<FwAssertArgType>(_status)
1107 _status = msg.serializeFrom(portNum);
1110 static_cast<FwAssertArgType>(_status)
1114 _status = msg.serializeFrom(fwBuffer);
1117 static_cast<FwAssertArgType>(_status)
1126 static_cast<FwAssertArgType>(qStatus)
1139 static_cast<FwAssertArgType>(portNum)
1147 ComponentIpcSerializableBuffer msg;
1151 _status = msg.serializeFrom(
1152 static_cast<FwEnumStoreType>(PINGIN_PING)
1156 static_cast<FwAssertArgType>(_status)
1160 _status = msg.serializeFrom(portNum);
1163 static_cast<FwAssertArgType>(_status)
1167 _status = msg.serializeFrom(key);
1170 static_cast<FwAssertArgType>(_status)
1179 static_cast<FwAssertArgType>(qStatus)
1218 #if !FW_DIRECT_PORT_CALLS 1232 static_cast<FwAssertArgType>(portNum)
1236 this->m_FileComplete_OutputPort[portNum].isConnected(),
1237 static_cast<FwAssertArgType>(portNum)
1239 this->m_FileComplete_OutputPort[portNum].
invoke(
1252 static_cast<FwAssertArgType>(portNum)
1256 this->m_bufferSendOut_OutputPort[portNum].isConnected(),
1257 static_cast<FwAssertArgType>(portNum)
1259 this->m_bufferSendOut_OutputPort[portNum].
invoke(
1272 static_cast<FwAssertArgType>(portNum)
1276 this->m_pingOut_OutputPort[portNum].isConnected(),
1277 static_cast<FwAssertArgType>(portNum)
1279 this->m_pingOut_OutputPort[portNum].
invoke(
1298 this->cmdResponseOut_out(0, opCode, cmdSeq, response);
1319 ComponentIpcSerializableBuffer msg;
1323 _status = msg.serializeFrom(static_cast<FwEnumStoreType>(CMD_SENDFILE));
1326 static_cast<FwAssertArgType>(_status)
1332 _status = msg.serializeFrom(port);
1335 static_cast<FwAssertArgType>(_status)
1338 _status = msg.serializeFrom(opCode);
1341 static_cast<FwAssertArgType>(_status)
1344 _status = msg.serializeFrom(cmdSeq);
1347 static_cast<FwAssertArgType>(_status)
1350 _status = msg.serializeFrom(args);
1353 static_cast<FwAssertArgType>(_status)
1362 static_cast<FwAssertArgType>(qStatus)
1378 ComponentIpcSerializableBuffer msg;
1382 _status = msg.serializeFrom(static_cast<FwEnumStoreType>(CMD_CANCEL));
1385 static_cast<FwAssertArgType>(_status)
1391 _status = msg.serializeFrom(port);
1394 static_cast<FwAssertArgType>(_status)
1397 _status = msg.serializeFrom(opCode);
1400 static_cast<FwAssertArgType>(_status)
1403 _status = msg.serializeFrom(cmdSeq);
1406 static_cast<FwAssertArgType>(_status)
1409 _status = msg.serializeFrom(args);
1412 static_cast<FwAssertArgType>(_status)
1421 static_cast<FwAssertArgType>(qStatus)
1437 ComponentIpcSerializableBuffer msg;
1441 _status = msg.serializeFrom(static_cast<FwEnumStoreType>(CMD_SENDPARTIAL));
1444 static_cast<FwAssertArgType>(_status)
1450 _status = msg.serializeFrom(port);
1453 static_cast<FwAssertArgType>(_status)
1456 _status = msg.serializeFrom(opCode);
1459 static_cast<FwAssertArgType>(_status)
1462 _status = msg.serializeFrom(cmdSeq);
1465 static_cast<FwAssertArgType>(_status)
1468 _status = msg.serializeFrom(args);
1471 static_cast<FwAssertArgType>(_status)
1480 static_cast<FwAssertArgType>(qStatus)
1535 this->timeCaller_out(0, _logTime);
1545 #if FW_AMPCS_COMPATIBLE 1550 static_cast<FwAssertArgType>(_status)
1560 static_cast<FwAssertArgType>(_status)
1573 #if FW_ENABLE_TEXT_LOGGING 1574 if (this->isConnected_textEventOut_OutputPort(0)) {
1575 #if FW_OBJECT_NAMES == 1 1576 const char* _formatString =
1577 "(%s) %s: Could not open file %s";
1579 const char* _formatString =
1580 "%s: Could not open file %s";
1584 (void) _logString.
format(
1587 this->m_objName.toChar(),
1593 this->textEventOut_out(
1613 this->timeCaller_out(0, _logTime);
1623 #if FW_AMPCS_COMPATIBLE 1628 static_cast<FwAssertArgType>(_status)
1638 static_cast<FwAssertArgType>(_status)
1641 #if FW_AMPCS_COMPATIBLE 1644 static_cast<U8>(
sizeof(I32))
1648 static_cast<FwAssertArgType>(_status)
1654 static_cast<FwAssertArgType>(_status)
1667 #if FW_ENABLE_TEXT_LOGGING 1668 if (this->isConnected_textEventOut_OutputPort(0)) {
1669 #if FW_OBJECT_NAMES == 1 1670 const char* _formatString =
1671 "(%s) %s: Could not read file %s with status %" PRIi32
"";
1673 const char* _formatString =
1674 "%s: Could not read file %s with status %" PRIi32
"";
1678 (void) _logString.
format(
1681 this->m_objName.toChar(),
1688 this->textEventOut_out(
1708 this->timeCaller_out(0, _logTime);
1718 #if FW_AMPCS_COMPATIBLE 1723 static_cast<FwAssertArgType>(_status)
1733 static_cast<FwAssertArgType>(_status)
1742 static_cast<FwAssertArgType>(_status)
1755 #if FW_ENABLE_TEXT_LOGGING 1756 if (this->isConnected_textEventOut_OutputPort(0)) {
1757 #if FW_OBJECT_NAMES == 1 1758 const char* _formatString =
1759 "(%s) %s: Sent file %s to file %s";
1761 const char* _formatString =
1762 "%s: Sent file %s to file %s";
1766 (void) _logString.
format(
1769 this->m_objName.toChar(),
1776 this->textEventOut_out(
1796 this->timeCaller_out(0, _logTime);
1806 #if FW_AMPCS_COMPATIBLE 1811 static_cast<FwAssertArgType>(_status)
1821 static_cast<FwAssertArgType>(_status)
1830 static_cast<FwAssertArgType>(_status)
1843 #if FW_ENABLE_TEXT_LOGGING 1844 if (this->isConnected_textEventOut_OutputPort(0)) {
1845 #if FW_OBJECT_NAMES == 1 1846 const char* _formatString =
1847 "(%s) %s: Canceled downlink of file %s to file %s";
1849 const char* _formatString =
1850 "%s: Canceled downlink of file %s to file %s";
1854 (void) _logString.
format(
1857 this->m_objName.toChar(),
1859 "DownlinkCanceled ",
1864 this->textEventOut_out(
1887 this->timeCaller_out(0, _logTime);
1897 #if FW_AMPCS_COMPATIBLE 1902 static_cast<FwAssertArgType>(_status)
1906 #if FW_AMPCS_COMPATIBLE 1909 static_cast<U8>(
sizeof(U32))
1913 static_cast<FwAssertArgType>(_status)
1919 static_cast<FwAssertArgType>(_status)
1922 #if FW_AMPCS_COMPATIBLE 1925 static_cast<U8>(
sizeof(U32))
1929 static_cast<FwAssertArgType>(_status)
1935 static_cast<FwAssertArgType>(_status)
1938 #if FW_AMPCS_COMPATIBLE 1941 static_cast<U8>(
sizeof(U32))
1945 static_cast<FwAssertArgType>(_status)
1951 static_cast<FwAssertArgType>(_status)
1960 static_cast<FwAssertArgType>(_status)
1969 static_cast<FwAssertArgType>(_status)
1982 #if FW_ENABLE_TEXT_LOGGING 1983 if (this->isConnected_textEventOut_OutputPort(0)) {
1984 #if FW_OBJECT_NAMES == 1 1985 const char* _formatString =
1986 "(%s) %s: Offset %" PRIu32
" plus length %" PRIu32
" is greater than source size %" PRIu32
" for partial downlink of file %s to file %s. ";
1988 const char* _formatString =
1989 "%s: Offset %" PRIu32
" plus length %" PRIu32
" is greater than source size %" PRIu32
" for partial downlink of file %s to file %s. ";
1993 (void) _logString.
format(
1996 this->m_objName.toChar(),
1998 "DownlinkPartialWarning ",
2006 this->textEventOut_out(
2028 this->timeCaller_out(0, _logTime);
2038 #if FW_AMPCS_COMPATIBLE 2043 static_cast<FwAssertArgType>(_status)
2053 static_cast<FwAssertArgType>(_status)
2062 static_cast<FwAssertArgType>(_status)
2065 #if FW_AMPCS_COMPATIBLE 2068 static_cast<U8>(
sizeof(U32))
2072 static_cast<FwAssertArgType>(_status)
2078 static_cast<FwAssertArgType>(_status)
2081 #if FW_AMPCS_COMPATIBLE 2084 static_cast<U8>(
sizeof(U32))
2088 static_cast<FwAssertArgType>(_status)
2094 static_cast<FwAssertArgType>(_status)
2107 #if FW_ENABLE_TEXT_LOGGING 2108 if (this->isConnected_textEventOut_OutputPort(0)) {
2109 #if FW_OBJECT_NAMES == 1 2110 const char* _formatString =
2111 "(%s) %s: Error occurred during partial downlink of file %s to file %s. Offset %" PRIu32
" greater than or equal to source filesize %" PRIu32
".";
2113 const char* _formatString =
2114 "%s: Error occurred during partial downlink of file %s to file %s. Offset %" PRIu32
" greater than or equal to source filesize %" PRIu32
".";
2118 (void) _logString.
format(
2121 this->m_objName.toChar(),
2123 "DownlinkPartialFail ",
2130 this->textEventOut_out(
2150 this->timeCaller_out(0, _logTime);
2160 #if FW_AMPCS_COMPATIBLE 2165 static_cast<FwAssertArgType>(_status)
2175 static_cast<FwAssertArgType>(_status)
2178 #if FW_AMPCS_COMPATIBLE 2181 static_cast<U8>(
sizeof(U32))
2185 static_cast<FwAssertArgType>(_status)
2191 static_cast<FwAssertArgType>(_status)
2204 #if FW_ENABLE_TEXT_LOGGING 2205 if (this->isConnected_textEventOut_OutputPort(0)) {
2206 #if FW_OBJECT_NAMES == 1 2207 const char* _formatString =
2208 "(%s) %s: Failed to send data packet from file %s at byte offset %" PRIu32
".";
2210 const char* _formatString =
2211 "%s: Failed to send data packet from file %s at byte offset %" PRIu32
".";
2215 (void) _logString.
format(
2218 this->m_objName.toChar(),
2225 this->textEventOut_out(
2246 this->timeCaller_out(0, _logTime);
2256 #if FW_AMPCS_COMPATIBLE 2261 static_cast<FwAssertArgType>(_status)
2265 #if FW_AMPCS_COMPATIBLE 2268 static_cast<U8>(
sizeof(U32))
2272 static_cast<FwAssertArgType>(_status)
2278 static_cast<FwAssertArgType>(_status)
2287 static_cast<FwAssertArgType>(_status)
2296 static_cast<FwAssertArgType>(_status)
2309 #if FW_ENABLE_TEXT_LOGGING 2310 if (this->isConnected_textEventOut_OutputPort(0)) {
2311 #if FW_OBJECT_NAMES == 1 2312 const char* _formatString =
2313 "(%s) %s: Downlink of %" PRIu32
" bytes started from %s to %s";
2315 const char* _formatString =
2316 "%s: Downlink of %" PRIu32
" bytes started from %s to %s";
2320 (void) _logString.
format(
2323 this->m_objName.toChar(),
2331 this->textEventOut_out(
2348 this->timeCaller_out(0, _logTime);
2358 #if FW_AMPCS_COMPATIBLE 2363 static_cast<FwAssertArgType>(_status)
2373 static_cast<FwAssertArgType>(_status)
2386 #if FW_ENABLE_TEXT_LOGGING 2387 if (this->isConnected_textEventOut_OutputPort(0)) {
2388 #if FW_OBJECT_NAMES == 1 2389 const char* _formatString =
2390 "(%s) %s: Downlink of file %s stopped due to zero-size.";
2392 const char* _formatString =
2393 "%s: Downlink of file %s stopped due to zero-size.";
2397 (void) _logString.
format(
2400 this->m_objName.toChar(),
2402 "DownlinkZeroSizeFile ",
2406 this->textEventOut_out(
2423 this->timeCaller_out(0, _logTime);
2432 #if FW_AMPCS_COMPATIBLE 2438 static_cast<FwAssertArgType>(_status)
2452 #if FW_ENABLE_TEXT_LOGGING 2453 if (this->isConnected_textEventOut_OutputPort(0)) {
2454 #if FW_OBJECT_NAMES == 1 2455 const char* _formatString =
2456 "(%s) %s: Commanded source filename too long";
2458 const char* _formatString =
2459 "%s: Commanded source filename too long";
2463 (void) _logString.
format(
2466 this->m_objName.toChar(),
2468 "FilenameSourceOverflow " 2471 this->textEventOut_out(
2488 this->timeCaller_out(0, _logTime);
2497 #if FW_AMPCS_COMPATIBLE 2503 static_cast<FwAssertArgType>(_status)
2517 #if FW_ENABLE_TEXT_LOGGING 2518 if (this->isConnected_textEventOut_OutputPort(0)) {
2519 #if FW_OBJECT_NAMES == 1 2520 const char* _formatString =
2521 "(%s) %s: Commanded destination filename too long";
2523 const char* _formatString =
2524 "%s: Commanded destination filename too long";
2528 (void) _logString.
format(
2531 this->m_objName.toChar(),
2533 "FilenameDestinationOverflow " 2536 this->textEventOut_out(
2553 this->timeCaller_out(0, _logTime);
2563 #if FW_AMPCS_COMPATIBLE 2568 static_cast<FwAssertArgType>(_status)
2578 static_cast<FwAssertArgType>(_status)
2591 #if FW_ENABLE_TEXT_LOGGING 2592 if (this->isConnected_textEventOut_OutputPort(0)) {
2593 #if FW_OBJECT_NAMES == 1 2594 const char* _formatString =
2595 "(%s) %s: Source file %s is outside the configured read sandbox";
2597 const char* _formatString =
2598 "%s: Source file %s is outside the configured read sandbox";
2602 (void) _logString.
format(
2605 this->m_objName.toChar(),
2607 "SourceOutOfSandbox ",
2611 this->textEventOut_out(
2638 this->timeCaller_out(0, _tlmTime);
2668 static_cast<FwAssertArgType>(_stat)
2690 static_cast<FwAssertArgType>(_stat)
2712 static_cast<FwAssertArgType>(_stat)
2732 this->timeCaller_out(0, _time);
2750 this->m_guardedPortMutex.
lock();
2756 this->m_guardedPortMutex.
unLock();
2766 ComponentIpcSerializableBuffer _msg;
2776 static_cast<FwAssertArgType>(_msgStatus)
2786 static_cast<FwAssertArgType>(_deserStatus)
2789 MsgTypeEnum _msgType =
static_cast<MsgTypeEnum
>(_desMsg);
2791 if (_msgType == FILEDOWNLINK_COMPONENT_EXIT) {
2796 _deserStatus = _msg.deserializeTo(portNum);
2799 static_cast<FwAssertArgType>(_deserStatus)
2807 _deserStatus = _msg.deserializeTo(context);
2810 static_cast<FwAssertArgType>(_deserStatus)
2822 case BUFFERRETURN_BUFFERSEND: {
2825 _deserStatus = _msg.deserializeTo(fwBuffer);
2828 static_cast<FwAssertArgType>(_deserStatus)
2843 _deserStatus = _msg.deserializeTo(key);
2846 static_cast<FwAssertArgType>(_deserStatus)
2858 case CMD_SENDFILE: {
2861 _deserStatus = _msg.deserializeTo(_opCode);
2864 static_cast<FwAssertArgType>(_deserStatus)
2869 _deserStatus = _msg.deserializeTo(_cmdSeq);
2872 static_cast<FwAssertArgType>(_deserStatus)
2877 _deserStatus = _msg.deserializeTo(args);
2880 static_cast<FwAssertArgType>(_deserStatus)
2918 #if FW_CMD_CHECK_RESIDUAL 2942 _deserStatus = _msg.deserializeTo(_opCode);
2945 static_cast<FwAssertArgType>(_deserStatus)
2950 _deserStatus = _msg.deserializeTo(_cmdSeq);
2953 static_cast<FwAssertArgType>(_deserStatus)
2958 _deserStatus = _msg.deserializeTo(args);
2961 static_cast<FwAssertArgType>(_deserStatus)
2969 #if FW_CMD_CHECK_RESIDUAL 2986 case CMD_SENDPARTIAL: {
2989 _deserStatus = _msg.deserializeTo(_opCode);
2992 static_cast<FwAssertArgType>(_deserStatus)
2997 _deserStatus = _msg.deserializeTo(_cmdSeq);
3000 static_cast<FwAssertArgType>(_deserStatus)
3005 _deserStatus = _msg.deserializeTo(args);
3008 static_cast<FwAssertArgType>(_deserStatus)
3076 #if FW_CMD_CHECK_RESIDUAL 3109 void FileDownlinkComponentBase ::
3120 compPtr->cmdIn_handlerBase(
3132 void FileDownlinkComponentBase ::
3141 compPtr->Run_handlerBase(
3159 return compPtr->SendFile_handlerBase(
3168 void FileDownlinkComponentBase ::
3169 m_p_bufferReturn_in(
3177 compPtr->bufferReturn_handlerBase(
3183 void FileDownlinkComponentBase ::
3192 compPtr->pingIn_handlerBase(
3198 #if !FW_DIRECT_PORT_CALLS 3204 void FileDownlinkComponentBase ::
3212 static_cast<FwAssertArgType>(portNum)
3216 this->m_cmdRegOut_OutputPort[portNum].isConnected(),
3217 static_cast<FwAssertArgType>(portNum)
3219 this->m_cmdRegOut_OutputPort[portNum].
invoke(
3224 void FileDownlinkComponentBase ::
3234 static_cast<FwAssertArgType>(portNum)
3238 this->m_cmdResponseOut_OutputPort[portNum].isConnected(),
3239 static_cast<FwAssertArgType>(portNum)
3241 this->m_cmdResponseOut_OutputPort[portNum].
invoke(
3248 void FileDownlinkComponentBase ::
3259 static_cast<FwAssertArgType>(portNum)
3263 this->m_eventOut_OutputPort[portNum].isConnected(),
3264 static_cast<FwAssertArgType>(portNum)
3266 this->m_eventOut_OutputPort[portNum].
invoke(
3274 #if FW_ENABLE_TEXT_LOGGING 3276 void FileDownlinkComponentBase ::
3286 (0 <= portNum) && (portNum < this->getNum_textEventOut_OutputPorts()),
3287 static_cast<FwAssertArgType>(portNum)
3291 this->m_textEventOut_OutputPort[portNum].isConnected(),
3292 static_cast<FwAssertArgType>(portNum)
3294 this->m_textEventOut_OutputPort[portNum].invoke(
3304 void FileDownlinkComponentBase ::
3312 static_cast<FwAssertArgType>(portNum)
3316 this->m_timeCaller_OutputPort[portNum].isConnected(),
3317 static_cast<FwAssertArgType>(portNum)
3319 this->m_timeCaller_OutputPort[portNum].
invoke(
3324 void FileDownlinkComponentBase ::
3334 static_cast<FwAssertArgType>(portNum)
3338 this->m_tlmOut_OutputPort[portNum].isConnected(),
3339 static_cast<FwAssertArgType>(portNum)
3341 this->m_tlmOut_OutputPort[portNum].
invoke(
Serialization/Deserialization operation was successful.
void addCallPort(InputTimePort *callPort)
Register an input port.
static constexpr FwIndexType getNum_eventOut_OutputPorts()
Source file path is outside the configured read sandbox.
static constexpr FwSizeType CAPACITY
void Cancel_cmdHandlerBase(FwOpcodeType opCode, U32 cmdSeq, Fw::CmdArgBuffer &args)
static constexpr FwIndexType getNum_SendFile_InputPorts()
void regCommands()
Register commands with the Command Dispatcher.
FwIdType FwOpcodeType
The type of a command opcode.
FwIdType getIdBase() const
PlatformSizeType FwSizeType
Status receive(U8 *destination, FwSizeType capacity, BlockingType blockType, FwSizeType &actualSize, FwQueuePriorityType &priority) override
receive a message from the queue through delegate
Channel ID for FilesSent.
static constexpr FwIndexType getNum_FileComplete_OutputPorts()
Status
status returned from the queue send function
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].
Supplied filename has overflowed. This intentionally discards the filename to avoid cascading overflo...
message to exit active component task
BYTE pingInPortSize[Svc::PingPortBuffer::CAPACITY]
SerializeStatus deserializeTo(U8 &val, Endianness mode=Endianness::BIG) override
Deserialize an 8-bit unsigned integer value.
Svc::InputSendFileRequestPort * get_SendFile_InputPort(FwIndexType portNum)
static constexpr FwIndexType getNum_bufferReturn_InputPorts()
static constexpr FwSizeType CAPACITY
void unLock()
unlock the mutex and assert success
void invoke(U32 key) const
Invoke a port connection.
virtual void unLock()
Unlock the guarded mutex.
The File Downlink component stopped due to a zero-size file.
virtual const CHAR * toChar() const =0
Convert to a C-style char*.
The File Downlink component generated an error when trying to send a data packet. ...
void init()
Initialization function.
void log_WARNING_HI_SourceOutOfSandbox(const Fw::StringBase &fileName) const
Enum representing a command response.
No time base has been established (Required)
SerializeStatus serializeFrom(U8 val, Endianness mode=Endianness::BIG) override
Serialize an 8-bit unsigned integer value.
void addCallPort(InputCmdRegPort *callPort)
Register an input port.
virtual void SendPartial_preMsgHook(FwOpcodeType opCode, U32 cmdSeq)
Pre-message hook for command SendPartial.
void bufferSendOut_out(FwIndexType portNum, Fw::Buffer &fwBuffer) const
Invoke output port bufferSendOut.
void set_cmdResponseOut_OutputPort(FwIndexType portNum, Fw::InputCmdResponsePort *port)
Connect port to cmdResponseOut[portNum].
Read a named file off the disk. Divide it into packets and send the packets for transmission to the g...
bool isConnected_cmdResponseOut_OutputPort(FwIndexType portNum) const
Os::Queue m_queue
queue object for active component
bool isConnected_cmdRegOut_OutputPort(FwIndexType portNum) const
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
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.
An error occurred opening a file.
FwIdType FwEventIdType
The type of an event identifier.
The File Downlink component successfully sent a file.
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 connection.
static constexpr FwSizeType CAPACITY
Cancel the downlink in progress, if any.
#define FW_OBJECT_NAMES
Indicates whether or not object names are stored (more memory, can be used for tracking objects) ...
void init()
Initialization function.
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
bool isConnected_eventOut_OutputPort(FwIndexType portNum) const
Os::Queue::Status createQueue(FwSizeType depth, FwSizeType msgSize)
virtual void Cancel_cmdHandler(FwOpcodeType opCode, U32 cmdSeq)=0
static constexpr FwIndexType getNum_tlmOut_OutputPorts()
#define FW_MIN(a, b)
MIN macro (deprecated in C++, use std::min)
bool isConnected_FileComplete_OutputPort(FwIndexType portNum) const
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 connection.
void pingOut_out(FwIndexType portNum, U32 key) const
Invoke output port pingOut.
The File Downlink component canceled downlink of a file.
virtual void Cancel_preMsgHook(FwOpcodeType opCode, U32 cmdSeq)
Pre-message hook for command Cancel.
void init()
Initialization function.
void addCallPort(InputBufferSendPort *callPort)
Register an input port.
void invoke(Fw::Time &time) const
Invoke a port connection.
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)
Serializable::SizeType getDeserializeSizeLeft() const override
Get remaining deserialization buffer size.
Svc::InputPingPort * get_pingIn_InputPort(FwIndexType portNum)
void invoke(FwOpcodeType opCode, U32 cmdSeq, const Fw::CmdResponse &response) const
Invoke a port connection.
FwIdType FwChanIdType
The type of a telemetry channel identifier.
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 tlmWrite(FwChanIdType id, Fw::TlmBuffer &_tlmBuff, Fw::Time _tlmTime=Fw::Time()) const
void resetDeser() override
Reset deserialization pointer to beginning of buffer.
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.
A serious but recoverable event.
Errors dispatching messages.
virtual ~FileDownlinkComponentBase()
Destroy FileDownlinkComponentBase object.
static constexpr FwIndexType getNum_bufferSendOut_OutputPorts()
Fw::InputCmdPort * get_cmdIn_InputPort(FwIndexType portNum)
void invoke(FwChanIdType id, Fw::Time &timeTag, Fw::TlmBuffer &val) const
Invoke a port connection.
const char * toChar() const
Convert to a C-style char*.
Enum representing event severity.
void FileComplete_out(FwIndexType portNum, const Svc::SendFileResponse &resp) const
Invoke output port FileComplete.
Channel ID for PacketsSent.
FormatStatus format(const CHAR *formatString,...)
write formatted string to buffer
void init()
Initialization function.
void set_timeCaller_OutputPort(FwIndexType portNum, Fw::InputTimePort *port)
Connect port to timeCaller[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.
bool isConnected_bufferSendOut_OutputPort(FwIndexType portNum) const
A partial downlink request started beyond the source file size and failed.
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.
The File Downlink component started a file download.
PlatformQueuePriorityType FwQueuePriorityType
The type of queue priorities used.
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 cmdIn_handlerBase(FwIndexType portNum, FwOpcodeType opCode, U32 cmdSeq, Fw::CmdArgBuffer &args)
Handler base-class function for input port cmdIn.
void invoke(FwEventIdType id, Fw::Time &timeTag, const Fw::LogSeverity &severity, Fw::LogBuffer &args) const
Invoke a port connection.
static constexpr FwIndexType getNum_pingOut_OutputPorts()
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].
Fw::InputBufferSendPort * get_bufferReturn_InputPort(FwIndexType portNum)
void set_tlmOut_OutputPort(FwIndexType portNum, Fw::InputTlmPort *port)
Connect port to tlmOut[portNum].
A message was sent requesting an exit of the loop.
PlatformIndexType FwIndexType
FileDownlinkComponentBase(const char *compName="")
Construct FileDownlinkComponentBase object.
virtual void SendFile_preMsgHook(FwOpcodeType opCode, U32 cmdSeq)
Pre-message hook for command SendFile.
static constexpr FwIndexType getNum_Run_InputPorts()
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.
bool isConnected_pingOut_OutputPort(FwIndexType portNum) const
void addCallPort(InputLogPort *callPort)
Register an input port.
Read a named file off the disk from a starting position. Divide it into packets and send the packets ...
static constexpr FwIndexType getNum_pingIn_InputPorts()
void init()
Initialization function.
void log_WARNING_HI_DownlinkZeroSizeFile(const Fw::StringBase &sourceFileName) const
virtual void SendFile_cmdHandler(FwOpcodeType opCode, U32 cmdSeq, const Fw::CmdStringArg &sourceFileName, const Fw::CmdStringArg &destFileName)=0
RateGroupDivider component implementation.
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
Supplied filename has overflowed.
static constexpr FwIndexType getNum_cmdIn_InputPorts()
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 log_WARNING_HI_FilenameDestinationOverflow() const
void invoke(const Svc::SendFileResponse &resp) const
Invoke a port connection.
void SendPartial_cmdHandlerBase(FwOpcodeType opCode, U32 cmdSeq, Fw::CmdArgBuffer &args)
Message will return with status when space is unavailable.
void set_FileComplete_OutputPort(FwIndexType portNum, Svc::InputSendFileCompletePort *port)
Connect port to FileComplete[portNum].
Implementation of malloc based allocator.
void pingIn_handlerBase(FwIndexType portNum, U32 key)
Handler base-class function for input port pingIn.
void log_WARNING_HI_FilenameSourceOverflow() const
static constexpr FwIndexType getNum_timeCaller_OutputPorts()
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.
static constexpr FwIndexType getNum_cmdRegOut_OutputPorts()
void addCallPort(InputSendFileCompletePort *callPort)
Register an input port.
A partial downlink request exceeded the source file size; length was clamped.
static constexpr FwSizeType CAPACITY
An error occurred reading a file.
bool isConnected_tlmOut_OutputPort(FwIndexType portNum) const
bool isConnected_timeCaller_OutputPort(FwIndexType portNum) const
void addCallPort(InputCmdResponsePort *callPort)
Register an input port.
void lock()
lock the mutex and assert success
SerializeStatus serializeTo(SerialBufferBase &buffer, Endianness mode=Endianness::BIG) const override
Serialize the contents of this object to a buffer.
BYTE cmdPortSize[Fw::CmdPortBuffer::CAPACITY]
static constexpr FwIndexType getNum_cmdResponseOut_OutputPorts()