9 #if FW_ENABLE_TEXT_LOGGING 20 VERIFYIN_VERIFYSTATUS,
35 class ComponentIpcSerializableBuffer :
45 MAX_DATA_SIZE =
sizeof(BuffUnion),
47 SERIALIZATION_SIZE = DATA_OFFSET + MAX_DATA_SIZE
51 return sizeof(m_buff);
58 const U8* getBuffAddr()
const {
64 U8 m_buff[SERIALIZATION_SIZE];
88 this->m_cmdIn_InputPort[port].
init();
93 this->m_cmdIn_InputPort[port].
setPortNum(port);
95 #if FW_OBJECT_NAMES == 1 99 this->m_objName.toChar(),
102 this->m_cmdIn_InputPort[port].setObjName(portName.
toChar());
112 this->m_cancelIn_InputPort[port].
init();
117 this->m_cancelIn_InputPort[port].
setPortNum(port);
119 #if FW_OBJECT_NAMES == 1 123 this->m_objName.toChar(),
126 this->m_cancelIn_InputPort[port].setObjName(portName.
toChar());
136 this->m_readIn_InputPort[port].
init();
141 this->m_readIn_InputPort[port].
setPortNum(port);
143 #if FW_OBJECT_NAMES == 1 147 this->m_objName.toChar(),
150 this->m_readIn_InputPort[port].setObjName(portName.
toChar());
160 this->m_verifyIn_InputPort[port].
init();
165 this->m_verifyIn_InputPort[port].
setPortNum(port);
167 #if FW_OBJECT_NAMES == 1 171 this->m_objName.toChar(),
174 this->m_verifyIn_InputPort[port].setObjName(portName.
toChar());
184 this->m_writeIn_InputPort[port].
init();
189 this->m_writeIn_InputPort[port].
setPortNum(port);
191 #if FW_OBJECT_NAMES == 1 195 this->m_objName.toChar(),
198 this->m_writeIn_InputPort[port].setObjName(portName.
toChar());
208 this->m_cmdRegOut_OutputPort[port].
init();
210 #if FW_OBJECT_NAMES == 1 214 this->m_objName.toChar(),
217 this->m_cmdRegOut_OutputPort[port].setObjName(portName.
toChar());
227 this->m_cmdResponseOut_OutputPort[port].
init();
229 #if FW_OBJECT_NAMES == 1 233 this->m_objName.toChar(),
236 this->m_cmdResponseOut_OutputPort[port].setObjName(portName.
toChar());
246 this->m_logOut_OutputPort[port].
init();
248 #if FW_OBJECT_NAMES == 1 252 this->m_objName.toChar(),
255 this->m_logOut_OutputPort[port].setObjName(portName.
toChar());
259 #if FW_ENABLE_TEXT_LOGGING == 1 263 port < static_cast<FwIndexType>(this->getNum_logTextOut_OutputPorts());
266 this->m_logTextOut_OutputPort[port].
init();
268 #if FW_OBJECT_NAMES == 1 272 this->m_objName.toChar(),
275 this->m_logTextOut_OutputPort[port].setObjName(portName.
toChar());
286 this->m_prmGetOut_OutputPort[port].
init();
288 #if FW_OBJECT_NAMES == 1 292 this->m_objName.toChar(),
295 this->m_prmGetOut_OutputPort[port].setObjName(portName.
toChar());
305 this->m_prmSetOut_OutputPort[port].
init();
307 #if FW_OBJECT_NAMES == 1 311 this->m_objName.toChar(),
314 this->m_prmSetOut_OutputPort[port].setObjName(portName.
toChar());
324 this->m_timeCaller_OutputPort[port].
init();
326 #if FW_OBJECT_NAMES == 1 330 this->m_objName.toChar(),
333 this->m_timeCaller_OutputPort[port].setObjName(portName.
toChar());
343 this->m_tlmOut_OutputPort[port].
init();
345 #if FW_OBJECT_NAMES == 1 349 this->m_objName.toChar(),
352 this->m_tlmOut_OutputPort[port].setObjName(portName.
toChar());
362 this->m_readDoneOut_OutputPort[port].
init();
364 #if FW_OBJECT_NAMES == 1 368 this->m_objName.toChar(),
371 this->m_readDoneOut_OutputPort[port].setObjName(portName.
toChar());
381 this->m_verifyDoneOut_OutputPort[port].
init();
383 #if FW_OBJECT_NAMES == 1 387 this->m_objName.toChar(),
390 this->m_verifyDoneOut_OutputPort[port].setObjName(portName.
toChar());
400 this->m_writeDoneOut_OutputPort[port].
init();
402 #if FW_OBJECT_NAMES == 1 406 this->m_objName.toChar(),
409 this->m_writeDoneOut_OutputPort[port].setObjName(portName.
toChar());
416 static_cast<FwSizeType>(ComponentIpcSerializableBuffer::SERIALIZATION_SIZE)
420 static_cast<FwAssertArgType>(qStat)
433 static_cast<FwAssertArgType>(portNum)
436 return &this->m_cmdIn_InputPort[portNum];
448 static_cast<FwAssertArgType>(portNum)
451 return &this->m_cancelIn_InputPort[portNum];
459 static_cast<FwAssertArgType>(portNum)
462 return &this->m_readIn_InputPort[portNum];
470 static_cast<FwAssertArgType>(portNum)
473 return &this->m_verifyIn_InputPort[portNum];
481 static_cast<FwAssertArgType>(portNum)
484 return &this->m_writeIn_InputPort[portNum];
499 static_cast<FwAssertArgType>(portNum)
502 this->m_cmdRegOut_OutputPort[portNum].
addCallPort(port);
513 static_cast<FwAssertArgType>(portNum)
516 this->m_cmdResponseOut_OutputPort[portNum].
addCallPort(port);
527 static_cast<FwAssertArgType>(portNum)
530 this->m_logOut_OutputPort[portNum].
addCallPort(port);
533 #if FW_ENABLE_TEXT_LOGGING == 1 535 void FileWorkerComponentBase ::
536 set_logTextOut_OutputPort(
542 (0 <= portNum) && (portNum < this->getNum_logTextOut_OutputPorts()),
543 static_cast<FwAssertArgType>(portNum)
546 this->m_logTextOut_OutputPort[portNum].addCallPort(port);
559 static_cast<FwAssertArgType>(portNum)
562 this->m_prmGetOut_OutputPort[portNum].
addCallPort(port);
573 static_cast<FwAssertArgType>(portNum)
576 this->m_prmSetOut_OutputPort[portNum].
addCallPort(port);
587 static_cast<FwAssertArgType>(portNum)
590 this->m_timeCaller_OutputPort[portNum].
addCallPort(port);
601 static_cast<FwAssertArgType>(portNum)
604 this->m_tlmOut_OutputPort[portNum].
addCallPort(port);
619 static_cast<FwAssertArgType>(portNum)
622 this->m_readDoneOut_OutputPort[portNum].
addCallPort(port);
633 static_cast<FwAssertArgType>(portNum)
636 this->m_verifyDoneOut_OutputPort[portNum].
addCallPort(port);
647 static_cast<FwAssertArgType>(portNum)
650 this->m_writeDoneOut_OutputPort[portNum].
addCallPort(port);
653 #if FW_PORT_SERIALIZATION 662 Fw::InputSerializePort* port
667 static_cast<FwAssertArgType>(portNum)
670 this->m_cmdRegOut_OutputPort[portNum].registerSerialPort(port);
676 Fw::InputSerializePort* port
681 static_cast<FwAssertArgType>(portNum)
684 this->m_cmdResponseOut_OutputPort[portNum].registerSerialPort(port);
690 Fw::InputSerializePort* port
695 static_cast<FwAssertArgType>(portNum)
698 this->m_logOut_OutputPort[portNum].registerSerialPort(port);
701 #if FW_ENABLE_TEXT_LOGGING == 1 703 void FileWorkerComponentBase ::
704 set_logTextOut_OutputPort(
706 Fw::InputSerializePort* port
710 (0 <= portNum) && (portNum < this->getNum_logTextOut_OutputPorts()),
711 static_cast<FwAssertArgType>(portNum)
714 this->m_logTextOut_OutputPort[portNum].registerSerialPort(port);
722 Fw::InputSerializePort* port
727 static_cast<FwAssertArgType>(portNum)
730 this->m_prmSetOut_OutputPort[portNum].registerSerialPort(port);
736 Fw::InputSerializePort* port
741 static_cast<FwAssertArgType>(portNum)
744 this->m_timeCaller_OutputPort[portNum].registerSerialPort(port);
750 Fw::InputSerializePort* port
755 static_cast<FwAssertArgType>(portNum)
758 this->m_tlmOut_OutputPort[portNum].registerSerialPort(port);
763 #if FW_PORT_SERIALIZATION 772 Fw::InputSerializePort* port
777 static_cast<FwAssertArgType>(portNum)
780 this->m_readDoneOut_OutputPort[portNum].registerSerialPort(port);
786 Fw::InputSerializePort* port
791 static_cast<FwAssertArgType>(portNum)
794 this->m_verifyDoneOut_OutputPort[portNum].registerSerialPort(port);
800 Fw::InputSerializePort* port
805 static_cast<FwAssertArgType>(portNum)
808 this->m_writeDoneOut_OutputPort[portNum].registerSerialPort(port);
819 Fw::ActiveComponentBase(compName)
821 this->m_NotInIdleThrottle = 0;
822 this->m_CrcFailedThrottle = 0;
823 this->m_ReadFailedFileSizeThrottle = 0;
824 this->m_OpenFileErrorThrottle = 0;
825 this->m_WriteFileErrorThrottle = 0;
826 this->m_WriteValidationOpenErrorThrottle = 0;
827 this->m_WriteValidationReadErrorThrottle = 0;
829 this->m_NotInIdleThrottleTime =
Fw::Time();
830 this->m_CrcFailedThrottleTime =
Fw::Time();
831 this->m_ReadFailedFileSizeThrottleTime =
Fw::Time();
832 this->m_OpenFileErrorThrottleTime =
Fw::Time();
833 this->m_WriteFileErrorThrottleTime =
Fw::Time();
834 this->m_WriteValidationOpenErrorThrottleTime =
Fw::Time();
835 this->m_WriteValidationReadErrorThrottleTime =
Fw::Time();
853 static_cast<FwAssertArgType>(portNum)
856 return this->m_cmdRegOut_OutputPort[portNum].
isConnected();
864 static_cast<FwAssertArgType>(portNum)
867 return this->m_cmdResponseOut_OutputPort[portNum].
isConnected();
875 static_cast<FwAssertArgType>(portNum)
878 return this->m_logOut_OutputPort[portNum].
isConnected();
881 #if FW_ENABLE_TEXT_LOGGING == 1 883 bool FileWorkerComponentBase ::
884 isConnected_logTextOut_OutputPort(
FwIndexType portNum)
887 (0 <= portNum) && (portNum < this->getNum_logTextOut_OutputPorts()),
888 static_cast<FwAssertArgType>(portNum)
891 return this->m_logTextOut_OutputPort[portNum].isConnected();
901 static_cast<FwAssertArgType>(portNum)
904 return this->m_prmGetOut_OutputPort[portNum].
isConnected();
912 static_cast<FwAssertArgType>(portNum)
915 return this->m_prmSetOut_OutputPort[portNum].
isConnected();
923 static_cast<FwAssertArgType>(portNum)
926 return this->m_timeCaller_OutputPort[portNum].
isConnected();
934 static_cast<FwAssertArgType>(portNum)
937 return this->m_tlmOut_OutputPort[portNum].
isConnected();
949 static_cast<FwAssertArgType>(portNum)
952 return this->m_readDoneOut_OutputPort[portNum].
isConnected();
960 static_cast<FwAssertArgType>(portNum)
963 return this->m_verifyDoneOut_OutputPort[portNum].
isConnected();
971 static_cast<FwAssertArgType>(portNum)
974 return this->m_writeDoneOut_OutputPort[portNum].
isConnected();
989 static_cast<FwAssertArgType>(portNum)
1012 static_cast<FwAssertArgType>(portNum)
1021 ComponentIpcSerializableBuffer msg;
1025 _status = msg.serializeFrom(
1026 static_cast<FwEnumStoreType>(READIN_FILEREAD)
1030 static_cast<FwAssertArgType>(_status)
1034 _status = msg.serializeFrom(portNum);
1037 static_cast<FwAssertArgType>(_status)
1044 static_cast<FwAssertArgType>(_status)
1048 _status = msg.serializeFrom(buffer);
1051 static_cast<FwAssertArgType>(_status)
1060 static_cast<FwAssertArgType>(qStatus)
1074 static_cast<FwAssertArgType>(portNum)
1083 ComponentIpcSerializableBuffer msg;
1087 _status = msg.serializeFrom(
1088 static_cast<FwEnumStoreType>(VERIFYIN_VERIFYSTATUS)
1092 static_cast<FwAssertArgType>(_status)
1096 _status = msg.serializeFrom(portNum);
1099 static_cast<FwAssertArgType>(_status)
1106 static_cast<FwAssertArgType>(_status)
1110 _status = msg.serializeFrom(crc);
1113 static_cast<FwAssertArgType>(_status)
1122 static_cast<FwAssertArgType>(qStatus)
1138 static_cast<FwAssertArgType>(portNum)
1149 ComponentIpcSerializableBuffer msg;
1153 _status = msg.serializeFrom(
1154 static_cast<FwEnumStoreType>(WRITEIN_FILEWRITE)
1158 static_cast<FwAssertArgType>(_status)
1162 _status = msg.serializeFrom(portNum);
1165 static_cast<FwAssertArgType>(_status)
1172 static_cast<FwAssertArgType>(_status)
1176 _status = msg.serializeFrom(buffer);
1179 static_cast<FwAssertArgType>(_status)
1183 _status = msg.serializeFrom(offsetBytes);
1186 static_cast<FwAssertArgType>(_status)
1190 _status = msg.serializeFrom(append);
1193 static_cast<FwAssertArgType>(_status)
1202 static_cast<FwAssertArgType>(qStatus)
1259 static_cast<FwAssertArgType>(portNum)
1263 this->m_readDoneOut_OutputPort[portNum].isConnected(),
1264 static_cast<FwAssertArgType>(portNum)
1266 this->m_readDoneOut_OutputPort[portNum].
invoke(
1281 static_cast<FwAssertArgType>(portNum)
1285 this->m_verifyDoneOut_OutputPort[portNum].isConnected(),
1286 static_cast<FwAssertArgType>(portNum)
1288 this->m_verifyDoneOut_OutputPort[portNum].
invoke(
1303 static_cast<FwAssertArgType>(portNum)
1307 this->m_writeDoneOut_OutputPort[portNum].isConnected(),
1308 static_cast<FwAssertArgType>(portNum)
1310 this->m_writeDoneOut_OutputPort[portNum].
invoke(
1325 if (this->m_timeCaller_OutputPort[0].isConnected()) {
1326 this->m_timeCaller_OutputPort[0].
invoke(_logTime);
1341 this->m_NotInIdleThrottle = 0;
1349 if (this->m_NotInIdleThrottle == 0) {
1351 this->m_NotInIdleThrottleTime = _logTime;
1355 this->m_NotInIdleThrottle++;
1359 if (this->m_logOut_OutputPort[0].isConnected()) {
1363 #if FW_AMPCS_COMPATIBLE 1368 static_cast<FwAssertArgType>(_status)
1372 #if FW_AMPCS_COMPATIBLE 1375 static_cast<U8>(
sizeof(U32))
1379 static_cast<FwAssertArgType>(_status)
1385 static_cast<FwAssertArgType>(_status)
1388 this->m_logOut_OutputPort[0].
invoke(
1397 #if FW_ENABLE_TEXT_LOGGING 1398 if (this->m_logTextOut_OutputPort[0].isConnected()) {
1399 #if FW_OBJECT_NAMES == 1 1400 const char* _formatString =
1401 "(%s) %s: Not in IDLE state, currently in state: %" PRIu32
"";
1403 const char* _formatString =
1404 "%s: Not in IDLE state, currently in state: %" PRIu32
"";
1411 this->m_objName.toChar(),
1417 this->m_logTextOut_OutputPort[0].invoke(
1432 if (this->m_timeCaller_OutputPort[0].isConnected()) {
1433 this->m_timeCaller_OutputPort[0].
invoke(_logTime);
1448 this->m_CrcFailedThrottle = 0;
1456 if (this->m_CrcFailedThrottle == 0) {
1458 this->m_CrcFailedThrottleTime = _logTime;
1462 this->m_CrcFailedThrottle++;
1466 if (this->m_logOut_OutputPort[0].isConnected()) {
1470 #if FW_AMPCS_COMPATIBLE 1475 static_cast<FwAssertArgType>(_status)
1479 #if FW_AMPCS_COMPATIBLE 1482 static_cast<U8>(
sizeof(U32))
1486 static_cast<FwAssertArgType>(_status)
1492 static_cast<FwAssertArgType>(_status)
1495 this->m_logOut_OutputPort[0].
invoke(
1504 #if FW_ENABLE_TEXT_LOGGING 1505 if (this->m_logTextOut_OutputPort[0].isConnected()) {
1506 #if FW_OBJECT_NAMES == 1 1507 const char* _formatString =
1508 "(%s) %s: Failed CRC check with %" PRIu32
" status";
1510 const char* _formatString =
1511 "%s: Failed CRC check with %" PRIu32
" status";
1518 this->m_objName.toChar(),
1524 this->m_logTextOut_OutputPort[0].invoke(
1542 if (this->m_timeCaller_OutputPort[0].isConnected()) {
1543 this->m_timeCaller_OutputPort[0].
invoke(_logTime);
1551 if (this->m_logOut_OutputPort[0].isConnected()) {
1555 #if FW_AMPCS_COMPATIBLE 1560 static_cast<FwAssertArgType>(_status)
1564 #if FW_AMPCS_COMPATIBLE 1567 static_cast<U8>(
sizeof(U32))
1571 static_cast<FwAssertArgType>(_status)
1577 static_cast<FwAssertArgType>(_status)
1580 #if FW_AMPCS_COMPATIBLE 1583 static_cast<U8>(
sizeof(U32))
1587 static_cast<FwAssertArgType>(_status)
1593 static_cast<FwAssertArgType>(_status)
1596 this->m_logOut_OutputPort[0].
invoke(
1605 #if FW_ENABLE_TEXT_LOGGING 1606 if (this->m_logTextOut_OutputPort[0].isConnected()) {
1607 #if FW_OBJECT_NAMES == 1 1608 const char* _formatString =
1609 "(%s) %s: Failed to verify file. Expected CRC %" PRIu32
". Actual CRC %" PRIu32
"";
1611 const char* _formatString =
1612 "%s: Failed to verify file. Expected CRC %" PRIu32
". Actual CRC %" PRIu32
"";
1619 this->m_objName.toChar(),
1621 "CrcVerificationError ",
1626 this->m_logTextOut_OutputPort[0].invoke(
1641 if (this->m_timeCaller_OutputPort[0].isConnected()) {
1642 this->m_timeCaller_OutputPort[0].
invoke(_logTime);
1657 this->m_ReadFailedFileSizeThrottle = 0;
1665 if (this->m_ReadFailedFileSizeThrottle == 0) {
1667 this->m_ReadFailedFileSizeThrottleTime = _logTime;
1671 this->m_ReadFailedFileSizeThrottle++;
1675 if (this->m_logOut_OutputPort[0].isConnected()) {
1679 #if FW_AMPCS_COMPATIBLE 1684 static_cast<FwAssertArgType>(_status)
1688 #if FW_AMPCS_COMPATIBLE 1691 static_cast<U8>(
sizeof(U32))
1695 static_cast<FwAssertArgType>(_status)
1701 static_cast<FwAssertArgType>(_status)
1704 this->m_logOut_OutputPort[0].
invoke(
1713 #if FW_ENABLE_TEXT_LOGGING 1714 if (this->m_logTextOut_OutputPort[0].isConnected()) {
1715 #if FW_OBJECT_NAMES == 1 1716 const char* _formatString =
1717 "(%s) %s: Failed to get filesize with stat %" PRIu32
" in read handler";
1719 const char* _formatString =
1720 "%s: Failed to get filesize with stat %" PRIu32
" in read handler";
1727 this->m_objName.toChar(),
1729 "ReadFailedFileSize ",
1733 this->m_logTextOut_OutputPort[0].invoke(
1751 if (this->m_timeCaller_OutputPort[0].isConnected()) {
1752 this->m_timeCaller_OutputPort[0].
invoke(_logTime);
1767 this->m_OpenFileErrorThrottle = 0;
1775 if (this->m_OpenFileErrorThrottle == 0) {
1777 this->m_OpenFileErrorThrottleTime = _logTime;
1781 this->m_OpenFileErrorThrottle++;
1785 if (this->m_logOut_OutputPort[0].isConnected()) {
1789 #if FW_AMPCS_COMPATIBLE 1794 static_cast<FwAssertArgType>(_status)
1801 static_cast<FwAssertArgType>(_status)
1804 #if FW_AMPCS_COMPATIBLE 1807 static_cast<U8>(
sizeof(U32))
1811 static_cast<FwAssertArgType>(_status)
1817 static_cast<FwAssertArgType>(_status)
1820 this->m_logOut_OutputPort[0].
invoke(
1829 #if FW_ENABLE_TEXT_LOGGING 1830 if (this->m_logTextOut_OutputPort[0].isConnected()) {
1831 #if FW_OBJECT_NAMES == 1 1832 const char* _formatString =
1833 "(%s) %s: Failed to open file %s with stat %" PRIu32
"";
1835 const char* _formatString =
1836 "%s: Failed to open file %s with stat %" PRIu32
"";
1843 this->m_objName.toChar(),
1850 this->m_logTextOut_OutputPort[0].invoke(
1868 if (this->m_timeCaller_OutputPort[0].isConnected()) {
1869 this->m_timeCaller_OutputPort[0].
invoke(_logTime);
1877 if (this->m_logOut_OutputPort[0].isConnected()) {
1881 #if FW_AMPCS_COMPATIBLE 1886 static_cast<FwAssertArgType>(_status)
1890 #if FW_AMPCS_COMPATIBLE 1897 static_cast<FwAssertArgType>(_status)
1903 static_cast<FwAssertArgType>(_status)
1909 static_cast<FwAssertArgType>(_status)
1912 this->m_logOut_OutputPort[0].
invoke(
1921 #if FW_ENABLE_TEXT_LOGGING 1922 if (this->m_logTextOut_OutputPort[0].isConnected()) {
1923 #if FW_OBJECT_NAMES == 1 1924 const char* _formatString =
1925 "(%s) %s: Reading %" PRIu64
" bytes from %s";
1927 const char* _formatString =
1928 "%s: Reading %" PRIu64
" bytes from %s";
1935 this->m_objName.toChar(),
1942 this->m_logTextOut_OutputPort[0].invoke(
1960 if (this->m_timeCaller_OutputPort[0].isConnected()) {
1961 this->m_timeCaller_OutputPort[0].
invoke(_logTime);
1969 if (this->m_logOut_OutputPort[0].isConnected()) {
1973 #if FW_AMPCS_COMPATIBLE 1978 static_cast<FwAssertArgType>(_status)
1982 #if FW_AMPCS_COMPATIBLE 1989 static_cast<FwAssertArgType>(_status)
1995 static_cast<FwAssertArgType>(_status)
2001 static_cast<FwAssertArgType>(_status)
2004 this->m_logOut_OutputPort[0].
invoke(
2013 #if FW_ENABLE_TEXT_LOGGING 2014 if (this->m_logTextOut_OutputPort[0].isConnected()) {
2015 #if FW_OBJECT_NAMES == 1 2016 const char* _formatString =
2017 "(%s) %s: Finished reading %" PRIu64
" bytes from %s";
2019 const char* _formatString =
2020 "%s: Finished reading %" PRIu64
" bytes from %s";
2027 this->m_objName.toChar(),
2034 this->m_logTextOut_OutputPort[0].invoke(
2053 if (this->m_timeCaller_OutputPort[0].isConnected()) {
2054 this->m_timeCaller_OutputPort[0].
invoke(_logTime);
2062 if (this->m_logOut_OutputPort[0].isConnected()) {
2066 #if FW_AMPCS_COMPATIBLE 2071 static_cast<FwAssertArgType>(_status)
2075 #if FW_AMPCS_COMPATIBLE 2082 static_cast<FwAssertArgType>(_status)
2088 static_cast<FwAssertArgType>(_status)
2091 #if FW_AMPCS_COMPATIBLE 2098 static_cast<FwAssertArgType>(_status)
2104 static_cast<FwAssertArgType>(_status)
2110 static_cast<FwAssertArgType>(_status)
2113 this->m_logOut_OutputPort[0].
invoke(
2122 #if FW_ENABLE_TEXT_LOGGING 2123 if (this->m_logTextOut_OutputPort[0].isConnected()) {
2124 #if FW_OBJECT_NAMES == 1 2125 const char* _formatString =
2126 "(%s) %s: Failed after %" PRIu64
" of %" PRIu64
" bytes read to %s";
2128 const char* _formatString =
2129 "%s: Failed after %" PRIu64
" of %" PRIu64
" bytes read to %s";
2136 this->m_objName.toChar(),
2144 this->m_logTextOut_OutputPort[0].invoke(
2163 if (this->m_timeCaller_OutputPort[0].isConnected()) {
2164 this->m_timeCaller_OutputPort[0].
invoke(_logTime);
2172 if (this->m_logOut_OutputPort[0].isConnected()) {
2176 #if FW_AMPCS_COMPATIBLE 2181 static_cast<FwAssertArgType>(_status)
2185 #if FW_AMPCS_COMPATIBLE 2192 static_cast<FwAssertArgType>(_status)
2198 static_cast<FwAssertArgType>(_status)
2201 #if FW_AMPCS_COMPATIBLE 2208 static_cast<FwAssertArgType>(_status)
2214 static_cast<FwAssertArgType>(_status)
2220 static_cast<FwAssertArgType>(_status)
2223 this->m_logOut_OutputPort[0].
invoke(
2232 #if FW_ENABLE_TEXT_LOGGING 2233 if (this->m_logTextOut_OutputPort[0].isConnected()) {
2234 #if FW_OBJECT_NAMES == 1 2235 const char* _formatString =
2236 "(%s) %s: Aborted after %" PRIu64
" of %" PRIu64
" bytes read to %s";
2238 const char* _formatString =
2239 "%s: Aborted after %" PRIu64
" of %" PRIu64
" bytes read to %s";
2246 this->m_objName.toChar(),
2254 this->m_logTextOut_OutputPort[0].invoke(
2274 if (this->m_timeCaller_OutputPort[0].isConnected()) {
2275 this->m_timeCaller_OutputPort[0].
invoke(_logTime);
2283 if (this->m_logOut_OutputPort[0].isConnected()) {
2287 #if FW_AMPCS_COMPATIBLE 2292 static_cast<FwAssertArgType>(_status)
2296 #if FW_AMPCS_COMPATIBLE 2303 static_cast<FwAssertArgType>(_status)
2309 static_cast<FwAssertArgType>(_status)
2312 #if FW_AMPCS_COMPATIBLE 2319 static_cast<FwAssertArgType>(_status)
2325 static_cast<FwAssertArgType>(_status)
2331 static_cast<FwAssertArgType>(_status)
2334 #if FW_AMPCS_COMPATIBLE 2337 static_cast<U8>(
sizeof(
U64))
2341 static_cast<FwAssertArgType>(_status)
2347 static_cast<FwAssertArgType>(_status)
2350 this->m_logOut_OutputPort[0].
invoke(
2359 #if FW_ENABLE_TEXT_LOGGING 2360 if (this->m_logTextOut_OutputPort[0].isConnected()) {
2361 #if FW_OBJECT_NAMES == 1 2362 const char* _formatString =
2363 "(%s) %s: Failed after %" PRIu64
" of %" PRIu64
" bytes read to %s after exceeding timeout of %" PRIu64
" microseconds";
2365 const char* _formatString =
2366 "%s: Failed after %" PRIu64
" of %" PRIu64
" bytes read to %s after exceeding timeout of %" PRIu64
" microseconds";
2373 this->m_objName.toChar(),
2382 this->m_logTextOut_OutputPort[0].invoke(
2400 if (this->m_timeCaller_OutputPort[0].isConnected()) {
2401 this->m_timeCaller_OutputPort[0].
invoke(_logTime);
2409 if (this->m_logOut_OutputPort[0].isConnected()) {
2413 #if FW_AMPCS_COMPATIBLE 2418 static_cast<FwAssertArgType>(_status)
2422 #if FW_AMPCS_COMPATIBLE 2429 static_cast<FwAssertArgType>(_status)
2435 static_cast<FwAssertArgType>(_status)
2441 static_cast<FwAssertArgType>(_status)
2444 this->m_logOut_OutputPort[0].
invoke(
2453 #if FW_ENABLE_TEXT_LOGGING 2454 if (this->m_logTextOut_OutputPort[0].isConnected()) {
2455 #if FW_OBJECT_NAMES == 1 2456 const char* _formatString =
2457 "(%s) %s: Beginning write of size %" PRIu64
" to %s";
2459 const char* _formatString =
2460 "%s: Beginning write of size %" PRIu64
" to %s";
2467 this->m_objName.toChar(),
2474 this->m_logTextOut_OutputPort[0].invoke(
2492 if (this->m_timeCaller_OutputPort[0].isConnected()) {
2493 this->m_timeCaller_OutputPort[0].
invoke(_logTime);
2501 if (this->m_logOut_OutputPort[0].isConnected()) {
2505 #if FW_AMPCS_COMPATIBLE 2510 static_cast<FwAssertArgType>(_status)
2514 #if FW_AMPCS_COMPATIBLE 2521 static_cast<FwAssertArgType>(_status)
2527 static_cast<FwAssertArgType>(_status)
2533 static_cast<FwAssertArgType>(_status)
2536 this->m_logOut_OutputPort[0].
invoke(
2545 #if FW_ENABLE_TEXT_LOGGING 2546 if (this->m_logTextOut_OutputPort[0].isConnected()) {
2547 #if FW_OBJECT_NAMES == 1 2548 const char* _formatString =
2549 "(%s) %s: Completed write of size %" PRIu64
" to %s";
2551 const char* _formatString =
2552 "%s: Completed write of size %" PRIu64
" to %s";
2559 this->m_objName.toChar(),
2566 this->m_logTextOut_OutputPort[0].invoke(
2586 if (this->m_timeCaller_OutputPort[0].isConnected()) {
2587 this->m_timeCaller_OutputPort[0].
invoke(_logTime);
2602 this->m_WriteFileErrorThrottle = 0;
2610 if (this->m_WriteFileErrorThrottle == 0) {
2612 this->m_WriteFileErrorThrottleTime = _logTime;
2616 this->m_WriteFileErrorThrottle++;
2620 if (this->m_logOut_OutputPort[0].isConnected()) {
2624 #if FW_AMPCS_COMPATIBLE 2629 static_cast<FwAssertArgType>(_status)
2633 #if FW_AMPCS_COMPATIBLE 2640 static_cast<FwAssertArgType>(_status)
2646 static_cast<FwAssertArgType>(_status)
2649 #if FW_AMPCS_COMPATIBLE 2656 static_cast<FwAssertArgType>(_status)
2662 static_cast<FwAssertArgType>(_status)
2668 static_cast<FwAssertArgType>(_status)
2671 #if FW_AMPCS_COMPATIBLE 2674 static_cast<U8>(
sizeof(I32))
2678 static_cast<FwAssertArgType>(_status)
2684 static_cast<FwAssertArgType>(_status)
2687 this->m_logOut_OutputPort[0].
invoke(
2696 #if FW_ENABLE_TEXT_LOGGING 2697 if (this->m_logTextOut_OutputPort[0].isConnected()) {
2698 #if FW_OBJECT_NAMES == 1 2699 const char* _formatString =
2700 "(%s) %s: Failed after %" PRIu64
" of %" PRIu64
" bytes written to %s with write status %" PRIi32
"";
2702 const char* _formatString =
2703 "%s: Failed after %" PRIu64
" of %" PRIu64
" bytes written to %s with write status %" PRIi32
"";
2710 this->m_objName.toChar(),
2719 this->m_logTextOut_OutputPort[0].invoke(
2737 if (this->m_timeCaller_OutputPort[0].isConnected()) {
2738 this->m_timeCaller_OutputPort[0].
invoke(_logTime);
2753 this->m_WriteValidationOpenErrorThrottle = 0;
2761 if (this->m_WriteValidationOpenErrorThrottle == 0) {
2763 this->m_WriteValidationOpenErrorThrottleTime = _logTime;
2767 this->m_WriteValidationOpenErrorThrottle++;
2771 if (this->m_logOut_OutputPort[0].isConnected()) {
2775 #if FW_AMPCS_COMPATIBLE 2780 static_cast<FwAssertArgType>(_status)
2787 static_cast<FwAssertArgType>(_status)
2790 #if FW_AMPCS_COMPATIBLE 2793 static_cast<U8>(
sizeof(I32))
2797 static_cast<FwAssertArgType>(_status)
2803 static_cast<FwAssertArgType>(_status)
2806 this->m_logOut_OutputPort[0].
invoke(
2815 #if FW_ENABLE_TEXT_LOGGING 2816 if (this->m_logTextOut_OutputPort[0].isConnected()) {
2817 #if FW_OBJECT_NAMES == 1 2818 const char* _formatString =
2819 "(%s) %s: Failed to open validation file %s with status %" PRIi32
"";
2821 const char* _formatString =
2822 "%s: Failed to open validation file %s with status %" PRIi32
"";
2829 this->m_objName.toChar(),
2831 "WriteValidationOpenError ",
2836 this->m_logTextOut_OutputPort[0].invoke(
2854 if (this->m_timeCaller_OutputPort[0].isConnected()) {
2855 this->m_timeCaller_OutputPort[0].
invoke(_logTime);
2870 this->m_WriteValidationReadErrorThrottle = 0;
2878 if (this->m_WriteValidationReadErrorThrottle == 0) {
2880 this->m_WriteValidationReadErrorThrottleTime = _logTime;
2884 this->m_WriteValidationReadErrorThrottle++;
2888 if (this->m_logOut_OutputPort[0].isConnected()) {
2892 #if FW_AMPCS_COMPATIBLE 2897 static_cast<FwAssertArgType>(_status)
2904 static_cast<FwAssertArgType>(_status)
2907 #if FW_AMPCS_COMPATIBLE 2910 static_cast<U8>(
sizeof(I32))
2914 static_cast<FwAssertArgType>(_status)
2920 static_cast<FwAssertArgType>(_status)
2923 this->m_logOut_OutputPort[0].
invoke(
2932 #if FW_ENABLE_TEXT_LOGGING 2933 if (this->m_logTextOut_OutputPort[0].isConnected()) {
2934 #if FW_OBJECT_NAMES == 1 2935 const char* _formatString =
2936 "(%s) %s: Failed to read validation file %s with status %" PRIi32
"";
2938 const char* _formatString =
2939 "%s: Failed to read validation file %s with status %" PRIi32
"";
2946 this->m_objName.toChar(),
2948 "WriteValidationReadError ",
2953 this->m_logTextOut_OutputPort[0].invoke(
2972 if (this->m_timeCaller_OutputPort[0].isConnected()) {
2973 this->m_timeCaller_OutputPort[0].
invoke(_logTime);
2981 if (this->m_logOut_OutputPort[0].isConnected()) {
2985 #if FW_AMPCS_COMPATIBLE 2990 static_cast<FwAssertArgType>(_status)
2997 static_cast<FwAssertArgType>(_status)
3000 #if FW_AMPCS_COMPATIBLE 3007 static_cast<FwAssertArgType>(_status)
3013 static_cast<FwAssertArgType>(_status)
3016 #if FW_AMPCS_COMPATIBLE 3023 static_cast<FwAssertArgType>(_status)
3029 static_cast<FwAssertArgType>(_status)
3032 this->m_logOut_OutputPort[0].
invoke(
3041 #if FW_ENABLE_TEXT_LOGGING 3042 if (this->m_logTextOut_OutputPort[0].isConnected()) {
3043 #if FW_OBJECT_NAMES == 1 3044 const char* _formatString =
3045 "(%s) %s: Failed to create hash file %s. Wrote %" PRIu64
" bytes when expected to write %" PRIu64
" bytes to hash file";
3047 const char* _formatString =
3048 "%s: Failed to create hash file %s. Wrote %" PRIu64
" bytes when expected to write %" PRIu64
" bytes to hash file";
3055 this->m_objName.toChar(),
3057 "WriteValidationError ",
3063 this->m_logTextOut_OutputPort[0].invoke(
3083 if (this->m_timeCaller_OutputPort[0].isConnected()) {
3084 this->m_timeCaller_OutputPort[0].
invoke(_logTime);
3092 if (this->m_logOut_OutputPort[0].isConnected()) {
3096 #if FW_AMPCS_COMPATIBLE 3101 static_cast<FwAssertArgType>(_status)
3105 #if FW_AMPCS_COMPATIBLE 3112 static_cast<FwAssertArgType>(_status)
3118 static_cast<FwAssertArgType>(_status)
3121 #if FW_AMPCS_COMPATIBLE 3128 static_cast<FwAssertArgType>(_status)
3134 static_cast<FwAssertArgType>(_status)
3140 static_cast<FwAssertArgType>(_status)
3143 #if FW_AMPCS_COMPATIBLE 3146 static_cast<U8>(
sizeof(
U64))
3150 static_cast<FwAssertArgType>(_status)
3156 static_cast<FwAssertArgType>(_status)
3159 this->m_logOut_OutputPort[0].
invoke(
3168 #if FW_ENABLE_TEXT_LOGGING 3169 if (this->m_logTextOut_OutputPort[0].isConnected()) {
3170 #if FW_OBJECT_NAMES == 1 3171 const char* _formatString =
3172 "(%s) %s: Failed after %" PRIu64
" of %" PRIu64
" bytes written to %s after exceeding timeout of %" PRIu64
" microseconds";
3174 const char* _formatString =
3175 "%s: Failed after %" PRIu64
" of %" PRIu64
" bytes written to %s after exceeding timeout of %" PRIu64
" microseconds";
3182 this->m_objName.toChar(),
3191 this->m_logTextOut_OutputPort[0].invoke(
3210 if (this->m_timeCaller_OutputPort[0].isConnected()) {
3211 this->m_timeCaller_OutputPort[0].
invoke(_logTime);
3219 if (this->m_logOut_OutputPort[0].isConnected()) {
3223 #if FW_AMPCS_COMPATIBLE 3228 static_cast<FwAssertArgType>(_status)
3232 #if FW_AMPCS_COMPATIBLE 3239 static_cast<FwAssertArgType>(_status)
3245 static_cast<FwAssertArgType>(_status)
3248 #if FW_AMPCS_COMPATIBLE 3255 static_cast<FwAssertArgType>(_status)
3261 static_cast<FwAssertArgType>(_status)
3267 static_cast<FwAssertArgType>(_status)
3270 this->m_logOut_OutputPort[0].
invoke(
3279 #if FW_ENABLE_TEXT_LOGGING 3280 if (this->m_logTextOut_OutputPort[0].isConnected()) {
3281 #if FW_OBJECT_NAMES == 1 3282 const char* _formatString =
3283 "(%s) %s: Aborted after %" PRIu64
" of %" PRIu64
" bytes written to %s";
3285 const char* _formatString =
3286 "%s: Aborted after %" PRIu64
" of %" PRIu64
" bytes written to %s";
3293 this->m_objName.toChar(),
3301 this->m_logTextOut_OutputPort[0].invoke(
3322 this->m_NotInIdleThrottle = 0;
3325 this->m_NotInIdleThrottleTime =
Fw::Time(0, 0);
3336 this->m_CrcFailedThrottle = 0;
3339 this->m_CrcFailedThrottleTime =
Fw::Time(0, 0);
3350 this->m_ReadFailedFileSizeThrottle = 0;
3353 this->m_ReadFailedFileSizeThrottleTime =
Fw::Time(0, 0);
3364 this->m_OpenFileErrorThrottle = 0;
3367 this->m_OpenFileErrorThrottleTime =
Fw::Time(0, 0);
3378 this->m_WriteFileErrorThrottle = 0;
3381 this->m_WriteFileErrorThrottleTime =
Fw::Time(0, 0);
3392 this->m_WriteValidationOpenErrorThrottle = 0;
3395 this->m_WriteValidationOpenErrorThrottleTime =
Fw::Time(0, 0);
3406 this->m_WriteValidationReadErrorThrottle = 0;
3409 this->m_WriteValidationReadErrorThrottleTime =
Fw::Time(0, 0);
3420 if (this->m_timeCaller_OutputPort[0].isConnected()) {
3422 this->m_timeCaller_OutputPort[0].
invoke(_time);
3440 this->m_guardedPortMutex.
lock();
3446 this->m_guardedPortMutex.
unLock();
3456 ComponentIpcSerializableBuffer _msg;
3466 static_cast<FwAssertArgType>(_msgStatus)
3476 static_cast<FwAssertArgType>(_deserStatus)
3479 MsgTypeEnum _msgType =
static_cast<MsgTypeEnum
>(_desMsg);
3481 if (_msgType == FILEWORKER_COMPONENT_EXIT) {
3486 _deserStatus = _msg.deserializeTo(portNum);
3489 static_cast<FwAssertArgType>(_deserStatus)
3494 case READIN_FILEREAD: {
3498 _deserStatus = _msg.deserializeTo(path);
3501 static_cast<FwAssertArgType>(_deserStatus)
3506 _deserStatus = _msg.deserializeTo(buffer);
3509 static_cast<FwAssertArgType>(_deserStatus)
3522 case VERIFYIN_VERIFYSTATUS: {
3526 _deserStatus = _msg.deserializeTo(path);
3529 static_cast<FwAssertArgType>(_deserStatus)
3534 _deserStatus = _msg.deserializeTo(crc);
3537 static_cast<FwAssertArgType>(_deserStatus)
3550 case WRITEIN_FILEWRITE: {
3554 _deserStatus = _msg.deserializeTo(path);
3557 static_cast<FwAssertArgType>(_deserStatus)
3562 _deserStatus = _msg.deserializeTo(buffer);
3565 static_cast<FwAssertArgType>(_deserStatus)
3570 _deserStatus = _msg.deserializeTo(offsetBytes);
3573 static_cast<FwAssertArgType>(_deserStatus)
3578 _deserStatus = _msg.deserializeTo(append);
3581 static_cast<FwAssertArgType>(_deserStatus)
3606 void FileWorkerComponentBase ::
3617 const U32 idBase = callComp->
getIdBase();
3618 FW_ASSERT(opCode >= idBase, static_cast<FwAssertArgType>(opCode), static_cast<FwAssertArgType>(idBase));
3625 void FileWorkerComponentBase ::
3633 compPtr->cancelIn_handlerBase(portNum);
3636 void FileWorkerComponentBase ::
3646 compPtr->readIn_handlerBase(
3653 void FileWorkerComponentBase ::
3663 compPtr->verifyIn_handlerBase(
3670 void FileWorkerComponentBase ::
3682 compPtr->writeIn_handlerBase(
Reading to file was too slow.
void verifyDoneOut_out(FwIndexType portNum, U32 status, FwSizeType sizeBytes)
Invoke output port verifyDoneOut.
Serialization/Deserialization operation was successful.
void addCallPort(InputTimePort *callPort)
Register an input port.
static constexpr FwIndexType getNum_verifyIn_InputPorts()
void log_WARNING_HI_ReadFailedFileSize(U32 fsStat)
void set_cmdRegOut_OutputPort(FwIndexType portNum, Fw::InputCmdRegPort *port)
Connect port to cmdRegOut[portNum].
FwIdType FwOpcodeType
The type of a command opcode.
void readIn_handlerBase(FwIndexType portNum, const Fw::StringBase &path, Fw::Buffer &buffer)
Handler base-class function for input port readIn.
SerializeStatus serializeFrom(U8 val, Endianness mode=Endianness::BIG) override
Serialize an 8-bit unsigned integer value.
virtual void cancelIn_handler(FwIndexType portNum)=0
Handler for input port cancelIn.
FwIdType getIdBase() const
PlatformSizeType FwSizeType
virtual ~FileWorkerComponentBase()
Destroy FileWorkerComponentBase object.
Status receive(U8 *destination, FwSizeType capacity, BlockingType blockType, FwSizeType &actualSize, FwQueuePriorityType &priority) override
receive a message from the queue through delegate
Throttle reset count for CrcFailed.
Error encountered while creating validation file.
Error encountered while reading validation file.
Status
status returned from the queue send function
void verifyIn_handlerBase(FwIndexType portNum, const Fw::StringBase &path, U32 crc)
Handler base-class function for input port verifyIn.
Writing to file was too slow.
Received a buffer and initiating write operation.
void log_WARNING_HI_WriteValidationReadError_ThrottleClear()
Reset throttle value for WriteValidationReadError.
static constexpr FwIndexType getNum_logOut_OutputPorts()
Svc::InputFileReadPort * get_readIn_InputPort(FwIndexType portNum)
Completed the write operation and will return buffer.
void set_logOut_OutputPort(FwIndexType portNum, Fw::InputLogPort *port)
Connect port to logOut[portNum].
void set_readDoneOut_OutputPort(FwIndexType portNum, Svc::InputSignalDonePort *port)
Connect port to readDoneOut[portNum].
void log_WARNING_HI_WriteValidationOpenError(const Fw::StringBase &hashFileName, I32 status)
bool isConnected_timeCaller_OutputPort(FwIndexType portNum)
void unLock()
unlock the mutex and assert success
void addCallPort(InputPrmSetPort *callPort)
Register an input port.
void log_WARNING_HI_WriteTimeout(FwSizeType bytesWritten, FwSizeType writeSize, const Fw::StringBase &fileName, U64 timeout) const
virtual const CHAR * toChar() const =0
Convert to a C-style char*.
Inform we are reading from file.
Throttle reset count for WriteFileError.
void log_WARNING_LO_ReadAborted(FwSizeType bytesRead, FwSizeType readSize, const Fw::StringBase &fileName) const
bool isConnected_writeDoneOut_OutputPort(FwIndexType portNum)
void set_prmSetOut_OutputPort(FwIndexType portNum, Fw::InputPrmSetPort *port)
Connect port to prmSetOut[portNum].
bool isConnected_tlmOut_OutputPort(FwIndexType portNum)
bool isConnected_cmdRegOut_OutputPort(FwIndexType portNum)
Getting file size failed.
bool isConnected_verifyDoneOut_OutputPort(FwIndexType portNum)
void init()
Initialization function.
bool isConnected_logOut_OutputPort(FwIndexType portNum)
No time base has been established (Required)
void addCallPort(InputCmdRegPort *callPort)
Register an input port.
void log_ACTIVITY_LO_WriteBegin(FwSizeType writeSize, const Fw::StringBase &fileName) const
Inform we are done reading from file.
static constexpr FwIndexType getNum_cmdRegOut_OutputPorts()
void init()
Initialization function.
static constexpr FwIndexType getNum_readDoneOut_OutputPorts()
Completed the write operation and will return buffer.
Os::Queue m_queue
queue object for active component
Notify we are not in IDLE state.
void addCallPort(InputTlmPort *callPort)
Register an input port.
void addCallPort(InputPrmGetPort *callPort)
Register an input port.
void set_cmdResponseOut_OutputPort(FwIndexType portNum, Fw::InputCmdResponsePort *port)
Connect port to cmdResponseOut[portNum].
void init()
Object initializer.
bool isConnected_prmGetOut_OutputPort(FwIndexType portNum)
Error encountered reading to file.
SerializeStatus
forward declaration for string
Message will block until space is available.
virtual void unLock()
Unlock the guarded mutex.
void log_ACTIVITY_LO_ReadCompleted(FwSizeType fileSize, const Fw::StringBase &fileName) const
Completed the read operation and will return buffer.
FwIdType FwEventIdType
The type of an event identifier.
Getting file open failed.
Svc::InputFileWritePort * get_writeIn_InputPort(FwIndexType portNum)
static constexpr FwIndexType getNum_verifyDoneOut_OutputPorts()
#define FW_OBJECT_NAMES
Indicates whether or not object names are stored (more memory, can be used for tracking objects) ...
bool isConnected_cmdResponseOut_OutputPort(FwIndexType portNum)
void init()
Initialization function.
static constexpr FwIndexType getNum_cmdResponseOut_OutputPorts()
Less important informational events.
Os::Queue::Status createQueue(FwSizeType depth, FwSizeType msgSize)
#define FW_MIN(a, b)
MIN macro (deprecated in C++, use std::min)
A less serious but recoverable event.
virtual void writeIn_handler(FwIndexType portNum, const Fw::StringBase &path, Fw::Buffer &buffer, FwSizeType offsetBytes, bool append)=0
Handler for input port writeIn.
void log_WARNING_HI_OpenFileError(const Fw::StringBase &fileName, U32 fsStat)
static constexpr FwIndexType getNum_prmSetOut_OutputPorts()
void invoke(Fw::Time &time) const
Invoke a port interface.
void readDoneOut_out(FwIndexType portNum, U32 status, FwSizeType sizeBytes)
Invoke output port readDoneOut.
static constexpr FwIndexType getNum_readIn_InputPorts()
static constexpr FwIndexType getNum_writeDoneOut_OutputPorts()
void log_ACTIVITY_LO_WriteCompleted(FwSizeType writeSize, const Fw::StringBase &fileName) const
Fw::InputCmdPort * get_cmdIn_InputPort(FwIndexType portNum)
const char * toChar() const
Convert to a C-style char*.
bool isConnected_prmSetOut_OutputPort(FwIndexType portNum)
Status send(const U8 *buffer, FwSizeType size, FwQueuePriorityType priority, BlockingType blockType) override
send a message into the queue through delegate
virtual void verifyIn_handler(FwIndexType portNum, const Fw::StringBase &path, U32 crc)=0
Handler for input port verifyIn.
void log_WARNING_HI_CrcFailed_ThrottleClear()
Reset throttle value for CrcFailed.
static constexpr FwIndexType getNum_prmGetOut_OutputPorts()
void writeDoneOut_out(FwIndexType portNum, U32 status, FwSizeType sizeBytes)
Invoke output port writeDoneOut.
A string backed by an external buffer.
A serious but recoverable event.
Svc::InputCancelStatusPort * get_cancelIn_InputPort(FwIndexType portNum)
Errors dispatching messages.
Throttle reset count for ReadFailedFileSize.
void set_writeDoneOut_OutputPort(FwIndexType portNum, Svc::InputSignalDonePort *port)
Connect port to writeDoneOut[portNum].
virtual void readIn_handler(FwIndexType portNum, const Fw::StringBase &path, Fw::Buffer &buffer)=0
Handler for input port readIn.
Throttle reset count for WriteValidationReadError.
FormatStatus format(const CHAR *formatString,...)
write formatted string to buffer
void init()
Initialization function.
void log_WARNING_HI_WriteFileError(FwSizeType bytesWritten, FwSizeType writeSize, const Fw::StringBase &fileName, I32 status)
virtual void readIn_preMsgHook(FwIndexType portNum, const Fw::StringBase &path, Fw::Buffer &buffer)
Pre-message hook for async input port readIn.
static constexpr FwIndexType getNum_timeCaller_OutputPorts()
uint8_t U8
8-bit unsigned integer
void log_WARNING_HI_NotInIdle(U32 currState)
void log_WARNING_LO_WriteAborted(FwSizeType bytesWritten, FwSizeType writeSize, const Fw::StringBase &fileName) const
void log_ACTIVITY_LO_ReadBegin(FwSizeType fileSize, const Fw::StringBase &fileName) const
void cancelIn_handlerBase(FwIndexType portNum)
Handler base-class function for input port cancelIn.
void addCallPort(InputSignalDonePort *callPort)
Register an input port.
void log_WARNING_HI_WriteFileError_ThrottleClear()
Reset throttle value for WriteFileError.
bool isConnected_readDoneOut_OutputPort(FwIndexType portNum)
void init()
Initialization function.
void set_tlmOut_OutputPort(FwIndexType portNum, Fw::InputTlmPort *port)
Connect port to tlmOut[portNum].
PlatformQueuePriorityType FwQueuePriorityType
The type of queue priorities used.
virtual void lock()
Lock the guarded mutex.
void set_timeCaller_OutputPort(FwIndexType portNum, Fw::InputTimePort *port)
Connect port to timeCaller[portNum].
void log_WARNING_HI_NotInIdle_ThrottleClear()
Reset throttle value for NotInIdle.
void log_WARNING_HI_WriteValidationReadError(const Fw::StringBase &hashFileName, I32 status)
void invoke(FwEventIdType id, Fw::Time &timeTag, const Fw::LogSeverity &severity, Fw::LogBuffer &args) const
Invoke a port interface.
static constexpr FwIndexType getNum_cancelIn_InputPorts()
A message was sent requesting an exit of the loop.
void log_WARNING_HI_CrcFailed(U32 crcStat)
PlatformIndexType FwIndexType
static constexpr FwIndexType getNum_tlmOut_OutputPorts()
locks a mutex within the current scope
Error encountered while opening validation file.
void log_WARNING_LO_CrcVerificationError(U32 crcExp, U32 crcCalculated) const
void log_WARNING_HI_WriteValidationOpenError_ThrottleClear()
Reset throttle value for WriteValidationOpenError.
void set_prmGetOut_OutputPort(FwIndexType portNum, Fw::InputPrmGetPort *port)
Connect port to prmGetOut[portNum].
Throttle reset count for OpenFileError.
void addCallPort(InputLogPort *callPort)
Register an input port.
void init()
Initialization function.
static constexpr FwIndexType getNum_cmdIn_InputPorts()
RateGroupDivider component implementation.
Throttle reset count for NotInIdle.
message sent/received okay
Svc::InputVerifyStatusPort * get_verifyIn_InputPort(FwIndexType portNum)
void invoke(U32 status, FwSizeType sizeBytes) const
Invoke a port interface.
void log_WARNING_LO_WriteValidationError(const Fw::StringBase &hashFileName, FwSizeType bytesWritten, FwSizeType hashSize) const
void writeIn_handlerBase(FwIndexType portNum, const Fw::StringBase &path, Fw::Buffer &buffer, FwSizeType offsetBytes, bool append)
Handler base-class function for input port writeIn.
Message will return with status when space is unavailable.
static constexpr FwIndexType getNum_writeIn_InputPorts()
Implementation of malloc based allocator.
virtual void writeIn_preMsgHook(FwIndexType portNum, const Fw::StringBase &path, Fw::Buffer &buffer, FwSizeType offsetBytes, bool append)
Pre-message hook for async input port writeIn.
void set_verifyDoneOut_OutputPort(FwIndexType portNum, Svc::InputSignalDonePort *port)
Connect port to verifyDoneOut[portNum].
Throttle reset count for WriteValidationOpenError.
static constexpr SizeType BUFFER_SIZE(SizeType maxLength)
Get the size of a null-terminated string buffer.
void init()
Initialization function.
void init()
Initialization function.
FileWorkerComponentBase(const char *compName="")
Construct FileWorkerComponentBase object.
virtual void verifyIn_preMsgHook(FwIndexType portNum, const Fw::StringBase &path, U32 crc)
Pre-message hook for async input port verifyIn.
message to exit active component task
void log_WARNING_HI_ReadError(FwSizeType bytesRead, FwSizeType readSize, const Fw::StringBase &fileName) const
void log_WARNING_HI_OpenFileError_ThrottleClear()
Reset throttle value for OpenFileError.
Error encountered writing to file.
void log_WARNING_HI_ReadTimeout(FwSizeType bytesRead, FwSizeType readSize, const Fw::StringBase &fileName, U64 timeout) const
void log_WARNING_HI_ReadFailedFileSize_ThrottleClear()
Reset throttle value for ReadFailedFileSize.
void addCallPort(InputCmdResponsePort *callPort)
Register an input port.
void lock()
lock the mutex and assert success
SerializeStatus serializeTo(SerialBufferBase &buffer, Endianness mode=Endianness::BIG) const override
Serialize the contents of this object to a buffer.