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 this->m_PrmIdNotFoundThrottle = 0;
2250 if (this->m_Time_OutputPort[0].isConnected()) {
2252 this->m_Time_OutputPort[0].
invoke(_time);
2270 this->m_guardedPortMutex.
lock();
2276 this->m_guardedPortMutex.
unLock();
2286 ComponentIpcSerializableBuffer _msg;
2296 static_cast<FwAssertArgType>(_msgStatus)
2306 static_cast<FwAssertArgType>(_deserStatus)
2309 MsgTypeEnum _msgType =
static_cast<MsgTypeEnum
>(_desMsg);
2311 if (_msgType == PRMDB_COMPONENT_EXIT) {
2316 _deserStatus = _msg.deserializeTo(portNum);
2319 static_cast<FwAssertArgType>(_deserStatus)
2327 _deserStatus = _msg.deserializeTo(key);
2330 static_cast<FwAssertArgType>(_deserStatus)
2342 case SETPRM_PRMSET: {
2345 _deserStatus = _msg.deserializeTo(
id);
2348 static_cast<FwAssertArgType>(_deserStatus)
2353 _deserStatus = _msg.deserializeTo(val);
2356 static_cast<FwAssertArgType>(_deserStatus)
2369 case CMD_PRM_SAVE_FILE: {
2372 _deserStatus = _msg.deserializeTo(_opCode);
2375 static_cast<FwAssertArgType>(_deserStatus)
2380 _deserStatus = _msg.deserializeTo(_cmdSeq);
2383 static_cast<FwAssertArgType>(_deserStatus)
2388 _deserStatus = _msg.deserializeTo(args);
2391 static_cast<FwAssertArgType>(_deserStatus)
2399 #if FW_CMD_CHECK_RESIDUAL 2401 if (this->m_CmdStatus_OutputPort[0].isConnected()) {
2416 case CMD_PRM_LOAD_FILE: {
2419 _deserStatus = _msg.deserializeTo(_opCode);
2422 static_cast<FwAssertArgType>(_deserStatus)
2427 _deserStatus = _msg.deserializeTo(_cmdSeq);
2430 static_cast<FwAssertArgType>(_deserStatus)
2435 _deserStatus = _msg.deserializeTo(args);
2438 static_cast<FwAssertArgType>(_deserStatus)
2448 if (this->m_CmdStatus_OutputPort[0].isConnected()) {
2463 if (this->m_CmdStatus_OutputPort[0].isConnected()) {
2476 #if FW_CMD_CHECK_RESIDUAL 2478 if (this->m_CmdStatus_OutputPort[0].isConnected()) {
2497 case CMD_PRM_COMMIT_STAGED: {
2500 _deserStatus = _msg.deserializeTo(_opCode);
2503 static_cast<FwAssertArgType>(_deserStatus)
2508 _deserStatus = _msg.deserializeTo(_cmdSeq);
2511 static_cast<FwAssertArgType>(_deserStatus)
2516 _deserStatus = _msg.deserializeTo(args);
2519 static_cast<FwAssertArgType>(_deserStatus)
2527 #if FW_CMD_CHECK_RESIDUAL 2529 if (this->m_CmdStatus_OutputPort[0].isConnected()) {
2554 void PrmDbComponentBase ::
2566 const U32 idBase = callComp->
getIdBase();
2567 FW_ASSERT(opCode >= idBase, static_cast<FwAssertArgType>(opCode), static_cast<FwAssertArgType>(idBase));
2570 switch (opCode - idBase) {
2572 compPtr->PRM_SAVE_FILE_cmdHandlerBase(
2581 compPtr->PRM_LOAD_FILE_cmdHandlerBase(
2590 compPtr->PRM_COMMIT_STAGED_cmdHandlerBase(
2614 return compPtr->getPrm_handlerBase(
2621 void PrmDbComponentBase ::
2630 compPtr->pingIn_handlerBase(
2636 void PrmDbComponentBase ::
2646 compPtr->setPrm_handlerBase(
void set_CmdReg_OutputPort(FwIndexType portNum, Fw::InputCmdRegPort *port)
Connect port to CmdReg[portNum].
Command to save parameter image to file. Uses file name passed to constructor.
Serialization/Deserialization operation was successful.
void regCommands()
Register commands with the Command Dispatcher.
Parameter ID added to database.
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.
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
Committed staged parameter updates.
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.
Throttle reset count for PrmIdNotFound.
FwIdType FwPrmIdType
The type of a parameter identifier.
void unLock()
unlock the mutex and assert success
Invalid Action during parameter file load.
void log_ACTIVITY_HI_PrmFileSaveComplete(U32 records) const
The size of the serial representation.
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.
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
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.
void log_WARNING_HI_PrmFileReadError(Svc::PrmDb_PrmReadError stage, I32 record, I32 error) const
Parameter database is full.
Parameter ID updated in database.
FwIdType FwEventIdType
The type of an event identifier.
void invoke(FwOpcodeType opCode) const
Invoke a port interface.
Save of parameter file completed.
static constexpr FwIndexType getNum_getPrm_InputPorts()
The size of the serial representation.
#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
Loads a file from storage into the staging database. The file could have selective IDs and not the wh...
#define FW_MIN(a, b)
MIN macro.
A less serious but recoverable event.
void init()
Initialization function.
Parameter ID not found in database.
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.
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.
message to exit active component task
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.
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.
Failed to read parameter file.
void pingIn_handlerBase(FwIndexType portNum, U32 key)
Handler base-class function for input port pingIn.
Command failed to deserialize.
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)
Parameter file load failed, not staging any update.
All parameters Copied from one DB to another.
A message was sent requesting an exit of the loop.
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.
The size of the serial representation.
Failed to write parameter file.
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)
Fw::InputPrmGetPort * get_getPrm_InputPort(FwIndexType portNum)
static constexpr FwIndexType getNum_CmdReg_OutputPorts()
bool isConnected_pingOut_OutputPort(FwIndexType portNum)
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.
void init()
Initialization function.
Load of parameter file completed.
virtual void PRM_SAVE_FILE_cmdHandler(FwOpcodeType opCode, U32 cmdSeq)=0
The size of the serial representation.
Commits the backup database to become the prime (active) database.
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_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.