Adds immediate migration results in progress
This commit is contained in:
2102 files changed
+17482
-15071
No files matched your search
+30
-30
@@ -57,7 +57,7 @@ bool HandlerOcAesData::init()
|
||||
// read all Ieds from database
|
||||
if (!m_dbHandler->select(dataVec))
|
||||
{
|
||||
ERROR_LOG() << "Error reading reset counter from database!";
|
||||
ERROR_LOG(m_logger) << "Error reading reset counter from database!";
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -77,7 +77,7 @@ bool HandlerOcAesData::init()
|
||||
}
|
||||
default:
|
||||
{
|
||||
WARNING_LOG() << "Reset counter for aes type: " << data.aesTypeId << " read from db is not handled.";
|
||||
WARNING_LOG(m_logger) << "Reset counter for aes type: " << data.aesTypeId << " read from db is not handled.";
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -86,7 +86,7 @@ bool HandlerOcAesData::init()
|
||||
// AES DTC enable
|
||||
if (!m_aesDtc->enableDangerArea())
|
||||
{
|
||||
ERROR_LOG() << "Enabling AES Data-Topics failed.";
|
||||
ERROR_LOG(m_logger) << "Enabling AES Data-Topics failed.";
|
||||
return false;
|
||||
}
|
||||
connect(m_aesDtc.get(), &AreaEffectSimulation::Interface::Dtc::dangerAreaChanged, this, &HandlerOcAesData::onDangerAreaChanged);
|
||||
@@ -95,7 +95,7 @@ bool HandlerOcAesData::init()
|
||||
if (!m_gimDtc->enableIed() ||
|
||||
!m_gimDtc->enableIedPosition())
|
||||
{
|
||||
ERROR_LOG() << "Enabling GIM Data-Topics failed.";
|
||||
ERROR_LOG(m_logger) << "Enabling GIM Data-Topics failed.";
|
||||
return false;
|
||||
}
|
||||
connect(m_gimDtc.get(), &GuezIedManagement::Interface::Dtc::iedChanged, this, &HandlerOcAesData::onIedChanged);
|
||||
@@ -103,7 +103,7 @@ bool HandlerOcAesData::init()
|
||||
|
||||
connect(m_iedPositionCycleTimer, &QTimer::timeout, this, &HandlerOcAesData::sendIedPositions);
|
||||
m_iedPositionCycleTimer->setInterval(Settings::iedPositionCycleTime());
|
||||
DEBUG_LOG() << "Starting ied position timer with interval: " << m_iedPositionCycleTimer->interval();
|
||||
DEBUG_LOG(m_logger) << "Starting ied position timer with interval: " << m_iedPositionCycleTimer->interval();
|
||||
m_iedPositionCycleTimer->start();
|
||||
|
||||
return true;
|
||||
@@ -116,7 +116,7 @@ void HandlerOcAesData::demandAesItems(OcSituation::AesType aesType, int eqNumber
|
||||
case OcSituation::AesType::DangerArea:
|
||||
case OcSituation::AesType::Ied:
|
||||
{
|
||||
DEBUG_LOG() << "Got demand for aes type: " << aesType << " from equipment: " << eqNumber;
|
||||
DEBUG_LOG(m_logger) << "Got demand for aes type: " << aesType << " from equipment: " << eqNumber;
|
||||
|
||||
if (!m_collectionTimer[aesType]->isActive())
|
||||
m_collectionTimer[aesType]->start();
|
||||
@@ -126,7 +126,7 @@ void HandlerOcAesData::demandAesItems(OcSituation::AesType aesType, int eqNumber
|
||||
}
|
||||
default:
|
||||
{
|
||||
WARNING_LOG() << "Aes type: " << aesType << " is currently not handled.";
|
||||
WARNING_LOG(m_logger) << "Aes type: " << aesType << " is currently not handled.";
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -134,9 +134,9 @@ void HandlerOcAesData::demandAesItems(OcSituation::AesType aesType, int eqNumber
|
||||
void HandlerOcAesData::onSendOcDataReply(const Core::FunctionReplyObject &reply)
|
||||
{
|
||||
if (reply.error())
|
||||
ERROR_LOG() << "Oc data could not be send: " << reply.translated();
|
||||
ERROR_LOG(m_logger) << "Oc data could not be send: " << reply.translated();
|
||||
else
|
||||
DEBUG_LOG() << "Oc data send successfully to TAB!";
|
||||
DEBUG_LOG(m_logger) << "Oc data send successfully to TAB!";
|
||||
}
|
||||
|
||||
void HandlerOcAesData::onDangerAreaChanged(const AreaEffectSimulation::DangerArea &data, DataModification mod)
|
||||
@@ -165,7 +165,7 @@ void HandlerOcAesData::onIedPositionChanged(const GuezIedManagement::IedPosition
|
||||
m_iedPositionsToBeSend.insert(data.id(), data);
|
||||
}
|
||||
else
|
||||
ERROR_LOG() << "Got ied position for not existing ID: " << data.id();
|
||||
ERROR_LOG(m_logger) << "Got ied position for not existing ID: " << data.id();
|
||||
}
|
||||
|
||||
void HandlerOcAesData::onCollectionTimeOutDemandDangerAreas()
|
||||
@@ -184,7 +184,7 @@ void HandlerOcAesData::sendIedPositions()
|
||||
{
|
||||
if (m_iedPositionsToBeSend.size() == 0)
|
||||
{
|
||||
DEBUG_LOG() << "No new ied positions to be send.";
|
||||
DEBUG_LOG(m_logger) << "No new ied positions to be send.";
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -209,14 +209,14 @@ void HandlerOcAesData::sendIedPositions()
|
||||
data[1] = ++cnt;
|
||||
|
||||
QByteArray ba = qCompress(data);
|
||||
DEBUG_LOG() << "Added ied position " << pos
|
||||
DEBUG_LOG(m_logger) << "Added ied position " << pos
|
||||
<< " data size: " << data.size()
|
||||
<< " compressed size: " << ba.size();
|
||||
|
||||
if (ba.size() > Settings::maxNumOfBytePerAesTxCycle()) // one cycle is full -> send
|
||||
{
|
||||
DEBUG_LOG() << "Uncompressed Data: " << data.toHex(' ');
|
||||
DEBUG_LOG() << "Compressed Data: " << ba.toHex(' ');
|
||||
DEBUG_LOG(m_logger) << "Uncompressed Data: " << data.toHex(' ');
|
||||
DEBUG_LOG(m_logger) << "Compressed Data: " << ba.toHex(' ');
|
||||
payload.append(ba);
|
||||
req.payload(LtsUtils::convert<std::vector<uint8_t>>(payload));
|
||||
m_tabFtc->sendOcDataRequest(req, this);
|
||||
@@ -234,8 +234,8 @@ void HandlerOcAesData::sendIedPositions()
|
||||
|
||||
if (cnt > 0) // is still data to be send?
|
||||
{
|
||||
DEBUG_LOG() << "Uncompressed Data: " << data.toHex(' ');
|
||||
DEBUG_LOG() << "Compressed Data: " << qCompress(data).toHex(' ');
|
||||
DEBUG_LOG(m_logger) << "Uncompressed Data: " << data.toHex(' ');
|
||||
DEBUG_LOG(m_logger) << "Compressed Data: " << qCompress(data).toHex(' ');
|
||||
payload.append(qCompress(data));
|
||||
req.payload(LtsUtils::convert<std::vector<uint8_t>>(payload));
|
||||
m_tabFtc->sendOcDataRequest(req, this);
|
||||
@@ -246,7 +246,7 @@ void HandlerOcAesData::sendIedPositions()
|
||||
|
||||
void HandlerOcAesData::collectionTimeout(OcSituation::AesType type, const std::function<void (int)> &sendFunction)
|
||||
{
|
||||
DEBUG_LOG() << "There are " << m_demandingEquipments[type].size() << " requests for aes type: " << type
|
||||
DEBUG_LOG(m_logger) << "There are " << m_demandingEquipments[type].size() << " requests for aes type: " << type
|
||||
<< " sending Items as " << ((m_demandingEquipments[type].size() > 5) ? QStringLiteral("broadcast") : QStringLiteral("direct")) << " telegram(s)";
|
||||
|
||||
if (m_demandingEquipments[type].size() > 5)
|
||||
@@ -296,13 +296,13 @@ void HandlerOcAesData::sendDangerAreasToTab(int eqNumber)
|
||||
data[1] = ++cnt;
|
||||
|
||||
QByteArray ba = qCompress(data);
|
||||
DEBUG_LOG() << "Added danger area " << dangerArea
|
||||
DEBUG_LOG(m_logger) << "Added danger area " << dangerArea
|
||||
<< " data size: " << data.size()
|
||||
<< " compressed size: " << ba.size();
|
||||
if (ba.size() > Settings::maxNumOfBytePerAesTxCycle()) // one cycle is full -> send
|
||||
{
|
||||
DEBUG_LOG() << "Uncompressed Data: " << data.toHex(' ');
|
||||
DEBUG_LOG() << "Compressed Data: " << ba.toHex(' ');
|
||||
DEBUG_LOG(m_logger) << "Uncompressed Data: " << data.toHex(' ');
|
||||
DEBUG_LOG(m_logger) << "Compressed Data: " << ba.toHex(' ');
|
||||
payload.append(ba);
|
||||
req.payload(LtsUtils::convert<std::vector<uint8_t>>(payload));
|
||||
m_tabFtc->sendOcDataRequest(req, this);
|
||||
@@ -321,8 +321,8 @@ void HandlerOcAesData::sendDangerAreasToTab(int eqNumber)
|
||||
|
||||
if (cnt > 0) // is still data to be send?
|
||||
{
|
||||
DEBUG_LOG() << "Uncompressed Data: " << data.toHex(' ');
|
||||
DEBUG_LOG() << "Compressed Data: " << qCompress(data).toHex(' ');
|
||||
DEBUG_LOG(m_logger) << "Uncompressed Data: " << data.toHex(' ');
|
||||
DEBUG_LOG(m_logger) << "Compressed Data: " << qCompress(data).toHex(' ');
|
||||
payload.append(qCompress(data));
|
||||
req.payload(LtsUtils::convert<std::vector<uint8_t>>(payload));
|
||||
m_tabFtc->sendOcDataRequest(req, this);
|
||||
@@ -365,14 +365,14 @@ void HandlerOcAesData::sendIedsToTab(int eqNumber)
|
||||
data[1] = ++cnt;
|
||||
|
||||
QByteArray ba = qCompress(data);
|
||||
DEBUG_LOG() << "Added ied " << ied
|
||||
DEBUG_LOG(m_logger) << "Added ied " << ied
|
||||
<< " data size: " << data.size()
|
||||
<< " compressed size: " << ba.size();
|
||||
|
||||
if (ba.size() > Settings::maxNumOfBytePerAesTxCycle()) // one cycle is full -> send
|
||||
{
|
||||
DEBUG_LOG() << "Uncompressed Data: " << data.toHex(' ');
|
||||
DEBUG_LOG() << "Compressed Data: " << ba.toHex(' ');
|
||||
DEBUG_LOG(m_logger) << "Uncompressed Data: " << data.toHex(' ');
|
||||
DEBUG_LOG(m_logger) << "Compressed Data: " << ba.toHex(' ');
|
||||
payload.append(ba);
|
||||
req.payload(LtsUtils::convert<std::vector<uint8_t>>(payload));
|
||||
m_tabFtc->sendOcDataRequest(req, this);
|
||||
@@ -390,8 +390,8 @@ void HandlerOcAesData::sendIedsToTab(int eqNumber)
|
||||
|
||||
if (cnt > 0) // is still data to be send?
|
||||
{
|
||||
DEBUG_LOG() << "Uncompressed Data: " << data.toHex(' ');
|
||||
DEBUG_LOG() << "Compressed Data: " << qCompress(data).toHex(' ');
|
||||
DEBUG_LOG(m_logger) << "Uncompressed Data: " << data.toHex(' ');
|
||||
DEBUG_LOG(m_logger) << "Compressed Data: " << qCompress(data).toHex(' ');
|
||||
payload.append(qCompress(data));
|
||||
req.payload(LtsUtils::convert<std::vector<uint8_t>>(payload));
|
||||
m_tabFtc->sendOcDataRequest(req, this);
|
||||
@@ -414,7 +414,7 @@ void HandlerOcAesData::incrementResetCnt(OcSituation::AesType aesType)
|
||||
}
|
||||
default:
|
||||
{
|
||||
WARNING_LOG() << "Reset counter for aes type: " << aesType << " is not handled in incrementResetCnt.";
|
||||
WARNING_LOG(m_logger) << "Reset counter for aes type: " << aesType << " is not handled in incrementResetCnt.";
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -440,14 +440,14 @@ void HandlerOcAesData::setResetCnt(OcSituation::AesType aesType, int resetCnt)
|
||||
}
|
||||
default:
|
||||
{
|
||||
WARNING_LOG() << "Reset counter for aes type: " << aesType << " is not handled in setResetCnt.";
|
||||
WARNING_LOG(m_logger) << "Reset counter for aes type: " << aesType << " is not handled in setResetCnt.";
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
// update db
|
||||
if (!m_dbHandler->update(data))
|
||||
ERROR_LOG() << "Error updating reset counter in db.";
|
||||
ERROR_LOG(m_logger) << "Error updating reset counter in db.";
|
||||
}
|
||||
|
||||
} // namespace OcSituationServer
|
||||
Reference in new issue
Block a user