Skip to content
Snippets Groups Projects
Commit 114c1e37 authored by Marco Filho's avatar Marco Filho
Browse files

Add checking for ring integrity

If check is not made, ioc will try to write to register in the beginning and fail, crashing the application.
parent 6ad12420
No related branches found
No related tags found
1 merge request!5Use new API architecture.
...@@ -20,12 +20,14 @@ VMMTbl::VMMTbl(RMM* rmm, const char *FENPortName, int ring, int node, int hybrid ...@@ -20,12 +20,14 @@ VMMTbl::VMMTbl(RMM* rmm, const char *FENPortName, int ring, int node, int hybrid
createEpicsParams(); createEpicsParams();
setInitialEpicsParams(); setInitialEpicsParams();
rmm->updateTopologyPvs(ring, node, "vmmTbl"); rmm->updateTopologyPvs(ring, node, "vmmTbl");
for (int hyb = 0; hyb < number_hybrids; hyb++) { if (rmm->getRMMAPI()->checkRings() == rmmSuccess) {
pVmmTblAPI->enableHybrid(hyb, true); for (int hyb = 0; hyb < number_hybrids; hyb++) {
setStringParam(vmmHybFwVersion_[hyb], pVmmTblAPI->readFwVersion(hyb).c_str()); pVmmTblAPI->enableHybrid(hyb, true);
setStringParam(vmmHybId_[hyb], pVmmTblAPI->readIDChip(hyb).c_str()); setStringParam(vmmHybFwVersion_[hyb], pVmmTblAPI->readFwVersion(hyb).c_str());
setStringParam(vmmHybGeoPos_[hyb], pVmmTblAPI->readGeoPos(hyb).c_str()); setStringParam(vmmHybId_[hyb], pVmmTblAPI->readIDChip(hyb).c_str());
setIntegerParam(vmmHybLinkStatus_[hyb], std::stoi(pVmmTblAPI->checkLinkStatus(hyb))); setStringParam(vmmHybGeoPos_[hyb], pVmmTblAPI->readGeoPos(hyb).c_str());
setIntegerParam(vmmHybLinkStatus_[hyb], std::stoi(pVmmTblAPI->checkLinkStatus(hyb)));
}
} }
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment