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)
1177 if (qStatus == Os::Queue::Status::FULL) {
1184 static_cast<FwAssertArgType>(qStatus)
1223 #if !FW_DIRECT_PORT_CALLS 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(
1303 this->cmdResponseOut_out(0, opCode, cmdSeq, response);
1324 ComponentIpcSerializableBuffer msg;
1328 _status = msg.serializeFrom(static_cast<FwEnumStoreType>(CMD_SENDFILE));
1331 static_cast<FwAssertArgType>(_status)
1337 _status = msg.serializeFrom(port);
1340 static_cast<FwAssertArgType>(_status)
1343 _status = msg.serializeFrom(opCode);
1346 static_cast<FwAssertArgType>(_status)
1349 _status = msg.serializeFrom(cmdSeq);
1352 static_cast<FwAssertArgType>(_status)
1355 _status = msg.serializeFrom(args);
1358 static_cast<FwAssertArgType>(_status)
1367 static_cast<FwAssertArgType>(qStatus)
1383 ComponentIpcSerializableBuffer msg;
1387 _status = msg.serializeFrom(static_cast<FwEnumStoreType>(CMD_CANCEL));
1390 static_cast<FwAssertArgType>(_status)
1396 _status = msg.serializeFrom(port);
1399 static_cast<FwAssertArgType>(_status)
1402 _status = msg.serializeFrom(opCode);
1405 static_cast<FwAssertArgType>(_status)
1408 _status = msg.serializeFrom(cmdSeq);
1411 static_cast<FwAssertArgType>(_status)
1414 _status = msg.serializeFrom(args);
1417 static_cast<FwAssertArgType>(_status)
1426 static_cast<FwAssertArgType>(qStatus)
1442 ComponentIpcSerializableBuffer msg;
1446 _status = msg.serializeFrom(static_cast<FwEnumStoreType>(CMD_SENDPARTIAL));
1449 static_cast<FwAssertArgType>(_status)
1455 _status = msg.serializeFrom(port);
1458 static_cast<FwAssertArgType>(_status)
1461 _status = msg.serializeFrom(opCode);
1464 static_cast<FwAssertArgType>(_status)
1467 _status = msg.serializeFrom(cmdSeq);
1470 static_cast<FwAssertArgType>(_status)
1473 _status = msg.serializeFrom(args);
1476 static_cast<FwAssertArgType>(_status)
1485 static_cast<FwAssertArgType>(qStatus)
1540 this->timeCaller_out(0, _logTime);
1550 #if FW_AMPCS_COMPATIBLE 1555 static_cast<FwAssertArgType>(_status)
1565 static_cast<FwAssertArgType>(_status)
1578 #if FW_ENABLE_TEXT_LOGGING 1579 if (this->isConnected_textEventOut_OutputPort(0)) {
1580 #if FW_OBJECT_NAMES == 1 1581 const char* _formatString =
1582 "(%s) %s: Could not open file %s";
1584 const char* _formatString =
1585 "%s: Could not open file %s";
1589 (void) _logString.
format(
1592 this->m_objName.toChar(),
1598 this->textEventOut_out(
1618 this->timeCaller_out(0, _logTime);
1628 #if FW_AMPCS_COMPATIBLE 1633 static_cast<FwAssertArgType>(_status)
1643 static_cast<FwAssertArgType>(_status)
1646 #if FW_AMPCS_COMPATIBLE 1649 static_cast<U8>(
sizeof(I32))
1653 static_cast<FwAssertArgType>(_status)
1659 static_cast<FwAssertArgType>(_status)
1672 #if FW_ENABLE_TEXT_LOGGING 1673 if (this->isConnected_textEventOut_OutputPort(0)) {
1674 #if FW_OBJECT_NAMES == 1 1675 const char* _formatString =
1676 "(%s) %s: Could not read file %s with status %" PRIi32
"";
1678 const char* _formatString =
1679 "%s: Could not read file %s with status %" PRIi32
"";
1683 (void) _logString.
format(
1686 this->m_objName.toChar(),
1693 this->textEventOut_out(
1713 this->timeCaller_out(0, _logTime);
1723 #if FW_AMPCS_COMPATIBLE 1728 static_cast<FwAssertArgType>(_status)
1738 static_cast<FwAssertArgType>(_status)
1747 static_cast<FwAssertArgType>(_status)
1760 #if FW_ENABLE_TEXT_LOGGING 1761 if (this->isConnected_textEventOut_OutputPort(0)) {
1762 #if FW_OBJECT_NAMES == 1 1763 const char* _formatString =
1764 "(%s) %s: Sent file %s to file %s";
1766 const char* _formatString =
1767 "%s: Sent file %s to file %s";
1771 (void) _logString.
format(
1774 this->m_objName.toChar(),
1781 this->textEventOut_out(
1801 this->timeCaller_out(0, _logTime);
1811 #if FW_AMPCS_COMPATIBLE 1816 static_cast<FwAssertArgType>(_status)
1826 static_cast<FwAssertArgType>(_status)
1835 static_cast<FwAssertArgType>(_status)
1848 #if FW_ENABLE_TEXT_LOGGING 1849 if (this->isConnected_textEventOut_OutputPort(0)) {
1850 #if FW_OBJECT_NAMES == 1 1851 const char* _formatString =
1852 "(%s) %s: Canceled downlink of file %s to file %s";
1854 const char* _formatString =
1855 "%s: Canceled downlink of file %s to file %s";
1859 (void) _logString.
format(
1862 this->m_objName.toChar(),
1864 "DownlinkCanceled ",
1869 this->textEventOut_out(
1892 this->timeCaller_out(0, _logTime);
1902 #if FW_AMPCS_COMPATIBLE 1907 static_cast<FwAssertArgType>(_status)
1911 #if FW_AMPCS_COMPATIBLE 1914 static_cast<U8>(
sizeof(U32))
1918 static_cast<FwAssertArgType>(_status)
1924 static_cast<FwAssertArgType>(_status)
1927 #if FW_AMPCS_COMPATIBLE 1930 static_cast<U8>(
sizeof(U32))
1934 static_cast<FwAssertArgType>(_status)
1940 static_cast<FwAssertArgType>(_status)
1943 #if FW_AMPCS_COMPATIBLE 1946 static_cast<U8>(
sizeof(U32))
1950 static_cast<FwAssertArgType>(_status)
1956 static_cast<FwAssertArgType>(_status)
1965 static_cast<FwAssertArgType>(_status)
1974 static_cast<FwAssertArgType>(_status)
1987 #if FW_ENABLE_TEXT_LOGGING 1988 if (this->isConnected_textEventOut_OutputPort(0)) {
1989 #if FW_OBJECT_NAMES == 1 1990 const char* _formatString =
1991 "(%s) %s: Offset %" PRIu32
" plus length %" PRIu32
" is greater than source size %" PRIu32
" for partial downlink of file %s to file %s. ";
1993 const char* _formatString =
1994 "%s: Offset %" PRIu32
" plus length %" PRIu32
" is greater than source size %" PRIu32
" for partial downlink of file %s to file %s. ";
1998 (void) _logString.
format(
2001 this->m_objName.toChar(),
2003 "DownlinkPartialWarning ",
2011 this->textEventOut_out(
2033 this->timeCaller_out(0, _logTime);
2043 #if FW_AMPCS_COMPATIBLE 2048 static_cast<FwAssertArgType>(_status)
2058 static_cast<FwAssertArgType>(_status)
2067 static_cast<FwAssertArgType>(_status)
2070 #if FW_AMPCS_COMPATIBLE 2073 static_cast<U8>(
sizeof(U32))
2077 static_cast<FwAssertArgType>(_status)
2083 static_cast<FwAssertArgType>(_status)
2086 #if FW_AMPCS_COMPATIBLE 2089 static_cast<U8>(
sizeof(U32))
2093 static_cast<FwAssertArgType>(_status)
2099 static_cast<FwAssertArgType>(_status)
2112 #if FW_ENABLE_TEXT_LOGGING 2113 if (this->isConnected_textEventOut_OutputPort(0)) {
2114 #if FW_OBJECT_NAMES == 1 2115 const char* _formatString =
2116 "(%s) %s: Error occurred during partial downlink of file %s to file %s. Offset %" PRIu32
" greater than or equal to source filesize %" PRIu32
".";
2118 const char* _formatString =
2119 "%s: Error occurred during partial downlink of file %s to file %s. Offset %" PRIu32
" greater than or equal to source filesize %" PRIu32
".";
2123 (void) _logString.
format(
2126 this->m_objName.toChar(),
2128 "DownlinkPartialFail ",
2135 this->textEventOut_out(
2155 this->timeCaller_out(0, _logTime);
2165 #if FW_AMPCS_COMPATIBLE 2170 static_cast<FwAssertArgType>(_status)
2180 static_cast<FwAssertArgType>(_status)
2183 #if FW_AMPCS_COMPATIBLE 2186 static_cast<U8>(
sizeof(U32))
2190 static_cast<FwAssertArgType>(_status)
2196 static_cast<FwAssertArgType>(_status)
2209 #if FW_ENABLE_TEXT_LOGGING 2210 if (this->isConnected_textEventOut_OutputPort(0)) {
2211 #if FW_OBJECT_NAMES == 1 2212 const char* _formatString =
2213 "(%s) %s: Failed to send data packet from file %s at byte offset %" PRIu32
".";
2215 const char* _formatString =
2216 "%s: Failed to send data packet from file %s at byte offset %" PRIu32
".";
2220 (void) _logString.
format(
2223 this->m_objName.toChar(),
2230 this->textEventOut_out(
2251 this->timeCaller_out(0, _logTime);
2261 #if FW_AMPCS_COMPATIBLE 2266 static_cast<FwAssertArgType>(_status)
2270 #if FW_AMPCS_COMPATIBLE 2273 static_cast<U8>(
sizeof(U32))
2277 static_cast<FwAssertArgType>(_status)
2283 static_cast<FwAssertArgType>(_status)
2292 static_cast<FwAssertArgType>(_status)
2301 static_cast<FwAssertArgType>(_status)
2314 #if FW_ENABLE_TEXT_LOGGING 2315 if (this->isConnected_textEventOut_OutputPort(0)) {
2316 #if FW_OBJECT_NAMES == 1 2317 const char* _formatString =
2318 "(%s) %s: Downlink of %" PRIu32
" bytes started from %s to %s";
2320 const char* _formatString =
2321 "%s: Downlink of %" PRIu32
" bytes started from %s to %s";
2325 (void) _logString.
format(
2328 this->m_objName.toChar(),
2336 this->textEventOut_out(
2353 this->timeCaller_out(0, _logTime);
2363 #if FW_AMPCS_COMPATIBLE 2368 static_cast<FwAssertArgType>(_status)
2378 static_cast<FwAssertArgType>(_status)
2391 #if FW_ENABLE_TEXT_LOGGING 2392 if (this->isConnected_textEventOut_OutputPort(0)) {
2393 #if FW_OBJECT_NAMES == 1 2394 const char* _formatString =
2395 "(%s) %s: Downlink of file %s stopped due to zero-size.";
2397 const char* _formatString =
2398 "%s: Downlink of file %s stopped due to zero-size.";
2402 (void) _logString.
format(
2405 this->m_objName.toChar(),
2407 "DownlinkZeroSizeFile ",
2411 this->textEventOut_out(
2428 this->timeCaller_out(0, _logTime);
2437 #if FW_AMPCS_COMPATIBLE 2443 static_cast<FwAssertArgType>(_status)
2457 #if FW_ENABLE_TEXT_LOGGING 2458 if (this->isConnected_textEventOut_OutputPort(0)) {
2459 #if FW_OBJECT_NAMES == 1 2460 const char* _formatString =
2461 "(%s) %s: Commanded source filename too long";
2463 const char* _formatString =
2464 "%s: Commanded source filename too long";
2468 (void) _logString.
format(
2471 this->m_objName.toChar(),
2473 "FilenameSourceOverflow " 2476 this->textEventOut_out(
2493 this->timeCaller_out(0, _logTime);
2502 #if FW_AMPCS_COMPATIBLE 2508 static_cast<FwAssertArgType>(_status)
2522 #if FW_ENABLE_TEXT_LOGGING 2523 if (this->isConnected_textEventOut_OutputPort(0)) {
2524 #if FW_OBJECT_NAMES == 1 2525 const char* _formatString =
2526 "(%s) %s: Commanded destination filename too long";
2528 const char* _formatString =
2529 "%s: Commanded destination filename too long";
2533 (void) _logString.
format(
2536 this->m_objName.toChar(),
2538 "FilenameDestinationOverflow " 2541 this->textEventOut_out(
2558 this->timeCaller_out(0, _logTime);
2568 #if FW_AMPCS_COMPATIBLE 2573 static_cast<FwAssertArgType>(_status)
2583 static_cast<FwAssertArgType>(_status)
2596 #if FW_ENABLE_TEXT_LOGGING 2597 if (this->isConnected_textEventOut_OutputPort(0)) {
2598 #if FW_OBJECT_NAMES == 1 2599 const char* _formatString =
2600 "(%s) %s: Source file %s is outside the configured read sandbox";
2602 const char* _formatString =
2603 "%s: Source file %s is outside the configured read sandbox";
2607 (void) _logString.
format(
2610 this->m_objName.toChar(),
2612 "SourceOutOfSandbox ",
2616 this->textEventOut_out(
2643 this->timeCaller_out(0, _tlmTime);
2673 static_cast<FwAssertArgType>(_stat)
2695 static_cast<FwAssertArgType>(_stat)
2717 static_cast<FwAssertArgType>(_stat)
2737 this->timeCaller_out(0, _time);
2755 this->m_guardedPortMutex.
lock();
2761 this->m_guardedPortMutex.
unLock();
2771 ComponentIpcSerializableBuffer _msg;
2781 static_cast<FwAssertArgType>(_msgStatus)
2791 static_cast<FwAssertArgType>(_deserStatus)
2794 MsgTypeEnum _msgType =
static_cast<MsgTypeEnum
>(_desMsg);
2796 if (_msgType == FILEDOWNLINK_COMPONENT_EXIT) {
2801 _deserStatus = _msg.deserializeTo(portNum);
2804 static_cast<FwAssertArgType>(_deserStatus)
2812 _deserStatus = _msg.deserializeTo(context);
2815 static_cast<FwAssertArgType>(_deserStatus)
2827 case BUFFERRETURN_BUFFERSEND: {
2830 _deserStatus = _msg.deserializeTo(fwBuffer);
2833 static_cast<FwAssertArgType>(_deserStatus)
2848 _deserStatus = _msg.deserializeTo(key);
2851 static_cast<FwAssertArgType>(_deserStatus)
2863 case CMD_SENDFILE: {
2866 _deserStatus = _msg.deserializeTo(_opCode);
2869 static_cast<FwAssertArgType>(_deserStatus)
2874 _deserStatus = _msg.deserializeTo(_cmdSeq);
2877 static_cast<FwAssertArgType>(_deserStatus)
2882 _deserStatus = _msg.deserializeTo(args);
2885 static_cast<FwAssertArgType>(_deserStatus)
2923 #if FW_CMD_CHECK_RESIDUAL 2947 _deserStatus = _msg.deserializeTo(_opCode);
2950 static_cast<FwAssertArgType>(_deserStatus)
2955 _deserStatus = _msg.deserializeTo(_cmdSeq);
2958 static_cast<FwAssertArgType>(_deserStatus)
2963 _deserStatus = _msg.deserializeTo(args);
2966 static_cast<FwAssertArgType>(_deserStatus)
2974 #if FW_CMD_CHECK_RESIDUAL 2991 case CMD_SENDPARTIAL: {
2994 _deserStatus = _msg.deserializeTo(_opCode);
2997 static_cast<FwAssertArgType>(_deserStatus)
3002 _deserStatus = _msg.deserializeTo(_cmdSeq);
3005 static_cast<FwAssertArgType>(_deserStatus)
3010 _deserStatus = _msg.deserializeTo(args);
3013 static_cast<FwAssertArgType>(_deserStatus)
3081 #if FW_CMD_CHECK_RESIDUAL 3114 void FileDownlinkComponentBase ::
3125 compPtr->cmdIn_handlerBase(
3137 void FileDownlinkComponentBase ::
3146 compPtr->Run_handlerBase(
3164 return compPtr->SendFile_handlerBase(
3173 void FileDownlinkComponentBase ::
3174 m_p_bufferReturn_in(
3182 compPtr->bufferReturn_handlerBase(
3188 void FileDownlinkComponentBase ::
3197 compPtr->pingIn_handlerBase(
3203 #if !FW_DIRECT_PORT_CALLS 3209 void FileDownlinkComponentBase ::
3217 static_cast<FwAssertArgType>(portNum)
3221 this->m_cmdRegOut_OutputPort[portNum].isConnected(),
3222 static_cast<FwAssertArgType>(portNum)
3224 this->m_cmdRegOut_OutputPort[portNum].
invoke(
3229 void FileDownlinkComponentBase ::
3239 static_cast<FwAssertArgType>(portNum)
3243 this->m_cmdResponseOut_OutputPort[portNum].isConnected(),
3244 static_cast<FwAssertArgType>(portNum)
3246 this->m_cmdResponseOut_OutputPort[portNum].
invoke(
3253 void FileDownlinkComponentBase ::
3264 static_cast<FwAssertArgType>(portNum)
3268 this->m_eventOut_OutputPort[portNum].isConnected(),
3269 static_cast<FwAssertArgType>(portNum)
3271 this->m_eventOut_OutputPort[portNum].
invoke(
3279 #if FW_ENABLE_TEXT_LOGGING 3281 void FileDownlinkComponentBase ::
3291 (0 <= portNum) && (portNum < this->getNum_textEventOut_OutputPorts()),
3292 static_cast<FwAssertArgType>(portNum)
3296 this->m_textEventOut_OutputPort[portNum].isConnected(),
3297 static_cast<FwAssertArgType>(portNum)
3299 this->m_textEventOut_OutputPort[portNum].invoke(
3309 void FileDownlinkComponentBase ::
3317 static_cast<FwAssertArgType>(portNum)
3321 this->m_timeCaller_OutputPort[portNum].isConnected(),
3322 static_cast<FwAssertArgType>(portNum)
3324 this->m_timeCaller_OutputPort[portNum].
invoke(
3329 void FileDownlinkComponentBase ::
3339 static_cast<FwAssertArgType>(portNum)
3343 this->m_tlmOut_OutputPort[portNum].isConnected(),
3344 static_cast<FwAssertArgType>(portNum)
3346 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()
static constexpr FwSizeType CAPACITY
The File Downlink component started a file download.
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.
The File Downlink component canceled downlink of a file.
Supplied filename has overflowed. This intentionally discards the filename to avoid cascading overflo...
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
static constexpr FwIndexType getNum_FileComplete_OutputPorts()
Status
status returned from the queue send function
A partial downlink request started beyond the source file size and failed.
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].
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 invoke(U32 key) const
Invoke a port connection.
virtual void unLock()
Unlock the guarded mutex.
virtual const CHAR * toChar() const =0
Convert to a C-style char*.
Read a named file off the disk from a starting position. Divide it into packets and send the packets ...
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].
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.
FwIdType FwEventIdType
The type of an event identifier.
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
#define FW_OBJECT_NAMES
Indicates whether or not object names are stored (more memory, can be used for tracking objects) ...
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
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.
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.
void unLock()
unlock the mutex and assert success
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
The File Downlink component stopped due to a zero-size file.
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.
An error occurred reading a file.
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.
Cancel the downlink in progress, if any.
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
Source file path is outside the configured read sandbox.
void init()
Initialization function.
The File Downlink component generated an error when trying to send a data packet. ...
bool isConnected_bufferSendOut_OutputPort(FwIndexType portNum) const
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.
void lock()
lock the mutex and assert success
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.
A partial downlink request exceeded the source file size; length was clamped.
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].
Supplied filename has overflowed.
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.
The File Downlink component successfully sent a file.
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.
static constexpr FwIndexType getNum_pingIn_InputPorts()
void init()
Initialization function.
Read a named file off the disk. Divide it into packets and send the packets for transmission to the g...
void incNumMsgDropped()
increment the number of messages dropped
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
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
Channel ID for FilesSent.
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.
An error occurred opening a file.
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.
static constexpr FwSizeType CAPACITY
Channel ID for PacketsSent.
bool isConnected_tlmOut_OutputPort(FwIndexType portNum) const
bool isConnected_timeCaller_OutputPort(FwIndexType portNum) const
void addCallPort(InputCmdResponsePort *callPort)
Register an input port.
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()