Adds immediate migration results in progress

This commit is contained in:
torsten committed 2026-08-19 11:18:24 +02:00
1 parent 8453e104c5
commit 3bb6e89496
2102 files changed
+17482 -15071

No files matched your search

@@ -39,7 +39,7 @@ bool TTWorker::init()
if (m_ttsArgs.movs_per_msec < 200)
{
ERROR_LOG() << "Invalid value for 'movements per milliseconds'! Please choose a number greater than 200 msecs or equal. Program stopped.";
ERROR_LOG(m_logger) << "Invalid value for 'movements per milliseconds'! Please choose a number greater than 200 msecs or equal. Program stopped.";
return false;
}
return true;
@@ -77,7 +77,7 @@ QVector<runningPattern> TTWorker::interpretPattern(QString pattern) const
{
if (pattern.isEmpty())
{
ERROR_LOG() << "INVALID PATTERN - pattern-size < 1";
ERROR_LOG(m_logger) << "INVALID PATTERN - pattern-size < 1";
exit(8);
}
@@ -91,7 +91,7 @@ QVector<runningPattern> TTWorker::interpretPattern(QString pattern) const
if (pattern.isEmpty())
{
ERROR_LOG() << "INVALID PATTERN - alias '" << patternAlias << "' is not available in settings file! Program halted.";
ERROR_LOG(m_logger) << "INVALID PATTERN - alias '" << patternAlias << "' is not available in settings file! Program halted.";
exit(9);
}
}
@@ -126,7 +126,7 @@ QVector<runningPattern> TTWorker::interpretPattern(QString pattern) const
return newPatternList;
}
ERROR_LOG() << "INVALID PATTERN: '" << strings.at(i) << "'. Cannot start without correct pattern!";
ERROR_LOG(m_logger) << "INVALID PATTERN: '" << strings.at(i) << "'. Cannot start without correct pattern!";
exit(5);
@@ -137,7 +137,7 @@ void TTWorker::sendLogin(uint32_t eqId, uint32_t issi)
{
N_CoPrtCnv::CoPrtCnvRadioTelegram *tele = new N_CoPrtCnv::CoPrtCnvRadioTelegram(N_CoPrtCnv::CoPrtCnvRadioTelegram::e_LoginRequest, eqId, issi);
DEBUG_LOG() << "SEND LOGIN FOR ISSI=" << issi << ", eqId=" << eqId;
DEBUG_LOG(m_logger) << "SEND LOGIN FOR ISSI=" << issi << ", eqId=" << eqId;
sendTelegram(tele, issi);
}
@@ -147,13 +147,13 @@ void TTWorker::onReadyRead()
qint64 bytesRead = m_socket->peek((char *)&header, sizeof(header));
if (sizeof(header) != bytesRead)
{
DEBUG_LOG() << "To few bytes to read from socket";
DEBUG_LOG(m_logger) << "To few bytes to read from socket";
return;
}
if (N_CoPrtCnv::CoPrtCnvRadioTelegram::MAGIC_NUMBER != header.m_MagicNumber)
{
ERROR_LOG() << "Disconnect because radio-Telegram does not begin with magic-number A5: I got "
ERROR_LOG(m_logger) << "Disconnect because radio-Telegram does not begin with magic-number A5: I got "
<< header.m_MagicNumber;
m_socket->disconnectFromHost();
return;
@@ -161,7 +161,7 @@ void TTWorker::onReadyRead()
if (!N_CoPrtCnv::CoPrtCnvRadioTelegram::isTelegramLengthOk(header.m_Length))
{
WARNING_LOG() << "Radio-Telegram length to big: " << header.m_Length
WARNING_LOG(m_logger) << "Radio-Telegram length to big: " << header.m_Length
<< " - but I proceed with this telegram.";
}
@@ -169,7 +169,7 @@ void TTWorker::onReadyRead()
uint16_t dataSize = header.m_Length + sizeof(header);
if (m_socket->bytesAvailable() < dataSize)
{
DEBUG_LOG() << "not enough bytes available - waiting for more data";
DEBUG_LOG(m_logger) << "not enough bytes available - waiting for more data";
return;
}
QByteArray buf(dataSize, Qt::Uninitialized);
@@ -188,7 +188,7 @@ void TTWorker::onReadyRead()
void TTWorker::handleReceivedTelegram(const QByteArray &data)
{
INFO_LOG() << data.size();
INFO_LOG(m_logger) << data.size();
switch (data.at(4))
{
@@ -203,7 +203,7 @@ void TTWorker::handleReceivedTelegram(const QByteArray &data)
break;
default:
INFO_LOG() << "Radio-Telegram with PDU-Type=" << (int)data[4]
INFO_LOG(m_logger) << "Radio-Telegram with PDU-Type=" << (int)data[4]
<< " not implemented!";
break;
}
@@ -245,7 +245,7 @@ void TTWorker::onSendDeaktivierungEinzelminen()
{
if (m_playerList.isEmpty())
{
ERROR_LOG() << "No player for onSendDeaktivierungEinzelminen...";
ERROR_LOG(m_logger) << "No player for onSendDeaktivierungEinzelminen...";
return;
}
Player *p = m_playerList.at(0);
@@ -334,7 +334,7 @@ void TTWorker::sendTaktischerStatus(uint32_t eqId, uint32_t issi, TrainingAreaBa
{
p->vbg = vbg;
tele.vulnerabilityState = vbg;
DEBUG_LOG() << "Player (" << p->eqId << ") - VBG: " << int(vbg);
DEBUG_LOG(m_logger) << "Player (" << p->eqId << ") - VBG: " << int(vbg);
break;
}
}
@@ -422,7 +422,7 @@ void TTWorker::handleDataIndReq(const QByteArray &data)
N_CoPrtCnv::CoPrtCnvCentralTelegram *tele = N_CoPrtCnv::CoPrtCnvTelegramConverter::convertToCentral(radioTelegram.data());
TrainingAreaBase::TetraIcd::StateChange sc = TrainingAreaBase::TetraIcd::StateChange::fromJson(tele->jsonData());
delete tele;
DEBUG_LOG() << " Try to Resetnd State " << sc.header.equipmentNumber << " we got state: " << static_cast<int>(sc.vulnerabilityState) << " and this bits here: " << sc.vulnerabilityBits;
DEBUG_LOG(m_logger) << " Try to Resetnd State " << sc.header.equipmentNumber << " we got state: " << static_cast<int>(sc.vulnerabilityState) << " and this bits here: " << sc.vulnerabilityBits;
sc.header.timeStamp = time(nullptr) * 1000;
uint32_t issi = 0;
@@ -435,7 +435,7 @@ void TTWorker::handleDataIndReq(const QByteArray &data)
}
}
ERROR_LOG() << " Try to Resetnd S2tate " << sc.header.equipmentNumber << " we got state: " << static_cast<int>(sc.vulnerabilityState) << " and this bits here: " << sc.vulnerabilityBits;
ERROR_LOG(m_logger) << " Try to Resetnd S2tate " << sc.header.equipmentNumber << " we got state: " << static_cast<int>(sc.vulnerabilityState) << " and this bits here: " << sc.vulnerabilityBits;
sendTelegram(sc, issi);
return;
}
@@ -445,7 +445,7 @@ void TTWorker::handleDataIndReq(const QByteArray &data)
TrainingAreaBase::TetraIcd::Sanitation sc = TrainingAreaBase::TetraIcd::Sanitation::fromJson(tele->jsonData());
delete tele;
DEBUG_LOG() << " Try to Resetnd State " << sc.header.equipmentNumber << " we got procedure: " << sc.proceduresTaken;
DEBUG_LOG(m_logger) << " Try to Resetnd State " << sc.header.equipmentNumber << " we got procedure: " << sc.proceduresTaken;
sc.header.timeStamp = time(nullptr) * 1000;
uint32_t issi = 0;
@@ -458,7 +458,7 @@ void TTWorker::handleDataIndReq(const QByteArray &data)
}
}
ERROR_LOG() << " Try to Resetnd S2tate " << sc.header.equipmentNumber << " we got state: " << sc.proceduresTaken;
ERROR_LOG(m_logger) << " Try to Resetnd S2tate " << sc.header.equipmentNumber << " we got state: " << sc.proceduresTaken;
sendTelegram(sc, issi);
return;
}
@@ -521,7 +521,7 @@ void TTWorker::handleDataIndReq(const QByteArray &data)
if (radioTelegram->isLoginTelegram())
{
DEBUG_LOG() << "player cont: " << m_playerList.count();
DEBUG_LOG(m_logger) << "player cont: " << m_playerList.count();
for (int i = 0; i < m_playerList.count(); i++)
{
Player *p = m_playerList.at(i);
@@ -529,19 +529,19 @@ void TTWorker::handleDataIndReq(const QByteArray &data)
{
if (p->isLogin)
return;
DEBUG_LOG() << "Player #" << i << " with eqId=" << p->eqId << " and issi=" << p->issi << " is now logged in.";
DEBUG_LOG(m_logger) << "Player #" << i << " with eqId=" << p->eqId << " and issi=" << p->issi << " is now logged in.";
p->isLogin = true;
sendBITE(p->eqId, p->issi);
return;
}
}
ERROR_LOG() << "Invalid player was logged in. issi: '" << radioTelegram->getDestISSI() << "'";
ERROR_LOG(m_logger) << "Invalid player was logged in. issi: '" << radioTelegram->getDestISSI() << "'";
return;
}
DEBUG_LOG() << "Received unused or invalid telegram with Telegram-ID: " << telID;
DEBUG_LOG(m_logger) << "Received unused or invalid telegram with Telegram-ID: " << telID;
}
static void fillHeader(char *data, int len)
@@ -606,7 +606,7 @@ void TTWorker::onSendPlayerPositions()
if (!p->isLogin)
{
INFO_LOG() << "Player with eqId=" << p->eqId << " and issi=" << p->issi << " is not logged in.";
INFO_LOG(m_logger) << "Player with eqId=" << p->eqId << " and issi=" << p->issi << " is not logged in.";
break;
}
playerCount++;
@@ -636,7 +636,7 @@ void TTWorker::onSendPlayerPositions()
delete tel;
}
bool bFlushed = m_socket->flush();
INFO_LOG() << "Sent " << bytesSent << "bytes (" << playerCount << " players), bFlushed=" << bFlushed;
INFO_LOG(m_logger) << "Sent " << bytesSent << "bytes (" << playerCount << " players), bFlushed=" << bFlushed;
}
void TTWorker::onSocketError()