Files
qt5-legatus-legacy/Lts/Proxies/TrainingAreaBase/training_area_telegrams.h
T
2026-08-13 18:33:10 +02:00

2524 lines
73 KiB
C++
Executable File

/**
* Structures defined in the ETS Tetra ICD
* $Id$
* $HeadURL$
* $Author$
* Created by Christian Ehrlicher, SLSE, 2016-04-14
*/
#pragma once
#include <QString>
#include <ctime>
#include <string>
#include <vector>
#include <cstdint>
#include <bitset>
#include <unordered_map>
#include <unordered_set>
#include <QJsonObject>
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;
};
// pure enum for prtcnv internals for now
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,
};
/*!
\details PATSIM Telegrams only available in PatSim Feature Branch
*/
// PATSIM_EYES_BLINK_RATE_SET = 4199,
// PATSIM_HEART_RATE_SET = 4200,
// PATSIM_RESPIRATORY_RATE_SET = 4201,
// PATSIM_BODY_TEMPERATURE_SET = 4202,
// PATSIM_BLOOD_OXYGEN_PERIPHERAL_SATURATION_SET = 4203,
// PATSIM_BLOOD_PRESSURE_SET = 4204,
// PATSIM_GET_MEDICAL_INFORMATION = 4205,
// PATSIM_MEDICAL_INFORMATION = 4206,
/*!
\details APACHE Telegrams defined in TAB-Plugin: ApacheHlaJson, Exclusion APACHE_LASER_DESIGNATION
*/
// APACHE_HLA_ADD_PARTICIPANT = 8000,
// APACHE_HLA_REMOVE_PARTICIPANT = 8001,
// APACHE_HLA_POSITION_CHANGED = 8003,
// APACHE_HLA_VULNERABILITY_STATE_CHANGED = 8003,
// APACHE_HLA_SEND_CHARGE_TYPES = 8005
// APACHE_HLA_AIR_SUPPORT_MODIFY_REQUEST = 8006
template <typename T>
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 <typename T>
struct TrainingAreaTelegramTmpl : TrainingAreaTelegram
{
QString type() const override final { return Constraints<T>::type(); }
TelegramId id() const override final { return Constraints<T>::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 // typical process: disarm => arm => takeoff => loiter => observe => return => disarm
{
Undefined = 0, // unknown, invalid, disconnected, etc.
Disarm = 1, // engines off, but drone is connected
Arm = 2, // engines on, ready to takeoff
Takeoff = 3, // currently in the process of taking off into the air - will later result in loiter
Connect = 4, // stop, currently in the air, flying, doing nothing
Loiter = 5, // use this to let a drone fly to a waypoint (only possible if loitering)
Return = 6, // currently in the process of flying back home and turning off the engines - will later result in disarm
Observe = 8, // going to flight to position
};
enum class UAVRadioLinkConnectionStatusType
{
/// The connection is in a undefined state.
Undefined = 0,
/// The link is currently disconnected.
Disconnected = 1,
/// The link is currently connecting.
Connecting = 2,
/// The link is currently disconnecting
Diconnecting = 3,
/// The link is currently connected.
Connected = 4,
/// The link is currently in error state.
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; // when set, then RelativePosition is invalid
int moutObjectId = 0; //@invisible
int moutRoomId = 0; //@invisible
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; // 1 .. 6
int wlsBuildingId = 0; // = externalWlsId
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 batteryPort;
int batteryPercent;
int voltage;
int temperature;
int frequency;
int generic;
int current;
bool switchOrValue;
QString serialNumber;
static BatteryState fromJson(const QJsonObject &obj);
QJsonObject toJson() const;
};
struct UAVAction
{
UAVActionTask task;
AbsolutePosition absPosition; // waypoint
// TODO: attitude, velocity, arrivalTime, timeUntilArrival, departureTime, residenceTime ?
static QString TASK() { return QLatin1String("task"); }
static QString POSITION() { return QLatin1String("position"); }
static UAVAction fromJson(const QJsonObject &obj);
QJsonObject toJson() const;
};
// 0 (in/out)
struct Acknowledge : TrainingAreaTelegramTmpl<Acknowledge>
{
qint64 timeStamp = 0;
int32_t ackCounter = 0;
static Acknowledge fromJson(const QJsonObject &obj);
QJsonObject toJson() const override;
};
template <> struct Constraints<Acknowledge>
{
static QString type() { return QStringLiteral("Acknowledge"); }
static constexpr TelegramId id() { return TelegramId::BESTAETIGUNG; }
};
// 1 (out)
struct Init : TrainingAreaTelegramTmpl<Init>
{
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<Init>
{
static QString type() { return QStringLiteral("Init"); }
static constexpr TelegramId id() { return TelegramId::INIT; }
};
// 2 (in)
struct ManipulationReport : TrainingAreaTelegramTmpl<ManipulationReport>
{
Header header;
bool isManipulation = false;
int equipmentFunctionId;
static ManipulationReport fromJson(const QJsonObject &obj);
QJsonObject toJson() const override;
};
template <> struct Constraints<ManipulationReport>
{
static QString type() { return QStringLiteral("ManipulationReport"); }
static constexpr TelegramId id() { return TelegramId::MANIPULATIONSMELDUNG; }
};
// 4 (out)
struct DemandBite : TrainingAreaTelegramTmpl<DemandBite>
{
Header header;
bool withSelfTest = false;
static DemandBite fromJson(const QJsonObject &obj);
QJsonObject toJson() const override;
};
template <> struct Constraints<DemandBite>
{
static QString type() { return QStringLiteral("DemandBite"); }
static constexpr TelegramId id() { return TelegramId::AUFFORDERUNG_BITE_MELDUNG; }
};
// 7 (in)
struct EquipmentOperationalState : TrainingAreaTelegramTmpl<EquipmentOperationalState>
{
Header header;
bool nbcProtectionActive = false;
static EquipmentOperationalState fromJson(const QJsonObject &obj);
QJsonObject toJson() const override;
};
template <> struct Constraints<EquipmentOperationalState>
{
static QString type() { return QStringLiteral("EquipmentOperationalState"); }
static constexpr TelegramId id() { return TelegramId::BETRIEBSZUSTAND_AUSSTATTUNG; }
};
// 9 (out)
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<SetVulnerabilityModel>, VulnerabilityModelBase
{
static SetVulnerabilityModel fromJson(const QJsonObject &obj);
QJsonObject toJson() const override;
};
template <> struct Constraints<SetVulnerabilityModel>
{
static QString type() { return QStringLiteral("SetVulnerabilityModel"); }
static constexpr TelegramId id() { return TelegramId::KONFIGURATION_WIRKMODELL; }
};
// 10 (out)
struct DemandEquipmentConfigurationReport : TrainingAreaTelegramTmpl<DemandEquipmentConfigurationReport>
{
Header header;
static DemandEquipmentConfigurationReport fromJson(const QJsonObject &obj);
QJsonObject toJson() const override;
};
template <> struct Constraints<DemandEquipmentConfigurationReport>
{
static QString type() { return QStringLiteral("DemandEquipmentConfigurationReport"); }
static constexpr TelegramId id() { return TelegramId::ANFORDERUNG_KONFIGURATIONSDATEN; }
};
// 11 (in)
struct EquipmentConfigurationReport : TrainingAreaTelegramTmpl<EquipmentConfigurationReport>, VulnerabilityModelBase
{
int equipmentNumber = 0;
int canStartUpTime = 0;
int equipmentType = 0;
int loginWaittimeBitweenTrys = 0;
int loginMaxRetryCnt = 0;
bool loginMasteringFlag = false;
int canDeviceConfiguration; // Bitfield
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 // German abbrevation to distinguish from VISS
{
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<EquipmentConfigurationReport>
{
static QString type() { return QStringLiteral("EquipmentConfigurationReport"); }
static constexpr TelegramId id() { return TelegramId::KONFIGURATIONSMELDUNG; }
};
// 12 (in)
struct CtaDataError : TrainingAreaTelegramTmpl<CtaDataError>
{
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<CtaDataError>
{
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;
};
// 13 in
struct RestoreRadioReadiness : public TrainingAreaTelegramTmpl<RestoreRadioReadiness>
{
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<RestoreRadioReadiness>
{
static QString type() { return QStringLiteral("RestoreRadioReadiness"); }
static constexpr TelegramId id() { return TelegramId::WIEDERHERSTELLUNG_FUNKBEREITSCHAFT; }
};
// 21 (in)
struct PositionReport : public TrainingAreaTelegramTmpl<PositionReport>, PositionReportBase
{
static PositionReport fromJson(const QJsonObject &obj);
QJsonObject toJson() const override;
};
template <> struct Constraints<PositionReport>
{
static QString type() { return QStringLiteral("PositionReport"); }
static constexpr TelegramId id() { return TelegramId::POSITIONS_MELDUNG; }
};
// 22 (in)
struct PositionReportWithMountedEquipments : TrainingAreaTelegramTmpl<PositionReportWithMountedEquipments>, PositionReportBase
{
std::vector<int> mountedEquipments;
static PositionReportWithMountedEquipments fromJson(const QJsonObject &obj);
QJsonObject toJson() const override;
};
template <> struct Constraints<PositionReportWithMountedEquipments>
{
static QString type() { return QStringLiteral("PositionReportWithMountedEquipments"); }
static constexpr TelegramId id() { return TelegramId::POSITIONS_MELDUNG_MIT_TEILNEHMER; }
};
struct CreateAreaEffectSimulationBase
{
Header header;
int aesDdsId = 0; // EXCON internal id
//int aesTetraIdUnused = 0; // CTAS id (not used atm)
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;
};
// 25 (out)
struct OcCommand : TrainingAreaTelegramTmpl<OcCommand>
{
Header header;
int action = 0;
static OcCommand fromJson(const QJsonObject &obj);
QJsonObject toJson() const override;
};
template <> struct Constraints<OcCommand>
{
static QString type() { return QStringLiteral("OcCommand"); }
static constexpr TelegramId id() { return TelegramId::SCHIEDSRICHTERKOMMANDO; }
};
// 31 (out)
struct CreateSingleExplosion : TrainingAreaTelegramTmpl<CreateSingleExplosion>, CreateCombatAreaEffectSimulationBase
{
int effectDiameter = 0;
static CreateSingleExplosion fromJson(const QJsonObject &obj);
QJsonObject toJson() const override;
};
template <> struct Constraints<CreateSingleExplosion>
{
static QString type() { return QStringLiteral("CreateSingleExplosion"); }
static constexpr TelegramId id() { return TelegramId::WIRKFELD_EINZELGESCHOSS; }
};
// 32 (out)
struct CreateAreaExplosion : TrainingAreaTelegramTmpl<CreateAreaExplosion>, CreateCombatAreaEffectSimulationBase
{
RelativePosition relCorner;
int height{0};
int width{0};
double rotationAngle{0.0};
int impactCount{0};
int impactEdgeLength{0};
double mhpRotation{0.0}; //GUEZ only
int mhpLength{0}; //GUEZ only
int mhpWidth{0}; //GUEZ only
int impactRadius{0};// Wirkradius Instead of impactEdgeLength in GUEZ //GUEZ only
std::vector<RelativePosition> mhPoints; //GUEZ only
int hazardDistance;
static CreateAreaExplosion fromJson(const QJsonObject &obj);
QJsonObject toJson() const override;
};
template <> struct Constraints<CreateAreaExplosion>
{
static QString type() { return QStringLiteral("CreateAreaExplosion"); }
static constexpr TelegramId id() { return TelegramId::WIRKFELD_FLAECHENDECKENDES_FEUER; }
};
// 33 (out)
struct PauseEffectSimulation : TrainingAreaTelegramTmpl<PauseEffectSimulation>
{
int aesDdsId = 0;
//int aesTetraIdUnused = 0;
static PauseEffectSimulation fromJson(const QJsonObject &obj);
QJsonObject toJson() const override;
};
template <> struct Constraints<PauseEffectSimulation>
{
static QString type() { return QStringLiteral("PauseEffectSimulation"); }
static constexpr TelegramId id() { return TelegramId::WIRKFELD_FLAECHENDECKENDES_FEUER_STOP; }
};
// 34 (out)
struct ResumeEffectSimulation : TrainingAreaTelegramTmpl<ResumeEffectSimulation>
{
int aesDdsId = 0;
//int aesTetraIdUnused = 0;
int sequelNumber = 0;
int nextImpact = 0;
qint64 resumeTime;
int remainDuration;
static ResumeEffectSimulation fromJson(const QJsonObject &obj);
QJsonObject toJson() const override;
};
template <> struct Constraints<ResumeEffectSimulation>
{
static QString type() { return QStringLiteral("ResumeEffectSimulation"); }
static constexpr TelegramId id() { return TelegramId::WIRKFELD_FLAECHENDECKENDES_FEUER_FORTSETZEN; }
};
// 35 (out)
struct MineAreaSegment
{
RelativePosition relStart;
RelativePosition relEnd;
static MineAreaSegment fromJson(const QJsonObject &obj);
QJsonObject toJson() const;
};
struct CreateMineArea : TrainingAreaTelegramTmpl<CreateMineArea>, CreateCombatAreaEffectSimulationBase
{
// int areaWidth = 0;
// int areaHeight = 0;
double layingDepth = 0;
double layingDensity = 0;
std::vector<MineAreaSegment> segments;
static CreateMineArea fromJson(const QJsonObject &obj);
QJsonObject toJson() const override;
};
template <> struct Constraints<CreateMineArea>
{
static QString type() { return QStringLiteral("CreateMineArea"); }
static constexpr TelegramId id() { return TelegramId::WIRKFELD_MINENSPERRE; }
};
// 36 (out)
struct MineAreaSingleMineState : TrainingAreaTelegramTmpl<MineAreaSingleMineState>
{
int aesDdsId = 0;
//int aesTetraIdUnused = 0;
int mineCount = 0;
std::vector<unsigned char> mineState; // bitfield: 1 -> active, 0 -> triggered
static MineAreaSingleMineState fromJson(const QJsonObject &obj);
QJsonObject toJson() const override;
};
template <> struct Constraints<MineAreaSingleMineState>
{
static QString type() { return QStringLiteral("MineAreaSingleMineState"); }
static constexpr TelegramId id() { return TelegramId::WIRKFELD_STATUS_MINENSPERRE; }
};
// 37 (out)
struct CreateNContamination : TrainingAreaTelegramTmpl<CreateNContamination>, CreateCombatAreaEffectSimulationBase
{
int innerRadius = 0;
int borderLengthInner = 0;
int borderLengthOuter = 0;
double spanAngle = 0; // degree
double rotationAngle = 0; // degree
static CreateNContamination fromJson(const QJsonObject &obj);
QJsonObject toJson() const override;
};
template <> struct Constraints<CreateNContamination>
{
static QString type() { return QStringLiteral("CreateNContamination"); }
static constexpr TelegramId id() { return TelegramId::WIRKFELD_A_KAMPFMITTEL; }
};
// 38 (out)
struct CreateCContamination : TrainingAreaTelegramTmpl<CreateCContamination>, CreateCombatAreaEffectSimulationBase
{
int effectRadius = 0;
double expansionFactor = 0; // only for floating, 0..2,55m/s
double propagationDirection = 0; // degree
int windSpeed = 0; // m/s
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<CreateCContamination>
{
static QString type() { return QStringLiteral("CreateCContamination"); }
static constexpr TelegramId id() { return TelegramId::WIRKFELD_C_KAMPFMITTEL; }
};
// 39 (out)
struct DeactivateEffectSimulation : TrainingAreaTelegramTmpl<DeactivateEffectSimulation>
{
AreaEffectSimulationType aesType = AreaEffectSimulationType::Unknown;
int aesDdsId = 0;
//int aesTetraIdUnused = 0;
static DeactivateEffectSimulation fromJson(const QJsonObject &obj);
QJsonObject toJson() const override;
};
template <> struct Constraints<DeactivateEffectSimulation>
{
static QString type() { return QStringLiteral("DeactivateEffectSimulation"); }
static constexpr TelegramId id() { return TelegramId::DEAKTIVIERUNG_WIRKFELD; }
};
// 40 (out)
struct ModifyAreaEffectSimulationName : TrainingAreaTelegramTmpl<ModifyAreaEffectSimulationName>
{
AreaEffectSimulationType aesType = AreaEffectSimulationType::Unknown;
int aesDdsId = 0;
//int aesTetraIdUnused = 0;
std::string name;
static ModifyAreaEffectSimulationName fromJson(const QJsonObject &obj);
QJsonObject toJson() const override;
};
template <> struct Constraints<ModifyAreaEffectSimulationName>
{
static QString type() { return QStringLiteral("ModifyAreaEffectSimulationName"); }
static constexpr TelegramId id() { return TelegramId::WIRKFELD_AENDERUNG_BEZEICHNER; }
};
// 41 (in for virtual mines / out for virtual and real mines)
struct MineTriggered : TrainingAreaTelegramTmpl<MineTriggered>
{
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<MineTriggered>
{
static QString type() { return QStringLiteral("MineTriggered"); }
static constexpr TelegramId id() { return TelegramId::DEAKTIVIERUNG_EINZELMINE; }
};
// 42 (out)
struct DusMineReactivation : TrainingAreaTelegramTmpl<DusMineReactivation>
{
Header header;
std::vector<int> dusSerialNumbers;
static DusMineReactivation fromJson(const QJsonObject &obj);
QJsonObject toJson() const override;
};
template <> struct Constraints<DusMineReactivation>
{
static QString type() { return QStringLiteral("DusMineReactivation"); }
static constexpr TelegramId id() { return TelegramId::REAKTIVIERUNG_DUS_MINE; }
};
// 43 (in)
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<DefinitionIed>, IedBaseData
{
RelativePosition relPosition;
IedType iedType = IedType::SuicideIed;
enum class TriggerTypes {
Remote = 0x01,
Switch = 0x02,
LightBarrier = 0x04,
TautWire = 0x08
};
int trigger = 0; // bitfield
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<DefinitionIed>
{
static QString type() { return QStringLiteral("DefinitionIed"); }
static constexpr TelegramId id() { return TelegramId::DEFINITION_IED; }
};
// 44 (in)
enum class IedError
{
NoError = 0,
DeviceMissing = 1
};
struct StateIed : TrainingAreaTelegramTmpl<StateIed>, 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<StateIed>
{
static QString type() { return QStringLiteral("StateIed"); }
static constexpr TelegramId id() { return TelegramId::ZUSTAND_IED; }
};
// 45 (in)
struct DusSingleMineState : TrainingAreaTelegramTmpl<DusSingleMineState>
{
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<DusSingleMineState>
{
static QString type() { return QStringLiteral("DusSingleMineState"); }
static constexpr TelegramId id() { return TelegramId::STATUS_EINZELMINENSIMULATOR; }
};
// 46 (out)
struct CreateDusSingleMine : TrainingAreaTelegramTmpl<CreateDusSingleMine>, CreateCombatAreaEffectSimulationBase
{
int mineId;
static CreateDusSingleMine fromJson(const QJsonObject &obj);
QJsonObject toJson() const override;
};
template <> struct Constraints<CreateDusSingleMine>
{
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;
};
// 52 (in)
struct StateChangeDirect : TrainingAreaTelegramTmpl<StateChangeDirect>, StateChangeBase
{
int chargeTypeId = 0;
static StateChangeDirect fromJson(const QJsonObject &obj);
QJsonObject toJson() const override;
};
template <> struct Constraints<StateChangeDirect>
{
static QString type() { return QStringLiteral("StateChangeDirect"); }
static constexpr TelegramId id() { return TelegramId::TREFFER_EREIGNIS_DUS; }
};
// 53 (in)
struct StateChangeIndirect : TrainingAreaTelegramTmpl<StateChangeIndirect>, StateChangeBase
{
bool isSecondaryEffect = false; // [GUEZE-3031] Differentiation between direct hits on a participant or secondary impact through a building hit
static StateChangeIndirect fromJson(const QJsonObject &obj);
QJsonObject toJson() const override;
};
template <> struct Constraints<StateChangeIndirect>
{
static QString type() { return QStringLiteral("StateChangeIndirect"); }
static constexpr TelegramId id() { return TelegramId::TREFFER_EREIGNIS_WIRKSIMULATION; }
};
// 54 (out)
struct DemandVulnerabilityStateChange : TrainingAreaTelegramTmpl<DemandVulnerabilityStateChange>
{
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<DemandVulnerabilityStateChange>
{
static QString type() { return QStringLiteral("DemandVulnerabilityStateChange"); }
static constexpr TelegramId id() { return TelegramId::TREFFER_AUSLOESUNG; }
};
// 55 (in)
struct OperatorAction : TrainingAreaTelegramTmpl<OperatorAction>
{
Header header;
RelativePosition relPosition;
int operatorId = 0;
int action = 0;
static OperatorAction fromJson(const QJsonObject &obj);
QJsonObject toJson() const override;
};
template <> struct Constraints<OperatorAction>
{
static QString type() { return QStringLiteral("OperatorAction"); }
static constexpr TelegramId id() { return TelegramId::SCHIEDSRICHTEREINGRIFF; }
};
// 56 (in)
struct Reammunition
{
int chargeTypeId = 0;
int location = 0;
int newStock = 0xfffe; /* 0xffff = default, 0xfffe = unveraendert lassen, 0xfffd = unbegrenzt */
int newDefaultStock = 0xfffe; /* 0xffff = factory default, 0xfffe = unveraendert lassen, 0xfffd = unbegrenzt */
int tracerRatio = 0; /* 0 = kein Trace, 1 = jedes Projektil, 2 = jedes 2. Projektil, ... */
static Reammunition fromJson(const QJsonObject &obj);
QJsonObject toJson() const;
};
struct SelectiveReammunition : TrainingAreaTelegramTmpl<SelectiveReammunition>
{
Header header;
int gearId = 0;
std::vector<Reammunition> reammunitions;
static SelectiveReammunition fromJson(const QJsonObject &obj);
QJsonObject toJson() const override;
};
template <> struct Constraints<SelectiveReammunition>
{
static QString type() { return QStringLiteral("SelectiveReammunition"); }
static constexpr TelegramId id() { return TelegramId::SELEKTIVE_AUFMUNITIONIERUNG; }
};
// 61 (in)
struct StateChange : TrainingAreaTelegramTmpl<StateChange>, StateChangeBase
{
OriginatorType originatorType = OriginatorType::Initialisation;
static StateChange fromJson(const QJsonObject &obj);
QJsonObject toJson() const override;
};
template <> struct Constraints<StateChange>
{
static QString type() { return QStringLiteral("StateChange"); }
static constexpr TelegramId id() { return TelegramId::TAKTISCHER_STATUS; }
};
// 62 (out)
struct CreateFunctionalArea : TrainingAreaTelegramTmpl<CreateFunctionalArea>, 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<CreateFunctionalArea>
{
static QString type() { return QStringLiteral("CreateFunctionalArea"); }
static constexpr TelegramId id() { return TelegramId::FUNKTIONSRAUM; }
};
// 63 (in)
struct FunctionalAreaEntry : TrainingAreaTelegramTmpl<FunctionalAreaEntry>
{
Header header;
RelativePosition relPosition;
int aesDdsId = 0;
//int aesTetraIdUnused = 0;
static FunctionalAreaEntry fromJson(const QJsonObject &obj);
QJsonObject toJson() const override;
};
template <> struct Constraints<FunctionalAreaEntry>
{
static QString type() { return QStringLiteral("FunctionalAreaEntry"); }
static constexpr TelegramId id() { return TelegramId::EINTRETEN_FUNKTIONSRAUM; }
};
// 82 (in)
struct RequestBroadcastTelegrams : TrainingAreaTelegramTmpl<RequestBroadcastTelegrams>
{
Header header;
int resetCounter = 0;
int broadcastIndex = 0;
static RequestBroadcastTelegrams fromJson(const QJsonObject &obj);
QJsonObject toJson() const override;
};
template <> struct Constraints<RequestBroadcastTelegrams>
{
static QString type() { return QStringLiteral("RequestBroadcastTelegrams"); }
static constexpr TelegramId id() { return TelegramId::NACHFORDERUNG_BROADCAST_TELEGRAMME; }
};
// 92 (in)
struct SpecialSensorData : TrainingAreaTelegramTmpl<SpecialSensorData>
{
Header header;
RelativePosition relPosition;
int operationalState = 0; // max. 8 Bits belegt, 1 Byte in Tetra
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<SpecialSensorData>
{
static QString type() { return QStringLiteral("SpecialSensorData"); }
static constexpr TelegramId id() { return TelegramId::SONDERSENSORIK_FAHRSPUR; }
};
// 95 (in)
struct MinelayerTrailerDataBase
{
Header header;
RelativePosition relPosition;
// laying data
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<MinelayerTrailerData>, MinelayerTrailerDataBase
{
static MinelayerTrailerData fromJson(const QJsonObject &obj);
QJsonObject toJson() const override;
};
template <> struct Constraints<MinelayerTrailerData>
{
static QString type() { return QStringLiteral("MinelayerTrailerData"); }
static constexpr TelegramId id() { return TelegramId::SONDERSENSORIK_MIVANH_VERLEGEDATEN; }
};
// 96 (in)
struct MinelayerThrowerData : TrainingAreaTelegramTmpl<MinelayerThrowerData>, 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<MinelayerThrowerData>
{
static QString type() { return QStringLiteral("MinelayerThrowerData"); }
static constexpr TelegramId id() { return TelegramId::SONDERSENSORIK_WMIV_VERLEGEDATEN; }
};
// 97 (in)
struct MinelayerTrailerPosition : public TrainingAreaTelegramTmpl<MinelayerTrailerPosition>
{
Header header;
RelativePosition relPosition;
qint64 dusSerialNo = 0;
int indirectChargeTasCode = 0;
static MinelayerTrailerPosition fromJson(const QJsonObject &obj);
QJsonObject toJson() const override;
};
template <> struct Constraints<MinelayerTrailerPosition>
{
static QString type() { return QStringLiteral("MinelayerTrailerPosition"); }
static constexpr TelegramId id() { return TelegramId::SONDERSENSORIK_MIVANH_VERLEGEPOSITION; }
};
// 101 (out)
struct LanguageSelection : TrainingAreaTelegramTmpl<LanguageSelection>
{
Header header;
Language languageSelection = Language::NoChange;
static LanguageSelection fromJson(const QJsonObject &obj);
QJsonObject toJson() const override;
};
template <> struct Constraints<LanguageSelection>
{
static QString type() { return QStringLiteral("LanguageSelection"); }
static constexpr TelegramId id() { return TelegramId::SPRACHAUSWAHL; }
};
// 102 (out)
struct EquipmentMessage : TrainingAreaTelegramTmpl<EquipmentMessage>
{
Header header;
std::string message; // max 81 Bytes (no nul termination)
int msgId = -1; // for indexed messages
static EquipmentMessage fromJson(const QJsonObject &obj);
QJsonObject toJson() const override;
};
template <> struct Constraints<EquipmentMessage>
{
static QString type() { return QStringLiteral("EquipmentMessage"); }
static constexpr TelegramId id() { return TelegramId::ALLGEMEINE_NACHRICHT; }
};
// (6)130 in 71 (in), (6)130 in 72 (out)
struct EquipmentMessageOC : TrainingAreaTelegramTmpl<EquipmentMessageOC>
{
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<EquipmentMessageOC>
{
static QString type() { return QStringLiteral("EquipmentMessageOC"); }
static constexpr TelegramId id() { return TelegramId::SR_DMF_NACHRICHT; }
};
struct OpaquePayloadDataBase
{
Header header;
std::vector<unsigned char> payload;
enum class Type
{
FireSmokeMarker,
Geopairing,
Target,
OC
} payloadType = Type::FireSmokeMarker;
static void fromJson(const QJsonObject &obj, OpaquePayloadDataBase &ret);
QJsonObject toJson() const;
};
// 72,182,184 (out)
struct OpaquePayloadDataOut : TrainingAreaTelegramTmpl<OpaquePayloadDataOut>, OpaquePayloadDataBase
{
static OpaquePayloadDataOut fromJson(const QJsonObject &obj);
QJsonObject toJson() const;
};
template <> struct Constraints<OpaquePayloadDataOut>
{
static QString type() { return QStringLiteral("OpaquePayloadDataOut"); }
static constexpr TelegramId id() { return TelegramId::DATENVERKEHR_TDS_SRT; }
};
// 71,181,183 (in)
struct OpaquePayloadDataIn : TrainingAreaTelegramTmpl<OpaquePayloadDataIn>, OpaquePayloadDataBase
{
RelativePosition relPosition;
GpsQuality gpsQuality;
static OpaquePayloadDataIn fromJson(const QJsonObject &obj);
QJsonObject toJson() const override;
};
template <> struct Constraints<OpaquePayloadDataIn>
{
static QString type() { return QStringLiteral("OpaquePayloadDataIn"); }
static constexpr TelegramId id() { return TelegramId::DATENVERKEHR_SRT_TDS; }
};
// 185 (in)
struct EquipmentEvent : TrainingAreaTelegramTmpl<EquipmentEvent>
{
Header header;
RelativePosition relPosition;
int equipmentFunctionId = 0;
int subDeviceId = 0;
int uniqueId = 0;
int code = 0;
std::vector<unsigned char> payload; //@binary
static EquipmentEvent fromJson(const QJsonObject &obj);
QJsonObject toJson() const override;
};
template <> struct Constraints<EquipmentEvent>
{
static QString type() { return QStringLiteral("EquipmentEvent"); }
static constexpr TelegramId id() { return TelegramId::GERAETEEREIGNIS; }
};
// 200 (in)
struct EquipmentGearAssignment : TrainingAreaTelegramTmpl<EquipmentGearAssignment>
{
Header header;
std::vector<Gear> gears;
static EquipmentGearAssignment fromJson(const QJsonObject &obj);
QJsonObject toJson() const override;
};
template <> struct Constraints<EquipmentGearAssignment>
{
static QString type() { return QStringLiteral("EquipmentGearAssignment"); }
static constexpr TelegramId id() { return TelegramId::WAFFENZUORDNUNG; }
};
// 202 (in)
struct EquipmentGearChargeState : TrainingAreaTelegramTmpl<EquipmentGearChargeState>
{
Header header;
std::vector<GearCharge> charges;
static EquipmentGearChargeState fromJson(const QJsonObject &obj);
QJsonObject toJson() const override;
};
template <> struct Constraints<EquipmentGearChargeState>
{
static QString type() { return QStringLiteral("EquipmentGearChargeState"); }
static constexpr TelegramId id() { return TelegramId::MUNITIONSVORRAT_EINER_ZUGEORDNETEN_WAFFE; }
};
// 203 (out)
struct ExerciseEnvironmentData : TrainingAreaTelegramTmpl<ExerciseEnvironmentData>
{
Header header;
int exerciseId = 0;
int timeZone = 90; // zulu
int utmZone = 0;
int utmBand = 0;
std::string grid;
static ExerciseEnvironmentData fromJson(const QJsonObject &obj);
QJsonObject toJson() const override;
};
template <> struct Constraints<ExerciseEnvironmentData>
{
static QString type() { return QStringLiteral("ExerciseEnvironmentData"); }
static constexpr TelegramId id() { return TelegramId::UMGEBUNGS_MELDUNG2; }
};
// 205 (in)
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<BiteReport>
{
Header header;
enum class LoginType
{
NoLogin = 0,
NewLogin = 1,
Relogin = 2,
InvalidLogin = 3,
} loginType = LoginType::NoLogin;
int biteState = 0; // bitfield, project specific
int configState = 0; // bitfield, project specific
int batteryState = 0; // bitfield, project specific
bool configError = false;
std::vector<BiteError> biteErrors;
static BiteReport fromJson(const QJsonObject &obj);
QJsonObject toJson() const override;
};
template <> struct Constraints<BiteReport>
{
static QString type() { return QStringLiteral("BiteReport"); }
static constexpr TelegramId id() { return TelegramId::BITE_MELDUNG2; }
};
// 210 (in)
struct EquipmentGearEvent : TrainingAreaTelegramTmpl<EquipmentGearEvent>
{
Header header;
GearCharge charge;
int chargeAmount = 0;
static EquipmentGearEvent fromJson(const QJsonObject &obj);
QJsonObject toJson() const override;
};
template <> struct Constraints<EquipmentGearEvent>
{
static QString type() { return QStringLiteral("EquipmentGearEvent"); }
static constexpr TelegramId id() { return TelegramId::FEUEREREIGNIS_MIT_WAFFENZUORDNUNG; }
};
// 211 (out) - similar to 218...
struct CesHitInformation : TrainingAreaTelegramTmpl<CesHitInformation>
{
Header header;
// TODO!!!
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<CesHitInformation>
{
static QString type() { return QStringLiteral("CesHitInformation"); }
static constexpr TelegramId id() { return TelegramId::AUSLOESUNG_DUS_TREFFER; }
};
// 212 (out)
struct ParticipantSwVersionsRequest : TrainingAreaTelegramTmpl<ParticipantSwVersionsRequest>
{
Header header;
int equipmentFunctionId; // if 0, all equipments
static ParticipantSwVersionsRequest fromJson(const QJsonObject &obj);
QJsonObject toJson() const override;
};
template <> struct Constraints<ParticipantSwVersionsRequest>
{
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;
};
// 213 (in)
struct ParticipantSwVersions : TrainingAreaTelegramTmpl<ParticipantSwVersions>
{
Header header;
std::vector<EquipmentSwVersion> equipments;
static ParticipantSwVersions fromJson(const QJsonObject &obj);
QJsonObject toJson() const override;
};
template <> struct Constraints<ParticipantSwVersions>
{
static QString type() { return QStringLiteral("ParticipantSwVersions"); }
static constexpr TelegramId id() { return TelegramId::SW_VERSIONSMELDUNG; }
};
// 218 (out)
/*!
* \brief The CesHitRequest struct
* \details
* The content of the variable is depending on the AreaEffectSimulationType:
* Gefahrenbereich Steilfeuer(DangerZoneExplosion) =
* Reserve1 = Wirkdauer(effect duration) 1-2000 sec
* Funktionsraum(Function Area) =
* Reserve1 = Betriebsmodus(MS-Byte) / Wartezeit(LS-Byte) Instandsetzungsmaßnahmen
* Reserve2 = Betriebsmodus(MS-Byte) / Wartezeit(LS-Byte) San dienstliche Versorgung
*
*
* \author EDIT: Niklas Schmidt
*/
struct CesHitRequest : TrainingAreaTelegramTmpl<CesHitRequest>
{
Header header;
int chargeTasCodeDirect = 0;
int chargeTasCodeIndirect = 0;
int originatorEquipmentNumber = 0;
int aesDdsId = 0;
//int aesTetraIdUnused = 0;
AreaEffectSimulationType aesType = AreaEffectSimulationType::Unknown;
int mineId = 0;
int remainEffectPercent = 0;
int remainEffectTasCodeDirect = 0; // may also be the effect type in case it's an aes outside a building
int buildingId = 0;
int roomId = 0;
RelativePosition relPosition;
int reserve1 = 0; //Not used currently
int reserve2 = 0; //Not used currently
static CesHitRequest fromJson(const QJsonObject &obj);
QJsonObject toJson() const override;
};
template <> struct Constraints<CesHitRequest>
{
static QString type() { return QStringLiteral("CesHitRequest"); }
static constexpr TelegramId id() { return TelegramId::TREFFER_EREIGNIS_SEKUNDAERWIRKUNG; }
};
// 219 (out)
struct TechnicalArea : TrainingAreaTelegramTmpl<TechnicalArea>
{
Header header;
int aesDdsId = 0;
//int aesTetraIdUnused = 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<TechnicalArea>
{
static QString type() { return QStringLiteral("TechnicalArea"); }
static constexpr TelegramId id() { return TelegramId::TECHNIK_FUNKTIONSRAUM; }
};
// 230 (out)
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;
};
// 230 (out)
struct ParticipantMode : TrainingAreaTelegramTmpl<ParticipantMode>, ParticipantModeBase
{
static ParticipantMode fromJson(const QJsonObject &obj);
QJsonObject toJson() const override;
};
template <> struct Constraints<ParticipantMode>
{
static QString type() { return QStringLiteral("ParticipantMode"); }
static constexpr TelegramId id() { return TelegramId::TEILNEHMERMODE_SETZEN; }
};
// 231 (in)
struct ParticipantModeReport : TrainingAreaTelegramTmpl<ParticipantModeReport>, ParticipantModeBase
{
static ParticipantModeReport fromJson(const QJsonObject &obj);
QJsonObject toJson() const override;
};
template <> struct Constraints<ParticipantModeReport>
{
static QString type() { return QStringLiteral("ParticipantModeReport"); }
static constexpr TelegramId id() { return TelegramId::TEILNEHMERMODE_MELDUNG; }
};
// 232 (out)
struct DemandParticipantMode : TrainingAreaTelegramTmpl<DemandParticipantMode>
{
Header header;
static DemandParticipantMode fromJson(const QJsonObject &obj);
QJsonObject toJson() const override;
};
template <> struct Constraints<DemandParticipantMode>
{
static QString type() { return QStringLiteral("DemandParticipantMode"); }
static constexpr TelegramId id() { return TelegramId::TEILNEHMERMODE_ANFORDERN; }
};
// 233 (in)
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;
};
// 233 (in)
struct ParticipantConfigurationReport : TrainingAreaTelegramTmpl<ParticipantConfigurationReport>, ParticipantConfigurationBase
{
static ParticipantConfigurationReport fromJson(const QJsonObject &obj);
QJsonObject toJson() const override;
};
template <> struct Constraints<ParticipantConfigurationReport>
{
static QString type() { return QStringLiteral("ParticipantConfigurationReport"); }
static constexpr TelegramId id() { return TelegramId::TEILNEHMER_KONFIG_ANTWORT; }
};
// 234 (out)
struct ParticipantConfiguration : TrainingAreaTelegramTmpl<ParticipantConfiguration>, ParticipantConfigurationBase
{
static ParticipantConfiguration fromJson(const QJsonObject &obj);
QJsonObject toJson() const override;
};
template <> struct Constraints<ParticipantConfiguration>
{
static QString type() { return QStringLiteral("ParticipantConfiguration"); }
static constexpr TelegramId id() { return TelegramId::TEILNEHMER_KONFIG_SETZEN; }
};
// 235 (out)
struct DemandParticipantConfiguration : TrainingAreaTelegramTmpl<DemandParticipantConfiguration>
{
Header header;
static DemandParticipantConfiguration fromJson(const QJsonObject &obj);
QJsonObject toJson() const override;
};
template <> struct Constraints<DemandParticipantConfiguration>
{
static QString type() { return QStringLiteral("DemandParticipantConfiguration"); }
static constexpr TelegramId id() { return TelegramId::TEILNEHMER_KONFIG_ANFORDERN; }
};
//240 in
struct SanitationRepair : TrainingAreaTelegramTmpl<SanitationRepair>
{
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<SanitationRepair>
{
static QString type() { return QStringLiteral("SanitationRepair"); }
static constexpr TelegramId id() { return TelegramId::SANITAETSDIENST_INSTANDSETZUNG; }
};
//241 in
struct SanitaryMaterialStockReport : TrainingAreaTelegramTmpl<SanitaryMaterialStockReport>
{
Header header;
int uniqueId;
int originatorEquipmentNumber;
Qualification qualification;
int sanitaryMaterialCount;
std::vector<int> sanitaryMaterialStock;
static SanitaryMaterialStockReport fromJson(const QJsonObject &obj);
QJsonObject toJson() const override;
};
template <> struct Constraints<SanitaryMaterialStockReport>
{
static QString type() { return QStringLiteral("SanitaryMaterialStockReport"); }
static constexpr TelegramId id() { return TelegramId::BESTANDSMELDUNG_SANITAETSMATERIAL; }
};
//242 in
struct Sanitation : TrainingAreaTelegramTmpl<Sanitation>
{
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<Sanitation>
{
static QString type() { return QStringLiteral("Sanitation"); }
static constexpr TelegramId id() { return TelegramId::SANITAETSDIENST_INSTANDSETZUNG_PVSAN; }
};
// 2008
struct ExerciseStateData : TrainingAreaTelegramTmpl<ExerciseStateData>
{
Header header;
// keep in sync with x-file
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<ExerciseStateData>
{
static QString type() { return QStringLiteral("ExerciseStateData"); }
static constexpr TelegramId id() { return TelegramId::BETRIEBSZUSTANDSMELDUNG; }
};
// 1120 (in), tetra radio (Hytera) emergency call button
struct EmergencyCall : TrainingAreaTelegramTmpl<EmergencyCall>
{
int issi = 0;
AbsolutePosition absPosition;
qint64 timeStamp;
static EmergencyCall fromJson(const QJsonObject &obj);
QJsonObject toJson() const override;
};
template <> struct Constraints<EmergencyCall>
{
static QString type() { return QStringLiteral("EmergencyCall"); }
static constexpr TelegramId id() { return TelegramId::NOTRUF; }
};
// 2009 (out)
struct RequestBroadcastStatistics : TrainingAreaTelegramTmpl<RequestBroadcastStatistics>
{
Header header;
static RequestBroadcastStatistics fromJson(const QJsonObject &obj);
QJsonObject toJson() const override;
};
template <> struct Constraints<RequestBroadcastStatistics>
{
static QString type() { return QStringLiteral("RequestBroadcastStatistics"); }
static constexpr TelegramId id() { return TelegramId::ANFORDERUNG_STATISTIK_BROADCAST_NACHFORDERUNGEN; }
};
// 2010 (in)
struct BroadcastInformation
{
int equipmentNumber = 0;
int broadcastRequests = 0;
static BroadcastInformation fromJson(const QJsonObject &obj);
QJsonObject toJson() const;
};
struct BroadcastStatistics : TrainingAreaTelegramTmpl<BroadcastStatistics>
{
Header header;
std::vector<BroadcastInformation> information;
static BroadcastStatistics fromJson(const QJsonObject &obj);
QJsonObject toJson() const override;
};
template <> struct Constraints<BroadcastStatistics>
{
static QString type() { return QStringLiteral("BroadcastStatistics"); }
static constexpr TelegramId id() { return TelegramId::STATISTIK_BROADCAST_NACHFORDERUNGEN; }
};
// 2012 (out)
struct GroupIssiInformation
{
int exerciseId = 0;
int serverIssi = 0;
int broadcastIssi1 = 0;
int broadcastIssi2 = 0;
static GroupIssiInformation fromJson(const QJsonObject &obj);
QJsonObject toJson() const;
};
// 2012 (out)
struct ExerciseEquipmentAssignmentComplete : TrainingAreaTelegramTmpl<ExerciseEquipmentAssignmentComplete>
{
std::unordered_map<int, std::unordered_set<int>> exerciseEquipmentAssignments; //@array: int exerciseId;std::vector<int> equipmentNumbers;
std::vector<GroupIssiInformation> groupIssiInformation;
static ExerciseEquipmentAssignmentComplete fromJson(const QJsonObject &obj);
QJsonObject toJson() const override;
};
template <> struct Constraints<ExerciseEquipmentAssignmentComplete>
{
static QString type() { return QStringLiteral("ExerciseEquipmentAssignmentComplete"); }
static constexpr TelegramId id() { return TelegramId::EXERCISE_EQUIPMENT_ASSIGNMENT_COMPLETE; }
};
// 2013 (in)
struct ProxyConnectionState : public TrainingAreaTelegramTmpl<ProxyConnectionState>
{
bool connectedToSystem = false;
static ProxyConnectionState fromJson(const QJsonObject &obj);
QJsonObject toJson() const override;
};
template <> struct Constraints<ProxyConnectionState>
{
static QString type() { return QStringLiteral("ProxyConnectionState"); }
static constexpr TelegramId id() { return TelegramId::PROXY_CONNECTION_STATE; }
};
// 2013 (in)
struct ParticipantLicenseChange : public TrainingAreaTelegramTmpl<ParticipantLicenseChange>
{
int equipmentNumber = 0;
ParticipantLicenseState licenseState = ParticipantLicenseState::Unknown;
static ParticipantLicenseChange fromJson(const QJsonObject &obj);
QJsonObject toJson() const override;
};
template <> struct Constraints<ParticipantLicenseChange>
{
static QString type() { return QStringLiteral("ParticipantLicenseChange"); }
static constexpr TelegramId id() { return TelegramId::PARTICIPANT_LICENSE_CHANGE; }
};
// 3001 (out, WLS only)
struct WlsParticipantsStateRequest : public TrainingAreaTelegramTmpl<WlsParticipantsStateRequest>
{
static WlsParticipantsStateRequest fromJson(const QJsonObject &obj);
QJsonObject toJson() const override;
};
template <> struct Constraints<WlsParticipantsStateRequest>
{
static QString type() { return QStringLiteral("WlsParticipantsStateRequest"); }
static constexpr TelegramId id() { return TelegramId::WLS_PARTICIPANTS_STATE_REQUEST; }
};
// 3002 (in, WLS only)
struct WlsParticipantsStateReport : public TrainingAreaTelegramTmpl<WlsParticipantsStateReport>
{
std::vector<WlsParticipantState> participantStates;
static WlsParticipantsStateReport fromJson(const QJsonObject &obj);
QJsonObject toJson() const override;
};
template <> struct Constraints<WlsParticipantsStateReport>
{
static QString type() { return QStringLiteral("WlsParticipantsStateReport"); }
static constexpr TelegramId id() { return TelegramId::WLS_PARTICIPANTS_STATE_REPORT; }
};
// 3003 (in, WLS only)
struct WlsBinarySfmData : public TrainingAreaTelegramTmpl<WlsBinarySfmData>
{
Header header;
std::vector<unsigned char> payload;
static WlsBinarySfmData fromJson(const QJsonObject &obj);
QJsonObject toJson() const override;
};
template <> struct Constraints<WlsBinarySfmData>
{
static QString type() { return QStringLiteral("WlsBinarySfmData"); }
static constexpr TelegramId id() { return TelegramId::WLS_BINARY_SFM_DATA; }
};
// 3004 (in)
struct WlsParticipantsConnectionState : public TrainingAreaTelegramTmpl<WlsParticipantsConnectionState>
{
int equipmentNumber = 0;
bool dataCommunicationPossible = false;
static WlsParticipantsConnectionState fromJson(const QJsonObject &obj);
QJsonObject toJson() const override;
};
template <> struct Constraints<WlsParticipantsConnectionState>
{
static QString type() { return QStringLiteral("WlsParticipantsConnectionState"); }
static constexpr TelegramId id() { return TelegramId::WLS_PARTICIPANT_CONNECTION_STATE; }
};
//8004
struct ApacheLaserDesignation : TrainingAreaTelegramTmpl<ApacheLaserDesignation>
{
Header header;
int gearId;
int code;
double outputPower;
AbsolutePosition spotLocation;
static ApacheLaserDesignation fromJson(const QJsonObject &obj);
QJsonObject toJson() const override;
};
template <> struct Constraints<ApacheLaserDesignation>
{
static QString type() { return QStringLiteral("ApacheLaserDesignation"); }
static constexpr TelegramId id() { return TelegramId::APACHE_LASER_DESIGNATION; }
};
//9000
struct BatteryInfo : TrainingAreaTelegramTmpl<BatteryInfo>
{
Header header;
std::vector<BatteryState> batteryStates;
static BatteryInfo fromJson(const QJsonObject &obj);
QJsonObject toJson() const override;
};
template <> struct Constraints<BatteryInfo>
{
static QString type() { return QStringLiteral("BatteryInfo"); }
static constexpr TelegramId id() { return TelegramId::BATTERY_INFO; }
};
//9001
struct BatteryAlarm : TrainingAreaTelegramTmpl<BatteryAlarm>
{
Header header;
int id;
QString description;
bool acknowledge;
bool condition;
int uniqueAlarmNumber;
qint64 alarmTime;
static BatteryAlarm fromJson(const QJsonObject &obj);
QJsonObject toJson() const override;
};
template <> struct Constraints<BatteryAlarm>
{
static QString type() { return QStringLiteral("BatteryAlarm"); }
static constexpr TelegramId id() { return TelegramId::BATTERY_ALARM; }
};
//9002
struct ServiceControl : TrainingAreaTelegramTmpl<ServiceControl>
{
Header header;
ServiceControlEnum serviceControlState;
static ServiceControl fromJson(const QJsonObject &obj);
QJsonObject toJson() const override;
};
template <> struct Constraints<ServiceControl>
{
static QString type() { return QStringLiteral("ServiceControl"); }
static constexpr TelegramId id() { return TelegramId::SERVICE_CONTROL; }
};
//9003
struct SetDevicePowerRequest : TrainingAreaTelegramTmpl<SetDevicePowerRequest>
{
Header header;
PowerMethod powerType;
int subdeviceId;
static SetDevicePowerRequest fromJson(const QJsonObject &obj);
QJsonObject toJson() const override;
};
template <> struct Constraints<SetDevicePowerRequest>
{
static QString type() { return QStringLiteral("SetPowerDeviceRequest"); }
static constexpr TelegramId id() { return TelegramId::DEVICE_POWER_SET_REQUEST; }
};
//9004
struct UAVPerformMission : TrainingAreaTelegramTmpl<UAVPerformMission> // just like PerformAction, but with multiple actions
{
Header header;
std::vector<UAVAction> 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<UAVPerformMission>
{
static QString type() { return QStringLiteral("UAVPerformMission"); }
static constexpr TelegramId id() { return TelegramId::UAV_PERFORM_MISSION; }
};
//9005
struct UAVStatus : TrainingAreaTelegramTmpl<UAVStatus>
{
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<UAVStatus>
{
static QString type() { return QStringLiteral("UAVState"); }
static constexpr TelegramId id() { return TelegramId::UAV_STATUS; }
};
//9006
struct UAVRadioLinkConnectionStatus : TrainingAreaTelegramTmpl<UAVRadioLinkConnectionStatus>
{
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<UAVRadioLinkConnectionStatus>
{
static QString type() { return QStringLiteral("UAVRadioLinkConnectionStatus"); }
static constexpr TelegramId id() { return TelegramId::UAV_RADIO_LINK_CONNECTION_STATUS; }
};
//9007
struct UAVMissionStatus : TrainingAreaTelegramTmpl<UAVMissionStatus>
{
Header header;
UAVActionTask currentAction;
QString currentMissionName; // empty = no mission
QString missionEnded; // the name of the mission that has ended
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<UAVMissionStatus>
{
static QString type() { return QStringLiteral("UAVMissionStatus"); }
static constexpr TelegramId id() { return TelegramId::UAV_MISSION_STATUS; }
};
//9008
struct UAVChangeState : TrainingAreaTelegramTmpl<UAVChangeState>
{
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<UAVChangeState>
{
static QString type() { return QStringLiteral("UAVChangeState"); }
static constexpr TelegramId id() { return TelegramId::UAV_CHANGE_STATE; }
};
//9100
struct ExFireReadiness : TrainingAreaTelegramTmpl<ExFireReadiness>
{
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<ExFireReadiness>
{
static QString type() { return QStringLiteral("ExFiredReport"); }
static constexpr TelegramId id() { return TelegramId::EX_FIRE_READINESS; }
};
//9101
struct ExFiredReport : TrainingAreaTelegramTmpl<ExFiredReport>
{
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<ExFiredReport>
{
static QString type() { return QStringLiteral("ExFiredReport"); }
static constexpr TelegramId id() { return TelegramId::EX_FIRED_REPORT; }
};
//9102
struct ExConfirmationReport : TrainingAreaTelegramTmpl<ExConfirmationReport>
{
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<ExConfirmationReport>
{
static QString type() { return QStringLiteral("ExConfirmationReport"); }
static constexpr TelegramId id() { return TelegramId::EX_CONFIRMATION_REPORT; }
};
} // namespace TetraIcd
} // namespace TrainingAreaBase