Resolves latest issues in Lts/Common Lts/DDS
This commit is contained in:
25 files changed
+537
-47
No files matched your search
@@ -13,12 +13,37 @@
|
||||
#ifdef BUILD_RTI
|
||||
#include <DDS/DDSConnector/dds_connector.h>
|
||||
#include <DDS/DTC/generic_dtc_impl.h>
|
||||
#include <DDS/QosProfile/DDS_DefaultQos>
|
||||
#include <DDS/QosProfile/DDS_DefaultQos.h>
|
||||
#include <Lts/Common/ProjectConfig/project_defines.h>
|
||||
#include <NGLLogger/NGLLoggerBootstrap.h>
|
||||
#include <QtCore/QDebug>
|
||||
#include <QtCore/QSet>
|
||||
#include <QtCore/QVector>
|
||||
|
||||
namespace
|
||||
{
|
||||
// Convert LtsSession::PartitionType to IDL::PartitionType
|
||||
IDL::PartitionType toIdlPartitionType(LtsSession::PartitionType type)
|
||||
{
|
||||
switch (type)
|
||||
{
|
||||
case LtsSession::PartitionType::Any:
|
||||
return IDL::PartitionType::Any;
|
||||
case LtsSession::PartitionType::Global:
|
||||
return IDL::PartitionType::Global;
|
||||
case LtsSession::PartitionType::Exercise:
|
||||
return IDL::PartitionType::Exercise;
|
||||
case LtsSession::PartitionType::AllExercises:
|
||||
return IDL::PartitionType::AllExercises;
|
||||
case LtsSession::PartitionType::Replay:
|
||||
return IDL::PartitionType::Replay;
|
||||
case LtsSession::PartitionType::Invalid:
|
||||
default:
|
||||
return IDL::PartitionType::Any;
|
||||
}
|
||||
}
|
||||
} // namespace
|
||||
|
||||
namespace LtsSession
|
||||
{
|
||||
/**
|
||||
@@ -217,7 +242,7 @@ bool LtsSessionDataDds::init(const DdsConnectionParams& connParams)
|
||||
#endif
|
||||
|
||||
m_ddsConnector = std::make_shared<DDSConnector::DdsConnector>(
|
||||
connParams.domainId, connParams.partitionType, connParams.partitionId,
|
||||
connParams.domainId, toIdlPartitionType(connParams.partitionType), connParams.partitionId,
|
||||
connParams.exerciseId, // same as partition Id in live but not in replay
|
||||
type);
|
||||
s_ddsConnections()->insertConnection(connParams, m_ddsConnector);
|
||||
@@ -252,7 +277,7 @@ bool LtsSessionDataDds::init(const dds::domain::DomainParticipant& dp, const Dds
|
||||
if (m_ddsConnector == nullptr)
|
||||
{
|
||||
m_ddsConnector =
|
||||
std::make_shared<DDSConnector::DdsConnector>(dp, connParams.partitionType, type, connParams.partitionId);
|
||||
std::make_shared<DDSConnector::DdsConnector>(dp, toIdlPartitionType(connParams.partitionType), type, connParams.partitionId);
|
||||
|
||||
s_ddsConnections()->insertConnection(connParams, m_ddsConnector);
|
||||
}
|
||||
@@ -286,6 +311,19 @@ QString LtsSessionDataDds::partitionTypeString(PartitionType partitionType)
|
||||
return QStringLiteral("Invalid (%1)").arg(int(partitionType));
|
||||
}
|
||||
|
||||
LtsSession::PartitionType LtsSessionDataDds::toPartitionType(IDL::PartitionType idlType)
|
||||
{
|
||||
switch (idlType)
|
||||
{
|
||||
case IDL::PartitionType::Any: return PartitionType::Any;
|
||||
case IDL::PartitionType::Exercise: return PartitionType::Exercise;
|
||||
case IDL::PartitionType::Replay: return PartitionType::Replay;
|
||||
case IDL::PartitionType::AllExercises: return PartitionType::AllExercises;
|
||||
case IDL::PartitionType::Global: return PartitionType::Global;
|
||||
default: return PartitionType::Invalid;
|
||||
}
|
||||
}
|
||||
|
||||
QString LtsSessionDataDds::toString() const
|
||||
{
|
||||
return QStringLiteral("(LtsSessionDataDds: id=%1, partitionId=%2, partitionType=%3(%4), exerciseId=%5)")
|
||||
@@ -313,7 +351,7 @@ int LtsSessionDataDds::partitionId() const
|
||||
|
||||
PartitionType LtsSessionDataDds::partitionType() const
|
||||
{
|
||||
return m_ddsConnector ? m_ddsConnector->getPartitionType() : PartitionType::Global;
|
||||
return m_ddsConnector ? toPartitionType(m_ddsConnector->getPartitionType()) : PartitionType::Global;
|
||||
}
|
||||
|
||||
QStringList LtsSessionDataDds::qosFile() const
|
||||
|
||||
Reference in new issue
Block a user