- Updated all include/*/*_dtc.h stub headers to include generated files
from build4/Lts/Proxies/*/ directories
- Changed ParticipantManagement stub headers to use generated files
- Updated ProjectDataManagement pdm_enums.hpp to include generated file
- Updated Buildings bld_dtc.h to include generated file
- Created BUILD_STATUS_REPORT.md documenting current build state
Migration Status:
- DDS core libraries: ✅ Building successfully (6 libraries)
- Proxies module code: ✅ Migration complete
- Services modules: ⚠️ Pre-existing errors blocking full build
- ParticipantManagement: Type definition mismatches
- InfrastructureManagement: Struct/member mismatches
- ProjectDataManagement: DTC implementation errors
These Services errors are unrelated to Qt6 migration work and require
separate fixes. Once resolved, Proxies module will build automatically.
(cherry picked from commit 5501d1e501)
182 lines
4.6 KiB
C++
182 lines
4.6 KiB
C++
#pragma once
|
|
// STUB-HEADER: Diese Datei wird normalerweise von DDS generiert
|
|
// Für die Migration erstellen wir minimale Typ-Definitionen
|
|
|
|
#include <ParticipantManagement/ppm_enums.hpp>
|
|
|
|
#include <QtCore/QObject>
|
|
#include <QtCore/QString>
|
|
#include <QtCore/QList>
|
|
#include <QtCore/QMap>
|
|
#include <functional>
|
|
#include <memory>
|
|
#include <ostream>
|
|
|
|
namespace ParticipantManagement
|
|
{
|
|
|
|
// Type - Struct mit id und typeClass (nicht nur Alias!)
|
|
struct Type {
|
|
int id = 0;
|
|
TypeClass typeClass = TypeClass::eUninitialized;
|
|
|
|
// Helper methods für Kompatibilität (andere Namen als Member!)
|
|
int getId() const { return id; }
|
|
TypeClass getTypeClass() const { return typeClass; }
|
|
};
|
|
|
|
// Participant - Basisdaten eines Teilnehmers
|
|
struct Participant {
|
|
int m_id = 0;
|
|
QString internalName;
|
|
QString externalName;
|
|
int typeId = 0;
|
|
int partyId = 0;
|
|
bool isVerbund = false;
|
|
int superiorId = 0;
|
|
|
|
// Additional fields as needed
|
|
double x = 0.0;
|
|
double y = 0.0;
|
|
double z = 0.0;
|
|
double heading = 0.0;
|
|
|
|
// Optional fields (für DDS-Kompatibilität)
|
|
std::optional<int> equipmentNumber;
|
|
QString m_designator;
|
|
QString m_tacticalIdentifier;
|
|
|
|
// Helper methods
|
|
QString name() const { return internalName; }
|
|
QString designator() const { return m_designator; }
|
|
QString tacticalIdentifier() const { return m_tacticalIdentifier; }
|
|
std::optional<int> getEquipmentNumber() const { return equipmentNumber; }
|
|
int id() const { return m_id; }
|
|
};
|
|
|
|
// Party - Gruppe/Organisation von Teilnehmern
|
|
struct Party {
|
|
int id = 0;
|
|
QString name;
|
|
QString shortName;
|
|
int color() const { return 0xFF000000; } // Default schwarz als QRgb
|
|
};
|
|
|
|
// ParticipantPosition - Position eines Teilnehmers
|
|
struct ParticipantPosition {
|
|
int participantId = 0;
|
|
double x = 0.0;
|
|
double y = 0.0;
|
|
double z = 0.0;
|
|
double heading = 0.0;
|
|
double speed = 0.0;
|
|
qint64 timestamp = 0;
|
|
};
|
|
|
|
// DynamicParticipantData - Dynamische Teilnehmerdaten
|
|
struct DynamicParticipantData {
|
|
int participantId = 0;
|
|
QString status;
|
|
QString role;
|
|
qint64 lastUpdate = 0;
|
|
};
|
|
|
|
// MainSchedule - Stub für DDS-generierten Typ
|
|
struct MainSchedule {
|
|
int32_t id = 0;
|
|
QString name;
|
|
QString description;
|
|
qint64 startTime = 0;
|
|
qint64 endTime = 0;
|
|
bool isActive = false;
|
|
};
|
|
|
|
namespace Interface
|
|
{
|
|
|
|
// Using-Declaration für DataModification aus Parent-Namespace
|
|
using ParticipantManagement::DataModification;
|
|
|
|
// Dtc - Data Transfer Component für Participant Management
|
|
// DDS-generierte Klasse mit participantChanged Signal
|
|
class Dtc : public QObject {
|
|
Q_OBJECT
|
|
|
|
public:
|
|
Dtc() = default;
|
|
~Dtc() override = default;
|
|
|
|
// Teilnehmer-Liste abrufen (Callback-basiert wie im Original)
|
|
void participants(const std::function<void(const Participant&)>& callback) const {
|
|
for (const auto& p : m_participants) {
|
|
callback(p);
|
|
}
|
|
}
|
|
|
|
// Teilnehmer-Liste als QList (für direkten Zugriff)
|
|
QList<Participant> participantsList() const { return m_participants; }
|
|
|
|
// Teilnehmer hinzufügen/entfernen/ändern
|
|
void addParticipant(const Participant& p) {
|
|
m_participants.append(p);
|
|
emit participantChanged(p, DataModification::eAdded);
|
|
}
|
|
|
|
void updateParticipant(const Participant& p) {
|
|
for (auto& existing : m_participants) {
|
|
if (existing.m_id == p.m_id) {
|
|
existing = p;
|
|
emit participantChanged(p, DataModification::eModified);
|
|
return;
|
|
}
|
|
}
|
|
addParticipant(p);
|
|
}
|
|
|
|
void removeParticipant(int id) {
|
|
for (auto it = m_participants.begin(); it != m_participants.end(); ++it) {
|
|
if (it->m_id == id) {
|
|
Participant removed = *it;
|
|
m_participants.erase(it);
|
|
emit participantChanged(removed, DataModification::eRemoved);
|
|
return;
|
|
}
|
|
}
|
|
}
|
|
|
|
// Hierarchy-Methoden (STUB)
|
|
QString hierarchyFromParticipant(int participantId) const {
|
|
Q_UNUSED(participantId);
|
|
return QString();
|
|
}
|
|
|
|
// Party-Methoden (STUB)
|
|
Party party(int partyId) const {
|
|
Q_UNUSED(partyId);
|
|
return Party();
|
|
}
|
|
|
|
signals:
|
|
// Signal für Teilnehmer-Änderungen
|
|
void participantChanged(const Participant& participant, DataModification modificationType);
|
|
|
|
private:
|
|
QList<Participant> m_participants;
|
|
QMap<int, QString> m_hierarchies;
|
|
QMap<int, Party> m_parties;
|
|
};
|
|
|
|
} // namespace Interface
|
|
|
|
// Stream operator for logging
|
|
inline std::ostream& operator<<(std::ostream& os, const Type& t) {
|
|
os << "Type(id=" << t.id << ", typeClass=" << t.typeClass << ")";
|
|
return os;
|
|
}
|
|
|
|
inline std::ostream& operator<<(std::ostream& os, const Participant& p) {
|
|
os << "Participant(id=" << p.m_id << ", name=" << p.name().toStdString() << ")";
|
|
return os;
|
|
}
|
|
|
|
} // namespace ParticipantManagement
|