WSF
PlatformUpdater.hpp
Go to the documentation of this file.
1// ****************************************************************************
2// CUI
3//
4// The Advanced Framework for Simulation, Integration, and Modeling (AFSIM)
5//
6// Copyright 2018 Infoscitex, a DCS Company. All rights reserved.
7//
8// The use, dissemination or disclosure of data in this file is subject to
9// limitation or restriction. See accompanying README and LICENSE for details.
10// ****************************************************************************
11#ifndef PlatformUpdater_HPP
12#define PlatformUpdater_HPP
13
14#include "WkfUnitUpdaters.hpp"
15#include "WsfPlatform.hpp"
16#include "WsfSimulation.hpp"
17
18namespace wizard
19{
20template<class BASE_UPDATER>
21class PlatformUpdaterT : public BASE_UPDATER
22{
23 static_assert(std::is_base_of<wkf::Updater, BASE_UPDATER>::value, "Template type must be subclass of wkf::Updater");
24
25 using BaseUpdater = BASE_UPDATER;
26
27public:
28 PlatformUpdaterT(const QString& aUpdaterName, const std::string& aPlatformName)
29 : BaseUpdater(aUpdaterName, aPlatformName)
30 , mLastUpdateTime(-1.0)
31 {
32 }
33
34 ~PlatformUpdaterT() override = default;
35
36 void SetValue(double aValue, bool aValid = true)
37 {
38 BaseUpdater::mValue = aValue;
39 BaseUpdater::mDataValid = aValid;
40 }
41
42protected:
44};
45
66} // namespace wizard
67#endif
Definition PlatformUpdater.hpp:22
PlatformUpdaterT(const QString &aUpdaterName, const std::string &aPlatformName)
Definition PlatformUpdater.hpp:28
double mLastUpdateTime
Definition PlatformUpdater.hpp:43
void SetValue(double aValue, bool aValid=true)
Definition PlatformUpdater.hpp:36
~PlatformUpdaterT() override=default
Definition Runner.hpp:22
PlatformUpdaterT< wkf::AngularAccelerationValueUpdater > PlatformAngularAccelerationUpdater
Definition PlatformUpdater.hpp:50
PlatformUpdaterT< wkf::TimeValueUpdater > PlatformTimeUpdater
Definition PlatformUpdater.hpp:61
PlatformUpdaterT< wkf::PowerDBValueUpdater > PlatformPowerDBUpdater
Definition PlatformUpdater.hpp:57
PlatformUpdaterT< wkf::LongitudeValueUpdater > PlatformLongitudeUpdater
Definition PlatformUpdater.hpp:65
PlatformUpdaterT< wkf::AngleValueUpdater > PlatformAngleUpdater
Definition PlatformUpdater.hpp:49
PlatformUpdaterT< wkf::ForceValueUpdater > PlatformForceUpdater
Definition PlatformUpdater.hpp:52
PlatformUpdaterT< wkf::PowerValueUpdater > PlatformPowerUpdater
Definition PlatformUpdater.hpp:56
PlatformUpdaterT< wkf::RatioValueUpdater > PlatformRatioUpdater
Definition PlatformUpdater.hpp:59
PlatformUpdaterT< wkf::AccelerationValueUpdater > PlatformAccelerationUpdater
Definition PlatformUpdater.hpp:46
PlatformUpdaterT< wkf::LengthValueUpdater > PlatformLengthUpdater
Definition PlatformUpdater.hpp:54
PlatformUpdaterT< wkf::FrequencyValueUpdater > PlatformFrequencyUpdater
Definition PlatformUpdater.hpp:53
PlatformUpdaterT< wkf::AltitudeValueUpdater > PlatformAltitudeUpdater
Definition PlatformUpdater.hpp:47
PlatformUpdaterT< wkf::SpeedValueUpdater > PlatformSpeedUpdater
Definition PlatformUpdater.hpp:60
PlatformUpdaterT< wkf::LatitudeValueUpdater > PlatformLatitudeUpdater
Definition PlatformUpdater.hpp:64
PlatformUpdaterT< wkf::HighAltitudeValueUpdater > PlatformHighAltitudeUpdater
Definition PlatformUpdater.hpp:48
PlatformUpdaterT< wkf::Updater > PlatformUpdater
Definition PlatformUpdater.hpp:63
PlatformUpdaterT< wkf::UnitlessValueUpdater > PlatformUnitlessUpdater
Definition PlatformUpdater.hpp:62
PlatformUpdaterT< wkf::PressureValueUpdater > PlatformPressureUpdater
Definition PlatformUpdater.hpp:58
PlatformUpdaterT< wkf::AngularRateValueUpdater > PlatformAngularRateUpdater
Definition PlatformUpdater.hpp:51
PlatformUpdaterT< wkf::MassValueUpdater > PlatformMassUpdater
Definition PlatformUpdater.hpp:55
Copyrights Multiple, All Rights Reserved