X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FATC%2Ftrafficcontrol.hxx;h=d069a5b84120af9e5fa2773b4f13383c0b3f7dde;hb=7c73c7d3e58f60743f4b91d678b16d8e313a46de;hp=027f63d7ff6be2db374f29e4f50d1a5de1b85691;hpb=72c9dc119366ac2124ee953d0af3bc789c20b3a3;p=flightgear.git diff --git a/src/ATC/trafficcontrol.hxx b/src/ATC/trafficcontrol.hxx index 027f63d7f..d069a5b84 100644 --- a/src/ATC/trafficcontrol.hxx +++ b/src/ATC/trafficcontrol.hxx @@ -107,6 +107,7 @@ private: int id, waitsForId; int currentPos; int leg; + int frequencyId; int state; bool allowTransmission; time_t timer; @@ -128,6 +129,7 @@ public: void setLeg(int lg) { leg = lg;}; int getId() { return id;}; int getState() { return state;}; + void setState(int s) { state = s;} FGATCInstruction getInstruction() { return instruction;}; bool hasInstruction() { return instruction.hasInstruction(); }; void setPositionAndHeading(double lat, double lon, double hdg, double spd, double alt); @@ -176,6 +178,8 @@ public: bool allowTransmissions() { return allowTransmission; }; void suppressRepeatedTransmissions () { allowTransmission=false; }; void allowRepeatedTransmissions () { allowTransmission=true; }; + void nextFrequency() { frequencyId++; }; + int getNextFrequency() { return frequencyId; }; }; typedef vector TrafficVector; @@ -207,7 +211,10 @@ typedef vector::iterator ActiveRunwayVecIterator; *************************************************************************************/ class FGATCController { -private: +protected: + bool available; + time_t lastTransmission; + double dt_count; @@ -217,17 +224,27 @@ private: public: typedef enum { MSG_ANNOUNCE_ENGINE_START, - MSG_REQUEST_ENGINE_START, + MSG_REQUEST_ENGINE_START, MSG_PERMIT_ENGINE_START, MSG_DENY_ENGINE_START, MSG_ACKNOWLEDGE_ENGINE_START, MSG_REQUEST_PUSHBACK_CLEARANCE, - MSG_PERMIT_PUSHBACK_CLEARANCE, - MSG_HOLD_PUSHBACK_CLEARANCE } AtcMsgId; + MSG_PERMIT_PUSHBACK_CLEARANCE, + MSG_HOLD_PUSHBACK_CLEARANCE, + MSG_ACKNOWLEDGE_SWITCH_GROUND_FREQUENCY, + MSG_INITIATE_CONTACT, + MSG_ACKNOWLEDGE_INITIATE_CONTACT, + MSG_REQUEST_TAXI_CLEARANCE, + MSG_ISSUE_TAXI_CLEARANCE, + MSG_ACKNOWLEDGE_TAXI_CLEARANCE, + MSG_HOLD_POSITION, + MSG_ACKNOWLEDGE_HOLD_POSITION, + MSG_RESUME_TAXI, + MSG_ACKNOWLEDGE_RESUME_TAXI } AtcMsgId; typedef enum { ATC_AIR_TO_GROUND, ATC_GROUND_TO_AIR } AtcMsgDir; - FGATCController() { dt_count = 0;}; + FGATCController(); virtual ~FGATCController() {}; virtual void announcePosition(int id, FGAIFlightPlan *intendedRoute, int currentRoute, double lat, double lon, @@ -280,8 +297,6 @@ class FGStartupController : public FGATCController { private: TrafficVector activeTraffic; - bool available; - time_t lastTransmission; //ActiveRunwayVec activeRunways; public: