10 #if FW_ENABLE_TEXT_LOGGING
38 class ComponentIpcSerializableBuffer :
53 return sizeof(m_buff);
60 const U8* getBuffAddr()
const {
66 U8 m_buff[SERIALIZATION_SIZE];
90 this->m_cmdIn_InputPort[port].
init();
95 this->m_cmdIn_InputPort[port].
setPortNum(port);
97 #if FW_OBJECT_NAMES == 1
101 this->m_objName.toChar(),
104 this->m_cmdIn_InputPort[port].setObjName(portName.
toChar());
114 this->m_pingIn_InputPort[port].
init();
119 this->m_pingIn_InputPort[port].
setPortNum(port);
121 #if FW_OBJECT_NAMES == 1
125 this->m_objName.toChar(),
128 this->m_pingIn_InputPort[port].setObjName(portName.
toChar());
132 #if FW_ENABLE_TEXT_LOGGING == 1
136 port < static_cast<FwIndexType>(this->getNum_LogText_OutputPorts());
139 this->m_LogText_OutputPort[port].
init();
141 #if FW_OBJECT_NAMES == 1
145 this->m_objName.toChar(),
148 this->m_LogText_OutputPort[port].setObjName(portName.
toChar());
159 this->m_cmdRegOut_OutputPort[port].
init();
161 #if FW_OBJECT_NAMES == 1
165 this->m_objName.toChar(),
168 this->m_cmdRegOut_OutputPort[port].setObjName(portName.
toChar());
178 this->m_cmdResponseOut_OutputPort[port].
init();
180 #if FW_OBJECT_NAMES == 1
184 this->m_objName.toChar(),
187 this->m_cmdResponseOut_OutputPort[port].setObjName(portName.
toChar());
197 this->m_eventOut_OutputPort[port].
init();
199 #if FW_OBJECT_NAMES == 1
203 this->m_objName.toChar(),
206 this->m_eventOut_OutputPort[port].setObjName(portName.
toChar());
216 this->m_timeCaller_OutputPort[port].
init();
218 #if FW_OBJECT_NAMES == 1
222 this->m_objName.toChar(),
225 this->m_timeCaller_OutputPort[port].setObjName(portName.
toChar());
235 this->m_tlmOut_OutputPort[port].
init();
237 #if FW_OBJECT_NAMES == 1
241 this->m_objName.toChar(),
244 this->m_tlmOut_OutputPort[port].setObjName(portName.
toChar());
254 this->m_pingOut_OutputPort[port].
init();
256 #if FW_OBJECT_NAMES == 1
260 this->m_objName.toChar(),
263 this->m_pingOut_OutputPort[port].setObjName(portName.
toChar());
269 static_cast<FwSizeType>(ComponentIpcSerializableBuffer::SERIALIZATION_SIZE)
289 return &this->m_cmdIn_InputPort[portNum];
304 return &this->m_pingIn_InputPort[portNum];
311 #if FW_ENABLE_TEXT_LOGGING == 1
313 void FileManagerComponentBase ::
314 set_LogText_OutputPort(
320 portNum < this->getNum_LogText_OutputPorts(),
324 this->m_LogText_OutputPort[portNum].addCallPort(port);
340 this->m_cmdRegOut_OutputPort[portNum].
addCallPort(port);
354 this->m_cmdResponseOut_OutputPort[portNum].
addCallPort(port);
368 this->m_eventOut_OutputPort[portNum].
addCallPort(port);
382 this->m_timeCaller_OutputPort[portNum].
addCallPort(port);
396 this->m_tlmOut_OutputPort[portNum].
addCallPort(port);
414 this->m_pingOut_OutputPort[portNum].
addCallPort(port);
417 #if FW_PORT_SERIALIZATION
423 #if FW_ENABLE_TEXT_LOGGING == 1
425 void FileManagerComponentBase ::
426 set_LogText_OutputPort(
428 Fw::InputSerializePort* port
432 portNum < this->getNum_LogText_OutputPorts(),
436 this->m_LogText_OutputPort[portNum].registerSerialPort(port);
444 Fw::InputSerializePort* port
452 this->m_cmdRegOut_OutputPort[portNum].registerSerialPort(port);
458 Fw::InputSerializePort* port
466 this->m_cmdResponseOut_OutputPort[portNum].registerSerialPort(port);
472 Fw::InputSerializePort* port
480 this->m_eventOut_OutputPort[portNum].registerSerialPort(port);
486 Fw::InputSerializePort* port
494 this->m_timeCaller_OutputPort[portNum].registerSerialPort(port);
500 Fw::InputSerializePort* port
508 this->m_tlmOut_OutputPort[portNum].registerSerialPort(port);
513 #if FW_PORT_SERIALIZATION
522 Fw::InputSerializePort* port
530 this->m_pingOut_OutputPort[portNum].registerSerialPort(port);
542 FW_ASSERT(this->m_cmdRegOut_OutputPort[0].isConnected());
544 this->m_cmdRegOut_OutputPort[0].
invoke(
548 this->m_cmdRegOut_OutputPort[0].
invoke(
552 this->m_cmdRegOut_OutputPort[0].
invoke(
556 this->m_cmdRegOut_OutputPort[0].
invoke(
560 this->m_cmdRegOut_OutputPort[0].
invoke(
564 this->m_cmdRegOut_OutputPort[0].
invoke(
568 this->m_cmdRegOut_OutputPort[0].
invoke(
579 Fw::ActiveComponentBase(compName)
614 #if FW_ENABLE_TEXT_LOGGING == 1
617 getNum_LogText_OutputPorts()
const
668 #if FW_ENABLE_TEXT_LOGGING == 1
670 bool FileManagerComponentBase ::
671 isConnected_LogText_OutputPort(
FwIndexType portNum)
674 portNum < this->getNum_LogText_OutputPorts(),
678 return this->m_LogText_OutputPort[portNum].isConnected();
691 return this->m_cmdRegOut_OutputPort[portNum].
isConnected();
702 return this->m_cmdResponseOut_OutputPort[portNum].
isConnected();
713 return this->m_eventOut_OutputPort[portNum].
isConnected();
724 return this->m_timeCaller_OutputPort[portNum].
isConnected();
735 return this->m_tlmOut_OutputPort[portNum].
isConnected();
750 return this->m_pingOut_OutputPort[portNum].
isConnected();
776 ComponentIpcSerializableBuffer msg;
780 _status = msg.serialize(
789 _status = msg.serialize(portNum);
796 _status = msg.serialize(key);
843 this->m_pingOut_OutputPort[portNum].
invoke(
859 FW_ASSERT(this->m_cmdResponseOut_OutputPort[0].isConnected());
860 this->m_cmdResponseOut_OutputPort[0].
invoke(opCode, cmdSeq, response);
881 ComponentIpcSerializableBuffer msg;
885 _status = msg.serialize(
static_cast<FwEnumStoreType>(CMD_CREATEDIRECTORY));
894 _status = msg.serialize(port);
900 _status = msg.serialize(opCode);
906 _status = msg.serialize(cmdSeq);
912 _status = msg.serialize(args);
940 ComponentIpcSerializableBuffer msg;
953 _status = msg.serialize(port);
959 _status = msg.serialize(opCode);
965 _status = msg.serialize(cmdSeq);
971 _status = msg.serialize(args);
999 ComponentIpcSerializableBuffer msg;
1003 _status = msg.serialize(
static_cast<FwEnumStoreType>(CMD_REMOVEDIRECTORY));
1012 _status = msg.serialize(port);
1018 _status = msg.serialize(opCode);
1024 _status = msg.serialize(cmdSeq);
1030 _status = msg.serialize(args);
1058 ComponentIpcSerializableBuffer msg;
1062 _status = msg.serialize(
static_cast<FwEnumStoreType>(CMD_REMOVEFILE));
1071 _status = msg.serialize(port);
1077 _status = msg.serialize(opCode);
1083 _status = msg.serialize(cmdSeq);
1089 _status = msg.serialize(args);
1117 ComponentIpcSerializableBuffer msg;
1121 _status = msg.serialize(
static_cast<FwEnumStoreType>(CMD_SHELLCOMMAND));
1130 _status = msg.serialize(port);
1136 _status = msg.serialize(opCode);
1142 _status = msg.serialize(cmdSeq);
1148 _status = msg.serialize(args);
1176 ComponentIpcSerializableBuffer msg;
1180 _status = msg.serialize(
static_cast<FwEnumStoreType>(CMD_APPENDFILE));
1189 _status = msg.serialize(port);
1195 _status = msg.serialize(opCode);
1201 _status = msg.serialize(cmdSeq);
1207 _status = msg.serialize(args);
1235 ComponentIpcSerializableBuffer msg;
1248 _status = msg.serialize(port);
1254 _status = msg.serialize(opCode);
1260 _status = msg.serialize(cmdSeq);
1266 _status = msg.serialize(args);
1379 if (this->m_timeCaller_OutputPort[0].isConnected()) {
1380 this->m_timeCaller_OutputPort[0].
invoke(_logTime);
1388 if (this->m_eventOut_OutputPort[0].isConnected()) {
1392 #if FW_AMPCS_COMPATIBLE
1407 #if FW_AMPCS_COMPATIBLE
1410 static_cast<U8>(
sizeof(U32))
1423 this->m_eventOut_OutputPort[0].
invoke(
1432 #if FW_ENABLE_TEXT_LOGGING
1433 if (this->m_LogText_OutputPort[0].isConnected()) {
1434 #if FW_OBJECT_NAMES == 1
1435 const char* _formatString =
1436 "(%s) %s: Could not create directory %s, returned status %" PRIu32
"";
1438 const char* _formatString =
1439 "%s: Could not create directory %s, returned status %" PRIu32
"";
1446 this->m_objName.toChar(),
1448 "DirectoryCreateError ",
1453 this->m_LogText_OutputPort[0].invoke(
1471 if (this->m_timeCaller_OutputPort[0].isConnected()) {
1472 this->m_timeCaller_OutputPort[0].
invoke(_logTime);
1480 if (this->m_eventOut_OutputPort[0].isConnected()) {
1484 #if FW_AMPCS_COMPATIBLE
1499 #if FW_AMPCS_COMPATIBLE
1502 static_cast<U8>(
sizeof(U32))
1515 this->m_eventOut_OutputPort[0].
invoke(
1524 #if FW_ENABLE_TEXT_LOGGING
1525 if (this->m_LogText_OutputPort[0].isConnected()) {
1526 #if FW_OBJECT_NAMES == 1
1527 const char* _formatString =
1528 "(%s) %s: Could not remove directory %s, returned status %" PRIu32
"";
1530 const char* _formatString =
1531 "%s: Could not remove directory %s, returned status %" PRIu32
"";
1538 this->m_objName.toChar(),
1540 "DirectoryRemoveError ",
1545 this->m_LogText_OutputPort[0].invoke(
1564 if (this->m_timeCaller_OutputPort[0].isConnected()) {
1565 this->m_timeCaller_OutputPort[0].
invoke(_logTime);
1573 if (this->m_eventOut_OutputPort[0].isConnected()) {
1577 #if FW_AMPCS_COMPATIBLE
1598 #if FW_AMPCS_COMPATIBLE
1601 static_cast<U8>(
sizeof(U32))
1614 this->m_eventOut_OutputPort[0].
invoke(
1623 #if FW_ENABLE_TEXT_LOGGING
1624 if (this->m_LogText_OutputPort[0].isConnected()) {
1625 #if FW_OBJECT_NAMES == 1
1626 const char* _formatString =
1627 "(%s) %s: Could not move file %s to file %s, returned status %" PRIu32
"";
1629 const char* _formatString =
1630 "%s: Could not move file %s to file %s, returned status %" PRIu32
"";
1637 this->m_objName.toChar(),
1645 this->m_LogText_OutputPort[0].invoke(
1663 if (this->m_timeCaller_OutputPort[0].isConnected()) {
1664 this->m_timeCaller_OutputPort[0].
invoke(_logTime);
1672 if (this->m_eventOut_OutputPort[0].isConnected()) {
1676 #if FW_AMPCS_COMPATIBLE
1691 #if FW_AMPCS_COMPATIBLE
1694 static_cast<U8>(
sizeof(U32))
1707 this->m_eventOut_OutputPort[0].
invoke(
1716 #if FW_ENABLE_TEXT_LOGGING
1717 if (this->m_LogText_OutputPort[0].isConnected()) {
1718 #if FW_OBJECT_NAMES == 1
1719 const char* _formatString =
1720 "(%s) %s: Could not remove file %s, returned status %" PRIu32
"";
1722 const char* _formatString =
1723 "%s: Could not remove file %s, returned status %" PRIu32
"";
1730 this->m_objName.toChar(),
1737 this->m_LogText_OutputPort[0].invoke(
1755 if (this->m_timeCaller_OutputPort[0].isConnected()) {
1756 this->m_timeCaller_OutputPort[0].
invoke(_logTime);
1764 if (this->m_eventOut_OutputPort[0].isConnected()) {
1768 #if FW_AMPCS_COMPATIBLE
1783 #if FW_AMPCS_COMPATIBLE
1786 static_cast<U8>(
sizeof(U32))
1799 this->m_eventOut_OutputPort[0].
invoke(
1808 #if FW_ENABLE_TEXT_LOGGING
1809 if (this->m_LogText_OutputPort[0].isConnected()) {
1810 #if FW_OBJECT_NAMES == 1
1811 const char* _formatString =
1812 "(%s) %s: Shell command %s failed with status %" PRIu32
"";
1814 const char* _formatString =
1815 "%s: Shell command %s failed with status %" PRIu32
"";
1822 this->m_objName.toChar(),
1824 "ShellCommandFailed ",
1829 this->m_LogText_OutputPort[0].invoke(
1848 if (this->m_timeCaller_OutputPort[0].isConnected()) {
1849 this->m_timeCaller_OutputPort[0].
invoke(_logTime);
1857 if (this->m_eventOut_OutputPort[0].isConnected()) {
1861 #if FW_AMPCS_COMPATIBLE
1882 #if FW_AMPCS_COMPATIBLE
1885 static_cast<U8>(
sizeof(U32))
1898 this->m_eventOut_OutputPort[0].
invoke(
1907 #if FW_ENABLE_TEXT_LOGGING
1908 if (this->m_LogText_OutputPort[0].isConnected()) {
1909 #if FW_OBJECT_NAMES == 1
1910 const char* _formatString =
1911 "(%s) %s: Appending %s onto %s failed with status %" PRIu32
"";
1913 const char* _formatString =
1914 "%s: Appending %s onto %s failed with status %" PRIu32
"";
1921 this->m_objName.toChar(),
1923 "AppendFileFailed ",
1929 this->m_LogText_OutputPort[0].invoke(
1947 if (this->m_timeCaller_OutputPort[0].isConnected()) {
1948 this->m_timeCaller_OutputPort[0].
invoke(_logTime);
1956 if (this->m_eventOut_OutputPort[0].isConnected()) {
1960 #if FW_AMPCS_COMPATIBLE
1981 this->m_eventOut_OutputPort[0].
invoke(
1990 #if FW_ENABLE_TEXT_LOGGING
1991 if (this->m_LogText_OutputPort[0].isConnected()) {
1992 #if FW_OBJECT_NAMES == 1
1993 const char* _formatString =
1994 "(%s) %s: Appended %s to the end of %s";
1996 const char* _formatString =
1997 "%s: Appended %s to the end of %s";
2004 this->m_objName.toChar(),
2006 "AppendFileSucceeded ",
2011 this->m_LogText_OutputPort[0].invoke(
2026 if (this->m_timeCaller_OutputPort[0].isConnected()) {
2027 this->m_timeCaller_OutputPort[0].
invoke(_logTime);
2035 if (this->m_eventOut_OutputPort[0].isConnected()) {
2039 #if FW_AMPCS_COMPATIBLE
2054 this->m_eventOut_OutputPort[0].
invoke(
2063 #if FW_ENABLE_TEXT_LOGGING
2064 if (this->m_LogText_OutputPort[0].isConnected()) {
2065 #if FW_OBJECT_NAMES == 1
2066 const char* _formatString =
2067 "(%s) %s: Shell command %s succeeded";
2069 const char* _formatString =
2070 "%s: Shell command %s succeeded";
2077 this->m_objName.toChar(),
2079 "ShellCommandSucceeded ",
2083 this->m_LogText_OutputPort[0].invoke(
2098 if (this->m_timeCaller_OutputPort[0].isConnected()) {
2099 this->m_timeCaller_OutputPort[0].
invoke(_logTime);
2107 if (this->m_eventOut_OutputPort[0].isConnected()) {
2111 #if FW_AMPCS_COMPATIBLE
2126 this->m_eventOut_OutputPort[0].
invoke(
2135 #if FW_ENABLE_TEXT_LOGGING
2136 if (this->m_LogText_OutputPort[0].isConnected()) {
2137 #if FW_OBJECT_NAMES == 1
2138 const char* _formatString =
2139 "(%s) %s: Created directory %s successfully";
2141 const char* _formatString =
2142 "%s: Created directory %s successfully";
2149 this->m_objName.toChar(),
2151 "CreateDirectorySucceeded ",
2155 this->m_LogText_OutputPort[0].invoke(
2170 if (this->m_timeCaller_OutputPort[0].isConnected()) {
2171 this->m_timeCaller_OutputPort[0].
invoke(_logTime);
2179 if (this->m_eventOut_OutputPort[0].isConnected()) {
2183 #if FW_AMPCS_COMPATIBLE
2198 this->m_eventOut_OutputPort[0].
invoke(
2207 #if FW_ENABLE_TEXT_LOGGING
2208 if (this->m_LogText_OutputPort[0].isConnected()) {
2209 #if FW_OBJECT_NAMES == 1
2210 const char* _formatString =
2211 "(%s) %s: Removed directory %s successfully";
2213 const char* _formatString =
2214 "%s: Removed directory %s successfully";
2221 this->m_objName.toChar(),
2223 "RemoveDirectorySucceeded ",
2227 this->m_LogText_OutputPort[0].invoke(
2245 if (this->m_timeCaller_OutputPort[0].isConnected()) {
2246 this->m_timeCaller_OutputPort[0].
invoke(_logTime);
2254 if (this->m_eventOut_OutputPort[0].isConnected()) {
2258 #if FW_AMPCS_COMPATIBLE
2279 this->m_eventOut_OutputPort[0].
invoke(
2288 #if FW_ENABLE_TEXT_LOGGING
2289 if (this->m_LogText_OutputPort[0].isConnected()) {
2290 #if FW_OBJECT_NAMES == 1
2291 const char* _formatString =
2292 "(%s) %s: Moved file %s to file %s successfully";
2294 const char* _formatString =
2295 "%s: Moved file %s to file %s successfully";
2302 this->m_objName.toChar(),
2304 "MoveFileSucceeded ",
2309 this->m_LogText_OutputPort[0].invoke(
2324 if (this->m_timeCaller_OutputPort[0].isConnected()) {
2325 this->m_timeCaller_OutputPort[0].
invoke(_logTime);
2333 if (this->m_eventOut_OutputPort[0].isConnected()) {
2337 #if FW_AMPCS_COMPATIBLE
2352 this->m_eventOut_OutputPort[0].
invoke(
2361 #if FW_ENABLE_TEXT_LOGGING
2362 if (this->m_LogText_OutputPort[0].isConnected()) {
2363 #if FW_OBJECT_NAMES == 1
2364 const char* _formatString =
2365 "(%s) %s: Removed file %s successfully";
2367 const char* _formatString =
2368 "%s: Removed file %s successfully";
2375 this->m_objName.toChar(),
2377 "RemoveFileSucceeded ",
2381 this->m_LogText_OutputPort[0].invoke(
2399 if (this->m_timeCaller_OutputPort[0].isConnected()) {
2400 this->m_timeCaller_OutputPort[0].
invoke(_logTime);
2408 if (this->m_eventOut_OutputPort[0].isConnected()) {
2412 #if FW_AMPCS_COMPATIBLE
2433 this->m_eventOut_OutputPort[0].
invoke(
2442 #if FW_ENABLE_TEXT_LOGGING
2443 if (this->m_LogText_OutputPort[0].isConnected()) {
2444 #if FW_OBJECT_NAMES == 1
2445 const char* _formatString =
2446 "(%s) %s: Appending file %s to the end of %s...";
2448 const char* _formatString =
2449 "%s: Appending file %s to the end of %s...";
2456 this->m_objName.toChar(),
2458 "AppendFileStarted ",
2463 this->m_LogText_OutputPort[0].invoke(
2478 if (this->m_timeCaller_OutputPort[0].isConnected()) {
2479 this->m_timeCaller_OutputPort[0].
invoke(_logTime);
2487 if (this->m_eventOut_OutputPort[0].isConnected()) {
2491 #if FW_AMPCS_COMPATIBLE
2506 this->m_eventOut_OutputPort[0].
invoke(
2515 #if FW_ENABLE_TEXT_LOGGING
2516 if (this->m_LogText_OutputPort[0].isConnected()) {
2517 #if FW_OBJECT_NAMES == 1
2518 const char* _formatString =
2519 "(%s) %s: Running shell command %s...";
2521 const char* _formatString =
2522 "%s: Running shell command %s...";
2529 this->m_objName.toChar(),
2531 "ShellCommandStarted ",
2535 this->m_LogText_OutputPort[0].invoke(
2550 if (this->m_timeCaller_OutputPort[0].isConnected()) {
2551 this->m_timeCaller_OutputPort[0].
invoke(_logTime);
2559 if (this->m_eventOut_OutputPort[0].isConnected()) {
2563 #if FW_AMPCS_COMPATIBLE
2578 this->m_eventOut_OutputPort[0].
invoke(
2587 #if FW_ENABLE_TEXT_LOGGING
2588 if (this->m_LogText_OutputPort[0].isConnected()) {
2589 #if FW_OBJECT_NAMES == 1
2590 const char* _formatString =
2591 "(%s) %s: Creating directory %s...";
2593 const char* _formatString =
2594 "%s: Creating directory %s...";
2601 this->m_objName.toChar(),
2603 "CreateDirectoryStarted ",
2607 this->m_LogText_OutputPort[0].invoke(
2622 if (this->m_timeCaller_OutputPort[0].isConnected()) {
2623 this->m_timeCaller_OutputPort[0].
invoke(_logTime);
2631 if (this->m_eventOut_OutputPort[0].isConnected()) {
2635 #if FW_AMPCS_COMPATIBLE
2650 this->m_eventOut_OutputPort[0].
invoke(
2659 #if FW_ENABLE_TEXT_LOGGING
2660 if (this->m_LogText_OutputPort[0].isConnected()) {
2661 #if FW_OBJECT_NAMES == 1
2662 const char* _formatString =
2663 "(%s) %s: Removing directory %s...";
2665 const char* _formatString =
2666 "%s: Removing directory %s...";
2673 this->m_objName.toChar(),
2675 "RemoveDirectoryStarted ",
2679 this->m_LogText_OutputPort[0].invoke(
2697 if (this->m_timeCaller_OutputPort[0].isConnected()) {
2698 this->m_timeCaller_OutputPort[0].
invoke(_logTime);
2706 if (this->m_eventOut_OutputPort[0].isConnected()) {
2710 #if FW_AMPCS_COMPATIBLE
2731 this->m_eventOut_OutputPort[0].
invoke(
2740 #if FW_ENABLE_TEXT_LOGGING
2741 if (this->m_LogText_OutputPort[0].isConnected()) {
2742 #if FW_OBJECT_NAMES == 1
2743 const char* _formatString =
2744 "(%s) %s: Moving file %s to file %s...";
2746 const char* _formatString =
2747 "%s: Moving file %s to file %s...";
2754 this->m_objName.toChar(),
2761 this->m_LogText_OutputPort[0].invoke(
2776 if (this->m_timeCaller_OutputPort[0].isConnected()) {
2777 this->m_timeCaller_OutputPort[0].
invoke(_logTime);
2785 if (this->m_eventOut_OutputPort[0].isConnected()) {
2789 #if FW_AMPCS_COMPATIBLE
2804 this->m_eventOut_OutputPort[0].
invoke(
2813 #if FW_ENABLE_TEXT_LOGGING
2814 if (this->m_LogText_OutputPort[0].isConnected()) {
2815 #if FW_OBJECT_NAMES == 1
2816 const char* _formatString =
2817 "(%s) %s: Removing file %s...";
2819 const char* _formatString =
2820 "%s: Removing file %s...";
2827 this->m_objName.toChar(),
2829 "RemoveFileStarted ",
2833 this->m_LogText_OutputPort[0].invoke(
2851 if (this->m_timeCaller_OutputPort[0].isConnected()) {
2852 this->m_timeCaller_OutputPort[0].
invoke(_logTime);
2860 if (this->m_eventOut_OutputPort[0].isConnected()) {
2864 #if FW_AMPCS_COMPATIBLE
2879 #if FW_AMPCS_COMPATIBLE
2882 static_cast<U8>(
sizeof(
U64))
2895 this->m_eventOut_OutputPort[0].
invoke(
2904 #if FW_ENABLE_TEXT_LOGGING
2905 if (this->m_LogText_OutputPort[0].isConnected()) {
2906 #if FW_OBJECT_NAMES == 1
2907 const char* _formatString =
2908 "(%s) %s: The size of file %s is %" PRIu64
" B";
2910 const char* _formatString =
2911 "%s: The size of file %s is %" PRIu64
" B";
2918 this->m_objName.toChar(),
2920 "FileSizeSucceeded ",
2925 this->m_LogText_OutputPort[0].invoke(
2943 if (this->m_timeCaller_OutputPort[0].isConnected()) {
2944 this->m_timeCaller_OutputPort[0].
invoke(_logTime);
2952 if (this->m_eventOut_OutputPort[0].isConnected()) {
2956 #if FW_AMPCS_COMPATIBLE
2971 #if FW_AMPCS_COMPATIBLE
2974 static_cast<U8>(
sizeof(U32))
2987 this->m_eventOut_OutputPort[0].
invoke(
2996 #if FW_ENABLE_TEXT_LOGGING
2997 if (this->m_LogText_OutputPort[0].isConnected()) {
2998 #if FW_OBJECT_NAMES == 1
2999 const char* _formatString =
3000 "(%s) %s: Failed to get the size of file %s, returned status %" PRIu32
"";
3002 const char* _formatString =
3003 "%s: Failed to get the size of file %s, returned status %" PRIu32
"";
3010 this->m_objName.toChar(),
3017 this->m_LogText_OutputPort[0].invoke(
3032 if (this->m_timeCaller_OutputPort[0].isConnected()) {
3033 this->m_timeCaller_OutputPort[0].
invoke(_logTime);
3041 if (this->m_eventOut_OutputPort[0].isConnected()) {
3045 #if FW_AMPCS_COMPATIBLE
3060 this->m_eventOut_OutputPort[0].
invoke(
3069 #if FW_ENABLE_TEXT_LOGGING
3070 if (this->m_LogText_OutputPort[0].isConnected()) {
3071 #if FW_OBJECT_NAMES == 1
3072 const char* _formatString =
3073 "(%s) %s: Checking size of file %s...";
3075 const char* _formatString =
3076 "%s: Checking size of file %s...";
3083 this->m_objName.toChar(),
3089 this->m_LogText_OutputPort[0].invoke(
3109 if (this->m_tlmOut_OutputPort[0].isConnected()) {
3111 this->m_timeCaller_OutputPort[0].isConnected() &&
3114 this->m_timeCaller_OutputPort[0].
invoke(_tlmTime);
3128 this->m_tlmOut_OutputPort[0].
invoke(
3142 if (this->m_tlmOut_OutputPort[0].isConnected()) {
3144 this->m_timeCaller_OutputPort[0].isConnected() &&
3147 this->m_timeCaller_OutputPort[0].
invoke(_tlmTime);
3161 this->m_tlmOut_OutputPort[0].
invoke(
3176 if (this->m_timeCaller_OutputPort[0].isConnected()) {
3178 this->m_timeCaller_OutputPort[0].
invoke(_time);
3193 ComponentIpcSerializableBuffer msg;
3216 MsgTypeEnum msgType =
static_cast<MsgTypeEnum
>(desMsg);
3218 if (msgType == FILEMANAGER_COMPONENT_EXIT) {
3223 deserStatus = msg.deserialize(portNum);
3234 deserStatus = msg.deserialize(key);
3249 case CMD_CREATEDIRECTORY: {
3252 deserStatus = msg.deserialize(opCode);
3260 deserStatus = msg.deserialize(cmdSeq);
3281 if (this->m_cmdResponseOut_OutputPort[0].isConnected()) {
3294 #if FW_CMD_CHECK_RESIDUAL
3296 if (this->m_cmdResponseOut_OutputPort[0].isConnected()) {
3314 case CMD_MOVEFILE: {
3317 deserStatus = msg.deserialize(opCode);
3325 deserStatus = msg.deserialize(cmdSeq);
3346 if (this->m_cmdResponseOut_OutputPort[0].isConnected()) {
3361 if (this->m_cmdResponseOut_OutputPort[0].isConnected()) {
3374 #if FW_CMD_CHECK_RESIDUAL
3376 if (this->m_cmdResponseOut_OutputPort[0].isConnected()) {
3395 case CMD_REMOVEDIRECTORY: {
3398 deserStatus = msg.deserialize(opCode);
3406 deserStatus = msg.deserialize(cmdSeq);
3427 if (this->m_cmdResponseOut_OutputPort[0].isConnected()) {
3440 #if FW_CMD_CHECK_RESIDUAL
3442 if (this->m_cmdResponseOut_OutputPort[0].isConnected()) {
3460 case CMD_REMOVEFILE: {
3463 deserStatus = msg.deserialize(opCode);
3471 deserStatus = msg.deserialize(cmdSeq);
3492 if (this->m_cmdResponseOut_OutputPort[0].isConnected()) {
3507 if (this->m_cmdResponseOut_OutputPort[0].isConnected()) {
3520 #if FW_CMD_CHECK_RESIDUAL
3522 if (this->m_cmdResponseOut_OutputPort[0].isConnected()) {
3541 case CMD_SHELLCOMMAND: {
3544 deserStatus = msg.deserialize(opCode);
3552 deserStatus = msg.deserialize(cmdSeq);
3573 if (this->m_cmdResponseOut_OutputPort[0].isConnected()) {
3588 if (this->m_cmdResponseOut_OutputPort[0].isConnected()) {
3601 #if FW_CMD_CHECK_RESIDUAL
3603 if (this->m_cmdResponseOut_OutputPort[0].isConnected()) {
3622 case CMD_APPENDFILE: {
3625 deserStatus = msg.deserialize(opCode);
3633 deserStatus = msg.deserialize(cmdSeq);
3654 if (this->m_cmdResponseOut_OutputPort[0].isConnected()) {
3669 if (this->m_cmdResponseOut_OutputPort[0].isConnected()) {
3682 #if FW_CMD_CHECK_RESIDUAL
3684 if (this->m_cmdResponseOut_OutputPort[0].isConnected()) {
3703 case CMD_FILESIZE: {
3706 deserStatus = msg.deserialize(opCode);
3714 deserStatus = msg.deserialize(cmdSeq);
3735 if (this->m_cmdResponseOut_OutputPort[0].isConnected()) {
3748 #if FW_CMD_CHECK_RESIDUAL
3750 if (this->m_cmdResponseOut_OutputPort[0].isConnected()) {
3778 void FileManagerComponentBase ::
3790 const U32 idBase = callComp->
getIdBase();
3794 switch (opCode - idBase) {
3796 compPtr->CreateDirectory_cmdHandlerBase(
3805 compPtr->MoveFile_cmdHandlerBase(
3814 compPtr->RemoveDirectory_cmdHandlerBase(
3823 compPtr->RemoveFile_cmdHandlerBase(
3832 compPtr->ShellCommand_cmdHandlerBase(
3841 compPtr->AppendFile_cmdHandlerBase(
3850 compPtr->FileSize_cmdHandlerBase(
3864 void FileManagerComponentBase ::
3873 compPtr->pingIn_handlerBase(
#define FW_MIN(a, b)
MIN macro.
uint8_t U8
8-bit unsigned integer
#define FW_NUM_ARRAY_ELEMENTS(a)
number of elements in an array
#define PRI_PlatformIntType
@ TB_NONE
No time base has been established.
PlatformAssertArgType FwAssertArgType
PlatformSizeType FwSizeType
#define FW_LOG_STRING_MAX_SIZE
Max size of log string parameter type.
PlatformQueuePriorityType FwQueuePriorityType
PlatformIndexType FwIndexType
#define FW_OBJECT_NAMES
Indicates whether or not object names are stored (more memory, can be used for tracking objects)
@ ACTIVE_COMPONENT_EXIT
message to exit active component task
Enum representing a command response.
@ FORMAT_ERROR
Command failed to deserialize.
@ WARNING_HI
A serious but recoverable event.
@ ACTIVITY_HI
Important informational events.
void init()
Object initializer.
const char * toChar() const
void addCallPort(InputCmdRegPort *callPort)
Register an input port.
void invoke(FwOpcodeType opCode)
Invoke a port interface.
void init()
Initialization function.
void init()
Initialization function.
void addCallPort(InputCmdResponsePort *callPort)
Register an input port.
void invoke(FwOpcodeType opCode, U32 cmdSeq, const Fw::CmdResponse &response)
Invoke a port interface.
void init()
Initialization function.
void invoke(FwEventIdType id, Fw::Time &timeTag, const Fw::LogSeverity &severity, Fw::LogBuffer &args)
Invoke a port interface.
void addCallPort(InputLogPort *callPort)
Register an input port.
void addCallPort(InputTimePort *callPort)
Register an input port.
void invoke(Fw::Time &time)
Invoke a port interface.
void init()
Initialization function.
void addCallPort(InputTlmPort *callPort)
Register an input port.
void init()
Initialization function.
void invoke(FwChanIdType id, Fw::Time &timeTag, Fw::TlmBuffer &val)
Invoke a port interface.
Os::Queue::Status createQueue(FwSizeType depth, FwSizeType msgSize)
Os::Queue m_queue
queue object for active component
@ MSG_DISPATCH_OK
Dispatch was normal.
@ MSG_DISPATCH_EXIT
A message was sent requesting an exit of the loop.
@ MSG_DISPATCH_ERROR
Errors dispatching messages.
NATIVE_UINT_TYPE SizeType
void resetDeser()
reset deserialization to beginning
Serializable::SizeType getBuffLeft() const
returns how much deserialization buffer is left
SerializeStatus deserialize(U8 &val)
deserialize 8-bit unsigned int
SerializeStatus serialize(U8 val)
serialize 8-bit unsigned int
virtual const CHAR * toChar() const =0
void format(const CHAR *formatString,...)
write formatted string to buffer
virtual SerializeStatus serialize(SerializeBufferBase &buffer) const
serialization function
Status send(const U8 *buffer, FwSizeType size, FwQueuePriorityType priority, BlockingType blockType) override
send a message into the queue through delegate
Status receive(U8 *destination, FwSizeType capacity, BlockingType blockType, FwSizeType &actualSize, FwQueuePriorityType &priority) override
receive a message from the queue through delegate
@ BLOCKING
Message will block until space is available.
@ NONBLOCKING
Message will return with status when space is unavailable.
Status
status returned from the queue send function
@ OP_OK
message sent/received okay
void log_ACTIVITY_HI_MoveFileSucceeded(const Fw::StringBase &sourceFileName, const Fw::StringBase &destFileName)
void log_ACTIVITY_HI_RemoveFileStarted(const Fw::StringBase &fileName)
void pingOut_out(FwIndexType portNum, U32 key)
Invoke output port pingOut.
bool isConnected_eventOut_OutputPort(FwIndexType portNum)
bool isConnected_tlmOut_OutputPort(FwIndexType portNum)
void log_ACTIVITY_HI_RemoveDirectorySucceeded(const Fw::StringBase &dirName)
void log_ACTIVITY_HI_MoveFileStarted(const Fw::StringBase &sourceFileName, const Fw::StringBase &destFileName)
void set_tlmOut_OutputPort(FwIndexType portNum, Fw::InputTlmPort *port)
Connect port to tlmOut[portNum].
void set_timeCaller_OutputPort(FwIndexType portNum, Fw::InputTimePort *port)
Connect port to timeCaller[portNum].
void log_ACTIVITY_HI_RemoveFileSucceeded(const Fw::StringBase &fileName)
virtual void FileSize_preMsgHook(FwOpcodeType opCode, U32 cmdSeq)
Pre-message hook for command FileSize.
virtual void FileSize_cmdHandler(FwOpcodeType opCode, U32 cmdSeq, const Fw::CmdStringArg &fileName)=0
Handler for command FileSize.
void log_WARNING_HI_ShellCommandFailed(const Fw::StringBase &command, U32 status)
void set_cmdRegOut_OutputPort(FwIndexType portNum, Fw::InputCmdRegPort *port)
Connect port to cmdRegOut[portNum].
void ShellCommand_cmdHandlerBase(FwOpcodeType opCode, U32 cmdSeq, Fw::CmdArgBuffer &args)
void log_ACTIVITY_HI_ShellCommandSucceeded(const Fw::StringBase &command)
FwIndexType getNum_cmdIn_InputPorts() const
virtual void RemoveDirectory_cmdHandler(FwOpcodeType opCode, U32 cmdSeq, const Fw::CmdStringArg &dirName)=0
virtual void MoveFile_cmdHandler(FwOpcodeType opCode, U32 cmdSeq, const Fw::CmdStringArg &sourceFileName, const Fw::CmdStringArg &destFileName)=0
FwIndexType getNum_cmdRegOut_OutputPorts() const
bool isConnected_cmdResponseOut_OutputPort(FwIndexType portNum)
virtual void AppendFile_preMsgHook(FwOpcodeType opCode, U32 cmdSeq)
Pre-message hook for command AppendFile.
void cmdResponse_out(FwOpcodeType opCode, U32 cmdSeq, Fw::CmdResponse response)
Emit command response.
void tlmWrite_CommandsExecuted(U32 arg, Fw::Time _tlmTime=Fw::Time())
void tlmWrite_Errors(U32 arg, Fw::Time _tlmTime=Fw::Time())
virtual void ShellCommand_cmdHandler(FwOpcodeType opCode, U32 cmdSeq, const Fw::CmdStringArg &command, const Fw::CmdStringArg &logFileName)=0
void regCommands()
Register commands with the Command Dispatcher.
void AppendFile_cmdHandlerBase(FwOpcodeType opCode, U32 cmdSeq, Fw::CmdArgBuffer &args)
FwIndexType getNum_timeCaller_OutputPorts() const
void FileSize_cmdHandlerBase(FwOpcodeType opCode, U32 cmdSeq, Fw::CmdArgBuffer &args)
Base-class handler function for command FileSize.
void pingIn_handlerBase(FwIndexType portNum, U32 key)
Handler base-class function for input port pingIn.
Fw::InputCmdPort * get_cmdIn_InputPort(FwIndexType portNum)
void log_ACTIVITY_HI_AppendFileSucceeded(const Fw::StringBase &source, const Fw::StringBase &target)
virtual ~FileManagerComponentBase()
Destroy FileManagerComponentBase object.
virtual void CreateDirectory_preMsgHook(FwOpcodeType opCode, U32 cmdSeq)
Pre-message hook for command CreateDirectory.
void set_eventOut_OutputPort(FwIndexType portNum, Fw::InputLogPort *port)
Connect port to eventOut[portNum].
void log_WARNING_HI_DirectoryRemoveError(const Fw::StringBase &dirName, U32 status)
void RemoveDirectory_cmdHandlerBase(FwOpcodeType opCode, U32 cmdSeq, Fw::CmdArgBuffer &args)
virtual void AppendFile_cmdHandler(FwOpcodeType opCode, U32 cmdSeq, const Fw::CmdStringArg &source, const Fw::CmdStringArg &target)=0
virtual void RemoveFile_preMsgHook(FwOpcodeType opCode, U32 cmdSeq)
Pre-message hook for command RemoveFile.
bool isConnected_pingOut_OutputPort(FwIndexType portNum)
@ CHANNELID_ERRORS
Channel ID for Errors.
@ CHANNELID_COMMANDSEXECUTED
Channel ID for CommandsExecuted.
void log_ACTIVITY_HI_FileSizeStarted(const Fw::StringBase &fileName)
FwIndexType getNum_pingIn_InputPorts() const
void MoveFile_cmdHandlerBase(FwOpcodeType opCode, U32 cmdSeq, Fw::CmdArgBuffer &args)
void set_cmdResponseOut_OutputPort(FwIndexType portNum, Fw::InputCmdResponsePort *port)
Connect port to cmdResponseOut[portNum].
@ EVENTID_APPENDFILESUCCEEDED
The File System component appended 2 files without error.
@ EVENTID_REMOVEFILESTARTED
The File System component began deleting an existing file.
@ EVENTID_FILESIZEERROR
Failed to get file size.
@ EVENTID_DIRECTORYREMOVEERROR
An error occurred while attempting to remove a directory.
@ EVENTID_FILESIZESTARTED
Checking file size.
@ EVENTID_APPENDFILESTARTED
The File System component appended 2 files without error.
@ EVENTID_SHELLCOMMANDSTARTED
The File System component began executing a shell command.
@ EVENTID_APPENDFILEFAILED
The File System component returned status non-zero when trying to append 2 files together.
@ EVENTID_FILESIZESUCCEEDED
File size response.
@ EVENTID_MOVEFILESTARTED
The File System component began moving a file to a new location.
@ EVENTID_FILEREMOVEERROR
An error occurred while attempting to remove a file.
@ EVENTID_REMOVEDIRECTORYSTARTED
The File System component began deleting a directory.
@ EVENTID_SHELLCOMMANDFAILED
The File System component executed a shell command that returned status non-zero.
@ EVENTID_CREATEDIRECTORYSUCCEEDED
The File System component created a new directory without error.
@ EVENTID_MOVEFILESUCCEEDED
The File System component moved a file to a new location without error.
@ EVENTID_REMOVEDIRECTORYSUCCEEDED
The File System component deleted and existing directory without error.
@ EVENTID_DIRECTORYCREATEERROR
An error occurred while attempting to create a directory.
@ EVENTID_CREATEDIRECTORYSTARTED
The File System component began creating a new directory.
@ EVENTID_SHELLCOMMANDSUCCEEDED
The File System component executed a shell command that returned status zero.
@ EVENTID_FILEMOVEERROR
An error occurred while attempting to move a file.
@ EVENTID_REMOVEFILESUCCEEDED
The File System component deleted an existing file without error.
void CreateDirectory_cmdHandlerBase(FwOpcodeType opCode, U32 cmdSeq, Fw::CmdArgBuffer &args)
void set_pingOut_OutputPort(FwIndexType portNum, Svc::InputPingPort *port)
Connect port to pingOut[portNum].
void log_WARNING_HI_FileMoveError(const Fw::StringBase &sourceFileName, const Fw::StringBase &destFileName, U32 status)
bool isConnected_cmdRegOut_OutputPort(FwIndexType portNum)
Svc::InputPingPort * get_pingIn_InputPort(FwIndexType portNum)
virtual void RemoveDirectory_preMsgHook(FwOpcodeType opCode, U32 cmdSeq)
Pre-message hook for command RemoveDirectory.
void log_ACTIVITY_HI_RemoveDirectoryStarted(const Fw::StringBase &dirName)
void log_WARNING_HI_FileSizeError(const Fw::StringBase &fileName, U32 status)
virtual void pingIn_preMsgHook(FwIndexType portNum, U32 key)
Pre-message hook for async input port pingIn.
FileManagerComponentBase(const char *compName="")
Construct FileManagerComponentBase object.
void RemoveFile_cmdHandlerBase(FwOpcodeType opCode, U32 cmdSeq, Fw::CmdArgBuffer &args)
void log_WARNING_HI_DirectoryCreateError(const Fw::StringBase &dirName, U32 status)
void log_WARNING_HI_AppendFileFailed(const Fw::StringBase &source, const Fw::StringBase &target, U32 status)
void log_ACTIVITY_HI_CreateDirectorySucceeded(const Fw::StringBase &dirName)
void log_ACTIVITY_HI_ShellCommandStarted(const Fw::StringBase &command)
virtual void RemoveFile_cmdHandler(FwOpcodeType opCode, U32 cmdSeq, const Fw::CmdStringArg &fileName, bool ignoreErrors)=0
FwIndexType getNum_eventOut_OutputPorts() const
virtual void CreateDirectory_cmdHandler(FwOpcodeType opCode, U32 cmdSeq, const Fw::CmdStringArg &dirName)=0
void log_ACTIVITY_HI_CreateDirectoryStarted(const Fw::StringBase &dirName)
void log_ACTIVITY_HI_AppendFileStarted(const Fw::StringBase &source, const Fw::StringBase &target)
FwIndexType getNum_cmdResponseOut_OutputPorts() const
@ OPCODE_CREATEDIRECTORY
Create a directory.
@ OPCODE_REMOVEDIRECTORY
Remove a directory, which must be empty.
@ OPCODE_SHELLCOMMAND
Perform a Linux shell command and write the output to a log file.
@ OPCODE_MOVEFILE
Move a file.
@ OPCODE_REMOVEFILE
Remove a file.
@ OPCODE_APPENDFILE
Append 1 file's contents to the end of another.
void log_WARNING_HI_FileRemoveError(const Fw::StringBase &fileName, U32 status)
void log_ACTIVITY_HI_FileSizeSucceeded(const Fw::StringBase &fileName, U64 size)
virtual void MoveFile_preMsgHook(FwOpcodeType opCode, U32 cmdSeq)
Pre-message hook for command MoveFile.
bool isConnected_timeCaller_OutputPort(FwIndexType portNum)
virtual void ShellCommand_preMsgHook(FwOpcodeType opCode, U32 cmdSeq)
Pre-message hook for command ShellCommand.
FwIndexType getNum_tlmOut_OutputPorts() const
FwIndexType getNum_pingOut_OutputPorts() const
virtual void pingIn_handler(FwIndexType portNum, U32 key)=0
Handler for input port pingIn.
void invoke(U32 key)
Invoke a port interface.
void init()
Initialization function.
void addCallPort(InputPingPort *callPort)
Register an input port.
SerializeStatus
forward declaration for string
@ FW_SERIALIZE_OK
Serialization/Deserialization operation was successful.
@ OP_OK
Operation succeeded.