Migrates CentralEffectSimulation to generated rtiddsgen API
Converts accessor calls to plain member access across ces service.
This commit is contained in:
24 files changed
+752
-752
No files matched your search
+5
-5
@@ -399,8 +399,8 @@ void HandlerExplosions::calculateImpact(const AreaEffectSimulation::ChargeEffect
|
||||
// if we get the equipmentNumber from the participant we will send this (needed by tab)
|
||||
// if not fall back to participantId, not negated yet as it's not tested and probalbly handled by the TNE
|
||||
const ParticipantManagement::Participant &part = m_ddsHandler->dtcPpm()->participant(data.originatorId());
|
||||
if (part.equipmentNumber().is_set())
|
||||
requestTab.originatorEquipmentNumber(part.equipmentNumber().get());
|
||||
if (part.equipmentNumber.is_set())
|
||||
requestTab.originatorEquipmentNumber(part.equipmentNumber.get());
|
||||
else
|
||||
{
|
||||
WARNING_LOG(m_logger) << "Sending CesHitRequest without EquipNo, using negative ParticipantID : " << data.originatorId();
|
||||
@@ -912,7 +912,7 @@ void HandlerExplosions::calculateSmartEffect(const AreaEffectSimulation::Effects
|
||||
<< ", aesItem= " << aesItem;
|
||||
calculateSmartExplosion(effects.aesItemId(),
|
||||
aesItem.chargeStruct(),
|
||||
aesItem.partyId().is_set() ? aesItem.partyId().get() : 0,
|
||||
aesItem.partyId.is_set() ? aesItem.partyId.get() : 0,
|
||||
Core::GeoPosition(se.position().lon(), se.position().lat(), 0),
|
||||
effects.sampleTime());
|
||||
} // for
|
||||
@@ -1591,8 +1591,8 @@ void HandlerExplosions::sendCesHitRequest(const CentralEffectSimulation::AesItem
|
||||
if (eventType == ProjectDataManagement::EventType::EnterHazardDistance)
|
||||
{
|
||||
const auto &ec = m_ddsHandler->dtcAes().get()->explosionCluster(itemView.aesItemId);
|
||||
if (ec.effectStart().is_set())
|
||||
effectTime2 = ec.effectStart().get() / 1000; // msec to sec
|
||||
if (ec.effectStart.is_set())
|
||||
effectTime2 = ec.effectStart.get() / 1000; // msec to sec
|
||||
}
|
||||
|
||||
|
||||
|
||||
+10
-10
@@ -94,7 +94,7 @@ void HandlerVulcano::onExplosionClusterChanged(const AreaEffectSimulation::Explo
|
||||
|| (data.effectStateId() == AreaEffectSimulation::AesEffectState_def::EsActivated))
|
||||
return;
|
||||
|
||||
if (!data.effectStart().is_set())
|
||||
if (!data.effectStart.is_set())
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "No effectStart";
|
||||
return;
|
||||
@@ -107,10 +107,10 @@ void HandlerVulcano::onExplosionClusterChanged(const AreaEffectSimulation::Explo
|
||||
if (!m_ddsHandler->isLaserGuidable(data.chargeStruct()))
|
||||
return;
|
||||
|
||||
if (!data.flightCurve().is_set() || !data.laserGuiding().is_set())
|
||||
if (!data.flightCurve.is_set() || !data.laserGuiding.is_set())
|
||||
return;
|
||||
const AreaEffectSimulation::FlightCurve &fcData = data.flightCurve().get();
|
||||
const AreaEffectSimulation::LaserGuiding &lgData = data.laserGuiding().get();
|
||||
const AreaEffectSimulation::FlightCurve &fcData = data.flightCurve.get();
|
||||
const AreaEffectSimulation::LaserGuiding &lgData = data.laserGuiding.get();
|
||||
|
||||
DEBUG_LOG(m_logger) << "\n onExplosionClusterChanged id=" << data.id()
|
||||
<< " AesEffectState=" << data.effectStateId()
|
||||
@@ -137,7 +137,7 @@ void HandlerVulcano::onExplosionClusterChanged(const AreaEffectSimulation::Explo
|
||||
m_aesTimers.insert(data.id(), timer);
|
||||
timer->setProperty("aesId", aesId);
|
||||
{
|
||||
long long effectStart = data.effectStart().is_set() ? data.effectStart().get() : 0;
|
||||
long long effectStart = data.effectStart.is_set() ? data.effectStart.get() : 0;
|
||||
long long calculatedFlightDurationMSec = fcData.calculatedFlightDuration();
|
||||
long long currentPartitionTime = m_ddsHandler->currentPartitionTime();
|
||||
const int timerTimeout = effectStart - calculatedFlightDurationMSec - currentPartitionTime;
|
||||
@@ -160,9 +160,9 @@ void HandlerVulcano::onFiringTimeTimeout()
|
||||
const auto &myEC = m_explosionCluster.value(aesId);
|
||||
if (myEC.id() != aesId)
|
||||
return;
|
||||
if (!myEC.flightCurve().is_set())
|
||||
if (!myEC.flightCurve.is_set())
|
||||
return;
|
||||
const AreaEffectSimulation::FlightCurve &fcData = myEC.flightCurve().get();
|
||||
const AreaEffectSimulation::FlightCurve &fcData = myEC.flightCurve.get();
|
||||
|
||||
//auto dtcPpm = m_ddsHandler->dtcPpm();
|
||||
//auto participantId = dtcPpm.get()->getParticipantFromPrf(prf);
|
||||
@@ -211,7 +211,7 @@ void HandlerVulcano::onFiringTimeTimeout()
|
||||
// Flugzeit zwischen TAP(') und Einschlag
|
||||
int timeDiffTapToExplosion = relTimeExplosion - relTimeTap;
|
||||
// Somit ist die absolute Zeit am TAP(') die Startzeit abzüglich der Flugzeit
|
||||
int absTimeAtTap = myEC.effectStart().get() - timeDiffTapToExplosion;
|
||||
int absTimeAtTap = myEC.effectStart.get() - timeDiffTapToExplosion;
|
||||
// Und die ist in wieviel Sekunden?
|
||||
int relTimeToTap = absTimeAtTap - m_ddsHandler->currentPartitionTime();
|
||||
DEBUG_LOG(m_logger) << "timer->start timeout= " << relTimeToTap
|
||||
@@ -231,9 +231,9 @@ void HandlerVulcano::onTrajectoryTimeAwareTimeout()
|
||||
const auto &myEC = m_explosionCluster.value(aesId);
|
||||
if (myEC.id() != aesId)
|
||||
return;
|
||||
if (!myEC.laserGuiding().is_set())
|
||||
if (!myEC.laserGuiding.is_set())
|
||||
return;
|
||||
const AreaEffectSimulation::LaserGuiding &lgData = myEC.laserGuiding().get();
|
||||
const AreaEffectSimulation::LaserGuiding &lgData = myEC.laserGuiding.get();
|
||||
|
||||
const int prf = lgData.lcAttack();
|
||||
|
||||
|
||||
Reference in new issue
Block a user