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)
848 if (qStatus == Os::Queue::Status::FULL) {
855 static_cast<FwAssertArgType>(qStatus)
869 static_cast<FwAssertArgType>(portNum)
878 ComponentIpcSerializableBuffer msg;
882 _status = msg.serializeFrom(
883 static_cast<FwEnumStoreType>(SETPRM_PRMSET)
887 static_cast<FwAssertArgType>(_status)
891 _status = msg.serializeFrom(portNum);
894 static_cast<FwAssertArgType>(_status)
898 _status = msg.serializeFrom(
id);
901 static_cast<FwAssertArgType>(_status)
905 _status = msg.serializeFrom(val);
908 static_cast<FwAssertArgType>(_status)
917 static_cast<FwAssertArgType>(qStatus)
948 #if !FW_DIRECT_PORT_CALLS 962 static_cast<FwAssertArgType>(portNum)
966 this->m_pingOut_OutputPort[portNum].isConnected(),
967 static_cast<FwAssertArgType>(portNum)
969 this->m_pingOut_OutputPort[portNum].
invoke(
988 this->CmdStatus_out(0, opCode, cmdSeq, response);
1009 ComponentIpcSerializableBuffer msg;
1013 _status = msg.serializeFrom(static_cast<FwEnumStoreType>(CMD_PRM_SAVE_FILE));
1016 static_cast<FwAssertArgType>(_status)
1022 _status = msg.serializeFrom(port);
1025 static_cast<FwAssertArgType>(_status)
1028 _status = msg.serializeFrom(opCode);
1031 static_cast<FwAssertArgType>(_status)
1034 _status = msg.serializeFrom(cmdSeq);
1037 static_cast<FwAssertArgType>(_status)
1040 _status = msg.serializeFrom(args);
1043 static_cast<FwAssertArgType>(_status)
1052 static_cast<FwAssertArgType>(qStatus)
1068 ComponentIpcSerializableBuffer msg;
1072 _status = msg.serializeFrom(static_cast<FwEnumStoreType>(CMD_PRM_LOAD_FILE));
1075 static_cast<FwAssertArgType>(_status)
1081 _status = msg.serializeFrom(port);
1084 static_cast<FwAssertArgType>(_status)
1087 _status = msg.serializeFrom(opCode);
1090 static_cast<FwAssertArgType>(_status)
1093 _status = msg.serializeFrom(cmdSeq);
1096 static_cast<FwAssertArgType>(_status)
1099 _status = msg.serializeFrom(args);
1102 static_cast<FwAssertArgType>(_status)
1111 static_cast<FwAssertArgType>(qStatus)
1127 ComponentIpcSerializableBuffer msg;
1131 _status = msg.serializeFrom(static_cast<FwEnumStoreType>(CMD_PRM_COMMIT_STAGED));
1134 static_cast<FwAssertArgType>(_status)
1140 _status = msg.serializeFrom(port);
1143 static_cast<FwAssertArgType>(_status)
1146 _status = msg.serializeFrom(opCode);
1149 static_cast<FwAssertArgType>(_status)
1152 _status = msg.serializeFrom(cmdSeq);
1155 static_cast<FwAssertArgType>(_status)
1158 _status = msg.serializeFrom(args);
1161 static_cast<FwAssertArgType>(_status)
1170 static_cast<FwAssertArgType>(qStatus)
1227 this->m_PrmIdNotFoundThrottle++;
1233 this->Time_out(0, _logTime);
1243 #if FW_AMPCS_COMPATIBLE 1248 static_cast<FwAssertArgType>(_status)
1252 #if FW_AMPCS_COMPATIBLE 1259 static_cast<FwAssertArgType>(_status)
1265 static_cast<FwAssertArgType>(_status)
1278 #if FW_ENABLE_TEXT_LOGGING 1279 if (this->isConnected_LogText_OutputPort(0)) {
1280 #if FW_OBJECT_NAMES == 1 1281 const char* _formatString =
1282 "(%s) %s: Parameter ID 0x%" PRIx32
" not found";
1284 const char* _formatString =
1285 "%s: Parameter ID 0x%" PRIx32
" not found";
1289 (void) _logString.
format(
1292 this->m_objName.toChar(),
1315 this->Time_out(0, _logTime);
1325 #if FW_AMPCS_COMPATIBLE 1330 static_cast<FwAssertArgType>(_status)
1334 #if FW_AMPCS_COMPATIBLE 1341 static_cast<FwAssertArgType>(_status)
1347 static_cast<FwAssertArgType>(_status)
1360 #if FW_ENABLE_TEXT_LOGGING 1361 if (this->isConnected_LogText_OutputPort(0)) {
1362 #if FW_OBJECT_NAMES == 1 1363 const char* _formatString =
1364 "(%s) %s: Parameter ID 0x%" PRIx32
" updated";
1366 const char* _formatString =
1367 "%s: Parameter ID 0x%" PRIx32
" updated";
1371 (void) _logString.
format(
1374 this->m_objName.toChar(),
1397 this->Time_out(0, _logTime);
1407 #if FW_AMPCS_COMPATIBLE 1412 static_cast<FwAssertArgType>(_status)
1416 #if FW_AMPCS_COMPATIBLE 1423 static_cast<FwAssertArgType>(_status)
1429 static_cast<FwAssertArgType>(_status)
1442 #if FW_ENABLE_TEXT_LOGGING 1443 if (this->isConnected_LogText_OutputPort(0)) {
1444 #if FW_OBJECT_NAMES == 1 1445 const char* _formatString =
1446 "(%s) %s: Parameter DB full when adding ID 0x%" PRIx32
" ";
1448 const char* _formatString =
1449 "%s: Parameter DB full when adding ID 0x%" PRIx32
" ";
1453 (void) _logString.
format(
1456 this->m_objName.toChar(),
1479 this->Time_out(0, _logTime);
1489 #if FW_AMPCS_COMPATIBLE 1494 static_cast<FwAssertArgType>(_status)
1498 #if FW_AMPCS_COMPATIBLE 1505 static_cast<FwAssertArgType>(_status)
1511 static_cast<FwAssertArgType>(_status)
1524 #if FW_ENABLE_TEXT_LOGGING 1525 if (this->isConnected_LogText_OutputPort(0)) {
1526 #if FW_OBJECT_NAMES == 1 1527 const char* _formatString =
1528 "(%s) %s: Parameter ID 0x%" PRIx32
" added";
1530 const char* _formatString =
1531 "%s: Parameter ID 0x%" PRIx32
" added";
1535 (void) _logString.
format(
1538 this->m_objName.toChar(),
1565 this->Time_out(0, _logTime);
1575 #if FW_AMPCS_COMPATIBLE 1580 static_cast<FwAssertArgType>(_status)
1584 #if FW_AMPCS_COMPATIBLE 1591 static_cast<FwAssertArgType>(_status)
1597 static_cast<FwAssertArgType>(_status)
1600 #if FW_AMPCS_COMPATIBLE 1603 static_cast<U8>(
sizeof(I32))
1607 static_cast<FwAssertArgType>(_status)
1613 static_cast<FwAssertArgType>(_status)
1616 #if FW_AMPCS_COMPATIBLE 1619 static_cast<U8>(
sizeof(I32))
1623 static_cast<FwAssertArgType>(_status)
1629 static_cast<FwAssertArgType>(_status)
1642 #if FW_ENABLE_TEXT_LOGGING 1643 if (this->isConnected_LogText_OutputPort(0)) {
1644 #if FW_OBJECT_NAMES == 1 1645 const char* _formatString =
1646 "(%s) %s: Parameter write failed in stage %s with record %" PRIi32
" and error %" PRIi32
"";
1648 const char* _formatString =
1649 "%s: Parameter write failed in stage %s with record %" PRIi32
" and error %" PRIi32
"";
1653 stage.toString(stageStr);
1656 (void) _logString.
format(
1659 this->m_objName.toChar(),
1661 "PrmFileWriteError ",
1684 this->Time_out(0, _logTime);
1694 #if FW_AMPCS_COMPATIBLE 1699 static_cast<FwAssertArgType>(_status)
1703 #if FW_AMPCS_COMPATIBLE 1706 static_cast<U8>(
sizeof(U32))
1710 static_cast<FwAssertArgType>(_status)
1716 static_cast<FwAssertArgType>(_status)
1729 #if FW_ENABLE_TEXT_LOGGING 1730 if (this->isConnected_LogText_OutputPort(0)) {
1731 #if FW_OBJECT_NAMES == 1 1732 const char* _formatString =
1733 "(%s) %s: Parameter file save completed. Wrote %" PRIu32
" records.";
1735 const char* _formatString =
1736 "%s: Parameter file save completed. Wrote %" PRIu32
" records.";
1740 (void) _logString.
format(
1743 this->m_objName.toChar(),
1745 "PrmFileSaveComplete ",
1770 this->Time_out(0, _logTime);
1780 #if FW_AMPCS_COMPATIBLE 1785 static_cast<FwAssertArgType>(_status)
1789 #if FW_AMPCS_COMPATIBLE 1796 static_cast<FwAssertArgType>(_status)
1802 static_cast<FwAssertArgType>(_status)
1805 #if FW_AMPCS_COMPATIBLE 1808 static_cast<U8>(
sizeof(I32))
1812 static_cast<FwAssertArgType>(_status)
1818 static_cast<FwAssertArgType>(_status)
1821 #if FW_AMPCS_COMPATIBLE 1824 static_cast<U8>(
sizeof(I32))
1828 static_cast<FwAssertArgType>(_status)
1834 static_cast<FwAssertArgType>(_status)
1847 #if FW_ENABLE_TEXT_LOGGING 1848 if (this->isConnected_LogText_OutputPort(0)) {
1849 #if FW_OBJECT_NAMES == 1 1850 const char* _formatString =
1851 "(%s) %s: Parameter file read failed in stage %s with record %" PRIi32
" and error %" PRIi32
"";
1853 const char* _formatString =
1854 "%s: Parameter file read failed in stage %s with record %" PRIi32
" and error %" PRIi32
"";
1858 stage.toString(stageStr);
1861 (void) _logString.
format(
1864 this->m_objName.toChar(),
1866 "PrmFileReadError ",
1894 this->Time_out(0, _logTime);
1904 #if FW_AMPCS_COMPATIBLE 1909 static_cast<FwAssertArgType>(_status)
1919 static_cast<FwAssertArgType>(_status)
1922 #if FW_AMPCS_COMPATIBLE 1925 static_cast<U8>(
sizeof(U32))
1929 static_cast<FwAssertArgType>(_status)
1935 static_cast<FwAssertArgType>(_status)
1938 #if FW_AMPCS_COMPATIBLE 1941 static_cast<U8>(
sizeof(U32))
1945 static_cast<FwAssertArgType>(_status)
1951 static_cast<FwAssertArgType>(_status)
1954 #if FW_AMPCS_COMPATIBLE 1957 static_cast<U8>(
sizeof(U32))
1961 static_cast<FwAssertArgType>(_status)
1967 static_cast<FwAssertArgType>(_status)
1980 #if FW_ENABLE_TEXT_LOGGING 1981 if (this->isConnected_LogText_OutputPort(0)) {
1982 #if FW_OBJECT_NAMES == 1 1983 const char* _formatString =
1984 "(%s) %s: Parameter file load completed. Database: %s, Records: %" PRIu32
" (%" PRIu32
" added and %" PRIu32
" updated).";
1986 const char* _formatString =
1987 "%s: Parameter file load completed. Database: %s, Records: %" PRIu32
" (%" PRIu32
" added and %" PRIu32
" updated).";
1991 (void) _logString.
format(
1994 this->m_objName.toChar(),
1996 "PrmFileLoadComplete ",
2020 this->Time_out(0, _logTime);
2029 #if FW_AMPCS_COMPATIBLE 2035 static_cast<FwAssertArgType>(_status)
2049 #if FW_ENABLE_TEXT_LOGGING 2050 if (this->isConnected_LogText_OutputPort(0)) {
2051 #if FW_OBJECT_NAMES == 1 2052 const char* _formatString =
2053 "(%s) %s: Parameter DB commit complete, staged updates are now active.";
2055 const char* _formatString =
2056 "%s: Parameter DB commit complete, staged updates are now active.";
2060 (void) _logString.
format(
2063 this->m_objName.toChar(),
2065 "PrmDbCommitComplete " 2088 this->Time_out(0, _logTime);
2098 #if FW_AMPCS_COMPATIBLE 2103 static_cast<FwAssertArgType>(_status)
2113 static_cast<FwAssertArgType>(_status)
2122 static_cast<FwAssertArgType>(_status)
2135 #if FW_ENABLE_TEXT_LOGGING 2136 if (this->isConnected_LogText_OutputPort(0)) {
2137 #if FW_OBJECT_NAMES == 1 2138 const char* _formatString =
2139 "(%s) %s: All parameters copied. Source database: %s, Destination database: %s.";
2141 const char* _formatString =
2142 "%s: All parameters copied. Source database: %s, Destination database: %s.";
2146 (void) _logString.
format(
2149 this->m_objName.toChar(),
2151 "PrmDbCopyAllComplete ",
2152 databaseStringSrc.
toChar(),
2153 databaseStringDest.
toChar()
2173 this->Time_out(0, _logTime);
2182 #if FW_AMPCS_COMPATIBLE 2188 static_cast<FwAssertArgType>(_status)
2202 #if FW_ENABLE_TEXT_LOGGING 2203 if (this->isConnected_LogText_OutputPort(0)) {
2204 #if FW_OBJECT_NAMES == 1 2205 const char* _formatString =
2206 "(%s) %s: Parameter file load failed. Clearing staging database and abandoning parameter file load.";
2208 const char* _formatString =
2209 "%s: Parameter file load failed. Clearing staging database and abandoning parameter file load.";
2213 (void) _logString.
format(
2216 this->m_objName.toChar(),
2218 "PrmDbFileLoadFailed " 2241 this->Time_out(0, _logTime);
2251 #if FW_AMPCS_COMPATIBLE 2256 static_cast<FwAssertArgType>(_status)
2260 #if FW_AMPCS_COMPATIBLE 2267 static_cast<FwAssertArgType>(_status)
2273 static_cast<FwAssertArgType>(_status)
2276 #if FW_AMPCS_COMPATIBLE 2283 static_cast<FwAssertArgType>(_status)
2289 static_cast<FwAssertArgType>(_status)
2302 #if FW_ENABLE_TEXT_LOGGING 2303 if (this->isConnected_LogText_OutputPort(0)) {
2304 #if FW_OBJECT_NAMES == 1 2305 const char* _formatString =
2306 "(%s) %s: Invalid action during parameter file load. Current state: %s, Action (Invalid for current state): %s.";
2308 const char* _formatString =
2309 "%s: Invalid action during parameter file load. Current state: %s, Action (Invalid for current state): %s.";
2313 currentState.toString(currentStateStr);
2315 attemptedAction.toString(attemptedActionStr);
2318 (void) _logString.
format(
2321 this->m_objName.toChar(),
2323 "PrmDbFileLoadInvalidAction ",
2324 currentStateStr.
toChar(),
2325 attemptedActionStr.
toChar()
2348 this->Time_out(0, _logTime);
2358 #if FW_AMPCS_COMPATIBLE 2363 static_cast<FwAssertArgType>(_status)
2367 #if FW_AMPCS_COMPATIBLE 2370 static_cast<U8>(
sizeof(U32))
2374 static_cast<FwAssertArgType>(_status)
2380 static_cast<FwAssertArgType>(_status)
2383 #if FW_AMPCS_COMPATIBLE 2386 static_cast<U8>(
sizeof(U32))
2390 static_cast<FwAssertArgType>(_status)
2396 static_cast<FwAssertArgType>(_status)
2409 #if FW_ENABLE_TEXT_LOGGING 2410 if (this->isConnected_LogText_OutputPort(0)) {
2411 #if FW_OBJECT_NAMES == 1 2412 const char* _formatString =
2413 "(%s) %s: Parameter file failed CRC. Read: 0x%" PRIx32
" Computed: 0x%" PRIx32
"";
2415 const char* _formatString =
2416 "%s: Parameter file failed CRC. Read: 0x%" PRIx32
" Computed: 0x%" PRIx32
"";
2420 (void) _logString.
format(
2423 this->m_objName.toChar(),
2449 this->m_PrmIdNotFoundThrottle = 0;
2461 this->Time_out(0, _time);
2479 this->m_guardedPortMutex.
lock();
2485 this->m_guardedPortMutex.
unLock();
2495 ComponentIpcSerializableBuffer _msg;
2505 static_cast<FwAssertArgType>(_msgStatus)
2515 static_cast<FwAssertArgType>(_deserStatus)
2518 MsgTypeEnum _msgType =
static_cast<MsgTypeEnum
>(_desMsg);
2520 if (_msgType == PRMDB_COMPONENT_EXIT) {
2525 _deserStatus = _msg.deserializeTo(portNum);
2528 static_cast<FwAssertArgType>(_deserStatus)
2536 _deserStatus = _msg.deserializeTo(key);
2539 static_cast<FwAssertArgType>(_deserStatus)
2551 case SETPRM_PRMSET: {
2554 _deserStatus = _msg.deserializeTo(
id);
2557 static_cast<FwAssertArgType>(_deserStatus)
2562 _deserStatus = _msg.deserializeTo(val);
2565 static_cast<FwAssertArgType>(_deserStatus)
2578 case CMD_PRM_SAVE_FILE: {
2581 _deserStatus = _msg.deserializeTo(_opCode);
2584 static_cast<FwAssertArgType>(_deserStatus)
2589 _deserStatus = _msg.deserializeTo(_cmdSeq);
2592 static_cast<FwAssertArgType>(_deserStatus)
2597 _deserStatus = _msg.deserializeTo(args);
2600 static_cast<FwAssertArgType>(_deserStatus)
2608 #if FW_CMD_CHECK_RESIDUAL 2625 case CMD_PRM_LOAD_FILE: {
2628 _deserStatus = _msg.deserializeTo(_opCode);
2631 static_cast<FwAssertArgType>(_deserStatus)
2636 _deserStatus = _msg.deserializeTo(_cmdSeq);
2639 static_cast<FwAssertArgType>(_deserStatus)
2644 _deserStatus = _msg.deserializeTo(args);
2647 static_cast<FwAssertArgType>(_deserStatus)
2685 #if FW_CMD_CHECK_RESIDUAL 2706 case CMD_PRM_COMMIT_STAGED: {
2709 _deserStatus = _msg.deserializeTo(_opCode);
2712 static_cast<FwAssertArgType>(_deserStatus)
2717 _deserStatus = _msg.deserializeTo(_cmdSeq);
2720 static_cast<FwAssertArgType>(_deserStatus)
2725 _deserStatus = _msg.deserializeTo(args);
2728 static_cast<FwAssertArgType>(_deserStatus)
2736 #if FW_CMD_CHECK_RESIDUAL 2763 void PrmDbComponentBase ::
2774 compPtr->CmdDisp_handlerBase(
2796 return compPtr->getPrm_handlerBase(
2803 void PrmDbComponentBase ::
2812 compPtr->pingIn_handlerBase(
2818 void PrmDbComponentBase ::
2828 compPtr->setPrm_handlerBase(
2835 #if !FW_DIRECT_PORT_CALLS 2841 void PrmDbComponentBase ::
2849 static_cast<FwAssertArgType>(portNum)
2853 this->m_CmdReg_OutputPort[portNum].isConnected(),
2854 static_cast<FwAssertArgType>(portNum)
2856 this->m_CmdReg_OutputPort[portNum].
invoke(
2861 void PrmDbComponentBase ::
2871 static_cast<FwAssertArgType>(portNum)
2875 this->m_CmdStatus_OutputPort[portNum].isConnected(),
2876 static_cast<FwAssertArgType>(portNum)
2878 this->m_CmdStatus_OutputPort[portNum].
invoke(
2885 void PrmDbComponentBase ::
2896 static_cast<FwAssertArgType>(portNum)
2900 this->m_Log_OutputPort[portNum].isConnected(),
2901 static_cast<FwAssertArgType>(portNum)
2903 this->m_Log_OutputPort[portNum].
invoke(
2911 #if FW_ENABLE_TEXT_LOGGING 2913 void PrmDbComponentBase ::
2923 (0 <= portNum) && (portNum < this->getNum_LogText_OutputPorts()),
2924 static_cast<FwAssertArgType>(portNum)
2928 this->m_LogText_OutputPort[portNum].isConnected(),
2929 static_cast<FwAssertArgType>(portNum)
2931 this->m_LogText_OutputPort[portNum].invoke(
2941 void PrmDbComponentBase ::
2949 static_cast<FwAssertArgType>(portNum)
2953 this->m_Time_OutputPort[portNum].isConnected(),
2954 static_cast<FwAssertArgType>(portNum)
2956 this->m_Time_OutputPort[portNum].
invoke(
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.
Loads a file from storage into the staging database. The file could have selective IDs and not the wh...
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
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
Invalid Action during parameter file load.
void log_ACTIVITY_HI_PrmIdUpdated(FwPrmIdType Id) const
static constexpr FwIndexType getNum_pingOut_OutputPorts()
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 log_WARNING_HI_PrmFileReadError(const Svc::PrmDb_PrmReadError &stage, I32 record, I32 error) const
void log_ACTIVITY_HI_PrmFileSaveComplete(U32 records) const
void log_WARNING_HI_PrmFileWriteError(const Svc::PrmDb_PrmWriteError &stage, I32 record, I32 error) const
void invoke(U32 key) const
Invoke a port connection.
static constexpr FwIndexType getNum_Log_OutputPorts()
Parameter file load failed, not staging any update.
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.
Parameter ID added to database.
Enum representing a command response.
The size of the serial representation.
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()
The size of the serial representation.
Parameter ID updated in database.
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
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
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)
#define FW_MIN(a, b)
MIN macro (deprecated in C++, use std::min)
A less serious but recoverable event.
void init()
Initialization function.
Failed to write parameter file.
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
void unLock()
unlock the mutex and assert success
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)
Commits the backup database to become the prime (active) database.
A serious but recoverable event.
Errors dispatching messages.
The size of the serial representation.
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*.
Enum representing event severity.
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
virtual void PRM_LOAD_FILE_preMsgHook(FwOpcodeType opCode, U32 cmdSeq)
Pre-message hook for command PRM_LOAD_FILE.
Parameter database is full.
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)
void lock()
lock the mutex and assert success
PlatformQueuePriorityType FwQueuePriorityType
The type of queue priorities used.
Important informational events.
Save of parameter file completed.
parameter file failed CRC
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)
message to exit active component task
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.
Failed to read parameter file.
PlatformIndexType FwIndexType
All parameters Copied from one DB to another.
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.
Command to save parameter image to file. Uses file name passed to constructor.
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 incNumMsgDropped()
increment the number of messages dropped
void cmdResponse_out(FwOpcodeType opCode, U32 cmdSeq, Fw::CmdResponse response)
Emit command response.
RateGroupDivider component implementation.
message sent/received okay
Enum representing parameter validity.
static constexpr FwIndexType getNum_CmdDisp_InputPorts()
Fw::InputPrmGetPort * get_getPrm_InputPort(FwIndexType portNum)
static constexpr FwIndexType getNum_CmdReg_OutputPorts()
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.
virtual void PRM_SAVE_FILE_cmdHandler(FwOpcodeType opCode, U32 cmdSeq)=0
Parameter ID not found in database.
Throttle reset count for PrmIdNotFound.
static constexpr FwIndexType getNum_setPrm_InputPorts()
Load of parameter file completed.
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.
SerializeStatus serializeTo(SerialBufferBase &buffer, Endianness mode=Endianness::BIG) const override
Serialize the contents of this object to a buffer.
BYTE cmdPortSize[Fw::CmdPortBuffer::CAPACITY]