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

@@ -12,12 +12,11 @@
namespace TrainingAreaBaseOC {
WebsocketHandler::WebsocketHandler(QObject *parent, int exerciseId,
const std::shared_ptr<Interface::Dts> dtsTabOc, const std::shared_ptr<Interface::Dtc> dtcTabOc)
: QObject(parent)
const std::shared_ptr<Interface::Dts> dtsTabOc, const std::shared_ptr<Interface::Dtc> dtcTabOc) : QObject(parent)
, m_exerciseId(exerciseId)
, m_dtsTaboc(dtsTabOc)
, m_dtcTaboc(dtcTabOc)
{
, m_dtcTaboc(dtcTabOc),
m_logger(NGL::NGLLoggerBootstrap::getLogger()) {
m_tryConnectionTimer = new QTimer(this);
connect(m_tryConnectionTimer, &QTimer::timeout, this, &WebsocketHandler::onTryConnectionTimerTimeout);
m_tryConnectionTimer->start(10 * 1000);
@@ -131,12 +130,12 @@ void WebsocketHandler::onSendOwnPosition(const QString &message)
QJsonDocument doc = QJsonDocument::fromJson(message.toUtf8());
if (!doc.isObject())
{
WARNING_LOG() << "No Valid Object in " << message;
WARNING_LOG(m_logger) << "No Valid Object in " << message;
return;
}
if (doc.object().value(QStringLiteral("data")).toObject().isEmpty())
{
WARNING_LOG() << "No Data Array in" << message;
WARNING_LOG(m_logger) << "No Data Array in" << message;
return;
}
@@ -149,7 +148,7 @@ void WebsocketHandler::onSendOwnPosition(const QString &message)
if (obj.contains(QStringLiteral("lon")) && obj.contains(QStringLiteral("lat")))
{
DEBUG_LOG() << "Got message with position";
DEBUG_LOG(m_logger) << "Got message with position";
outData.position(Core::GeoPosition(obj.value(QStringLiteral("lon")).toDouble(),obj.value(QStringLiteral("lat")).toDouble(),obj.value(QStringLiteral("height")).toDouble()));
outData.timeStamp(QDateTime::currentMSecsSinceEpoch());
if (obj.contains(QStringLiteral("buildingId")) && obj.contains(QStringLiteral("roomId")) )
@@ -168,32 +167,32 @@ void WebsocketHandler::onSendOwnPosition(const QString &message)
void WebsocketHandler::connectToServer()
{
DEBUG_LOG() << "Try connect to servicemanagement " << QUrl(QStringLiteral("ws://")+Settings::remoteServerHostname()+QStringLiteral(":")+ QString::number(7300)).toString();
DEBUG_LOG(m_logger) << "Try connect to servicemanagement " << QUrl(QStringLiteral("ws://")+Settings::remoteServerHostname()+QStringLiteral(":")+ QString::number(7300)).toString();
m_socket->open(QUrl(QStringLiteral("ws://")+Settings::remoteServerHostname()+QStringLiteral(":")+ QString::number(7300)));
}
void WebsocketHandler::sendServicePortRequest()
{
m_socket->sendTextMessage(QStringLiteral("{\"type\": \"servicePortsInformationRequest\",\"uuid\": \"7777\"}"));
DEBUG_LOG() << "Wait For Services Reply";
DEBUG_LOG(m_logger) << "Wait For Services Reply";
}
void WebsocketHandler::parseServices(const QString &message)
{
m_tryConnectionTimer->stop();
DEBUG_LOG() << "Received SERVICES MESSAGE: " << message;
DEBUG_LOG(m_logger) << "Received SERVICES MESSAGE: " << message;
m_socket->close();
int exPort = -1;
QJsonDocument doc = QJsonDocument::fromJson(message.toUtf8());
if (!doc.isObject())
{
WARNING_LOG() << "No Valid Object in " << message;
WARNING_LOG(m_logger) << "No Valid Object in " << message;
return;
}
if (!doc.object().value(QStringLiteral("data")).isArray())
{
WARNING_LOG() << "No Data Array in" << message;
WARNING_LOG(m_logger) << "No Data Array in" << message;
return;
}
@@ -227,7 +226,7 @@ void WebsocketHandler::parseServices(const QString &message)
if (exPort > 0)
{
DEBUG_LOG() << "Connect To ppm ON: " << exPort;
DEBUG_LOG(m_logger) << "Connect To ppm ON: " << exPort;
connectToExPPM(exPort);
m_state = WebSocketState::CONNECTTOPPM;
}