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];
83 #if !FW_DIRECT_PORT_CALLS 90 this->m_CmdDisp_InputPort[port].
init();
95 this->m_CmdDisp_InputPort[port].
setPortNum(port);
97 #if FW_OBJECT_NAMES == 1 101 this->m_objName.toChar(),
104 this->m_CmdDisp_InputPort[port].setObjName(portName.
toChar());
109 #if !FW_DIRECT_PORT_CALLS 116 this->m_getPrm_InputPort[port].
init();
121 this->m_getPrm_InputPort[port].
setPortNum(port);
123 #if FW_OBJECT_NAMES == 1 127 this->m_objName.toChar(),
130 this->m_getPrm_InputPort[port].setObjName(portName.
toChar());
135 #if !FW_DIRECT_PORT_CALLS 142 this->m_pingIn_InputPort[port].
init();
147 this->m_pingIn_InputPort[port].
setPortNum(port);
149 #if FW_OBJECT_NAMES == 1 153 this->m_objName.toChar(),
156 this->m_pingIn_InputPort[port].setObjName(portName.
toChar());
161 #if !FW_DIRECT_PORT_CALLS 168 this->m_setPrm_InputPort[port].
init();
173 this->m_setPrm_InputPort[port].
setPortNum(port);
175 #if FW_OBJECT_NAMES == 1 179 this->m_objName.toChar(),
182 this->m_setPrm_InputPort[port].setObjName(portName.
toChar());
187 #if !FW_DIRECT_PORT_CALLS 194 this->m_CmdReg_OutputPort[port].
init();
196 #if FW_OBJECT_NAMES == 1 200 this->m_objName.toChar(),
203 this->m_CmdReg_OutputPort[port].setObjName(portName.
toChar());
208 #if !FW_DIRECT_PORT_CALLS 215 this->m_CmdStatus_OutputPort[port].
init();
217 #if FW_OBJECT_NAMES == 1 221 this->m_objName.toChar(),
224 this->m_CmdStatus_OutputPort[port].setObjName(portName.
toChar());
229 #if !FW_DIRECT_PORT_CALLS 236 this->m_Log_OutputPort[port].
init();
238 #if FW_OBJECT_NAMES == 1 242 this->m_objName.toChar(),
245 this->m_Log_OutputPort[port].setObjName(portName.
toChar());
250 #if !FW_DIRECT_PORT_CALLS && FW_ENABLE_TEXT_LOGGING 254 port < static_cast<FwIndexType>(this->getNum_LogText_OutputPorts());
257 this->m_LogText_OutputPort[port].
init();
259 #if FW_OBJECT_NAMES == 1 263 this->m_objName.toChar(),
266 this->m_LogText_OutputPort[port].setObjName(portName.
toChar());
271 #if !FW_DIRECT_PORT_CALLS 278 this->m_Time_OutputPort[port].
init();
280 #if FW_OBJECT_NAMES == 1 284 this->m_objName.toChar(),
287 this->m_Time_OutputPort[port].setObjName(portName.
toChar());
292 #if !FW_DIRECT_PORT_CALLS 299 this->m_pingOut_OutputPort[port].
init();
301 #if FW_OBJECT_NAMES == 1 305 this->m_objName.toChar(),
308 this->m_pingOut_OutputPort[port].setObjName(portName.
toChar());
316 static_cast<FwSizeType>(ComponentIpcSerializableBuffer::SERIALIZATION_SIZE)
320 static_cast<FwAssertArgType>(qStat)
324 #if !FW_DIRECT_PORT_CALLS 335 static_cast<FwAssertArgType>(portNum)
338 return &this->m_CmdDisp_InputPort[portNum];
343 #if !FW_DIRECT_PORT_CALLS 354 static_cast<FwAssertArgType>(portNum)
357 return &this->m_getPrm_InputPort[portNum];
365 static_cast<FwAssertArgType>(portNum)
368 return &this->m_pingIn_InputPort[portNum];
376 static_cast<FwAssertArgType>(portNum)
379 return &this->m_setPrm_InputPort[portNum];
384 #if !FW_DIRECT_PORT_CALLS 398 static_cast<FwAssertArgType>(portNum)
401 this->m_CmdReg_OutputPort[portNum].
addCallPort(port);
412 static_cast<FwAssertArgType>(portNum)
415 this->m_CmdStatus_OutputPort[portNum].
addCallPort(port);
426 static_cast<FwAssertArgType>(portNum)
432 #if FW_ENABLE_TEXT_LOGGING == 1 434 void PrmDbComponentBase ::
435 set_LogText_OutputPort(
441 (0 <= portNum) && (portNum < this->getNum_LogText_OutputPorts()),
442 static_cast<FwAssertArgType>(portNum)
445 this->m_LogText_OutputPort[portNum].addCallPort(port);
458 static_cast<FwAssertArgType>(portNum)
461 this->m_Time_OutputPort[portNum].
addCallPort(port);
466 #if !FW_DIRECT_PORT_CALLS 480 static_cast<FwAssertArgType>(portNum)
483 this->m_pingOut_OutputPort[portNum].
addCallPort(port);
488 #if !FW_DIRECT_PORT_CALLS && FW_PORT_SERIALIZATION 497 Fw::InputSerializePort* port
502 static_cast<FwAssertArgType>(portNum)
505 this->m_CmdReg_OutputPort[portNum].registerSerialPort(port);
511 Fw::InputSerializePort* port
516 static_cast<FwAssertArgType>(portNum)
519 this->m_CmdStatus_OutputPort[portNum].registerSerialPort(port);
525 Fw::InputSerializePort* port
530 static_cast<FwAssertArgType>(portNum)
533 this->m_Log_OutputPort[portNum].registerSerialPort(port);
536 #if FW_ENABLE_TEXT_LOGGING == 1 538 void PrmDbComponentBase ::
539 set_LogText_OutputPort(
541 Fw::InputSerializePort* port
545 (0 <= portNum) && (portNum < this->getNum_LogText_OutputPorts()),
546 static_cast<FwAssertArgType>(portNum)
549 this->m_LogText_OutputPort[portNum].registerSerialPort(port);
557 Fw::InputSerializePort* port
562 static_cast<FwAssertArgType>(portNum)
565 this->m_Time_OutputPort[portNum].registerSerialPort(port);
570 #if !FW_DIRECT_PORT_CALLS && FW_PORT_SERIALIZATION 579 Fw::InputSerializePort* port
584 static_cast<FwAssertArgType>(portNum)
587 this->m_pingOut_OutputPort[portNum].registerSerialPort(port);
623 Fw::ActiveComponentBase(compName)
625 this->m_PrmIdNotFoundThrottle = 0;
634 #if !FW_DIRECT_PORT_CALLS 645 static_cast<FwAssertArgType>(portNum)
648 return this->m_CmdReg_OutputPort[portNum].
isConnected();
656 static_cast<FwAssertArgType>(portNum)
659 return this->m_CmdStatus_OutputPort[portNum].
isConnected();
667 static_cast<FwAssertArgType>(portNum)
670 return this->m_Log_OutputPort[portNum].
isConnected();
673 #if FW_ENABLE_TEXT_LOGGING == 1 675 bool PrmDbComponentBase ::
676 isConnected_LogText_OutputPort(
FwIndexType portNum)
const 679 (0 <= portNum) && (portNum < this->getNum_LogText_OutputPorts()),
680 static_cast<FwAssertArgType>(portNum)
683 return this->m_LogText_OutputPort[portNum].isConnected();
693 static_cast<FwAssertArgType>(portNum)
696 return this->m_Time_OutputPort[portNum].
isConnected();
701 #if !FW_DIRECT_PORT_CALLS 712 static_cast<FwAssertArgType>(portNum)
715 return this->m_pingOut_OutputPort[portNum].
isConnected();
736 FW_ASSERT(opCode >= idBase, static_cast<FwAssertArgType>(opCode), static_cast<FwAssertArgType>(idBase));
739 switch (opCode - idBase) {
788 static_cast<FwAssertArgType>(portNum)
818 static_cast<FwAssertArgType>(portNum)
826 ComponentIpcSerializableBuffer msg;
830 _status = msg.serializeFrom(
831 static_cast<FwEnumStoreType>(PINGIN_PING)
835 static_cast<FwAssertArgType>(_status)
839 _status = msg.serializeFrom(portNum);
842 static_cast<FwAssertArgType>(_status)
846 _status = msg.serializeFrom(key);
849 static_cast<FwAssertArgType>(_status)
858 static_cast<FwAssertArgType>(qStatus)
872 static_cast<FwAssertArgType>(portNum)
881 ComponentIpcSerializableBuffer msg;
885 _status = msg.serializeFrom(
886 static_cast<FwEnumStoreType>(SETPRM_PRMSET)
890 static_cast<FwAssertArgType>(_status)
894 _status = msg.serializeFrom(portNum);
897 static_cast<FwAssertArgType>(_status)
901 _status = msg.serializeFrom(
id);
904 static_cast<FwAssertArgType>(_status)
908 _status = msg.serializeFrom(val);
911 static_cast<FwAssertArgType>(_status)
920 static_cast<FwAssertArgType>(qStatus)
951 #if !FW_DIRECT_PORT_CALLS 965 static_cast<FwAssertArgType>(portNum)
969 this->m_pingOut_OutputPort[portNum].isConnected(),
970 static_cast<FwAssertArgType>(portNum)
972 this->m_pingOut_OutputPort[portNum].
invoke(
991 this->CmdStatus_out(0, opCode, cmdSeq, response);
1012 ComponentIpcSerializableBuffer msg;
1016 _status = msg.serializeFrom(static_cast<FwEnumStoreType>(CMD_PRM_SAVE_FILE));
1019 static_cast<FwAssertArgType>(_status)
1025 _status = msg.serializeFrom(port);
1028 static_cast<FwAssertArgType>(_status)
1031 _status = msg.serializeFrom(opCode);
1034 static_cast<FwAssertArgType>(_status)
1037 _status = msg.serializeFrom(cmdSeq);
1040 static_cast<FwAssertArgType>(_status)
1043 _status = msg.serializeFrom(args);
1046 static_cast<FwAssertArgType>(_status)
1055 static_cast<FwAssertArgType>(qStatus)
1071 ComponentIpcSerializableBuffer msg;
1075 _status = msg.serializeFrom(static_cast<FwEnumStoreType>(CMD_PRM_LOAD_FILE));
1078 static_cast<FwAssertArgType>(_status)
1084 _status = msg.serializeFrom(port);
1087 static_cast<FwAssertArgType>(_status)
1090 _status = msg.serializeFrom(opCode);
1093 static_cast<FwAssertArgType>(_status)
1096 _status = msg.serializeFrom(cmdSeq);
1099 static_cast<FwAssertArgType>(_status)
1102 _status = msg.serializeFrom(args);
1105 static_cast<FwAssertArgType>(_status)
1114 static_cast<FwAssertArgType>(qStatus)
1130 ComponentIpcSerializableBuffer msg;
1134 _status = msg.serializeFrom(static_cast<FwEnumStoreType>(CMD_PRM_COMMIT_STAGED));
1137 static_cast<FwAssertArgType>(_status)
1143 _status = msg.serializeFrom(port);
1146 static_cast<FwAssertArgType>(_status)
1149 _status = msg.serializeFrom(opCode);
1152 static_cast<FwAssertArgType>(_status)
1155 _status = msg.serializeFrom(cmdSeq);
1158 static_cast<FwAssertArgType>(_status)
1161 _status = msg.serializeFrom(args);
1164 static_cast<FwAssertArgType>(_status)
1173 static_cast<FwAssertArgType>(qStatus)
1230 this->m_PrmIdNotFoundThrottle++;
1236 this->Time_out(0, _logTime);
1246 #if FW_AMPCS_COMPATIBLE 1251 static_cast<FwAssertArgType>(_status)
1255 #if FW_AMPCS_COMPATIBLE 1262 static_cast<FwAssertArgType>(_status)
1268 static_cast<FwAssertArgType>(_status)
1281 #if FW_ENABLE_TEXT_LOGGING 1282 if (this->isConnected_LogText_OutputPort(0)) {
1283 #if FW_OBJECT_NAMES == 1 1284 const char* _formatString =
1285 "(%s) %s: Parameter ID 0x%" PRIx32
" not found";
1287 const char* _formatString =
1288 "%s: Parameter ID 0x%" PRIx32
" not found";
1295 this->m_objName.toChar(),
1318 this->Time_out(0, _logTime);
1328 #if FW_AMPCS_COMPATIBLE 1333 static_cast<FwAssertArgType>(_status)
1337 #if FW_AMPCS_COMPATIBLE 1344 static_cast<FwAssertArgType>(_status)
1350 static_cast<FwAssertArgType>(_status)
1363 #if FW_ENABLE_TEXT_LOGGING 1364 if (this->isConnected_LogText_OutputPort(0)) {
1365 #if FW_OBJECT_NAMES == 1 1366 const char* _formatString =
1367 "(%s) %s: Parameter ID 0x%" PRIx32
" updated";
1369 const char* _formatString =
1370 "%s: Parameter ID 0x%" PRIx32
" updated";
1377 this->m_objName.toChar(),
1400 this->Time_out(0, _logTime);
1410 #if FW_AMPCS_COMPATIBLE 1415 static_cast<FwAssertArgType>(_status)
1419 #if FW_AMPCS_COMPATIBLE 1426 static_cast<FwAssertArgType>(_status)
1432 static_cast<FwAssertArgType>(_status)
1445 #if FW_ENABLE_TEXT_LOGGING 1446 if (this->isConnected_LogText_OutputPort(0)) {
1447 #if FW_OBJECT_NAMES == 1 1448 const char* _formatString =
1449 "(%s) %s: Parameter DB full when adding ID 0x%" PRIx32
" ";
1451 const char* _formatString =
1452 "%s: Parameter DB full when adding ID 0x%" PRIx32
" ";
1459 this->m_objName.toChar(),
1482 this->Time_out(0, _logTime);
1492 #if FW_AMPCS_COMPATIBLE 1497 static_cast<FwAssertArgType>(_status)
1501 #if FW_AMPCS_COMPATIBLE 1508 static_cast<FwAssertArgType>(_status)
1514 static_cast<FwAssertArgType>(_status)
1527 #if FW_ENABLE_TEXT_LOGGING 1528 if (this->isConnected_LogText_OutputPort(0)) {
1529 #if FW_OBJECT_NAMES == 1 1530 const char* _formatString =
1531 "(%s) %s: Parameter ID 0x%" PRIx32
" added";
1533 const char* _formatString =
1534 "%s: Parameter ID 0x%" PRIx32
" added";
1541 this->m_objName.toChar(),
1568 this->Time_out(0, _logTime);
1578 #if FW_AMPCS_COMPATIBLE 1583 static_cast<FwAssertArgType>(_status)
1587 #if FW_AMPCS_COMPATIBLE 1594 static_cast<FwAssertArgType>(_status)
1600 static_cast<FwAssertArgType>(_status)
1603 #if FW_AMPCS_COMPATIBLE 1606 static_cast<U8>(
sizeof(I32))
1610 static_cast<FwAssertArgType>(_status)
1616 static_cast<FwAssertArgType>(_status)
1619 #if FW_AMPCS_COMPATIBLE 1622 static_cast<U8>(
sizeof(I32))
1626 static_cast<FwAssertArgType>(_status)
1632 static_cast<FwAssertArgType>(_status)
1645 #if FW_ENABLE_TEXT_LOGGING 1646 if (this->isConnected_LogText_OutputPort(0)) {
1647 #if FW_OBJECT_NAMES == 1 1648 const char* _formatString =
1649 "(%s) %s: Parameter write failed in stage %s with record %" PRIi32
" and error %" PRIi32
"";
1651 const char* _formatString =
1652 "%s: Parameter write failed in stage %s with record %" PRIi32
" and error %" PRIi32
"";
1656 stage.toString(stageStr);
1662 this->m_objName.toChar(),
1664 "PrmFileWriteError ",
1687 this->Time_out(0, _logTime);
1697 #if FW_AMPCS_COMPATIBLE 1702 static_cast<FwAssertArgType>(_status)
1706 #if FW_AMPCS_COMPATIBLE 1709 static_cast<U8>(
sizeof(U32))
1713 static_cast<FwAssertArgType>(_status)
1719 static_cast<FwAssertArgType>(_status)
1732 #if FW_ENABLE_TEXT_LOGGING 1733 if (this->isConnected_LogText_OutputPort(0)) {
1734 #if FW_OBJECT_NAMES == 1 1735 const char* _formatString =
1736 "(%s) %s: Parameter file save completed. Wrote %" PRIu32
" records.";
1738 const char* _formatString =
1739 "%s: Parameter file save completed. Wrote %" PRIu32
" records.";
1746 this->m_objName.toChar(),
1748 "PrmFileSaveComplete ",
1773 this->Time_out(0, _logTime);
1783 #if FW_AMPCS_COMPATIBLE 1788 static_cast<FwAssertArgType>(_status)
1792 #if FW_AMPCS_COMPATIBLE 1799 static_cast<FwAssertArgType>(_status)
1805 static_cast<FwAssertArgType>(_status)
1808 #if FW_AMPCS_COMPATIBLE 1811 static_cast<U8>(
sizeof(I32))
1815 static_cast<FwAssertArgType>(_status)
1821 static_cast<FwAssertArgType>(_status)
1824 #if FW_AMPCS_COMPATIBLE 1827 static_cast<U8>(
sizeof(I32))
1831 static_cast<FwAssertArgType>(_status)
1837 static_cast<FwAssertArgType>(_status)
1850 #if FW_ENABLE_TEXT_LOGGING 1851 if (this->isConnected_LogText_OutputPort(0)) {
1852 #if FW_OBJECT_NAMES == 1 1853 const char* _formatString =
1854 "(%s) %s: Parameter file read failed in stage %s with record %" PRIi32
" and error %" PRIi32
"";
1856 const char* _formatString =
1857 "%s: Parameter file read failed in stage %s with record %" PRIi32
" and error %" PRIi32
"";
1861 stage.toString(stageStr);
1867 this->m_objName.toChar(),
1869 "PrmFileReadError ",
1897 this->Time_out(0, _logTime);
1907 #if FW_AMPCS_COMPATIBLE 1912 static_cast<FwAssertArgType>(_status)
1922 static_cast<FwAssertArgType>(_status)
1925 #if FW_AMPCS_COMPATIBLE 1928 static_cast<U8>(
sizeof(U32))
1932 static_cast<FwAssertArgType>(_status)
1938 static_cast<FwAssertArgType>(_status)
1941 #if FW_AMPCS_COMPATIBLE 1944 static_cast<U8>(
sizeof(U32))
1948 static_cast<FwAssertArgType>(_status)
1954 static_cast<FwAssertArgType>(_status)
1957 #if FW_AMPCS_COMPATIBLE 1960 static_cast<U8>(
sizeof(U32))
1964 static_cast<FwAssertArgType>(_status)
1970 static_cast<FwAssertArgType>(_status)
1983 #if FW_ENABLE_TEXT_LOGGING 1984 if (this->isConnected_LogText_OutputPort(0)) {
1985 #if FW_OBJECT_NAMES == 1 1986 const char* _formatString =
1987 "(%s) %s: Parameter file load completed. Database: %s, Records: %" PRIu32
" (%" PRIu32
" added and %" PRIu32
" updated).";
1989 const char* _formatString =
1990 "%s: Parameter file load completed. Database: %s, Records: %" PRIu32
" (%" PRIu32
" added and %" PRIu32
" updated).";
1997 this->m_objName.toChar(),
1999 "PrmFileLoadComplete ",
2023 this->Time_out(0, _logTime);
2032 #if FW_AMPCS_COMPATIBLE 2038 static_cast<FwAssertArgType>(_status)
2052 #if FW_ENABLE_TEXT_LOGGING 2053 if (this->isConnected_LogText_OutputPort(0)) {
2054 #if FW_OBJECT_NAMES == 1 2055 const char* _formatString =
2056 "(%s) %s: Parameter DB commit complete, staged updates are now active.";
2058 const char* _formatString =
2059 "%s: Parameter DB commit complete, staged updates are now active.";
2066 this->m_objName.toChar(),
2068 "PrmDbCommitComplete " 2091 this->Time_out(0, _logTime);
2101 #if FW_AMPCS_COMPATIBLE 2106 static_cast<FwAssertArgType>(_status)
2116 static_cast<FwAssertArgType>(_status)
2125 static_cast<FwAssertArgType>(_status)
2138 #if FW_ENABLE_TEXT_LOGGING 2139 if (this->isConnected_LogText_OutputPort(0)) {
2140 #if FW_OBJECT_NAMES == 1 2141 const char* _formatString =
2142 "(%s) %s: All parameters copied. Source database: %s, Destination database: %s.";
2144 const char* _formatString =
2145 "%s: All parameters copied. Source database: %s, Destination database: %s.";
2152 this->m_objName.toChar(),
2154 "PrmDbCopyAllComplete ",
2155 databaseStringSrc.
toChar(),
2156 databaseStringDest.
toChar()
2176 this->Time_out(0, _logTime);
2185 #if FW_AMPCS_COMPATIBLE 2191 static_cast<FwAssertArgType>(_status)
2205 #if FW_ENABLE_TEXT_LOGGING 2206 if (this->isConnected_LogText_OutputPort(0)) {
2207 #if FW_OBJECT_NAMES == 1 2208 const char* _formatString =
2209 "(%s) %s: Parameter file load failed. Clearing staging database and abandoning parameter file load.";
2211 const char* _formatString =
2212 "%s: Parameter file load failed. Clearing staging database and abandoning parameter file load.";
2219 this->m_objName.toChar(),
2221 "PrmDbFileLoadFailed " 2244 this->Time_out(0, _logTime);
2254 #if FW_AMPCS_COMPATIBLE 2259 static_cast<FwAssertArgType>(_status)
2263 #if FW_AMPCS_COMPATIBLE 2270 static_cast<FwAssertArgType>(_status)
2276 static_cast<FwAssertArgType>(_status)
2279 #if FW_AMPCS_COMPATIBLE 2286 static_cast<FwAssertArgType>(_status)
2292 static_cast<FwAssertArgType>(_status)
2305 #if FW_ENABLE_TEXT_LOGGING 2306 if (this->isConnected_LogText_OutputPort(0)) {
2307 #if FW_OBJECT_NAMES == 1 2308 const char* _formatString =
2309 "(%s) %s: Invalid action during parameter file load. Current state: %s, Action (Invalid for current state): %s.";
2311 const char* _formatString =
2312 "%s: Invalid action during parameter file load. Current state: %s, Action (Invalid for current state): %s.";
2316 currentState.toString(currentStateStr);
2318 attemptedAction.toString(attemptedActionStr);
2324 this->m_objName.toChar(),
2326 "PrmDbFileLoadInvalidAction ",
2327 currentStateStr.
toChar(),
2328 attemptedActionStr.
toChar()
2351 this->Time_out(0, _logTime);
2361 #if FW_AMPCS_COMPATIBLE 2366 static_cast<FwAssertArgType>(_status)
2370 #if FW_AMPCS_COMPATIBLE 2373 static_cast<U8>(
sizeof(U32))
2377 static_cast<FwAssertArgType>(_status)
2383 static_cast<FwAssertArgType>(_status)
2386 #if FW_AMPCS_COMPATIBLE 2389 static_cast<U8>(
sizeof(U32))
2393 static_cast<FwAssertArgType>(_status)
2399 static_cast<FwAssertArgType>(_status)
2412 #if FW_ENABLE_TEXT_LOGGING 2413 if (this->isConnected_LogText_OutputPort(0)) {
2414 #if FW_OBJECT_NAMES == 1 2415 const char* _formatString =
2416 "(%s) %s: Parameter file failed CRC. Read: 0x%" PRIx32
" Computed: 0x%" PRIx32
"";
2418 const char* _formatString =
2419 "%s: Parameter file failed CRC. Read: 0x%" PRIx32
" Computed: 0x%" PRIx32
"";
2426 this->m_objName.toChar(),
2452 this->m_PrmIdNotFoundThrottle = 0;
2464 this->Time_out(0, _time);
2482 this->m_guardedPortMutex.
lock();
2488 this->m_guardedPortMutex.
unLock();
2498 ComponentIpcSerializableBuffer _msg;
2508 static_cast<FwAssertArgType>(_msgStatus)
2518 static_cast<FwAssertArgType>(_deserStatus)
2521 MsgTypeEnum _msgType =
static_cast<MsgTypeEnum
>(_desMsg);
2523 if (_msgType == PRMDB_COMPONENT_EXIT) {
2528 _deserStatus = _msg.deserializeTo(portNum);
2531 static_cast<FwAssertArgType>(_deserStatus)
2539 _deserStatus = _msg.deserializeTo(key);
2542 static_cast<FwAssertArgType>(_deserStatus)
2554 case SETPRM_PRMSET: {
2557 _deserStatus = _msg.deserializeTo(
id);
2560 static_cast<FwAssertArgType>(_deserStatus)
2565 _deserStatus = _msg.deserializeTo(val);
2568 static_cast<FwAssertArgType>(_deserStatus)
2581 case CMD_PRM_SAVE_FILE: {
2584 _deserStatus = _msg.deserializeTo(_opCode);
2587 static_cast<FwAssertArgType>(_deserStatus)
2592 _deserStatus = _msg.deserializeTo(_cmdSeq);
2595 static_cast<FwAssertArgType>(_deserStatus)
2600 _deserStatus = _msg.deserializeTo(args);
2603 static_cast<FwAssertArgType>(_deserStatus)
2611 #if FW_CMD_CHECK_RESIDUAL 2628 case CMD_PRM_LOAD_FILE: {
2631 _deserStatus = _msg.deserializeTo(_opCode);
2634 static_cast<FwAssertArgType>(_deserStatus)
2639 _deserStatus = _msg.deserializeTo(_cmdSeq);
2642 static_cast<FwAssertArgType>(_deserStatus)
2647 _deserStatus = _msg.deserializeTo(args);
2650 static_cast<FwAssertArgType>(_deserStatus)
2688 #if FW_CMD_CHECK_RESIDUAL 2709 case CMD_PRM_COMMIT_STAGED: {
2712 _deserStatus = _msg.deserializeTo(_opCode);
2715 static_cast<FwAssertArgType>(_deserStatus)
2720 _deserStatus = _msg.deserializeTo(_cmdSeq);
2723 static_cast<FwAssertArgType>(_deserStatus)
2728 _deserStatus = _msg.deserializeTo(args);
2731 static_cast<FwAssertArgType>(_deserStatus)
2739 #if FW_CMD_CHECK_RESIDUAL 2766 void PrmDbComponentBase ::
2777 compPtr->CmdDisp_handlerBase(
2799 return compPtr->getPrm_handlerBase(
2806 void PrmDbComponentBase ::
2815 compPtr->pingIn_handlerBase(
2821 void PrmDbComponentBase ::
2831 compPtr->setPrm_handlerBase(
2838 #if !FW_DIRECT_PORT_CALLS 2844 void PrmDbComponentBase ::
2852 static_cast<FwAssertArgType>(portNum)
2856 this->m_CmdReg_OutputPort[portNum].isConnected(),
2857 static_cast<FwAssertArgType>(portNum)
2859 this->m_CmdReg_OutputPort[portNum].
invoke(
2864 void PrmDbComponentBase ::
2874 static_cast<FwAssertArgType>(portNum)
2878 this->m_CmdStatus_OutputPort[portNum].isConnected(),
2879 static_cast<FwAssertArgType>(portNum)
2881 this->m_CmdStatus_OutputPort[portNum].
invoke(
2888 void PrmDbComponentBase ::
2899 static_cast<FwAssertArgType>(portNum)
2903 this->m_Log_OutputPort[portNum].isConnected(),
2904 static_cast<FwAssertArgType>(portNum)
2906 this->m_Log_OutputPort[portNum].
invoke(
2914 #if FW_ENABLE_TEXT_LOGGING 2916 void PrmDbComponentBase ::
2926 (0 <= portNum) && (portNum < this->getNum_LogText_OutputPorts()),
2927 static_cast<FwAssertArgType>(portNum)
2931 this->m_LogText_OutputPort[portNum].isConnected(),
2932 static_cast<FwAssertArgType>(portNum)
2934 this->m_LogText_OutputPort[portNum].invoke(
2944 void PrmDbComponentBase ::
2952 static_cast<FwAssertArgType>(portNum)
2956 this->m_Time_OutputPort[portNum].isConnected(),
2957 static_cast<FwAssertArgType>(portNum)
2959 this->m_Time_OutputPort[portNum].
invoke(
void set_CmdReg_OutputPort(FwIndexType portNum, Fw::InputCmdRegPort *port)
Connect port to CmdReg[portNum].
Save of parameter file completed.
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.
message to exit active component task
static constexpr FwSizeType CAPACITY
Failed to read parameter file.
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.
All parameters Copied from one DB to another.
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
Failed to write parameter file.
Status
status returned from the queue send function
void log_ACTIVITY_HI_PrmIdUpdated(FwPrmIdType Id) const
static constexpr FwIndexType getNum_pingOut_OutputPorts()
PrmDbComponentBase(const char *compName="")
Construct PrmDbComponentBase object.
FwIdType FwPrmIdType
The type of a parameter identifier.
void unLock()
unlock the mutex and assert success
void log_ACTIVITY_HI_PrmFileSaveComplete(U32 records) const
void invoke(U32 key) const
Invoke a port connection.
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.
Throttle reset count for PrmIdNotFound.
Loads a file from storage into the staging database. The file could have selective IDs and not the wh...
Enum representing a command response.
parameter file failed CRC
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
Commits the backup database to become the prime (active) database.
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.
Parameter ID added to database.
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.
Parameter file load failed, not staging any update.
void log_WARNING_HI_PrmFileReadError(Svc::PrmDb_PrmReadError stage, I32 record, I32 error) const
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()
Parameter ID not found in database.
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)
The size of the serial representation.
Os::Queue::Status createQueue(FwSizeType depth, FwSizeType msgSize)
void log_WARNING_LO_PrmDbFileLoadInvalidAction(Svc::PrmDb_PrmDbFileLoadState currentState, Svc::PrmDb_PrmLoadAction attemptedAction) const
#define FW_MIN(a, b)
MIN macro (deprecated in C++, use std::min)
A less serious but recoverable event.
void init()
Initialization function.
The size of the serial representation.
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)
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.
void invoke(FwOpcodeType opCode, U32 cmdSeq, const Fw::CmdResponse &response) const
Invoke a port connection.
bool isConnected_pingOut_OutputPort(FwIndexType portNum) const
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.
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.
Command to save parameter image to file. Uses file name passed to constructor.
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.
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 connection.
void log_WARNING_LO_PrmIdNotFound(FwPrmIdType Id)
Load of parameter file completed.
A message was sent requesting an exit of the loop.
Invalid Action during parameter file load.
The size of the serial representation.
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.
Parameter database is full.
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()
Fw::InputPrmGetPort * get_getPrm_InputPort(FwIndexType portNum)
static constexpr FwIndexType getNum_CmdReg_OutputPorts()
The size of the serial representation.
Parameter ID updated in database.
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
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
Committed staged parameter updates.
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.