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
51 ComponentIpcSerializableBuffer() :
Fw::LinearBufferBase(m_buff, sizeof(m_buff)) {
57 U8 m_buff[SERIALIZATION_SIZE];
75 #if !FW_DIRECT_PORT_CALLS 82 this->m_CmdDisp_InputPort[port].
init();
87 this->m_CmdDisp_InputPort[port].
setPortNum(port);
89 #if FW_OBJECT_NAMES == 1 93 this->m_objName.toChar(),
96 this->m_CmdDisp_InputPort[port].setObjName(portName.
toChar());
101 #if !FW_DIRECT_PORT_CALLS 108 this->m_getPrm_InputPort[port].
init();
113 this->m_getPrm_InputPort[port].
setPortNum(port);
115 #if FW_OBJECT_NAMES == 1 119 this->m_objName.toChar(),
122 this->m_getPrm_InputPort[port].setObjName(portName.
toChar());
127 #if !FW_DIRECT_PORT_CALLS 134 this->m_pingIn_InputPort[port].
init();
139 this->m_pingIn_InputPort[port].
setPortNum(port);
141 #if FW_OBJECT_NAMES == 1 145 this->m_objName.toChar(),
148 this->m_pingIn_InputPort[port].setObjName(portName.
toChar());
153 #if !FW_DIRECT_PORT_CALLS 160 this->m_setPrm_InputPort[port].
init();
165 this->m_setPrm_InputPort[port].
setPortNum(port);
167 #if FW_OBJECT_NAMES == 1 171 this->m_objName.toChar(),
174 this->m_setPrm_InputPort[port].setObjName(portName.
toChar());
179 #if !FW_DIRECT_PORT_CALLS 186 this->m_CmdReg_OutputPort[port].
init();
188 #if FW_OBJECT_NAMES == 1 192 this->m_objName.toChar(),
195 this->m_CmdReg_OutputPort[port].setObjName(portName.
toChar());
200 #if !FW_DIRECT_PORT_CALLS 207 this->m_CmdStatus_OutputPort[port].
init();
209 #if FW_OBJECT_NAMES == 1 213 this->m_objName.toChar(),
216 this->m_CmdStatus_OutputPort[port].setObjName(portName.
toChar());
221 #if !FW_DIRECT_PORT_CALLS 228 this->m_Log_OutputPort[port].
init();
230 #if FW_OBJECT_NAMES == 1 234 this->m_objName.toChar(),
237 this->m_Log_OutputPort[port].setObjName(portName.
toChar());
242 #if !FW_DIRECT_PORT_CALLS && FW_ENABLE_TEXT_LOGGING 246 port < static_cast<FwIndexType>(this->getNum_LogText_OutputPorts());
249 this->m_LogText_OutputPort[port].
init();
251 #if FW_OBJECT_NAMES == 1 255 this->m_objName.toChar(),
258 this->m_LogText_OutputPort[port].setObjName(portName.
toChar());
263 #if !FW_DIRECT_PORT_CALLS 270 this->m_Time_OutputPort[port].
init();
272 #if FW_OBJECT_NAMES == 1 276 this->m_objName.toChar(),
279 this->m_Time_OutputPort[port].setObjName(portName.
toChar());
284 #if !FW_DIRECT_PORT_CALLS 291 this->m_pingOut_OutputPort[port].
init();
293 #if FW_OBJECT_NAMES == 1 297 this->m_objName.toChar(),
300 this->m_pingOut_OutputPort[port].setObjName(portName.
toChar());
308 static_cast<FwSizeType>(ComponentIpcSerializableBuffer::SERIALIZATION_SIZE)
312 static_cast<FwAssertArgType>(qStat)
316 #if !FW_DIRECT_PORT_CALLS 327 static_cast<FwAssertArgType>(portNum)
330 return &this->m_CmdDisp_InputPort[portNum];
335 #if !FW_DIRECT_PORT_CALLS 346 static_cast<FwAssertArgType>(portNum)
349 return &this->m_getPrm_InputPort[portNum];
357 static_cast<FwAssertArgType>(portNum)
360 return &this->m_pingIn_InputPort[portNum];
368 static_cast<FwAssertArgType>(portNum)
371 return &this->m_setPrm_InputPort[portNum];
376 #if !FW_DIRECT_PORT_CALLS 390 static_cast<FwAssertArgType>(portNum)
393 this->m_CmdReg_OutputPort[portNum].
addCallPort(port);
404 static_cast<FwAssertArgType>(portNum)
407 this->m_CmdStatus_OutputPort[portNum].
addCallPort(port);
418 static_cast<FwAssertArgType>(portNum)
424 #if FW_ENABLE_TEXT_LOGGING == 1 426 void PrmDbComponentBase ::
427 set_LogText_OutputPort(
433 (0 <= portNum) && (portNum < this->getNum_LogText_OutputPorts()),
434 static_cast<FwAssertArgType>(portNum)
437 this->m_LogText_OutputPort[portNum].addCallPort(port);
450 static_cast<FwAssertArgType>(portNum)
453 this->m_Time_OutputPort[portNum].
addCallPort(port);
458 #if !FW_DIRECT_PORT_CALLS 472 static_cast<FwAssertArgType>(portNum)
475 this->m_pingOut_OutputPort[portNum].
addCallPort(port);
480 #if !FW_DIRECT_PORT_CALLS && FW_PORT_SERIALIZATION 489 Fw::InputSerializePort* port
494 static_cast<FwAssertArgType>(portNum)
497 this->m_CmdReg_OutputPort[portNum].registerSerialPort(port);
503 Fw::InputSerializePort* port
508 static_cast<FwAssertArgType>(portNum)
511 this->m_CmdStatus_OutputPort[portNum].registerSerialPort(port);
517 Fw::InputSerializePort* port
522 static_cast<FwAssertArgType>(portNum)
525 this->m_Log_OutputPort[portNum].registerSerialPort(port);
528 #if FW_ENABLE_TEXT_LOGGING == 1 530 void PrmDbComponentBase ::
531 set_LogText_OutputPort(
533 Fw::InputSerializePort* port
537 (0 <= portNum) && (portNum < this->getNum_LogText_OutputPorts()),
538 static_cast<FwAssertArgType>(portNum)
541 this->m_LogText_OutputPort[portNum].registerSerialPort(port);
549 Fw::InputSerializePort* port
554 static_cast<FwAssertArgType>(portNum)
557 this->m_Time_OutputPort[portNum].registerSerialPort(port);
562 #if !FW_DIRECT_PORT_CALLS && FW_PORT_SERIALIZATION 571 Fw::InputSerializePort* port
576 static_cast<FwAssertArgType>(portNum)
579 this->m_pingOut_OutputPort[portNum].registerSerialPort(port);
615 Fw::ActiveComponentBase(compName)
617 this->m_PrmIdNotFoundThrottle = 0;
626 #if !FW_DIRECT_PORT_CALLS 637 static_cast<FwAssertArgType>(portNum)
640 return this->m_CmdReg_OutputPort[portNum].
isConnected();
648 static_cast<FwAssertArgType>(portNum)
651 return this->m_CmdStatus_OutputPort[portNum].
isConnected();
659 static_cast<FwAssertArgType>(portNum)
662 return this->m_Log_OutputPort[portNum].
isConnected();
665 #if FW_ENABLE_TEXT_LOGGING == 1 667 bool PrmDbComponentBase ::
668 isConnected_LogText_OutputPort(
FwIndexType portNum)
const 671 (0 <= portNum) && (portNum < this->getNum_LogText_OutputPorts()),
672 static_cast<FwAssertArgType>(portNum)
675 return this->m_LogText_OutputPort[portNum].isConnected();
685 static_cast<FwAssertArgType>(portNum)
688 return this->m_Time_OutputPort[portNum].
isConnected();
693 #if !FW_DIRECT_PORT_CALLS 704 static_cast<FwAssertArgType>(portNum)
707 return this->m_pingOut_OutputPort[portNum].
isConnected();
728 FW_ASSERT(opCode >= idBase, static_cast<FwAssertArgType>(opCode), static_cast<FwAssertArgType>(idBase));
731 switch (opCode - idBase) {
780 static_cast<FwAssertArgType>(portNum)
810 static_cast<FwAssertArgType>(portNum)
818 ComponentIpcSerializableBuffer msg;
822 _status = msg.serializeFrom(
823 static_cast<FwEnumStoreType>(PINGIN_PING)
827 static_cast<FwAssertArgType>(_status)
831 _status = msg.serializeFrom(portNum);
834 static_cast<FwAssertArgType>(_status)
838 _status = msg.serializeFrom(key);
841 static_cast<FwAssertArgType>(_status)
850 static_cast<FwAssertArgType>(qStatus)
864 static_cast<FwAssertArgType>(portNum)
873 ComponentIpcSerializableBuffer msg;
877 _status = msg.serializeFrom(
878 static_cast<FwEnumStoreType>(SETPRM_PRMSET)
882 static_cast<FwAssertArgType>(_status)
886 _status = msg.serializeFrom(portNum);
889 static_cast<FwAssertArgType>(_status)
893 _status = msg.serializeFrom(
id);
896 static_cast<FwAssertArgType>(_status)
900 _status = msg.serializeFrom(val);
903 static_cast<FwAssertArgType>(_status)
912 static_cast<FwAssertArgType>(qStatus)
943 #if !FW_DIRECT_PORT_CALLS 957 static_cast<FwAssertArgType>(portNum)
961 this->m_pingOut_OutputPort[portNum].isConnected(),
962 static_cast<FwAssertArgType>(portNum)
964 this->m_pingOut_OutputPort[portNum].
invoke(
983 this->CmdStatus_out(0, opCode, cmdSeq, response);
1004 ComponentIpcSerializableBuffer msg;
1008 _status = msg.serializeFrom(static_cast<FwEnumStoreType>(CMD_PRM_SAVE_FILE));
1011 static_cast<FwAssertArgType>(_status)
1017 _status = msg.serializeFrom(port);
1020 static_cast<FwAssertArgType>(_status)
1023 _status = msg.serializeFrom(opCode);
1026 static_cast<FwAssertArgType>(_status)
1029 _status = msg.serializeFrom(cmdSeq);
1032 static_cast<FwAssertArgType>(_status)
1035 _status = msg.serializeFrom(args);
1038 static_cast<FwAssertArgType>(_status)
1047 static_cast<FwAssertArgType>(qStatus)
1063 ComponentIpcSerializableBuffer msg;
1067 _status = msg.serializeFrom(static_cast<FwEnumStoreType>(CMD_PRM_LOAD_FILE));
1070 static_cast<FwAssertArgType>(_status)
1076 _status = msg.serializeFrom(port);
1079 static_cast<FwAssertArgType>(_status)
1082 _status = msg.serializeFrom(opCode);
1085 static_cast<FwAssertArgType>(_status)
1088 _status = msg.serializeFrom(cmdSeq);
1091 static_cast<FwAssertArgType>(_status)
1094 _status = msg.serializeFrom(args);
1097 static_cast<FwAssertArgType>(_status)
1106 static_cast<FwAssertArgType>(qStatus)
1122 ComponentIpcSerializableBuffer msg;
1126 _status = msg.serializeFrom(static_cast<FwEnumStoreType>(CMD_PRM_COMMIT_STAGED));
1129 static_cast<FwAssertArgType>(_status)
1135 _status = msg.serializeFrom(port);
1138 static_cast<FwAssertArgType>(_status)
1141 _status = msg.serializeFrom(opCode);
1144 static_cast<FwAssertArgType>(_status)
1147 _status = msg.serializeFrom(cmdSeq);
1150 static_cast<FwAssertArgType>(_status)
1153 _status = msg.serializeFrom(args);
1156 static_cast<FwAssertArgType>(_status)
1165 static_cast<FwAssertArgType>(qStatus)
1222 this->m_PrmIdNotFoundThrottle++;
1228 this->Time_out(0, _logTime);
1238 #if FW_AMPCS_COMPATIBLE 1243 static_cast<FwAssertArgType>(_status)
1247 #if FW_AMPCS_COMPATIBLE 1254 static_cast<FwAssertArgType>(_status)
1260 static_cast<FwAssertArgType>(_status)
1273 #if FW_ENABLE_TEXT_LOGGING 1274 if (this->isConnected_LogText_OutputPort(0)) {
1275 #if FW_OBJECT_NAMES == 1 1276 const char* _formatString =
1277 "(%s) %s: Parameter ID 0x%" PRIx32
" not found";
1279 const char* _formatString =
1280 "%s: Parameter ID 0x%" PRIx32
" not found";
1284 (void) _logString.
format(
1287 this->m_objName.toChar(),
1310 this->Time_out(0, _logTime);
1320 #if FW_AMPCS_COMPATIBLE 1325 static_cast<FwAssertArgType>(_status)
1329 #if FW_AMPCS_COMPATIBLE 1336 static_cast<FwAssertArgType>(_status)
1342 static_cast<FwAssertArgType>(_status)
1355 #if FW_ENABLE_TEXT_LOGGING 1356 if (this->isConnected_LogText_OutputPort(0)) {
1357 #if FW_OBJECT_NAMES == 1 1358 const char* _formatString =
1359 "(%s) %s: Parameter ID 0x%" PRIx32
" updated";
1361 const char* _formatString =
1362 "%s: Parameter ID 0x%" PRIx32
" updated";
1366 (void) _logString.
format(
1369 this->m_objName.toChar(),
1392 this->Time_out(0, _logTime);
1402 #if FW_AMPCS_COMPATIBLE 1407 static_cast<FwAssertArgType>(_status)
1411 #if FW_AMPCS_COMPATIBLE 1418 static_cast<FwAssertArgType>(_status)
1424 static_cast<FwAssertArgType>(_status)
1437 #if FW_ENABLE_TEXT_LOGGING 1438 if (this->isConnected_LogText_OutputPort(0)) {
1439 #if FW_OBJECT_NAMES == 1 1440 const char* _formatString =
1441 "(%s) %s: Parameter DB full when adding ID 0x%" PRIx32
" ";
1443 const char* _formatString =
1444 "%s: Parameter DB full when adding ID 0x%" PRIx32
" ";
1448 (void) _logString.
format(
1451 this->m_objName.toChar(),
1474 this->Time_out(0, _logTime);
1484 #if FW_AMPCS_COMPATIBLE 1489 static_cast<FwAssertArgType>(_status)
1493 #if FW_AMPCS_COMPATIBLE 1500 static_cast<FwAssertArgType>(_status)
1506 static_cast<FwAssertArgType>(_status)
1519 #if FW_ENABLE_TEXT_LOGGING 1520 if (this->isConnected_LogText_OutputPort(0)) {
1521 #if FW_OBJECT_NAMES == 1 1522 const char* _formatString =
1523 "(%s) %s: Parameter ID 0x%" PRIx32
" added";
1525 const char* _formatString =
1526 "%s: Parameter ID 0x%" PRIx32
" added";
1530 (void) _logString.
format(
1533 this->m_objName.toChar(),
1560 this->Time_out(0, _logTime);
1570 #if FW_AMPCS_COMPATIBLE 1575 static_cast<FwAssertArgType>(_status)
1579 #if FW_AMPCS_COMPATIBLE 1586 static_cast<FwAssertArgType>(_status)
1592 static_cast<FwAssertArgType>(_status)
1595 #if FW_AMPCS_COMPATIBLE 1598 static_cast<U8>(
sizeof(I32))
1602 static_cast<FwAssertArgType>(_status)
1608 static_cast<FwAssertArgType>(_status)
1611 #if FW_AMPCS_COMPATIBLE 1614 static_cast<U8>(
sizeof(I32))
1618 static_cast<FwAssertArgType>(_status)
1624 static_cast<FwAssertArgType>(_status)
1637 #if FW_ENABLE_TEXT_LOGGING 1638 if (this->isConnected_LogText_OutputPort(0)) {
1639 #if FW_OBJECT_NAMES == 1 1640 const char* _formatString =
1641 "(%s) %s: Parameter write failed in stage %s with record %" PRIi32
" and error %" PRIi32
"";
1643 const char* _formatString =
1644 "%s: Parameter write failed in stage %s with record %" PRIi32
" and error %" PRIi32
"";
1648 stage.toString(stageStr);
1651 (void) _logString.
format(
1654 this->m_objName.toChar(),
1656 "PrmFileWriteError ",
1679 this->Time_out(0, _logTime);
1689 #if FW_AMPCS_COMPATIBLE 1694 static_cast<FwAssertArgType>(_status)
1698 #if FW_AMPCS_COMPATIBLE 1701 static_cast<U8>(
sizeof(U32))
1705 static_cast<FwAssertArgType>(_status)
1711 static_cast<FwAssertArgType>(_status)
1724 #if FW_ENABLE_TEXT_LOGGING 1725 if (this->isConnected_LogText_OutputPort(0)) {
1726 #if FW_OBJECT_NAMES == 1 1727 const char* _formatString =
1728 "(%s) %s: Parameter file save completed. Wrote %" PRIu32
" records.";
1730 const char* _formatString =
1731 "%s: Parameter file save completed. Wrote %" PRIu32
" records.";
1735 (void) _logString.
format(
1738 this->m_objName.toChar(),
1740 "PrmFileSaveComplete ",
1765 this->Time_out(0, _logTime);
1775 #if FW_AMPCS_COMPATIBLE 1780 static_cast<FwAssertArgType>(_status)
1784 #if FW_AMPCS_COMPATIBLE 1791 static_cast<FwAssertArgType>(_status)
1797 static_cast<FwAssertArgType>(_status)
1800 #if FW_AMPCS_COMPATIBLE 1803 static_cast<U8>(
sizeof(I32))
1807 static_cast<FwAssertArgType>(_status)
1813 static_cast<FwAssertArgType>(_status)
1816 #if FW_AMPCS_COMPATIBLE 1819 static_cast<U8>(
sizeof(I32))
1823 static_cast<FwAssertArgType>(_status)
1829 static_cast<FwAssertArgType>(_status)
1842 #if FW_ENABLE_TEXT_LOGGING 1843 if (this->isConnected_LogText_OutputPort(0)) {
1844 #if FW_OBJECT_NAMES == 1 1845 const char* _formatString =
1846 "(%s) %s: Parameter file read failed in stage %s with record %" PRIi32
" and error %" PRIi32
"";
1848 const char* _formatString =
1849 "%s: Parameter file read failed in stage %s with record %" PRIi32
" and error %" PRIi32
"";
1853 stage.toString(stageStr);
1856 (void) _logString.
format(
1859 this->m_objName.toChar(),
1861 "PrmFileReadError ",
1889 this->Time_out(0, _logTime);
1899 #if FW_AMPCS_COMPATIBLE 1904 static_cast<FwAssertArgType>(_status)
1914 static_cast<FwAssertArgType>(_status)
1917 #if FW_AMPCS_COMPATIBLE 1920 static_cast<U8>(
sizeof(U32))
1924 static_cast<FwAssertArgType>(_status)
1930 static_cast<FwAssertArgType>(_status)
1933 #if FW_AMPCS_COMPATIBLE 1936 static_cast<U8>(
sizeof(U32))
1940 static_cast<FwAssertArgType>(_status)
1946 static_cast<FwAssertArgType>(_status)
1949 #if FW_AMPCS_COMPATIBLE 1952 static_cast<U8>(
sizeof(U32))
1956 static_cast<FwAssertArgType>(_status)
1962 static_cast<FwAssertArgType>(_status)
1975 #if FW_ENABLE_TEXT_LOGGING 1976 if (this->isConnected_LogText_OutputPort(0)) {
1977 #if FW_OBJECT_NAMES == 1 1978 const char* _formatString =
1979 "(%s) %s: Parameter file load completed. Database: %s, Records: %" PRIu32
" (%" PRIu32
" added and %" PRIu32
" updated).";
1981 const char* _formatString =
1982 "%s: Parameter file load completed. Database: %s, Records: %" PRIu32
" (%" PRIu32
" added and %" PRIu32
" updated).";
1986 (void) _logString.
format(
1989 this->m_objName.toChar(),
1991 "PrmFileLoadComplete ",
2015 this->Time_out(0, _logTime);
2024 #if FW_AMPCS_COMPATIBLE 2030 static_cast<FwAssertArgType>(_status)
2044 #if FW_ENABLE_TEXT_LOGGING 2045 if (this->isConnected_LogText_OutputPort(0)) {
2046 #if FW_OBJECT_NAMES == 1 2047 const char* _formatString =
2048 "(%s) %s: Parameter DB commit complete, staged updates are now active.";
2050 const char* _formatString =
2051 "%s: Parameter DB commit complete, staged updates are now active.";
2055 (void) _logString.
format(
2058 this->m_objName.toChar(),
2060 "PrmDbCommitComplete " 2083 this->Time_out(0, _logTime);
2093 #if FW_AMPCS_COMPATIBLE 2098 static_cast<FwAssertArgType>(_status)
2108 static_cast<FwAssertArgType>(_status)
2117 static_cast<FwAssertArgType>(_status)
2130 #if FW_ENABLE_TEXT_LOGGING 2131 if (this->isConnected_LogText_OutputPort(0)) {
2132 #if FW_OBJECT_NAMES == 1 2133 const char* _formatString =
2134 "(%s) %s: All parameters copied. Source database: %s, Destination database: %s.";
2136 const char* _formatString =
2137 "%s: All parameters copied. Source database: %s, Destination database: %s.";
2141 (void) _logString.
format(
2144 this->m_objName.toChar(),
2146 "PrmDbCopyAllComplete ",
2147 databaseStringSrc.
toChar(),
2148 databaseStringDest.
toChar()
2168 this->Time_out(0, _logTime);
2177 #if FW_AMPCS_COMPATIBLE 2183 static_cast<FwAssertArgType>(_status)
2197 #if FW_ENABLE_TEXT_LOGGING 2198 if (this->isConnected_LogText_OutputPort(0)) {
2199 #if FW_OBJECT_NAMES == 1 2200 const char* _formatString =
2201 "(%s) %s: Parameter file load failed. Clearing staging database and abandoning parameter file load.";
2203 const char* _formatString =
2204 "%s: Parameter file load failed. Clearing staging database and abandoning parameter file load.";
2208 (void) _logString.
format(
2211 this->m_objName.toChar(),
2213 "PrmDbFileLoadFailed " 2236 this->Time_out(0, _logTime);
2246 #if FW_AMPCS_COMPATIBLE 2251 static_cast<FwAssertArgType>(_status)
2255 #if FW_AMPCS_COMPATIBLE 2262 static_cast<FwAssertArgType>(_status)
2268 static_cast<FwAssertArgType>(_status)
2271 #if FW_AMPCS_COMPATIBLE 2278 static_cast<FwAssertArgType>(_status)
2284 static_cast<FwAssertArgType>(_status)
2297 #if FW_ENABLE_TEXT_LOGGING 2298 if (this->isConnected_LogText_OutputPort(0)) {
2299 #if FW_OBJECT_NAMES == 1 2300 const char* _formatString =
2301 "(%s) %s: Invalid action during parameter file load. Current state: %s, Action (Invalid for current state): %s.";
2303 const char* _formatString =
2304 "%s: Invalid action during parameter file load. Current state: %s, Action (Invalid for current state): %s.";
2308 currentState.toString(currentStateStr);
2310 attemptedAction.toString(attemptedActionStr);
2313 (void) _logString.
format(
2316 this->m_objName.toChar(),
2318 "PrmDbFileLoadInvalidAction ",
2319 currentStateStr.
toChar(),
2320 attemptedActionStr.
toChar()
2343 this->Time_out(0, _logTime);
2353 #if FW_AMPCS_COMPATIBLE 2358 static_cast<FwAssertArgType>(_status)
2362 #if FW_AMPCS_COMPATIBLE 2365 static_cast<U8>(
sizeof(U32))
2369 static_cast<FwAssertArgType>(_status)
2375 static_cast<FwAssertArgType>(_status)
2378 #if FW_AMPCS_COMPATIBLE 2381 static_cast<U8>(
sizeof(U32))
2385 static_cast<FwAssertArgType>(_status)
2391 static_cast<FwAssertArgType>(_status)
2404 #if FW_ENABLE_TEXT_LOGGING 2405 if (this->isConnected_LogText_OutputPort(0)) {
2406 #if FW_OBJECT_NAMES == 1 2407 const char* _formatString =
2408 "(%s) %s: Parameter file failed CRC. Read: 0x%" PRIx32
" Computed: 0x%" PRIx32
"";
2410 const char* _formatString =
2411 "%s: Parameter file failed CRC. Read: 0x%" PRIx32
" Computed: 0x%" PRIx32
"";
2415 (void) _logString.
format(
2418 this->m_objName.toChar(),
2444 this->m_PrmIdNotFoundThrottle = 0;
2456 this->Time_out(0, _time);
2474 this->m_guardedPortMutex.
lock();
2480 this->m_guardedPortMutex.
unLock();
2490 ComponentIpcSerializableBuffer _msg;
2500 static_cast<FwAssertArgType>(_msgStatus)
2510 static_cast<FwAssertArgType>(_deserStatus)
2513 MsgTypeEnum _msgType =
static_cast<MsgTypeEnum
>(_desMsg);
2515 if (_msgType == PRMDB_COMPONENT_EXIT) {
2520 _deserStatus = _msg.deserializeTo(portNum);
2523 static_cast<FwAssertArgType>(_deserStatus)
2531 _deserStatus = _msg.deserializeTo(key);
2534 static_cast<FwAssertArgType>(_deserStatus)
2546 case SETPRM_PRMSET: {
2549 _deserStatus = _msg.deserializeTo(
id);
2552 static_cast<FwAssertArgType>(_deserStatus)
2557 _deserStatus = _msg.deserializeTo(val);
2560 static_cast<FwAssertArgType>(_deserStatus)
2573 case CMD_PRM_SAVE_FILE: {
2576 _deserStatus = _msg.deserializeTo(_opCode);
2579 static_cast<FwAssertArgType>(_deserStatus)
2584 _deserStatus = _msg.deserializeTo(_cmdSeq);
2587 static_cast<FwAssertArgType>(_deserStatus)
2592 _deserStatus = _msg.deserializeTo(args);
2595 static_cast<FwAssertArgType>(_deserStatus)
2603 #if FW_CMD_CHECK_RESIDUAL 2620 case CMD_PRM_LOAD_FILE: {
2623 _deserStatus = _msg.deserializeTo(_opCode);
2626 static_cast<FwAssertArgType>(_deserStatus)
2631 _deserStatus = _msg.deserializeTo(_cmdSeq);
2634 static_cast<FwAssertArgType>(_deserStatus)
2639 _deserStatus = _msg.deserializeTo(args);
2642 static_cast<FwAssertArgType>(_deserStatus)
2680 #if FW_CMD_CHECK_RESIDUAL 2701 case CMD_PRM_COMMIT_STAGED: {
2704 _deserStatus = _msg.deserializeTo(_opCode);
2707 static_cast<FwAssertArgType>(_deserStatus)
2712 _deserStatus = _msg.deserializeTo(_cmdSeq);
2715 static_cast<FwAssertArgType>(_deserStatus)
2720 _deserStatus = _msg.deserializeTo(args);
2723 static_cast<FwAssertArgType>(_deserStatus)
2731 #if FW_CMD_CHECK_RESIDUAL 2758 void PrmDbComponentBase ::
2769 compPtr->CmdDisp_handlerBase(
2791 return compPtr->getPrm_handlerBase(
2798 void PrmDbComponentBase ::
2807 compPtr->pingIn_handlerBase(
2813 void PrmDbComponentBase ::
2823 compPtr->setPrm_handlerBase(
2830 #if !FW_DIRECT_PORT_CALLS 2836 void PrmDbComponentBase ::
2844 static_cast<FwAssertArgType>(portNum)
2848 this->m_CmdReg_OutputPort[portNum].isConnected(),
2849 static_cast<FwAssertArgType>(portNum)
2851 this->m_CmdReg_OutputPort[portNum].
invoke(
2856 void PrmDbComponentBase ::
2866 static_cast<FwAssertArgType>(portNum)
2870 this->m_CmdStatus_OutputPort[portNum].isConnected(),
2871 static_cast<FwAssertArgType>(portNum)
2873 this->m_CmdStatus_OutputPort[portNum].
invoke(
2880 void PrmDbComponentBase ::
2891 static_cast<FwAssertArgType>(portNum)
2895 this->m_Log_OutputPort[portNum].isConnected(),
2896 static_cast<FwAssertArgType>(portNum)
2898 this->m_Log_OutputPort[portNum].
invoke(
2906 #if FW_ENABLE_TEXT_LOGGING 2908 void PrmDbComponentBase ::
2918 (0 <= portNum) && (portNum < this->getNum_LogText_OutputPorts()),
2919 static_cast<FwAssertArgType>(portNum)
2923 this->m_LogText_OutputPort[portNum].isConnected(),
2924 static_cast<FwAssertArgType>(portNum)
2926 this->m_LogText_OutputPort[portNum].invoke(
2936 void PrmDbComponentBase ::
2944 static_cast<FwAssertArgType>(portNum)
2948 this->m_Time_OutputPort[portNum].isConnected(),
2949 static_cast<FwAssertArgType>(portNum)
2951 this->m_Time_OutputPort[portNum].
invoke(
Parameter database is full.
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.
static constexpr FwSizeType CAPACITY
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.
void log_WARNING_LO_PrmIdNotFound_ThrottleClear()
Reset throttle value for PrmIdNotFound.
FwIdType getIdBase() const
void pingOut_out(FwIndexType portNum, U32 key) const
Invoke output port pingOut.
PlatformSizeType FwSizeType
All parameters Copied from one DB to another.
Status receive(U8 *destination, FwSizeType capacity, BlockingType blockType, FwSizeType &actualSize, FwQueuePriorityType &priority) override
receive a message from the queue through delegate
void log_WARNING_LO_PrmDbFileLoadInvalidAction(const Svc::PrmDb_PrmDbFileLoadState ¤tState, const Svc::PrmDb_PrmLoadAction &attemptedAction) const
Status
status returned from the queue send function
void log_ACTIVITY_HI_PrmIdUpdated(FwPrmIdType Id) const
message to exit active component task
static constexpr FwIndexType getNum_pingOut_OutputPorts()
Save of parameter file completed.
BYTE pingInPortSize[Svc::PingPortBuffer::CAPACITY]
PrmDbComponentBase(const char *compName="")
Construct PrmDbComponentBase object.
SerializeStatus deserializeTo(U8 &val, Endianness mode=Endianness::BIG) override
Deserialize an 8-bit unsigned integer value.
FwIdType FwPrmIdType
The type of a parameter identifier.
void unLock()
unlock the mutex and assert success
void log_WARNING_HI_PrmFileReadError(const Svc::PrmDb_PrmReadError &stage, I32 record, I32 error) const
void log_ACTIVITY_HI_PrmFileSaveComplete(U32 records) const
Command to save parameter image to file. Uses file name passed to constructor.
void log_WARNING_HI_PrmFileWriteError(const Svc::PrmDb_PrmWriteError &stage, I32 record, I32 error) const
void invoke(U32 key) const
Invoke a port connection.
The size of the serial representation.
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)
static constexpr FwSizeType CAPACITY
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)
SerializeStatus serializeFrom(U8 val, Endianness mode=Endianness::BIG) override
Serialize an 8-bit unsigned integer value.
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 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
bool isConnected_CmdStatus_OutputPort(FwIndexType portNum) const
Parameter ID added to database.
virtual void lock()
Lock the guarded mutex.
Message will block until space is available.
FwIdType FwEventIdType
The type of an event identifier.
void CmdDisp_handlerBase(FwIndexType portNum, FwOpcodeType opCode, U32 cmdSeq, Fw::CmdArgBuffer &args)
Handler base-class function for input port CmdDisp.
void invoke(FwOpcodeType opCode) const
Invoke a port connection.
bool isConnected_Time_OutputPort(FwIndexType portNum) const
static constexpr FwSizeType CAPACITY
static constexpr FwIndexType getNum_getPrm_InputPorts()
bool isConnected_Log_OutputPort(FwIndexType portNum) const
#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)
#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 connection.
void PRM_COMMIT_STAGED_cmdHandlerBase(FwOpcodeType opCode, U32 cmdSeq, Fw::CmdArgBuffer &args)
Serializable::SizeType getDeserializeSizeLeft() const override
Get remaining deserialization buffer size.
void invoke(FwOpcodeType opCode, U32 cmdSeq, const Fw::CmdResponse &response) const
Invoke a port connection.
bool isConnected_pingOut_OutputPort(FwIndexType portNum) const
The size of the serial representation.
Failed to read parameter file.
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.
Committed staged parameter updates.
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.
bool isConnected_CmdReg_OutputPort(FwIndexType portNum) const
void log_ACTIVITY_HI_PrmDbCopyAllComplete(const Fw::StringBase &databaseStringSrc, const Fw::StringBase &databaseStringDest) const
const char * toChar() const
Convert to a C-style char*.
Failed to write parameter file.
Enum representing event severity.
Parameter ID not found in database.
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.
Parameter ID updated in database.
Loads a file from storage into the staging database. The file could have selective IDs and not the wh...
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
virtual void PRM_LOAD_FILE_preMsgHook(FwOpcodeType opCode, U32 cmdSeq)
Pre-message hook for command PRM_LOAD_FILE.
void pingIn_handlerBase(FwIndexType portNum, U32 key)
Handler base-class function for input port pingIn.
Command failed to deserialize.
Invalid Action during parameter file load.
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 connection.
void log_WARNING_LO_PrmIdNotFound(FwPrmIdType Id)
virtual void PRM_LOAD_FILE_cmdHandler(FwOpcodeType opCode, U32 cmdSeq, const Fw::CmdStringArg &fileName, const Svc::PrmDb_Merge &merge)=0
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.
Throttle reset count for PrmIdNotFound.
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.
The size of the serial representation.
RateGroupDivider component implementation.
message sent/received okay
parameter file failed CRC
Enum representing parameter validity.
static constexpr FwIndexType getNum_CmdDisp_InputPorts()
Fw::InputPrmGetPort * get_getPrm_InputPort(FwIndexType portNum)
static constexpr FwIndexType getNum_CmdReg_OutputPorts()
The size of the serial representation.
Commits the backup database to become the prime (active) database.
void set_pingOut_OutputPort(FwIndexType portNum, Svc::InputPingPort *port)
Connect port to pingOut[portNum].
Load of parameter file completed.
Message will return with status when space is unavailable.
Implementation of malloc based allocator.
void init()
Initialization function.
virtual void PRM_SAVE_FILE_cmdHandler(FwOpcodeType opCode, U32 cmdSeq)=0
Parameter file load failed, not staging any update.
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.
BYTE cmdPortSize[Fw::CmdPortBuffer::CAPACITY]