Migrates residual Lts sources to generated rtiddsgen API
Adds NmeaManagement tests, fixes codegen includes and Qt6 SerialPort CMake target.
This commit is contained in:
1 parent
5485a90385
commit
881d44f4dd
512 files changed
+6887
-6426
No files matched your search
+35
-35
@@ -66,53 +66,53 @@ bool HandlerBuildingData::init()
|
||||
// ///////////////////////////////////
|
||||
void HandlerBuildingData::onMainStructureElementChanged(const InfrastructureManagement::MainStructureElement &data, DataModification modType)
|
||||
{
|
||||
INFO_LOG(m_logger) << "HandlerBuildingData::onMainStructureElementChanged() id=" << data.id();
|
||||
INFO_LOG(m_logger) << "HandlerBuildingData::onMainStructureElementChanged() id=" << data.id;
|
||||
if (modType == DataModification::eRemoved
|
||||
|| !m_ddsHandler->dtcIsm()->isElementAssignedToExercise(data, m_ddsHandler->getExerciseId()))
|
||||
{
|
||||
INFO_LOG(m_logger) << "HandlerBuildingData::onMainStructureElementChanged() id=" << data.id() << " remove";
|
||||
m_mainStructureElements.remove(data.id());
|
||||
m_footprints.remove(data.id());
|
||||
INFO_LOG(m_logger) << "HandlerBuildingData::onMainStructureElementChanged() id=" << data.id << " remove";
|
||||
m_mainStructureElements.remove(data.id);
|
||||
m_footprints.remove(data.id);
|
||||
return;
|
||||
}
|
||||
|
||||
m_mainStructureElements.insert(data.id(), data);
|
||||
m_mainStructureElements.insert(data.id, data);
|
||||
DEBUG_LOG(m_logger) << "Got MainStructureElement: " << data;
|
||||
for (const InfrastructureManagement::StructureElement &ele : qAsConst(data.elements()))
|
||||
for (const InfrastructureManagement::StructureElement &ele : qAsConst(data.elements))
|
||||
{
|
||||
if (ele.structureElementTypeId() == InfrastructureManagement::StructureElementType_def::Room)
|
||||
if (ele.structureElementTypeId == InfrastructureManagement::StructureElementType::Room)
|
||||
{
|
||||
const std::vector<int32_t> &path = ele.path();
|
||||
const std::vector<int32_t> &path = ele.path;
|
||||
if (path.size() < 3)
|
||||
continue;
|
||||
const int structureElementId = path.at(0);
|
||||
const int floorId = path.at(1);
|
||||
const int roomId = path.at(2);
|
||||
DEBUG_LOG(m_logger) << "ele.id=" << ele.id() << " name =" << ele.name()
|
||||
<< " ele.StructureElementType=" << ele.structureElementTypeId()
|
||||
DEBUG_LOG(m_logger) << "ele.id=" << ele.id << " name =" << ele.name
|
||||
<< " ele.StructureElementType=" << ele.structureElementTypeId
|
||||
<< " buildingId = " << structureElementId
|
||||
<< " floorId =" << floorId
|
||||
<< " roomId = " << roomId;
|
||||
m_floorRoom.insert(roomId, floorId);
|
||||
m_structureElementToFloor.insert(floorId, structureElementId);
|
||||
m_buildingFloor.insert(floorId, data.id());
|
||||
m_buildingFloor.insert(floorId, data.id);
|
||||
}
|
||||
// get assetPositions
|
||||
{
|
||||
if (ele.mountingPointTypeId() == InfrastructureManagement::MountingPointType::EffectGenerationControlUnit)
|
||||
if (ele.mountingPointTypeId == InfrastructureManagement::MountingPointType::EffectGenerationControlUnit)
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "EGCU id=" << ele.id()
|
||||
<< " displayName=" << ele.displayName()
|
||||
<< " name=" << ele.name()
|
||||
<< " type=" << ele.mountingPointTypeId();
|
||||
DEBUG_LOG(m_logger) << "EGCU id=" << ele.id
|
||||
<< " displayName=" << ele.displayName
|
||||
<< " name=" << ele.name
|
||||
<< " type=" << ele.mountingPointTypeId;
|
||||
AssetPosition assetPosition;
|
||||
assetPosition.structureElementId = ele.id();
|
||||
assetPosition.mountingPointType = ele.mountingPointTypeId();
|
||||
assetPosition.relPosition = ele.relPosition();
|
||||
assetPosition.geoPosition = ele.geoPosition();
|
||||
assetPosition.structureElementId = ele.id;
|
||||
assetPosition.mountingPointType = ele.mountingPointTypeId;
|
||||
assetPosition.relPosition = ele.relPosition;
|
||||
assetPosition.geoPosition = ele.geoPosition;
|
||||
const QPointF &posUtm = CentralEffectSimulation::geographic2Utm(assetPosition.geoPosition, m_zone);
|
||||
qreal x = posUtm.x() + assetPosition.relPosition.offsetX();
|
||||
qreal y = posUtm.y() + assetPosition.relPosition.offsetY();
|
||||
qreal x = posUtm.x() + assetPosition.relPosition.offsetX;
|
||||
qreal y = posUtm.y() + assetPosition.relPosition.offsetY;
|
||||
const QPointF posAssetUtm(x, y);
|
||||
assetPosition.positionUtm = posAssetUtm;
|
||||
assetPosition.zone = m_zone;
|
||||
@@ -140,11 +140,11 @@ void HandlerBuildingData::onMountingPointAssetChanged(const InfrastructureManage
|
||||
if (modType == DataModification::eRemoved)
|
||||
return;
|
||||
|
||||
DEBUG_LOG(m_logger) << "onMountingPointAssetChanged id=" << data.id()
|
||||
<< " assetId=" << data.assetId()
|
||||
<< " structureElementId=" << data.structureElementId();
|
||||
m_mountingPointAsset.insert(data.structureElementId(), m_assetMountingPoint.value(data.assetId()));
|
||||
m_assetMountingPoint.insert(data.assetId(), data.structureElementId());
|
||||
DEBUG_LOG(m_logger) << "onMountingPointAssetChanged id=" << data.id
|
||||
<< " assetId=" << data.assetId
|
||||
<< " structureElementId=" << data.structureElementId;
|
||||
m_mountingPointAsset.insert(data.structureElementId, m_assetMountingPoint.value(data.assetId));
|
||||
m_assetMountingPoint.insert(data.assetId, data.structureElementId);
|
||||
}
|
||||
|
||||
void HandlerBuildingData::onInstrumentationAssetChanged(const InfrastructureManagement::InstrumentationAsset &data, DataModification modType)
|
||||
@@ -152,15 +152,15 @@ void HandlerBuildingData::onInstrumentationAssetChanged(const InfrastructureMana
|
||||
if (modType == DataModification::eRemoved)
|
||||
return;
|
||||
|
||||
if (data.mountingPointTypeId() == InfrastructureManagement::MountingPointType::EffectGenerationControlUnit)
|
||||
if (data.mountingPointTypeId == InfrastructureManagement::MountingPointType::EffectGenerationControlUnit)
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "onInstrumentationAssetChanged id=" << data.id()
|
||||
<< " hostname=" << data.hostname();
|
||||
QString hostname = QString::fromStdString(data.hostname());
|
||||
m_instrumentationAssets.insert(data.id(), hostname);
|
||||
if (m_assetMountingPoint.contains(data.id()))
|
||||
DEBUG_LOG(m_logger) << "onInstrumentationAssetChanged id=" << data.id
|
||||
<< " hostname=" << data.hostname;
|
||||
QString hostname = QString::fromStdString(data.hostname);
|
||||
m_instrumentationAssets.insert(data.id, hostname);
|
||||
if (m_assetMountingPoint.contains(data.id))
|
||||
{
|
||||
int assetId = data.id();
|
||||
int assetId = data.id;
|
||||
int mountpointId = m_assetMountingPoint.value(assetId);
|
||||
DEBUG_LOG(m_logger) << "m_instrumentationAsset.contains(" << assetId << ")"
|
||||
<< " assetId=" << assetId
|
||||
@@ -169,7 +169,7 @@ void HandlerBuildingData::onInstrumentationAssetChanged(const InfrastructureMana
|
||||
{
|
||||
AssetPosition assetPosition = m_assetPositions.value(mountpointId);
|
||||
assetPosition.hostname = hostname;
|
||||
assetPosition.mountingPointType = data.mountingPointTypeId();
|
||||
assetPosition.mountingPointType = data.mountingPointTypeId;
|
||||
m_assetPositions.insert(assetPosition.structureElementId, assetPosition);
|
||||
DEBUG_LOG(m_logger) << "m_assetPositions.insert assetPosition structureElementId= " << assetPosition.structureElementId
|
||||
<< " type=" << assetPosition.mountingPointType
|
||||
|
||||
Reference in new issue
Block a user