Adds immediate migration results in progress
This commit is contained in:
2102 files changed
+17482
-15071
No files matched your search
+29
-29
@@ -49,14 +49,14 @@ bool HandlerOcSituationData::init()
|
||||
!m_ppmDtc->enableParty() ||
|
||||
!m_ppmDtc->enableType())
|
||||
{
|
||||
ERROR_LOG() << "Enabling PPM Data-Topics failed.";
|
||||
ERROR_LOG(m_logger) << "Enabling PPM Data-Topics failed.";
|
||||
return false;
|
||||
}
|
||||
|
||||
// PPM FTC enable
|
||||
if (!m_ppmFtc->enableModifyParticipantData())
|
||||
{
|
||||
ERROR_LOG() << "Enabling PPM Data-Topics failed.";
|
||||
ERROR_LOG(m_logger) << "Enabling PPM Data-Topics failed.";
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -67,25 +67,25 @@ bool HandlerOcSituationData::init()
|
||||
!m_tabDts->enableParticipantSanitation() ||
|
||||
!m_tabDts->enableSpecialSensorData())
|
||||
{
|
||||
ERROR_LOG() << "Enabling TAB DTS Data-Topics failed.";
|
||||
ERROR_LOG(m_logger) << "Enabling TAB DTS Data-Topics failed.";
|
||||
return false;
|
||||
}
|
||||
|
||||
// TAOBOC DTC enable
|
||||
if (!m_tabocDtc->enableSpecificsEquipment())
|
||||
{
|
||||
ERROR_LOG() << "Enabling TABOC Data-Topics failed.";
|
||||
ERROR_LOG(m_logger) << "Enabling TABOC Data-Topics failed.";
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!m_tabocDts->enableParticipantsOverload())
|
||||
{
|
||||
ERROR_LOG() << "Enabling TABOC fts-Topics failed.";
|
||||
ERROR_LOG(m_logger) << "Enabling TABOC fts-Topics failed.";
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
DEBUG_LOG() << "Initialisation HandlerOcSituationData succesful.";
|
||||
DEBUG_LOG(m_logger) << "Initialisation HandlerOcSituationData succesful.";
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -93,7 +93,7 @@ void HandlerOcSituationData::process(const QByteArray &data, bool bIsInitial)
|
||||
{
|
||||
if (bIsInitial)
|
||||
{
|
||||
DEBUG_LOG() << "Processing initial situation data.";
|
||||
DEBUG_LOG(m_logger) << "Processing initial situation data.";
|
||||
|
||||
int ownEquipmentNumber = m_tabocDtc->specificsEquipment(1).equipmentNumber();
|
||||
int ownParticipantId = -1;
|
||||
@@ -115,7 +115,7 @@ void HandlerOcSituationData::process(const QByteArray &data, bool bIsInitial)
|
||||
m_participantId2EqId.clear();
|
||||
|
||||
if (ownParticipantId == -1)
|
||||
ERROR_LOG() << "Mapping of own participant id and equipment number is unknown.";
|
||||
ERROR_LOG(m_logger) << "Mapping of own participant id and equipment number is unknown.";
|
||||
else
|
||||
m_participantId2EqId.insert(ownParticipantId, ownEquipmentNumber);
|
||||
} // if
|
||||
@@ -160,15 +160,15 @@ void HandlerOcSituationData::onModifyParticipantDataReply(const Core::FunctionRe
|
||||
{
|
||||
if (!m_modifiyRequests.contains(reply.id()))
|
||||
{
|
||||
ERROR_LOG() << "Got a ModifyParticipantDataReply without matching ID!";
|
||||
ERROR_LOG(m_logger) << "Got a ModifyParticipantDataReply without matching ID!";
|
||||
return;
|
||||
}
|
||||
|
||||
if (reply.error())
|
||||
ERROR_LOG() << "ModifyParticipantDataRequest " << reply.id() << " could not be handled: " << reply.str();
|
||||
ERROR_LOG(m_logger) << "ModifyParticipantDataRequest " << reply.id() << " could not be handled: " << reply.str();
|
||||
else
|
||||
{
|
||||
DEBUG_LOG() << "ModifyParticipantDataRequest " << reply.id() << " handled successfully by PPM!";
|
||||
DEBUG_LOG(m_logger) << "ModifyParticipantDataRequest " << reply.id() << " handled successfully by PPM!";
|
||||
delete (m_modifiyRequests.value(reply.id()));
|
||||
m_modifiyRequests.remove(reply.id());
|
||||
sendTrainingAreaBaseData(); // send TAB data for new participants
|
||||
@@ -179,7 +179,7 @@ bool HandlerOcSituationData::decodeSituationData(const QByteArray &data)
|
||||
{
|
||||
if (data.isEmpty())
|
||||
{
|
||||
ERROR_LOG() << "Got an empty QByteArray to decode.";
|
||||
ERROR_LOG(m_logger) << "Got an empty QByteArray to decode.";
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -190,7 +190,7 @@ bool HandlerOcSituationData::decodeSituationData(const QByteArray &data)
|
||||
participantsOverload.id(1);
|
||||
participantsOverload.hasOverload(participantOverloaded);
|
||||
m_tabocDts->publish(participantsOverload);
|
||||
DEBUG_LOG() << "publish overload: " << participantOverloaded;
|
||||
DEBUG_LOG(m_logger) << "publish overload: " << participantOverloaded;
|
||||
|
||||
QByteArray data2 = data;
|
||||
data2.remove(0, 1);
|
||||
@@ -203,13 +203,13 @@ bool HandlerOcSituationData::decodeSituationData(const QByteArray &data)
|
||||
QByteArray uncompressed = MainHandler::tryUncompress(data2, m_bWithCompression);
|
||||
if (uncompressed.isEmpty())
|
||||
{
|
||||
INFO_LOG() << "Got an empty QByteArray after uncompression.";
|
||||
INFO_LOG(m_logger) << "Got an empty QByteArray after uncompression.";
|
||||
return false;
|
||||
}
|
||||
|
||||
TRACE_LOG() << "Uncompressed Data: " << uncompressed.toHex(' ');
|
||||
TRACE_LOG(m_logger) << "Uncompressed Data: " << uncompressed.toHex(' ');
|
||||
|
||||
DEBUG_LOG() << " m_equipmentPositions size before decode: " << m_equipmentPositions.size()
|
||||
DEBUG_LOG(m_logger) << " m_equipmentPositions size before decode: " << m_equipmentPositions.size()
|
||||
<< " m_equipmentStates size before decode: " << m_equipmentStates.size()
|
||||
<< " m_equipmentOperationalStates size before decode: " << m_equipmentOperationalStates.size()
|
||||
<< " m_specialSensorData size before decode: " << m_specialSensorData.size();
|
||||
@@ -220,7 +220,7 @@ bool HandlerOcSituationData::decodeSituationData(const QByteArray &data)
|
||||
int modId = 1000000;
|
||||
while (getParticipantId(uncompressed, pos, participantId, modifiedFlag) && participantId != 0)
|
||||
{
|
||||
INFO_LOG() << "Participant: " << participantId << " is modified: " << modifiedFlag;
|
||||
INFO_LOG(m_logger) << "Participant: " << participantId << " is modified: " << modifiedFlag;
|
||||
|
||||
// outdated handling
|
||||
if (modifiedFlag == OcSituation::ModificationFlag::eNone)
|
||||
@@ -245,10 +245,10 @@ bool HandlerOcSituationData::decodeSituationData(const QByteArray &data)
|
||||
bRet = getVBG(uncompressed, pos, state, sanitaion, (modifiedFlag & OcSituation::ModificationFlag::eVBG) == OcSituation::ModificationFlag::eVBG);
|
||||
if (bRet)
|
||||
{
|
||||
DEBUG_LOG() << "Adding EquipmentState to internal map: " << state;
|
||||
DEBUG_LOG(m_logger) << "Adding EquipmentState to internal map: " << state;
|
||||
m_equipmentStates.insert(participantId, state);
|
||||
|
||||
DEBUG_LOG() << "Adding ParticipantSanitation to internal map: " << sanitaion;
|
||||
DEBUG_LOG(m_logger) << "Adding ParticipantSanitation to internal map: " << sanitaion;
|
||||
m_participantSanitations.insert(participantId, sanitaion);
|
||||
|
||||
}
|
||||
@@ -259,8 +259,8 @@ bool HandlerOcSituationData::decodeSituationData(const QByteArray &data)
|
||||
bRet = getState(uncompressed, pos, sensorData, opState, (modifiedFlag & OcSituation::ModificationFlag::eState) == OcSituation::ModificationFlag::eState);
|
||||
if (bRet)
|
||||
{
|
||||
DEBUG_LOG() << "Adding SpecialSensorData to internal map: " << sensorData;
|
||||
DEBUG_LOG() << "Adding EquipmentOperationalState to internal map: " << opState;
|
||||
DEBUG_LOG(m_logger) << "Adding SpecialSensorData to internal map: " << sensorData;
|
||||
DEBUG_LOG(m_logger) << "Adding EquipmentOperationalState to internal map: " << opState;
|
||||
m_specialSensorData.insert(participantId, sensorData);
|
||||
m_equipmentOperationalStates.insert(participantId, opState);
|
||||
}
|
||||
@@ -294,11 +294,11 @@ bool HandlerOcSituationData::decodeSituationData(const QByteArray &data)
|
||||
if (!m_participantData.contains(unitId)) // Adding Unit to participantData, if not already added
|
||||
{
|
||||
m_participantData.insert(unitId, m_ppmDtc->convertParticipantToParticipantData(m_participants.value(unitId)));
|
||||
DEBUG_LOG() << "Adding unit to m_participantData: " << m_participantData.value(unitId);
|
||||
DEBUG_LOG(m_logger) << "Adding unit to m_participantData: " << m_participantData.value(unitId);
|
||||
}
|
||||
|
||||
m_participantData.insert(participantId, participantData);
|
||||
DEBUG_LOG() << "Adding ParticipantData to internal map: " << participantData;
|
||||
DEBUG_LOG(m_logger) << "Adding ParticipantData to internal map: " << participantData;
|
||||
|
||||
if (participantData.equipmentNumber().is_set())
|
||||
m_participantId2EqId[participantId] = participantData.equipmentNumber().get();
|
||||
@@ -311,7 +311,7 @@ bool HandlerOcSituationData::decodeSituationData(const QByteArray &data)
|
||||
m_equipmentPositions.remove(participantId);
|
||||
}
|
||||
|
||||
DEBUG_LOG() << " m_equipmentPositions size after decode: " << m_equipmentPositions.size()
|
||||
DEBUG_LOG(m_logger) << " m_equipmentPositions size after decode: " << m_equipmentPositions.size()
|
||||
<< " m_equipmentStates size after decode: " << m_equipmentStates.size()
|
||||
<< " m_equipmentOperationalStates size after decode: " << m_equipmentOperationalStates.size()
|
||||
<< " m_specialSensorData size after decode: " << m_specialSensorData.size();
|
||||
@@ -323,7 +323,7 @@ void HandlerOcSituationData::sendParticipantData(int requestId)
|
||||
{
|
||||
if (m_modifiyRequests.contains(requestId))
|
||||
{
|
||||
WARNING_LOG() << "Resending modfiyParticipantDataRequest: " << requestId;
|
||||
WARNING_LOG(m_logger) << "Resending modfiyParticipantDataRequest: " << requestId;
|
||||
m_ppmFtc->modifyParticipantDataRequest(*m_modifiyRequests.value(requestId), this);
|
||||
return;
|
||||
}
|
||||
@@ -335,7 +335,7 @@ void HandlerOcSituationData::sendParticipantData(int requestId)
|
||||
m_modifiyRequests.insert(requestId, newRequest);
|
||||
m_participantData.clear();
|
||||
|
||||
INFO_LOG() << "Sending modfiyParticipantDataRequest: " << requestId;
|
||||
INFO_LOG(m_logger) << "Sending modfiyParticipantDataRequest: " << requestId;
|
||||
m_ppmFtc->modifyParticipantDataRequest(*newRequest, this);
|
||||
}
|
||||
|
||||
@@ -438,7 +438,7 @@ bool HandlerOcSituationData::getVBG(const QByteArray &buf, size_t &pos, Training
|
||||
if (!m_knownParties.contains(tmp))
|
||||
{
|
||||
|
||||
WARNING_LOG() << "Party: " << tmp << " unknown, setting equipmentState.originatorId() to "
|
||||
WARNING_LOG(m_logger) << "Party: " << tmp << " unknown, setting equipmentState.originatorId() to "
|
||||
<< Settings::unitOffset() + 1;
|
||||
//Sollte nicht passieren, doch falls ja gibt es goldene Kreuze beim Ausfall
|
||||
tmp = 1;
|
||||
@@ -510,7 +510,7 @@ bool HandlerOcSituationData::getStructure(const QByteArray &buf, size_t &pos, Pa
|
||||
participant.partyId(tmp);
|
||||
else
|
||||
{
|
||||
WARNING_LOG() << "Not setting new party: " << tmp << " for participant: " << participant.id() << " as the party is unknown -> do a base download.";
|
||||
WARNING_LOG(m_logger) << "Not setting new party: " << tmp << " for participant: " << participant.id() << " as the party is unknown -> do a base download.";
|
||||
bRet = false;
|
||||
}
|
||||
|
||||
@@ -519,7 +519,7 @@ bool HandlerOcSituationData::getStructure(const QByteArray &buf, size_t &pos, Pa
|
||||
if (m_participants.contains(tmp))
|
||||
participant.superiorModId(tmp);
|
||||
else
|
||||
WARNING_LOG() << "Not setting new superioir ID: " << tmp << " for participant: " << participant.id() << " as the superior is unknown -> do a base download.";
|
||||
WARNING_LOG(m_logger) << "Not setting new superioir ID: " << tmp << " for participant: " << participant.id() << " as the superior is unknown -> do a base download.";
|
||||
#endif
|
||||
|
||||
return bRet;
|
||||
|
||||
Reference in new issue
Block a user