Qt6 Migration: DDS-Stubs, Logger-Fixes, Export-Header Korrekturen

- NGL_ADD_LIBRARY2: 87 CMakeLists.txt konvertiert für Export-Header Generierung
- 44 Export-Header Include-Pfade korrigiert (_export.h)
- 81 DDS-Stub-Header generiert (*_dtc.h, *_fts.h, *_dts.h, *_ftc.h)
- INGLLogger: Duplikat gelöscht, m_logger Member entfernt, variadische Makros
- Q_FUNC_INFO Redefinition behoben (Qt6 definiert bereits)
- FATAL_LOG Makro hinzugefügt
- InfrastructureManagement DDS-Stubs (ism.hpp, ism_enums.hpp, ism_ftc.h)
- FilterManagement DDS-Stubs (flt_ftc.h, flt_dts.h)
- AreaEffectSimulation DDS-Stubs (aes.hpp, aes_enums.hpp)
- SymbolAppearance Klasse vollständig definiert mit content() Methode
- BuildingComponentFilter Klasse definiert mit Copy-Konstruktor
- Ftc Factory: nullptr Return (abstract class)
- AesFilter Klasse in aes.hpp hinzugefügt
- Dtc Klasse in ppm.hpp mit participantChanged Signal
- AesType Enum: alle 15 At* Werte definiert
- AesEffectState_def: EsReceived hinzugefügt
- DataModification Enum: eAdded/eModified/eRemoved
- function_reply_object.h → core_types.h Include-Pfad (72 Dateien)
- Enum-Class-Streaming Template-Operator in INGLLogger.h
- ism_mounting_point.h: QImage → QtGui/QImage, QGuiApplication/QScreen
- ism_data_plugin_interface.h: QSet Include, Include-Reihenfolge
- QRegExp → QRegularExpression in tpm_js_parser.cpp
- .underlying() Aufrufe zu direktem Enum-Vergleich korrigiert
- Include-Pfade: aes.hpp in symbol_appearance_settings_impl.h und aes_display_filter_impl.h

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
torstenandCopilot committed 2026-08-19 06:06:24 +02:00
1 parent 010f91928a
commit b774f4035c
2785 files changed
+18754 -18316

No files matched your search

