Adds immediate migration results in progress
This commit is contained in:
2102 files changed
+17482
-15071
No files matched your search
+22
-22
@@ -42,7 +42,7 @@ bool HandlerTrainingArea::init()
|
||||
QVector<Database::AsmMapDescription> dataVecMD;
|
||||
if (!m_mainHandler->db()->select(dataVecMD))
|
||||
{
|
||||
ERROR_LOG() << "Error reading data from database!";
|
||||
ERROR_LOG(m_logger) << "Error reading data from database!";
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -58,38 +58,38 @@ bool HandlerTrainingArea::init()
|
||||
{
|
||||
case AssetManagement::MapDescriptionType_def::Map2D:
|
||||
mapDescriptionSeq.map2D.insert(data.objOrder, data);
|
||||
INFO_LOG() << "map2D.insert order =" << data.objOrder;
|
||||
INFO_LOG(m_logger) << "map2D.insert order =" << data.objOrder;
|
||||
break;
|
||||
case AssetManagement::MapDescriptionType_def::Scene3D:
|
||||
mapDescriptionSeq.scene3D.insert(data.objOrder, data);
|
||||
INFO_LOG() << "Scene3D.insert order =" << data.objOrder;
|
||||
INFO_LOG(m_logger) << "Scene3D.insert order =" << data.objOrder;
|
||||
break;
|
||||
case AssetManagement::MapDescriptionType_def::Elevation:
|
||||
mapDescriptionSeq.elevation.insert(data.objOrder, data);
|
||||
INFO_LOG() << "Elevation.insert order =" << data.objOrder;
|
||||
INFO_LOG(m_logger) << "Elevation.insert order =" << data.objOrder;
|
||||
break;
|
||||
case AssetManagement::MapDescriptionType_def::SceneObj:
|
||||
mapDescriptionSeq.sceneObj.insert(data.objOrder, data);
|
||||
INFO_LOG() << "sceneObj.insert order =" << data.objOrder;
|
||||
INFO_LOG(m_logger) << "sceneObj.insert order =" << data.objOrder;
|
||||
break;
|
||||
}
|
||||
mapDescriptionSeqences.insert(data.trainingAreaId, mapDescriptionSeq);
|
||||
if (ret.error())
|
||||
{
|
||||
delete ifs;
|
||||
ERROR_LOG() << ret();
|
||||
ERROR_LOG(m_logger) << ret();
|
||||
return false;
|
||||
}
|
||||
m_objectMapDescriptionMap.insert(ifs->getId(), ifs);
|
||||
}
|
||||
|
||||
DEBUG_LOG() << "m_objectMapDescriptionMap.size() = " << m_objectMapDescriptionMap.size();
|
||||
DEBUG_LOG(m_logger) << "m_objectMapDescriptionMap.size() = " << m_objectMapDescriptionMap.size();
|
||||
|
||||
QVector<Database::AsmTrainingArea> dataVec;
|
||||
// read all training areas from database
|
||||
if (!m_mainHandler->db()->select(dataVec))
|
||||
{
|
||||
ERROR_LOG() << "Error reading data from database!";
|
||||
ERROR_LOG(m_logger) << "Error reading data from database!";
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -125,13 +125,13 @@ bool HandlerTrainingArea::init()
|
||||
if (ret.error())
|
||||
{
|
||||
delete ifs;
|
||||
ERROR_LOG() << ret();
|
||||
ERROR_LOG(m_logger) << ret();
|
||||
return false;
|
||||
}
|
||||
m_objectTrainingAreaMap.insert(ifs->getId(), ifs);
|
||||
}
|
||||
|
||||
DEBUG_LOG() << "m_objectTrainingAreaMap.size() = " << m_objectTrainingAreaMap.size();
|
||||
DEBUG_LOG(m_logger) << "m_objectTrainingAreaMap.size() = " << m_objectTrainingAreaMap.size();
|
||||
|
||||
return true;
|
||||
}
|
||||
@@ -139,16 +139,16 @@ bool HandlerTrainingArea::init()
|
||||
//----------------------------------------------------------------------------------------------
|
||||
void HandlerTrainingArea::removeMapDescriptions(int trainingAreaId)
|
||||
{
|
||||
INFO_LOG() << "removeMapDescriptions trainingAreaId = " << trainingAreaId
|
||||
INFO_LOG(m_logger) << "removeMapDescriptions trainingAreaId = " << trainingAreaId
|
||||
<< " m_objectMapDescriptionMap.size = " << m_objectMapDescriptionMap.size();
|
||||
QMapIterator< int, ObjectMapDescription *> it(m_objectMapDescriptionMap);
|
||||
while ( it.hasNext())
|
||||
{
|
||||
it.next();
|
||||
INFO_LOG() << "remove map description key = " << it.key();
|
||||
INFO_LOG(m_logger) << "remove map description key = " << it.key();
|
||||
if ( it.value()->getData().trainingAreaId() == trainingAreaId)
|
||||
{
|
||||
DEBUG_LOG() << "remove id= " << it.key();
|
||||
DEBUG_LOG(m_logger) << "remove id= " << it.key();
|
||||
|
||||
ObjectMapDescription *ifs = m_objectMapDescriptionMap.value(it.key());
|
||||
|
||||
@@ -165,7 +165,7 @@ void HandlerTrainingArea::onTrainingAreaModifyRequest(const rti::core::SampleIde
|
||||
{
|
||||
const auto ret = trainingAreaModifyRequest(request);
|
||||
if (ret.error())
|
||||
WARNING_LOG() << ret();
|
||||
WARNING_LOG(m_logger) << ret();
|
||||
m_mainHandler->dds()->fts()->trainingAreaModifyReply(cookie, ret);
|
||||
}
|
||||
|
||||
@@ -200,7 +200,7 @@ Core::FunctionReplyObject HandlerTrainingArea::trainingAreaModifyRequest(const T
|
||||
}
|
||||
if (request.id() > 0) // Modify
|
||||
{
|
||||
DEBUG_LOG() << "modify: delete old entries in map_description";
|
||||
DEBUG_LOG(m_logger) << "modify: delete old entries in map_description";
|
||||
removeMapDescriptions(ifs->getId());
|
||||
}
|
||||
|
||||
@@ -215,7 +215,7 @@ Core::FunctionReplyObject HandlerTrainingArea::trainingAreaModifyRequest(const T
|
||||
mdData.id(0);
|
||||
mdData.trainingAreaId(ifs->getId());
|
||||
ret = md->createObject(mdData, i);
|
||||
DEBUG_LOG() << "insert topographic entries in map_description"
|
||||
DEBUG_LOG(m_logger) << "insert topographic entries in map_description"
|
||||
<< " for training area id " << ifs->getId()
|
||||
<< " mapTypeId=" << mdData.mapTypeId()
|
||||
<< " mapDescriptionTypeId=" << mdData.mapDescriptionTypeId();
|
||||
@@ -240,7 +240,7 @@ Core::FunctionReplyObject HandlerTrainingArea::trainingAreaModifyRequest(const T
|
||||
mdData.id(0);
|
||||
mdData.trainingAreaId(ifs->getId());
|
||||
ret = md->createObject(mdData, i);
|
||||
DEBUG_LOG() << "insert elevation entries in map_description"
|
||||
DEBUG_LOG(m_logger) << "insert elevation entries in map_description"
|
||||
<< " for training area id " << ifs->getId()
|
||||
<< " mapTypeId=" << mdData.mapTypeId()
|
||||
<< " mapDescriptionTypeId=" << mdData.mapDescriptionTypeId();
|
||||
@@ -265,7 +265,7 @@ Core::FunctionReplyObject HandlerTrainingArea::trainingAreaModifyRequest(const T
|
||||
mdData.id(0);
|
||||
mdData.trainingAreaId(ifs->getId());
|
||||
ret = md->createObject(mdData, i);
|
||||
DEBUG_LOG() << "insert scene3D entries in map_description"
|
||||
DEBUG_LOG(m_logger) << "insert scene3D entries in map_description"
|
||||
<< " for training area id " << ifs->getId()
|
||||
<< " mapTypeId=" << mdData.mapTypeId()
|
||||
<< " mapDescriptionTypeId=" << mdData.mapDescriptionTypeId();
|
||||
@@ -290,7 +290,7 @@ Core::FunctionReplyObject HandlerTrainingArea::trainingAreaModifyRequest(const T
|
||||
mdData.id(0);
|
||||
mdData.trainingAreaId(ifs->getId());
|
||||
ret = md->createObject(mdData, i);
|
||||
DEBUG_LOG() << "insert sceneObjects entries in map_description"
|
||||
DEBUG_LOG(m_logger) << "insert sceneObjects entries in map_description"
|
||||
<< " for training area id " << ifs->getId()
|
||||
<< " mapTypeId=" << mdData.mapTypeId()
|
||||
<< " mapDescriptionTypeId=" << mdData.mapDescriptionTypeId();
|
||||
@@ -335,7 +335,7 @@ void HandlerTrainingArea::onTrainingAreaRemoveRequest(const rti::core::SampleIde
|
||||
ret = ifs->removeObject();
|
||||
|
||||
if (ret.error())
|
||||
ERROR_LOG() << ret();
|
||||
ERROR_LOG(m_logger) << ret();
|
||||
else
|
||||
{
|
||||
// delete ObjectTrainingArea
|
||||
@@ -356,7 +356,7 @@ void HandlerTrainingArea::onMapDescriptionModifyRequest(const rti::core::SampleI
|
||||
{
|
||||
const auto ret = mapDescriptionModifyRequest(request);
|
||||
if (ret.error())
|
||||
WARNING_LOG() << ret();
|
||||
WARNING_LOG(m_logger) << ret();
|
||||
m_mainHandler->dds()->fts()->mapDescriptionModifyReply(cookie, ret);
|
||||
}
|
||||
|
||||
@@ -393,7 +393,7 @@ void HandlerTrainingArea::onMapDescriptionRemoveRequest(const rti::core::SampleI
|
||||
ret = ifs->removeObject();
|
||||
|
||||
if (ret.error())
|
||||
ERROR_LOG() << ret();
|
||||
ERROR_LOG(m_logger) << ret();
|
||||
else
|
||||
{
|
||||
// delete ObjectMapDescription
|
||||
|
||||
Reference in new issue
Block a user