/** * Structures used for messages to/from the OC-Laptop * $Id$ * $HeadURL$ * $Author$ * Created by Philipp Dassow, NLST, 2018-02-02 */ #pragma once #include namespace TrainingAreaBaseOC { namespace OcTelegrams { enum class TextType { test = 0, UnderFire = 1, Injury = 2, Manipulation = 3, Kill = 4, State = 5, Error = 6, Activation = 7, Messages = 8, AcousticOutputOnly = 9, ClearDisplay = 255, }; /*----------------------------------------------------------------*/ /* OC_DISPLAY */ /*----------------------------------------------------------------*/ struct Display { QByteArray text; int multiplexer = 0; TextType textType = TextType::test; int indexVbg = 0; int indexVba = 0; }; /*----------------------------------------------------------------*/ /* OC_TIME */ /*----------------------------------------------------------------*/ struct TimeSync { qint64 gpsTimeMsec = 0; unsigned char timezone = '\0'; }; /*----------------------------------------------------------------*/ /* OC_ENTER_LEAVE_AES */ /*----------------------------------------------------------------*/ struct EnterLeaveAes { unsigned int aesId = 0; unsigned int chargeTasCode = 0; bool aesEntered = false; unsigned char nbcArea = '\0'; unsigned char cAreaType = '\0'; }; /*----------------------------------------------------------------*/ /* OC_TECHNICAL_STATE_SFM */ /*----------------------------------------------------------------*/ struct TechnicalStateSfm { qint64 gpsTimeMsec = 0; bool sfmConnected = false; bool radioAvailable = false; bool licensed = false; bool batteryTest = false; bool manipulationEquipment = false; bool manipulationSfm = false; unsigned char errorCode; }; /*----------------------------------------------------------------*/ /* OC_DEMAND_SELFTEST_SFM */ /*----------------------------------------------------------------*/ struct DemandSelftestSfm { char dummy = '\0'; }; /*----------------------------------------------------------------*/ /* OC_OWN_POSITION */ /*----------------------------------------------------------------*/ struct OwnPosition { qint64 gpsTimeMsec = 0; int easting = 0; int northing = 0; bool valid = false; }; /*----------------------------------------------------------------*/ /* OC_DEMAND_CYCLIC_POSISTIONS */ /*----------------------------------------------------------------*/ struct DemandCyclicPositions { unsigned char cycleTime = '\1'; }; /*----------------------------------------------------------------*/ /* OC_SPECIFICS_EXERCISE */ /*----------------------------------------------------------------*/ struct SpecificsExercise { QByteArray square; unsigned int exerciseId = 0; unsigned int zone = 0; unsigned int easting = 0; unsigned int northing = 0; unsigned char band; }; /*----------------------------------------------------------------*/ /* OC_SPECIFICS_SFM */ /*----------------------------------------------------------------*/ struct SpecificsEquipment { unsigned int equipmentNumber = 0; TrainingAreaBase::TetraIcd::Language language; unsigned char playerType = '\0'; unsigned char sfm = '\0'; unsigned char panCoordinator = '\0'; unsigned char viss = '\0'; unsigned char geopairing = '\0'; unsigned char ecu = '\0'; unsigned char hsu = '\0'; unsigned char halt = '\0'; bool pyrotechnics = false; bool voiceOutput = false; bool exerciseBreak = false; }; /*----------------------------------------------------------------*/ /* OC_TECHNICAL_STATE_OC */ /*----------------------------------------------------------------*/ struct TechnicalStateOc { unsigned char errorCode = '\0'; }; } // namespace OcTelegrams } // namespace TrainingAreaBaseOC