9 #if FW_ENABLE_TEXT_LOGGING 23 CMD_PRM_COMMIT_STAGED,
36 class ComponentIpcSerializableBuffer :
46 MAX_DATA_SIZE =
sizeof(BuffUnion),
48 SERIALIZATION_SIZE = DATA_OFFSET + MAX_DATA_SIZE
52 return sizeof(m_buff);
59 const U8* getBuffAddr()
const {
65 U8 m_buff[SERIALIZATION_SIZE];
89 this->m_CmdDisp_InputPort[port].
init();
94 this->m_CmdDisp_InputPort[port].
setPortNum(port);
96 #if FW_OBJECT_NAMES == 1 100 this->m_objName.toChar(),
103 this->m_CmdDisp_InputPort[port].setObjName(portName.
toChar());
113 this->m_getPrm_InputPort[port].
init();
118 this->m_getPrm_InputPort[port].
setPortNum(port);
120 #if FW_OBJECT_NAMES == 1 124 this->m_objName.toChar(),
127 this->m_getPrm_InputPort[port].setObjName(portName.
toChar());
137 this->m_pingIn_InputPort[port].
init();
142 this->m_pingIn_InputPort[port].
setPortNum(port);
144 #if FW_OBJECT_NAMES == 1 148 this->m_objName.toChar(),
151 this->m_pingIn_InputPort[port].setObjName(portName.
toChar());
161 this->m_setPrm_InputPort[port].
init();
166 this->m_setPrm_InputPort[port].
setPortNum(port);
168 #if FW_OBJECT_NAMES == 1 172 this->m_objName.toChar(),
175 this->m_setPrm_InputPort[port].setObjName(portName.
toChar());
185 this->m_CmdReg_OutputPort[port].
init();
187 #if FW_OBJECT_NAMES == 1 191 this->m_objName.toChar(),
194 this->m_CmdReg_OutputPort[port].setObjName(portName.
toChar());
204 this->m_CmdStatus_OutputPort[port].
init();
206 #if FW_OBJECT_NAMES == 1 210 this->m_objName.toChar(),
213 this->m_CmdStatus_OutputPort[port].setObjName(portName.
toChar());
223 this->m_Log_OutputPort[port].
init();
225 #if FW_OBJECT_NAMES == 1 229 this->m_objName.toChar(),
232 this->m_Log_OutputPort[port].setObjName(portName.
toChar());
236 #if FW_ENABLE_TEXT_LOGGING == 1 240 port < static_cast<FwIndexType>(this->getNum_LogText_OutputPorts());
243 this->m_LogText_OutputPort[port].
init();
245 #if FW_OBJECT_NAMES == 1 249 this->m_objName.toChar(),
252 this->m_LogText_OutputPort[port].setObjName(portName.
toChar());
263 this->m_Time_OutputPort[port].
init();
265 #if FW_OBJECT_NAMES == 1 269 this->m_objName.toChar(),
272 this->m_Time_OutputPort[port].setObjName(portName.
toChar());
282 this->m_pingOut_OutputPort[port].
init();
284 #if FW_OBJECT_NAMES == 1 288 this->m_objName.toChar(),
291 this->m_pingOut_OutputPort[port].setObjName(portName.
toChar());
298 static_cast<FwSizeType>(ComponentIpcSerializableBuffer::SERIALIZATION_SIZE)
302 static_cast<FwAssertArgType>(qStat)
315 static_cast<FwAssertArgType>(portNum)
318 return &this->m_CmdDisp_InputPort[portNum];
330 static_cast<FwAssertArgType>(portNum)
333 return &this->m_getPrm_InputPort[portNum];
341 static_cast<FwAssertArgType>(portNum)
344 return &this->m_pingIn_InputPort[portNum];
352 static_cast<FwAssertArgType>(portNum)
355 return &this->m_setPrm_InputPort[portNum];
370 static_cast<FwAssertArgType>(portNum)
373 this->m_CmdReg_OutputPort[portNum].
addCallPort(port);
384 static_cast<FwAssertArgType>(portNum)
387 this->m_CmdStatus_OutputPort[portNum].
addCallPort(port);
398 static_cast<FwAssertArgType>(portNum)
404 #if FW_ENABLE_TEXT_LOGGING == 1 406 void PrmDbComponentBase ::
407 set_LogText_OutputPort(
413 (0 <= portNum) && (portNum < this->getNum_LogText_OutputPorts()),
414 static_cast<FwAssertArgType>(portNum)
417 this->m_LogText_OutputPort[portNum].addCallPort(port);
430 static_cast<FwAssertArgType>(portNum)
433 this->m_Time_OutputPort[portNum].
addCallPort(port);
448 static_cast<FwAssertArgType>(portNum)
451 this->m_pingOut_OutputPort[portNum].
addCallPort(port);
454 #if FW_PORT_SERIALIZATION 463 Fw::InputSerializePort* port
468 static_cast<FwAssertArgType>(portNum)
471 this->m_CmdReg_OutputPort[portNum].registerSerialPort(port);
477 Fw::InputSerializePort* port
482 static_cast<FwAssertArgType>(portNum)
485 this->m_CmdStatus_OutputPort[portNum].registerSerialPort(port);
491 Fw::InputSerializePort* port
496 static_cast<FwAssertArgType>(portNum)
499 this->m_Log_OutputPort[portNum].registerSerialPort(port);
502 #if FW_ENABLE_TEXT_LOGGING == 1 504 void PrmDbComponentBase ::
505 set_LogText_OutputPort(
507 Fw::InputSerializePort* port
511 (0 <= portNum) && (portNum < this->getNum_LogText_OutputPorts()),
512 static_cast<FwAssertArgType>(portNum)
515 this->m_LogText_OutputPort[portNum].registerSerialPort(port);
523 Fw::InputSerializePort* port
528 static_cast<FwAssertArgType>(portNum)
531 this->m_Time_OutputPort[portNum].registerSerialPort(port);
536 #if FW_PORT_SERIALIZATION 545 Fw::InputSerializePort* port
550 static_cast<FwAssertArgType>(portNum)
553 this->m_pingOut_OutputPort[portNum].registerSerialPort(port);
565 FW_ASSERT(this->m_CmdReg_OutputPort[0].isConnected());
567 this->m_CmdReg_OutputPort[0].
invoke(
571 this->m_CmdReg_OutputPort[0].
invoke(
575 this->m_CmdReg_OutputPort[0].
invoke(
586 Fw::ActiveComponentBase(compName)
588 this->m_PrmIdNotFoundThrottle = 0;
606 static_cast<FwAssertArgType>(portNum)
609 return this->m_CmdReg_OutputPort[portNum].
isConnected();
617 static_cast<FwAssertArgType>(portNum)
620 return this->m_CmdStatus_OutputPort[portNum].
isConnected();
628 static_cast<FwAssertArgType>(portNum)
631 return this->m_Log_OutputPort[portNum].
isConnected();
634 #if FW_ENABLE_TEXT_LOGGING == 1 636 bool PrmDbComponentBase ::
637 isConnected_LogText_OutputPort(
FwIndexType portNum)
640 (0 <= portNum) && (portNum < this->getNum_LogText_OutputPorts()),
641 static_cast<FwAssertArgType>(portNum)
644 return this->m_LogText_OutputPort[portNum].isConnected();
654 static_cast<FwAssertArgType>(portNum)
657 return this->m_Time_OutputPort[portNum].
isConnected();
669 static_cast<FwAssertArgType>(portNum)
672 return this->m_pingOut_OutputPort[portNum].
isConnected();
691 static_cast<FwAssertArgType>(portNum)
721 static_cast<FwAssertArgType>(portNum)
729 ComponentIpcSerializableBuffer msg;
733 _status = msg.serializeFrom(
734 static_cast<FwEnumStoreType>(PINGIN_PING)
738 static_cast<FwAssertArgType>(_status)
742 _status = msg.serializeFrom(portNum);
745 static_cast<FwAssertArgType>(_status)
749 _status = msg.serializeFrom(key);
752 static_cast<FwAssertArgType>(_status)
761 static_cast<FwAssertArgType>(qStatus)
775 static_cast<FwAssertArgType>(portNum)
784 ComponentIpcSerializableBuffer msg;
788 _status = msg.serializeFrom(
789 static_cast<FwEnumStoreType>(SETPRM_PRMSET)
793 static_cast<FwAssertArgType>(_status)
797 _status = msg.serializeFrom(portNum);
800 static_cast<FwAssertArgType>(_status)
804 _status = msg.serializeFrom(
id);
807 static_cast<FwAssertArgType>(_status)
811 _status = msg.serializeFrom(val);
814 static_cast<FwAssertArgType>(_status)
823 static_cast<FwAssertArgType>(qStatus)
866 static_cast<FwAssertArgType>(portNum)
870 this->m_pingOut_OutputPort[portNum].isConnected(),
871 static_cast<FwAssertArgType>(portNum)
873 this->m_pingOut_OutputPort[portNum].
invoke(
889 FW_ASSERT(this->m_CmdStatus_OutputPort[0].isConnected());
890 this->m_CmdStatus_OutputPort[0].
invoke(opCode, cmdSeq, response);
911 ComponentIpcSerializableBuffer msg;
915 _status = msg.serializeFrom(static_cast<FwEnumStoreType>(CMD_PRM_SAVE_FILE));
918 static_cast<FwAssertArgType>(_status)
924 _status = msg.serializeFrom(port);
927 static_cast<FwAssertArgType>(_status)
930 _status = msg.serializeFrom(opCode);
933 static_cast<FwAssertArgType>(_status)
936 _status = msg.serializeFrom(cmdSeq);
939 static_cast<FwAssertArgType>(_status)
942 _status = msg.serializeFrom(args);
945 static_cast<FwAssertArgType>(_status)
954 static_cast<FwAssertArgType>(qStatus)
970 ComponentIpcSerializableBuffer msg;
974 _status = msg.serializeFrom(static_cast<FwEnumStoreType>(CMD_PRM_LOAD_FILE));
977 static_cast<FwAssertArgType>(_status)
983 _status = msg.serializeFrom(port);
986 static_cast<FwAssertArgType>(_status)
989 _status = msg.serializeFrom(opCode);
992 static_cast<FwAssertArgType>(_status)
995 _status = msg.serializeFrom(cmdSeq);
998 static_cast<FwAssertArgType>(_status)
1001 _status = msg.serializeFrom(args);
1004 static_cast<FwAssertArgType>(_status)
1013 static_cast<FwAssertArgType>(qStatus)
1029 ComponentIpcSerializableBuffer msg;
1033 _status = msg.serializeFrom(static_cast<FwEnumStoreType>(CMD_PRM_COMMIT_STAGED));
1036 static_cast<FwAssertArgType>(_status)
1042 _status = msg.serializeFrom(port);
1045 static_cast<FwAssertArgType>(_status)
1048 _status = msg.serializeFrom(opCode);
1051 static_cast<FwAssertArgType>(_status)
1054 _status = msg.serializeFrom(cmdSeq);
1057 static_cast<FwAssertArgType>(_status)
1060 _status = msg.serializeFrom(args);
1063 static_cast<FwAssertArgType>(_status)
1072 static_cast<FwAssertArgType>(qStatus)
1129 this->m_PrmIdNotFoundThrottle++;
1134 if (this->m_Time_OutputPort[0].isConnected()) {
1135 this->m_Time_OutputPort[0].
invoke(_logTime);
1143 if (this->m_Log_OutputPort[0].isConnected()) {
1147 #if FW_AMPCS_COMPATIBLE 1152 static_cast<FwAssertArgType>(_status)
1156 #if FW_AMPCS_COMPATIBLE 1163 static_cast<FwAssertArgType>(_status)
1169 static_cast<FwAssertArgType>(_status)
1172 this->m_Log_OutputPort[0].
invoke(
1181 #if FW_ENABLE_TEXT_LOGGING 1182 if (this->m_LogText_OutputPort[0].isConnected()) {
1183 #if FW_OBJECT_NAMES == 1 1184 const char* _formatString =
1185 "(%s) %s: Parameter ID 0x%" PRIx32
" not found";
1187 const char* _formatString =
1188 "%s: Parameter ID 0x%" PRIx32
" not found";
1195 this->m_objName.toChar(),
1201 this->m_LogText_OutputPort[0].invoke(
1216 if (this->m_Time_OutputPort[0].isConnected()) {
1217 this->m_Time_OutputPort[0].
invoke(_logTime);
1225 if (this->m_Log_OutputPort[0].isConnected()) {
1229 #if FW_AMPCS_COMPATIBLE 1234 static_cast<FwAssertArgType>(_status)
1238 #if FW_AMPCS_COMPATIBLE 1245 static_cast<FwAssertArgType>(_status)
1251 static_cast<FwAssertArgType>(_status)
1254 this->m_Log_OutputPort[0].
invoke(
1263 #if FW_ENABLE_TEXT_LOGGING 1264 if (this->m_LogText_OutputPort[0].isConnected()) {
1265 #if FW_OBJECT_NAMES == 1 1266 const char* _formatString =
1267 "(%s) %s: Parameter ID 0x%" PRIx32
" updated";
1269 const char* _formatString =
1270 "%s: Parameter ID 0x%" PRIx32
" updated";
1277 this->m_objName.toChar(),
1283 this->m_LogText_OutputPort[0].invoke(
1298 if (this->m_Time_OutputPort[0].isConnected()) {
1299 this->m_Time_OutputPort[0].
invoke(_logTime);
1307 if (this->m_Log_OutputPort[0].isConnected()) {
1311 #if FW_AMPCS_COMPATIBLE 1316 static_cast<FwAssertArgType>(_status)
1320 #if FW_AMPCS_COMPATIBLE 1327 static_cast<FwAssertArgType>(_status)
1333 static_cast<FwAssertArgType>(_status)
1336 this->m_Log_OutputPort[0].
invoke(
1345 #if FW_ENABLE_TEXT_LOGGING 1346 if (this->m_LogText_OutputPort[0].isConnected()) {
1347 #if FW_OBJECT_NAMES == 1 1348 const char* _formatString =
1349 "(%s) %s: Parameter DB full when adding ID 0x%" PRIx32
" ";
1351 const char* _formatString =
1352 "%s: Parameter DB full when adding ID 0x%" PRIx32
" ";
1359 this->m_objName.toChar(),
1365 this->m_LogText_OutputPort[0].invoke(
1380 if (this->m_Time_OutputPort[0].isConnected()) {
1381 this->m_Time_OutputPort[0].
invoke(_logTime);
1389 if (this->m_Log_OutputPort[0].isConnected()) {
1393 #if FW_AMPCS_COMPATIBLE 1398 static_cast<FwAssertArgType>(_status)
1402 #if FW_AMPCS_COMPATIBLE 1409 static_cast<FwAssertArgType>(_status)
1415 static_cast<FwAssertArgType>(_status)
1418 this->m_Log_OutputPort[0].
invoke(
1427 #if FW_ENABLE_TEXT_LOGGING 1428 if (this->m_LogText_OutputPort[0].isConnected()) {
1429 #if FW_OBJECT_NAMES == 1 1430 const char* _formatString =
1431 "(%s) %s: Parameter ID 0x%" PRIx32
" added";
1433 const char* _formatString =
1434 "%s: Parameter ID 0x%" PRIx32
" added";
1441 this->m_objName.toChar(),
1447 this->m_LogText_OutputPort[0].invoke(
1466 if (this->m_Time_OutputPort[0].isConnected()) {
1467 this->m_Time_OutputPort[0].
invoke(_logTime);
1475 if (this->m_Log_OutputPort[0].isConnected()) {
1479 #if FW_AMPCS_COMPATIBLE 1484 static_cast<FwAssertArgType>(_status)
1488 #if FW_AMPCS_COMPATIBLE 1495 static_cast<FwAssertArgType>(_status)
1501 static_cast<FwAssertArgType>(_status)
1504 #if FW_AMPCS_COMPATIBLE 1507 static_cast<U8>(
sizeof(I32))
1511 static_cast<FwAssertArgType>(_status)
1517 static_cast<FwAssertArgType>(_status)
1520 #if FW_AMPCS_COMPATIBLE 1523 static_cast<U8>(
sizeof(I32))
1527 static_cast<FwAssertArgType>(_status)
1533 static_cast<FwAssertArgType>(_status)
1536 this->m_Log_OutputPort[0].
invoke(
1545 #if FW_ENABLE_TEXT_LOGGING 1546 if (this->m_LogText_OutputPort[0].isConnected()) {
1547 #if FW_OBJECT_NAMES == 1 1548 const char* _formatString =
1549 "(%s) %s: Parameter write failed in stage %s with record %" PRIi32
" and error %" PRIi32
"";
1551 const char* _formatString =
1552 "%s: Parameter write failed in stage %s with record %" PRIi32
" and error %" PRIi32
"";
1556 stage.toString(stageStr);
1562 this->m_objName.toChar(),
1564 "PrmFileWriteError ",
1570 this->m_LogText_OutputPort[0].invoke(
1585 if (this->m_Time_OutputPort[0].isConnected()) {
1586 this->m_Time_OutputPort[0].
invoke(_logTime);
1594 if (this->m_Log_OutputPort[0].isConnected()) {
1598 #if FW_AMPCS_COMPATIBLE 1603 static_cast<FwAssertArgType>(_status)
1607 #if FW_AMPCS_COMPATIBLE 1610 static_cast<U8>(
sizeof(U32))
1614 static_cast<FwAssertArgType>(_status)
1620 static_cast<FwAssertArgType>(_status)
1623 this->m_Log_OutputPort[0].
invoke(
1632 #if FW_ENABLE_TEXT_LOGGING 1633 if (this->m_LogText_OutputPort[0].isConnected()) {
1634 #if FW_OBJECT_NAMES == 1 1635 const char* _formatString =
1636 "(%s) %s: Parameter file save completed. Wrote %" PRIu32
" records.";
1638 const char* _formatString =
1639 "%s: Parameter file save completed. Wrote %" PRIu32
" records.";
1646 this->m_objName.toChar(),
1648 "PrmFileSaveComplete ",
1652 this->m_LogText_OutputPort[0].invoke(
1671 if (this->m_Time_OutputPort[0].isConnected()) {
1672 this->m_Time_OutputPort[0].
invoke(_logTime);
1680 if (this->m_Log_OutputPort[0].isConnected()) {
1684 #if FW_AMPCS_COMPATIBLE 1689 static_cast<FwAssertArgType>(_status)
1693 #if FW_AMPCS_COMPATIBLE 1700 static_cast<FwAssertArgType>(_status)
1706 static_cast<FwAssertArgType>(_status)
1709 #if FW_AMPCS_COMPATIBLE 1712 static_cast<U8>(
sizeof(I32))
1716 static_cast<FwAssertArgType>(_status)
1722 static_cast<FwAssertArgType>(_status)
1725 #if FW_AMPCS_COMPATIBLE 1728 static_cast<U8>(
sizeof(I32))
1732 static_cast<FwAssertArgType>(_status)
1738 static_cast<FwAssertArgType>(_status)
1741 this->m_Log_OutputPort[0].
invoke(
1750 #if FW_ENABLE_TEXT_LOGGING 1751 if (this->m_LogText_OutputPort[0].isConnected()) {
1752 #if FW_OBJECT_NAMES == 1 1753 const char* _formatString =
1754 "(%s) %s: Parameter file read failed in stage %s with record %" PRIi32
" and error %" PRIi32
"";
1756 const char* _formatString =
1757 "%s: Parameter file read failed in stage %s with record %" PRIi32
" and error %" PRIi32
"";
1761 stage.toString(stageStr);
1767 this->m_objName.toChar(),
1769 "PrmFileReadError ",
1775 this->m_LogText_OutputPort[0].invoke(
1795 if (this->m_Time_OutputPort[0].isConnected()) {
1796 this->m_Time_OutputPort[0].
invoke(_logTime);
1804 if (this->m_Log_OutputPort[0].isConnected()) {
1808 #if FW_AMPCS_COMPATIBLE 1813 static_cast<FwAssertArgType>(_status)
1820 static_cast<FwAssertArgType>(_status)
1823 #if FW_AMPCS_COMPATIBLE 1826 static_cast<U8>(
sizeof(U32))
1830 static_cast<FwAssertArgType>(_status)
1836 static_cast<FwAssertArgType>(_status)
1839 #if FW_AMPCS_COMPATIBLE 1842 static_cast<U8>(
sizeof(U32))
1846 static_cast<FwAssertArgType>(_status)
1852 static_cast<FwAssertArgType>(_status)
1855 #if FW_AMPCS_COMPATIBLE 1858 static_cast<U8>(
sizeof(U32))
1862 static_cast<FwAssertArgType>(_status)
1868 static_cast<FwAssertArgType>(_status)
1871 this->m_Log_OutputPort[0].
invoke(
1880 #if FW_ENABLE_TEXT_LOGGING 1881 if (this->m_LogText_OutputPort[0].isConnected()) {
1882 #if FW_OBJECT_NAMES == 1 1883 const char* _formatString =
1884 "(%s) %s: Parameter file load completed. Database: %s, Records: %" PRIu32
" (%" PRIu32
" added and %" PRIu32
" updated).";
1886 const char* _formatString =
1887 "%s: Parameter file load completed. Database: %s, Records: %" PRIu32
" (%" PRIu32
" added and %" PRIu32
" updated).";
1894 this->m_objName.toChar(),
1896 "PrmFileLoadComplete ",
1903 this->m_LogText_OutputPort[0].invoke(
1918 if (this->m_Time_OutputPort[0].isConnected()) {
1919 this->m_Time_OutputPort[0].
invoke(_logTime);
1927 if (this->m_Log_OutputPort[0].isConnected()) {
1930 #if FW_AMPCS_COMPATIBLE 1936 static_cast<FwAssertArgType>(_status)
1940 this->m_Log_OutputPort[0].
invoke(
1949 #if FW_ENABLE_TEXT_LOGGING 1950 if (this->m_LogText_OutputPort[0].isConnected()) {
1951 #if FW_OBJECT_NAMES == 1 1952 const char* _formatString =
1953 "(%s) %s: Parameter DB commit complete, staged updates are now active.";
1955 const char* _formatString =
1956 "%s: Parameter DB commit complete, staged updates are now active.";
1963 this->m_objName.toChar(),
1965 "PrmDbCommitComplete " 1968 this->m_LogText_OutputPort[0].invoke(
1986 if (this->m_Time_OutputPort[0].isConnected()) {
1987 this->m_Time_OutputPort[0].
invoke(_logTime);
1995 if (this->m_Log_OutputPort[0].isConnected()) {
1999 #if FW_AMPCS_COMPATIBLE 2004 static_cast<FwAssertArgType>(_status)
2011 static_cast<FwAssertArgType>(_status)
2017 static_cast<FwAssertArgType>(_status)
2020 this->m_Log_OutputPort[0].
invoke(
2029 #if FW_ENABLE_TEXT_LOGGING 2030 if (this->m_LogText_OutputPort[0].isConnected()) {
2031 #if FW_OBJECT_NAMES == 1 2032 const char* _formatString =
2033 "(%s) %s: All parameters copied. Source database: %s, Destination database: %s.";
2035 const char* _formatString =
2036 "%s: All parameters copied. Source database: %s, Destination database: %s.";
2043 this->m_objName.toChar(),
2045 "PrmDbCopyAllComplete ",
2046 databaseStringSrc.
toChar(),
2047 databaseStringDest.
toChar()
2050 this->m_LogText_OutputPort[0].invoke(
2065 if (this->m_Time_OutputPort[0].isConnected()) {
2066 this->m_Time_OutputPort[0].
invoke(_logTime);
2074 if (this->m_Log_OutputPort[0].isConnected()) {
2077 #if FW_AMPCS_COMPATIBLE 2083 static_cast<FwAssertArgType>(_status)
2087 this->m_Log_OutputPort[0].
invoke(
2096 #if FW_ENABLE_TEXT_LOGGING 2097 if (this->m_LogText_OutputPort[0].isConnected()) {
2098 #if FW_OBJECT_NAMES == 1 2099 const char* _formatString =
2100 "(%s) %s: Parameter file load failed. Clearing staging database and abandoning parameter file load.";
2102 const char* _formatString =
2103 "%s: Parameter file load failed. Clearing staging database and abandoning parameter file load.";
2110 this->m_objName.toChar(),
2112 "PrmDbFileLoadFailed " 2115 this->m_LogText_OutputPort[0].invoke(
2133 if (this->m_Time_OutputPort[0].isConnected()) {
2134 this->m_Time_OutputPort[0].
invoke(_logTime);
2142 if (this->m_Log_OutputPort[0].isConnected()) {
2146 #if FW_AMPCS_COMPATIBLE 2151 static_cast<FwAssertArgType>(_status)
2155 #if FW_AMPCS_COMPATIBLE 2162 static_cast<FwAssertArgType>(_status)
2168 static_cast<FwAssertArgType>(_status)
2171 #if FW_AMPCS_COMPATIBLE 2178 static_cast<FwAssertArgType>(_status)
2184 static_cast<FwAssertArgType>(_status)
2187 this->m_Log_OutputPort[0].
invoke(
2196 #if FW_ENABLE_TEXT_LOGGING 2197 if (this->m_LogText_OutputPort[0].isConnected()) {
2198 #if FW_OBJECT_NAMES == 1 2199 const char* _formatString =
2200 "(%s) %s: Invalid action during parameter file load. Current state: %s, Action (Invalid for current state): %s.";
2202 const char* _formatString =
2203 "%s: Invalid action during parameter file load. Current state: %s, Action (Invalid for current state): %s.";
2207 currentState.toString(currentStateStr);
2209 attemptedAction.toString(attemptedActionStr);
2215 this->m_objName.toChar(),
2217 "PrmDbFileLoadInvalidAction ",
2218 currentStateStr.
toChar(),
2219 attemptedActionStr.
toChar()
2222 this->m_LogText_OutputPort[0].invoke(
2240 if (this->m_Time_OutputPort[0].isConnected()) {
2241 this->m_Time_OutputPort[0].
invoke(_logTime);
2249 if (this->m_Log_OutputPort[0].isConnected()) {
2253 #if FW_AMPCS_COMPATIBLE 2258 static_cast<FwAssertArgType>(_status)
2262 #if FW_AMPCS_COMPATIBLE 2265 static_cast<U8>(
sizeof(U32))
2269 static_cast<FwAssertArgType>(_status)
2275 static_cast<FwAssertArgType>(_status)
2278 #if FW_AMPCS_COMPATIBLE 2281 static_cast<U8>(
sizeof(U32))
2285 static_cast<FwAssertArgType>(_status)
2291 static_cast<FwAssertArgType>(_status)
2294 this->m_Log_OutputPort[0].
invoke(
2303 #if FW_ENABLE_TEXT_LOGGING 2304 if (this->m_LogText_OutputPort[0].isConnected()) {
2305 #if FW_OBJECT_NAMES == 1 2306 const char* _formatString =
2307 "(%s) %s: Parameter file failed CRC. Read: 0x%" PRIx32
" Computed: 0x%" PRIx32
"";
2309 const char* _formatString =
2310 "%s: Parameter file failed CRC. Read: 0x%" PRIx32
" Computed: 0x%" PRIx32
"";
2317 this->m_objName.toChar(),
2324 this->m_LogText_OutputPort[0].invoke(
2342 this->m_PrmIdNotFoundThrottle = 0;
2352 if (this->m_Time_OutputPort[0].isConnected()) {
2354 this->m_Time_OutputPort[0].
invoke(_time);
2372 this->m_guardedPortMutex.
lock();
2378 this->m_guardedPortMutex.
unLock();
2388 ComponentIpcSerializableBuffer _msg;
2398 static_cast<FwAssertArgType>(_msgStatus)
2408 static_cast<FwAssertArgType>(_deserStatus)
2411 MsgTypeEnum _msgType =
static_cast<MsgTypeEnum
>(_desMsg);
2413 if (_msgType == PRMDB_COMPONENT_EXIT) {
2418 _deserStatus = _msg.deserializeTo(portNum);
2421 static_cast<FwAssertArgType>(_deserStatus)
2429 _deserStatus = _msg.deserializeTo(key);
2432 static_cast<FwAssertArgType>(_deserStatus)
2444 case SETPRM_PRMSET: {
2447 _deserStatus = _msg.deserializeTo(
id);
2450 static_cast<FwAssertArgType>(_deserStatus)
2455 _deserStatus = _msg.deserializeTo(val);
2458 static_cast<FwAssertArgType>(_deserStatus)
2471 case CMD_PRM_SAVE_FILE: {
2474 _deserStatus = _msg.deserializeTo(_opCode);
2477 static_cast<FwAssertArgType>(_deserStatus)
2482 _deserStatus = _msg.deserializeTo(_cmdSeq);
2485 static_cast<FwAssertArgType>(_deserStatus)
2490 _deserStatus = _msg.deserializeTo(args);
2493 static_cast<FwAssertArgType>(_deserStatus)
2501 #if FW_CMD_CHECK_RESIDUAL 2503 if (this->m_CmdStatus_OutputPort[0].isConnected()) {
2518 case CMD_PRM_LOAD_FILE: {
2521 _deserStatus = _msg.deserializeTo(_opCode);
2524 static_cast<FwAssertArgType>(_deserStatus)
2529 _deserStatus = _msg.deserializeTo(_cmdSeq);
2532 static_cast<FwAssertArgType>(_deserStatus)
2537 _deserStatus = _msg.deserializeTo(args);
2540 static_cast<FwAssertArgType>(_deserStatus)
2550 if (this->m_CmdStatus_OutputPort[0].isConnected()) {
2565 if (this->m_CmdStatus_OutputPort[0].isConnected()) {
2578 #if FW_CMD_CHECK_RESIDUAL 2580 if (this->m_CmdStatus_OutputPort[0].isConnected()) {
2599 case CMD_PRM_COMMIT_STAGED: {
2602 _deserStatus = _msg.deserializeTo(_opCode);
2605 static_cast<FwAssertArgType>(_deserStatus)
2610 _deserStatus = _msg.deserializeTo(_cmdSeq);
2613 static_cast<FwAssertArgType>(_deserStatus)
2618 _deserStatus = _msg.deserializeTo(args);
2621 static_cast<FwAssertArgType>(_deserStatus)
2629 #if FW_CMD_CHECK_RESIDUAL 2631 if (this->m_CmdStatus_OutputPort[0].isConnected()) {
2656 void PrmDbComponentBase ::
2668 const U32 idBase = callComp->
getIdBase();
2669 FW_ASSERT(opCode >= idBase, static_cast<FwAssertArgType>(opCode), static_cast<FwAssertArgType>(idBase));
2672 switch (opCode - idBase) {
2674 compPtr->PRM_SAVE_FILE_cmdHandlerBase(
2683 compPtr->PRM_LOAD_FILE_cmdHandlerBase(
2692 compPtr->PRM_COMMIT_STAGED_cmdHandlerBase(
2716 return compPtr->getPrm_handlerBase(
2723 void PrmDbComponentBase ::
2732 compPtr->pingIn_handlerBase(
2738 void PrmDbComponentBase ::
2748 compPtr->setPrm_handlerBase(
void set_CmdReg_OutputPort(FwIndexType portNum, Fw::InputCmdRegPort *port)
Connect port to CmdReg[portNum].
Serialization/Deserialization operation was successful.
void regCommands()
Register commands with the Command Dispatcher.
State of parameter DB file load operations.
void addCallPort(InputTimePort *callPort)
Register an input port.
bool isConnected_CmdReg_OutputPort(FwIndexType portNum)
FwIdType FwOpcodeType
The type of a command opcode.
Fw::ParamValid getPrm_handlerBase(FwIndexType portNum, FwPrmIdType id, Fw::ParamBuffer &val)
Handler base-class function for input port getPrm.
Parameter ID not found in database.
SerializeStatus serializeFrom(U8 val, Endianness mode=Endianness::BIG) override
Serialize an 8-bit unsigned integer value.
void log_WARNING_LO_PrmIdNotFound_ThrottleClear()
Reset throttle value for PrmIdNotFound.
FwIdType getIdBase() const
PlatformSizeType FwSizeType
Status receive(U8 *destination, FwSizeType capacity, BlockingType blockType, FwSizeType &actualSize, FwQueuePriorityType &priority) override
receive a message from the queue through delegate
Status
status returned from the queue send function
void log_ACTIVITY_HI_PrmIdUpdated(FwPrmIdType Id) const
const char * toChar() const
Convert to a C-style char*.
static constexpr FwIndexType getNum_pingOut_OutputPorts()
PrmDbComponentBase(const char *compName="")
Construct PrmDbComponentBase object.
FwIdType FwPrmIdType
The type of a parameter identifier.
void unLock()
unlock the mutex and assert success
void log_ACTIVITY_HI_PrmFileSaveComplete(U32 records) const
void invoke(U32 key) const
Invoke a port interface.
static constexpr FwIndexType getNum_Log_OutputPorts()
virtual const CHAR * toChar() const =0
Convert to a C-style char*.
Fw::InputPrmSetPort * get_setPrm_InputPort(FwIndexType portNum)
virtual void PRM_COMMIT_STAGED_preMsgHook(FwOpcodeType opCode, U32 cmdSeq)
Pre-message hook for command PRM_COMMIT_STAGED.
All parameters Copied from one DB to another.
The size of the serial representation.
Enum representing a command response.
No time base has been established (Required)
void addCallPort(InputCmdRegPort *callPort)
Register an input port.
virtual void PRM_COMMIT_STAGED_cmdHandler(FwOpcodeType opCode, U32 cmdSeq)=0
parameter file failed CRC
static constexpr FwIndexType getNum_Time_OutputPorts()
Os::Queue m_queue
queue object for active component
void log_WARNING_HI_PrmFileWriteError(Svc::PrmDb_PrmWriteError stage, I32 record, I32 error) const
void set_Log_OutputPort(FwIndexType portNum, Fw::InputLogPort *port)
Connect port to Log[portNum].
virtual void pingIn_handler(FwIndexType portNum, U32 key)=0
Handler for input port pingIn.
void log_ACTIVITY_HI_PrmFileLoadComplete(const Fw::StringBase &databaseString, U32 recordsTotal, U32 recordsAdded, U32 recordsUpdated) const
void init()
Object initializer.
virtual ~PrmDbComponentBase()
Destroy PrmDbComponentBase object.
SerializeStatus
forward declaration for string
virtual void lock()
Lock the guarded mutex.
Message will block until space is available.
Failed to read parameter file.
void log_WARNING_HI_PrmFileReadError(Svc::PrmDb_PrmReadError stage, I32 record, I32 error) const
FwIdType FwEventIdType
The type of an event identifier.
void invoke(FwOpcodeType opCode) const
Invoke a port interface.
static constexpr FwIndexType getNum_getPrm_InputPorts()
#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_ACTIVITY_HI_PrmDbCommitComplete() const
Fw::InputCmdPort * get_CmdDisp_InputPort(FwIndexType portNum)
Os::Queue::Status createQueue(FwSizeType depth, FwSizeType msgSize)
void log_WARNING_LO_PrmDbFileLoadInvalidAction(Svc::PrmDb_PrmDbFileLoadState currentState, Svc::PrmDb_PrmLoadAction attemptedAction) const
Parameter file load failed, not staging any update.
#define FW_MIN(a, b)
MIN macro (deprecated in C++, use std::min)
A less serious but recoverable event.
void init()
Initialization function.
virtual void pingIn_preMsgHook(FwIndexType portNum, U32 key)
Pre-message hook for async input port pingIn.
void invoke(Fw::Time &time) const
Invoke a port interface.
Committed staged parameter updates.
void PRM_COMMIT_STAGED_cmdHandlerBase(FwOpcodeType opCode, U32 cmdSeq, Fw::CmdArgBuffer &args)
bool isConnected_CmdStatus_OutputPort(FwIndexType portNum)
bool isConnected_Log_OutputPort(FwIndexType portNum)
virtual void PRM_LOAD_FILE_cmdHandler(FwOpcodeType opCode, U32 cmdSeq, const Fw::CmdStringArg &fileName, Svc::PrmDb_Merge merge)=0
Serializable::SizeType getDeserializeSizeLeft() const override
Get remaining deserialization buffer size.
const char * toChar() const
Convert to a C-style char*.
void invoke(FwOpcodeType opCode, U32 cmdSeq, const Fw::CmdResponse &response) const
Invoke a port interface.
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 setPrm_handlerBase(FwIndexType portNum, FwPrmIdType id, Fw::ParamBuffer &val)
Handler base-class function for input port setPrm.
virtual void unLock()
Unlock the guarded mutex.
void resetDeser() override
Reset deserialization pointer to beginning of buffer.
void log_ACTIVITY_HI_PrmIdAdded(FwPrmIdType Id) const
Svc::InputPingPort * get_pingIn_InputPort(FwIndexType portNum)
A serious but recoverable event.
Errors dispatching messages.
void log_ACTIVITY_HI_PrmDbCopyAllComplete(const Fw::StringBase &databaseStringSrc, const Fw::StringBase &databaseStringDest) const
virtual Fw::ParamValid getPrm_handler(FwIndexType portNum, FwPrmIdType id, Fw::ParamBuffer &val)=0
Handler for input port getPrm.
FormatStatus format(const CHAR *formatString,...)
write formatted string to buffer
void init()
Initialization function.
Invalid Action during parameter file load.
void PRM_LOAD_FILE_cmdHandlerBase(FwOpcodeType opCode, U32 cmdSeq, Fw::CmdArgBuffer &args)
uint8_t U8
8-bit unsigned integer
virtual void PRM_SAVE_FILE_preMsgHook(FwOpcodeType opCode, U32 cmdSeq)
Pre-message hook for command PRM_SAVE_FILE.
void log_WARNING_HI_PrmDbFull(FwPrmIdType Id) const
void pingOut_out(FwIndexType portNum, U32 key)
Invoke output port pingOut.
virtual void PRM_LOAD_FILE_preMsgHook(FwOpcodeType opCode, U32 cmdSeq)
Pre-message hook for command PRM_LOAD_FILE.
The size of the serial representation.
Parameter ID updated in database.
void pingIn_handlerBase(FwIndexType portNum, U32 key)
Handler base-class function for input port pingIn.
Parameter database is full.
Failed to write parameter file.
Command failed to deserialize.
Parameter ID added to database.
void PRM_SAVE_FILE_cmdHandlerBase(FwOpcodeType opCode, U32 cmdSeq, Fw::CmdArgBuffer &args)
PlatformQueuePriorityType FwQueuePriorityType
The type of queue priorities used.
Important informational events.
void invoke(FwEventIdType id, Fw::Time &timeTag, const Fw::LogSeverity &severity, Fw::LogBuffer &args) const
Invoke a port interface.
void log_WARNING_LO_PrmIdNotFound(FwPrmIdType Id)
Save of parameter file completed.
A message was sent requesting an exit of the loop.
Loads a file from storage into the staging database. The file could have selective IDs and not the wh...
PlatformIndexType FwIndexType
static constexpr FwIndexType getNum_CmdStatus_OutputPorts()
void set_CmdStatus_OutputPort(FwIndexType portNum, Fw::InputCmdResponsePort *port)
Connect port to CmdStatus[portNum].
virtual void setPrm_handler(FwIndexType portNum, FwPrmIdType id, Fw::ParamBuffer &val)=0
Handler for input port setPrm.
void addCallPort(InputLogPort *callPort)
Register an input port.
void set_Time_OutputPort(FwIndexType portNum, Fw::InputTimePort *port)
Connect port to Time[portNum].
void init()
Initialization function.
static constexpr FwIndexType getNum_pingIn_InputPorts()
void cmdResponse_out(FwOpcodeType opCode, U32 cmdSeq, Fw::CmdResponse response)
Emit command response.
RateGroupDivider component implementation.
message sent/received okay
SerializeStatus deserializeTo(U8 &val, Endianness mode=Endianness::BIG) override
Deserialize an 8-bit unsigned integer value.
Enum representing parameter validity.
static constexpr FwIndexType getNum_CmdDisp_InputPorts()
bool isConnected_Time_OutputPort(FwIndexType portNum)
The size of the serial representation.
Fw::InputPrmGetPort * get_getPrm_InputPort(FwIndexType portNum)
static constexpr FwIndexType getNum_CmdReg_OutputPorts()
bool isConnected_pingOut_OutputPort(FwIndexType portNum)
Throttle reset count for PrmIdNotFound.
Command to save parameter image to file. Uses file name passed to constructor.
void set_pingOut_OutputPort(FwIndexType portNum, Svc::InputPingPort *port)
Connect port to pingOut[portNum].
Message will return with status when space is unavailable.
Implementation of malloc based allocator.
Commits the backup database to become the prime (active) database.
void init()
Initialization function.
virtual void PRM_SAVE_FILE_cmdHandler(FwOpcodeType opCode, U32 cmdSeq)=0
Load of parameter file completed.
message to exit active component task
static constexpr FwIndexType getNum_setPrm_InputPorts()
virtual void setPrm_preMsgHook(FwIndexType portNum, FwPrmIdType id, Fw::ParamBuffer &val)
Pre-message hook for async input port setPrm.
void log_WARNING_HI_PrmFileBadCrc(U32 readCrc, U32 compCrc) const
void log_WARNING_HI_PrmDbFileLoadFailed() const
void addCallPort(InputCmdResponsePort *callPort)
Register an input port.
void lock()
lock the mutex and assert success
SerializeStatus serializeTo(SerialBufferBase &buffer, Endianness mode=Endianness::BIG) const override
Serialize the contents of this object to a buffer.
The size of the serial representation.