#pragma once #include #include #include #include #include #include #include #include #include #include namespace TrainingAreaBase { namespace TetraIcd { class JsonException final : public std::exception { public: JsonException(const QJsonObject &obj, const QString &key); const char *what() const noexcept override { return m_what.data(); } private: QJsonObject m_obj; QString m_key; QByteArray m_what; }; enum TelegramId { UNKNOWN = -1, BESTAETIGUNG = 0, INIT = 1, MANIPULATIONSMELDUNG = 2, UMGEBUNGS_MELDUNG2 = 203, AUFFORDERUNG_BITE_MELDUNG = 4, BITE_MELDUNG2 = 205, BETRIEBSZUSTAND_AUSSTATTUNG = 7, KONFIGURATION_WIRKMODELL = 9, ANFORDERUNG_KONFIGURATIONSDATEN = 10, KONFIGURATIONSMELDUNG = 11, FEHLERMELDUNG_GFD = 12, WIEDERHERSTELLUNG_FUNKBEREITSCHAFT = 13, POSITIONS_MELDUNG = 21, POSITIONS_MELDUNG_MIT_TEILNEHMER = 22, POSITIONS_MELDUNG_LFZ = 23, SCHIEDSRICHTERKOMMANDO = 25, IPS_POSITIONSDATEN = 201, WIRKFELD_EINZELGESCHOSS = 31, WIRKFELD_FLAECHENDECKENDES_FEUER = 32, WIRKFELD_FLAECHENDECKENDES_FEUER_STOP = 33, WIRKFELD_FLAECHENDECKENDES_FEUER_FORTSETZEN = 34, WIRKFELD_MINENSPERRE = 35, WIRKFELD_STATUS_MINENSPERRE = 36, WIRKFELD_A_KAMPFMITTEL = 37, WIRKFELD_C_KAMPFMITTEL = 38, DEAKTIVIERUNG_WIRKFELD = 39, WIRKFELD_AENDERUNG_BEZEICHNER = 40, DEAKTIVIERUNG_EINZELMINE = 41, REAKTIVIERUNG_DUS_MINE = 42, DEFINITION_IED = 43, ZUSTAND_IED = 44, STATUS_EINZELMINENSIMULATOR = 45, WIRKFELD_EINZELMINENSIMULATOR = 46, TREFFER_EREIGNIS_DUS = 52, TREFFER_EREIGNIS_WIRKSIMULATION = 53, TREFFER_AUSLOESUNG = 54, SCHIEDSRICHTEREINGRIFF = 55, SELEKTIVE_AUFMUNITIONIERUNG = 56, TREFFER_EREIGNIS_SEKUNDAERWIRKUNG = 218, TREFFER_EREIGNIS_DUS_IPS = 228, TREFFER_EREIGNIS_WIRKSIMULATION_IPS = 229, TAKTISCHER_STATUS = 61, FUNKTIONSRAUM = 62, EINTRETEN_FUNKTIONSRAUM = 63, DEAKTIVIEREN_FUNKTIONSRAUM = 64, DATENVERKEHR_SRT_TDS = 71, DATENVERKEHR_TDS_SRT = 72, DATENVERKEHR_DMF_TDS = 73, DATENVERKEHR_TDS_DMF = 74, NACHFORDERUNG_BROADCAST_TELEGRAMME = 82, SONDERSENSORIK_FAHRSPUR = 92, SONDERSENSORIK_MIVANH_VERLEGEDATEN = 95, SONDERSENSORIK_WMIV_VERLEGEDATEN = 96, SONDERSENSORIK_MIVANH_VERLEGEPOSITION = 97, SPRACHAUSWAHL = 101, ALLGEMEINE_NACHRICHT = 102, GERAETEEREIGNIS = 185, WAFFENZUORDNUNG = 200, MUNITIONSVORRAT_EINER_ZUGEORDNETEN_WAFFE = 202, FEUEREREIGNIS_MIT_WAFFENZUORDNUNG = 210, AUSLOESUNG_DUS_TREFFER = 211, ANFORDERUNG_SW_VERSION = 212, SW_VERSIONSMELDUNG = 213, TECHNIK_FUNKTIONSRAUM = 219, TEILNEHMERMODE_SETZEN = 230, TEILNEHMERMODE_MELDUNG = 231, TEILNEHMERMODE_ANFORDERN = 232, TEILNEHMER_KONFIG_ANTWORT = 233, TEILNEHMER_KONFIG_SETZEN = 234, TEILNEHMER_KONFIG_ANFORDERN = 235, SANITAETSDIENST_INSTANDSETZUNG = 240, BESTANDSMELDUNG_SANITAETSMATERIAL = 241, SANITAETSDIENST_INSTANDSETZUNG_PVSAN = 242, NOTRUF = 1120, BETRIEBSZUSTANDSMELDUNG = 2008, ANFORDERUNG_STATISTIK_BROADCAST_NACHFORDERUNGEN = 2009, STATISTIK_BROADCAST_NACHFORDERUNGEN = 2010, EXERCISE_EQUIPMENT_ASSIGNMENT_COMPLETE = 2012, PROXY_CONNECTION_STATE = 2013, PARTICIPANT_LICENSE_CHANGE = 2014, WLS_PARTICIPANTS_STATE_REQUEST = 3001, WLS_PARTICIPANTS_STATE_REPORT = 3002, WLS_BINARY_SFM_DATA = 3003, WLS_PARTICIPANT_CONNECTION_STATE = 3004, SR_DMF_NACHRICHT = 6130, APACHE_LASER_DESIGNATION = 8004, BATTERY_INFO = 9000, BATTERY_ALARM = 9001, SERVICE_CONTROL = 9002, DEVICE_POWER_SET_REQUEST = 9003, UAV_PERFORM_MISSION = 9004, UAV_STATUS = 9005, UAV_RADIO_LINK_CONNECTION_STATUS = 9006, UAV_MISSION_STATUS = 9007, UAV_CHANGE_STATE = 9008, EX_FIRE_READINESS = 9100, EX_FIRED_REPORT = 9101, EX_CONFIRMATION_REPORT = 9102, }; template struct Constraints; struct TrainingAreaTelegram { TrainingAreaTelegram() = default; virtual ~TrainingAreaTelegram() = default; virtual QJsonObject toJson() const = 0; virtual QString type() const = 0; virtual TelegramId id() const = 0; }; template struct TrainingAreaTelegramTmpl : TrainingAreaTelegram { QString type() const override final { return Constraints::type(); } TelegramId id() const override final { return Constraints::id(); } }; enum class Qualification { NotDefined = 0, FAA = 1, FAB = 2, SANPers = 3 }; enum class SanitationResult { NoEffect = 0, Unhandled = 1, Insufficient = 2, Sufficient = 3, Optimal = 4 }; enum class SanitationEvaluation { NotApplicable = -1, Okay = 0, PartlyWrong = 1, Wrong = 2, }; enum class VulnerabilityState { CombatReady = 0, LightDamage = 1, MediumDamage = 2, HeavyDamage = 3, MobilityKill = 4, VisibleMobilityKill = 5, WeaponSystemDamage = 6, VisibleWeaponSystemDamage = 7, CatastrophicKill = 8, TemporarySeverance = 9, NearMiss = 10, HitWithNoEffect = 11, VulnerabilityBitsChanged = 12, Reserved = 13, NContamination = 14, BContamination = 15, CContamination = 16 }; enum class OriginatorType { Initialisation = 0, ObserverController = 1, ExerciseControl = 2, FunctionalArea = 6, MedicTimeout = 7, Sanitation = 8, MedicDecontamination = 9, MaintainanceRepair = 10, MaintainanceDecontamination = 11, }; enum class AreaEffectSimulationType { Unknown = 0, MineArea = 1, ExplosionArea = 2, ExplosionSingle = 3, NContamination = 4, CContamination = 5, FunctionalArea = 6, TechnicalArea = 7, DusSingleMineSimulator = 8, GasPipeDetonation = 9, SpecialArea = 10, BeStillWarning = 11, DangerZoneExplosion = 12, AirSupport = 13 }; enum class ServiceControlEnum { PRESHUTDOWN = 0, SHUTDOWN = 1, STOP = 2 }; enum class PowerMethod { Unknown = 0, PowerOn = 1, PowerOff = 2 }; inline std::ostream &operator<<(std::ostream &stream, AreaEffectSimulationType val) { switch (val) { case AreaEffectSimulationType::Unknown: stream << "AreaEffectSimulationType::Unknown"; return stream; case AreaEffectSimulationType::MineArea: stream << "AreaEffectSimulationType::MineArea"; return stream; case AreaEffectSimulationType::ExplosionArea: stream << "AreaEffectSimulationType::ExplosionArea"; return stream; case AreaEffectSimulationType::ExplosionSingle: stream << "AreaEffectSimulationType::ExplosionSingle"; return stream; case AreaEffectSimulationType::NContamination: stream << "AreaEffectSimulationType::NContamination"; return stream; case AreaEffectSimulationType::CContamination: stream << "AreaEffectSimulationType::CContamination"; return stream; case AreaEffectSimulationType::FunctionalArea: stream << "AreaEffectSimulationType::FunctionalArea"; return stream; case AreaEffectSimulationType::TechnicalArea: stream << "AreaEffectSimulationType::TechnicalArea"; return stream; case AreaEffectSimulationType::DusSingleMineSimulator: stream << "AreaEffectSimulationType::DusSingleMineSimulator"; return stream; case AreaEffectSimulationType::GasPipeDetonation: stream << "AreaEffectSimulationType::GasPipeDetonation"; return stream; case AreaEffectSimulationType::SpecialArea: stream << "AreaEffectSimulationType::SpecialArea"; return stream; case AreaEffectSimulationType::BeStillWarning: stream << "AreaEffectSimulationType::BeStillWarning"; return stream; case AreaEffectSimulationType::DangerZoneExplosion: stream << "AreaEffectSimulationType::DangerZoneExplosion"; return stream; case AreaEffectSimulationType::AirSupport: stream << "AreaEffectSimulationType::AirSupport"; return stream; } stream << "Unknown (" << std::to_string(int(val)) << ")"; return stream; } enum class FunctionalAreaOperatingMode { NotUsed = 0, OperatedByOC = 1, WaitForTimeout = 2 }; enum class Language { NoChange = 0, German = 1, English = 2, French = 3, Arabic = 4, Spanish = 5, Russian = 6 }; enum class ParticipantLicenseState { Unknown = 0, Licensed = 1, Rejected = 2, Unlicense = 3, }; enum class UAVActionTask { Undefined = 0, Disarm = 1, Arm = 2, Takeoff = 3, Connect = 4, Loiter = 5, Return = 6, Observe = 8, }; enum class UAVRadioLinkConnectionStatusType { Undefined = 0, Disconnected = 1, Connecting = 2, Diconnecting = 3, Connected = 4, Error = 5, }; enum class UAVState { Undefined = 0, Off = 1, On = 2, Standby = 3, Init = 4, Shutdown = 5, Normal = 6, Manual = 7, Auto = 8, Calibrating = 9, Maintenance = 10 }; struct Header { int equipmentNumber = 0; qint64 timeStamp = 0; static Header fromJson(const QJsonObject &obj); QJsonObject toJson() const; }; struct RelativePosition { int offsetX = 0; int offsetY = 0; double offsetZ = 0; explicit RelativePosition(int x = 0, int y = 0, double z = 0) : offsetX(x) , offsetY(y) , offsetZ(z) {} static RelativePosition fromJson(const QJsonObject &obj); QJsonObject toJson() const; }; struct AbsolutePosition { double lon = 0; double lat = 0; double z = 0; bool isValid() const { return (lon != 0 && lat != 0); } static AbsolutePosition fromJson(const QJsonObject &obj); QJsonObject toJson() const; }; struct OpsPosition { int opsId = 0; int moutObjectId = 0; int moutRoomId = 0; static OpsPosition fromJson(const QJsonObject &obj); QJsonObject toJson() const; }; struct GpsQuality { bool moreThan4SatellitesAvailable = false; bool dgpsModeAvailable = false; int pdopValue = 0; static GpsQuality fromJson(const QJsonObject &obj); QJsonObject toJson() const; }; struct Gear { int gearTasCode = 0; int gearSerialNumber = 0; bool chargeCounting = false; static Gear fromJson(const QJsonObject &obj); QJsonObject toJson() const; }; struct GearCharge { int gearTasCode = 0; int gearSerialNumber = 0; int chargeTypeId = 0; int remain = 0; int location = 0; static GearCharge fromJson(const QJsonObject &obj); QJsonObject toJson() const; }; struct WlsPosition { double x = 0; double y = 0; double z = 0; int wlsAreaId = 0; int wlsZone = 0; int wlsBuildingId = 0; int wlsRoomNumber = 0; int playerOrientation = 0; int weaponOrientation = 0; bool isValid = false; static WlsPosition fromJson(const QJsonObject &obj); QJsonObject toJson() const; }; struct WlsParticipantState { QString tagId; qint64 lastSeen = 0; double voltage = 0; int equipmentNumber = 0; int tacticalState = -1; bool gpsOn = false; bool inBlockedArea = false; WlsPosition relativePosition; static WlsParticipantState fromJson(const QJsonObject &obj); QJsonObject toJson() const; }; struct BatteryState { int m_batteryPort; int m_batteryPercent; int m_voltage; int m_temperature; int m_frequency; int m_generic; int m_current; bool m_switchOrValue; QString m_serialNumber; int batteryPort() const { return m_batteryPort; } int batteryPercent() const { return m_batteryPercent; } int voltage() const { return m_voltage; } int temperature() const { return m_temperature; } int frequency() const { return m_frequency; } int generic() const { return m_generic; } int current() const { return m_current; } bool switchOrValue() const { return m_switchOrValue; } QString serialNumber() const { return m_serialNumber; } static BatteryState fromJson(const QJsonObject &obj); QJsonObject toJson() const; }; struct UAVAction { UAVActionTask task; AbsolutePosition absPosition; static QString TASK() { return QLatin1String("task"); } static QString POSITION() { return QLatin1String("position"); } static UAVAction fromJson(const QJsonObject &obj); QJsonObject toJson() const; }; struct Acknowledge : TrainingAreaTelegramTmpl { qint64 timeStamp = 0; int32_t ackCounter = 0; static Acknowledge fromJson(const QJsonObject &obj); QJsonObject toJson() const override; }; template <> struct Constraints { static QString type() { return QStringLiteral("Acknowledge"); } static constexpr TelegramId id() { return TelegramId::BESTAETIGUNG; } }; struct Init : TrainingAreaTelegramTmpl { Header header; int workstationId = 0; bool restockCharges = false; bool resetManipulation = false; bool resetVulnerabilityState = false; bool restockSanitationMaterial = false; static Init fromJson(const QJsonObject &obj); QJsonObject toJson() const override; }; template <> struct Constraints { static QString type() { return QStringLiteral("Init"); } static constexpr TelegramId id() { return TelegramId::INIT; } }; struct ManipulationReport : TrainingAreaTelegramTmpl { Header header; bool isManipulation = false; int equipmentFunctionId; static ManipulationReport fromJson(const QJsonObject &obj); QJsonObject toJson() const override; }; template <> struct Constraints { static QString type() { return QStringLiteral("ManipulationReport"); } static constexpr TelegramId id() { return TelegramId::MANIPULATIONSMELDUNG; } }; struct DemandBite : TrainingAreaTelegramTmpl { Header header; bool withSelfTest = false; static DemandBite fromJson(const QJsonObject &obj); QJsonObject toJson() const override; }; template <> struct Constraints { static QString type() { return QStringLiteral("DemandBite"); } static constexpr TelegramId id() { return TelegramId::AUFFORDERUNG_BITE_MELDUNG; } }; struct EquipmentOperationalState : TrainingAreaTelegramTmpl { Header header; bool nbcProtectionActive = false; static EquipmentOperationalState fromJson(const QJsonObject &obj); QJsonObject toJson() const override; }; template <> struct Constraints { static QString type() { return QStringLiteral("EquipmentOperationalState"); } static constexpr TelegramId id() { return TelegramId::BETRIEBSZUSTAND_AUSSTATTUNG; } }; struct VulnerabilityModelBase { Header header; int vulnerabilityModelMineIed = 0; int vulnerabilityModelAreaFire = 0; int vulnerabilityModelOperatingResource = 0; int vulnerabilityModelAcWeaponry = 0; static void fromJson(const QJsonObject &obj, VulnerabilityModelBase &ret); QJsonObject toJson() const; }; struct SetVulnerabilityModel : TrainingAreaTelegramTmpl, VulnerabilityModelBase { static SetVulnerabilityModel fromJson(const QJsonObject &obj); QJsonObject toJson() const override; }; template <> struct Constraints { static QString type() { return QStringLiteral("SetVulnerabilityModel"); } static constexpr TelegramId id() { return TelegramId::KONFIGURATION_WIRKMODELL; } }; struct DemandEquipmentConfigurationReport : TrainingAreaTelegramTmpl { Header header; static DemandEquipmentConfigurationReport fromJson(const QJsonObject &obj); QJsonObject toJson() const override; }; template <> struct Constraints { static QString type() { return QStringLiteral("DemandEquipmentConfigurationReport"); } static constexpr TelegramId id() { return TelegramId::ANFORDERUNG_KONFIGURATIONSDATEN; } }; struct EquipmentConfigurationReport : TrainingAreaTelegramTmpl, VulnerabilityModelBase { int equipmentNumber = 0; int canStartUpTime = 0; int equipmentType = 0; int loginWaittimeBitweenTrys = 0; int loginMaxRetryCnt = 0; bool loginMasteringFlag = false; int canDeviceConfiguration; bool displayDeviceVoiceOutput = false; Language displayDeviceLanguage = Language::NoChange; bool pyrotechnics = false; enum class MineHandgrenadeSensorMode { PersonellMode = 0, NormalVehicleMode = 2, OcVehicleMode = 3 }; MineHandgrenadeSensorMode mhgrsMode = MineHandgrenadeSensorMode::PersonellMode; bool mhgrsEnergySaving = false; enum class FirMode { NoFir = 0, Fir = 1, FirSpzMarder = 2 }; enum class MineLayerMode { NoMineLayerDevice = 0, MinLayerTrailer = 1, MineLayerThrower = 2 }; enum class SpecialSensorStandardMode { NoSpecialSensorStandard = 0, ZABC = 3, CSF = 4, PzBr = 5, MRF = 7 }; FirMode specialSensorFir = FirMode::NoFir; MineLayerMode specialSensorMinelayer = MineLayerMode::NoMineLayerDevice; SpecialSensorStandardMode specialSensorStandard = SpecialSensorStandardMode::NoSpecialSensorStandard; enum class AgdusHwMode { WithoutHelmetWithoutVest = 1, WithHelmetWithoutVest = 2, WithHelmetWithVest = 3 }; AgdusHwMode agdusHwMode = AgdusHwMode::WithoutHelmetWithoutVest; enum class PositionUpdateInterval { Vehicle = 0, Personnell = 1, Aircraft = 2 }; PositionUpdateInterval positionUpdateInterval = PositionUpdateInterval::Personnell; int displayTextMainGroup; int displayTextSubGroup; int vulnerabilityModelAgdus; static EquipmentConfigurationReport fromJson(const QJsonObject &obj); QJsonObject toJson() const override; }; template <> struct Constraints { static QString type() { return QStringLiteral("EquipmentConfigurationReport"); } static constexpr TelegramId id() { return TelegramId::KONFIGURATIONSMELDUNG; } }; struct CtaDataError : TrainingAreaTelegramTmpl { enum class Reason { WrongParameter = 1, TelegramOutdated = 2, InvalidByteCount = 3, InvalidData = 4, FragmentationError = 5, Unknown = 6, AdditionalDemandTimeout = 7, ErrorLoginEquipmentNumber = 50, ErrorLoginTetraId = 51, InfoLoginMasteringFlag = 52, ErrorSendingNamelist = 53, ErrorSendingToExerciseControl = 54, ErrorNotLoggedIn = 55, ErrorNotLicensed = 56, ErrorConfigSelfTest = 57, JsonDecodeFailure = 101, WrongCrc = 105, BroadcastCounterOverflow = 106, InvalidTime = 256, InvalidPosition = 257, InvalidTacticalState = 258 }; Header header; Reason reason = Reason::Unknown; int originTelegramId = 0; static CtaDataError fromJson(const QJsonObject &obj); QJsonObject toJson() const override; }; template <> struct Constraints { static QString type() { return QStringLiteral("CtaDataError"); } static constexpr TelegramId id() { return TelegramId::FEHLERMELDUNG_GFD; } }; struct PositionReportBase { Header header; RelativePosition relPosition; AbsolutePosition geoPosition; OpsPosition opsPosition; GpsQuality gpsQuality; static void fromJson(const QJsonObject &obj, PositionReportBase &ret); QJsonObject toJson() const; }; struct RestoreRadioReadiness : public TrainingAreaTelegramTmpl { Header header; RelativePosition readinessLossPosition; int readinessLossTime; RelativePosition readinessRestorePosition; int readinessRestoreTime; static RestoreRadioReadiness fromJson(const QJsonObject &obj); QJsonObject toJson() const; static QString HEADER() { return QLatin1String("header"); } static QString READINESS_LOSS_POSITION() { return QLatin1String("readinessLossPosition"); } static QString READINESS_LOSS_TIME() { return QLatin1String("readinessLossTime"); } static QString READINESS_RESTORE_POSITION() { return QLatin1String("readinessRestorePosition"); } static QString READINESS_RESTORE_TIME() { return QLatin1String("readinessRestoreTime"); } }; template <> struct Constraints { static QString type() { return QStringLiteral("RestoreRadioReadiness"); } static constexpr TelegramId id() { return TelegramId::WIEDERHERSTELLUNG_FUNKBEREITSCHAFT; } }; struct PositionReport : public TrainingAreaTelegramTmpl, PositionReportBase { static PositionReport fromJson(const QJsonObject &obj); QJsonObject toJson() const override; }; template <> struct Constraints { static QString type() { return QStringLiteral("PositionReport"); } static constexpr TelegramId id() { return TelegramId::POSITIONS_MELDUNG; } }; struct PositionReportWithMountedEquipments : TrainingAreaTelegramTmpl, PositionReportBase { std::vector mountedEquipments; static PositionReportWithMountedEquipments fromJson(const QJsonObject &obj); QJsonObject toJson() const override; }; template <> struct Constraints { static QString type() { return QStringLiteral("PositionReportWithMountedEquipments"); } static constexpr TelegramId id() { return TelegramId::POSITIONS_MELDUNG_MIT_TEILNEHMER; } }; struct CreateAreaEffectSimulationBase { Header header; int aesDdsId = 0; std::string name; int partyId = 0; RelativePosition relEffectPosition; static void fromJson(const QJsonObject &obj, CreateAreaEffectSimulationBase &ret); QJsonObject toJson() const; }; struct CreateCombatAreaEffectSimulationBase : CreateAreaEffectSimulationBase { int chargeTypeId = 0; qint64 effectStart = 0; qint64 effectDuration = 0; static void fromJson(const QJsonObject &obj, CreateCombatAreaEffectSimulationBase &ret); QJsonObject toJson() const; }; struct OcCommand : TrainingAreaTelegramTmpl { Header header; int action = 0; static OcCommand fromJson(const QJsonObject &obj); QJsonObject toJson() const override; }; template <> struct Constraints { static QString type() { return QStringLiteral("OcCommand"); } static constexpr TelegramId id() { return TelegramId::SCHIEDSRICHTERKOMMANDO; } }; struct CreateSingleExplosion : TrainingAreaTelegramTmpl, CreateCombatAreaEffectSimulationBase { int effectDiameter = 0; static CreateSingleExplosion fromJson(const QJsonObject &obj); QJsonObject toJson() const override; }; template <> struct Constraints { static QString type() { return QStringLiteral("CreateSingleExplosion"); } static constexpr TelegramId id() { return TelegramId::WIRKFELD_EINZELGESCHOSS; } }; struct CreateAreaExplosion : TrainingAreaTelegramTmpl, CreateCombatAreaEffectSimulationBase { RelativePosition relCorner; int height{0}; int width{0}; double rotationAngle{0.0}; int impactCount{0}; int impactEdgeLength{0}; double mhpRotation{0.0}; int mhpLength{0}; int mhpWidth{0}; int impactRadius{0}; std::vector mhPoints; int hazardDistance; static CreateAreaExplosion fromJson(const QJsonObject &obj); QJsonObject toJson() const override; }; template <> struct Constraints { static QString type() { return QStringLiteral("CreateAreaExplosion"); } static constexpr TelegramId id() { return TelegramId::WIRKFELD_FLAECHENDECKENDES_FEUER; } }; struct PauseEffectSimulation : TrainingAreaTelegramTmpl { int aesDdsId = 0; static PauseEffectSimulation fromJson(const QJsonObject &obj); QJsonObject toJson() const override; }; template <> struct Constraints { static QString type() { return QStringLiteral("PauseEffectSimulation"); } static constexpr TelegramId id() { return TelegramId::WIRKFELD_FLAECHENDECKENDES_FEUER_STOP; } }; struct ResumeEffectSimulation : TrainingAreaTelegramTmpl { int aesDdsId = 0; int sequelNumber = 0; int nextImpact = 0; qint64 resumeTime; int remainDuration; static ResumeEffectSimulation fromJson(const QJsonObject &obj); QJsonObject toJson() const override; }; template <> struct Constraints { static QString type() { return QStringLiteral("ResumeEffectSimulation"); } static constexpr TelegramId id() { return TelegramId::WIRKFELD_FLAECHENDECKENDES_FEUER_FORTSETZEN; } }; struct MineAreaSegment { RelativePosition relStart; RelativePosition relEnd; static MineAreaSegment fromJson(const QJsonObject &obj); QJsonObject toJson() const; }; struct CreateMineArea : TrainingAreaTelegramTmpl, CreateCombatAreaEffectSimulationBase { double layingDepth = 0; double layingDensity = 0; std::vector segments; static CreateMineArea fromJson(const QJsonObject &obj); QJsonObject toJson() const override; }; template <> struct Constraints { static QString type() { return QStringLiteral("CreateMineArea"); } static constexpr TelegramId id() { return TelegramId::WIRKFELD_MINENSPERRE; } }; struct MineAreaSingleMineState : TrainingAreaTelegramTmpl { int aesDdsId = 0; int mineCount = 0; std::vector mineState; static MineAreaSingleMineState fromJson(const QJsonObject &obj); QJsonObject toJson() const override; }; template <> struct Constraints { static QString type() { return QStringLiteral("MineAreaSingleMineState"); } static constexpr TelegramId id() { return TelegramId::WIRKFELD_STATUS_MINENSPERRE; } }; struct CreateNContamination : TrainingAreaTelegramTmpl, CreateCombatAreaEffectSimulationBase { int innerRadius = 0; int borderLengthInner = 0; int borderLengthOuter = 0; double spanAngle = 0; double rotationAngle = 0; static CreateNContamination fromJson(const QJsonObject &obj); QJsonObject toJson() const override; }; template <> struct Constraints { static QString type() { return QStringLiteral("CreateNContamination"); } static constexpr TelegramId id() { return TelegramId::WIRKFELD_A_KAMPFMITTEL; } }; struct CreateCContamination : TrainingAreaTelegramTmpl, CreateCombatAreaEffectSimulationBase { int effectRadius = 0; double expansionFactor = 0; double propagationDirection = 0; int windSpeed = 0; qint64 validityTimeWind; RelativePosition relPositionValidityTimeWind; enum class Volatiliy { Floating = 1, Resident = 2 } volatility = Volatiliy::Resident; static CreateCContamination fromJson(const QJsonObject &obj); QJsonObject toJson() const override; }; template <> struct Constraints { static QString type() { return QStringLiteral("CreateCContamination"); } static constexpr TelegramId id() { return TelegramId::WIRKFELD_C_KAMPFMITTEL; } }; struct DeactivateEffectSimulation : TrainingAreaTelegramTmpl { AreaEffectSimulationType aesType = AreaEffectSimulationType::Unknown; int aesDdsId = 0; static DeactivateEffectSimulation fromJson(const QJsonObject &obj); QJsonObject toJson() const override; }; template <> struct Constraints { static QString type() { return QStringLiteral("DeactivateEffectSimulation"); } static constexpr TelegramId id() { return TelegramId::DEAKTIVIERUNG_WIRKFELD; } }; struct ModifyAreaEffectSimulationName : TrainingAreaTelegramTmpl { AreaEffectSimulationType aesType = AreaEffectSimulationType::Unknown; int aesDdsId = 0; std::string name; static ModifyAreaEffectSimulationName fromJson(const QJsonObject &obj); QJsonObject toJson() const override; }; template <> struct Constraints { static QString type() { return QStringLiteral("ModifyAreaEffectSimulationName"); } static constexpr TelegramId id() { return TelegramId::WIRKFELD_AENDERUNG_BEZEICHNER; } }; struct MineTriggered : TrainingAreaTelegramTmpl { Header header; int mineAreaId = 0; int mineIndex = 0; int chargeTypeId = 0; RelativePosition relPosition; bool relPositionValid = false; static MineTriggered fromJson(const QJsonObject &obj); QJsonObject toJson() const override; }; template <> struct Constraints { static QString type() { return QStringLiteral("MineTriggered"); } static constexpr TelegramId id() { return TelegramId::DEAKTIVIERUNG_EINZELMINE; } }; struct DusMineReactivation : TrainingAreaTelegramTmpl { Header header; std::vector dusSerialNumbers; static DusMineReactivation fromJson(const QJsonObject &obj); QJsonObject toJson() const override; }; template <> struct Constraints { static QString type() { return QStringLiteral("DusMineReactivation"); } static constexpr TelegramId id() { return TelegramId::REAKTIVIERUNG_DUS_MINE; } }; enum class IedType { SuicideIed = 1, IedSmallPyro = 2, IedBigPyro = 3 }; enum class IedPairingState { NotPaired = 1, PairedToParticipant = 2, PairedToOps = 3 }; enum class IedTacticalState { NotActive = 0, Active = 1, Defused = 2, TriggeredBySwitch = 3, TriggeredByRemote = 4, TriggeredByLightBarrier = 5, TriggeredByTautWire = 6, TriggeredByControlDevice = 7, Unknown = 255 }; struct IedBaseData { Header header; int iedId = 0; IedTacticalState tacticalState = IedTacticalState::Unknown; bool statePyrotechnics = false; static void fromJson(const QJsonObject &obj, IedBaseData &ret); QJsonObject toJson() const; }; struct DefinitionIed : TrainingAreaTelegramTmpl, IedBaseData { RelativePosition relPosition; IedType iedType = IedType::SuicideIed; enum class TriggerTypes { Remote = 0x01, Switch = 0x02, LightBarrier = 0x04, TautWire = 0x08 }; int trigger = 0; int explosiveForce = 0; IedPairingState pairingState = IedPairingState::NotPaired; int pairedId = 0; int partyId = 0; static DefinitionIed fromJson(const QJsonObject &obj); QJsonObject toJson() const override; }; template <> struct Constraints { static QString type() { return QStringLiteral("DefinitionIed"); } static constexpr TelegramId id() { return TelegramId::DEFINITION_IED; } }; enum class IedError { NoError = 0, DeviceMissing = 1 }; struct StateIed : TrainingAreaTelegramTmpl, IedBaseData { int batteryWarnings = 0; IedError errorStateElectronics = IedError::NoError; IedError errorStatePyrotechnics1 = IedError::NoError; IedError errorStatePyrotechnics2 = IedError::NoError; IedError errorStatePyrotechnics3 = IedError::NoError; static StateIed fromJson(const QJsonObject &obj); QJsonObject toJson() const override; }; template <> struct Constraints { static QString type() { return QStringLiteral("StateIed"); } static constexpr TelegramId id() { return TelegramId::ZUSTAND_IED; } }; struct DusSingleMineState : TrainingAreaTelegramTmpl { Header header; int mineId = 0; qint64 effectStart = 0; RelativePosition relPosition; int chargeTypeId = 0; bool state = false; static DusSingleMineState fromJson(const QJsonObject &obj); QJsonObject toJson() const override; }; template <> struct Constraints { static QString type() { return QStringLiteral("DusSingleMineState"); } static constexpr TelegramId id() { return TelegramId::STATUS_EINZELMINENSIMULATOR; } }; struct CreateDusSingleMine : TrainingAreaTelegramTmpl, CreateCombatAreaEffectSimulationBase { int mineId; static CreateDusSingleMine fromJson(const QJsonObject &obj); QJsonObject toJson() const override; }; template <> struct Constraints { static QString type() { return QStringLiteral("CreateDusSingleMine"); } static constexpr TelegramId id() { return TelegramId::WIRKFELD_EINZELMINENSIMULATOR; } }; struct StateChangeBase { Header header; RelativePosition relPosition; AbsolutePosition geoPosition; OpsPosition opsPosition; VulnerabilityState vulnerabilityState = VulnerabilityState::CombatReady; int tasVulnerabilityKindId = 0; int tasVitality = 0; int vulnerabilityBits = 0; int originatorId = 0; static void fromJson(const QJsonObject &obj, StateChangeBase &ret); QJsonObject toJson() const; }; struct StateChangeDirect : TrainingAreaTelegramTmpl, StateChangeBase { int chargeTypeId = 0; static StateChangeDirect fromJson(const QJsonObject &obj); QJsonObject toJson() const override; }; template <> struct Constraints { static QString type() { return QStringLiteral("StateChangeDirect"); } static constexpr TelegramId id() { return TelegramId::TREFFER_EREIGNIS_DUS; } }; struct StateChangeIndirect : TrainingAreaTelegramTmpl, StateChangeBase { bool isSecondaryEffect = false; static StateChangeIndirect fromJson(const QJsonObject &obj); QJsonObject toJson() const override; }; template <> struct Constraints { static QString type() { return QStringLiteral("StateChangeIndirect"); } static constexpr TelegramId id() { return TelegramId::TREFFER_EREIGNIS_WIRKSIMULATION; } }; struct DemandVulnerabilityStateChange : TrainingAreaTelegramTmpl { Header header; int workstationId = 0; VulnerabilityState reqestedState = VulnerabilityState::CombatReady; int vulnerabilityVitalityIndex = 0; static DemandVulnerabilityStateChange fromJson(const QJsonObject &obj); QJsonObject toJson() const override; }; template <> struct Constraints { static QString type() { return QStringLiteral("DemandVulnerabilityStateChange"); } static constexpr TelegramId id() { return TelegramId::TREFFER_AUSLOESUNG; } }; struct OperatorAction : TrainingAreaTelegramTmpl { Header header; RelativePosition relPosition; int operatorId = 0; int action = 0; static OperatorAction fromJson(const QJsonObject &obj); QJsonObject toJson() const override; }; template <> struct Constraints { static QString type() { return QStringLiteral("OperatorAction"); } static constexpr TelegramId id() { return TelegramId::SCHIEDSRICHTEREINGRIFF; } }; struct Reammunition { int chargeTypeId = 0; int location = 0; int newStock = 0xfffe; int newDefaultStock = 0xfffe; int tracerRatio = 0; static Reammunition fromJson(const QJsonObject &obj); QJsonObject toJson() const; }; struct SelectiveReammunition : TrainingAreaTelegramTmpl { Header header; int gearId = 0; std::vector reammunitions; static SelectiveReammunition fromJson(const QJsonObject &obj); QJsonObject toJson() const override; }; template <> struct Constraints { static QString type() { return QStringLiteral("SelectiveReammunition"); } static constexpr TelegramId id() { return TelegramId::SELEKTIVE_AUFMUNITIONIERUNG; } }; struct StateChange : TrainingAreaTelegramTmpl, StateChangeBase { OriginatorType originatorType = OriginatorType::Initialisation; static StateChange fromJson(const QJsonObject &obj); QJsonObject toJson() const override; }; template <> struct Constraints { static QString type() { return QStringLiteral("StateChange"); } static constexpr TelegramId id() { return TelegramId::TAKTISCHER_STATUS; } }; struct CreateFunctionalArea : TrainingAreaTelegramTmpl, CreateAreaEffectSimulationBase { int width = 0; int height = 0; qint64 deconTimeout = 0; qint64 maintenanceTimeout = 0; qint64 medicalTimeout = 0; FunctionalAreaOperatingMode deconMode = FunctionalAreaOperatingMode::NotUsed; FunctionalAreaOperatingMode maintenanceMode = FunctionalAreaOperatingMode::NotUsed; FunctionalAreaOperatingMode medicalMode = FunctionalAreaOperatingMode::NotUsed; static CreateFunctionalArea fromJson(const QJsonObject &obj); QJsonObject toJson() const override; }; template <> struct Constraints { static QString type() { return QStringLiteral("CreateFunctionalArea"); } static constexpr TelegramId id() { return TelegramId::FUNKTIONSRAUM; } }; struct FunctionalAreaEntry : TrainingAreaTelegramTmpl { Header header; RelativePosition relPosition; int aesDdsId = 0; static FunctionalAreaEntry fromJson(const QJsonObject &obj); QJsonObject toJson() const override; }; template <> struct Constraints { static QString type() { return QStringLiteral("FunctionalAreaEntry"); } static constexpr TelegramId id() { return TelegramId::EINTRETEN_FUNKTIONSRAUM; } }; struct RequestBroadcastTelegrams : TrainingAreaTelegramTmpl { Header header; int resetCounter = 0; int broadcastIndex = 0; static RequestBroadcastTelegrams fromJson(const QJsonObject &obj); QJsonObject toJson() const override; }; template <> struct Constraints { static QString type() { return QStringLiteral("RequestBroadcastTelegrams"); } static constexpr TelegramId id() { return TelegramId::NACHFORDERUNG_BROADCAST_TELEGRAMME; } }; struct SpecialSensorData : TrainingAreaTelegramTmpl { Header header; RelativePosition relPosition; int operationalState = 0; bool airSensor = false; bool tireSensor = false; bool pointSensor = false; bool solidMatterSampleExtractor = false; int type = 0; int nbcType = 0; static SpecialSensorData fromJson(const QJsonObject &obj); QJsonObject toJson() const override; }; template <> struct Constraints { static QString type() { return QStringLiteral("SpecialSensorData"); } static constexpr TelegramId id() { return TelegramId::SONDERSENSORIK_FAHRSPUR; } }; struct MinelayerTrailerDataBase { Header header; RelativePosition relPosition; int barrierId = 0; int layingDensity = 0; qint64 effectStart = 0; int effectDuration = 0; int indirectChargeTasCode = 0; int mineCount = 0; static void fromJson(const QJsonObject &obj, MinelayerTrailerDataBase &ret); QJsonObject toJson() const; }; struct MinelayerTrailerData : public TrainingAreaTelegramTmpl, MinelayerTrailerDataBase { static MinelayerTrailerData fromJson(const QJsonObject &obj); QJsonObject toJson() const override; }; template <> struct Constraints { static QString type() { return QStringLiteral("MinelayerTrailerData"); } static constexpr TelegramId id() { return TelegramId::SONDERSENSORIK_MIVANH_VERLEGEDATEN; } }; struct MinelayerThrowerData : TrainingAreaTelegramTmpl, MinelayerTrailerDataBase { enum class ThrowingType { Straight = 0, Right = 1, Left = 2, LeftAndRight = 3, SingleRight = 5, SingleLeft = 6, SingleLeftAndRight = 7 } throwingType = ThrowingType::Straight; static MinelayerThrowerData fromJson(const QJsonObject &obj); QJsonObject toJson() const override; }; template <> struct Constraints { static QString type() { return QStringLiteral("MinelayerThrowerData"); } static constexpr TelegramId id() { return TelegramId::SONDERSENSORIK_WMIV_VERLEGEDATEN; } }; struct MinelayerTrailerPosition : public TrainingAreaTelegramTmpl { Header header; RelativePosition relPosition; qint64 dusSerialNo = 0; int indirectChargeTasCode = 0; static MinelayerTrailerPosition fromJson(const QJsonObject &obj); QJsonObject toJson() const override; }; template <> struct Constraints { static QString type() { return QStringLiteral("MinelayerTrailerPosition"); } static constexpr TelegramId id() { return TelegramId::SONDERSENSORIK_MIVANH_VERLEGEPOSITION; } }; struct LanguageSelection : TrainingAreaTelegramTmpl { Header header; Language languageSelection = Language::NoChange; static LanguageSelection fromJson(const QJsonObject &obj); QJsonObject toJson() const override; }; template <> struct Constraints { static QString type() { return QStringLiteral("LanguageSelection"); } static constexpr TelegramId id() { return TelegramId::SPRACHAUSWAHL; } }; struct EquipmentMessage : TrainingAreaTelegramTmpl { Header header; std::string message; int msgId = -1; static EquipmentMessage fromJson(const QJsonObject &obj); QJsonObject toJson() const override; }; template <> struct Constraints { static QString type() { return QStringLiteral("EquipmentMessage"); } static constexpr TelegramId id() { return TelegramId::ALLGEMEINE_NACHRICHT; } }; struct EquipmentMessageOC : TrainingAreaTelegramTmpl { Header header; std::string subject; std::string message; int senderId = 0; int receiverId = 0; static EquipmentMessageOC fromJson(const QJsonObject &obj); QJsonObject toJson() const override; }; template <> struct Constraints { static QString type() { return QStringLiteral("EquipmentMessageOC"); } static constexpr TelegramId id() { return TelegramId::SR_DMF_NACHRICHT; } }; struct OpaquePayloadDataBase { Header header; std::vector payload; enum class Type { FireSmokeMarker, Geopairing, Target, OC } payloadType = Type::FireSmokeMarker; static void fromJson(const QJsonObject &obj, OpaquePayloadDataBase &ret); QJsonObject toJson() const; }; struct OpaquePayloadDataOut : TrainingAreaTelegramTmpl, OpaquePayloadDataBase { static OpaquePayloadDataOut fromJson(const QJsonObject &obj); QJsonObject toJson() const; }; template <> struct Constraints { static QString type() { return QStringLiteral("OpaquePayloadDataOut"); } static constexpr TelegramId id() { return TelegramId::DATENVERKEHR_TDS_SRT; } }; struct OpaquePayloadDataIn : TrainingAreaTelegramTmpl, OpaquePayloadDataBase { RelativePosition relPosition; GpsQuality gpsQuality; static OpaquePayloadDataIn fromJson(const QJsonObject &obj); QJsonObject toJson() const override; }; template <> struct Constraints { static QString type() { return QStringLiteral("OpaquePayloadDataIn"); } static constexpr TelegramId id() { return TelegramId::DATENVERKEHR_SRT_TDS; } }; struct EquipmentEvent : TrainingAreaTelegramTmpl { Header header; RelativePosition relPosition; int equipmentFunctionId = 0; int subDeviceId = 0; int uniqueId = 0; int code = 0; std::vector payload; static EquipmentEvent fromJson(const QJsonObject &obj); QJsonObject toJson() const override; }; template <> struct Constraints { static QString type() { return QStringLiteral("EquipmentEvent"); } static constexpr TelegramId id() { return TelegramId::GERAETEEREIGNIS; } }; struct EquipmentGearAssignment : TrainingAreaTelegramTmpl { Header header; std::vector gears; static EquipmentGearAssignment fromJson(const QJsonObject &obj); QJsonObject toJson() const override; }; template <> struct Constraints { static QString type() { return QStringLiteral("EquipmentGearAssignment"); } static constexpr TelegramId id() { return TelegramId::WAFFENZUORDNUNG; } }; struct EquipmentGearChargeState : TrainingAreaTelegramTmpl { Header header; std::vector charges; static EquipmentGearChargeState fromJson(const QJsonObject &obj); QJsonObject toJson() const override; }; template <> struct Constraints { static QString type() { return QStringLiteral("EquipmentGearChargeState"); } static constexpr TelegramId id() { return TelegramId::MUNITIONSVORRAT_EINER_ZUGEORDNETEN_WAFFE; } }; struct ExerciseEnvironmentData : TrainingAreaTelegramTmpl { Header header; int exerciseId = 0; int timeZone = 90; int utmZone = 0; int utmBand = 0; std::string grid; static ExerciseEnvironmentData fromJson(const QJsonObject &obj); QJsonObject toJson() const override; }; template <> struct Constraints { static QString type() { return QStringLiteral("ExerciseEnvironmentData"); } static constexpr TelegramId id() { return TelegramId::UMGEBUNGS_MELDUNG2; } }; struct BiteError { int errorNumber = 0; int canDeviceNumber = 0; int subdeviceNumber = 0; int uniqueId = 0; static BiteError fromJson(const QJsonObject &obj); QJsonObject toJson() const; }; struct BiteReport : TrainingAreaTelegramTmpl { Header header; enum class LoginType { NoLogin = 0, NewLogin = 1, Relogin = 2, InvalidLogin = 3, } loginType = LoginType::NoLogin; int biteState = 0; int configState = 0; int batteryState = 0; bool configError = false; std::vector biteErrors; static BiteReport fromJson(const QJsonObject &obj); QJsonObject toJson() const override; }; template <> struct Constraints { static QString type() { return QStringLiteral("BiteReport"); } static constexpr TelegramId id() { return TelegramId::BITE_MELDUNG2; } }; struct EquipmentGearEvent : TrainingAreaTelegramTmpl { Header header; GearCharge charge; int chargeAmount = 0; static EquipmentGearEvent fromJson(const QJsonObject &obj); QJsonObject toJson() const override; }; template <> struct Constraints { static QString type() { return QStringLiteral("EquipmentGearEvent"); } static constexpr TelegramId id() { return TelegramId::FEUEREREIGNIS_MIT_WAFFENZUORDNUNG; } }; struct CesHitInformation : TrainingAreaTelegramTmpl { Header header; int chargeTasCodeDirect = 0; int chargeTasCodeIndirect = 0; int originatorEquipmentNumber = 0; int directionDegree = 0; int distance = 0; int effectPercent = 0; static CesHitInformation fromJson(const QJsonObject &obj); QJsonObject toJson() const override; }; template <> struct Constraints { static QString type() { return QStringLiteral("CesHitInformation"); } static constexpr TelegramId id() { return TelegramId::AUSLOESUNG_DUS_TREFFER; } }; struct ParticipantSwVersionsRequest : TrainingAreaTelegramTmpl { Header header; int equipmentFunctionId; static ParticipantSwVersionsRequest fromJson(const QJsonObject &obj); QJsonObject toJson() const override; }; template <> struct Constraints { static QString type() { return QStringLiteral("ParticipantSwVersionsRequest"); } static constexpr TelegramId id() { return TelegramId::ANFORDERUNG_SW_VERSION; } }; struct EquipmentSwVersion { int equipmentFunctionId = 0; int subDeviceId = 0; int uniqueId = 0; int swVersion = 0; static EquipmentSwVersion fromJson(const QJsonObject &obj); QJsonObject toJson() const; }; struct ParticipantSwVersions : TrainingAreaTelegramTmpl { Header header; std::vector equipments; static ParticipantSwVersions fromJson(const QJsonObject &obj); QJsonObject toJson() const override; }; template <> struct Constraints { static QString type() { return QStringLiteral("ParticipantSwVersions"); } static constexpr TelegramId id() { return TelegramId::SW_VERSIONSMELDUNG; } }; struct CesHitRequest : TrainingAreaTelegramTmpl { Header header; int chargeTasCodeDirect = 0; int chargeTasCodeIndirect = 0; int originatorEquipmentNumber = 0; int aesDdsId = 0; AreaEffectSimulationType aesType = AreaEffectSimulationType::Unknown; int mineId = 0; int remainEffectPercent = 0; int remainEffectTasCodeDirect = 0; int buildingId = 0; int roomId = 0; RelativePosition relPosition; int reserve1 = 0; int reserve2 = 0; static CesHitRequest fromJson(const QJsonObject &obj); QJsonObject toJson() const override; }; template <> struct Constraints { static QString type() { return QStringLiteral("CesHitRequest"); } static constexpr TelegramId id() { return TelegramId::TREFFER_EREIGNIS_SEKUNDAERWIRKUNG; } }; struct TechnicalArea : TrainingAreaTelegramTmpl { Header header; int aesDdsId = 0; enum Type { Reserved = 0, RemoveArea = 1, MoutArea = 2, RestingAreaPersonnel = 3, RestingAreaVehicle = 4, RestingAreaPersonnelAndVehicle = 5 } taType = Type::Reserved; std::string name; RelativePosition relCorner; int width = 0; int height = 0; static TechnicalArea fromJson(const QJsonObject &obj); QJsonObject toJson() const override; }; template <> struct Constraints { static QString type() { return QStringLiteral("TechnicalArea"); } static constexpr TelegramId id() { return TelegramId::TECHNIK_FUNKTIONSRAUM; } }; struct ParticipantModeBase { Header header; Language language = Language::NoChange; enum class OperationMode { NoChange = 0, Normal = 1, BeStill = 2 } operationMode = OperationMode::NoChange; int reactivationDetoxication; int reactivationMaintenance; int reactivationMedic; enum class WphMode { NoChange = 0, Without = 1, With = 2 }; WphMode modeVest = WphMode::NoChange; WphMode modeHelmet = WphMode::NoChange; enum class PersonellProtection { NoChange = 0, Without = 1, Suit = 2, SuitAndGloves = 3 } personellProtectionMode = PersonellProtection::NoChange; enum class ProtectionLevel { NoChange = 0, IdzEs = 1, IdzBs = 2, Ksk = 3, SoldierWithBodyArmor = 4, SoldierActor = 5 } protectionLevel = ProtectionLevel::NoChange; enum class HandgrenadeSearchMode { NoChange = 0, Off = 1, On = 2 } handgrenadeSearchMode = HandgrenadeSearchMode::NoChange; enum class InternationalMode { NoChange = 0, Off = 1, On = 2 } internationalMode = InternationalMode::NoChange; enum class ABCProtectionMode { NoChange = 0, Off = 1, On = 2 } abcProtectionMode = ABCProtectionMode::NoChange; static void fromJson(const QJsonObject &obj, ParticipantModeBase &ret); QJsonObject toJson() const; }; struct ParticipantMode : TrainingAreaTelegramTmpl, ParticipantModeBase { static ParticipantMode fromJson(const QJsonObject &obj); QJsonObject toJson() const override; }; template <> struct Constraints { static QString type() { return QStringLiteral("ParticipantMode"); } static constexpr TelegramId id() { return TelegramId::TEILNEHMERMODE_SETZEN; } }; struct ParticipantModeReport : TrainingAreaTelegramTmpl, ParticipantModeBase { static ParticipantModeReport fromJson(const QJsonObject &obj); QJsonObject toJson() const override; }; template <> struct Constraints { static QString type() { return QStringLiteral("ParticipantModeReport"); } static constexpr TelegramId id() { return TelegramId::TEILNEHMERMODE_MELDUNG; } }; struct DemandParticipantMode : TrainingAreaTelegramTmpl { Header header; static DemandParticipantMode fromJson(const QJsonObject &obj); QJsonObject toJson() const override; }; template <> struct Constraints { static QString type() { return QStringLiteral("DemandParticipantMode"); } static constexpr TelegramId id() { return TelegramId::TEILNEHMERMODE_ANFORDERN; } }; struct ParticipantConfigurationBase { Header header; int positionIntervallVehicle = 0; int positionIntervallPersonell = 0; int positionIntervallAircraft = 0; int positionTransmissionIntervall = 0; int heightbarrier = 0; enum class FaultPositionHandling { NoChange = 0, NoPositions = 1, InvalidPositionValue = 2, EstimatedPosition = 3 } faultPositionHandling = FaultPositionHandling::NoChange; enum class SwitchingPositionIntervall { NoChange = 0, On = 1, Off = 2 } switchingPositionIntervall = SwitchingPositionIntervall::NoChange; int waittimeAdditionalBroadcastDemand = 0; int factorWaittimeIncreaseAtHighload = 0; int waittimeAutomaticVulnerabilityIncreaseLevel1 = 0; int waittimeAutomaticVulnerabilityIncreaseLevel2 = 0; int waittimeAutomaticVulnerabilityIncreaseLevel3 = 0; enum class OpticalCode { NoChange = 0, Osag10 = 1, Osag20Basic = 2, SisoStandard = 3 } opticalCode = OpticalCode::NoChange; int vulnerabilityModel = 0; int validTimeOps = 0; static void fromJson(const QJsonObject &obj, ParticipantConfigurationBase &ret); QJsonObject toJson() const; }; struct ParticipantConfigurationReport : TrainingAreaTelegramTmpl, ParticipantConfigurationBase { static ParticipantConfigurationReport fromJson(const QJsonObject &obj); QJsonObject toJson() const override; }; template <> struct Constraints { static QString type() { return QStringLiteral("ParticipantConfigurationReport"); } static constexpr TelegramId id() { return TelegramId::TEILNEHMER_KONFIG_ANTWORT; } }; struct ParticipantConfiguration : TrainingAreaTelegramTmpl, ParticipantConfigurationBase { static ParticipantConfiguration fromJson(const QJsonObject &obj); QJsonObject toJson() const override; }; template <> struct Constraints { static QString type() { return QStringLiteral("ParticipantConfiguration"); } static constexpr TelegramId id() { return TelegramId::TEILNEHMER_KONFIG_SETZEN; } }; struct DemandParticipantConfiguration : TrainingAreaTelegramTmpl { Header header; static DemandParticipantConfiguration fromJson(const QJsonObject &obj); QJsonObject toJson() const override; }; template <> struct Constraints { static QString type() { return QStringLiteral("DemandParticipantConfiguration"); } static constexpr TelegramId id() { return TelegramId::TEILNEHMER_KONFIG_ANFORDERN; } }; struct SanitationRepair : TrainingAreaTelegramTmpl { Header header; OriginatorType originatorType; int equipmentNumberOrigin; VulnerabilityState stateStart; int typeOfTreatment; int triage; int tyeOfDamage; VulnerabilityState stateResult; enum class TreatmentResult { None = 0, Success = 1, Stabilized = 2, Failure = 3 } treatmentResult = TreatmentResult::None; int triagePriority; int fullState; int timeOfTreatment; int timeOfRecovery; static SanitationRepair fromJson(const QJsonObject &obj); QJsonObject toJson() const override; }; template <> struct Constraints { static QString type() { return QStringLiteral("SanitationRepair"); } static constexpr TelegramId id() { return TelegramId::SANITAETSDIENST_INSTANDSETZUNG; } }; struct SanitaryMaterialStockReport : TrainingAreaTelegramTmpl { Header header; int uniqueId; int originatorEquipmentNumber; Qualification qualification; int sanitaryMaterialCount; std::vector sanitaryMaterialStock; static SanitaryMaterialStockReport fromJson(const QJsonObject &obj); QJsonObject toJson() const override; }; template <> struct Constraints { static QString type() { return QStringLiteral("SanitaryMaterialStockReport"); } static constexpr TelegramId id() { return TelegramId::BESTANDSMELDUNG_SANITAETSMATERIAL; } }; struct Sanitation : TrainingAreaTelegramTmpl { Header header; qint64 proceduresTaken; SanitationResult sanitationResult; SanitationEvaluation sanitationEvaluation; int uniqeId; int originatorEquipmentNumber; Qualification qualification = Qualification::NotDefined; static Sanitation fromJson(const QJsonObject &obj); QJsonObject toJson() const override; }; template <> struct Constraints { static QString type() { return QStringLiteral("Sanitation"); } static constexpr TelegramId id() { return TelegramId::SANITAETSDIENST_INSTANDSETZUNG_PVSAN; } }; struct ExerciseStateData : TrainingAreaTelegramTmpl { Header header; enum class ExerciseState { Unknown = 0, Created = 1, Started = 2, Paused = 3, Stopped = 5, Terminated = 6 } exerciseState = ExerciseState::Unknown; int exerciseId = 0; static ExerciseStateData fromJson(const QJsonObject &obj); QJsonObject toJson() const override; }; template <> struct Constraints { static QString type() { return QStringLiteral("ExerciseStateData"); } static constexpr TelegramId id() { return TelegramId::BETRIEBSZUSTANDSMELDUNG; } }; struct EmergencyCall : TrainingAreaTelegramTmpl { int issi = 0; AbsolutePosition absPosition; qint64 timeStamp; static EmergencyCall fromJson(const QJsonObject &obj); QJsonObject toJson() const override; }; template <> struct Constraints { static QString type() { return QStringLiteral("EmergencyCall"); } static constexpr TelegramId id() { return TelegramId::NOTRUF; } }; struct RequestBroadcastStatistics : TrainingAreaTelegramTmpl { Header header; static RequestBroadcastStatistics fromJson(const QJsonObject &obj); QJsonObject toJson() const override; }; template <> struct Constraints { static QString type() { return QStringLiteral("RequestBroadcastStatistics"); } static constexpr TelegramId id() { return TelegramId::ANFORDERUNG_STATISTIK_BROADCAST_NACHFORDERUNGEN; } }; struct BroadcastInformation { int equipmentNumber = 0; int broadcastRequests = 0; static BroadcastInformation fromJson(const QJsonObject &obj); QJsonObject toJson() const; }; struct BroadcastStatistics : TrainingAreaTelegramTmpl { Header header; std::vector information; static BroadcastStatistics fromJson(const QJsonObject &obj); QJsonObject toJson() const override; }; template <> struct Constraints { static QString type() { return QStringLiteral("BroadcastStatistics"); } static constexpr TelegramId id() { return TelegramId::STATISTIK_BROADCAST_NACHFORDERUNGEN; } }; struct GroupIssiInformation { int exerciseId = 0; int serverIssi = 0; int broadcastIssi1 = 0; int broadcastIssi2 = 0; static GroupIssiInformation fromJson(const QJsonObject &obj); QJsonObject toJson() const; }; struct ExerciseEquipmentAssignmentComplete : TrainingAreaTelegramTmpl { std::unordered_map> exerciseEquipmentAssignments; std::vector groupIssiInformation; static ExerciseEquipmentAssignmentComplete fromJson(const QJsonObject &obj); QJsonObject toJson() const override; }; template <> struct Constraints { static QString type() { return QStringLiteral("ExerciseEquipmentAssignmentComplete"); } static constexpr TelegramId id() { return TelegramId::EXERCISE_EQUIPMENT_ASSIGNMENT_COMPLETE; } }; struct ProxyConnectionState : public TrainingAreaTelegramTmpl { bool connectedToSystem = false; static ProxyConnectionState fromJson(const QJsonObject &obj); QJsonObject toJson() const override; }; template <> struct Constraints { static QString type() { return QStringLiteral("ProxyConnectionState"); } static constexpr TelegramId id() { return TelegramId::PROXY_CONNECTION_STATE; } }; struct ParticipantLicenseChange : public TrainingAreaTelegramTmpl { int equipmentNumber = 0; ParticipantLicenseState licenseState = ParticipantLicenseState::Unknown; static ParticipantLicenseChange fromJson(const QJsonObject &obj); QJsonObject toJson() const override; }; template <> struct Constraints { static QString type() { return QStringLiteral("ParticipantLicenseChange"); } static constexpr TelegramId id() { return TelegramId::PARTICIPANT_LICENSE_CHANGE; } }; struct WlsParticipantsStateRequest : public TrainingAreaTelegramTmpl { static WlsParticipantsStateRequest fromJson(const QJsonObject &obj); QJsonObject toJson() const override; }; template <> struct Constraints { static QString type() { return QStringLiteral("WlsParticipantsStateRequest"); } static constexpr TelegramId id() { return TelegramId::WLS_PARTICIPANTS_STATE_REQUEST; } }; struct WlsParticipantsStateReport : public TrainingAreaTelegramTmpl { std::vector participantStates; static WlsParticipantsStateReport fromJson(const QJsonObject &obj); QJsonObject toJson() const override; }; template <> struct Constraints { static QString type() { return QStringLiteral("WlsParticipantsStateReport"); } static constexpr TelegramId id() { return TelegramId::WLS_PARTICIPANTS_STATE_REPORT; } }; struct WlsBinarySfmData : public TrainingAreaTelegramTmpl { Header header; std::vector payload; static WlsBinarySfmData fromJson(const QJsonObject &obj); QJsonObject toJson() const override; }; template <> struct Constraints { static QString type() { return QStringLiteral("WlsBinarySfmData"); } static constexpr TelegramId id() { return TelegramId::WLS_BINARY_SFM_DATA; } }; struct WlsParticipantsConnectionState : public TrainingAreaTelegramTmpl { int equipmentNumber = 0; bool dataCommunicationPossible = false; static WlsParticipantsConnectionState fromJson(const QJsonObject &obj); QJsonObject toJson() const override; }; template <> struct Constraints { static QString type() { return QStringLiteral("WlsParticipantsConnectionState"); } static constexpr TelegramId id() { return TelegramId::WLS_PARTICIPANT_CONNECTION_STATE; } }; struct ApacheLaserDesignation : TrainingAreaTelegramTmpl { Header header; int gearId; int code; double outputPower; AbsolutePosition spotLocation; static ApacheLaserDesignation fromJson(const QJsonObject &obj); QJsonObject toJson() const override; }; template <> struct Constraints { static QString type() { return QStringLiteral("ApacheLaserDesignation"); } static constexpr TelegramId id() { return TelegramId::APACHE_LASER_DESIGNATION; } }; struct BatteryInfo : TrainingAreaTelegramTmpl { Header header; std::vector batteryStates; static BatteryInfo fromJson(const QJsonObject &obj); QJsonObject toJson() const override; }; template <> struct Constraints { static QString type() { return QStringLiteral("BatteryInfo"); } static constexpr TelegramId id() { return TelegramId::BATTERY_INFO; } }; struct BatteryAlarm : TrainingAreaTelegramTmpl { Header m_header; int m_id; QString m_description; bool m_acknowledge; bool m_condition; int m_uniqueAlarmNumber; qint64 m_alarmTime; Header header() const { return m_header; } QString description() const { return m_description; } bool acknowledge() const { return m_acknowledge; } bool condition() const { return m_condition; } int uniqueAlarmNumber() const { return m_uniqueAlarmNumber; } qint64 alarmTime() const { return m_alarmTime; } static BatteryAlarm fromJson(const QJsonObject &obj); QJsonObject toJson() const override; }; template <> struct Constraints { static QString type() { return QStringLiteral("BatteryAlarm"); } static constexpr TelegramId id() { return TelegramId::BATTERY_ALARM; } }; struct ServiceControl : TrainingAreaTelegramTmpl { Header header; ServiceControlEnum serviceControlState; static ServiceControl fromJson(const QJsonObject &obj); QJsonObject toJson() const override; }; template <> struct Constraints { static QString type() { return QStringLiteral("ServiceControl"); } static constexpr TelegramId id() { return TelegramId::SERVICE_CONTROL; } }; struct SetDevicePowerRequest : TrainingAreaTelegramTmpl { Header header; PowerMethod powerType; int subdeviceId; static SetDevicePowerRequest fromJson(const QJsonObject &obj); QJsonObject toJson() const override; }; template <> struct Constraints { static QString type() { return QStringLiteral("SetPowerDeviceRequest"); } static constexpr TelegramId id() { return TelegramId::DEVICE_POWER_SET_REQUEST; } }; struct UAVPerformMission : TrainingAreaTelegramTmpl { Header header; std::vector actions; int missionId; QString missionName; static UAVPerformMission fromJson(const QJsonObject &obj); QJsonObject toJson() const override; static QString HEADER() { return QLatin1String("header"); } static QString ACTIONS() { return QLatin1String("actions"); } static QString MISSION_ID() { return QLatin1String("missionId"); } static QString MISSION_NAME() { return QLatin1String("missionName"); } }; template <> struct Constraints { static QString type() { return QStringLiteral("UAVPerformMission"); } static constexpr TelegramId id() { return TelegramId::UAV_PERFORM_MISSION; } }; struct UAVStatus : TrainingAreaTelegramTmpl { Header header; UAVState uavState; static UAVStatus fromJson(const QJsonObject &obj); QJsonObject toJson() const override; static QString HEADER() { return QLatin1String("header"); } static QString UAVSTATE() { return QLatin1String("uavState"); } }; template <> struct Constraints { static QString type() { return QStringLiteral("UAVState"); } static constexpr TelegramId id() { return TelegramId::UAV_STATUS; } }; struct UAVRadioLinkConnectionStatus : TrainingAreaTelegramTmpl { Header header; UAVRadioLinkConnectionStatusType uavConnectionState; static UAVRadioLinkConnectionStatus fromJson(const QJsonObject &obj); QJsonObject toJson() const override; static QString HEADER() { return QLatin1String("header"); } static QString UAVCONNECTIONSTATE() { return QLatin1String("uavConnectionState"); } }; template <> struct Constraints { static QString type() { return QStringLiteral("UAVRadioLinkConnectionStatus"); } static constexpr TelegramId id() { return TelegramId::UAV_RADIO_LINK_CONNECTION_STATUS; } }; struct UAVMissionStatus : TrainingAreaTelegramTmpl { Header header; UAVActionTask currentAction; QString currentMissionName; QString missionEnded; static UAVMissionStatus fromJson(const QJsonObject &obj); QJsonObject toJson() const override; static QString HEADER() { return QLatin1String("header"); } static QString CURRENT_ACTION() { return QLatin1String("currentAction"); } static QString CURRENT_MISSION_NAME() { return QLatin1String("currentMissionName"); } static QString MISSION_ENDED() { return QLatin1String("missionEnded"); } }; template <> struct Constraints { static QString type() { return QStringLiteral("UAVMissionStatus"); } static constexpr TelegramId id() { return TelegramId::UAV_MISSION_STATUS; } }; struct UAVChangeState : TrainingAreaTelegramTmpl { Header header; UAVState requestedState; static UAVChangeState fromJson(const QJsonObject &obj); QJsonObject toJson() const override; static QString HEADER() { return QLatin1String("header"); } static QString REQUESTED_STATE() { return QLatin1String("requestedState"); } }; template <> struct Constraints { static QString type() { return QStringLiteral("UAVChangeState"); } static constexpr TelegramId id() { return TelegramId::UAV_CHANGE_STATE; } }; struct ExFireReadiness : TrainingAreaTelegramTmpl { Header header; int partyId; QString reference; static ExFireReadiness fromJson(const QJsonObject &obj); QJsonObject toJson() const override; static QString HEADER() { return QLatin1String("header"); } static QString PARTY_ID() { return QLatin1String("partyId"); } static QString REFERENCE() { return QLatin1String("reference"); } }; template <> struct Constraints { static QString type() { return QStringLiteral("ExFiredReport"); } static constexpr TelegramId id() { return TelegramId::EX_FIRE_READINESS; } }; struct ExFiredReport : TrainingAreaTelegramTmpl { Header header; int partyId; QString reference; QString unitIdentifier; QString identifier; static ExFiredReport fromJson(const QJsonObject &obj); QJsonObject toJson() const override; static QString HEADER() { return QLatin1String("header"); } static QString PARTY_ID() { return QLatin1String("partyId"); } static QString REFERENCE() { return QLatin1String("reference"); } static QString UNIT_IDENTIFIER() { return QLatin1String("unitIdentifier"); } static QString IDENTIFIER() { return QLatin1String("identifier"); } }; template <> struct Constraints { static QString type() { return QStringLiteral("ExFiredReport"); } static constexpr TelegramId id() { return TelegramId::EX_FIRED_REPORT; } }; struct ExConfirmationReport : TrainingAreaTelegramTmpl { Header header; int partyId; QString reference; QString unitIdentifier; QString identifier; static ExConfirmationReport fromJson(const QJsonObject &obj); QJsonObject toJson() const override; static QString HEADER() { return QLatin1String("header"); } static QString PARTY_ID() { return QLatin1String("partyId"); } static QString REFERENCE() { return QLatin1String("reference"); } static QString UNIT_IDENTIFIER() { return QLatin1String("unitIdentifier"); } static QString IDENTIFIER() { return QLatin1String("identifier"); } }; template <> struct Constraints { static QString type() { return QStringLiteral("ExConfirmationReport"); } static constexpr TelegramId id() { return TelegramId::EX_CONFIRMATION_REPORT; } }; } }