Adds immediate migration results in progress
This commit is contained in:
2102 files changed
+17482
-15071
No files matched your search
+15
-16
@@ -11,10 +11,9 @@
|
||||
|
||||
using namespace AlarmManagement;
|
||||
|
||||
HandlerParticipant::HandlerParticipant(const std::shared_ptr<DdsHandler> &ddsHandler)
|
||||
: QObject()
|
||||
, m_ddsHandler(ddsHandler)
|
||||
{
|
||||
HandlerParticipant::HandlerParticipant(const std::shared_ptr<DdsHandler> &ddsHandler) : QObject()
|
||||
, m_ddsHandler(ddsHandler),
|
||||
m_logger(NGL::NGLLoggerBootstrap::getLogger()) {
|
||||
} // end of ctor()
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
@@ -44,13 +43,13 @@ bool HandlerParticipant::init()
|
||||
|
||||
if (!dtcPpm->enableParticipant())
|
||||
{
|
||||
ERROR_LOG() << "Could not initialize ParticipantManagement enableParticipant data topic client";
|
||||
ERROR_LOG(m_logger) << "Could not initialize ParticipantManagement enableParticipant data topic client";
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!dtcPpm->enableDynamicParticipantData())
|
||||
{
|
||||
ERROR_LOG() << "Could not initialize ParticipantManagement enableDynamicParticipant data topic client";
|
||||
ERROR_LOG(m_logger) << "Could not initialize ParticipantManagement enableDynamicParticipant data topic client";
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -66,7 +65,7 @@ bool HandlerParticipant::init()
|
||||
if (participant.equipmentNumber().is_set())
|
||||
{
|
||||
m_partId2EquipNoMap.insert(participant.id(), participant.equipmentNumber().get());
|
||||
DEBUG_LOG() << "m_partId2EquipNoMap.insert participantId=" << participant.id() << "EquimentNo=" << participant.equipmentNumber().get();
|
||||
DEBUG_LOG(m_logger) << "m_partId2EquipNoMap.insert participantId=" << participant.id() << "EquimentNo=" << participant.equipmentNumber().get();
|
||||
}
|
||||
else
|
||||
m_partId2EquipNoMap.insert(participant.id(), 0);
|
||||
@@ -86,13 +85,13 @@ bool HandlerParticipant::init()
|
||||
ParticipantManagement::StateInformation state = states[0];
|
||||
int vulnerability = state.vulnerabilityState().underlying();
|
||||
m_partId2VulnerabilityMap.insert(i.value().participantId(), vulnerability);
|
||||
DEBUG_LOG() << "m_partId2EquipNoMap.insert participantId=" << i.value().participantId() << "vulnerability=" << vulnerability;
|
||||
DEBUG_LOG(m_logger) << "m_partId2EquipNoMap.insert participantId=" << i.value().participantId() << "vulnerability=" << vulnerability;
|
||||
}
|
||||
else
|
||||
m_partId2VulnerabilityMap.insert(i.value().participantId(), -1);
|
||||
}
|
||||
|
||||
INFO_LOG() << "HandlerParticipant::init() finished. ";
|
||||
INFO_LOG(m_logger) << "HandlerParticipant::init() finished. ";
|
||||
return true;
|
||||
} // end of init()
|
||||
//-----------------------------------------------------------------------------
|
||||
@@ -101,12 +100,12 @@ void HandlerParticipant::onParticipantChanged(const ParticipantManagement::Parti
|
||||
{
|
||||
if (modType == DataModification::eRemoved)
|
||||
{
|
||||
DEBUG_LOG() << "onParticipantChanged - remove: " << data.id();
|
||||
DEBUG_LOG(m_logger) << "onParticipantChanged - remove: " << data.id();
|
||||
m_participantHierarchy.remove(data.id());
|
||||
}
|
||||
else
|
||||
{
|
||||
DEBUG_LOG() << "onParticipantChanged:" << data;
|
||||
DEBUG_LOG(m_logger) << "onParticipantChanged:" << data;
|
||||
m_participantHierarchy.insert(data.id(),
|
||||
AlarmManagement::HandlerParticipant::ParticipantHierarchy(data));
|
||||
const int equipNo = data.equipmentNumber().is_set() ? data.equipmentNumber().get() : 0;
|
||||
@@ -117,13 +116,13 @@ void HandlerParticipant::onParticipantChanged(const ParticipantManagement::Parti
|
||||
|
||||
void HandlerParticipant::onDynamicParticipantChanged(const ParticipantManagement::DynamicParticipantData &data, DataModification modType)
|
||||
{
|
||||
DEBUG_LOG() << "onDynamicParticipant participantId=" << data.participantId();
|
||||
DEBUG_LOG(m_logger) << "onDynamicParticipant participantId=" << data.participantId();
|
||||
if (modType == DataModification::eRemoved)
|
||||
{
|
||||
}
|
||||
else
|
||||
{
|
||||
INFO_LOG() << "onDynamicParticipant()"
|
||||
INFO_LOG(m_logger) << "onDynamicParticipant()"
|
||||
<< " participantId: " << data.participantId();
|
||||
if (data.stateHistory().size() > 0)
|
||||
{
|
||||
@@ -131,7 +130,7 @@ void HandlerParticipant::onDynamicParticipantChanged(const ParticipantManagement
|
||||
ParticipantManagement::StateInformation state = states[0];
|
||||
int vulnerability = state.vulnerabilityState().underlying();
|
||||
m_partId2VulnerabilityMap.insert(data.participantId(), vulnerability);
|
||||
DEBUG_LOG() << "m_partId2EquipNoMap.insert participantId=" << data.participantId()
|
||||
DEBUG_LOG(m_logger) << "m_partId2EquipNoMap.insert participantId=" << data.participantId()
|
||||
<< " vulnerability=" << vulnerability;
|
||||
}
|
||||
else
|
||||
@@ -178,7 +177,7 @@ QVector<int> HandlerParticipant::getRecursiveInferiorIds(const int participantId
|
||||
int HandlerParticipant::participantId2EquipNo(const int participantId) const
|
||||
{
|
||||
int ret = m_partId2EquipNoMap.value(participantId, 0);
|
||||
INFO_LOG() << "participantId2EquipNo participantId=" << participantId
|
||||
INFO_LOG(m_logger) << "participantId2EquipNo participantId=" << participantId
|
||||
<< " EquipmentNumber=" << ret;
|
||||
return ret;
|
||||
} // end of participantId2EquipNo()
|
||||
@@ -186,7 +185,7 @@ int HandlerParticipant::participantId2EquipNo(const int participantId) const
|
||||
int HandlerParticipant::participantId2Vulnerability(const int participantId) const
|
||||
{
|
||||
int ret = m_partId2VulnerabilityMap.value(participantId, 0);
|
||||
INFO_LOG() << "m_partId2VulnerabilityMap participantId=" << participantId
|
||||
INFO_LOG(m_logger) << "m_partId2VulnerabilityMap participantId=" << participantId
|
||||
<< " Vulnerability=" << ret;
|
||||
return ret;
|
||||
} // end of participantId2Vulnerability()
|
||||
Reference in new issue
Block a user