fix Warning
This commit is contained in:
1 parent
593c221d23
commit
8345470273
316 files changed
+1246
-929
No files matched your search
+1
-1
@@ -11,8 +11,8 @@ namespace BSM
|
||||
{
|
||||
Api::Api(QObject *parent)
|
||||
: QObject(parent)
|
||||
, m_socketHandler(new SocketHandler(this))
|
||||
, m_logger(TrainingAreaBase::getLogger("BSM.Api"))
|
||||
, m_socketHandler(new SocketHandler(this))
|
||||
{
|
||||
connect(m_socketHandler, &SocketHandler::opticalShot,
|
||||
this, &Api::opticalShot);
|
||||
|
||||
+1
-1
@@ -15,11 +15,11 @@ namespace BSM
|
||||
{
|
||||
Socket::Socket(const Bsm &cfg, QObject *parent)
|
||||
: QObject(parent)
|
||||
, m_logger(TrainingAreaBase::getLogger("BSM.Socket"))
|
||||
, m_config(cfg)
|
||||
, m_tcpSocket(new QTcpSocket(this))
|
||||
, m_reconnectTimer(nullptr)
|
||||
, m_aliveTimer(new QTimer(this))
|
||||
, m_logger(TrainingAreaBase::getLogger("BSM.Socket"))
|
||||
{
|
||||
m_aliveTimer->setTimerType(Qt::VeryCoarseTimer);
|
||||
m_aliveTimer->setSingleShot(true);
|
||||
|
||||
+2
-2
@@ -12,8 +12,8 @@ namespace BuildingControlUnit
|
||||
namespace Json
|
||||
{
|
||||
WebSocketHandler::WebSocketHandler(QObject *parent) : QObject(parent)
|
||||
, m_webSocketServer(new QWebSocketServer(QStringLiteral("BCU"), QWebSocketServer::NonSecureMode, this)),
|
||||
m_logger(NGL::NGLLoggerBootstrap::getNGLRootLogger()) {}
|
||||
, m_logger(NGL::NGLLoggerBootstrap::getNGLRootLogger())
|
||||
, m_webSocketServer(new QWebSocketServer(QStringLiteral("BCU"), QWebSocketServer::NonSecureMode, this)) {}
|
||||
|
||||
WebSocketHandler::~WebSocketHandler()
|
||||
{
|
||||
|
||||
+1
-1
@@ -41,8 +41,8 @@ static const bool point3dRegistered = []() {
|
||||
|
||||
Api::Api(QObject *parent)
|
||||
: QObject(parent)
|
||||
, m_lastHitResult(HitResult())
|
||||
, m_logger(TrainingAreaBase::getLogger("VWM.Api"))
|
||||
, m_lastHitResult(HitResult())
|
||||
{
|
||||
Q_UNUSED(point3dRegistered);
|
||||
}
|
||||
|
||||
+3
-5
@@ -294,12 +294,10 @@ bool readBuilding(const QString &fn, Building &cfg)
|
||||
bool readBuilding(const QByteArray &data, Building &cfg)
|
||||
{
|
||||
QDomDocument doc;
|
||||
QString errorMsg;
|
||||
int errorLine;
|
||||
int errorColumn;
|
||||
if (!doc.setContent(data, &errorMsg, &errorLine, &errorColumn))
|
||||
const auto parseResult = doc.setContent(data);
|
||||
if (!parseResult)
|
||||
{
|
||||
ERROR_LOG(logger()) << "Line=" << errorLine << ", Column=" << errorColumn << ": " << errorMsg;
|
||||
ERROR_LOG(logger()) << "Line=" << int(parseResult.errorLine) << ", Column=" << int(parseResult.errorColumn) << ": " << parseResult.errorMessage;
|
||||
return false;
|
||||
}
|
||||
const QDomElement domRoot = doc.documentElement();
|
||||
|
||||
+3
-5
@@ -32,13 +32,11 @@ QDomElement readFile(const QString &fn, const QString &rootTag)
|
||||
return QDomElement();
|
||||
}
|
||||
|
||||
QString errMsg;
|
||||
int errLine = 0;
|
||||
int errColumn = 0;
|
||||
QDomDocument doc;
|
||||
if (!doc.setContent(data, &errMsg, &errLine, &errColumn))
|
||||
const auto parseResult = doc.setContent(data);
|
||||
if (!parseResult)
|
||||
{
|
||||
WARNING_LOG(logger()) << "Could not parse xml file '" << fn << "' at " << errLine << ":" << errColumn << ": " << errMsg;
|
||||
WARNING_LOG(logger()) << "Could not parse xml file '" << fn << "' at " << int(parseResult.errorLine) << ":" << int(parseResult.errorColumn) << ": " << parseResult.errorMessage;
|
||||
return QDomElement();
|
||||
}
|
||||
|
||||
|
||||
@@ -25,8 +25,8 @@ BuildingControlHandler::BuildingControlHandler(MainHandler *mainHandler)
|
||||
, Interface::Fts::SendCesHit3DonBuildingRequestHandler(mainHandler->ddsHandler()->fts())
|
||||
, Interface::Fts::TriggerBsmFlashRequestHandler(mainHandler->ddsHandler()->fts())
|
||||
, Interface::Fts::SwitchRelayRequestHandler(mainHandler->ddsHandler()->fts())
|
||||
, m_mainHandler(mainHandler)
|
||||
, m_logger(getLogger("BuildingControlHandler"))
|
||||
, m_mainHandler(mainHandler)
|
||||
{}
|
||||
|
||||
BuildingControlHandler::~BuildingControlHandler()
|
||||
|
||||
@@ -46,6 +46,7 @@ BuildingProcess::BuildingProcess(MainHandler *mainHandler,
|
||||
const bool initBuilding,
|
||||
QObject *parent)
|
||||
: QObject(parent)
|
||||
, m_logger(getLogger("BuildingProcess"))
|
||||
, m_mainHandler(mainHandler)
|
||||
, m_buildingInfo(info)
|
||||
, m_wsSocket(nullptr)
|
||||
@@ -53,7 +54,6 @@ BuildingProcess::BuildingProcess(MainHandler *mainHandler,
|
||||
, m_hitLineInfoTimer(new QTimer(this))
|
||||
, m_hitLineId(info.mseId << 16)
|
||||
, m_initBuilding(initBuilding)
|
||||
, m_logger(getLogger("BuildingProcess"))
|
||||
{
|
||||
m_proc.setProgram(procName);
|
||||
m_proc.setReadChannel(QProcess::StandardOutput);
|
||||
@@ -1145,7 +1145,7 @@ void BuildingProcess::openWebSocket()
|
||||
{
|
||||
closeWebSocket();
|
||||
m_wsSocket = new QWebSocket;
|
||||
connect(m_wsSocket, QOverload<QAbstractSocket::SocketError>::of(&QWebSocket::error),
|
||||
connect(m_wsSocket, &QWebSocket::errorOccurred,
|
||||
this, &BuildingProcess::onWebSocketError);
|
||||
connect(m_wsSocket, &QWebSocket::connected,
|
||||
this, &BuildingProcess::onWebSocketConnected);
|
||||
|
||||
@@ -14,8 +14,8 @@ namespace Buildings
|
||||
{
|
||||
|
||||
DdsHandler::DdsHandler(int domainId, int exerciseId)
|
||||
: m_ddsConnector(std::make_shared<DDSConnector::DdsConnector>(domainId, IDL::PartitionType::Exercise, exerciseId))
|
||||
, m_logger(getLogger("DdsHandler"))
|
||||
: m_logger(getLogger("DdsHandler"))
|
||||
, m_ddsConnector(std::make_shared<DDSConnector::DdsConnector>(domainId, IDL::PartitionType::Exercise, exerciseId))
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "DdsHandler(" << domainId << ") for partition: " << m_ddsConnector->getDefaultPartition();
|
||||
}
|
||||
|
||||
@@ -17,12 +17,12 @@
|
||||
namespace Buildings
|
||||
{
|
||||
|
||||
IsmHandler::IsmHandler(MainHandler *mainHandler) : m_mainHandler(mainHandler)
|
||||
IsmHandler::IsmHandler(MainHandler *mainHandler) : m_logger(NGL::NGLLoggerBootstrap::getNGLRootLogger())
|
||||
, m_mainHandler(mainHandler)
|
||||
, m_dtcIsm(nullptr)
|
||||
, m_ftcIsm(nullptr)
|
||||
, m_changeTimeoutTimer(new QTimer(this))
|
||||
, m_changeTimeoutTimerInit(new QTimer(this)),
|
||||
m_logger(NGL::NGLLoggerBootstrap::getNGLRootLogger()) {
|
||||
, m_changeTimeoutTimerInit(new QTimer(this)) {
|
||||
connect(m_changeTimeoutTimer, &QTimer::timeout,
|
||||
this, &IsmHandler::onBuildingsChanged);
|
||||
m_changeTimeoutTimer->setInterval(3 * 1000);
|
||||
|
||||
@@ -8,9 +8,9 @@
|
||||
|
||||
namespace Buildings
|
||||
{
|
||||
PdmHandler::PdmHandler(MainHandler *mainHandler) : m_mainHandler(mainHandler)
|
||||
, m_bPdmInitialized(false),
|
||||
m_logger(NGL::NGLLoggerBootstrap::getNGLRootLogger()) {}
|
||||
PdmHandler::PdmHandler(MainHandler *mainHandler) : m_logger(NGL::NGLLoggerBootstrap::getNGLRootLogger())
|
||||
, m_mainHandler(mainHandler)
|
||||
, m_bPdmInitialized(false) {}
|
||||
|
||||
PdmHandler::~PdmHandler()
|
||||
{}
|
||||
|
||||
@@ -7,8 +7,8 @@
|
||||
|
||||
namespace Buildings
|
||||
{
|
||||
PpmHandler::PpmHandler(MainHandler *mainHandler) : m_mainHandler(mainHandler),
|
||||
m_logger(NGL::NGLLoggerBootstrap::getNGLRootLogger()) {}
|
||||
PpmHandler::PpmHandler(MainHandler *mainHandler) : m_logger(NGL::NGLLoggerBootstrap::getNGLRootLogger())
|
||||
, m_mainHandler(mainHandler) {}
|
||||
|
||||
PpmHandler::~PpmHandler()
|
||||
{}
|
||||
|
||||
@@ -9,8 +9,8 @@ namespace Buildings
|
||||
RelayInfoHandler::RelayInfoHandler(MainHandler *mainHandler)
|
||||
: QObject()
|
||||
, Interface::Fts::SetRelayInfoRequestHandler(mainHandler->ddsHandler()->fts())
|
||||
, m_mainHandler(mainHandler)
|
||||
, m_logger(getLogger("RelayInfoHandler"))
|
||||
, m_mainHandler(mainHandler)
|
||||
{}
|
||||
|
||||
RelayInfoHandler::~RelayInfoHandler()
|
||||
|
||||
@@ -17,9 +17,9 @@ namespace Buildings
|
||||
|
||||
WebSocketHandler::WebSocketHandler(const std::shared_ptr<BuildingControlHandler> &buildingControlHandler, QObject *parent)
|
||||
: QObject(parent)
|
||||
, m_logger(getLogger(QStringLiteral("WebSocketHandler")))
|
||||
, m_buildingControlHandler(buildingControlHandler)
|
||||
, m_webSocketServer(new QWebSocketServer(QStringLiteral("BuildingsSocket"), QWebSocketServer::NonSecureMode, this))
|
||||
, m_logger(getLogger(QStringLiteral("WebSocketHandler")))
|
||||
{}
|
||||
|
||||
WebSocketHandler::~WebSocketHandler()
|
||||
|
||||
+1
-1
@@ -11,9 +11,9 @@ using namespace CombatNetRadio::WebSocketInterface::Connection;
|
||||
|
||||
ClientConnection::ClientConnection(QWebSocket *socket, QObject *parent)
|
||||
: QObject(parent)
|
||||
, m_logger(getLogger(QLatin1String("ClientConnection")))
|
||||
, m_socket(socket)
|
||||
, m_ip(socket->peerAddress())
|
||||
, m_logger(getLogger(QLatin1String("ClientConnection")))
|
||||
{}
|
||||
|
||||
ClientConnection::~ClientConnection()
|
||||
|
||||
+2
-2
@@ -11,8 +11,8 @@
|
||||
|
||||
using namespace CombatNetRadio::WebSocketInterface::Connection;
|
||||
|
||||
ConnectionHandler::ConnectionHandler() : m_server(nullptr),
|
||||
m_logger(NGL::NGLLoggerBootstrap::getNGLRootLogger()) {
|
||||
ConnectionHandler::ConnectionHandler() : m_logger(NGL::NGLLoggerBootstrap::getNGLRootLogger())
|
||||
, m_server(nullptr) {
|
||||
}
|
||||
|
||||
ConnectionHandler::~ConnectionHandler()
|
||||
|
||||
+2
-2
@@ -13,8 +13,8 @@ namespace WebSocketInterface
|
||||
namespace Messages
|
||||
{
|
||||
|
||||
MessageHandler::MessageHandler(ExerciseManager *exerciseManager) : m_exerciseManager(exerciseManager),
|
||||
m_logger(NGL::NGLLoggerBootstrap::getNGLRootLogger()) {
|
||||
MessageHandler::MessageHandler(ExerciseManager *exerciseManager) : m_logger(NGL::NGLLoggerBootstrap::getNGLRootLogger())
|
||||
, m_exerciseManager(exerciseManager) {
|
||||
Q_ASSERT(exerciseManager);
|
||||
}
|
||||
|
||||
|
||||
@@ -20,8 +20,8 @@ namespace CombatNetRadio
|
||||
ConfigCnr::ConfigCnr(int exerciseId, AudioVideoManagement::Interface::Dtc *avmDtc, InfrastructureManagement::Interface::Dtc *ismDtc) : m_exerciseId(exerciseId)
|
||||
, m_avmDtc(avmDtc)
|
||||
, m_ismDtc(ismDtc)
|
||||
, m_loggerJson(getLogger("ConfigCnr.Json")),
|
||||
m_logger(NGL::NGLLoggerBootstrap::getNGLRootLogger()) {
|
||||
, m_logger(NGL::NGLLoggerBootstrap::getNGLRootLogger())
|
||||
, m_loggerJson(getLogger("ConfigCnr.Json")) {
|
||||
Q_ASSERT(avmDtc);
|
||||
Q_ASSERT(ismDtc);
|
||||
|
||||
|
||||
@@ -18,8 +18,8 @@ namespace CombatNetRadio
|
||||
{
|
||||
|
||||
DdsHandler::DdsHandler(int domainId)
|
||||
: m_ddsConnector(std::make_shared<DDSConnector::DdsConnector>(domainId, IDL::PartitionType::Global))
|
||||
, m_logger(getLogger("DdsHandler"))
|
||||
: m_logger(getLogger("DdsHandler"))
|
||||
, m_ddsConnector(std::make_shared<DDSConnector::DdsConnector>(domainId, IDL::PartitionType::Global))
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "DdsHandler(" << domainId << ") for partition: " << m_ddsConnector->getDefaultPartition();
|
||||
}
|
||||
|
||||
@@ -16,8 +16,8 @@ namespace ComponentMonitor
|
||||
{
|
||||
|
||||
CheckmkHandler::CheckmkHandler() : QObject()
|
||||
, m_socket(new QTcpSocket(this)),
|
||||
m_logger(NGL::NGLLoggerBootstrap::getNGLRootLogger()) {
|
||||
, m_logger(NGL::NGLLoggerBootstrap::getNGLRootLogger())
|
||||
, m_socket(new QTcpSocket(this)) {
|
||||
TRACE_LOG(m_logger) << Q_FUNC_INFO << " START";
|
||||
TRACE_LOG(m_logger) << Q_FUNC_INFO << " END";
|
||||
}
|
||||
|
||||
@@ -13,8 +13,8 @@ namespace DifferentialGPS
|
||||
{
|
||||
|
||||
DdsHandler::DdsHandler(int domainId)
|
||||
: m_ddsConnector(std::make_shared<DDSConnector::DdsConnector>(domainId, IDL::PartitionType::Global))
|
||||
, m_logger(getLogger("DdsHandler"))
|
||||
: m_logger(getLogger("DdsHandler"))
|
||||
, m_ddsConnector(std::make_shared<DDSConnector::DdsConnector>(domainId, IDL::PartitionType::Global))
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "DdsHandler(" << domainId << ") for partition: " << m_ddsConnector->getDefaultPartition();
|
||||
} // end of ctor()
|
||||
|
||||
@@ -17,11 +17,11 @@ namespace DifferentialGPS
|
||||
{
|
||||
MainThread::MainThread(QObject *parent)
|
||||
: QObject(parent)
|
||||
, m_logger(getLogger("MainThread"))
|
||||
, m_ddsHandler(nullptr)
|
||||
, m_dgpsTimer(new QTimer(this))
|
||||
, m_tetraIfNum(0)
|
||||
, m_trimbleIfNum(0)
|
||||
, m_logger(getLogger("MainThread"))
|
||||
, m_broadcastTime(QTime::currentTime())
|
||||
, m_broadcastCycle_ms(10000)
|
||||
{
|
||||
|
||||
@@ -94,7 +94,7 @@ bool get(const QJsonObject &obj, const QString &key, double &val, bool bOptional
|
||||
template <>
|
||||
bool get(const QJsonObject &obj, const QString &key, FinalAttackHeadingMode &val, bool bOptional)
|
||||
{
|
||||
int iVal;
|
||||
int iVal = 0;
|
||||
get(obj, key, iVal, bOptional);
|
||||
switch (static_cast<FinalAttackHeadingMode>(iVal))
|
||||
{
|
||||
@@ -111,7 +111,7 @@ bool get(const QJsonObject &obj, const QString &key, FinalAttackHeadingMode &val
|
||||
template <>
|
||||
bool get(const QJsonObject &obj, const QString &key, FuseType &val, bool bOptional)
|
||||
{
|
||||
int iVal;
|
||||
int iVal = 0;
|
||||
get(obj, key, iVal, bOptional);
|
||||
switch (static_cast<FuseType>(iVal))
|
||||
{
|
||||
@@ -129,7 +129,7 @@ bool get(const QJsonObject &obj, const QString &key, FuseType &val, bool bOption
|
||||
template <>
|
||||
bool get(const QJsonObject &obj, const QString &key, Heading2InitialPointMode &val, bool bOptional)
|
||||
{
|
||||
int iVal;
|
||||
int iVal = 0;
|
||||
get(obj, key, iVal, bOptional);
|
||||
switch (static_cast<Heading2InitialPointMode>(iVal))
|
||||
{
|
||||
@@ -150,7 +150,7 @@ bool get(const QJsonObject &obj, const QString &key, Heading2InitialPointMode &v
|
||||
template <>
|
||||
bool get(const QJsonObject &obj, const QString &key, Munition &val, bool bOptional)
|
||||
{
|
||||
int iVal;
|
||||
int iVal = 0;
|
||||
get(obj, key, iVal, bOptional);
|
||||
switch (static_cast<Munition>(iVal))
|
||||
{
|
||||
@@ -206,7 +206,7 @@ bool get(const QJsonObject &obj, const QString &key, Munition &val, bool bOption
|
||||
template <>
|
||||
bool get(const QJsonObject &obj, const QString &key, ReleaseMode &val, bool bOptional)
|
||||
{
|
||||
int iVal;
|
||||
int iVal = 0;
|
||||
get(obj, key, iVal, bOptional);
|
||||
switch (static_cast<ReleaseMode>(iVal))
|
||||
{
|
||||
@@ -223,7 +223,7 @@ bool get(const QJsonObject &obj, const QString &key, ReleaseMode &val, bool bOpt
|
||||
template <>
|
||||
bool get(const QJsonObject &obj, const QString &key, TimeForTargetMode &val, bool bOptional)
|
||||
{
|
||||
int iVal;
|
||||
int iVal = 0;
|
||||
get(obj, key, iVal, bOptional);
|
||||
switch (static_cast<TimeForTargetMode>(iVal))
|
||||
{
|
||||
|
||||
@@ -51,8 +51,8 @@ int NasatAircraftParticipantEx::partyId() const
|
||||
|
||||
|
||||
HandlerParticipant::HandlerParticipant(Initialization *mainHandler)
|
||||
: m_mainHandler(mainHandler)
|
||||
, m_logger(getLogger("ParticipantPositionPublisher"))
|
||||
: m_logger(getLogger("ParticipantPositionPublisher"))
|
||||
, m_mainHandler(mainHandler)
|
||||
{}
|
||||
|
||||
HandlerParticipant::~HandlerParticipant()
|
||||
|
||||
+2
@@ -32,5 +32,7 @@ void TestExAnmeldebestaetigung::testExAnmeldebestaetigung()
|
||||
const QJsonObject jsonObj = jsonDoc.object();
|
||||
QJsonObject dataObj = jsonObj[AdlerJson::JsonKeys::DATA()].toObject();
|
||||
|
||||
// WIP: parsed from dataObj once the test body is completed
|
||||
AdlerJson::AnBestaetigungsdaten anBestaetigungsdaten;
|
||||
Q_UNUSED(anBestaetigungsdaten);
|
||||
}
|
||||
+18
-17
@@ -8,6 +8,7 @@
|
||||
*/
|
||||
|
||||
#include "aes_handler.h"
|
||||
#include <utility>
|
||||
#include "DDS/Core/function_reply_object.h"
|
||||
#include "aes.hpp"
|
||||
#include "json_dispatcher.h"
|
||||
@@ -128,7 +129,7 @@ void AesHandler::onEffectClusterModifyReply(const Core::FunctionReplyObject &rep
|
||||
|
||||
std::vector<std::string> args;
|
||||
args.reserve(argsList.size());
|
||||
for (const auto &str : qAsConst(argsList))
|
||||
for (const auto &str : std::as_const(argsList))
|
||||
args.emplace_back(str.toStdString());
|
||||
|
||||
req.notification().content(content.toStdString());
|
||||
@@ -171,7 +172,7 @@ void AesHandler::onEffectClusterModifyReply(const Core::FunctionReplyObject &rep
|
||||
std::vector<NotificationManagement::Address> recipientIdsDds;
|
||||
recipientIdsDds.reserve(recipientIds.size());
|
||||
|
||||
for (const auto &recipientId : qAsConst(recipientIds))
|
||||
for (const auto &recipientId : std::as_const(recipientIds))
|
||||
{
|
||||
NotificationManagement::Address addr;
|
||||
addr.addressId(recipientId);
|
||||
@@ -349,7 +350,7 @@ void AesHandler::sendTrajectoryAdlerModifyRequest(const WirkfeldplanungData &dat
|
||||
QVector<int> subordinates = m_dtcPpm->getSubordinatesByParticipant(participantId);
|
||||
QVector<ParticipantManagement::ParticipantPosition> subordinatePositions;
|
||||
|
||||
for (int subordinate : qAsConst(subordinates))
|
||||
for (int subordinate : std::as_const(subordinates))
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "subordinates(" << participantId << ") :" << subordinate;
|
||||
subordinatePositions.append(m_dtcPpm->participantPosition(subordinate));
|
||||
@@ -365,7 +366,7 @@ void AesHandler::sendTrajectoryAdlerModifyRequest(const WirkfeldplanungData &dat
|
||||
|
||||
double grad = (data.zieldaten.zielachse / 6400.) * 360.0;
|
||||
|
||||
for (Flugbahnpunkt pos : qAsConst(data.feuerkommando.wirkmittel.at(wirkmittelIndex).flugbahnpunkt))
|
||||
for (Flugbahnpunkt pos : std::as_const(data.feuerkommando.wirkmittel.at(wirkmittelIndex).flugbahnpunkt))
|
||||
{
|
||||
/*
|
||||
DEBUG_LOG(m_logger) << "Flugbahnpunkt:"
|
||||
@@ -625,7 +626,7 @@ void AesHandler::handleEffectCluster(const WirkfeldplanungData &data, int wsId)
|
||||
QList<QRectF> rects;
|
||||
int zone = 0;
|
||||
QVector<QPointF> vecPoints;
|
||||
for (const WirkmittelFeuerkommando &effector : qAsConst(data.feuerkommando.wirkmittel))
|
||||
for (const WirkmittelFeuerkommando &effector : std::as_const(data.feuerkommando.wirkmittel))
|
||||
{
|
||||
// get the target point for the effector
|
||||
const QPointF centerPoint(effector.auftreffpunkt.koordinate.longitude * (M_PI / 180.0), effector.auftreffpunkt.koordinate.latitude * (M_PI / 180.0));
|
||||
@@ -674,9 +675,9 @@ void AesHandler::handleEffectCluster(const WirkfeldplanungData &data, int wsId)
|
||||
// Now that we know the impact radius we create a boundingbox around all impact areas
|
||||
int zone = 0;
|
||||
QVector<QPointF> vecPoints;
|
||||
for (const WirkmittelFeuerkommandoRakete &effector : qAsConst(data.feuerkommando.wirkmittelRakete))
|
||||
for (const WirkmittelFeuerkommandoRakete &effector : std::as_const(data.feuerkommando.wirkmittelRakete))
|
||||
{
|
||||
for (const Treffpunkt &treffpunkt : qAsConst(effector.treffpunkte))
|
||||
for (const Treffpunkt &treffpunkt : std::as_const(effector.treffpunkte))
|
||||
{
|
||||
const QPointF centerPoint(treffpunkt.koordinate.koordinate.longitude * (M_PI / 180.0), treffpunkt.koordinate.koordinate.latitude * (M_PI / 180.0));
|
||||
|
||||
@@ -744,7 +745,7 @@ void AesHandler::handleEffectCluster(const WirkfeldplanungData &data, int wsId)
|
||||
|
||||
if (data.feuerkommando.wirkmittel.size() > 0)
|
||||
{
|
||||
for (const auto &effectorAdler : qAsConst(data.feuerkommando.wirkmittel))
|
||||
for (const auto &effectorAdler : std::as_const(data.feuerkommando.wirkmittel))
|
||||
{
|
||||
AreaEffectSimulation::EffectorData effectorData;
|
||||
effectorData.angleOfFall() = 0;
|
||||
@@ -778,7 +779,7 @@ void AesHandler::handleEffectCluster(const WirkfeldplanungData &data, int wsId)
|
||||
const double useNewGrad = -90 + std::atan2(coordDiff.y, coordDiff.x) * (180.0 / M_PI);
|
||||
DEBUG_LOG(m_logger) << "Atan2 Deg to: last point " << std::atan2(coordDiff.y, coordDiff.x) * (180.0 / M_PI);
|
||||
|
||||
for (const auto &flightPointAdler : qAsConst(effectorAdler.flugbahnpunkt))
|
||||
for (const auto &flightPointAdler : std::as_const(effectorAdler.flugbahnpunkt))
|
||||
{
|
||||
Core::RelativePositionRelativeTime flightPoint;
|
||||
flightPoint.offsetX() = 0; // flightPointAdler.zRelativ;
|
||||
@@ -826,7 +827,7 @@ void AesHandler::handleEffectCluster(const WirkfeldplanungData &data, int wsId)
|
||||
}
|
||||
else if (data.feuerkommando.wirkmittelRakete.size() > 0)
|
||||
{
|
||||
for (const auto &effectorAdler : qAsConst(data.feuerkommando.wirkmittelRakete))
|
||||
for (const auto &effectorAdler : std::as_const(data.feuerkommando.wirkmittelRakete))
|
||||
{
|
||||
AreaEffectSimulation::EffectorData effectorData;
|
||||
|
||||
@@ -851,7 +852,7 @@ void AesHandler::handleEffectCluster(const WirkfeldplanungData &data, int wsId)
|
||||
// create centroid
|
||||
Core::GeoPosition mhpPos;
|
||||
QPointF centroid;
|
||||
for (const auto &treffpunkt : qAsConst(effectorAdler.treffpunkte))
|
||||
for (const auto &treffpunkt : std::as_const(effectorAdler.treffpunkte))
|
||||
centroid += {treffpunkt.koordinate.koordinate.latitude, treffpunkt.koordinate.koordinate.longitude};
|
||||
|
||||
centroid /= effectorAdler.treffpunkte.size();
|
||||
@@ -889,7 +890,7 @@ void AesHandler::handleEffectCluster(const WirkfeldplanungData &data, int wsId)
|
||||
double currentFlightTime = 0.0;
|
||||
|
||||
const LtsCoordTrans::UtmCoordinate utmStartPos = LtsCoordTrans::UtmCoordinate::fromGeographic(participantPosition.pos().lon(), participantPosition.pos().lat());
|
||||
for (const Core::GeoPosition &pos : qAsConst(trajectoryWithoutTime))
|
||||
for (const Core::GeoPosition &pos : std::as_const(trajectoryWithoutTime))
|
||||
{
|
||||
const LtsCoordTrans::UtmCoordinate utmCurrentPos = LtsCoordTrans::UtmCoordinate::fromGeographic(pos.lon(), pos.lat());
|
||||
|
||||
@@ -935,7 +936,7 @@ void AesHandler::handleEffectCluster(const WirkfeldplanungData &data, int wsId)
|
||||
std::vector<ProjectDataManagement::L27_EffectorId> refWirkmittel;
|
||||
refWirkmittel.reserve(data.feuerkommando.wirkmittel.size());
|
||||
|
||||
for (const auto &wm : qAsConst(data.feuerkommando.wirkmittel))
|
||||
for (const auto &wm : std::as_const(data.feuerkommando.wirkmittel))
|
||||
{
|
||||
ammoCounter += wm.geschoss.anzahl; // Counts every Ammo that will be shooted
|
||||
DEBUG_LOG(m_logger) << "INSERT KENNER INTO MAP: " << data.feuerkampfReferenz << "---------" << wm.kenner;
|
||||
@@ -954,7 +955,7 @@ QList<qint32> AesHandler::findAllPendingEffectCluster(int partyId)
|
||||
// QList<AreaEffectSimulation::EffectCluster> ret;
|
||||
QList<qint32> ret;
|
||||
const auto &effectClusters = m_dtcAes->effectClusters();
|
||||
for (const auto &effectCluster : qAsConst(effectClusters))
|
||||
for (const auto &effectCluster : std::as_const(effectClusters))
|
||||
{
|
||||
if (effectCluster.partyId() != partyId)
|
||||
continue;
|
||||
@@ -993,7 +994,7 @@ void AesHandler::handleAmmoCount(const Feuerkampfdaten &data, int saaPartyId, bo
|
||||
|
||||
const auto &aesEffetClusters = m_dtcAes->effectClusters();
|
||||
|
||||
for (const auto &aes : qAsConst(aesEffetClusters))
|
||||
for (const auto &aes : std::as_const(aesEffetClusters))
|
||||
{
|
||||
if (aes.isDeleted() || aes.partyId() != saaPartyId || aes.element() != refTrimmed.toStdString())
|
||||
{
|
||||
@@ -1024,7 +1025,7 @@ void AesHandler::handleAmmoCount(const Feuerkampfdaten &data, int saaPartyId, bo
|
||||
{
|
||||
auto refKenners = m_feuerkampfReferenzWirkmittel.value(refTrimmed);
|
||||
|
||||
for (const auto &kenner : qAsConst(refKenners))
|
||||
for (const auto &kenner : std::as_const(refKenners))
|
||||
{
|
||||
ExVollzugsmeldung exvm;
|
||||
exvm.feuerkampfdaten.feuerkampfReferenz = data.feuerkampfReferenz;
|
||||
@@ -1056,7 +1057,7 @@ void AesHandler::removeAllPendingEffectCluster(int partyId)
|
||||
|
||||
INFO_LOG(m_logger) << "Pending effect cluster size: " << effectClusterIds.size();
|
||||
Core::RemoveElementRequest req;
|
||||
for (const qint32 id : qAsConst(effectClusterIds))
|
||||
for (const qint32 id : std::as_const(effectClusterIds))
|
||||
{
|
||||
req.id(id);
|
||||
INFO_LOG(m_logger) << "Remove effect cluster id: " << id;
|
||||
|
||||
+3
-2
@@ -8,6 +8,7 @@
|
||||
*/
|
||||
|
||||
#include "json_dispatcher.h"
|
||||
#include <utility>
|
||||
#include "json_handler_rx.h"
|
||||
#include "json_handler_tx.h"
|
||||
#include "settings.h"
|
||||
@@ -910,7 +911,7 @@ void JsonDispatcher::getCreateNotificationRequestData(const int wsId,
|
||||
|
||||
std::vector<std::string> args;
|
||||
args.reserve(contentArgs.size());
|
||||
for (const auto & str : qAsConst(contentArgs))
|
||||
for (const auto & str : std::as_const(contentArgs))
|
||||
args.emplace_back(str.toStdString());
|
||||
|
||||
notif.content(content.toStdString());
|
||||
@@ -930,7 +931,7 @@ void JsonDispatcher::getCreateNotificationRequestData(const int wsId,
|
||||
std::vector<NotificationManagement::Address> recipientIdsDds;
|
||||
recipientIdsDds.reserve(recipientIds.size());
|
||||
|
||||
for (const auto &recipientId : qAsConst(recipientIds))
|
||||
for (const auto &recipientId : std::as_const(recipientIds))
|
||||
{
|
||||
NotificationManagement::Address addr;
|
||||
addr.addressId(recipientId);
|
||||
|
||||
+30
-29
@@ -1,4 +1,5 @@
|
||||
#include "telegrams.h"
|
||||
#include <utility>
|
||||
|
||||
#include <QDebug>
|
||||
#include <QJsonDocument>
|
||||
@@ -332,7 +333,7 @@ void SAATELEGRAMS_EXPORT zielmeldedatenFromJson(const QJsonObject &data, Zielmel
|
||||
zielmeldedaten.forderung = ForderungMap.value(data[JsonKeys::FORDERUNG()].toString());
|
||||
zielmeldedaten.dauer = toInteger(data[JsonKeys::DAUER()], bOk);
|
||||
QJsonArray FeuerkommandoArray = data[JsonKeys::FEUERKOMMANDO()].toArray();
|
||||
for (const QJsonValue &value : qAsConst(FeuerkommandoArray))
|
||||
for (const QJsonValue &value : std::as_const(FeuerkommandoArray))
|
||||
{
|
||||
Feuerkommando feuerkommando;
|
||||
feuerkommandoFromJson(value.toObject(), feuerkommando, bOk); // EX-L34 Wirkmittel Feuerkommando
|
||||
@@ -362,7 +363,7 @@ void SAATELEGRAMS_EXPORT feuerstellungsdatenFromJson(const QJsonObject &data, Fe
|
||||
einheitfromJson(data[JsonKeys::FEUEREINHEIT()].toObject(), feuerstellungsdaten.feuereinheit, bOk); // EX-L3
|
||||
koordinateMitHoeheFromJson(data[JsonKeys::MITTELPUNKT()].toObject(), feuerstellungsdaten.mittelpunkt, bOk); // EX-L3
|
||||
QJsonArray koordinatenArray = data[JsonKeys::KOORDINATEN()].toArray();
|
||||
for (const QJsonValue &value : qAsConst(koordinatenArray))
|
||||
for (const QJsonValue &value : std::as_const(koordinatenArray))
|
||||
{
|
||||
KoordinateMitHoehe koordinate;
|
||||
koordinateMitHoeheFromJson(value.toObject(), koordinate, bOk); // EX-L34 Wirkmittel Feuerkommando
|
||||
@@ -370,7 +371,7 @@ void SAATELEGRAMS_EXPORT feuerstellungsdatenFromJson(const QJsonObject &data, Fe
|
||||
}
|
||||
|
||||
QJsonArray geschosseArray = data[JsonKeys::GESCHOSSE()].toArray();
|
||||
for (const QJsonValue &value : qAsConst(geschosseArray))
|
||||
for (const QJsonValue &value : std::as_const(geschosseArray))
|
||||
{
|
||||
Geschoss geschosse;
|
||||
geschossfromJson(value.toObject(), geschosse, bOk); // EX-L34 Wirkmittel Feuerkommando
|
||||
@@ -394,7 +395,7 @@ void SAATELEGRAMS_EXPORT feuerstellungsdatenToJson(QJsonObject &data, const Feue
|
||||
data[JsonKeys::MITTELPUNKT()] = mittelpunkt;
|
||||
|
||||
QJsonArray koordinaten;
|
||||
for (const auto &koordinate : qAsConst(feuerstellungsdaten.koordinaten))
|
||||
for (const auto &koordinate : std::as_const(feuerstellungsdaten.koordinaten))
|
||||
{
|
||||
QJsonObject koordinateObj;
|
||||
koordinateMitHoeheToJson(koordinateObj, koordinate);
|
||||
@@ -403,7 +404,7 @@ void SAATELEGRAMS_EXPORT feuerstellungsdatenToJson(QJsonObject &data, const Feue
|
||||
data[JsonKeys::KOORDINATEN()] = koordinaten;
|
||||
|
||||
QJsonArray geschosse;
|
||||
for (const auto &geschoss : qAsConst(feuerstellungsdaten.geschosse))
|
||||
for (const auto &geschoss : std::as_const(feuerstellungsdaten.geschosse))
|
||||
{
|
||||
QJsonObject geschossObj;
|
||||
geschossToJson(geschossObj, geschoss);
|
||||
@@ -425,7 +426,7 @@ void SAATELEGRAMS_EXPORT waffensystemdatenFromJson(const QJsonObject &data, Waff
|
||||
einheitfromJson(data[JsonKeys::EINHEIT()].toObject(), waffensystemdaten.einheit, bOk); // EX-L3
|
||||
|
||||
QJsonArray geschosseArray = data[JsonKeys::GESCHOSSE()].toArray();
|
||||
for (const QJsonValue &value : qAsConst(geschosseArray))
|
||||
for (const QJsonValue &value : std::as_const(geschosseArray))
|
||||
{
|
||||
Geschoss geschosse;
|
||||
geschossfromJson(value.toObject(), geschosse, bOk); // EX-L34 Wirkmittel Feuerkommando
|
||||
@@ -445,7 +446,7 @@ void SAATELEGRAMS_EXPORT waffensystemdatenToJson(QJsonObject &data, const Waffen
|
||||
data[JsonKeys::EINHEIT()] = einheit;
|
||||
|
||||
QJsonArray geschosse;
|
||||
for (const auto &geschoss : qAsConst(waffensystemdaten.geschosse))
|
||||
for (const auto &geschoss : std::as_const(waffensystemdaten.geschosse))
|
||||
{
|
||||
QJsonObject geschossObj;
|
||||
geschossToJson(geschossObj, geschoss);
|
||||
@@ -469,7 +470,7 @@ void SAATELEGRAMS_EXPORT ladeplatzdatenFromJson(const QJsonObject &data, Ladepla
|
||||
|
||||
koordinateMitHoeheFromJson(data[JsonKeys::KOORDINATE()].toObject(), ladeplatzdaten.koordinate, bOk);
|
||||
QJsonArray geschosseArray = data[JsonKeys::GESCHOSSE()].toArray();
|
||||
for (const QJsonValue &value : qAsConst(geschosseArray))
|
||||
for (const QJsonValue &value : std::as_const(geschosseArray))
|
||||
{
|
||||
Geschoss geschosse;
|
||||
geschossfromJson(value.toObject(), geschosse, bOk); // EX-L34 Wirkmittel Feuerkommando
|
||||
@@ -484,7 +485,7 @@ void SAATELEGRAMS_EXPORT ladeplatzdatenToJson(QJsonObject &data, const Ladeplatz
|
||||
data[JsonKeys::EINHEIT()] = einheit;
|
||||
|
||||
QJsonArray geschosse;
|
||||
for (const auto &geschoss : qAsConst(ladeplatzdaten.geschosse))
|
||||
for (const auto &geschoss : std::as_const(ladeplatzdaten.geschosse))
|
||||
{
|
||||
QJsonObject geschossObj;
|
||||
geschossToJson(geschossObj, geschoss);
|
||||
@@ -536,7 +537,7 @@ void SAATELEGRAMS_EXPORT koordinierungsdatenFromJson(const QJsonObject &data, Ko
|
||||
zeitangabe_DTGFromJson(data[JsonKeys::BIS()].toObject(), koordinierungsdaten.bis, bOk); // EX-L15
|
||||
|
||||
QJsonArray koordinatenArray = data[JsonKeys::KOORDINATEN()].toArray();
|
||||
for (const QJsonValue &value : qAsConst(koordinatenArray))
|
||||
for (const QJsonValue &value : std::as_const(koordinatenArray))
|
||||
{
|
||||
Koordinate koordinate;
|
||||
koordinatefromJson(value.toObject(), koordinate, bOk); // EX-L13
|
||||
@@ -561,7 +562,7 @@ void SAATELEGRAMS_EXPORT koordinierungsdatenToJson(QJsonObject &data, const Koor
|
||||
data[JsonKeys::BIS()] = objTimestamp;
|
||||
|
||||
QJsonArray koordinatenArray;
|
||||
for (const auto &koordinate : qAsConst(koordinierungsdaten.koordinaten))
|
||||
for (const auto &koordinate : std::as_const(koordinierungsdaten.koordinaten))
|
||||
{
|
||||
QJsonObject objKoordinate;
|
||||
koordinateToJson(objKoordinate, koordinate);
|
||||
@@ -817,7 +818,7 @@ void SAATELEGRAMS_EXPORT erkundungsstellungenFromJson(const QJsonObject &data, E
|
||||
// Wirkungsbereich wirkungsbereich; // EX-L18
|
||||
|
||||
QJsonArray waffenplaetzeArray = data[JsonKeys::WAFFENPLAETZE()].toArray();
|
||||
for (const QJsonValue &value : qAsConst(waffenplaetzeArray))
|
||||
for (const QJsonValue &value : std::as_const(waffenplaetzeArray))
|
||||
{
|
||||
KoordinateMitHoehe koordinateMitHoehe;
|
||||
koordinateMitHoeheFromJson(value.toObject(), koordinateMitHoehe, bOk);
|
||||
@@ -829,7 +830,7 @@ void SAATELEGRAMS_EXPORT erkundungsstellungenFromJson(const QJsonObject &data, E
|
||||
void SAATELEGRAMS_EXPORT erkundungsstellungenToJson(QJsonObject &data, const Erkundungsstellungen &erkundungsstellungen)
|
||||
{
|
||||
QJsonArray objWaffenplatzList;
|
||||
for (const auto waffenplatz : qAsConst(erkundungsstellungen.waffenplaetze))
|
||||
for (const auto waffenplatz : std::as_const(erkundungsstellungen.waffenplaetze))
|
||||
{
|
||||
QJsonObject objWaffenplatz;
|
||||
koordinateMitHoeheToJson(objWaffenplatz, waffenplatz);
|
||||
@@ -855,7 +856,7 @@ void SAATELEGRAMS_EXPORT feuerkommandoFromJson(const QJsonObject &data, Feuerkom
|
||||
else
|
||||
{
|
||||
QJsonArray wirkmittelArray = data[JsonKeys::WIRKMITTEL()].toArray();
|
||||
for (const QJsonValue &value : qAsConst(wirkmittelArray))
|
||||
for (const QJsonValue &value : std::as_const(wirkmittelArray))
|
||||
{
|
||||
WirkmittelFeuerkommando wirkmittel;
|
||||
wirkmittelFeuerkommandoFromJson(value.toObject(), wirkmittel, bOk); // EX-L34 Wirkmittel Feuerkommando
|
||||
@@ -867,7 +868,7 @@ void SAATELEGRAMS_EXPORT feuerkommandoFromJson(const QJsonObject &data, Feuerkom
|
||||
else
|
||||
{
|
||||
QJsonArray wirkmittelArray = data[JsonKeys::WIRKMITTELRAKETE()].toArray();
|
||||
for (const QJsonValue &value : qAsConst(wirkmittelArray))
|
||||
for (const QJsonValue &value : std::as_const(wirkmittelArray))
|
||||
{
|
||||
WirkmittelFeuerkommandoRakete wirkmittel;
|
||||
wirkmittelFeuerkommandoRaketeFromJson(value.toObject(), wirkmittel, bOk); // EX-L34 Wirkmittel Feuerkommando
|
||||
@@ -878,7 +879,7 @@ void SAATELEGRAMS_EXPORT feuerkommandoFromJson(const QJsonObject &data, Feuerkom
|
||||
|
||||
void SAATELEGRAMS_EXPORT feuerkommandosToJson(QJsonArray &data, const QVector<Feuerkommando> &feuerkommandos)
|
||||
{
|
||||
for (const auto &feuerkommando : qAsConst(feuerkommandos))
|
||||
for (const auto &feuerkommando : std::as_const(feuerkommandos))
|
||||
{
|
||||
QJsonObject objFeuerkommand;
|
||||
feuerkommandoToJson(objFeuerkommand, feuerkommando);
|
||||
@@ -892,7 +893,7 @@ void SAATELEGRAMS_EXPORT feuerkommandoToJson(QJsonObject &data, const Feuerkomma
|
||||
data[JsonKeys::TYP()] = waffensystemtypMap.key(feuerkommando.typ);
|
||||
QJsonArray objWirkmittelList;
|
||||
QJsonArray objWirkmittelRaketeList;
|
||||
for (const auto &kommando : qAsConst(feuerkommando.wirkmittel))
|
||||
for (const auto &kommando : std::as_const(feuerkommando.wirkmittel))
|
||||
{
|
||||
QJsonObject objWirkmittel;
|
||||
wirkmittelFeuerkommandoToJson(objWirkmittel, kommando);
|
||||
@@ -900,7 +901,7 @@ void SAATELEGRAMS_EXPORT feuerkommandoToJson(QJsonObject &data, const Feuerkomma
|
||||
}
|
||||
data[JsonKeys::WIRKMITTEL()] = objWirkmittelList;
|
||||
|
||||
for (const auto &kommando : qAsConst(feuerkommando.wirkmittelRakete))
|
||||
for (const auto &kommando : std::as_const(feuerkommando.wirkmittelRakete))
|
||||
{
|
||||
QJsonObject objWirkmittel;
|
||||
wirkmittelFeuerkommandoRaketeToJson(objWirkmittel, kommando);
|
||||
@@ -937,7 +938,7 @@ void wirkmittelFeuerkommandoFromJson(const QJsonObject &data, WirkmittelFeuerkom
|
||||
|
||||
void wirkmittelFeuerkommandosToJson(QJsonArray &data, const QVector<WirkmittelFeuerkommando> &wirkmittelFeuerkommando)
|
||||
{
|
||||
for (const auto &feuerkommando : qAsConst(wirkmittelFeuerkommando))
|
||||
for (const auto &feuerkommando : std::as_const(wirkmittelFeuerkommando))
|
||||
{
|
||||
QJsonObject fkd;
|
||||
wirkmittelFeuerkommandoToJson(fkd, feuerkommando);
|
||||
@@ -947,7 +948,7 @@ void wirkmittelFeuerkommandosToJson(QJsonArray &data, const QVector<WirkmittelFe
|
||||
|
||||
void wirkmittelFeuerkommansdoToJson(QJsonArray &data, const QVector<WirkmittelFeuerkommando> &wirkmittelFeuerkommando)
|
||||
{
|
||||
for (const auto &wfk : qAsConst(wirkmittelFeuerkommando))
|
||||
for (const auto &wfk : std::as_const(wirkmittelFeuerkommando))
|
||||
{
|
||||
QJsonObject obj;
|
||||
wirkmittelFeuerkommandoToJson(obj, wfk);
|
||||
@@ -1007,7 +1008,7 @@ void SAATELEGRAMS_EXPORT flugbahnpunktToJson(QJsonObject &data, const Flugbahnpu
|
||||
// Array [EX-L35 Flugbahnpunkte]
|
||||
void SAATELEGRAMS_EXPORT flugbahnpunkteFromJson(const QJsonArray &data, QVector<Flugbahnpunkt> &flugbahnpunkte, bool &bOk)
|
||||
{
|
||||
for (const QJsonValue &value : qAsConst(data))
|
||||
for (const QJsonValue &value : std::as_const(data))
|
||||
{
|
||||
QJsonObject obj = value.toObject();
|
||||
Flugbahnpunkt flugbahnpunkt;
|
||||
@@ -1021,7 +1022,7 @@ void SAATELEGRAMS_EXPORT flugbahnpunkteToJson(QJsonArray &data, const QVector<Fl
|
||||
if (flugbahnpunkte.isEmpty())
|
||||
return;
|
||||
|
||||
for (const auto &flugpunkt : qAsConst(flugbahnpunkte))
|
||||
for (const auto &flugpunkt : std::as_const(flugbahnpunkte))
|
||||
{
|
||||
QJsonObject objFlugpunkt;
|
||||
flugbahnpunktToJson(objFlugpunkt, flugpunkt);
|
||||
@@ -1168,7 +1169,7 @@ void treffpunktfromJson(const QJsonObject &data, Treffpunkt &treffpunkt, bool &b
|
||||
|
||||
void treffpunktefromJson(const QJsonArray &data, QVector<Treffpunkt> &treffpunkte, bool &bOk)
|
||||
{
|
||||
for (const QJsonValue &val : qAsConst(data))
|
||||
for (const QJsonValue &val : std::as_const(data))
|
||||
{
|
||||
Treffpunkt treffpunkt;
|
||||
treffpunktfromJson(val.toObject(), treffpunkt, bOk);
|
||||
@@ -1215,7 +1216,7 @@ void trefferpunktToJson(QJsonObject &data, const Treffpunkt &treffpunkt)
|
||||
|
||||
void trefferpunkteToJson(QJsonArray &data, const QVector<Treffpunkt> &treffpunkte)
|
||||
{
|
||||
for (const auto &treffpunkt : qAsConst(treffpunkte))
|
||||
for (const auto &treffpunkt : std::as_const(treffpunkte))
|
||||
{
|
||||
QJsonObject trp;
|
||||
trefferpunktToJson(trp, treffpunkt);
|
||||
@@ -1244,7 +1245,7 @@ void wirkmittelFeuerkommandoRaketeToJson(QJsonObject &data, const WirkmittelFeue
|
||||
|
||||
void wirkmittelFeuerkommandosRaketeToJson(QJsonArray &data, const QVector<WirkmittelFeuerkommandoRakete> &wirkmittelFeuerkommandoRakete)
|
||||
{
|
||||
for (const auto &feuerkommandoRakete : qAsConst(wirkmittelFeuerkommandoRakete))
|
||||
for (const auto &feuerkommandoRakete : std::as_const(wirkmittelFeuerkommandoRakete))
|
||||
{
|
||||
QJsonObject fkr;
|
||||
wirkmittelFeuerkommandoRaketeToJson(fkr, feuerkommandoRakete);
|
||||
@@ -1292,7 +1293,7 @@ void SAATELEGRAMS_EXPORT fuehrungsdatenFromJson(const QJsonObject &data, Fuehrun
|
||||
zeitangabe_DTGFromJson(data[JsonKeys::AB()].toObject(), fuehrungsdaten.ab, bOk); // EX-L15
|
||||
zeitangabe_DTGFromJson(data[JsonKeys::BIS()].toObject(), fuehrungsdaten.bis, bOk); // EX-L15
|
||||
QJsonArray koordinatenArray = data[JsonKeys::KOORDINATEN()].toArray();
|
||||
for (const QJsonValue &value : qAsConst(koordinatenArray))
|
||||
for (const QJsonValue &value : std::as_const(koordinatenArray))
|
||||
{
|
||||
Koordinate koordinate;
|
||||
koordinatefromJson(value.toObject(), koordinate, bOk); // EX-L13
|
||||
@@ -1315,7 +1316,7 @@ void SAATELEGRAMS_EXPORT fuehrungsdatenToJson(QJsonObject &data, const Fuehrungs
|
||||
data[JsonKeys::BIS()] = objTimestamp;
|
||||
|
||||
QJsonArray koordinatenArray;
|
||||
for (const auto &koordinate : qAsConst(fuehrungsdaten.koordinaten))
|
||||
for (const auto &koordinate : std::as_const(fuehrungsdaten.koordinaten))
|
||||
{
|
||||
QJsonObject objKoordinate;
|
||||
koordinateToJson(objKoordinate, koordinate);
|
||||
@@ -1378,7 +1379,7 @@ void SAATELEGRAMS_EXPORT flugbahndatenFromJson(const QJsonObject &data, Flugbahn
|
||||
flugbahndaten.fallwinkel = toInteger(data[JsonKeys::FALLWINKEL()], bOk);
|
||||
|
||||
QJsonArray flugbahnpunkteArray = data[JsonKeys::FLUGBAHNPUNKT()].toArray();
|
||||
for (const QJsonValue &value : qAsConst(flugbahnpunkteArray))
|
||||
for (const QJsonValue &value : std::as_const(flugbahnpunkteArray))
|
||||
{
|
||||
Flugbahnpunkt flugbahnpunkt;
|
||||
flugbahnpunktFromJson(value.toObject(), flugbahnpunkt, bOk); // EX-L13
|
||||
@@ -1410,7 +1411,7 @@ void SAATELEGRAMS_EXPORT flugbahndatenToJson(QJsonObject &data, const Flugbahnda
|
||||
data[JsonKeys::FALLWINKEL()] = flugbahndaten.fallwinkel;
|
||||
|
||||
QJsonArray flugbahnpunkte;
|
||||
for (const auto &flugbahnpunkt : qAsConst(flugbahndaten.flugbahnpunkt))
|
||||
for (const auto &flugbahnpunkt : std::as_const(flugbahndaten.flugbahnpunkt))
|
||||
{
|
||||
QJsonObject flugbahnpunktObj;
|
||||
flugbahnpunktToJson(flugbahnpunktObj, flugbahnpunkt);
|
||||
|
||||
@@ -13,11 +13,11 @@
|
||||
namespace TrainingAreaBase
|
||||
{
|
||||
|
||||
IsmHandler::IsmHandler(MainHandler *mainHandler) : m_mainHandler(mainHandler)
|
||||
IsmHandler::IsmHandler(MainHandler *mainHandler) : m_logger(NGL::NGLLoggerBootstrap::getNGLRootLogger())
|
||||
, m_mainHandler(mainHandler)
|
||||
, m_dtcIsm(nullptr)
|
||||
, m_distanceIpsToGps(Settings::distanceIpsToGps())
|
||||
, m_distanceOpsToGps(Settings::distanceOpsToGps()),
|
||||
m_logger(NGL::NGLLoggerBootstrap::getNGLRootLogger()) {}
|
||||
, m_distanceOpsToGps(Settings::distanceOpsToGps()) {}
|
||||
|
||||
bool IsmHandler::init()
|
||||
{
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
*/
|
||||
|
||||
#include "main_handler.h"
|
||||
#include <utility>
|
||||
#include "settings.h"
|
||||
#include "logger.h"
|
||||
#include "WebSocketInterface/Messages/reply_message.h"
|
||||
@@ -31,9 +32,9 @@ namespace TrainingAreaBase
|
||||
|
||||
MainHandler::MainHandler(QObject *parent)
|
||||
: QObject(parent)
|
||||
, m_ddsHandler(nullptr)
|
||||
, m_handlerWebSocket(nullptr)
|
||||
, m_logger(getLogger("MainHandler"))
|
||||
, m_ddsHandler(nullptr)
|
||||
, m_handlerWebSocket(nullptr)
|
||||
{}
|
||||
|
||||
MainHandler::~MainHandler()
|
||||
@@ -333,7 +334,7 @@ void MainHandler::onExerciseChanged(const ExerciseManagement::Exercise &data, Da
|
||||
m_txHandler->txData(exerciseStateData());
|
||||
|
||||
// update Interfaces
|
||||
for (const std::shared_ptr<Plugin::Interface> &ifc : qAsConst(m_interfaces))
|
||||
for (const std::shared_ptr<Plugin::Interface> &ifc : std::as_const(m_interfaces))
|
||||
ifc->exerciseChanged();
|
||||
}
|
||||
|
||||
@@ -392,7 +393,7 @@ void MainHandler::onDirectMessage(const QByteArray &jsonMessage)
|
||||
quint32 bitValue = 1U << it;
|
||||
QString name;
|
||||
QString isOk;
|
||||
for (const ProjectDataManagement::CanComponentString &ccs : qAsConst(m_ccsMap))
|
||||
for (const ProjectDataManagement::CanComponentString &ccs : std::as_const(m_ccsMap))
|
||||
{
|
||||
if (ccs.pdm_bitMask == bitValue)
|
||||
{
|
||||
@@ -436,7 +437,7 @@ void MainHandler::onDirectMessage(const QByteArray &jsonMessage)
|
||||
}
|
||||
|
||||
// componentErrors
|
||||
for (const auto &ele : qAsConst(biteError))
|
||||
for (const auto &ele : std::as_const(biteError))
|
||||
{
|
||||
QString text;
|
||||
QJsonObject error = ele.toObject();
|
||||
|
||||
@@ -10,9 +10,9 @@
|
||||
|
||||
namespace TrainingAreaBase
|
||||
{
|
||||
PdmHandler::PdmHandler(MainHandler *mainHandler) : m_initialized(false)
|
||||
, m_mainHandler(mainHandler),
|
||||
m_logger(NGL::NGLLoggerBootstrap::getNGLRootLogger()) {}
|
||||
PdmHandler::PdmHandler(MainHandler *mainHandler) : m_logger(NGL::NGLLoggerBootstrap::getNGLRootLogger())
|
||||
, m_initialized(false)
|
||||
, m_mainHandler(mainHandler) {}
|
||||
|
||||
bool PdmHandler::init()
|
||||
{
|
||||
|
||||
@@ -10,8 +10,8 @@
|
||||
using namespace TrainingAreaBase;
|
||||
|
||||
PositionHandler::PositionHandler(MainHandler *mainHandler) : QObject()
|
||||
, m_mainHandler(mainHandler),
|
||||
m_logger(NGL::NGLLoggerBootstrap::getNGLRootLogger()) {}
|
||||
, m_logger(NGL::NGLLoggerBootstrap::getNGLRootLogger())
|
||||
, m_mainHandler(mainHandler) {}
|
||||
|
||||
bool PositionHandler::init()
|
||||
{
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
*/
|
||||
|
||||
#include "recv_from_dds_fts.h"
|
||||
#include <utility>
|
||||
#include "main_handler.h"
|
||||
#include "ism_handler.h"
|
||||
#include "settings.h"
|
||||
@@ -51,10 +52,10 @@ RecvFromDdsFts::RecvFromDdsFts(MainHandler *mainHandler, const std::shared_ptr<I
|
||||
, Interface::Fts::SendExFireReadinessRequestHandler(ftsTab)
|
||||
, Interface::Fts::SendExFiredReportRequestHandler(ftsTab)
|
||||
, Interface::Fts::SendExConfirmationReportRequestHandler(ftsTab)
|
||||
, m_logger(getLogger("RecvFromDdsFts"))
|
||||
, m_mainHandler(mainHandler)
|
||||
, m_ftsTab(ftsTab)
|
||||
, m_txCallback(txCallback)
|
||||
, m_logger(getLogger("RecvFromDdsFts"))
|
||||
{
|
||||
m_categorieData = loadRemainEffectStructMap();
|
||||
}
|
||||
@@ -567,6 +568,8 @@ void RecvFromDdsFts::onSetDevicePowerRequest(const rti::core::SampleIdentity &co
|
||||
|
||||
void RecvFromDdsFts::onAdlerCalculateTrajectoryRequest(const rti::core::SampleIdentity &cookie, const AdlerCalculateTrajectoryRequest &request)
|
||||
{
|
||||
Q_UNUSED(cookie);
|
||||
Q_UNUSED(request);
|
||||
DEBUG_LOG(m_logger) << "onSendCalculateTrajectoryAdlerRequest";
|
||||
}
|
||||
|
||||
@@ -722,7 +725,7 @@ QMap<int, QVector<RecvFromDdsFts::RemainEffectStruct>> RecvFromDdsFts::loadRemai
|
||||
QVector<RemainEffectStruct> resVec;
|
||||
|
||||
QStringList keyList = obj.keys();
|
||||
for (const auto &key : qAsConst(keyList))
|
||||
for (const auto &key : std::as_const(keyList))
|
||||
{
|
||||
const auto &val = obj.value(key).toObject();
|
||||
|
||||
@@ -731,7 +734,7 @@ QMap<int, QVector<RecvFromDdsFts::RemainEffectStruct>> RecvFromDdsFts::loadRemai
|
||||
|
||||
QStringList x = val.keys();
|
||||
int i=0;
|
||||
for (const auto &resElement : qAsConst(x))
|
||||
for (const auto &resElement : std::as_const(x))
|
||||
{
|
||||
const auto val2 = val.value(resElement).toInt();
|
||||
|
||||
|
||||
+43
-42
@@ -241,7 +241,7 @@ bool get(const QJsonObject &obj, const QString &key, std::vector<unsigned char>
|
||||
template <>
|
||||
bool get(const QJsonObject &obj, const QString &key, VulnerabilityState &val, bool bOptional)
|
||||
{
|
||||
int iVal;
|
||||
int iVal = 0;
|
||||
get(obj, key, iVal, bOptional);
|
||||
|
||||
val = static_cast<VulnerabilityState>(iVal);
|
||||
@@ -253,7 +253,7 @@ bool get(const QJsonObject &obj, const QString &key, VulnerabilityState &val, bo
|
||||
template <>
|
||||
bool get(const QJsonObject &obj, const QString &key, OriginatorType &val, bool bOptional)
|
||||
{
|
||||
int iVal;
|
||||
int iVal = 0;
|
||||
get(obj, key, iVal, bOptional);
|
||||
switch (static_cast<OriginatorType>(iVal))
|
||||
{
|
||||
@@ -275,7 +275,7 @@ bool get(const QJsonObject &obj, const QString &key, OriginatorType &val, bool b
|
||||
template <>
|
||||
bool get(const QJsonObject &obj, const QString &key, FunctionalAreaOperatingMode &val, bool bOptional)
|
||||
{
|
||||
int iVal;
|
||||
int iVal = 0;
|
||||
get(obj, key, iVal, bOptional);
|
||||
switch (static_cast<FunctionalAreaOperatingMode>(iVal))
|
||||
{
|
||||
@@ -291,7 +291,7 @@ bool get(const QJsonObject &obj, const QString &key, FunctionalAreaOperatingMode
|
||||
template <>
|
||||
bool get(const QJsonObject &obj, const QString &key, Language &val, bool bOptional)
|
||||
{
|
||||
int iVal;
|
||||
int iVal = 0;
|
||||
get(obj, key, iVal, bOptional);
|
||||
switch (static_cast<Language>(iVal))
|
||||
{
|
||||
@@ -311,7 +311,7 @@ bool get(const QJsonObject &obj, const QString &key, Language &val, bool bOption
|
||||
template <>
|
||||
bool get(const QJsonObject &obj, const QString &key, ParticipantLicenseState &val, bool bOptional)
|
||||
{
|
||||
int iVal;
|
||||
int iVal = 0;
|
||||
get(obj, key, iVal, bOptional);
|
||||
switch (static_cast<ParticipantLicenseState>(iVal))
|
||||
{
|
||||
@@ -328,7 +328,7 @@ bool get(const QJsonObject &obj, const QString &key, ParticipantLicenseState &va
|
||||
template <>
|
||||
bool get(const QJsonObject &obj, const QString &key, EquipmentConfigurationReport::MineHandgrenadeSensorMode &val, bool bOptional)
|
||||
{
|
||||
int iVal;
|
||||
int iVal = 0;
|
||||
get(obj, key, iVal, bOptional);
|
||||
switch (static_cast<EquipmentConfigurationReport::MineHandgrenadeSensorMode>(iVal))
|
||||
{
|
||||
@@ -344,7 +344,7 @@ bool get(const QJsonObject &obj, const QString &key, EquipmentConfigurationRepor
|
||||
template <>
|
||||
bool get(const QJsonObject &obj, const QString &key, EquipmentConfigurationReport::FirMode &val, bool bOptional)
|
||||
{
|
||||
int iVal;
|
||||
int iVal = 0;
|
||||
get(obj, key, iVal, bOptional);
|
||||
switch (static_cast<EquipmentConfigurationReport::FirMode>(iVal))
|
||||
{
|
||||
@@ -360,7 +360,7 @@ bool get(const QJsonObject &obj, const QString &key, EquipmentConfigurationRepor
|
||||
template <>
|
||||
bool get(const QJsonObject &obj, const QString &key, EquipmentConfigurationReport::MineLayerMode &val, bool bOptional)
|
||||
{
|
||||
int iVal;
|
||||
int iVal = 0;
|
||||
get(obj, key, iVal, bOptional);
|
||||
switch (static_cast<EquipmentConfigurationReport::MineLayerMode>(iVal))
|
||||
{
|
||||
@@ -376,7 +376,7 @@ bool get(const QJsonObject &obj, const QString &key, EquipmentConfigurationRepor
|
||||
template <>
|
||||
bool get(const QJsonObject &obj, const QString &key, EquipmentConfigurationReport::SpecialSensorStandardMode &val, bool bOptional)
|
||||
{
|
||||
int iVal;
|
||||
int iVal = 0;
|
||||
get(obj, key, iVal, bOptional);
|
||||
switch (static_cast<EquipmentConfigurationReport::SpecialSensorStandardMode>(iVal))
|
||||
{
|
||||
@@ -394,7 +394,7 @@ bool get(const QJsonObject &obj, const QString &key, EquipmentConfigurationRepor
|
||||
template <>
|
||||
bool get(const QJsonObject &obj, const QString &key, EquipmentConfigurationReport::AgdusHwMode &val, bool bOptional)
|
||||
{
|
||||
int iVal;
|
||||
int iVal = 0;
|
||||
get(obj, key, iVal, bOptional);
|
||||
switch (static_cast<EquipmentConfigurationReport::AgdusHwMode>(iVal))
|
||||
{
|
||||
@@ -410,7 +410,7 @@ bool get(const QJsonObject &obj, const QString &key, EquipmentConfigurationRepor
|
||||
template <>
|
||||
bool get(const QJsonObject &obj, const QString &key, EquipmentConfigurationReport::PositionUpdateInterval &val, bool bOptional)
|
||||
{
|
||||
int iVal;
|
||||
int iVal = 0;
|
||||
get(obj, key, iVal, bOptional);
|
||||
switch (static_cast<EquipmentConfigurationReport::PositionUpdateInterval>(iVal))
|
||||
{
|
||||
@@ -426,7 +426,7 @@ bool get(const QJsonObject &obj, const QString &key, EquipmentConfigurationRepor
|
||||
template <>
|
||||
bool get(const QJsonObject &obj, const QString &key, CtaDataError::Reason &val, bool bOptional)
|
||||
{
|
||||
int iVal;
|
||||
int iVal = 0;
|
||||
get(obj, key, iVal, bOptional);
|
||||
switch (static_cast<CtaDataError::Reason>(iVal))
|
||||
{
|
||||
@@ -460,7 +460,7 @@ bool get(const QJsonObject &obj, const QString &key, CtaDataError::Reason &val,
|
||||
template <>
|
||||
bool get(const QJsonObject &obj, const QString &key, CreateCContamination::Volatiliy &val, bool bOptional)
|
||||
{
|
||||
int iVal;
|
||||
int iVal = 0;
|
||||
get(obj, key, iVal, bOptional);
|
||||
switch (static_cast<CreateCContamination::Volatiliy>(iVal))
|
||||
{
|
||||
@@ -475,7 +475,7 @@ bool get(const QJsonObject &obj, const QString &key, CreateCContamination::Volat
|
||||
template <>
|
||||
bool get(const QJsonObject &obj, const QString &key, AreaEffectSimulationType &val, bool bOptional)
|
||||
{
|
||||
int iVal;
|
||||
int iVal = 0;
|
||||
get(obj, key, iVal, bOptional);
|
||||
switch (static_cast<AreaEffectSimulationType>(iVal))
|
||||
{
|
||||
@@ -503,7 +503,7 @@ bool get(const QJsonObject &obj, const QString &key, AreaEffectSimulationType &v
|
||||
template <>
|
||||
bool get(const QJsonObject &obj, const QString &key, IedType &val, bool bOptional)
|
||||
{
|
||||
int iVal;
|
||||
int iVal = 0;
|
||||
get(obj, key, iVal, bOptional);
|
||||
switch (static_cast<IedType>(iVal))
|
||||
{
|
||||
@@ -519,7 +519,7 @@ bool get(const QJsonObject &obj, const QString &key, IedType &val, bool bOptiona
|
||||
template <>
|
||||
bool get(const QJsonObject &obj, const QString &key, IedPairingState &val, bool bOptional)
|
||||
{
|
||||
int iVal;
|
||||
int iVal = 0;
|
||||
get(obj, key, iVal, bOptional);
|
||||
switch (static_cast<IedPairingState>(iVal))
|
||||
{
|
||||
@@ -535,7 +535,7 @@ bool get(const QJsonObject &obj, const QString &key, IedPairingState &val, bool
|
||||
template <>
|
||||
bool get(const QJsonObject &obj, const QString &key, IedTacticalState &val, bool bOptional)
|
||||
{
|
||||
int iVal;
|
||||
int iVal = 0;
|
||||
get(obj, key, iVal, bOptional);
|
||||
switch (static_cast<IedTacticalState>(iVal))
|
||||
{
|
||||
@@ -557,7 +557,7 @@ bool get(const QJsonObject &obj, const QString &key, IedTacticalState &val, bool
|
||||
template <>
|
||||
bool get(const QJsonObject &obj, const QString &key, IedError &val, bool bOptional)
|
||||
{
|
||||
int iVal;
|
||||
int iVal = 0;
|
||||
get(obj, key, iVal, bOptional);
|
||||
switch (static_cast<IedError>(iVal))
|
||||
{
|
||||
@@ -572,7 +572,7 @@ bool get(const QJsonObject &obj, const QString &key, IedError &val, bool bOption
|
||||
template <>
|
||||
bool get(const QJsonObject &obj, const QString &key, MinelayerThrowerData::ThrowingType &val, bool bOptional)
|
||||
{
|
||||
int iVal;
|
||||
int iVal = 0;
|
||||
get(obj, key, iVal, bOptional);
|
||||
switch (static_cast<MinelayerThrowerData::ThrowingType>(iVal))
|
||||
{
|
||||
@@ -592,7 +592,7 @@ bool get(const QJsonObject &obj, const QString &key, MinelayerThrowerData::Throw
|
||||
template <>
|
||||
bool get(const QJsonObject &obj, const QString &key, OpaquePayloadDataBase::Type &val, bool bOptional)
|
||||
{
|
||||
int iVal;
|
||||
int iVal = 0;
|
||||
get(obj, key, iVal, bOptional);
|
||||
switch (static_cast<OpaquePayloadDataBase::Type>(iVal))
|
||||
{
|
||||
@@ -609,7 +609,7 @@ bool get(const QJsonObject &obj, const QString &key, OpaquePayloadDataBase::Type
|
||||
template <>
|
||||
bool get(const QJsonObject &obj, const QString &key, TechnicalArea::Type &val, bool bOptional)
|
||||
{
|
||||
int iVal;
|
||||
int iVal = 0;
|
||||
get(obj, key, iVal, bOptional);
|
||||
switch (static_cast<TechnicalArea::Type>(iVal))
|
||||
{
|
||||
@@ -628,7 +628,7 @@ bool get(const QJsonObject &obj, const QString &key, TechnicalArea::Type &val, b
|
||||
template <>
|
||||
bool get(const QJsonObject &obj, const QString &key, ParticipantModeBase::OperationMode &val, bool bOptional)
|
||||
{
|
||||
int iVal;
|
||||
int iVal = 0;
|
||||
get(obj, key, iVal, bOptional);
|
||||
switch (static_cast<ParticipantModeBase::OperationMode>(iVal))
|
||||
{
|
||||
@@ -644,7 +644,7 @@ bool get(const QJsonObject &obj, const QString &key, ParticipantModeBase::Operat
|
||||
template <>
|
||||
bool get(const QJsonObject &obj, const QString &key, BiteReport::LoginType &val, bool bOptional)
|
||||
{
|
||||
int iVal;
|
||||
int iVal = 0;
|
||||
get(obj, key, iVal, bOptional);
|
||||
switch (static_cast<BiteReport::LoginType>(iVal))
|
||||
{
|
||||
@@ -661,7 +661,7 @@ bool get(const QJsonObject &obj, const QString &key, BiteReport::LoginType &val,
|
||||
template <>
|
||||
bool get(const QJsonObject &obj, const QString &key, ParticipantModeBase::WphMode &val, bool bOptional)
|
||||
{
|
||||
int iVal;
|
||||
int iVal = 0;
|
||||
get(obj, key, iVal, bOptional);
|
||||
switch (static_cast<ParticipantModeBase::WphMode>(iVal))
|
||||
{
|
||||
@@ -677,7 +677,7 @@ bool get(const QJsonObject &obj, const QString &key, ParticipantModeBase::WphMod
|
||||
template <>
|
||||
bool get(const QJsonObject &obj, const QString &key, ParticipantModeBase::PersonellProtection &val, bool bOptional)
|
||||
{
|
||||
int iVal;
|
||||
int iVal = 0;
|
||||
get(obj, key, iVal, bOptional);
|
||||
switch (static_cast<ParticipantModeBase::PersonellProtection>(iVal))
|
||||
{
|
||||
@@ -694,7 +694,7 @@ bool get(const QJsonObject &obj, const QString &key, ParticipantModeBase::Person
|
||||
template <>
|
||||
bool get(const QJsonObject &obj, const QString &key, ParticipantModeBase::ProtectionLevel &val, bool bOptional)
|
||||
{
|
||||
int iVal;
|
||||
int iVal = 0;
|
||||
get(obj, key, iVal, bOptional);
|
||||
switch (static_cast<ParticipantModeBase::ProtectionLevel>(iVal))
|
||||
{
|
||||
@@ -713,7 +713,7 @@ bool get(const QJsonObject &obj, const QString &key, ParticipantModeBase::Protec
|
||||
template <>
|
||||
bool get(const QJsonObject &obj, const QString &key, ParticipantModeBase::HandgrenadeSearchMode &val, bool bOptional)
|
||||
{
|
||||
int iVal;
|
||||
int iVal = 0;
|
||||
get(obj, key, iVal, bOptional);
|
||||
switch (static_cast<ParticipantModeBase::HandgrenadeSearchMode>(iVal))
|
||||
{
|
||||
@@ -729,7 +729,7 @@ bool get(const QJsonObject &obj, const QString &key, ParticipantModeBase::Handgr
|
||||
template <>
|
||||
bool get(const QJsonObject &obj, const QString &key, ParticipantModeBase::InternationalMode &val, bool bOptional)
|
||||
{
|
||||
int iVal;
|
||||
int iVal = 0;
|
||||
get(obj, key, iVal, bOptional);
|
||||
switch (static_cast<ParticipantModeBase::InternationalMode>(iVal))
|
||||
{
|
||||
@@ -745,7 +745,7 @@ bool get(const QJsonObject &obj, const QString &key, ParticipantModeBase::Intern
|
||||
template <>
|
||||
bool get(const QJsonObject &obj, const QString &key, ParticipantModeBase::ABCProtectionMode &val, bool bOptional)
|
||||
{
|
||||
int iVal;
|
||||
int iVal = 0;
|
||||
get(obj, key, iVal, bOptional);
|
||||
switch (static_cast<ParticipantModeBase::ABCProtectionMode>(iVal))
|
||||
{
|
||||
@@ -761,7 +761,7 @@ bool get(const QJsonObject &obj, const QString &key, ParticipantModeBase::ABCPro
|
||||
template <>
|
||||
bool get(const QJsonObject &obj, const QString &key, ParticipantConfigurationBase::FaultPositionHandling &val, bool bOptional)
|
||||
{
|
||||
int iVal;
|
||||
int iVal = 0;
|
||||
get(obj, key, iVal, bOptional);
|
||||
switch (static_cast<ParticipantConfigurationBase::FaultPositionHandling>(iVal))
|
||||
{
|
||||
@@ -778,7 +778,7 @@ bool get(const QJsonObject &obj, const QString &key, ParticipantConfigurationBas
|
||||
template <>
|
||||
bool get(const QJsonObject &obj, const QString &key, ParticipantConfigurationBase::SwitchingPositionIntervall &val, bool bOptional)
|
||||
{
|
||||
int iVal;
|
||||
int iVal = 0;
|
||||
get(obj, key, iVal, bOptional);
|
||||
switch (static_cast<ParticipantConfigurationBase::SwitchingPositionIntervall>(iVal))
|
||||
{
|
||||
@@ -794,7 +794,7 @@ bool get(const QJsonObject &obj, const QString &key, ParticipantConfigurationBas
|
||||
template <>
|
||||
bool get(const QJsonObject &obj, const QString &key, ParticipantConfigurationBase::OpticalCode &val, bool bOptional)
|
||||
{
|
||||
int iVal;
|
||||
int iVal = 0;
|
||||
get(obj, key, iVal, bOptional);
|
||||
switch (static_cast<ParticipantConfigurationBase::OpticalCode>(iVal))
|
||||
{
|
||||
@@ -811,7 +811,7 @@ bool get(const QJsonObject &obj, const QString &key, ParticipantConfigurationBas
|
||||
template <>
|
||||
bool get(const QJsonObject &obj, const QString &key, SanitationResult &val, bool bOptional)
|
||||
{
|
||||
int iVal;
|
||||
int iVal = 0;
|
||||
get(obj, key, iVal, bOptional);
|
||||
switch (static_cast<SanitationResult>(iVal))
|
||||
{
|
||||
@@ -829,7 +829,7 @@ bool get(const QJsonObject &obj, const QString &key, SanitationResult &val, bool
|
||||
template <>
|
||||
bool get(const QJsonObject &obj, const QString &key, SanitationEvaluation &val, bool bOptional)
|
||||
{
|
||||
int iVal;
|
||||
int iVal = 0;
|
||||
get(obj, key, iVal, bOptional);
|
||||
switch (static_cast<SanitationEvaluation>(iVal))
|
||||
{
|
||||
@@ -846,7 +846,7 @@ bool get(const QJsonObject &obj, const QString &key, SanitationEvaluation &val,
|
||||
template <>
|
||||
bool get(const QJsonObject &obj, const QString &key, Qualification &val, bool bOptional)
|
||||
{
|
||||
int iVal;
|
||||
int iVal = 0;
|
||||
get(obj, key, iVal, bOptional);
|
||||
switch (static_cast<Qualification>(iVal))
|
||||
{
|
||||
@@ -863,7 +863,7 @@ bool get(const QJsonObject &obj, const QString &key, Qualification &val, bool bO
|
||||
template <>
|
||||
bool get(const QJsonObject &obj, const QString &key, SanitationRepair::TreatmentResult &val, bool bOptional)
|
||||
{
|
||||
int iVal;
|
||||
int iVal = 0;
|
||||
get(obj, key, iVal, bOptional);
|
||||
switch (static_cast<SanitationRepair::TreatmentResult>(iVal))
|
||||
{
|
||||
@@ -880,7 +880,7 @@ bool get(const QJsonObject &obj, const QString &key, SanitationRepair::Treatment
|
||||
template <>
|
||||
bool get(const QJsonObject &obj, const QString &key, ExerciseStateData::ExerciseState &val, bool bOptional)
|
||||
{
|
||||
int iVal;
|
||||
int iVal = 0;
|
||||
get(obj, key, iVal, bOptional);
|
||||
switch (static_cast<ExerciseStateData::ExerciseState>(iVal))
|
||||
{
|
||||
@@ -899,7 +899,7 @@ bool get(const QJsonObject &obj, const QString &key, ExerciseStateData::Exercise
|
||||
template <>
|
||||
bool get(const QJsonObject &obj, const QString &key, ServiceControlEnum &val, bool bOptional)
|
||||
{
|
||||
int iVal;
|
||||
int iVal = 0;
|
||||
get(obj, key, iVal, bOptional);
|
||||
switch (static_cast<ServiceControlEnum>(iVal))
|
||||
{
|
||||
@@ -916,7 +916,7 @@ bool get(const QJsonObject &obj, const QString &key, ServiceControlEnum &val, bo
|
||||
template <>
|
||||
bool get(const QJsonObject &obj, const QString &key, PowerMethod &val, bool bOptional)
|
||||
{
|
||||
int iVal;
|
||||
int iVal = 0;
|
||||
get(obj, key, iVal, bOptional);
|
||||
switch (static_cast<PowerMethod>(iVal))
|
||||
{
|
||||
@@ -933,7 +933,7 @@ bool get(const QJsonObject &obj, const QString &key, PowerMethod &val, bool bOpt
|
||||
template <>
|
||||
bool get(const QJsonObject &obj, const QString &key, UAVActionTask &val, bool bOptional)
|
||||
{
|
||||
int iVal;
|
||||
int iVal = 0;
|
||||
get(obj, key, iVal, bOptional);
|
||||
switch (static_cast<UAVActionTask>(iVal))
|
||||
{
|
||||
@@ -944,6 +944,7 @@ bool get(const QJsonObject &obj, const QString &key, UAVActionTask &val, bool bO
|
||||
case UAVActionTask::Connect:
|
||||
case UAVActionTask::Loiter:
|
||||
case UAVActionTask::Return:
|
||||
case UAVActionTask::Observe:
|
||||
val = static_cast<UAVActionTask>(iVal);
|
||||
return true;
|
||||
}
|
||||
@@ -953,7 +954,7 @@ bool get(const QJsonObject &obj, const QString &key, UAVActionTask &val, bool bO
|
||||
template <>
|
||||
bool get(const QJsonObject &obj, const QString &key, UAVRadioLinkConnectionStatusType &val, bool bOptional)
|
||||
{
|
||||
int iVal;
|
||||
int iVal = 0;
|
||||
get(obj, key, iVal, bOptional);
|
||||
switch (static_cast<UAVRadioLinkConnectionStatusType>(iVal))
|
||||
{
|
||||
@@ -972,7 +973,7 @@ bool get(const QJsonObject &obj, const QString &key, UAVRadioLinkConnectionStatu
|
||||
template <>
|
||||
bool get(const QJsonObject &obj, const QString &key, UAVState &val, bool bOptional)
|
||||
{
|
||||
int iVal;
|
||||
int iVal = 0;
|
||||
get(obj, key, iVal, bOptional);
|
||||
switch (static_cast<UAVState>(iVal))
|
||||
{
|
||||
|
||||
@@ -14,11 +14,11 @@
|
||||
namespace TrainingAreaBaseOC
|
||||
{
|
||||
|
||||
TxDdlHandler::TxDdlHandler() : m_state(DdlState::NotStarted)
|
||||
TxDdlHandler::TxDdlHandler() : m_logger(NGL::NGLLoggerBootstrap::getNGLRootLogger())
|
||||
, m_state(DdlState::NotStarted)
|
||||
, m_segmentToggle(0)
|
||||
, m_sentCnt(0)
|
||||
, m_responseTimer(new QTimer(this)),
|
||||
m_logger(NGL::NGLLoggerBootstrap::getNGLRootLogger()) {
|
||||
, m_responseTimer(new QTimer(this)) {
|
||||
m_responseTimer->setInterval(1000);
|
||||
m_responseTimer->setSingleShot(true);
|
||||
connect(m_responseTimer, &QTimer::timeout, this, &TxDdlHandler::sendAbortOrRestartTimeout);
|
||||
|
||||
+3
-3
@@ -12,9 +12,9 @@
|
||||
namespace TrainingAreaBaseOC
|
||||
{
|
||||
|
||||
ConnectionHandlerSerial::ConnectionHandlerSerial() : m_spQuerry(new LtsSerialPortQuerry::LtsSerialPortQuerry(this))
|
||||
, m_receiveTimeoutTimer(new QTimer(this)),
|
||||
m_logger(NGL::NGLLoggerBootstrap::getNGLRootLogger()) {
|
||||
ConnectionHandlerSerial::ConnectionHandlerSerial() : m_logger(NGL::NGLLoggerBootstrap::getNGLRootLogger())
|
||||
, m_spQuerry(new LtsSerialPortQuerry::LtsSerialPortQuerry(this))
|
||||
, m_receiveTimeoutTimer(new QTimer(this)) {
|
||||
connect(m_spQuerry, &LtsSerialPortQuerry::LtsSerialPortQuerry::connectionEstablished, this, &ConnectionHandlerSerial::open);
|
||||
m_spQuerry->restartQuerry();
|
||||
m_receiveTimeoutTimer->setInterval(5000);
|
||||
|
||||
+2
-2
@@ -12,8 +12,8 @@
|
||||
namespace TrainingAreaBaseOC
|
||||
{
|
||||
|
||||
ConnectionHandlerTcp::ConnectionHandlerTcp() : m_timer(new QTimer(this)),
|
||||
m_logger(NGL::NGLLoggerBootstrap::getNGLRootLogger()) {
|
||||
ConnectionHandlerTcp::ConnectionHandlerTcp() : m_logger(NGL::NGLLoggerBootstrap::getNGLRootLogger())
|
||||
, m_timer(new QTimer(this)) {
|
||||
m_timer->setInterval(5000);
|
||||
connect(m_timer, &QTimer::timeout, this, &ConnectionHandlerTcp::open);
|
||||
}
|
||||
|
||||
+3
-3
@@ -15,14 +15,14 @@ using namespace NGL;
|
||||
|
||||
namespace TrainingAreaBaseOC
|
||||
{
|
||||
ConnectionHandlerTcpTtci::ConnectionHandlerTcpTtci() : m_messageDataStart(true)
|
||||
ConnectionHandlerTcpTtci::ConnectionHandlerTcpTtci() : m_logger(NGL::NGLLoggerBootstrap::getNGLRootLogger())
|
||||
, m_messageDataStart(true)
|
||||
, m_wirkfeldDataStart(true)
|
||||
, m_wirkfeldMultiplex(0)
|
||||
, m_sendingData(false)
|
||||
, m_segmentToggle(0)
|
||||
, m_canDevice(new Device(this))
|
||||
, m_canChannel(new Channel(QLatin1Char('@'), true, this)),
|
||||
m_logger(NGL::NGLLoggerBootstrap::getNGLRootLogger()) {
|
||||
, m_canChannel(new Channel(QLatin1Char('@'), true, this)) {
|
||||
connect(m_canChannel, &Channel::dataAvailable, this, &ConnectionHandlerTcpTtci::slotReadCanFrame);
|
||||
connect(m_canChannel, &Channel::disconnectedFromEq, this, &ConnectionHandlerTcpTtci::disconnectedFromEq);
|
||||
}
|
||||
|
||||
@@ -16,6 +16,7 @@ namespace TrainingAreaBaseOC
|
||||
|
||||
MainHandler::MainHandler(QObject *parent)
|
||||
: QObject(parent)
|
||||
, m_logger(getLogger("MainHandler"))
|
||||
, m_aesDtc(nullptr)
|
||||
, m_aesFtc(nullptr)
|
||||
, m_pdmDtc(nullptr)
|
||||
@@ -25,7 +26,6 @@ MainHandler::MainHandler(QObject *parent)
|
||||
, m_rxHandler(nullptr)
|
||||
, m_ftsHandler(nullptr)
|
||||
, m_websocketHandler(nullptr)
|
||||
, m_logger(getLogger("MainHandler"))
|
||||
{}
|
||||
|
||||
MainHandler::~MainHandler()
|
||||
|
||||
@@ -16,10 +16,10 @@ RecvFromDdsFts::RecvFromDdsFts(MainHandler *mainHandler)
|
||||
, Interface::Fts::SendTechnicalStateOcRequestHandler(mainHandler->dds()->ftsTaboc())
|
||||
, TrainingAreaBase::Interface::Fts::SendOcDataRequestHandler(mainHandler->dds()->ftsTab())
|
||||
, TrainingAreaBase::Interface::Fts::SendFireSmokeMarkerDataRequestHandler(mainHandler->dds()->ftsTab())
|
||||
, m_logger(NGL::NGLLoggerBootstrap::getNGLRootLogger())
|
||||
, m_ftsTaboc(mainHandler->dds()->ftsTaboc())
|
||||
, m_ftsTab(mainHandler->dds()->ftsTab())
|
||||
, m_txCallback(mainHandler->txHandler())
|
||||
, m_logger(NGL::NGLLoggerBootstrap::getNGLRootLogger())
|
||||
{}
|
||||
|
||||
void RecvFromDdsFts::onDemandCyclicPositionsRequest(const rti::core::SampleIdentity &cookie, const DemandCyclicPositionsRequest &request)
|
||||
|
||||
@@ -12,11 +12,11 @@
|
||||
namespace TrainingAreaBaseOC
|
||||
{
|
||||
|
||||
SendToDds::SendToDds(MainHandler *mainHandler) : m_dtsTaboc(mainHandler->dds()->dtsTaboc())
|
||||
SendToDds::SendToDds(MainHandler *mainHandler) : m_logger(NGL::NGLLoggerBootstrap::getNGLRootLogger())
|
||||
, m_dtsTaboc(mainHandler->dds()->dtsTaboc())
|
||||
, m_dtsTab(mainHandler->dds()->dtsTab())
|
||||
, m_utmCoord(LtsCoordTrans::UtmCoordinate())
|
||||
, m_idToSend(1),
|
||||
m_logger(NGL::NGLLoggerBootstrap::getNGLRootLogger()) {}
|
||||
, m_idToSend(1) {}
|
||||
|
||||
void SendToDds::rxData(const OcTelegrams::Display &inData)
|
||||
{
|
||||
|
||||
@@ -10,10 +10,10 @@ namespace TrainingAreaBaseOC
|
||||
{
|
||||
|
||||
Channel::Channel(QChar channel, bool bIsBinary, QObject *parent) : QObject(parent)
|
||||
, m_logger(NGL::NGLLoggerBootstrap::getNGLRootLogger().getNGLLogger("SCTT.Channel"))
|
||||
, m_channel(channel)
|
||||
, m_bIsBinary(bIsBinary)
|
||||
, m_device(nullptr)
|
||||
, m_logger(NGL::NGLLoggerBootstrap::getNGLRootLogger().getNGLLogger("SCTT.Channel")) {}
|
||||
, m_device(nullptr) {}
|
||||
|
||||
void Channel::setDevice(Device *dev)
|
||||
{
|
||||
|
||||
@@ -11,12 +11,12 @@
|
||||
namespace TrainingAreaBaseOC
|
||||
{
|
||||
Device::Device(QObject *parent, bool tcpMode) : QObject(parent)
|
||||
, m_logger(NGL::NGLLoggerBootstrap::getNGLRootLogger().getNGLLogger("TTCI.Device"))
|
||||
, m_spQuerry(new LtsSerialPortQuerry::LtsSerialPortQuerry(this))
|
||||
, m_socket(new QTcpSocket(this))
|
||||
, m_restartTimer(new QTimer(this))
|
||||
, m_receiveTimeoutTimer(new QTimer(this))
|
||||
, m_tcpMode(tcpMode)
|
||||
, m_logger(NGL::NGLLoggerBootstrap::getNGLRootLogger().getNGLLogger("TTCI.Device")) {
|
||||
, m_tcpMode(tcpMode) {
|
||||
connect(m_spQuerry, &LtsSerialPortQuerry::LtsSerialPortQuerry::connectionEstablished, this, &Device::open);
|
||||
m_spQuerry->restartQuerry();
|
||||
|
||||
|
||||
@@ -146,7 +146,7 @@ void DataManager::openWebSocket()
|
||||
this, &DataManager::newTextMessageFromClient);
|
||||
|
||||
m_clientConnection->init();
|
||||
connect(wsSocket, QOverload<QAbstractSocket::SocketError>::of(&QWebSocket::error),
|
||||
connect(wsSocket, &QWebSocket::errorOccurred,
|
||||
this, &DataManager::onWebSocketError);
|
||||
connect(wsSocket, &QWebSocket::connected,
|
||||
this, &DataManager::onWebSocketConnected);
|
||||
|
||||
@@ -14,8 +14,8 @@ namespace WarehouseManagement
|
||||
{
|
||||
|
||||
DdsHandler::DdsHandler(int domainId)
|
||||
: m_ddsConnector(new DDSConnector::DdsConnector(domainId, IDL::PartitionType::Global, 0))
|
||||
, m_logger(getLogger("DdsHandler"))
|
||||
: m_logger(getLogger("DdsHandler"))
|
||||
, m_ddsConnector(new DDSConnector::DdsConnector(domainId, IDL::PartitionType::Global, 0))
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "DdsHandler(" << domainId << ") for partition: " << m_ddsConnector->getDefaultPartition();
|
||||
}
|
||||
|
||||
+2
-2
@@ -15,8 +15,8 @@ namespace WarehouseManagement
|
||||
{
|
||||
|
||||
DdsHandlerExercise::DdsHandlerExercise(const dds::domain::DomainParticipant &dp, int exerciseId)
|
||||
: m_ddsConnector(new DDSConnector::DdsConnector(dp, IDL::PartitionType::Exercise, exerciseId))
|
||||
, m_logger(getLogger("DdsHandlerExercise"))
|
||||
: m_logger(getLogger("DdsHandlerExercise"))
|
||||
, m_ddsConnector(new DDSConnector::DdsConnector(dp, IDL::PartitionType::Exercise, exerciseId))
|
||||
{
|
||||
m_ddsConnector->setDomainParticipant(dp);
|
||||
DEBUG_LOG(m_logger) << "DdsHandlerExercise for partition: " << m_ddsConnector->getDefaultPartition();
|
||||
|
||||
+2
-2
@@ -10,10 +10,10 @@ using namespace WarehouseManagement;
|
||||
ExerciseParticipantHandler::ExerciseParticipantHandler(const dds::domain::DomainParticipant &domainParticipant,
|
||||
int exerciseId,
|
||||
ExercisesHandler *exercisesHandler)
|
||||
: m_exerciseId(exerciseId)
|
||||
: m_logger(getLogger(QLatin1String("ExerciseParticipantHandler.") + QString::number(exerciseId)))
|
||||
, m_exerciseId(exerciseId)
|
||||
, m_ddsHandlerExercise(new DdsHandlerExercise(domainParticipant, exerciseId))
|
||||
, m_exercisesHandler(exercisesHandler)
|
||||
, m_logger(getLogger(QLatin1String("ExerciseParticipantHandler.") + QString::number(exerciseId)))
|
||||
{}
|
||||
|
||||
ExerciseParticipantHandler::~ExerciseParticipantHandler()
|
||||
|
||||
@@ -14,8 +14,8 @@ namespace WirelessLocationSystem
|
||||
{
|
||||
|
||||
DdsHandler::DdsHandler(int domainId, int exerciseId)
|
||||
: m_ddsConnector(new DDSConnector::DdsConnector(domainId, IDL::PartitionType::Global, exerciseId))
|
||||
, m_logger(getLogger("DdsHandler"))
|
||||
: m_logger(getLogger("DdsHandler"))
|
||||
, m_ddsConnector(new DDSConnector::DdsConnector(domainId, IDL::PartitionType::Global, exerciseId))
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "DdsHandler(" << domainId << ") for partition: " << m_ddsConnector->getDefaultPartition();
|
||||
}
|
||||
|
||||
@@ -39,7 +39,7 @@ bool sendBinarySfmData(const QByteArray &ba, int sendCounter)
|
||||
|
||||
if (!WlsParticipant::calcChunkCountAndLen(ba, chunkCount, chunkLen))
|
||||
{
|
||||
fprintf(stderr, "Chunk count is not ok - data size: %d\n", ba.size());
|
||||
fprintf(stderr, "Chunk count is not ok - data size: %d\n", (int)ba.size());
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -59,7 +59,7 @@ bool sendBinarySfmData(const QByteArray &ba, int sendCounter)
|
||||
SfmMsgTetra_rx rx;
|
||||
rx.setPayload(tx.getPayload());
|
||||
fprintf(stdout, "Output: len: %d(%d), %s, sendCounter: %d(0x%02x), is fragmented: %d, fragment: %d/%d\n",
|
||||
payload.size(), tx.getPayload().size(), payload.data(),
|
||||
(int)payload.size(), (int)tx.getPayload().size(), payload.data(),
|
||||
rx.sendCounter(), rx.sendCounter(), rx.isFragmented(), rx.fragmentNumber(), rx.fragmentCount());
|
||||
|
||||
++sendCounter;
|
||||
@@ -75,12 +75,12 @@ static int checkData(const QByteArray &data)
|
||||
try
|
||||
{
|
||||
const auto msg = LtsUtils::byteStreamToSfmMessage(ba);
|
||||
fprintf(stdout, "Message payload: len: %d, %s\n", msg.payload().size(), msg.payload().toHex().data());
|
||||
fprintf(stdout, "Message payload: len: %d, %s\n", (int)msg.payload().size(), msg.payload().toHex().data());
|
||||
if (msg.id() == int(SfmMessage::MsgId::TetraMessage))
|
||||
{
|
||||
WirelessLocationSystem::SfmMsgTetra_rx rx;
|
||||
rx.setPayload(msg.payload());
|
||||
fprintf(stdout, "SfmMsgTetra payload: len: %d, %s, ", rx.payload().size(), rx.payload().toHex().data());
|
||||
fprintf(stdout, "SfmMsgTetra payload: len: %d, %s, ", (int)rx.payload().size(), rx.payload().toHex().data());
|
||||
fprintf(stdout, "sendCounter: %d(0x%02x), is fragmented: %d, fragment: %d/%d\n",
|
||||
rx.sendCounter(), rx.sendCounter(), rx.isFragmented(), rx.fragmentNumber(), rx.fragmentCount());
|
||||
sendBinarySfmData(rx.payload(), 0x02);
|
||||
|
||||
@@ -15,8 +15,8 @@ namespace WirelessLocationSystem
|
||||
|
||||
MainHandler::MainHandler(QObject *parent)
|
||||
: QObject(parent)
|
||||
, m_ddsHandler(nullptr)
|
||||
, m_logger(getLogger("MainHandler"))
|
||||
, m_ddsHandler(nullptr)
|
||||
{}
|
||||
|
||||
MainHandler::~MainHandler()
|
||||
|
||||
+2
-2
@@ -24,9 +24,9 @@ namespace WirelessLocationSystem
|
||||
const char *exerciseIdProperty = "exerciseId";
|
||||
|
||||
WebSocketHandler::WebSocketHandler(QObject *parent) : QObject(parent)
|
||||
, m_logger(NGL::NGLLoggerBootstrap::getNGLRootLogger())
|
||||
, m_webSocketServer(new QWebSocketServer(QStringLiteral("WLS"), QWebSocketServer::NonSecureMode, this))
|
||||
, m_basePoint(LtsCoordTrans::UtmCoordinate::fromMgrs(Settings::wlsMgrsBasePoint())),
|
||||
m_logger(NGL::NGLLoggerBootstrap::getNGLRootLogger()) {}
|
||||
, m_basePoint(LtsCoordTrans::UtmCoordinate::fromMgrs(Settings::wlsMgrsBasePoint())) {}
|
||||
|
||||
WebSocketHandler::~WebSocketHandler()
|
||||
{}
|
||||
|
||||
+2
-2
@@ -17,8 +17,8 @@ static constexpr int s_maxWlsRetryCount = 3;
|
||||
namespace WirelessLocationSystem
|
||||
{
|
||||
WlsParticipant::WlsParticipant(QObject *parent) : QObject(parent)
|
||||
, m_wlsTeleTimeoutTimer(new QTimer(this)),
|
||||
m_logger(NGL::NGLLoggerBootstrap::getNGLRootLogger()) {
|
||||
, m_logger(NGL::NGLLoggerBootstrap::getNGLRootLogger())
|
||||
, m_wlsTeleTimeoutTimer(new QTimer(this)) {
|
||||
m_wlsTeleTimeoutTimer->setSingleShot(true);
|
||||
m_wlsTeleTimeoutTimer->setTimerType(Qt::VeryCoarseTimer);
|
||||
m_wlsTeleTimeoutTimer->setInterval(s_dataCommunicationAliveTimeout);
|
||||
|
||||
+2
-2
@@ -12,8 +12,8 @@
|
||||
namespace WirelessLocationSystem
|
||||
{
|
||||
WlsParticipantHandler::WlsParticipantHandler(QObject *parent) : QObject(parent)
|
||||
, m_gpsOnOffTimeoutTimer(new QTimer(this)),
|
||||
m_logger(NGL::NGLLoggerBootstrap::getNGLRootLogger()) {
|
||||
, m_logger(NGL::NGLLoggerBootstrap::getNGLRootLogger())
|
||||
, m_gpsOnOffTimeoutTimer(new QTimer(this)) {
|
||||
connect(m_gpsOnOffTimeoutTimer, &QTimer::timeout, this, &WlsParticipantHandler::onGpsOnOffTimeoutTimer);
|
||||
m_gpsOnOffTimeoutTimer->setSingleShot(false);
|
||||
m_gpsOnOffTimeoutTimer->start(1000);
|
||||
|
||||
Reference in new issue
Block a user