Major Changes:
- Merged latest Qt5 devel content from dlbo (292 files changed, 7 new dirs)
- Consolidated forward-declarations and include folders
- Removed unneeded modules per Niklas' repo check list
Build System Fixes:
- Fixed CMake VERSION_GREATER syntax in ParticipantManagement/CMakeLists.txt
- Added VLC packages (libvlc-dev, vlc-plugin-base) to docker_build.sh
- Added PostgreSQL dev packages (libpq-dev, postgresql-server-dev-all) to Dockerfile
- Fixed locale warnings (ANSI_X3.4-1968 → C.UTF-8)
- Fixed ArcGIS SDK path warnings when BUILD_ARCGIS=OFF
Code Generation Fixes:
- Fixed IDL enum collisions (PortType→CorePortType/DdsutPortType, PdmEventType)
- Fixed Grantlee template svc_translation.cpp.grantlee:
- Changed {{ idl_enum.name }}_def:: to {{ idl_enum.name }}::
- Fixed .underlying() calls for C++11 scoped enums (enum class)
- Removed generated files from repo (moc_*, *_dtc.h, *_ftc.h)
Validation:
- BUILD_RTI=ON: SUCCESS
- BUILD_RTI=OFF: SUCCESS
- C++17 standard maintained for RTI 7.7 compatibility
- Ubuntu 26.04 Docker environment verified
Remaining Warnings (expected):
- BgViewer, KDChart, KDReports, Poppler-Qt6 not found (optional features)
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
71 lines
2.0 KiB
C++
71 lines
2.0 KiB
C++
#pragma once
|
|
|
|
#include <QProcess>
|
|
#include <QJsonDocument>
|
|
#include <QJsonObject>
|
|
#include <ParticipantManagement/ppm_enums.hpp>
|
|
|
|
namespace SAAUtils
|
|
{
|
|
|
|
struct PingItem
|
|
{
|
|
int assetId = -1;
|
|
QString host;
|
|
int port;
|
|
QProcess *process = nullptr;
|
|
bool reachable = false;
|
|
bool connected = false;
|
|
};
|
|
|
|
struct AsmAssetProps
|
|
{
|
|
AsmAssetProps(const QString &properties)
|
|
{
|
|
if (properties.isEmpty())
|
|
return;
|
|
const QJsonObject propObj = QJsonDocument::fromJson(properties.toUtf8()).object();
|
|
if (propObj.contains(QStringLiteral("credentials")) )
|
|
{
|
|
const QJsonObject adlerObj = propObj[QStringLiteral("credentials")].toObject();
|
|
exId = propObj.value(QStringLiteral("exerciseId")).toInt(-1);
|
|
userName = adlerObj.value(QStringLiteral("username")).toString();
|
|
password = adlerObj.value(QStringLiteral("password")).toString();
|
|
host = adlerObj.value(QStringLiteral("host")).toString();
|
|
port = adlerObj.value(QStringLiteral("port")).toInt(-1);
|
|
}
|
|
|
|
}
|
|
bool hasCredential() const { return (!userName.isEmpty() && !password.isEmpty()); }
|
|
bool hasExerciseId() const { return exId > 0;}
|
|
QString userName;
|
|
QString password;
|
|
QString host;
|
|
int port=-1;
|
|
int exId = -1;
|
|
};
|
|
|
|
struct SaaProps
|
|
{
|
|
SaaProps(const QString &properties)
|
|
{
|
|
if ( properties.isEmpty())
|
|
return;
|
|
const QJsonObject propertiesObj = QJsonDocument::fromJson(properties.toUtf8()).object();
|
|
if (!propertiesObj.contains(QStringLiteral("Adler")) )
|
|
return;
|
|
const QJsonObject adlerObj = propertiesObj[QStringLiteral("Adler")].toObject();
|
|
isConnected = (adlerObj.value(QStringLiteral("saaConnectedState")).toInt() == ParticipantManagement::ConnectState::Connected);
|
|
name = adlerObj.value(QStringLiteral("SaaName")).toString(QStringLiteral(""));
|
|
assetId = adlerObj.value(QStringLiteral("assetId")).toInt(-1);
|
|
}
|
|
bool hasAsset() const { return assetId > 0; }
|
|
QString name;
|
|
QString ipAdress;
|
|
int assetId = -1;
|
|
bool isConnected = false;
|
|
};
|
|
|
|
|
|
} // namespace SAAUtils
|