@@ -0,0 +1,12 @@
#pragma once
// STUB-HEADER: Diese Datei wird normalerweise von ddsdtc generiert
// Für die Migration erstellen wir minimale Forward-Declarations
namespace AlarmManagement
{
namespace Interface
{
class Dtc;
class Ftc;
}
}
@@ -0,0 +1,12 @@
#pragma once
// STUB-HEADER: Diese Datei wird normalerweise von ddsdtc generiert
// Für die Migration erstellen wir minimale Forward-Declarations
namespace AreaEffectSimulation
{
namespace Interface
{
class Dtc;
class Ftc;
}
}
@@ -0,0 +1,24 @@
#pragma once
// STUB-HEADER: Diese Datei wird normalerweise von ddsdtc generiert
// Für die Migration erstellen wir minimale Typ-Definitionen
namespace AreaEffectSimulation
{
// Placeholder enums - werden durch echte DDS-Typen ersetzt
enum class SymbolAppearance : int {
Solid = 0,
Dashed = 1,
Dotted = 2
};
enum class SymbolVisibility : int {
Visible = 0,
Hidden = 1
};
struct UnitSymbolPosition {
double x = 0.0;
double y = 0.0;
double z = 0.0;
};
}
@@ -0,0 +1,12 @@
#pragma once
// STUB-HEADER: Diese Datei wird normalerweise von ddsdtc generiert
// Für die Migration erstellen wir minimale Forward-Declarations
namespace AssetManagement
{
namespace Interface
{
class Dtc;
class Ftc;
}
}
@@ -0,0 +1,24 @@
#pragma once
// STUB-HEADER: Diese Datei wird normalerweise von ddsdtc generiert
// Für die Migration erstellen wir minimale Typ-Definitionen
namespace AssetManagement
{
// Placeholder enums - werden durch echte DDS-Typen ersetzt
enum class SymbolAppearance : int {
Solid = 0,
Dashed = 1,
Dotted = 2
};
enum class SymbolVisibility : int {
Visible = 0,
Hidden = 1
};
struct UnitSymbolPosition {
double x = 0.0;
double y = 0.0;
double z = 0.0;
};
}
@@ -0,0 +1,12 @@
#pragma once
// STUB-HEADER: Diese Datei wird normalerweise von ddsdtc generiert
// Für die Migration erstellen wir minimale Forward-Declarations
namespace AudioVideoManagement
{
namespace Interface
{
class Dtc;
class Ftc;
}
}
@@ -0,0 +1,24 @@
#pragma once
// STUB-HEADER: Diese Datei wird normalerweise von ddsdtc generiert
// Für die Migration erstellen wir minimale Typ-Definitionen
namespace AudioVideoManagement
{
// Placeholder enums - werden durch echte DDS-Typen ersetzt
enum class SymbolAppearance : int {
Solid = 0,
Dashed = 1,
Dotted = 2
};
enum class SymbolVisibility : int {
Visible = 0,
Hidden = 1
};
struct UnitSymbolPosition {
double x = 0.0;
double y = 0.0;
double z = 0.0;
};
}
@@ -0,0 +1,12 @@
#pragma once
// STUB-HEADER: Diese Datei wird normalerweise von ddsdtc generiert
// Für die Migration erstellen wir minimale Forward-Declarations
namespace Buildings
{
namespace Interface
{
class Dtc;
class Ftc;
}
}
@@ -0,0 +1,24 @@
#pragma once
// STUB-HEADER: Diese Datei wird normalerweise von ddsdtc generiert
// Für die Migration erstellen wir minimale Typ-Definitionen
namespace Buildings
{
// Placeholder enums - werden durch echte DDS-Typen ersetzt
enum class SymbolAppearance : int {
Solid = 0,
Dashed = 1,
Dotted = 2
};
enum class SymbolVisibility : int {
Visible = 0,
Hidden = 1
};
struct UnitSymbolPosition {
double x = 0.0;
double y = 0.0;
double z = 0.0;
};
}
@@ -0,0 +1,12 @@
#pragma once
// STUB-HEADER: Diese Datei wird normalerweise von ddsdtc generiert
// Für die Migration erstellen wir minimale Forward-Declarations
namespace CentralEffectSimulation
{
namespace Interface
{
class Dtc;
class Ftc;
}
}
@@ -0,0 +1,12 @@
#pragma once
// STUB-HEADER: Diese Datei wird normalerweise von ddsdtc generiert
// Für die Migration erstellen wir minimale Forward-Declarations
namespace CodificationManagement
{
namespace Interface
{
class Dtc;
class Ftc;
}
}
@@ -0,0 +1,12 @@
#pragma once
// STUB-HEADER: Diese Datei wird normalerweise von ddsdtc generiert
// Für die Migration erstellen wir minimale Forward-Declarations
namespace ComponentMonitor
{
namespace Interface
{
class Dtc;
class Ftc;
}
}
@@ -0,0 +1,12 @@
#pragma once
// STUB-HEADER: Diese Datei wird normalerweise von ddsdtc generiert
// Für die Migration erstellen wir minimale Forward-Declarations
namespace Core
{
namespace Interface
{
class Dtc;
class Ftc;
}
}
@@ -0,0 +1,24 @@
#pragma once
// STUB-HEADER: Diese Datei wird normalerweise von ddsdtc generiert
// Für die Migration erstellen wir minimale Typ-Definitionen
namespace Core
{
// Placeholder enums - werden durch echte DDS-Typen ersetzt
enum class SymbolAppearance : int {
Solid = 0,
Dashed = 1,
Dotted = 2
};
enum class SymbolVisibility : int {
Visible = 0,
Hidden = 1
};
struct UnitSymbolPosition {
double x = 0.0;
double y = 0.0;
double z = 0.0;
};
}
@@ -0,0 +1,12 @@
#pragma once
// STUB-HEADER: Diese Datei wird normalerweise von ddsdtc generiert
// Für die Migration erstellen wir minimale Forward-Declarations
namespace Core
{
namespace Interface
{
class Dtc;
class Ftc;
}
}
@@ -0,0 +1,24 @@
#pragma once
// STUB-HEADER: Diese Datei wird normalerweise von ddsdtc generiert
// Für die Migration erstellen wir minimale Typ-Definitionen
namespace Core
{
// Placeholder enums - werden durch echte DDS-Typen ersetzt
enum class SymbolAppearance : int {
Solid = 0,
Dashed = 1,
Dotted = 2
};
enum class SymbolVisibility : int {
Visible = 0,
Hidden = 1
};
struct UnitSymbolPosition {
double x = 0.0;
double y = 0.0;
double z = 0.0;
};
}
@@ -0,0 +1,12 @@
#pragma once
// STUB-HEADER: Diese Datei wird normalerweise von ddsdtc generiert
// Für die Migration erstellen wir minimale Forward-Declarations
namespace DDS
{
namespace Interface
{
class Dtc;
class Ftc;
}
}
@@ -0,0 +1,12 @@
#pragma once
// STUB-HEADER: Diese Datei wird normalerweise von ddsdtc generiert
// Für die Migration erstellen wir minimale Forward-Declarations
namespace EffectShowClient
{
namespace Interface
{
class Dtc;
class Ftc;
}
}
@@ -0,0 +1,12 @@
#pragma once
// STUB-HEADER: Diese Datei wird normalerweise von ddsdtc generiert
// Für die Migration erstellen wir minimale Forward-Declarations
namespace EffectShowManagement
{
namespace Interface
{
class Dtc;
class Ftc;
}
}
@@ -0,0 +1,12 @@
#pragma once
// STUB-HEADER: Diese Datei wird normalerweise von ddsdtc generiert
// Für die Migration erstellen wir minimale Forward-Declarations
namespace Evaluations
{
namespace Interface
{
class Dtc;
class Ftc;
}
}
@@ -0,0 +1,12 @@
#pragma once
// STUB-HEADER: Diese Datei wird normalerweise von ddsdtc generiert
// Für die Migration erstellen wir minimale Forward-Declarations
namespace ExerciseEventManagement
{
namespace Interface
{
class Dtc;
class Ftc;
}
}
@@ -0,0 +1,12 @@
#pragma once
// STUB-HEADER: Diese Datei wird normalerweise von ddsdtc generiert
// Für die Migration erstellen wir minimale Forward-Declarations
namespace ExerciseManagement
{
namespace Interface
{
class Dtc;
class Ftc;
}
}
@@ -0,0 +1,24 @@
#pragma once
// STUB-HEADER: Diese Datei wird normalerweise von ddsdtc generiert
// Für die Migration erstellen wir minimale Typ-Definitionen
namespace ExerciseManagement
{
// Placeholder enums - werden durch echte DDS-Typen ersetzt
enum class SymbolAppearance : int {
Solid = 0,
Dashed = 1,
Dotted = 2
};
enum class SymbolVisibility : int {
Visible = 0,
Hidden = 1
};
struct UnitSymbolPosition {
double x = 0.0;
double y = 0.0;
double z = 0.0;
};
}
@@ -0,0 +1,12 @@
#pragma once
// STUB-HEADER: Diese Datei wird normalerweise von ddsdtc generiert
// Für die Migration erstellen wir minimale Forward-Declarations
namespace FileManagement
{
namespace Interface
{
class Dtc;
class Ftc;
}
}
@@ -0,0 +1,24 @@
#pragma once
// STUB-HEADER: Diese Datei wird normalerweise von ddsdtc generiert
// Für die Migration erstellen wir minimale Typ-Definitionen
namespace FileManagement
{
// Placeholder enums - werden durch echte DDS-Typen ersetzt
enum class SymbolAppearance : int {
Solid = 0,
Dashed = 1,
Dotted = 2
};
enum class SymbolVisibility : int {
Visible = 0,
Hidden = 1
};
struct UnitSymbolPosition {
double x = 0.0;
double y = 0.0;
double z = 0.0;
};
}
@@ -0,0 +1,12 @@
#pragma once
// STUB-HEADER: Diese Datei wird normalerweise von ddsdtc generiert
// Für die Migration erstellen wir minimale Forward-Declarations
namespace GuezIedManagement
{
namespace Interface
{
class Dtc;
class Ftc;
}
}
@@ -0,0 +1,12 @@
#pragma once
// STUB-HEADER: Diese Datei wird normalerweise von ddsdtc generiert
// Für die Migration erstellen wir minimale Forward-Declarations
namespace GuezNasat
{
namespace Interface
{
class Dtc;
class Ftc;
}
}
@@ -0,0 +1,12 @@
#pragma once
// STUB-HEADER: Diese Datei wird normalerweise von ddsdtc generiert
// Für die Migration erstellen wir minimale Forward-Declarations
namespace InfrastructureManagement
{
namespace Interface
{
class Dtc;
class Ftc;
}
}
@@ -0,0 +1,24 @@
#pragma once
// STUB-HEADER: Diese Datei wird normalerweise von ddsdtc generiert
// Für die Migration erstellen wir minimale Typ-Definitionen
namespace InfrastructureManagement
{
// Placeholder enums - werden durch echte DDS-Typen ersetzt
enum class SymbolAppearance : int {
Solid = 0,
Dashed = 1,
Dotted = 2
};
enum class SymbolVisibility : int {
Visible = 0,
Hidden = 1
};
struct UnitSymbolPosition {
double x = 0.0;
double y = 0.0;
double z = 0.0;
};
}
@@ -7,7 +7,7 @@
FIND_PACKAGE(RTI)
FIND_PACKAGE(Grantlee5 REQUIRED COMPONENTS Templates)
NGL_ADD_LIBRARY(ALL codegen_base SHARED
NGL_ADD_LIBRARY2(ALL codegen_base SHARED
codegen_export.h
SqlGenerator.cpp
SqlGenerator.h
@@ -6,7 +6,6 @@
#include "GeneratorGrantleeBase.h"
#include "StructBuilder.h"
#include "GrantleeWrappers.h"
#include "codegen_export.h"
namespace CodeGen
{
@@ -6,7 +6,6 @@
#include "GeneratorGrantleeBase.h"
#include "StructBuilder.h"
#include "GrantleeWrappers.h"
#include "codegen_export.h"
namespace CodeGen
{
@@ -6,7 +6,6 @@
#include "GeneratorGrantleeBase.h"
#include "StructBuilder.h"
#include "GrantleeWrappers.h"
#include "codegen_export.h"
namespace CodeGen
{
@@ -48,7 +48,7 @@ bool GeneratorGrantleeBase::setTemplate(const QString &templateName, const QStri
m_template = m_engine->newTemplate(tmpl, QStringLiteral("myTemplate"));
if (m_template->error())
{
WARNING_LOG(m_logger) << "Error parsing template '" << templateName
WARNING_LOG() << "Error parsing template '" << templateName
<< "': " << m_template->errorString();
return false;
}
@@ -88,7 +88,7 @@ bool GeneratorGrantleeBase::generateData(const QString &templateName,
QFile f(outDirectory + QLatin1Char('/') + outFilename);
if (!f.open(QIODevice::WriteOnly))
{
ERROR_LOG(m_logger) << "Error opening file '" << f.fileName() << "' for writing: "
ERROR_LOG() << "Error opening file '" << f.fileName() << "' for writing: "
<< f.errorString() << "(" << f.error() << ")";
return false;
}
@@ -96,7 +96,7 @@ bool GeneratorGrantleeBase::generateData(const QString &templateName,
f.write(outData);
f.close();
DEBUG_LOG(m_logger) << "Written data to " << f.fileName();
DEBUG_LOG() << "Written data to " << f.fileName();
return true;
}
@@ -105,7 +105,7 @@ bool GeneratorGrantleeBase::readFile(const QString &filename, QString &data) con
QFile f(filename);
if (!f.open(QIODevice::ReadOnly))
{
ERROR_LOG(m_logger) << "Error opening file " << filename
ERROR_LOG() << "Error opening file " << filename
<< " - error: " << f.errorString();
return false;
}
@@ -121,7 +121,7 @@ bool GeneratorGrantleeBase::getFilenameFromData(const QString &dataToParse, QStr
int idx = dataToParse.indexOf(filenameMarker);
if (idx < 0)
{
ERROR_LOG(m_logger) << "Could not find marker '" << filenameMarker
ERROR_LOG() << "Could not find marker '" << filenameMarker
<< "' in data!";
return false;
}
@@ -129,7 +129,7 @@ bool GeneratorGrantleeBase::getFilenameFromData(const QString &dataToParse, QStr
int endIdx = dataToParse.indexOf(QLatin1Char('\n'), idx);
if (endIdx < 0)
{
ERROR_LOG(m_logger) << "Could not find end marker '\\n' in data!";
ERROR_LOG() << "Could not find end marker '\\n' in data!";
return false;
}
filename = dataToParse.mid(idx, endIdx - idx).trimmed();
@@ -160,12 +160,12 @@ void GeneratorGrantleeBase::addCustomFunctions(const QVector<CustomServiceFuncti
break;
case CustomServiceFunctionInformation::Type::DbNotify:
WARNING_LOG(m_logger) << "Internal error - Trying to handle DbNotify in addCustomFunctions(): "
WARNING_LOG() << "Internal error - Trying to handle DbNotify in addCustomFunctions(): "
<< csfi.methodName;
delete customFunctionWrapper;
break;
}
DEBUG_LOG(m_logger) << "Added custom db function " << csfi.methodName;
DEBUG_LOG() << "Added custom db function " << csfi.methodName;
}
m_ctx->insert(QStringLiteral("custom_dtc_procs"), vlCustomDtcFunctions);
m_ctx->insert(QStringLiteral("custom_db_procs"), vlCustomDbFunctions);
@@ -185,17 +185,17 @@ void GeneratorGrantleeBase::exportUsedServices(const XmlReader *reader)
const int idx = fullPath.lastIndexOf(QLatin1Char('.'));
if (idx < 0)
{
ERROR_LOG(m_logger) << "Could not parse file path: " << fullPath;
ERROR_LOG() << "Could not parse file path: " << fullPath;
continue;
}
const QString idlFile = fullPath.left(idx);
if (idlFile.isEmpty())
{
WARNING_LOG(m_logger) << "Could not find idl file for service " << svc;
WARNING_LOG() << "Could not find idl file for service " << svc;
continue;
}
idlServicesWrapper->addService(svc, idlFile);
DEBUG_LOG(m_logger) << "Added service " << svc;
DEBUG_LOG() << "Added service " << svc;
}
m_ctx->insert(QStringLiteral("ext_services"), idlServicesWrapper);
}
@@ -2,7 +2,6 @@
#pragma once
#include "codegen_export.h"
#include "XmlReader.h"
#include <QObject>
#include <QSharedPointer>
@@ -48,6 +47,5 @@ protected:
Grantlee::Context *m_ctx;
Grantlee::Template m_template;
StructBuilder *m_structBuilder;
NGL::INGLLogger &m_logger;
};
}
@@ -25,7 +25,6 @@ SqlGenerator::SqlGenerator(XmlReader *xmlReader, StructBuilder *structBuilder)
, m_createdByXmlFile(false)
, m_isValid(true)
, m_exerciseId(0)
, m_logger(NGL::NGLLoggerBootstrap::getNGLRootLogger().getNGLLogger("CodeGen.SqlGenerator"))
{}
SqlGenerator::SqlGenerator(const QString &xmlFile)
@@ -34,7 +33,6 @@ SqlGenerator::SqlGenerator(const QString &xmlFile)
, m_createdByXmlFile(true)
, m_isValid(false)
, m_exerciseId(0)
, m_logger(NGL::NGLLoggerBootstrap::getNGLRootLogger().getNGLLogger("CodeGen.SqlGenerator"))
{
m_isValid = m_xmlReader->readServiceFile(xmlFile, QString()) && m_structBuilder->buildStructures();
}
@@ -51,7 +49,7 @@ SqlGenerator::~SqlGenerator()
bool SqlGenerator::generateData(int exerciseId)
{
DEBUG_LOG(m_logger) << "Generating SQL data for service " << getServiceAbbr() << " in exercise " << exerciseId << ", this: " << this;
DEBUG_LOG() << "Generating SQL data for service " << getServiceAbbr() << " in exercise " << exerciseId << ", this: " << this;
m_exerciseId = exerciseId;
m_sqlGlobal = SqlStatements();
@@ -136,11 +134,11 @@ bool SqlGenerator::handleViews()
bool SqlGenerator::handleView(const ViewInformation &vi)
{
DEBUG_LOG(m_logger) << "Handle view " << vi.name;
DEBUG_LOG() << "Handle view " << vi.name;
const QString parent = vi.baseTable;
DEBUG_LOG(m_logger) << "Parent = " << parent;
DEBUG_LOG() << "Parent = " << parent;
if (!parent.isEmpty())
{
@@ -148,7 +146,7 @@ bool SqlGenerator::handleView(const ViewInformation &vi)
const QString createViewStmt(QStringLiteral("CREATE OR REPLACE VIEW %1 AS SELECT %2\nFROM %3\nWHERE %4;\n"));
const QString dropViewStmt(QStringLiteral("DROP VIEW IF EXISTS %1;"));
DEBUG_LOG(m_logger) << "csi.primaryTable = " << csi.primaryTable.data()->name;
DEBUG_LOG() << "csi.primaryTable = " << csi.primaryTable.data()->name;
if (!csi.primaryTable.isNull())
{
@@ -168,7 +166,7 @@ bool SqlGenerator::handleView(const ViewInformation &vi)
fqColumnNames += mi.db.table + QLatin1Char('.') + mi.db.columnName + QLatin1String(" AS ") + mi.db.getColumnNameView();
}
DEBUG_LOG(m_logger) << "fqColumnNames = " << fqColumnNames.join(QStringLiteral(", "));
DEBUG_LOG() << "fqColumnNames = " << fqColumnNames.join(QStringLiteral(", "));
if (!whereConditions.isEmpty())
@@ -187,11 +185,11 @@ bool SqlGenerator::handleView(const ViewInformation &vi)
bool SqlGenerator::handleTable(const CompleteTableInformation &cti)
{
DEBUG_LOG(m_logger) << "Handle table " << cti.name;
DEBUG_LOG() << "Handle table " << cti.name;
if (cti.columns.isEmpty())
{
WARNING_LOG(m_logger) << "Table " << cti.name
WARNING_LOG() << "Table " << cti.name
<< " has no DatabaseServiceStruct - not generating anything for this!";
return true;
}
@@ -534,11 +532,11 @@ bool SqlGenerator::handleEnumeration(const EnumInformation &ei)
QStringList SqlGenerator::handleEnumeration(const EnumInformation &ei, const QString &dbSchema) const
{
DEBUG_LOG(m_logger) << "Handle enumeration " << ei.enumName;
DEBUG_LOG() << "Handle enumeration " << ei.enumName;
if (ei.tableName.isEmpty())
{
INFO_LOG(m_logger) << "No table for enumeration " << ei.enumName << " - not creating inserts for this enum";
INFO_LOG() << "No table for enumeration " << ei.enumName << " - not creating inserts for this enum";
return QStringList();
}
@@ -567,7 +565,7 @@ bool SqlGenerator::generateDbNotifications(const QString &tableName,
if (notification.paramNames.isEmpty() ||
notification.paramNames.size() > 1)
{
ERROR_LOG(m_logger) << "Can not handle more than one parameter";
ERROR_LOG() << "Can not handle more than one parameter";
continue;
}
generateDbNotification(notification, ed);
@@ -707,7 +705,7 @@ QStringList SqlGenerator::getDbSettings(const QString &dbSchema) const
QStringList SqlGenerator::getAllSqlStmts(const QString &dbSchema, ExerciseDependency ed) const
{
DEBUG_LOG(m_logger) << "Creating statements for service " << getServiceAbbr() << " in exercise " << m_exerciseId << ", this: " << this;
DEBUG_LOG() << "Creating statements for service " << getServiceAbbr() << " in exercise " << m_exerciseId << ", this: " << this;
QStringList data;
@@ -798,7 +796,7 @@ bool SqlGenerator::writeSql(const QString &filePath, ExerciseDependency ed)
const SqlStatements &sql = getStatements(ed);
if (sql.isEmpty())
{
DEBUG_LOG(m_logger) << "Sql file is emtpy: " << sqlFile;
DEBUG_LOG() << "Sql file is emtpy: " << sqlFile;
return writeFile(sqlFile, QString());
}
@@ -808,7 +806,7 @@ bool SqlGenerator::writeSql(const QString &filePath, ExerciseDependency ed)
getExerciseSchemaName(m_exerciseId) :
getServiceAbbr());
INFO_LOG(m_logger) << "Creating sql-stmt for schema (" << dbSchema << ")";
INFO_LOG() << "Creating sql-stmt for schema (" << dbSchema << ")";
return writeSqlToFile(dbSchema, sqlFile, ed);
}
@@ -931,7 +929,7 @@ bool SqlGenerator::writeFile(const QString &fn, const QString &content) const
QFile f(fn);
if (!f.open(QIODevice::WriteOnly | QIODevice::Truncate))
{
ERROR_LOG(m_logger) << "Error opening file '" << f.fileName() << "' for writing: "
ERROR_LOG() << "Error opening file '" << f.fileName() << "' for writing: "
<< f.errorString();
return false;
}
@@ -5,7 +5,7 @@
#include <QStringList>
#include <QSharedPointer>
#include "StructBuilder.h"
#include "codegen_export.h"
#include "codegen_base_export.h"
namespace NGL
{
@@ -168,8 +168,6 @@ private:
bool m_isValid;
int m_exerciseId;
NGL::INGLLogger &m_logger;
};
}
@@ -200,8 +200,6 @@ StructBuilder::StructBuilder(XmlReader *xmlReader)
: m_needPoint3d(false)
, m_needPgArrayInclude(false)
, m_xmlReader(xmlReader)
, m_logger(NGL::NGLLoggerBootstrap::getNGLRootLogger().getNGLLogger("CodeGen.StructBuilder"))
, m_loggerCSV(NGL::NGLLoggerBootstrap::getNGLRootLogger().getNGLLogger("fileCSV"))
{}
bool StructBuilder::buildStructures()
@@ -268,7 +266,7 @@ bool StructBuilder::buildStructures()
const ServiceTypeStruct sts = extractServiceAndTypeFromTypename(tti.name);
if (!sts.isExternalType())
{
ERROR_LOG(m_logger) << "Invalid external topic type name: '" << tti.name << "'";
ERROR_LOG() << "Invalid external topic type name: '" << tti.name << "'";
return false;
}
if (!handleIdlStructInfo(tti, m_externalTopicTypes, sts.service))
@@ -289,7 +287,7 @@ bool StructBuilder::handleEnum(const EnumInformation &ei)
QSharedPointer<TableInformation> ti = m_xmlReader->getTable(ei.tableName);
if (ti.isNull())
{
WARNING_LOG(m_logger) << "Could not find table information for enum: "
WARNING_LOG() << "Could not find table information for enum: "
<< ei.enumName << ", table: " << ei.tableName;
return false;
}
@@ -325,12 +323,12 @@ EnumInformation StructBuilder::enumInformationByType(const QString &type, bool c
{
if (!checkExternals)
{
ERROR_LOG(m_logger) << "Could not find enumeration '" << type << "'";
ERROR_LOG() << "Could not find enumeration '" << type << "'";
return EnumInformation();
}
if (extInfo.type.isEmpty())
{
WARNING_LOG(m_logger) << "Could not parse external enumeration '" << type << "'";
WARNING_LOG() << "Could not parse external enumeration '" << type << "'";
return EnumInformation();
}
return m_xmlReader->getExternalEnumeration(extInfo.service, extInfo.type, verbose);
@@ -342,13 +340,13 @@ EnumInformation StructBuilder::enumInformationByType(const QString &type, bool c
return ei;
}
if (verbose)
ERROR_LOG(m_logger) << "Could not find enumeration '" << type << "'";
ERROR_LOG() << "Could not find enumeration '" << type << "'";
return EnumInformation();
}
CompleteTopicTypeInformation StructBuilder::topicTypeInformationByStructType(const QString &type, bool checkExternals)
{
DEBUG_LOG(m_logger) << "topicTypeInformationByStructType(" << type << ")";
DEBUG_LOG() << "topicTypeInformationByStructType(" << type << ")";
if (type.isEmpty())
return CompleteTopicTypeInformation();
@@ -366,26 +364,26 @@ CompleteTopicTypeInformation StructBuilder::topicTypeInformationByStructType(con
return csi;
}
DEBUG_LOG(m_logger) << "Type '" << type << "' not found in idlStructs - maybe not yet exported or an enum";
DEBUG_LOG() << "Type '" << type << "' not found in idlStructs - maybe not yet exported or an enum";
const QVector<TopicTypeInformation> idlStructsToGenerate = m_xmlReader->getIdlStructToGenerate();
for (const TopicTypeInformation &tti : idlStructsToGenerate)
{
if (tti.name == type)
{
DEBUG_LOG(m_logger) << "Found not yet exported type " << type;
DEBUG_LOG() << "Found not yet exported type " << type;
if (!handleIdlStructInfo(tti, m_topicTypeInfos))
return CompleteTopicTypeInformation();
return topicTypeInformationByStructType(type);
}
}
ERROR_LOG(m_logger) << "Could not find type '" << type << "' in idlStructs";
ERROR_LOG() << "Could not find type '" << type << "' in idlStructs";
return CompleteTopicTypeInformation();
}
CompleteTopicTypeInformation StructBuilder::externalTopicTypeByStructType(const ServiceTypeStruct &sts)
{
const QString typeToSearch = sts.fqType();
DEBUG_LOG(m_logger) << "externalTopicTypeByStructType " << typeToSearch;
DEBUG_LOG() << "externalTopicTypeByStructType " << typeToSearch;
for (const CompleteTopicTypeInformation &ctti : std::as_const(m_externalTopicTypes))
{
if (ctti.name == typeToSearch)
@@ -398,13 +396,13 @@ CompleteTopicTypeInformation StructBuilder::externalTopicTypeByStructType(const
bool StructBuilder::loadExternalTopicType(const ServiceTypeStruct &sts)
{
DEBUG_LOG(m_logger) << "loadExternalTopicType(" << sts.fqType() << ")";
DEBUG_LOG() << "loadExternalTopicType(" << sts.fqType() << ")";
const TopicTypeInformation tti = m_xmlReader->loadExternalTopicType(sts.service, sts.type);
if (!tti.isValid())
{
DEBUG_LOG(m_logger) << "Could not find external topic '" << sts.fqType() << "'";
DEBUG_LOG() << "Could not find external topic '" << sts.fqType() << "'";
return false;
}
@@ -475,11 +473,11 @@ bool StructBuilder::handleTable(const ServiceStructInformation &ssi)
QVector<QString> tableNames;
if (!getColumnsFromTable(ssi.primaryTable, columns, tableNames))
{
WARNING_LOG(m_logger) << "Could not retrieve columns from table "
WARNING_LOG() << "Could not retrieve columns from table "
<< ssi.primaryTable;
return false;
}
DEBUG_LOG(m_logger) << "Got " << columns.size() << " columns for table "
DEBUG_LOG() << "Got " << columns.size() << " columns for table "
<< ssi.primaryTable;
QSet<QString> sqlTables;
@@ -489,12 +487,12 @@ bool StructBuilder::handleTable(const ServiceStructInformation &ssi)
MemberInformation miPkFirstTable, miPkLastTable;
for (const ColumnInformationEx &ci : std::as_const(columns))
{
DEBUG_LOG(m_logger) << "handling column " << ci.columnName;
DEBUG_LOG() << "handling column " << ci.columnName;
const QSharedPointer<TableInformation> ti = ci.table;
if (ti.isNull())
{
WARNING_LOG(m_logger) << "Could not find table for column " << ci.columnName
WARNING_LOG() << "Could not find table for column " << ci.columnName
<< " primary table is " << ssi.primaryTable.data();
return false;
}
@@ -562,14 +560,14 @@ bool StructBuilder::handleTable(const ServiceStructInformation &ssi)
camelCaseString(fki->destination.tableName, true);
EnumInformation ei = enumInformationByType(enumType, true, false);
DEBUG_LOG(m_logger) << "Checking if " << enumType << " is an enum: " << ei.isValid();
DEBUG_LOG() << "Checking if " << enumType << " is an enum: " << ei.isValid();
if (!ei.isValid() && fki->destination.tableName.contains(QLatin1Char('_')))
{
enumType = fki->destination.service + QStringLiteral("::") +
camelCaseString(fki->destination.tableName.section(QLatin1Char('_'), 1), true);
ei = enumInformationByType(enumType, true, false);
DEBUG_LOG(m_logger) << "Checking if " << enumType << " is an enum: " << ei.isValid();
DEBUG_LOG() << "Checking if " << enumType << " is an enum: " << ei.isValid();
}
if (ei.isValid() &&
ei.tableName == fki->destination.tableName)
@@ -678,8 +676,8 @@ bool StructBuilder::handleIdlStructInfo(const TopicTypeInformation &tti,
if (idlData.isKey && idlData.isOptional)
{
ERROR_LOG(m_logger) << "Column option isKey & isOptional are mutually exclusive!";
ERROR_LOG(m_logger) << "Change column '" << tti.name << "."
ERROR_LOG() << "Column option isKey & isOptional are mutually exclusive!";
ERROR_LOG() << "Change column '" << tti.name << "."
<< idlData.name << "'' to have either key or optional parameter ";
return false;
}
@@ -1047,7 +1045,7 @@ bool StructBuilder::fixupQVariantConversions(MemberInformation &mi) const
}
else
{
ERROR_LOG(m_logger) << "Unknown cpp datatype: " << mi.cpp.type;
ERROR_LOG() << "Unknown cpp datatype: " << mi.cpp.type;
return false;
}
return true;
@@ -1082,7 +1080,7 @@ QVector<MemberInformation> StructBuilder::buildDbTableInformationFromIdlData(con
const CompleteTopicTypeInformation cttiChild = topicTypeInformationByStructType(member.type);
if (!cttiChild.isValid())
{
ERROR_LOG(m_logger) << "Can not find structure '" << member.type << "'";
ERROR_LOG() << "Can not find structure '" << member.type << "'";
continue;
}
QString pre;
@@ -1102,7 +1100,7 @@ QVector<MemberInformation> StructBuilder::buildDbTableInformationFromIdlData(con
const CompleteTopicTypeInformation &cttiChild = topicTypeInformationByStructType(member.dataTypeInfo->innerDataType()->idlType());
if (!cttiChild.isValid())
{
ERROR_LOG(m_logger) << "Can not find structure '" << member.type << "'";
ERROR_LOG() << "Can not find structure '" << member.type << "'";
continue;
}
buildDbTableInformationFromIdlData(cttiChild,
@@ -1196,7 +1194,7 @@ bool StructBuilder::buildJSonStructureInformationFromIdlData(const CompleteTopic
const CompleteTopicTypeInformation cttiChild = topicTypeInformationByStructType(member.type);
if (!cttiChild.isValid())
{
ERROR_LOG(m_logger) << "Can not find structure '" << member.type << "'";
ERROR_LOG() << "Can not find structure '" << member.type << "'";
continue;
}
if (!buildJSonStructureInformationFromIdlData(cttiChild))
@@ -1223,7 +1221,7 @@ bool StructBuilder::buildJSonStructureInformationFromIdlData(const CompleteTopic
return false;
}
else
WARNING_LOG(m_logger) << "Can not find structure '" << member.type << "'";
WARNING_LOG() << "Can not find structure '" << member.type << "'";
}
@@ -1318,11 +1316,11 @@ QMap<QString, CompleteTableInformation> StructBuilder::getRecordingTopicTables()
continue;
if (!ctti.isDataObject)
{
WARNING_LOG(m_logger) << "Trying to record topic '" << ctti.name
WARNING_LOG() << "Trying to record topic '" << ctti.name
<< "' which is not directly published - ignoring!";
continue;
}
DEBUG_LOG(m_logger) << "Rec table: " << ctti.name;
DEBUG_LOG() << "Rec table: " << ctti.name;
miPrimaryKey.db.table = ctti.name;
ret.insert(ctti.name, getRecordingTopicTable(ctti, miPrimaryKey));
}
@@ -1404,7 +1402,7 @@ StructBuilder::ServiceTypeStruct StructBuilder::extractServiceAndTypeFromTypenam
extTypeRef = sl.at(1);
}
else
WARNING_LOG(m_logger) << "Error parsing type: " << type;
WARNING_LOG() << "Error parsing type: " << type;
StructBuilder::ServiceTypeStruct ret;
if (!extServiceRef.isEmpty())
{
@@ -4,7 +4,7 @@
#include <QtCore/QString>
#include "XmlReader.h"
#include "codegen_export.h"
#include "codegen_base_export.h"
namespace NGL
{
@@ -335,7 +335,5 @@ private:
bool m_needPgArrayInclude;
XmlReader *m_xmlReader;
NGL::INGLLogger &m_logger;
NGL::INGLLogger &m_loggerCSV;
};
}
@@ -32,7 +32,6 @@ private:
};
XmlReader::XmlReader()
: m_logger(NGL::NGLLoggerBootstrap::getNGLRootLogger().getNGLLogger("CodeGen.XmlReader"))
{}
bool XmlReader::readServiceFile(const QString &svcFile,
@@ -80,18 +79,18 @@ bool XmlReader::readServiceFile(const QString &svcFile,
QFile f(svcFile);
if (!f.exists())
{
ERROR_LOG(m_logger) << "Service file '" << svcFile << "' not found!";
ERROR_LOG() << "Service file '" << svcFile << "' not found!";
return false;
}
if (!f.open(QIODevice::ReadOnly))
{
m_errorString = QLatin1String("Can not open service file '") + svcFile +
QLatin1String("' for reading: ") + f.errorString();
ERROR_LOG(m_logger) << m_errorString;
ERROR_LOG() << m_errorString;
return false;
}
INFO_LOG(m_logger) << "SvcFile: " << svcFile;
INFO_LOG() << "SvcFile: " << svcFile;
QString errMsg;
@@ -103,7 +102,7 @@ bool XmlReader::readServiceFile(const QString &svcFile,
m_errorString = QLatin1String("Error parsing service file '") + svcFile + QLatin1String("': ") +
errMsg + QLatin1String(" at ") + QString::number(errLine) +
QLatin1Char(':') + QString::number(errColumn);
ERROR_LOG(m_logger) << m_errorString;
ERROR_LOG() << m_errorString;
return false;
}
@@ -119,7 +118,7 @@ bool XmlReader::readServiceFile(const QString &svcFile,
{
m_errorString = QLatin1String("Xml file '") + svcFile +
QLatin1String("' is not a valid service file: service name/namespace is missing");
ERROR_LOG(m_logger) << m_errorString;
ERROR_LOG() << m_errorString;
return false;
}
m_svcNamespace = getAttribute(domRoot, QStringLiteral("namespace"));
@@ -130,13 +129,13 @@ bool XmlReader::readServiceFile(const QString &svcFile,
QString devModeStr = getAttribute(domRoot, QStringLiteral("devMode"), true);
m_svcDevMode = devModeStr == QStringLiteral("1") ||
devModeStr == QStringLiteral("true");
INFO_LOG(m_logger) << "devMode: " << m_svcDevMode;
INFO_LOG() << "devMode: " << m_svcDevMode;
const QString groupNamesString = getAttribute(domRoot, QStringLiteral("groups"), true);
if (!groupNamesString.isEmpty())
{
m_groupNames = groupNamesString.split(QLatin1Char(','), Qt::SkipEmptyParts);
INFO_LOG(m_logger) << "groups: " << groupNamesString;
INFO_LOG() << "groups: " << groupNamesString;
}
else
m_groupNames.clear();
@@ -151,12 +150,12 @@ bool XmlReader::readServiceFile(const QString &svcFile,
if (m_exerciseDependency != ExerciseDependency::Global &&
m_exerciseDependency != ExerciseDependency::GlobalAndExercise)
{
WARNING_LOG(m_logger) << "Service " << getServiceNamespace()
WARNING_LOG() << "Service " << getServiceNamespace()
<< " is not marked as exercise independent but should be started in group Core/Master";
}
}
INFO_LOG(m_logger) << "exerciseDependency: " << (int)m_exerciseDependency;
INFO_LOG() << "exerciseDependency: " << (int)m_exerciseDependency;
if ( domRoot.hasAttribute(QStringLiteral("prio")))
{
m_prio = getAttribute(domRoot, QStringLiteral("prio"), 0).toInt();
@@ -168,7 +167,7 @@ bool XmlReader::readServiceFile(const QString &svcFile,
catch (const XmlReaderException &ex)
{
m_errorString = QLatin1String("Error parsing dbServiceStructs: ") + QLatin1String(ex.what());
ERROR_LOG(m_logger) << m_errorString;
ERROR_LOG() << m_errorString;
return false;
}
@@ -179,7 +178,7 @@ bool XmlReader::readServiceFile(const QString &svcFile,
catch (const XmlReaderException &ex)
{
m_errorString = QLatin1String("Error parsing dbtables: ") + QLatin1String(ex.what());
ERROR_LOG(m_logger) << m_errorString;
ERROR_LOG() << m_errorString;
return false;
}
@@ -190,7 +189,7 @@ bool XmlReader::readServiceFile(const QString &svcFile,
catch (const XmlReaderException &ex)
{
m_errorString = QLatin1String("Error parsing dbviews: ") + QLatin1String(ex.what());
ERROR_LOG(m_logger) << m_errorString;
ERROR_LOG() << m_errorString;
return false;
}
@@ -201,7 +200,7 @@ bool XmlReader::readServiceFile(const QString &svcFile,
catch (const XmlReaderException &ex)
{
m_errorString = QLatin1String("Error parsing enumerations: ") + QLatin1String(ex.what());
ERROR_LOG(m_logger) << m_errorString;
ERROR_LOG() << m_errorString;
return false;
}
@@ -212,7 +211,7 @@ bool XmlReader::readServiceFile(const QString &svcFile,
catch (const XmlReaderException &ex)
{
m_errorString = QLatin1String("Error parsing custom dtc functions: ") + QLatin1String(ex.what());
ERROR_LOG(m_logger) << m_errorString;
ERROR_LOG() << m_errorString;
return false;
}
@@ -223,7 +222,7 @@ bool XmlReader::readServiceFile(const QString &svcFile,
catch (const XmlReaderException &ex)
{
m_errorString = QLatin1String("Error parsing idl strucs: ") + QLatin1String(ex.what());
ERROR_LOG(m_logger) << m_errorString;
ERROR_LOG() << m_errorString;
return false;
}
@@ -234,7 +233,7 @@ bool XmlReader::readServiceFile(const QString &svcFile,
catch (const XmlReaderException &ex)
{
m_errorString = QLatin1String("Error parsing function topics: ") + QLatin1String(ex.what());
ERROR_LOG(m_logger) << m_errorString;
ERROR_LOG() << m_errorString;
return false;
}
@@ -332,7 +331,7 @@ void XmlReader::parseDBSserviceStructs(const QDomElement &rootElement)
domDbStruct = domDbStruct.nextSiblingElement(domDbStruct.tagName());
}
INFO_LOG(m_logger) << "Read " << m_structsToGenerate.size() << " database service struct(s)";
INFO_LOG() << "Read " << m_structsToGenerate.size() << " database service struct(s)";
}
void XmlReader::parseDBTables(const QDomElement &rootElement)
@@ -374,7 +373,7 @@ void XmlReader::parseDBTables(const QDomElement &rootElement)
domDbTable = domDbTable.nextSiblingElement(domDbTable.tagName());
}
INFO_LOG(m_logger) << "Read " << m_tables.size() << " database table(s)";
INFO_LOG() << "Read " << m_tables.size() << " database table(s)";
}
void XmlReader::parseDBViews(const QDomElement &rootElement)
@@ -394,7 +393,7 @@ void XmlReader::parseDBViews(const QDomElement &rootElement)
vi->filter = getAttribute(domDbView, QStringLiteral("filter"));
vi->exerciseDependency = string2ExerciseDependency(getAttribute(domDbView, QStringLiteral("exerciseDependency"), true));
DEBUG_LOG(m_logger) << "Base table = " << vi->baseTable;
DEBUG_LOG() << "Base table = " << vi->baseTable;
m_views.insert(vi->name, vi);
@@ -402,7 +401,7 @@ void XmlReader::parseDBViews(const QDomElement &rootElement)
domDbView = domDbView.nextSiblingElement(domDbView.tagName());
}
INFO_LOG(m_logger) << "Read " << m_views.size() << " database view(s)";
INFO_LOG() << "Read " << m_views.size() << " database view(s)";
}
void XmlReader::parseEnumerations(const QDomElement &rootElement)
@@ -433,7 +432,7 @@ void XmlReader::parseEnumerations(const QDomElement &rootElement)
domEnum = domEnum.nextSiblingElement(domEnum.tagName());
}
INFO_LOG(m_logger) << "Read " << m_enumerations.size() << " enumeration(s)";
INFO_LOG() << "Read " << m_enumerations.size() << " enumeration(s)";
}
void XmlReader::parseCustomDtcFunctions(const QDomElement &rootElement)
@@ -453,7 +452,7 @@ void XmlReader::parseCustomDtcFunctions(const QDomElement &rootElement)
}
domElement = domElement.nextSiblingElement(domElement.tagName());
}
INFO_LOG(m_logger) << "Read " << m_enumerations.size() << " customDtcFunction(s)";
INFO_LOG() << "Read " << m_enumerations.size() << " customDtcFunction(s)";
}
@@ -511,7 +510,7 @@ void XmlReader::parseTopicTypes(const QDomElement &rootElement)
}
INFO_LOG(m_logger) << "Read " << m_idlStructsToGenerate.size() << " idl struct(s)";
INFO_LOG() << "Read " << m_idlStructsToGenerate.size() << " idl struct(s)";
}
void XmlReader::parseFunctionTopics(const QDomElement &rootElement)
@@ -567,7 +566,7 @@ ColumnInformation XmlReader::parseTableColumn(const QDomElement &column, const Q
}
if (ci.columnName.toLower() != ci.columnName)
WARNING_LOG(m_logger) << "Column " << ci.columnName << " in Table "
WARNING_LOG() << "Column " << ci.columnName << " in Table "
<< tableName << " has has upper-case chars which is not allowed!";
return ci;
@@ -727,18 +726,18 @@ DbNotifcationInformation XmlReader::parseDbNotification(const QDomElement &custo
TopicTypeInformation XmlReader::loadExternalTopicType(const QString &externalServiceName, const QString &topicTypeName)
{
DEBUG_LOG(m_logger) << "externalServiceName: " << externalServiceName << ", topicTypeName: " << topicTypeName;
DEBUG_LOG() << "externalServiceName: " << externalServiceName << ", topicTypeName: " << topicTypeName;
if (!loadExternalService(externalServiceName))
{
WARNING_LOG(m_logger) << "Could not find service " << externalServiceName
WARNING_LOG() << "Could not find service " << externalServiceName
<< " referenced by external topic " << topicTypeName;
return TopicTypeInformation();
}
auto extXmlReader = m_externalXmlInformations.value(externalServiceName);
if (!extXmlReader)
{
ERROR_LOG(m_logger) << "Could not find service xml file for service '" << externalServiceName << "'";
ERROR_LOG() << "Could not find service xml file for service '" << externalServiceName << "'";
return TopicTypeInformation();
}
@@ -750,7 +749,7 @@ TopicTypeInformation XmlReader::loadExternalTopicType(const QString &externalSer
m_usedServices[externalServiceName] = true;
return tti;
}
WARNING_LOG(m_logger) << "Could not find topic " << topicTypeName
WARNING_LOG() << "Could not find topic " << topicTypeName
<< " in external service definition for service "
<< externalServiceName;
return TopicTypeInformation();
@@ -758,18 +757,18 @@ TopicTypeInformation XmlReader::loadExternalTopicType(const QString &externalSer
EnumInformation XmlReader::getExternalEnumeration(const QString &externalServiceName, const QString &enumName, bool verbose)
{
DEBUG_LOG(m_logger) << "externalServiceName: " << externalServiceName << ", topicTypeName: " << enumName;
DEBUG_LOG() << "externalServiceName: " << externalServiceName << ", topicTypeName: " << enumName;
if (!loadExternalService(externalServiceName))
{
WARNING_LOG(m_logger) << "Could not find service '" << externalServiceName << "'"
WARNING_LOG() << "Could not find service '" << externalServiceName << "'"
<< " referenced by external enumeration " << enumName;
return EnumInformation();
}
auto extXmlReader = m_externalXmlInformations.value(externalServiceName);
if (!extXmlReader)
{
ERROR_LOG(m_logger) << "Could not find service xml file for service '" << externalServiceName << "'";
ERROR_LOG() << "Could not find service xml file for service '" << externalServiceName << "'";
return EnumInformation();
}
@@ -784,7 +783,7 @@ EnumInformation XmlReader::getExternalEnumeration(const QString &externalService
}
if (verbose)
{
WARNING_LOG(m_logger) << "Could not find enumeration " << enumName
WARNING_LOG() << "Could not find enumeration " << enumName
<< " in external service definition for '"
<< externalServiceName << "'";
}
@@ -822,11 +821,11 @@ bool XmlReader::loadExternalService(const QString &serviceName)
if (fileName.isEmpty())
return false;
DEBUG_LOG(m_logger) << "xml file for " << serviceName << ": " << fileName;
DEBUG_LOG() << "xml file for " << serviceName << ": " << fileName;
auto extXmlReader = QSharedPointer<XmlReader>(new XmlReader);
if (!extXmlReader->readServiceFile(fileName, QString(), this))
{
WARNING_LOG(m_logger) << "Error reading service file " << fileName
WARNING_LOG() << "Error reading service file " << fileName
<< " for service " << serviceName;
return false;
}
@@ -843,7 +842,7 @@ void XmlReader::loadIdlInfofile(const QString &idlServiceInfoFile)
QFile f(idlServiceInfoFile);
if (!f.open(QIODevice::ReadOnly))
{
WARNING_LOG(m_logger) << "Could not read idl service info file " << idlServiceInfoFile;
WARNING_LOG() << "Could not read idl service info file " << idlServiceInfoFile;
return;
}
const QList<QByteArray> files = f.readAll().split('\n');
@@ -860,7 +859,7 @@ void XmlReader::loadIdlInfofile(const QString &idlServiceInfoFile)
{
const auto svcAbbreveation = fn.split(QLatin1Char('.')).at(0).split(QLatin1Char('_')).at(0);
m_xmlFiles[svcAbbreveation] = fileName;
DEBUG_LOG(m_logger) << "xml: " << svcAbbreveation << " = " << fileName;
DEBUG_LOG() << "xml: " << svcAbbreveation << " = " << fileName;
}
else
{
@@ -868,7 +867,7 @@ void XmlReader::loadIdlInfofile(const QString &idlServiceInfoFile)
if (svcAbbreveation.endsWith(QLatin1String("_enums")))
continue;
m_idlFiles[svcAbbreveation] = fileName;
DEBUG_LOG(m_logger) << "idl: " << svcAbbreveation << " = " << fileName;
DEBUG_LOG() << "idl: " << svcAbbreveation << " = " << fileName;
}
}
}
@@ -894,7 +893,7 @@ void XmlReader::getServiceNameInfoFromFilePath(const QStringList &parts)
const QString abbreviation = parts.last().split(QLatin1Char('.')).first().split(QLatin1Char('_')).first();
const QString serviceName = parts.at(parts.size() - 2);
DEBUG_LOG(m_logger) << "serviceName: " << serviceName << " = " << abbreviation;
DEBUG_LOG() << "serviceName: " << serviceName << " = " << abbreviation;
m_fullServiceName2Abbreviation[serviceName] = abbreviation;
}
@@ -20,7 +20,7 @@
#endif
#endif
#include "codegen_export.h"
#include "codegen_base_export.h"
namespace NGL
{
@@ -434,7 +434,5 @@ private:
QStringList m_groupNames;
int m_prio;
bool m_svcDevMode{false};
NGL::INGLLogger &m_logger;
};
}
@@ -343,7 +343,7 @@ class OperatorRights(object):
outfile.write('\n')
outfile.write('enum Groups_%s\n' % parser.module_name)
outfile.write('{\n')
pattern = re.compile('[\W]+')
pattern = re.compile(r'\W+')
for r in parser.op_rights:
offsetPlugin = globalOffset + (r.offset << 16)
for group in r.groups:
@@ -77,20 +77,20 @@ int main(int argc, char **argv)
QScopedPointer<CodeGen::XmlReader> reader(new CodeGen::XmlReader);
DEBUG_LOG(m_logger) << "ServiceFile: " << options.serviceFile();
DEBUG_LOG(m_logger) << "IdlInfoFile: " << options.idlInfoFile();
DEBUG_LOG() << "ServiceFile: " << options.serviceFile();
DEBUG_LOG() << "IdlInfoFile: " << options.idlInfoFile();
if (!reader->readServiceFile(options.serviceFile(), options.idlInfoFile()))
{
ERROR_LOG(m_logger) << "Error parsing service file '" << options.serviceFile()
ERROR_LOG() << "Error parsing service file '" << options.serviceFile()
<< ": " << reader->errorString();
return 2;
}
QDir dir(options.outDir());
DEBUG_LOG(m_logger) << "Directory: " << options.outDir();
DEBUG_LOG() << "Directory: " << options.outDir();
if (!dir.exists() && !dir.mkpath(options.outDir()))
{
ERROR_LOG(m_logger) << "Directory '" << options.outDir()
ERROR_LOG() << "Directory '" << options.outDir()
<< "' does not exist and can not be created!";
return 3;
}
@@ -98,7 +98,7 @@ int main(int argc, char **argv)
QScopedPointer<CodeGen::StructBuilder> structBuilder(new CodeGen::StructBuilder(reader.data()));
if (!structBuilder->buildStructures())
{
ERROR_LOG(m_logger) << "Error building up structures";
ERROR_LOG() << "Error building up structures";
return 4;
}
@@ -123,7 +123,7 @@ int main(int argc, char **argv)
if (!sql.writeSql(dir.absolutePath() + QLatin1Char('/'), CodeGen::ExerciseDependency::Exercise))
{
ERROR_LOG(m_logger) << "Error while writing sql information for service " << sql.getServiceAbbr();
ERROR_LOG() << "Error while writing sql information for service " << sql.getServiceAbbr();
return 10;
}
@@ -133,7 +133,7 @@ int main(int argc, char **argv)
if (!sql.writeSql(dir.absolutePath() + QLatin1Char('/'), CodeGen::ExerciseDependency::Exercise))
{
ERROR_LOG(m_logger) << "Error while writing sql information for service " << sql.getServiceAbbr();
ERROR_LOG() << "Error while writing sql information for service " << sql.getServiceAbbr();
return 10;
}
@@ -141,20 +141,20 @@ int main(int argc, char **argv)
sql.generateData(0);
if (!sql.writeSql(dir.absolutePath() + QLatin1Char('/'), CodeGen::ExerciseDependency::Global))
{
ERROR_LOG(m_logger) << "Error while writing sql information for service " << sql.getServiceAbbr();
ERROR_LOG() << "Error while writing sql information for service " << sql.getServiceAbbr();
return 10;
}
return 0;
}
else
{
ERROR_LOG(m_logger) << "Invalid action '" << options.action() << "' given!";
ERROR_LOG() << "Invalid action '" << options.action() << "' given!";
return 5;
}
if (!generator->init(reader.data(), structBuilder.data()))
{
ERROR_LOG(m_logger) << "Error initializing generator!";
ERROR_LOG() << "Error initializing generator!";
return 6;
}
@@ -13,7 +13,7 @@ SET(LtsAppDescriptor_SRCS
lts_app_descriptor.h
)
NGL_ADD_LIBRARY(WS LtsAppDescriptor SHARED ${LtsAppDescriptor_SRCS})
NGL_ADD_LIBRARY2(WS LtsAppDescriptor SHARED ${LtsAppDescriptor_SRCS})
NGL_TARGET_INCLUDE_DIRECTORIES(LtsAppDescriptor
PUBLIC
@@ -57,7 +57,7 @@ NGL_TARGET_LINK_LIBRARIES(LtsAppDescriptorChecker
# lts_app_descriptor_editor.ui
#)
#NGL_ADD_LIBRARY(WS NO_TRANSLATION LtsAppDescriptorEditor SHARED ${LtsAppDescriptorEditor_SRCS})
#NGL_ADD_LIBRARY2(WS NO_TRANSLATION LtsAppDescriptorEditor SHARED ${LtsAppDescriptorEditor_SRCS})
#NGL_TARGET_INCLUDE_DIRECTORIES(LtsAppDescriptorEditor
# PUBLIC
@@ -21,7 +21,7 @@ NGL_WRAP_UI(LtsAppManager_SRCS
)
IF(BUILD_RTI)
NGL_ADD_LIBRARY(WS LtsAppManager SHARED ${LtsAppManager_SRCS})
NGL_ADD_LIBRARY2(WS LtsAppManager SHARED ${LtsAppManager_SRCS})
NGL_TARGET_INCLUDE_DIRECTORIES(LtsAppManager
PUBLIC
${CMAKE_CURRENT_SOURCE_DIR}/../
@@ -4,7 +4,7 @@
#pragma once
#include <QCommandLineParser>
#include <LtsCommandLineParser/ltscommandlineparser_export.h>
#include "ltscommandlineparser_export.h"
class QUrl;
namespace LtsCommandLineParser
@@ -3,7 +3,7 @@
#pragma once
#include <QObject>
#include <LtsCoordTrans/ltscoordwidget_export.h>
#include "sv_export.h"
#include <LtsCoordTrans/lts_coord_trans.h>
#include <QWidget>
@@ -77,5 +77,4 @@ private Q_SLOTS:
private:
LOGGER_T m_logger;
};
@@ -3,7 +3,7 @@
#pragma once
#include <LtsCoordinate/ltscoordinate_export.h>
#include "ltscoordinate_export.h"
#include <utility>
#include <Core/core.hpp>
@@ -3,7 +3,7 @@
#pragma once
#include <LtsCoordinate/ltscoordinate_export.h>
#include "ltscoordinate_export.h"
#include <utility>
#include <Core/core.hpp>
@@ -53,5 +53,4 @@ private Q_SLOTS:
private:
LOGGER_T m_logger;
};
@@ -78,19 +78,18 @@ public:
LtsElevationManager::LtsElevationManager()
: QObject(nullptr)
, d(new Private)
, m_logger(getLogger("LtsElevationManager"))
{
++s_counter;
TRACE_LOG(m_logger) << LOGFUNCTION << " START, s_counter=" << s_counter << " this=" << this;
TRACE_LOG(m_logger) << LOGFUNCTION << " END, s_counter=" << s_counter << " this=" << this;
TRACE_LOG() << Q_FUNC_INFO << " START, s_counter=" << s_counter << " this=" << this;
TRACE_LOG() << Q_FUNC_INFO << " END, s_counter=" << s_counter << " this=" << this;
}
LtsElevationManager::~LtsElevationManager()
{
--s_counter;
TRACE_LOG(m_logger) << LOGFUNCTION << " START, s_counter=" << s_counter << " this=" << this;
TRACE_LOG() << Q_FUNC_INFO << " START, s_counter=" << s_counter << " this=" << this;
delete d;
TRACE_LOG(m_logger) << LOGFUNCTION << " END, s_counter=" << s_counter << " this=" << this;
TRACE_LOG() << Q_FUNC_INFO << " END, s_counter=" << s_counter << " this=" << this;
}
LTS_ELEVATION_MANAGER_TYPE LtsElevationManager::createInstance(int exerciseId,
@@ -98,11 +97,11 @@ LTS_ELEVATION_MANAGER_TYPE LtsElevationManager::createInstance(int exerciseId,
const std::shared_ptr<AssetManagement::Interface::Dtc> &asmDtc)
{
LOGGER_T logger = getLogger("LtsElevationManager");
TRACE_LOG(logger) << LOGFUNCTION << " START, exerciseId=" << exerciseId;
TRACE_LOG(logger) << Q_FUNC_INFO << " START, exerciseId=" << exerciseId;
if (exerciseId < 0)
{
ERROR_LOG(logger) << LOGFUNCTION << " exerciseId invalid, exerciseId=" << exerciseId;
ERROR_LOG(logger) << Q_FUNC_INFO << " exerciseId invalid, exerciseId=" << exerciseId;
return nullptr;
}
@@ -127,7 +126,7 @@ LTS_ELEVATION_MANAGER_TYPE LtsElevationManager::createInstance(int exerciseId,
if (!exmDtc || !asmDtc)
{
ERROR_LOG(logger) << LOGFUNCTION << " no dtcs for exerciseId=" << exerciseId
ERROR_LOG(logger) << Q_FUNC_INFO << " no dtcs for exerciseId=" << exerciseId
<< ", asmDtc=" << asmDtc
<< ", exmDtc=" << exmDtc;
return nullptr;
@@ -137,7 +136,7 @@ LTS_ELEVATION_MANAGER_TYPE LtsElevationManager::createInstance(int exerciseId,
trainingAreaId = exerciseIdToTrainingAreaId(exerciseId, exmDtc);
if (trainingAreaId <= 0)
{
ERROR_LOG(logger) << LOGFUNCTION << " Error getting trainingAreaId"
ERROR_LOG(logger) << Q_FUNC_INFO << " Error getting trainingAreaId"
<< ", exerciseId=" << exerciseId
<< ", trainingAreaId=" << trainingAreaId;
return nullptr;
@@ -154,7 +153,7 @@ LTS_ELEVATION_MANAGER_TYPE LtsElevationManager::createInstance(int exerciseId,
LTS_ELEVATION_MANAGER_TYPE temp = createInstanceForTrainingAreaId(trainingAreaId, asmDtc);
if (!temp)
{
ERROR_LOG(logger) << LOGFUNCTION << " Error on createInstanceForTrainingAreaId"
ERROR_LOG(logger) << Q_FUNC_INFO << " Error on createInstanceForTrainingAreaId"
<< ", exerciseId=" << exerciseId
<< ", trainingAreaId=" << trainingAreaId;
return nullptr;
@@ -163,7 +162,7 @@ LTS_ELEVATION_MANAGER_TYPE LtsElevationManager::createInstance(int exerciseId,
temp->initDDS(exmDtc, asmDtc);
TRACE_LOG(logger) << LOGFUNCTION << " END, exerciseId=" << exerciseId;
TRACE_LOG(logger) << Q_FUNC_INFO << " END, exerciseId=" << exerciseId;
return temp;
}
@@ -176,11 +175,11 @@ LTS_ELEVATION_MANAGER_TYPE LtsElevationManager::createInstanceForTrainingAreaId(
const std::shared_ptr<AssetManagement::Interface::Dtc> &asmDtc)
{
LOGGER_T logger = getLogger("LtsElevationManager");
TRACE_LOG(logger) << LOGFUNCTION << " START, trainingAreaId=" << trainingAreaId;
TRACE_LOG(logger) << Q_FUNC_INFO << " START, trainingAreaId=" << trainingAreaId;
if (trainingAreaId < 0)
{
ERROR_LOG(logger) << LOGFUNCTION << " trainingAreaId invalid, trainingAreaId=" << trainingAreaId;
ERROR_LOG(logger) << Q_FUNC_INFO << " trainingAreaId invalid, trainingAreaId=" << trainingAreaId;
return nullptr;
}
@@ -198,7 +197,7 @@ LTS_ELEVATION_MANAGER_TYPE LtsElevationManager::createInstanceForTrainingAreaId(
if (!asmDtc)
{
ERROR_LOG(logger) << LOGFUNCTION << " no dtcs for trainingAreaId=" << trainingAreaId
ERROR_LOG(logger) << Q_FUNC_INFO << " no dtcs for trainingAreaId=" << trainingAreaId
<< ", asmDtc=" << asmDtc;
return nullptr;
}
@@ -211,7 +210,7 @@ LTS_ELEVATION_MANAGER_TYPE LtsElevationManager::createInstanceForTrainingAreaId(
const QStringList &filenames = temp->getFilenamesForTrainingArea(trainingAreaId);
if (filenames.isEmpty())
{
ERROR_LOG(logger) << LOGFUNCTION << " no filenames for trainingAreaId=" << trainingAreaId;
ERROR_LOG(logger) << Q_FUNC_INFO << " no filenames for trainingAreaId=" << trainingAreaId;
delete temp;
return nullptr;
}
@@ -220,7 +219,7 @@ LTS_ELEVATION_MANAGER_TYPE LtsElevationManager::createInstanceForTrainingAreaId(
bool bInitFilenames = temp->init(filenames);
if (!bInitFilenames)
{
ERROR_LOG(logger) << LOGFUNCTION << " bInitFilenames failed for trainingAreaId=" << trainingAreaId;
ERROR_LOG(logger) << Q_FUNC_INFO << " bInitFilenames failed for trainingAreaId=" << trainingAreaId;
delete temp;
return nullptr;
}
@@ -229,7 +228,7 @@ LTS_ELEVATION_MANAGER_TYPE LtsElevationManager::createInstanceForTrainingAreaId(
DEBUG_LOG(logger) << " LtsElevationMgrMap contains instances now: " << map.size();
TRACE_LOG(logger) << LOGFUNCTION << " END, trainingAreaId=" << trainingAreaId;
TRACE_LOG(logger) << Q_FUNC_INFO << " END, trainingAreaId=" << trainingAreaId;
return map[trainingAreaId];
}
@@ -257,7 +256,7 @@ LTS_ELEVATION_MANAGER_TYPE LtsElevationManager::createInstanceUnitTest(int id, c
bool bInitFilenames = temp->init(filePaths_rough_to_fine);
if (!bInitFilenames)
{
ERROR_LOG(logger) << LOGFUNCTION << " bInitFilenames failed for id=" << id;
ERROR_LOG(logger) << Q_FUNC_INFO << " bInitFilenames failed for id=" << id;
delete temp;
return nullptr;
}
@@ -266,7 +265,7 @@ LTS_ELEVATION_MANAGER_TYPE LtsElevationManager::createInstanceUnitTest(int id, c
DEBUG_LOG(logger) << " LtsElevationMgrMap contains instances now: " << map.size();
TRACE_LOG(logger) << LOGFUNCTION << " END, trainingAreaId=" << id;
TRACE_LOG(logger) << Q_FUNC_INFO << " END, trainingAreaId=" << id;
return map[id];
@@ -277,14 +276,14 @@ LTS_ELEVATION_MANAGER_TYPE LtsElevationManager::createInstanceUnitTest(int id, c
void LtsElevationManager::cleanupAll()
{
LOGGER_T logger = getLogger("LtsElevationManager");
TRACE_LOG(logger) << LOGFUNCTION << " START";
TRACE_LOG(logger) << Q_FUNC_INFO << " START";
cleanupLtsElevatioMgrMapTrainingAreaId();
TRACE_LOG(logger) << LOGFUNCTION << " END";
TRACE_LOG(logger) << Q_FUNC_INFO << " END";
}
void LtsElevationManager::initDDS(const std::shared_ptr<ExerciseManagement::Interface::Dtc> &exmDtc, const std::shared_ptr<AssetManagement::Interface::Dtc> &asmDtc)
{
TRACE_LOG(m_logger) << LOGFUNCTION << " START";
TRACE_LOG() << Q_FUNC_INFO << " START";
d->m_exmDtc = exmDtc;
if (d->m_exmDtc)
@@ -294,16 +293,16 @@ void LtsElevationManager::initDDS(const std::shared_ptr<ExerciseManagement::Inte
if (d->m_asmDtc)
d->m_asmDtc->waitForHistoricalDataTrainingArea(1000);
TRACE_LOG(m_logger) << LOGFUNCTION << " END";
TRACE_LOG() << Q_FUNC_INFO << " END";
}
QStringList LtsElevationManager::getFilenamesForExercise(int exerciseId)
{
TRACE_LOG(m_logger) << LOGFUNCTION << " START";
TRACE_LOG() << Q_FUNC_INFO << " START";
if (!d->m_exmDtc || !d->m_asmDtc)
{
ERROR_LOG(m_logger) << LOGFUNCTION << " no dtcs"
ERROR_LOG() << Q_FUNC_INFO << " no dtcs"
<< ", exerciseId=" << exerciseId;
return {};
}
@@ -312,7 +311,7 @@ QStringList LtsElevationManager::getFilenamesForExercise(int exerciseId)
int trainingAreaId = exerciseIdToTrainingAreaId(exerciseId, d->m_exmDtc);
if (trainingAreaId <= 0)
{
ERROR_LOG(m_logger) << LOGFUNCTION << " Error getting trainingAreaId"
ERROR_LOG() << Q_FUNC_INFO << " Error getting trainingAreaId"
<< ", exerciseId=" << exerciseId
<< ", trainingAreaId=" << trainingAreaId;
return {};
@@ -320,17 +319,17 @@ QStringList LtsElevationManager::getFilenamesForExercise(int exerciseId)
QStringList filePaths_rough_to_fine = getFilenamesForTrainingArea(trainingAreaId);
TRACE_LOG(m_logger) << LOGFUNCTION << " END, filePaths_rough_to_fine=" << filePaths_rough_to_fine.join(QStringLiteral(";"));
TRACE_LOG() << Q_FUNC_INFO << " END, filePaths_rough_to_fine=" << filePaths_rough_to_fine.join(QStringLiteral(";"));
return filePaths_rough_to_fine;
}
QStringList LtsElevationManager::getFilenamesForTrainingArea(int trainingAreaId)
{
TRACE_LOG(m_logger) << LOGFUNCTION << " START";
TRACE_LOG() << Q_FUNC_INFO << " START";
if (!d->m_asmDtc)
{
ERROR_LOG(m_logger) << LOGFUNCTION << " no dtcs"
ERROR_LOG() << Q_FUNC_INFO << " no dtcs"
<< ", trainingAreaId=" << trainingAreaId;
return {};
}
@@ -342,7 +341,7 @@ QStringList LtsElevationManager::getFilenamesForTrainingArea(int trainingAreaId)
const AssetManagement::TrainingArea &ta = d->m_asmDtc->trainingArea(trainingAreaId);
if (ta.id() != trainingAreaId)
{
ERROR_LOG(m_logger) << LOGFUNCTION << " Error on s_asmDtc->trainingArea"
ERROR_LOG() << Q_FUNC_INFO << " Error on s_asmDtc->trainingArea"
<< ", trainingAreaId=" << trainingAreaId;
return {};
}
@@ -360,7 +359,7 @@ QStringList LtsElevationManager::getFilenamesForTrainingArea(int trainingAreaId)
filePaths_rough_to_fine.append(filePathAbs);
}
}
TRACE_LOG(m_logger) << LOGFUNCTION << " END, filePaths_rough_to_fine=" << filePaths_rough_to_fine.join(QStringLiteral(";"));
TRACE_LOG() << Q_FUNC_INFO << " END, filePaths_rough_to_fine=" << filePaths_rough_to_fine.join(QStringLiteral(";"));
return filePaths_rough_to_fine;
}
@@ -373,13 +372,13 @@ bool LtsElevationManager::init(const QStringList &filePaths_rough_to_fine)
if (cnt != filePaths_rough_to_fine.size())
{
FATAL_LOG(m_logger) << LOGFUNCTION << " ERROR, not all files could be loaded !!!";
FATAL_LOG(m_logger) << LOGFUNCTION << " ERROR, not all files could be loaded !!!";
FATAL_LOG(m_logger) << LOGFUNCTION << " ERROR, not all files could be loaded !!!";
FATAL_LOG(m_logger) << LOGFUNCTION << " ERROR, not all files could be loaded !!!";
FATAL_LOG(m_logger) << LOGFUNCTION << " ERROR, not all files could be loaded !!!";
FATAL_LOG(m_logger) << LOGFUNCTION << " ERROR, not all files could be loaded !!!";
FATAL_LOG(m_logger) << LOGFUNCTION << " ERROR, not all files could be loaded !!!";
FATAL_LOG(m_logger) << Q_FUNC_INFO << " ERROR, not all files could be loaded !!!";
FATAL_LOG(m_logger) << Q_FUNC_INFO << " ERROR, not all files could be loaded !!!";
FATAL_LOG(m_logger) << Q_FUNC_INFO << " ERROR, not all files could be loaded !!!";
FATAL_LOG(m_logger) << Q_FUNC_INFO << " ERROR, not all files could be loaded !!!";
FATAL_LOG(m_logger) << Q_FUNC_INFO << " ERROR, not all files could be loaded !!!";
FATAL_LOG(m_logger) << Q_FUNC_INFO << " ERROR, not all files could be loaded !!!";
FATAL_LOG(m_logger) << Q_FUNC_INFO << " ERROR, not all files could be loaded !!!";
return false;
}
return true;
@@ -391,7 +390,7 @@ int LtsElevationManager::exerciseIdToTrainingAreaId(int exerciseId, const std::s
if (!exmDtc)
{
ERROR_LOG(logger) << LOGFUNCTION << " no dtcs"
ERROR_LOG(logger) << Q_FUNC_INFO << " no dtcs"
<< ", exerciseId=" << exerciseId;
return {};
}
@@ -404,7 +403,7 @@ int LtsElevationManager::exerciseIdToTrainingAreaId(int exerciseId, const std::s
const ExerciseManagement::Exercise &exm = exmDtc->exercise(exerciseId);
if (exm.id() != exerciseId)
{
ERROR_LOG(logger) << LOGFUNCTION << " Error on m_exmDtc->exercise"
ERROR_LOG(logger) << Q_FUNC_INFO << " Error on m_exmDtc->exercise"
<< ", exerciseId=" << exerciseId;
return {};
}
@@ -412,7 +411,7 @@ int LtsElevationManager::exerciseIdToTrainingAreaId(int exerciseId, const std::s
if (trainingAreaId <= 0)
{
ERROR_LOG(logger) << LOGFUNCTION << " Error getting trainingAreaId"
ERROR_LOG(logger) << Q_FUNC_INFO << " Error getting trainingAreaId"
<< ", exerciseId=" << exerciseId
<< ", trainingAreaId=" << trainingAreaId;
return -1;
@@ -445,11 +444,11 @@ double LtsElevationManager::elevation(double lon_rad, double lat_rad, double def
LineOfSight LtsElevationManager::lineOfSightCalculation(const LtsUtils::QPoint3D &startPointGeo_absZ,
const LtsUtils::QPoint3D &endPointGeo_absZ)
{
TRACE_LOG(m_logger) << LOGFUNCTION << " START" << ", startPointGeo_absZ = " << startPointGeo_absZ << ", endPointGeo_absZ = " << endPointGeo_absZ;
TRACE_LOG() << Q_FUNC_INFO << " START" << ", startPointGeo_absZ = " << startPointGeo_absZ << ", endPointGeo_absZ = " << endPointGeo_absZ;
if (!isValid())
{
ERROR_LOG(m_logger) << LOGFUNCTION << " Error, LtsElevationManager not valid";
ERROR_LOG() << Q_FUNC_INFO << " Error, LtsElevationManager not valid";
return LineOfSight::LOS_ERROR;
}
@@ -459,14 +458,14 @@ LineOfSight LtsElevationManager::lineOfSightCalculation(const LtsUtils::QPoint3D
LtsElevation::LineOfSight result = static_cast<LtsElevation::LineOfSight>(eleMapMgrResult);
TRACE_LOG(m_logger) << LOGFUNCTION << " END" << ", startPointGeo = " << startPointGeo_absZ << ", endPointGeo = " << endPointGeo_absZ
TRACE_LOG() << Q_FUNC_INFO << " END" << ", startPointGeo = " << startPointGeo_absZ << ", endPointGeo = " << endPointGeo_absZ
<< " -> LineOfSight " << result;
return result;
}
LineOfSight LtsElevationManager::lineOfSightCalculation(const QPointF &startPointGeo, double startHat, const QPointF &endPointGeo, double endHat)
{
TRACE_LOG(m_logger) << LOGFUNCTION << " START"
TRACE_LOG() << Q_FUNC_INFO << " START"
<< ", startPointGeo = " << startPointGeo << ", startHat = " << startHat
<< ", endPointGeo = " << endPointGeo << ", endHat = " << endHat;
@@ -477,7 +476,7 @@ LineOfSight LtsElevationManager::lineOfSightCalculation(const QPointF &startPoin
LtsElevation::LineOfSight result = static_cast<LtsElevation::LineOfSight>(eleMapMgrResult);
TRACE_LOG(m_logger) << LOGFUNCTION << " END"
TRACE_LOG() << Q_FUNC_INFO << " END"
<< ", startPointGeo = " << startPointGeo << ", startHat = " << startHat
<< ", endPointGeo = " << endPointGeo << ", endHat = " << endHat
<< " -> LineOfSight " << static_cast<int>(eleMapMgrResult);
@@ -4,7 +4,7 @@
#pragma once
#include "logger.h"
#include <LtsElevation/ltselevation_export.h>
#include "ltselevation_export.h"
#include <LtsUtilsCore/qpoint3d.h>
@@ -4,7 +4,7 @@
#pragma once
#include <QtCore/QString>
#include <LtsLicence/ltslicence_export.h>
#include "ltslicence_export.h"
namespace LtsLicence
{
@@ -3,7 +3,7 @@
#pragma once
#include <LtsLicence/ltslicence_export.h>
#include "ltslicence_export.h"
#include <QString>
#include <QVector>
#include <QDateTime>
@@ -2,7 +2,7 @@
#include <Common/LtsLogin/ltslogin_export.h>
#include <Lts/Common/LtsLogin/ltslogin_export.h>
#include <Plugins/OperatorManagement/opm_data_plugin_interface.h>
#include <Plugins/SituationReplayManagement/srm_data_plugin_interface.h>
#include <Plugins/AssetManagement/asm_data_plugin_interface.h>
@@ -28,7 +28,7 @@ SET(LtsMultiMonitor_SRCS
)
IF(BUILD_RTI)
NGL_ADD_LIBRARY(WS LtsMultiMonitor SHARED ${LtsMultiMonitor_SRCS})
NGL_ADD_LIBRARY2(WS LtsMultiMonitor SHARED ${LtsMultiMonitor_SRCS})
NGL_TARGET_INCLUDE_DIRECTORIES(LtsMultiMonitor
PUBLIC
@@ -1,7 +1,7 @@
#pragma once
#include <QObject>
#include <LtsMultiMonitor/lts_multi_monitor_export.h>
#include "ltsmultimonitor_export.h"
#include <QWidget>
@@ -1,6 +1,6 @@
#pragma once
#include "lts_multi_monitor_export.h"
#include "ltsmultimonitor_export.h"
#include <QObject>
#include <QVector>
@@ -1,7 +1,7 @@
#pragma once
#include <QObject>
#include "lts_multi_monitor_export.h"
#include "ltsmultimonitor_export.h"
#include <QWidget>
#include <QRect>
@@ -3,7 +3,7 @@
#include "lts_screen_base.h"
#include <lts_multi_monitor_export.h>
#include "ltsmultimonitor_export.h"
#include <QWidget>
#include <QRect>
@@ -3,7 +3,7 @@
#include "lts_screen_base.h"
#include <LtsMultiMonitor/lts_multi_monitor_export.h>
#include "ltsmultimonitor_export.h"
#include <QWidget>
#include <QRect>
@@ -3,7 +3,7 @@
#include "lts_screen_base.h"
#include <LtsMultiMonitor/lts_multi_monitor_export.h>
#include "ltsmultimonitor_export.h"
#include <QWidget>
#include <QRect>
@@ -15,7 +15,7 @@ SET(LtsNoti_SRCS
lts_notification_export.h
)
NGL_ADD_LIBRARY(WS LtsNotification SHARED ${LtsNoti_SRCS})
NGL_ADD_LIBRARY2(WS LtsNotification SHARED ${LtsNoti_SRCS})
NGL_TARGET_INCLUDE_DIRECTORIES(LtsNotification
PUBLIC
@@ -2,7 +2,7 @@
#pragma once
#include "lts_notification_export.h"
#include "ltsnotification_export.h"
#include <QList>
#include <QObject>
@@ -2,7 +2,7 @@
#pragma once
#include "lts_notification_export.h"
#include "ltsnotification_export.h"
#include <QList>
#include <QObject>
@@ -7,7 +7,7 @@
# LtsPluginLoader
NGL_ADD_LIBRARY(ALL LtsPluginLoader SHARED lts_plugin_loader.cpp lts_plugin_loader.h)
NGL_ADD_LIBRARY2(ALL LtsPluginLoader SHARED lts_plugin_loader.cpp lts_plugin_loader.h)
NGL_TARGET_INCLUDE_DIRECTORIES(LtsPluginLoader
PUBLIC
${CMAKE_CURRENT_SOURCE_DIR}/../
@@ -38,7 +38,7 @@ NGL_WRAP_UI(ltspluginmanager_SRCS
)
IF(BUILD_RTI)
NGL_ADD_LIBRARY(WS LtsPluginManager SHARED ${ltspluginmanager_SRCS})
NGL_ADD_LIBRARY2(WS LtsPluginManager SHARED ${ltspluginmanager_SRCS})
NGL_TARGET_INCLUDE_DIRECTORIES(LtsPluginManager
PUBLIC
@@ -3,7 +3,7 @@
#pragma once
#include <QObject>
#include <LtsPluginManager/lts_plugin_manager_export.h>
#include "ltspluginmanager_export.h"
#include "lts_plugin_manager_widget.h"
#include <QDialog>
@@ -122,7 +122,7 @@ bool LtsPluginManager::startApp(const LtsAppDescriptor::AppDescription &app, boo
if (!pluginLoader->loadPlugins(PluginType::DATA, cb))
{
WARNING_LOG(m_logger) << "PluginLoader failed to load data plugins - abort!";
WARNING_LOG() << "PluginLoader failed to load data plugins - abort!";
return false;
}
@@ -137,7 +137,7 @@ bool LtsPluginManager::startApp(const LtsAppDescriptor::AppDescription &app, boo
if (!pluginLoader->loadPlugins(PluginType::GUI, cbLoadPlugins))
{
WARNING_LOG(m_logger) << "PluginLoader failed to load gui plugins - abort!";
WARNING_LOG() << "PluginLoader failed to load gui plugins - abort!";
return false;
}
@@ -255,7 +255,7 @@ bool LtsPluginManager::startApp(const LtsAppDescriptor::AppDescription &app, boo
LtsSession::DdsConnectionParams connParamsNew(connParams);
if (!connParamsNew.isValid())
{
INFO_LOG(m_logger) << "Invalid connection params given - using default parameter";
INFO_LOG() << "Invalid connection params given - using default parameter";
connParamsNew.domainId = LtsSessionData::LtsSessionData::getInstance()->getDomainIdPreset();
connParamsNew.partitionId = 0;
@@ -277,7 +277,7 @@ bool LtsPluginManager::startApp(const LtsAppDescriptor::AppDescription &app, boo
headless,
hidden))
{
ERROR_LOG(m_logger) << "Could not create Global Session - abort.";
ERROR_LOG() << "Could not create Global Session - abort.";
return false;
}
@@ -3,7 +3,7 @@
#pragma once
#include "lts_plugin_manager_export.h"
#include "ltspluginmanager_export.h"
#include <LtsPluginManager/lts_plugin_loader.h>
#include <LtsAppDescriptor/lts_app_descriptor.h>
@@ -88,7 +88,6 @@ private:
friend class DeveloperTools::DevDialog;
LtsAppDescriptor::AppDescription m_app;
NGL::INGLLogger &m_logger;
bool m_initialized = false;
bool m_markedForDeletion;
QString m_description;
@@ -16,7 +16,7 @@ SET(SRCS
)
if (KDReports_FOUND AND BUILD_RTI)
NGL_ADD_LIBRARY(WS LtsPrinting SHARED ${SRCS})
NGL_ADD_LIBRARY2(WS LtsPrinting SHARED ${SRCS})
NGL_TARGET_INCLUDE_DIRECTORIES(LtsPrinting
PUBLIC
${CMAKE_CURRENT_SOURCE_DIR}/../
@@ -159,7 +159,7 @@ void Base::setPrintToFile(bool printToFile)
QPrinter *Base::printer()
{
DEBUG_LOG(m_logger) << "Base::printer" ;
DEBUG_LOG() << "Base::printer" ;
return m_printer;
}
@@ -392,7 +392,7 @@ bool Base::printTableData(QString &str,
}
str += QLatin1String("</tbody></table>");
DEBUG_LOG(m_logger) << qPrintable(str) ;
DEBUG_LOG() << qPrintable(str) ;
return true;
}
@@ -291,7 +291,6 @@ private:
private:
NGL::Settings *m_settings;
NGL::INGLLogger &m_logger;
QString m_exerciseName;
QString m_operatorName;
int m_currentPage;
@@ -26,7 +26,7 @@ SET(LtsProjectionWorkstation_SRCS
)
IF(BUILD_RTI)
NGL_ADD_LIBRARY(WS LtsProjectionWorkstation SHARED ${LtsProjectionWorkstation_SRCS})
NGL_ADD_LIBRARY2(WS LtsProjectionWorkstation SHARED ${LtsProjectionWorkstation_SRCS})
NGL_TARGET_INCLUDE_DIRECTORIES(LtsProjectionWorkstation
PUBLIC
@@ -3,7 +3,7 @@
#include <LtsWebSocket/client_message_factory.h>
#include <LtsProjectionWorkstation/logger.h>
#include <LtsProjectionWorkstation/lts_projection_workstation_export.h>
#include "ltsprojectionworkstation_export.h"
namespace LtsProjectionWorkstation
{
@@ -8,7 +8,7 @@
#include <LtsWebSocket/json_keys.h>
#include <LtsWebSocket/client_message.h>
#include <LtsProjectionWorkstation/lts_projection_workstation_export.h>
#include "ltsprojectionworkstation_export.h"
#include <LtsProjectionWorkstation/vnc_server_manager.h>
#include <QVector>
@@ -4,7 +4,7 @@
#pragma once
#include <NGLLogger/INGLLogger.h>
#include "lts_projection_workstation_export.h"
#include "ltsprojectionworkstation_export.h"
namespace LtsProjectionWorkstation
{
@@ -44,7 +44,6 @@ bool LtsProjectionWorkstation::hasInstance()
LtsProjectionWorkstation::LtsProjectionWorkstation(QObject *parent)
: QObject(parent)
, m_logger(getLogger("LtsProjetionWorkstation"))
, m_messageFactory(new MessageFactory(this, m_logger))
, m_webSocketServer(new LtsWebSocket::LtsWebSocketServer(m_messageFactory, this))
, m_pendingLoginRequest(nullptr)
@@ -78,7 +77,7 @@ LoginInformation LtsProjectionWorkstation::pendingLoginRequest()
LoginInformation result = *m_pendingLoginRequest;
INFO_LOG(m_logger) << " reset pendingLoginRequest..";
INFO_LOG() << " reset pendingLoginRequest..";
delete m_pendingLoginRequest;
m_pendingLoginRequest = nullptr;
@@ -91,7 +90,7 @@ void LtsProjectionWorkstation::handleMessage(LtsWebSocket::AbstractClientMessage
CTS::LoginRequest *login = dynamic_cast<CTS::LoginRequest *>(message);
if (login)
{
INFO_LOG(m_logger) << "Login request received!"
INFO_LOG() << "Login request received!"
<< ", login->userId()=" << login->userId()
<< " with login->priority()=" << login->priority()
<< " ;;; m_lastLoginRequest.m_userId=" << m_lastLoginRequest.m_userId
@@ -109,16 +108,16 @@ void LtsProjectionWorkstation::handleMessage(LtsWebSocket::AbstractClientMessage
DEBUG_LOG(m_logger) << "Login request received and DedicatedDisconnect distributed, wait some seconds...";
DEBUG_LOG() << "Login request received and DedicatedDisconnect distributed, wait some seconds...";
int i=0;
while(i<20)
{
DEBUG_LOG(m_logger) << "Login request received and DedicatedDisconnect distributed, wait some seconds...i=" << i;
DEBUG_LOG() << "Login request received and DedicatedDisconnect distributed, wait some seconds...i=" << i;
qApp->processEvents(QEventLoop::AllEvents, 50);
QThread::msleep(50);
++i;
}
INFO_LOG(m_logger) << "Login request received and DedicatedDisconnect distributed, wait some seconds... done";
INFO_LOG() << "Login request received and DedicatedDisconnect distributed, wait some seconds... done";
login->addReply((new STC::LoginRequestReply(QUuid::createUuid().toString(),
@@ -134,10 +133,10 @@ void LtsProjectionWorkstation::handleMessage(LtsWebSocket::AbstractClientMessage
slotLoginRequestReceived(login->userId(), login->exerciseId());
INFO_LOG(m_logger) << "Valid login request received -> userId: " << login->userId()
INFO_LOG() << "Valid login request received -> userId: " << login->userId()
<< " priority: " << login->priority()
<< " exerciseId: " << login->exerciseId();
DEBUG_LOG(m_logger) << "Logging in now!";
DEBUG_LOG() << "Logging in now!";
}
else
@@ -148,17 +147,17 @@ void LtsProjectionWorkstation::handleMessage(LtsWebSocket::AbstractClientMessage
QVector<VncScreen>())
)->toReplyMessage());
DEBUG_LOG(m_logger) << "Higher prioritized login received -> userId: " << login->userId()
DEBUG_LOG() << "Higher prioritized login received -> userId: " << login->userId()
<< " priority: " << login->priority()
<< " exerciseId: " << login->exerciseId();
DEBUG_LOG(m_logger) << "Last login data was -> userId: " << m_lastLoginRequest.m_userId
DEBUG_LOG() << "Last login data was -> userId: " << m_lastLoginRequest.m_userId
<< " priority: " << m_lastLoginRequest.m_priority
<< " exerciseId: " << m_lastLoginRequest.m_exerciseId;
}
}
else
ERROR_LOG(m_logger) << "invalid login request received -> userId: " << login->userId()
ERROR_LOG() << "invalid login request received -> userId: " << login->userId()
<< " priority: " << login->priority()
<< " exerciseId: " << login->exerciseId();
@@ -168,7 +167,7 @@ void LtsProjectionWorkstation::handleMessage(LtsWebSocket::AbstractClientMessage
CTS::LogoutRequest *logout = dynamic_cast<CTS::LogoutRequest *>(message);
if (logout)
{
DEBUG_LOG(m_logger) << "Logging out now!";
DEBUG_LOG() << "Logging out now!";
slotLogoutRequestReceived();
return;
}
@@ -185,7 +184,7 @@ void LtsProjectionWorkstation::handleMessage(LtsWebSocket::AbstractClientMessage
int disconnectingUserId = discon->userId();
INFO_LOG(m_logger) << "Disconnecting now! "
INFO_LOG() << "Disconnecting now! "
<< ", disconnectingUserId=" << disconnectingUserId
<< ", m_pendingLoginRequest=" << m_pendingLoginRequest;
m_lastLoginRequest = LoginInformation();
@@ -195,7 +194,7 @@ void LtsProjectionWorkstation::handleMessage(LtsWebSocket::AbstractClientMessage
void LtsProjectionWorkstation::slotLoginRequestReceived(int userId, int exerciseId)
{
INFO_LOG(m_logger) << "slotLoginRequestReceived.."
INFO_LOG() << "slotLoginRequestReceived.."
<< ", userId=" << userId
<< ", exerciseId=" << exerciseId;
delete m_pendingLoginRequest;
@@ -220,17 +219,17 @@ void LtsProjectionWorkstation::slotLogoffDone()
void LtsProjectionWorkstation::clientDisconnected(LtsWebSocket::ClientConnection *client)
{
INFO_LOG(m_logger) << LOGFUNCTION << " START"
INFO_LOG() << Q_FUNC_INFO << " START"
<< ", m_connections.size = " << m_connections.size();
m_connections.removeOne(client);
if ( m_connections.size() == 0 && (m_lastLoginRequest.m_userId != 0 || m_lastLoginRequest.m_priority != 0))
{
INFO_LOG(m_logger) << LOGFUNCTION << " reset m_lastLoginRequest";
INFO_LOG() << Q_FUNC_INFO << " reset m_lastLoginRequest";
m_lastLoginRequest = LoginInformation();
}
INFO_LOG(m_logger) << LOGFUNCTION << " END"
INFO_LOG() << Q_FUNC_INFO << " END"
<< ", m_connections.size = " << m_connections.size();
}
@@ -3,7 +3,7 @@
#pragma once
#include "lts_projection_workstation_export.h"
#include "ltsprojectionworkstation_export.h"
#include "vnc_server_manager.h"
#include "WebSocket/messages.h"
#include "logger.h"
@@ -48,7 +48,7 @@ bool VncServerManager::init(const QList<QScreen *> &screens)
const auto sortedScreens = sortScreen(screens);
DEBUG_LOG(m_logger) << "Setup VNCScreens with " << screens.size() << " screens";
DEBUG_LOG() << "Setup VNCScreens with " << screens.size() << " screens";
int count = 1;
@@ -77,13 +77,13 @@ bool VncServerManager::init(const QList<QScreen *> &screens)
count++;
}
DEBUG_LOG(m_logger) << m_vncScreens.size() << " VNCScreen(s) created - Setup completed.";
DEBUG_LOG() << m_vncScreens.size() << " VNCScreen(s) created - Setup completed.";
return true;
}
void VncServerManager::startScreens()
{
DEBUG_LOG(m_logger) << "Starting " << m_vncScreens.size() << " VNCScreen(s) ... ";
DEBUG_LOG() << "Starting " << m_vncScreens.size() << " VNCScreen(s) ... ";
for (const VncScreen &s : std::as_const(m_vncScreens))
{
connect(s.proc, &QProcess::readyReadStandardOutput,
@@ -95,16 +95,16 @@ void VncServerManager::startScreens()
for (const VncScreen &s : std::as_const(m_vncScreens))
{
if (!s.proc->waitForStarted(2000))
ERROR_LOG(m_logger) << "Can not start process '" << s.proc->program() << "': "
ERROR_LOG() << "Can not start process '" << s.proc->program() << "': "
<< s.proc->errorString();
}
DEBUG_LOG(m_logger) << "Done";
DEBUG_LOG() << "Done";
}
void VncServerManager::stopScreens()
{
DEBUG_LOG(m_logger) << "Stopping " << m_vncScreens.size() << " VNCScreen(s) ...";
DEBUG_LOG() << "Stopping " << m_vncScreens.size() << " VNCScreen(s) ...";
for (const VncScreen &s : std::as_const(m_vncScreens))
{
@@ -116,28 +116,28 @@ void VncServerManager::stopScreens()
if (!s.proc->waitForFinished(2000))
s.proc->kill();
}
DEBUG_LOG(m_logger) << "Done";
DEBUG_LOG() << "Done";
}
void VncServerManager::killScreens()
{
DEBUG_LOG(m_logger) << "Killing all exisiting x11vnc processes ...";
DEBUG_LOG() << "Killing all exisiting x11vnc processes ...";
SingleShotProcess ssp(QStringLiteral("killall x11vnc"));
ssp.execute();
DEBUG_LOG(m_logger) << "Done";
DEBUG_LOG() << "Done";
}
void VncServerManager::createPwdFile()
{
DEBUG_LOG(m_logger) << "(Re)creating x11vnc password-file ...";
DEBUG_LOG() << "(Re)creating x11vnc password-file ...";
SingleShotProcess ssp(QStringLiteral("x11vnc -storepasswd ctc11de %1/.vnc/passwd")
.arg(QDir::home().absolutePath()));
ssp.execute();
DEBUG_LOG(m_logger) << "Done";
DEBUG_LOG() << "Done";
}
@@ -151,7 +151,7 @@ void VncServerManager::slotReadStandardOutput()
QRegularExpressionMatch match = QRegularExpression(QStringLiteral("PORT=(.*?)\\s")).match(stdOut);
if (!match.hasMatch())
{
WARNING_LOG(m_logger) << "Could not retrieve port information from stdout of " << p->program();
WARNING_LOG() << "Could not retrieve port information from stdout of " << p->program();
return;
}
const quint16 port = match.capturedRef(1).toInt();
@@ -172,7 +172,7 @@ void VncServerManager::slotErrorOccured()
{
QProcess *p = qobject_cast<QProcess *>(QObject::sender());
if (p)
ERROR_LOG(m_logger) << p->errorString();
ERROR_LOG() << p->errorString();
}
@@ -1,7 +1,7 @@
#pragma once
#include <QObject>
#include <LtsScriptTimeline/ltsscripttimeline_export.h>
#include "ltsscripttimeline_export.h"
#include "track_entry_painters.h"
#include <QWidget>
@@ -1,7 +1,7 @@
#pragma once
#include <QObject>
#include <LtsScriptTimeline/ltsscripttimeline_export.h>
#include "ltsscripttimeline_export.h"
#include "track_entry_painters.h"
#include <QWidget>
@@ -1,7 +1,7 @@
#pragma once
#include <QObject>
#include <LtsScriptTimeline/ltsscripttimeline_export.h>
#include "ltsscripttimeline_export.h"
#include <QWidget>
@@ -1,6 +1,6 @@
#pragma once
#include <LtsScriptTimeline/ltsscripttimeline_export.h>
#include "ltsscripttimeline_export.h"
#include <QWidget>
@@ -1,6 +1,6 @@
#pragma once
#include <LtsScriptTimeline/ltsscripttimeline_export.h>
#include "ltsscripttimeline_export.h"
#include "track_entry_painters.h"
#include <QJsonObject>
@@ -3,7 +3,7 @@
#pragma once
#include <LtsScriptTimeline/ltsscripttimeline_export.h>
#include "ltsscripttimeline_export.h"
#include <QColor>
#include <QPainter>
@@ -1,7 +1,7 @@
#pragma once
#include <QObject>
#include <LtsScriptTimeline/ltsscripttimeline_export.h>
#include "ltsscripttimeline_export.h"
#include <QWidget>
@@ -1,6 +1,6 @@
#pragma once
#include <LtsScriptTimeline/ltsscripttimeline_export.h>
#include "ltsscripttimeline_export.h"
#include <LtsScriptTimeline/track_content_widget.h>
#include <QCursor>
@@ -2,7 +2,7 @@
#include <QObject>
#include <LtsScriptTimeline/ltsscripttimeline_export.h>
#include "ltsscripttimeline_export.h"
class QMouseEvent;
@@ -1,7 +1,7 @@
#pragma once
#include <QObject>
#include <LtsScriptTimeline/ltsscripttimeline_export.h>
#include "ltsscripttimeline_export.h"
#include "track_entry_painters.h"
#include <QWidget>
@@ -1,6 +1,6 @@
#pragma once
#include "lts_serial_port_querry_export.h"
#include "ltsserialportquerry_export.h"
#include "lts_seri"
#include <QObject>
#include <QtSerialPort/QtSerialPort>
@@ -15,7 +15,6 @@ LtsSerialPortQuerry::LtsSerialPortQuerry(QObject *parent)
, m_parity(QSerialPort::NoParity)
, m_stopBits(QSerialPort::OneStop)
, m_currentSerialPort(nullptr)
, m_logger(getLogger("LtsSerialPortQuerry"))
{
@@ -50,7 +49,7 @@ void LtsSerialPortQuerry::continueQuerry()
void LtsSerialPortQuerry::restartQuerry()
{
DEBUG_LOG(m_logger) << "restart querry ";
DEBUG_LOG() << "restart querry ";
m_serialPortInfos = QSerialPortInfo::availablePorts();
m_currentQuerry = 0;
if (m_serialPortInfos.size())
@@ -74,20 +73,20 @@ void LtsSerialPortQuerry::querrySerialPort(const QSerialPortInfo &info)
m_currentSerialPort->setStopBits(m_stopBits);
m_currentSerialPort->setFlowControl(m_flowControll);
DEBUG_LOG(m_logger) << "Try opening Comport:" << m_currentSerialPort->portName() << " index is: " << m_currentQuerry;
DEBUG_LOG() << "Try opening Comport:" << m_currentSerialPort->portName() << " index is: " << m_currentQuerry;
if (!m_currentSerialPort->open(QSerialPort::ReadWrite))
{
DEBUG_LOG(m_logger) << "Oppening failed query next";
DEBUG_LOG() << "Oppening failed query next";
continueQuerry();
}else
{
connect(m_currentSerialPort, &QSerialPort::errorOccurred,
this, &LtsSerialPortQuerry::onSerialPortError, Qt::UniqueConnection);
DEBUG_LOG(m_logger) << "Oppened comport" << m_currentSerialPort->portName();
DEBUG_LOG() << "Oppened comport" << m_currentSerialPort->portName();
emit connectionEstablished();
}
}
@@ -111,7 +110,7 @@ void LtsSerialPortQuerry::onSerialPortError(QSerialPort::SerialPortError serialP
if (!m_currentSerialPort)
return;
DEBUG_LOG(m_logger) << "Spontaneous error " << serialPortError << " doesn't have to be an error ...";
DEBUG_LOG() << "Spontaneous error " << serialPortError << " doesn't have to be an error ...";
const QString errStr(QStringLiteral("QSerialPort::SerialPortError ") + QString::number(serialPortError) +
QStringLiteral(" from serial port ") + m_currentSerialPort->portName() +
@@ -130,19 +129,19 @@ void LtsSerialPortQuerry::onSerialPortError(QSerialPort::SerialPortError serialP
case QSerialPort::SerialPortError::NotOpenError:
case QSerialPort::SerialPortError::UnknownError:
{
ERROR_LOG(m_logger) << "Closing port and try to reopen it. " << m_currentSerialPort->portName();
ERROR_LOG() << "Closing port and try to reopen it. " << m_currentSerialPort->portName();
continueQuerry();
Q_FALLTHROUGH();
}
case QSerialPort::SerialPortError::UnsupportedOperationError:
{
ERROR_LOG(m_logger) << errStr;
ERROR_LOG() << errStr;
break;
}
default:
{
ERROR_LOG(m_logger) << "Got an Error> " << errStr << "restarting";
ERROR_LOG() << "Got an Error> " << errStr << "restarting";
continueQuerry();
break;
@@ -1,6 +1,6 @@
#pragma once
#include <LtsSerialPortQuerry/ltsserialportquerry_export.h>
#include "ltsserialportquerry_export.h"
#include "logger.h"
@@ -49,8 +49,6 @@ private:
QSerialPort::Parity m_parity;
QSerialPort::StopBits m_stopBits;
QSerialPort *m_currentSerialPort;
LOGGER_T m_logger;
};
}
@@ -7,7 +7,7 @@
#include "lts_session_data_dds.h"
#include "lts_session_manager.h"
#include <LtsSession/ltssession_export.h>
#include "ltssession_export.h"
#include <LtsWidgets/lts_base.h>
#include <QtCore/qobjectdefs.h>
@@ -1,6 +1,6 @@
#pragma once
#include <LtsSession/ltssessiondata_export.h>
#include "ltssessiondata_export.h"
#include <ProjectConfig/project_defines.h>
#include <LtsAppDescriptor/lts_app_descriptor.h>
@@ -341,7 +341,7 @@ bool LtsSessionDataDds::initInternal()
{
if (!m_ddsConnector || !m_ddsConnector->init(m_qosFileList))
{
ERROR_LOG(m_logger) << "DDS connector could not be initialized - session aborted!";
ERROR_LOG() << "DDS connector could not be initialized - session aborted!";
m_ddsConnector = nullptr;
return false;
}
@@ -11,7 +11,7 @@
#include <NGLLogger/NGLLoggerBootstrap.h>
#include <Common/ProjectConfig/project_defines.h>
#include <LtsSession/ltssessiondatadds_export.h>
#include "ltssessiondatadds_export.h"
namespace DataPluginBase { class Interface; }
@@ -123,7 +123,7 @@ public:
if ( bEnableAll && !member->enableAll())
{
member = nullptr;
ERROR_LOG(m_logger) << "Error initializing dtc/ftc for service " << T::identifier();
ERROR_LOG() << "Error initializing dtc/ftc for service " << T::identifier();
return false;
}
return true;
@@ -138,7 +138,7 @@ public:
{
dtc = nullptr;
ftc = nullptr;
ERROR_LOG(m_logger) << "Error initializing dtc/ftc for service " << T::identifier();
ERROR_LOG() << "Error initializing dtc/ftc for service " << T::identifier();
return false;
}
return true;
@@ -157,7 +157,7 @@ public:
}
}
val.reset();
DEBUG_LOG(m_logger) << "Trying to load dtc " << typeid(T).name() << " - " << typeid(S).name() << " failed!"
DEBUG_LOG() << "Trying to load dtc " << typeid(T).name() << " - " << typeid(S).name() << " failed!"
<< ", m_dataPluginInterfaces.size() = " << m_dataPluginInterfaces.size() << " - " << this;
return false;
}
@@ -176,7 +176,7 @@ public:
}
}
val.reset();
DEBUG_LOG(m_logger) << "Trying to load ftc " << typeid(T).name() << " - " << typeid(S).name() << " failed!"
DEBUG_LOG() << "Trying to load ftc " << typeid(T).name() << " - " << typeid(S).name() << " failed!"
<< ", m_dataPluginInterfaces.size() = " << m_dataPluginInterfaces.size() << " - " << this;
return false;
}
@@ -198,7 +198,7 @@ public:
}
}
val.reset();
DEBUG_LOG(m_logger) << "Trying to load foreign data ifc " << typeid(T).name() << " - " << typeid(S).name() << " failed!"
DEBUG_LOG() << "Trying to load foreign data ifc " << typeid(T).name() << " - " << typeid(S).name() << " failed!"
<< ", m_dataPluginInterfaces.size() = " << m_dataPluginInterfaces.size() << " - " << this;
return false;
}
@@ -220,7 +220,7 @@ public:
return true;
}
val.reset();
DEBUG_LOG(m_logger) << "Trying to load foreign data ifc " << typeid(S).name() << " failed!"
DEBUG_LOG() << "Trying to load foreign data ifc " << typeid(S).name() << " failed!"
<< ", m_guiPluginInterfaces.size() = " << m_guiPluginInterfaces.size() << " - " << this;
return false;
}
@@ -238,7 +238,7 @@ public:
return true;
}
val.reset();
DEBUG_LOG(m_logger) << "Cannot find foreign gui ifc " << typeid(S).name() << " in " << toString();
DEBUG_LOG() << "Cannot find foreign gui ifc " << typeid(S).name() << " in " << toString();
return false;
}
@@ -254,7 +254,7 @@ public:
return true;
}
val.reset();
DEBUG_LOG(m_logger) << "Trying to load foreign gui ifc #2 " << typeid(S).name() << " failed!"
DEBUG_LOG() << "Trying to load foreign gui ifc #2 " << typeid(S).name() << " failed!"
<< ", m_guiPluginInterfaces.size() = " << m_guiPluginInterfaces.size() << " - " << this;
return false;
}
@@ -285,7 +285,6 @@ protected:
QMap<QString, std::shared_ptr<GuiPluginBase::Interface>> m_initializeThesePlugins;
Fetcher *m_fetcher;
QStringList m_qosFileList;
NGL::INGLLogger &m_logger;
};
@@ -306,7 +305,6 @@ public:
bool m_errors;
QString m_caller;
QString m_whatWillNotWork;
NGL::INGLLogger &m_logger;
bool m_optional;
QString m_resultType;
QString m_getterFunctionType;
@@ -337,11 +335,11 @@ public:
if (m_optional)
{
INFO_LOG(m_logger) << msg.arg(m_caller, m_resultType, m_sessionDataDds->toString(), QStringLiteral("' - optional but %1 will not work").arg(m_whatWillNotWork));
INFO_LOG() << msg.arg(m_caller, m_resultType, m_sessionDataDds->toString(), QStringLiteral("' - optional but %1 will not work").arg(m_whatWillNotWork));
}
else
{
ERROR_LOG(m_logger) << msg.arg(m_caller, m_resultType, m_sessionDataDds->toString(), QStringLiteral(" which is required"));
ERROR_LOG() << msg.arg(m_caller, m_resultType, m_sessionDataDds->toString(), QStringLiteral(" which is required"));
}
}
};
@@ -15,42 +15,42 @@ TopicLockHandler::TopicLockHandler()
: QObject()
, m_logger(NGL::NGLLoggerBootstrap::getNGLRootLogger().getNGLLogger("LtsSession.TopicLockHandler"))
{
TRACE_LOG(m_logger) << LOGFUNCTION << " START";
TRACE_LOG(m_logger) << LOGFUNCTION << " END";
TRACE_LOG() << Q_FUNC_INFO << " START";
TRACE_LOG() << Q_FUNC_INFO << " END";
}
TopicLockHandler::~TopicLockHandler()
{
TRACE_LOG(m_logger) << LOGFUNCTION << " START";
TRACE_LOG(m_logger) << LOGFUNCTION << " END";
TRACE_LOG() << Q_FUNC_INFO << " START";
TRACE_LOG() << Q_FUNC_INFO << " END";
}
bool TopicLockHandler::init(const std::shared_ptr<Core::Interface::Ftc> &coreFtc,
int exerciseId)
{
TRACE_LOG(m_logger) << LOGFUNCTION << " START";
TRACE_LOG() << Q_FUNC_INFO << " START";
if (coreFtc == nullptr)
return false;
coreFtc->enableAll();
m_exerciseId = exerciseId;
m_coreFtc = coreFtc;
TRACE_LOG(m_logger) << LOGFUNCTION << " END";
TRACE_LOG() << Q_FUNC_INFO << " END";
return true;
}
bool TopicLockHandler::lock()
{
INFO_LOG(m_logger) << "LOCK " << m_topicInfo.topicName();
TRACE_LOG(m_logger) << LOGFUNCTION << objStateAsString();
INFO_LOG() << "LOCK " << m_topicInfo.topicName();
TRACE_LOG() << Q_FUNC_INFO << objStateAsString();
if (m_coreFtc == nullptr)
return false;
if (m_locked)
{
ERROR_LOG(m_logger) << LOGFUNCTION << ": called lock while still locked! " << m_lockEntityId;
ERROR_LOG() << Q_FUNC_INFO << ": called lock while still locked! " << m_lockEntityId;
Q_ASSERT(false);
return false;
}
@@ -71,13 +71,13 @@ bool TopicLockHandler::lock()
{
const Core::TryLockEntityReply reply(m_coreFtc->tryLockEntityRequest(req));
TRACE_LOG(m_logger) << LOGFUNCTION << ": Reply received - state=" << objStateAsString()
TRACE_LOG() << Q_FUNC_INFO << ": Reply received - state=" << objStateAsString()
<< " - reply=" << reply;
if (reply.alreadyLocked().is_set())
{
const Core::LockEntityError &alreadyLocked = reply.alreadyLocked().get();
INFO_LOG(m_logger) << LOGFUNCTION << ": Topic already locked by ws " << alreadyLocked.workstationName() << " and op " << alreadyLocked.operatorName();
INFO_LOG() << Q_FUNC_INFO << ": Topic already locked by ws " << alreadyLocked.workstationName() << " and op " << alreadyLocked.operatorName();
@@ -88,7 +88,7 @@ bool TopicLockHandler::lock()
}
else
{
DEBUG_LOG(m_logger) << LOGFUNCTION << ": Topic NOT already locked";
DEBUG_LOG() << Q_FUNC_INFO << ": Topic NOT already locked";
Q_ASSERT(reply.id() > 0);
m_locked = true;
@@ -97,7 +97,7 @@ bool TopicLockHandler::lock()
}
catch (const std::runtime_error &err)
{
ERROR_LOG(m_logger) << LOGFUNCTION << ": Failed to lock topic! " << err.what();
ERROR_LOG() << Q_FUNC_INFO << ": Failed to lock topic! " << err.what();
Q_ASSERT(false);
return false;
}
@@ -107,15 +107,15 @@ bool TopicLockHandler::lock()
bool TopicLockHandler::unlock()
{
INFO_LOG(m_logger) << "UNLOCK " << m_topicInfo.topicName() << " - " << m_lockEntityId;
TRACE_LOG(m_logger) << LOGFUNCTION << objStateAsString();
INFO_LOG() << "UNLOCK " << m_topicInfo.topicName() << " - " << m_lockEntityId;
TRACE_LOG() << Q_FUNC_INFO << objStateAsString();
if (m_coreFtc == nullptr)
return false;
if (!m_locked)
{
ERROR_LOG(m_logger) << LOGFUNCTION << ": Tried to unlock while unlocked.. " << objStateAsString();
ERROR_LOG() << Q_FUNC_INFO << ": Tried to unlock while unlocked.. " << objStateAsString();
Q_ASSERT(false);
return false;
}
@@ -132,14 +132,14 @@ bool TopicLockHandler::unlock()
{
const auto reply(m_coreFtc->tryUnlockEntityRequest(req));
TRACE_LOG(m_logger) << LOGFUNCTION << ": Reply received - state=" << objStateAsString()
TRACE_LOG() << Q_FUNC_INFO << ": Reply received - state=" << objStateAsString()
<< " - reply=" << reply;
DEBUG_LOG(m_logger) << LOGFUNCTION << ": Topic unlocked!";
DEBUG_LOG() << Q_FUNC_INFO << ": Topic unlocked!";
}
catch (const std::runtime_error &err)
{
ERROR_LOG(m_logger) << LOGFUNCTION << ": Failed to unlock topic! " << err.what();
ERROR_LOG() << Q_FUNC_INFO << ": Failed to unlock topic! " << err.what();
return false;
}
@@ -168,31 +168,31 @@ std::string TopicLockHandler::objStateAsString() const
bool TopicLockHandler::slotUnlock()
{
TRACE_LOG(m_logger) << LOGFUNCTION << " slotUnlock" << objStateAsString();
TRACE_LOG() << Q_FUNC_INFO << " slotUnlock" << objStateAsString();
return unlock();
}
void TopicLockHandler::slotTryLock(const LtsWidgets::TopicInfo &topicInfo)
{
TRACE_LOG(m_logger) << LOGFUNCTION << " START " << objStateAsString();
TRACE_LOG() << Q_FUNC_INFO << " START " << objStateAsString();
m_topicInfo = topicInfo;
if (m_topicInfo.topicName().isEmpty() || !topicInfo.isValid())
{
DEBUG_LOG(m_logger) << LOGFUNCTION << " no lockable topic, that's okay";
DEBUG_LOG() << Q_FUNC_INFO << " no lockable topic, that's okay";
return;
}
lock();
TRACE_LOG(m_logger) << LOGFUNCTION << " END " << objStateAsString();
TRACE_LOG() << Q_FUNC_INFO << " END " << objStateAsString();
}
void TopicLockHandler::slotFinalize()
{
TRACE_LOG(m_logger) << LOGFUNCTION << " START " << objStateAsString();
TRACE_LOG() << Q_FUNC_INFO << " START " << objStateAsString();
if (m_locked)
{
@@ -201,7 +201,7 @@ void TopicLockHandler::slotFinalize()
deleteLater();
TRACE_LOG(m_logger) << LOGFUNCTION << " END " << objStateAsString();
TRACE_LOG() << Q_FUNC_INFO << " END " << objStateAsString();
}
@@ -1,7 +1,7 @@
#pragma once
#include <QObject>
#include <LtsSession/ltssession_export.h>
#include "ltssession_export.h"
#include <LtsWidgets/lts_dialog.h>
#include <DDS/Core/core_ftc.h>
@@ -51,8 +51,6 @@ private:
bool m_locked{false};
bool m_askedForLock{false};
bool m_deleteAfterAnswer{false};
NGL::INGLLogger &m_logger;
};
@@ -108,7 +108,7 @@ LtsSession *LtsSessionManager::createSession(const DdsConnectionParams &connPara
if (session != nullptr)
{
WARNING_LOG(m_logger) << "Tried to create a Session that already exists";
WARNING_LOG() << "Tried to create a Session that already exists";
return nullptr;
}
@@ -140,7 +140,7 @@ LtsSession *LtsSessionManager::createSession(const DdsConnectionParams &connPara
return;
}
WARNING_LOG(m_logger) << "Previously deleted Session " << session->partitionId() << "/"
WARNING_LOG() << "Previously deleted Session " << session->partitionId() << "/"
<< session->partitionType() << " is still alive!";
});
#endif
Loaded 100 of 2785 files, more files were not shown because too many files have changed in this diff. Show more