Migrates AreaEffectSimulation to generated rtiddsgen API

Converts accessor calls to plain member access across aes service and plugin.
This commit is contained in:
berrux-dev committed 2026-09-21 02:45:07 +02:00
1 parent e8d07af320
commit 472f537313
102 files changed
+3307 -3313

No files matched your search

@@ -139,8 +139,8 @@ void ObjectBCContamination::onUpdateWeatherData()
else
md = m_mainHandler->meteoData()->getStaticWeather();
if (qFuzzyCompare(md.windDirection(), fmod(m_data.propagationDirection + 180.0, 360.0)) &&
qFuzzyCompare(md.windSpeed(), m_data.windSpeed))
if (qFuzzyCompare(md.windDirection, fmod(m_data.propagationDirection + 180.0, 360.0)) &&
qFuzzyCompare(md.windSpeed, m_data.windSpeed))
{
DEBUG_LOG(m_logger) << id() << " weather for " << m_typeName
<< " did not change - no need to publish new data";
@@ -148,8 +148,8 @@ void ObjectBCContamination::onUpdateWeatherData()
}
DEBUG_LOG(m_logger) << id() << " updating weather for " << m_typeName;
m_data.propagationDirection = fmod(md.windDirection() + 180.0, 360.0);
m_data.windSpeed = md.windSpeed();
m_data.propagationDirection = fmod(md.windDirection + 180.0, 360.0);
m_data.windSpeed = md.windSpeed;
m_data.weatherTimestamp = partitionTime() > m_data.effectStart ? partitionTime() : m_data.effectStart;
m_data.weatherPosition = curCenterPointGeographic;
m_publishDataTimer->start();
@@ -217,26 +217,26 @@ void ObjectBCContamination::publishAiv()
const QRectF bounds(poly.boundingRect());
AesItemView aiv(m_aiv);
aiv.aesItemId(m_data.id);
aiv.effectStart(toMSec(m_data.effectStart));
aiv.chargeStruct().chargeTypeId(m_data.chargeTypeId);
ddsVecFromPoly(poly, aiv.form());
aiv.boundingBoxBottomLeft(Core::GeoPosition2D(bounds.bottomLeft().x(), bounds.bottomLeft().y()));
aiv.boundingBoxTopRight(Core::GeoPosition2D(bounds.topRight().x(), bounds.topRight().y()));
aiv.aesTypeId(AesType::AtBCContamination);
aiv.effectStateId(data().effectStateId);
aiv.id(1000 * m_data.id + AesType::AtBCContamination);
aiv.aesItemId = m_data.id;
aiv.effectStart = toMSec(m_data.effectStart);
aiv.chargeStruct.chargeTypeId = m_data.chargeTypeId;
ddsVecFromPoly(poly, aiv.form);
aiv.boundingBoxBottomLeft = Core::GeoPosition2D(bounds.bottomLeft().x(), bounds.bottomLeft().y());
aiv.boundingBoxTopRight = Core::GeoPosition2D(bounds.topRight().x(), bounds.topRight().y());
aiv.aesTypeId = AesType::AtBCContamination;
aiv.effectStateId = data().effectStateId;
aiv.id = 1000 * m_data.id + static_cast<int>(AesType::AtBCContamination);
// Check if aiv is in special area
// effectStart needs to be set
checkIsCentralAndPublish(aiv.form(), m_aiv.form(), m_data.isCentral);
checkIsCentralAndPublish(aiv.form, m_aiv.form, m_data.isCentral);
if (m_data.partyId != 0)
aiv.partyId(m_data.partyId);
aiv.partyId = m_data.partyId;
if (aiv != m_aiv)
{
aiv.sampleTime(partitionTimeMSec());
aiv.sampleTime = partitionTimeMSec();
m_aiv = aiv;
m_mainHandler->dds()->dts()->publish(aiv);
emit newAiv(m_aiv);
@@ -278,7 +278,7 @@ void ObjectBCContamination::removeTopics()
m_aivUpdateTimer->stop();
m_weatherTimer->stop();
dts->removeBCContaminationByKey(m_data.id);
dts->removeAesItemViewByKey(1000 * m_data.id + AesType::AtBCContamination);
dts->removeAesItemViewByKey(1000 * m_data.id + static_cast<int>(AesType::AtBCContamination));
emit removeAiv(m_data.id);
}