X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FATC%2Ftrafficcontrol.hxx;h=66381af52f140e930c307c33a790b13e7546340c;hb=e16f772e54216b0088ca9cb3f3b0fb062be8bfdb;hp=20ec9962ebbb89e825b9ac4cff0007e0a32841ae;hpb=416ba93a417c4cadde025ba4d7bbcce71d613372;p=flightgear.git diff --git a/src/ATC/trafficcontrol.hxx b/src/ATC/trafficcontrol.hxx index 20ec9962e..66381af52 100644 --- a/src/ATC/trafficcontrol.hxx +++ b/src/ATC/trafficcontrol.hxx @@ -34,8 +34,6 @@ #include #include - - #include #include @@ -227,6 +225,7 @@ class FGATCController { private: bool initialized; + protected: bool available; time_t lastTransmission; @@ -236,6 +235,7 @@ protected: string formatATCFrequency3_2(int ); string genTransponderCode(string fltRules); + bool isUserAircraft(FGAIAircraft*); public: typedef enum { @@ -276,8 +276,11 @@ public: double getDt() { return dt_count; }; void setDt(double dt) { dt_count = dt;}; - void transmit(FGTrafficRecord *rec, AtcMsgId msgId, AtcMsgDir msgDir); + void transmit(FGTrafficRecord *rec, AtcMsgId msgId, AtcMsgDir msgDir, bool audible); string getGateName(FGAIAircraft *aircraft); + +private: + AtcMsgDir lastTransmissionDirection; }; /****************************************************************************** @@ -333,6 +336,10 @@ public: bool hasActiveTraffic() { return activeTraffic.size() != 0; }; TrafficVector &getActiveTraffic() { return activeTraffic; }; + // Hpoefully, we can move this function to the base class, but I need to verify what is needed for the other controllers before doing so. + bool checkTransmissionState(int st, time_t now, time_t startTime, TrafficVectorIterator i, AtcMsgId msgId, + AtcMsgDir msgDir); + }; /******************************************************************************