/** * @RDE_HEADER@ * DDS specific parts for a session * $Id$ * $HeadURL$ * $Author$ * * Created by Christian Ehrlicher, SLSE, 2017-02-27 */ #pragma once // Stub implementation when BUILD_RTI=OFF - NOT SUPPORTED ANYMORE // RTI Connext DDS is required but not yet integrated in build // This file provides minimal stub to allow compilation #include #include #include #include #include namespace LtsSession { // Stub enum for PartitionType enum class PartitionType { Any = 0, Exercise, Replay }; struct DdsConnectionParams { int domainId = -1; int partitionId = 0; int exerciseId = 0; PartitionType partitionType = PartitionType::Any; QUrl tcpConnectionUrl; QStringList qos_file; DdsConnectionParams() = default; bool isValid() const { return domainId >= 0 && partitionType != PartitionType::Any; } bool operator==(const DdsConnectionParams& o) const { return domainId == o.domainId && partitionId == o.partitionId && exerciseId == o.exerciseId && qos_file == o.qos_file && partitionType == o.partitionType && tcpConnectionUrl == o.tcpConnectionUrl; } bool operator!=(const DdsConnectionParams& o) const { return !operator==(o); } bool operator<(const DdsConnectionParams& o) const { if (domainId != o.domainId) return domainId < o.domainId; if (partitionId != o.partitionId) return partitionId < o.partitionId; if (exerciseId != o.exerciseId) return exerciseId < o.exerciseId; if (qos_file != o.qos_file) return qos_file < o.qos_file; if (partitionType != o.partitionType) return partitionType < o.partitionType; return tcpConnectionUrl.toString() < o.tcpConnectionUrl.toString(); } }; // Stub base class - inherits QObject for compatibility class LtsSessionDataDds : public QObject { Q_OBJECT protected: explicit LtsSessionDataDds(QObject* parent = nullptr) : QObject(parent) {} public: ~LtsSessionDataDds() = default; int domainId() const { return -1; } int exerciseId() const { return 0; } int partitionId() const { return 0; } QStringList qosFile() const { return QStringList(); } PartitionType partitionType() const { return PartitionType::Any; } static QString partitionTypeString(PartitionType partitionType) { return QString::number(static_cast(partitionType)); } bool isExercisePartition() const { return false; } bool isReplayPartition() const { return false; } QString toString() const { return QStringLiteral("LtsSessionDataDds(stub)"); } qint64 partitionTime() const { return 0; } signals: void partitionTimeChanged(qint64 newPartitionTime); void partitionTimeChangedInternal(); }; } // namespace LtsSession