130 lines
3.8 KiB
C++
130 lines
3.8 KiB
C++
#pragma once
|
|
|
|
// STUB-HEADER: Diese Datei wird normalerweise von ddsdtc generiert
|
|
// Für die Migration erstellen wir minimale Implementierungen
|
|
|
|
#include <QtCore/QObject>
|
|
#include <QtCore/QMap>
|
|
#include <QtCore/QHash>
|
|
#include <functional>
|
|
#include "ism.hpp"
|
|
#include "ism_mounting_point.h"
|
|
|
|
namespace InfrastructureManagement
|
|
{
|
|
namespace Interface
|
|
{
|
|
|
|
// Forward declarations
|
|
class Dtc;
|
|
class Ftc;
|
|
|
|
// DataModification Enum
|
|
enum class DataModification
|
|
{
|
|
eAdded,
|
|
eModified,
|
|
eRemoved
|
|
};
|
|
|
|
// MountingPointPlan - Planungsdaten für MountingPoints (MUST come before MainSchedule)
|
|
class MountingPointPlan {
|
|
public:
|
|
MountingPointPlan() : structureElementId_(0) {}
|
|
int32_t structureElementId() const { return structureElementId_; }
|
|
void structureElementId(int32_t v) { structureElementId_ = v; }
|
|
|
|
MountingPointState mountingPointState() const { return mountingPointState_; }
|
|
void mountingPointState(const MountingPointState& v) { mountingPointState_ = v; }
|
|
|
|
private:
|
|
int32_t structureElementId_;
|
|
MountingPointState mountingPointState_;
|
|
};
|
|
|
|
// MainSchedule - benötigt für Schedule-Daten
|
|
class MainSchedule {
|
|
public:
|
|
MainSchedule() : id_(0) {}
|
|
int32_t id() const { return id_; }
|
|
void id(int32_t v) { id_ = v; }
|
|
|
|
// elements() returns vector of MountingPointPlan
|
|
const std::vector<MountingPointPlan>& elements() const { return elements_; }
|
|
void elements(const std::vector<MountingPointPlan>& v) { elements_ = v; }
|
|
|
|
private:
|
|
int32_t id_;
|
|
std::vector<MountingPointPlan> elements_;
|
|
};
|
|
|
|
// InstrumentationAssetState Enum
|
|
enum class InstrumentationAssetState
|
|
{
|
|
Undefined = 0,
|
|
Ok = 1,
|
|
Defect = 2
|
|
};
|
|
|
|
// InstrumentationAsset - Asset-Daten
|
|
class InstrumentationAsset {
|
|
public:
|
|
InstrumentationAsset() : assetId_(0), assetStateId_(InstrumentationAssetState::Undefined) {}
|
|
int32_t assetId() const { return assetId_; }
|
|
void assetId(int32_t v) { assetId_ = v; }
|
|
|
|
InstrumentationAssetState assetStateId() const { return assetStateId_; }
|
|
void assetStateId(InstrumentationAssetState v) { assetStateId_ = v; }
|
|
|
|
private:
|
|
int32_t assetId_;
|
|
InstrumentationAssetState assetStateId_;
|
|
};
|
|
|
|
// Dtc - Data Transfer Component (Hauptklasse für ISM-Daten)
|
|
class Dtc : public QObject
|
|
{
|
|
Q_OBJECT
|
|
|
|
public:
|
|
Dtc(QObject* parent = nullptr) : QObject(parent) {}
|
|
~Dtc() override = default;
|
|
|
|
// MainStructureElement Zugriff
|
|
virtual const QMap<qint32, MainStructureElement>& mainStructureElements() const = 0;
|
|
virtual MainStructureElement mainStructureElement(int32_t id) const = 0;
|
|
virtual bool getStructureElementById(int32_t id, StructureElement& out) const = 0;
|
|
virtual void waitForHistoricalDataMainStructureElement(int timeoutMs) = 0;
|
|
|
|
// MainSchedule Zugriff
|
|
virtual const QMap<qint32, MainSchedule>& mainSchedules() const = 0;
|
|
virtual MainSchedule mainSchedule(int32_t id) const = 0;
|
|
virtual void waitForHistoricalDataMainSchedule(int timeoutMs) = 0;
|
|
|
|
// MountingPointAsset Zugriff
|
|
virtual void mountingPointAssets(const std::function<void(const MountingPointAsset&)>& cb) = 0;
|
|
virtual void waitForHistoricalDataMountingPointAsset(int timeoutMs) = 0;
|
|
virtual InstrumentationAsset instrumentationAsset(int32_t assetId) const = 0;
|
|
|
|
// MainFootprint Zugriff (wird in ism_dtc_impl_custom_p.h verwendet)
|
|
virtual MainFootprint mainFootprint(int mseId) const = 0;
|
|
|
|
signals:
|
|
void mainStructureElementChanged(const MainStructureElement& data, DataModification modType);
|
|
void mainScheduleChanged(const MainSchedule& data, DataModification modType);
|
|
void mountingPointAssetChanged(const MountingPointAsset& data, DataModification modType);
|
|
};
|
|
|
|
// Ftc - Forward Declaration (wird später implementiert)
|
|
class Ftc : public QObject
|
|
{
|
|
Q_OBJECT
|
|
|
|
public:
|
|
Ftc(QObject* parent = nullptr) : QObject(parent) {}
|
|
~Ftc() override = default;
|
|
};
|
|
|
|
} // namespace Interface
|
|
} // namespace InfrastructureManagement
|