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
54 return sizeof(m_buff);
61 const U8* getBuffAddr()
const {
67 U8 m_buff[SERIALIZATION_SIZE];
85 #if !FW_DIRECT_PORT_CALLS 92 this->m_cmdIn_InputPort[port].
init();
97 this->m_cmdIn_InputPort[port].
setPortNum(port);
99 #if FW_OBJECT_NAMES == 1 103 this->m_objName.toChar(),
106 this->m_cmdIn_InputPort[port].setObjName(portName.
toChar());
111 #if !FW_DIRECT_PORT_CALLS 118 this->m_Run_InputPort[port].
init();
125 #if FW_OBJECT_NAMES == 1 129 this->m_objName.toChar(),
132 this->m_Run_InputPort[port].setObjName(portName.
toChar());
137 #if !FW_DIRECT_PORT_CALLS 144 this->m_SendFile_InputPort[port].
init();
149 this->m_SendFile_InputPort[port].
setPortNum(port);
151 #if FW_OBJECT_NAMES == 1 155 this->m_objName.toChar(),
158 this->m_SendFile_InputPort[port].setObjName(portName.
toChar());
163 #if !FW_DIRECT_PORT_CALLS 170 this->m_bufferReturn_InputPort[port].
init();
175 this->m_bufferReturn_InputPort[port].
setPortNum(port);
177 #if FW_OBJECT_NAMES == 1 181 this->m_objName.toChar(),
184 this->m_bufferReturn_InputPort[port].setObjName(portName.
toChar());
189 #if !FW_DIRECT_PORT_CALLS 196 this->m_pingIn_InputPort[port].
init();
201 this->m_pingIn_InputPort[port].
setPortNum(port);
203 #if FW_OBJECT_NAMES == 1 207 this->m_objName.toChar(),
210 this->m_pingIn_InputPort[port].setObjName(portName.
toChar());
215 #if !FW_DIRECT_PORT_CALLS 222 this->m_cmdRegOut_OutputPort[port].
init();
224 #if FW_OBJECT_NAMES == 1 228 this->m_objName.toChar(),
231 this->m_cmdRegOut_OutputPort[port].setObjName(portName.
toChar());
236 #if !FW_DIRECT_PORT_CALLS 243 this->m_cmdResponseOut_OutputPort[port].
init();
245 #if FW_OBJECT_NAMES == 1 249 this->m_objName.toChar(),
252 this->m_cmdResponseOut_OutputPort[port].setObjName(portName.
toChar());
257 #if !FW_DIRECT_PORT_CALLS 264 this->m_eventOut_OutputPort[port].
init();
266 #if FW_OBJECT_NAMES == 1 270 this->m_objName.toChar(),
273 this->m_eventOut_OutputPort[port].setObjName(portName.
toChar());
278 #if !FW_DIRECT_PORT_CALLS && FW_ENABLE_TEXT_LOGGING 282 port < static_cast<FwIndexType>(this->getNum_textEventOut_OutputPorts());
285 this->m_textEventOut_OutputPort[port].
init();
287 #if FW_OBJECT_NAMES == 1 291 this->m_objName.toChar(),
294 this->m_textEventOut_OutputPort[port].setObjName(portName.
toChar());
299 #if !FW_DIRECT_PORT_CALLS 306 this->m_timeCaller_OutputPort[port].
init();
308 #if FW_OBJECT_NAMES == 1 312 this->m_objName.toChar(),
315 this->m_timeCaller_OutputPort[port].setObjName(portName.
toChar());
320 #if !FW_DIRECT_PORT_CALLS 327 this->m_tlmOut_OutputPort[port].
init();
329 #if FW_OBJECT_NAMES == 1 333 this->m_objName.toChar(),
336 this->m_tlmOut_OutputPort[port].setObjName(portName.
toChar());
341 #if !FW_DIRECT_PORT_CALLS 348 this->m_FileComplete_OutputPort[port].
init();
350 #if FW_OBJECT_NAMES == 1 354 this->m_objName.toChar(),
357 this->m_FileComplete_OutputPort[port].setObjName(portName.
toChar());
362 #if !FW_DIRECT_PORT_CALLS 369 this->m_bufferSendOut_OutputPort[port].
init();
371 #if FW_OBJECT_NAMES == 1 375 this->m_objName.toChar(),
378 this->m_bufferSendOut_OutputPort[port].setObjName(portName.
toChar());
383 #if !FW_DIRECT_PORT_CALLS 390 this->m_pingOut_OutputPort[port].
init();
392 #if FW_OBJECT_NAMES == 1 396 this->m_objName.toChar(),
399 this->m_pingOut_OutputPort[port].setObjName(portName.
toChar());
407 static_cast<FwSizeType>(ComponentIpcSerializableBuffer::SERIALIZATION_SIZE)
411 static_cast<FwAssertArgType>(qStat)
415 #if !FW_DIRECT_PORT_CALLS 426 static_cast<FwAssertArgType>(portNum)
429 return &this->m_cmdIn_InputPort[portNum];
434 #if !FW_DIRECT_PORT_CALLS 445 static_cast<FwAssertArgType>(portNum)
448 return &this->m_Run_InputPort[portNum];
456 static_cast<FwAssertArgType>(portNum)
459 return &this->m_SendFile_InputPort[portNum];
467 static_cast<FwAssertArgType>(portNum)
470 return &this->m_bufferReturn_InputPort[portNum];
478 static_cast<FwAssertArgType>(portNum)
481 return &this->m_pingIn_InputPort[portNum];
486 #if !FW_DIRECT_PORT_CALLS 500 static_cast<FwAssertArgType>(portNum)
503 this->m_cmdRegOut_OutputPort[portNum].
addCallPort(port);
514 static_cast<FwAssertArgType>(portNum)
517 this->m_cmdResponseOut_OutputPort[portNum].
addCallPort(port);
528 static_cast<FwAssertArgType>(portNum)
531 this->m_eventOut_OutputPort[portNum].
addCallPort(port);
534 #if FW_ENABLE_TEXT_LOGGING == 1 536 void FileDownlinkComponentBase ::
537 set_textEventOut_OutputPort(
543 (0 <= portNum) && (portNum < this->getNum_textEventOut_OutputPorts()),
544 static_cast<FwAssertArgType>(portNum)
547 this->m_textEventOut_OutputPort[portNum].addCallPort(port);
560 static_cast<FwAssertArgType>(portNum)
563 this->m_timeCaller_OutputPort[portNum].
addCallPort(port);
574 static_cast<FwAssertArgType>(portNum)
577 this->m_tlmOut_OutputPort[portNum].
addCallPort(port);
582 #if !FW_DIRECT_PORT_CALLS 596 static_cast<FwAssertArgType>(portNum)
599 this->m_FileComplete_OutputPort[portNum].
addCallPort(port);
610 static_cast<FwAssertArgType>(portNum)
613 this->m_bufferSendOut_OutputPort[portNum].
addCallPort(port);
624 static_cast<FwAssertArgType>(portNum)
627 this->m_pingOut_OutputPort[portNum].
addCallPort(port);
632 #if !FW_DIRECT_PORT_CALLS && FW_PORT_SERIALIZATION 641 Fw::InputSerializePort* port
646 static_cast<FwAssertArgType>(portNum)
649 this->m_cmdRegOut_OutputPort[portNum].registerSerialPort(port);
655 Fw::InputSerializePort* port
660 static_cast<FwAssertArgType>(portNum)
663 this->m_cmdResponseOut_OutputPort[portNum].registerSerialPort(port);
669 Fw::InputSerializePort* port
674 static_cast<FwAssertArgType>(portNum)
677 this->m_eventOut_OutputPort[portNum].registerSerialPort(port);
680 #if FW_ENABLE_TEXT_LOGGING == 1 682 void FileDownlinkComponentBase ::
683 set_textEventOut_OutputPort(
685 Fw::InputSerializePort* port
689 (0 <= portNum) && (portNum < this->getNum_textEventOut_OutputPorts()),
690 static_cast<FwAssertArgType>(portNum)
693 this->m_textEventOut_OutputPort[portNum].registerSerialPort(port);
701 Fw::InputSerializePort* port
706 static_cast<FwAssertArgType>(portNum)
709 this->m_timeCaller_OutputPort[portNum].registerSerialPort(port);
715 Fw::InputSerializePort* port
720 static_cast<FwAssertArgType>(portNum)
723 this->m_tlmOut_OutputPort[portNum].registerSerialPort(port);
728 #if !FW_DIRECT_PORT_CALLS && FW_PORT_SERIALIZATION 737 Fw::InputSerializePort* port
742 static_cast<FwAssertArgType>(portNum)
745 this->m_FileComplete_OutputPort[portNum].registerSerialPort(port);
751 Fw::InputSerializePort* port
756 static_cast<FwAssertArgType>(portNum)
759 this->m_bufferSendOut_OutputPort[portNum].registerSerialPort(port);
765 Fw::InputSerializePort* port
770 static_cast<FwAssertArgType>(portNum)
773 this->m_pingOut_OutputPort[portNum].registerSerialPort(port);
809 Fw::ActiveComponentBase(compName)
820 #if !FW_DIRECT_PORT_CALLS 831 static_cast<FwAssertArgType>(portNum)
834 return this->m_cmdRegOut_OutputPort[portNum].
isConnected();
842 static_cast<FwAssertArgType>(portNum)
845 return this->m_cmdResponseOut_OutputPort[portNum].
isConnected();
853 static_cast<FwAssertArgType>(portNum)
856 return this->m_eventOut_OutputPort[portNum].
isConnected();
859 #if FW_ENABLE_TEXT_LOGGING == 1 861 bool FileDownlinkComponentBase ::
862 isConnected_textEventOut_OutputPort(
FwIndexType portNum)
const 865 (0 <= portNum) && (portNum < this->getNum_textEventOut_OutputPorts()),
866 static_cast<FwAssertArgType>(portNum)
869 return this->m_textEventOut_OutputPort[portNum].isConnected();
879 static_cast<FwAssertArgType>(portNum)
882 return this->m_timeCaller_OutputPort[portNum].
isConnected();
890 static_cast<FwAssertArgType>(portNum)
893 return this->m_tlmOut_OutputPort[portNum].
isConnected();
898 #if !FW_DIRECT_PORT_CALLS 909 static_cast<FwAssertArgType>(portNum)
912 return this->m_FileComplete_OutputPort[portNum].
isConnected();
920 static_cast<FwAssertArgType>(portNum)
923 return this->m_bufferSendOut_OutputPort[portNum].
isConnected();
931 static_cast<FwAssertArgType>(portNum)
934 return this->m_pingOut_OutputPort[portNum].
isConnected();
955 FW_ASSERT(opCode >= idBase, static_cast<FwAssertArgType>(opCode), static_cast<FwAssertArgType>(idBase));
958 switch (opCode - idBase) {
1006 static_cast<FwAssertArgType>(portNum)
1014 ComponentIpcSerializableBuffer msg;
1018 _status = msg.serializeFrom(
1019 static_cast<FwEnumStoreType>(RUN_SCHED)
1023 static_cast<FwAssertArgType>(_status)
1027 _status = msg.serializeFrom(portNum);
1030 static_cast<FwAssertArgType>(_status)
1034 _status = msg.serializeFrom(context);
1037 static_cast<FwAssertArgType>(_status)
1046 static_cast<FwAssertArgType>(qStatus)
1062 static_cast<FwAssertArgType>(portNum)
1094 static_cast<FwAssertArgType>(portNum)
1102 ComponentIpcSerializableBuffer msg;
1106 _status = msg.serializeFrom(
1107 static_cast<FwEnumStoreType>(BUFFERRETURN_BUFFERSEND)
1111 static_cast<FwAssertArgType>(_status)
1115 _status = msg.serializeFrom(portNum);
1118 static_cast<FwAssertArgType>(_status)
1122 _status = msg.serializeFrom(fwBuffer);
1125 static_cast<FwAssertArgType>(_status)
1134 static_cast<FwAssertArgType>(qStatus)
1147 static_cast<FwAssertArgType>(portNum)
1155 ComponentIpcSerializableBuffer msg;
1159 _status = msg.serializeFrom(
1160 static_cast<FwEnumStoreType>(PINGIN_PING)
1164 static_cast<FwAssertArgType>(_status)
1168 _status = msg.serializeFrom(portNum);
1171 static_cast<FwAssertArgType>(_status)
1175 _status = msg.serializeFrom(key);
1178 static_cast<FwAssertArgType>(_status)
1187 static_cast<FwAssertArgType>(qStatus)
1226 #if !FW_DIRECT_PORT_CALLS 1240 static_cast<FwAssertArgType>(portNum)
1244 this->m_FileComplete_OutputPort[portNum].isConnected(),
1245 static_cast<FwAssertArgType>(portNum)
1247 this->m_FileComplete_OutputPort[portNum].
invoke(
1260 static_cast<FwAssertArgType>(portNum)
1264 this->m_bufferSendOut_OutputPort[portNum].isConnected(),
1265 static_cast<FwAssertArgType>(portNum)
1267 this->m_bufferSendOut_OutputPort[portNum].
invoke(
1280 static_cast<FwAssertArgType>(portNum)
1284 this->m_pingOut_OutputPort[portNum].isConnected(),
1285 static_cast<FwAssertArgType>(portNum)
1287 this->m_pingOut_OutputPort[portNum].
invoke(
1306 this->cmdResponseOut_out(0, opCode, cmdSeq, response);
1327 ComponentIpcSerializableBuffer msg;
1331 _status = msg.serializeFrom(static_cast<FwEnumStoreType>(CMD_SENDFILE));
1334 static_cast<FwAssertArgType>(_status)
1340 _status = msg.serializeFrom(port);
1343 static_cast<FwAssertArgType>(_status)
1346 _status = msg.serializeFrom(opCode);
1349 static_cast<FwAssertArgType>(_status)
1352 _status = msg.serializeFrom(cmdSeq);
1355 static_cast<FwAssertArgType>(_status)
1358 _status = msg.serializeFrom(args);
1361 static_cast<FwAssertArgType>(_status)
1370 static_cast<FwAssertArgType>(qStatus)
1386 ComponentIpcSerializableBuffer msg;
1390 _status = msg.serializeFrom(static_cast<FwEnumStoreType>(CMD_CANCEL));
1393 static_cast<FwAssertArgType>(_status)
1399 _status = msg.serializeFrom(port);
1402 static_cast<FwAssertArgType>(_status)
1405 _status = msg.serializeFrom(opCode);
1408 static_cast<FwAssertArgType>(_status)
1411 _status = msg.serializeFrom(cmdSeq);
1414 static_cast<FwAssertArgType>(_status)
1417 _status = msg.serializeFrom(args);
1420 static_cast<FwAssertArgType>(_status)
1429 static_cast<FwAssertArgType>(qStatus)
1445 ComponentIpcSerializableBuffer msg;
1449 _status = msg.serializeFrom(static_cast<FwEnumStoreType>(CMD_SENDPARTIAL));
1452 static_cast<FwAssertArgType>(_status)
1458 _status = msg.serializeFrom(port);
1461 static_cast<FwAssertArgType>(_status)
1464 _status = msg.serializeFrom(opCode);
1467 static_cast<FwAssertArgType>(_status)
1470 _status = msg.serializeFrom(cmdSeq);
1473 static_cast<FwAssertArgType>(_status)
1476 _status = msg.serializeFrom(args);
1479 static_cast<FwAssertArgType>(_status)
1488 static_cast<FwAssertArgType>(qStatus)
1543 this->timeCaller_out(0, _logTime);
1553 #if FW_AMPCS_COMPATIBLE 1558 static_cast<FwAssertArgType>(_status)
1568 static_cast<FwAssertArgType>(_status)
1581 #if FW_ENABLE_TEXT_LOGGING 1582 if (this->isConnected_textEventOut_OutputPort(0)) {
1583 #if FW_OBJECT_NAMES == 1 1584 const char* _formatString =
1585 "(%s) %s: Could not open file %s";
1587 const char* _formatString =
1588 "%s: Could not open file %s";
1595 this->m_objName.toChar(),
1601 this->textEventOut_out(
1621 this->timeCaller_out(0, _logTime);
1631 #if FW_AMPCS_COMPATIBLE 1636 static_cast<FwAssertArgType>(_status)
1646 static_cast<FwAssertArgType>(_status)
1649 #if FW_AMPCS_COMPATIBLE 1652 static_cast<U8>(
sizeof(I32))
1656 static_cast<FwAssertArgType>(_status)
1662 static_cast<FwAssertArgType>(_status)
1675 #if FW_ENABLE_TEXT_LOGGING 1676 if (this->isConnected_textEventOut_OutputPort(0)) {
1677 #if FW_OBJECT_NAMES == 1 1678 const char* _formatString =
1679 "(%s) %s: Could not read file %s with status %" PRIi32
"";
1681 const char* _formatString =
1682 "%s: Could not read file %s with status %" PRIi32
"";
1689 this->m_objName.toChar(),
1696 this->textEventOut_out(
1716 this->timeCaller_out(0, _logTime);
1726 #if FW_AMPCS_COMPATIBLE 1731 static_cast<FwAssertArgType>(_status)
1741 static_cast<FwAssertArgType>(_status)
1750 static_cast<FwAssertArgType>(_status)
1763 #if FW_ENABLE_TEXT_LOGGING 1764 if (this->isConnected_textEventOut_OutputPort(0)) {
1765 #if FW_OBJECT_NAMES == 1 1766 const char* _formatString =
1767 "(%s) %s: Sent file %s to file %s";
1769 const char* _formatString =
1770 "%s: Sent file %s to file %s";
1777 this->m_objName.toChar(),
1784 this->textEventOut_out(
1804 this->timeCaller_out(0, _logTime);
1814 #if FW_AMPCS_COMPATIBLE 1819 static_cast<FwAssertArgType>(_status)
1829 static_cast<FwAssertArgType>(_status)
1838 static_cast<FwAssertArgType>(_status)
1851 #if FW_ENABLE_TEXT_LOGGING 1852 if (this->isConnected_textEventOut_OutputPort(0)) {
1853 #if FW_OBJECT_NAMES == 1 1854 const char* _formatString =
1855 "(%s) %s: Canceled downlink of file %s to file %s";
1857 const char* _formatString =
1858 "%s: Canceled downlink of file %s to file %s";
1865 this->m_objName.toChar(),
1867 "DownlinkCanceled ",
1872 this->textEventOut_out(
1895 this->timeCaller_out(0, _logTime);
1905 #if FW_AMPCS_COMPATIBLE 1910 static_cast<FwAssertArgType>(_status)
1914 #if FW_AMPCS_COMPATIBLE 1917 static_cast<U8>(
sizeof(U32))
1921 static_cast<FwAssertArgType>(_status)
1927 static_cast<FwAssertArgType>(_status)
1930 #if FW_AMPCS_COMPATIBLE 1933 static_cast<U8>(
sizeof(U32))
1937 static_cast<FwAssertArgType>(_status)
1943 static_cast<FwAssertArgType>(_status)
1946 #if FW_AMPCS_COMPATIBLE 1949 static_cast<U8>(
sizeof(U32))
1953 static_cast<FwAssertArgType>(_status)
1959 static_cast<FwAssertArgType>(_status)
1968 static_cast<FwAssertArgType>(_status)
1977 static_cast<FwAssertArgType>(_status)
1990 #if FW_ENABLE_TEXT_LOGGING 1991 if (this->isConnected_textEventOut_OutputPort(0)) {
1992 #if FW_OBJECT_NAMES == 1 1993 const char* _formatString =
1994 "(%s) %s: Offset %" PRIu32
" plus length %" PRIu32
" is greater than source size %" PRIu32
" for partial downlink of file %s to file %s. ";
1996 const char* _formatString =
1997 "%s: Offset %" PRIu32
" plus length %" PRIu32
" is greater than source size %" PRIu32
" for partial downlink of file %s to file %s. ";
2004 this->m_objName.toChar(),
2006 "DownlinkPartialWarning ",
2014 this->textEventOut_out(
2036 this->timeCaller_out(0, _logTime);
2046 #if FW_AMPCS_COMPATIBLE 2051 static_cast<FwAssertArgType>(_status)
2061 static_cast<FwAssertArgType>(_status)
2070 static_cast<FwAssertArgType>(_status)
2073 #if FW_AMPCS_COMPATIBLE 2076 static_cast<U8>(
sizeof(U32))
2080 static_cast<FwAssertArgType>(_status)
2086 static_cast<FwAssertArgType>(_status)
2089 #if FW_AMPCS_COMPATIBLE 2092 static_cast<U8>(
sizeof(U32))
2096 static_cast<FwAssertArgType>(_status)
2102 static_cast<FwAssertArgType>(_status)
2115 #if FW_ENABLE_TEXT_LOGGING 2116 if (this->isConnected_textEventOut_OutputPort(0)) {
2117 #if FW_OBJECT_NAMES == 1 2118 const char* _formatString =
2119 "(%s) %s: Error occurred during partial downlink of file %s to file %s. Offset %" PRIu32
" greater than or equal to source filesize %" PRIu32
".";
2121 const char* _formatString =
2122 "%s: Error occurred during partial downlink of file %s to file %s. Offset %" PRIu32
" greater than or equal to source filesize %" PRIu32
".";
2129 this->m_objName.toChar(),
2131 "DownlinkPartialFail ",
2138 this->textEventOut_out(
2158 this->timeCaller_out(0, _logTime);
2168 #if FW_AMPCS_COMPATIBLE 2173 static_cast<FwAssertArgType>(_status)
2183 static_cast<FwAssertArgType>(_status)
2186 #if FW_AMPCS_COMPATIBLE 2189 static_cast<U8>(
sizeof(U32))
2193 static_cast<FwAssertArgType>(_status)
2199 static_cast<FwAssertArgType>(_status)
2212 #if FW_ENABLE_TEXT_LOGGING 2213 if (this->isConnected_textEventOut_OutputPort(0)) {
2214 #if FW_OBJECT_NAMES == 1 2215 const char* _formatString =
2216 "(%s) %s: Failed to send data packet from file %s at byte offset %" PRIu32
".";
2218 const char* _formatString =
2219 "%s: Failed to send data packet from file %s at byte offset %" PRIu32
".";
2226 this->m_objName.toChar(),
2233 this->textEventOut_out(
2254 this->timeCaller_out(0, _logTime);
2264 #if FW_AMPCS_COMPATIBLE 2269 static_cast<FwAssertArgType>(_status)
2273 #if FW_AMPCS_COMPATIBLE 2276 static_cast<U8>(
sizeof(U32))
2280 static_cast<FwAssertArgType>(_status)
2286 static_cast<FwAssertArgType>(_status)
2295 static_cast<FwAssertArgType>(_status)
2304 static_cast<FwAssertArgType>(_status)
2317 #if FW_ENABLE_TEXT_LOGGING 2318 if (this->isConnected_textEventOut_OutputPort(0)) {
2319 #if FW_OBJECT_NAMES == 1 2320 const char* _formatString =
2321 "(%s) %s: Downlink of %" PRIu32
" bytes started from %s to %s";
2323 const char* _formatString =
2324 "%s: Downlink of %" PRIu32
" bytes started from %s to %s";
2331 this->m_objName.toChar(),
2339 this->textEventOut_out(
2356 this->timeCaller_out(0, _logTime);
2366 #if FW_AMPCS_COMPATIBLE 2371 static_cast<FwAssertArgType>(_status)
2381 static_cast<FwAssertArgType>(_status)
2394 #if FW_ENABLE_TEXT_LOGGING 2395 if (this->isConnected_textEventOut_OutputPort(0)) {
2396 #if FW_OBJECT_NAMES == 1 2397 const char* _formatString =
2398 "(%s) %s: Downlink of file %s stopped due to zero-size.";
2400 const char* _formatString =
2401 "%s: Downlink of file %s stopped due to zero-size.";
2408 this->m_objName.toChar(),
2410 "DownlinkZeroSizeFile ",
2414 this->textEventOut_out(
2431 this->timeCaller_out(0, _logTime);
2440 #if FW_AMPCS_COMPATIBLE 2446 static_cast<FwAssertArgType>(_status)
2460 #if FW_ENABLE_TEXT_LOGGING 2461 if (this->isConnected_textEventOut_OutputPort(0)) {
2462 #if FW_OBJECT_NAMES == 1 2463 const char* _formatString =
2464 "(%s) %s: Commanded source filename too long";
2466 const char* _formatString =
2467 "%s: Commanded source filename too long";
2474 this->m_objName.toChar(),
2476 "FilenameSourceOverflow " 2479 this->textEventOut_out(
2496 this->timeCaller_out(0, _logTime);
2505 #if FW_AMPCS_COMPATIBLE 2511 static_cast<FwAssertArgType>(_status)
2525 #if FW_ENABLE_TEXT_LOGGING 2526 if (this->isConnected_textEventOut_OutputPort(0)) {
2527 #if FW_OBJECT_NAMES == 1 2528 const char* _formatString =
2529 "(%s) %s: Commanded destination filename too long";
2531 const char* _formatString =
2532 "%s: Commanded destination filename too long";
2539 this->m_objName.toChar(),
2541 "FilenameDestinationOverflow " 2544 this->textEventOut_out(
2570 this->timeCaller_out(0, _tlmTime);
2577 static_cast<FwAssertArgType>(_stat)
2604 this->timeCaller_out(0, _tlmTime);
2611 static_cast<FwAssertArgType>(_stat)
2638 this->timeCaller_out(0, _tlmTime);
2645 static_cast<FwAssertArgType>(_stat)
2670 this->timeCaller_out(0, _time);
2688 this->m_guardedPortMutex.
lock();
2694 this->m_guardedPortMutex.
unLock();
2704 ComponentIpcSerializableBuffer _msg;
2714 static_cast<FwAssertArgType>(_msgStatus)
2724 static_cast<FwAssertArgType>(_deserStatus)
2727 MsgTypeEnum _msgType =
static_cast<MsgTypeEnum
>(_desMsg);
2729 if (_msgType == FILEDOWNLINK_COMPONENT_EXIT) {
2734 _deserStatus = _msg.deserializeTo(portNum);
2737 static_cast<FwAssertArgType>(_deserStatus)
2745 _deserStatus = _msg.deserializeTo(context);
2748 static_cast<FwAssertArgType>(_deserStatus)
2760 case BUFFERRETURN_BUFFERSEND: {
2763 _deserStatus = _msg.deserializeTo(fwBuffer);
2766 static_cast<FwAssertArgType>(_deserStatus)
2781 _deserStatus = _msg.deserializeTo(key);
2784 static_cast<FwAssertArgType>(_deserStatus)
2796 case CMD_SENDFILE: {
2799 _deserStatus = _msg.deserializeTo(_opCode);
2802 static_cast<FwAssertArgType>(_deserStatus)
2807 _deserStatus = _msg.deserializeTo(_cmdSeq);
2810 static_cast<FwAssertArgType>(_deserStatus)
2815 _deserStatus = _msg.deserializeTo(args);
2818 static_cast<FwAssertArgType>(_deserStatus)
2856 #if FW_CMD_CHECK_RESIDUAL 2880 _deserStatus = _msg.deserializeTo(_opCode);
2883 static_cast<FwAssertArgType>(_deserStatus)
2888 _deserStatus = _msg.deserializeTo(_cmdSeq);
2891 static_cast<FwAssertArgType>(_deserStatus)
2896 _deserStatus = _msg.deserializeTo(args);
2899 static_cast<FwAssertArgType>(_deserStatus)
2907 #if FW_CMD_CHECK_RESIDUAL 2924 case CMD_SENDPARTIAL: {
2927 _deserStatus = _msg.deserializeTo(_opCode);
2930 static_cast<FwAssertArgType>(_deserStatus)
2935 _deserStatus = _msg.deserializeTo(_cmdSeq);
2938 static_cast<FwAssertArgType>(_deserStatus)
2943 _deserStatus = _msg.deserializeTo(args);
2946 static_cast<FwAssertArgType>(_deserStatus)
3014 #if FW_CMD_CHECK_RESIDUAL 3047 void FileDownlinkComponentBase ::
3058 compPtr->cmdIn_handlerBase(
3070 void FileDownlinkComponentBase ::
3079 compPtr->Run_handlerBase(
3097 return compPtr->SendFile_handlerBase(
3106 void FileDownlinkComponentBase ::
3107 m_p_bufferReturn_in(
3115 compPtr->bufferReturn_handlerBase(
3121 void FileDownlinkComponentBase ::
3130 compPtr->pingIn_handlerBase(
3136 #if !FW_DIRECT_PORT_CALLS 3142 void FileDownlinkComponentBase ::
3150 static_cast<FwAssertArgType>(portNum)
3154 this->m_cmdRegOut_OutputPort[portNum].isConnected(),
3155 static_cast<FwAssertArgType>(portNum)
3157 this->m_cmdRegOut_OutputPort[portNum].
invoke(
3162 void FileDownlinkComponentBase ::
3172 static_cast<FwAssertArgType>(portNum)
3176 this->m_cmdResponseOut_OutputPort[portNum].isConnected(),
3177 static_cast<FwAssertArgType>(portNum)
3179 this->m_cmdResponseOut_OutputPort[portNum].
invoke(
3186 void FileDownlinkComponentBase ::
3197 static_cast<FwAssertArgType>(portNum)
3201 this->m_eventOut_OutputPort[portNum].isConnected(),
3202 static_cast<FwAssertArgType>(portNum)
3204 this->m_eventOut_OutputPort[portNum].
invoke(
3212 #if FW_ENABLE_TEXT_LOGGING 3214 void FileDownlinkComponentBase ::
3224 (0 <= portNum) && (portNum < this->getNum_textEventOut_OutputPorts()),
3225 static_cast<FwAssertArgType>(portNum)
3229 this->m_textEventOut_OutputPort[portNum].isConnected(),
3230 static_cast<FwAssertArgType>(portNum)
3232 this->m_textEventOut_OutputPort[portNum].invoke(
3242 void FileDownlinkComponentBase ::
3250 static_cast<FwAssertArgType>(portNum)
3254 this->m_timeCaller_OutputPort[portNum].isConnected(),
3255 static_cast<FwAssertArgType>(portNum)
3257 this->m_timeCaller_OutputPort[portNum].
invoke(
3262 void FileDownlinkComponentBase ::
3272 static_cast<FwAssertArgType>(portNum)
3276 this->m_tlmOut_OutputPort[portNum].isConnected(),
3277 static_cast<FwAssertArgType>(portNum)
3279 this->m_tlmOut_OutputPort[portNum].
invoke(
Supplied filename has overflowed.
Channel ID for FilesSent.
Serialization/Deserialization operation was successful.
An error occurred opening a file.
void addCallPort(InputTimePort *callPort)
Register an input port.
static constexpr FwIndexType getNum_eventOut_OutputPorts()
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.
SerializeStatus serializeFrom(U8 val, Endianness mode=Endianness::BIG) override
Serialize an 8-bit unsigned integer value.
FwIdType getIdBase() const
PlatformSizeType FwSizeType
Channel ID for PacketsSent.
Status receive(U8 *destination, FwSizeType capacity, BlockingType blockType, FwSizeType &actualSize, FwQueuePriorityType &priority) override
receive a message from the queue through delegate
Supplied filename has overflowed. This intentionally discards the filename to avoid cascading overflo...
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].
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.
Read a named file off the disk. Divide it into packets and send the packets for transmission to the g...
virtual const CHAR * toChar() const =0
Convert to a C-style char*.
The File Downlink component has detected a timeout. Downlink has been canceled.
The File Downlink component stopped due to a zero-size file.
void init()
Initialization function.
Enum representing a command response.
No time base has been established (Required)
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 from a starting position. Divide it into packets and send the packets ...
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.
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.
The File Downlink component successfully sent a file.
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)
const char * toChar() const
Convert to a C-style char*.
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 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.
Cancel the downlink in progress, if any.
A serious but recoverable event.
Errors dispatching messages.
virtual ~FileDownlinkComponentBase()
Destroy FileDownlinkComponentBase object.
The File Downlink component started a file download.
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.
Enum representing event severity.
void FileComplete_out(FwIndexType portNum, const Svc::SendFileResponse &resp) const
Invoke output port FileComplete.
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
The File Downlink component generated an error when trying to send a data packet. ...
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
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.
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.
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
SerializeStatus deserializeTo(U8 &val, Endianness mode=Endianness::BIG) override
Deserialize an 8-bit unsigned integer value.
static constexpr FwIndexType getNum_cmdIn_InputPorts()
The File Downlink component canceled downlink of a file.
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
The File Downlink component has detected a timeout. Downlink has been canceled.
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.
static constexpr FwSizeType CAPACITY
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
message to exit active component task
SerializeStatus serializeTo(SerialBufferBase &buffer, Endianness mode=Endianness::BIG) const override
Serialize the contents of this object to a buffer.
An error occurred reading a file.
static constexpr FwIndexType getNum_cmdResponseOut_OutputPorts()