2002-03-01 17:39:52 +00:00
|
|
|
// FGATC - abstract base class for the various actual atc classes
|
|
|
|
// such as FGATIS, FGTower etc.
|
|
|
|
//
|
|
|
|
// Written by David Luff, started Feburary 2002.
|
|
|
|
//
|
|
|
|
// Copyright (C) 2002 David C. Luff - david.luff@nottingham.ac.uk
|
|
|
|
//
|
|
|
|
// This program is free software; you can redistribute it and/or
|
|
|
|
// modify it under the terms of the GNU General Public License as
|
|
|
|
// published by the Free Software Foundation; either version 2 of the
|
|
|
|
// License, or (at your option) any later version.
|
|
|
|
//
|
|
|
|
// This program is distributed in the hope that it will be useful, but
|
|
|
|
// WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
|
// General Public License for more details.
|
|
|
|
//
|
|
|
|
// You should have received a copy of the GNU General Public License
|
|
|
|
// along with this program; if not, write to the Free Software
|
|
|
|
// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
|
|
|
|
|
|
|
#ifndef _FG_ATC_HXX
|
|
|
|
#define _FG_ATC_HXX
|
|
|
|
|
2002-04-04 01:32:00 +00:00
|
|
|
#include <simgear/compiler.h>
|
|
|
|
|
2002-04-04 20:47:23 +00:00
|
|
|
#include STL_IOSTREAM
|
|
|
|
#include STL_STRING
|
2002-04-03 23:54:44 +00:00
|
|
|
|
2002-04-04 20:47:23 +00:00
|
|
|
#ifndef SG_HAVE_NATIVE_SGI_COMPILERS
|
2002-04-04 01:32:00 +00:00
|
|
|
SG_USING_STD(ostream);
|
2002-04-04 20:47:23 +00:00
|
|
|
#endif
|
2002-04-04 01:32:00 +00:00
|
|
|
SG_USING_STD(string);
|
|
|
|
|
2002-03-01 17:39:52 +00:00
|
|
|
// Possible types of ATC type that the radios may be tuned to.
|
|
|
|
// INVALID implies not tuned in to anything.
|
2002-03-12 20:01:54 +00:00
|
|
|
enum atc_type {
|
2002-03-01 17:39:52 +00:00
|
|
|
INVALID,
|
|
|
|
ATIS,
|
|
|
|
GROUND,
|
|
|
|
TOWER,
|
|
|
|
APPROACH,
|
|
|
|
DEPARTURE,
|
|
|
|
ENROUTE
|
2002-04-03 23:54:44 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
ostream& operator << (ostream& os, atc_type atc);
|
2002-03-01 17:39:52 +00:00
|
|
|
|
|
|
|
class FGATC {
|
|
|
|
|
|
|
|
public:
|
|
|
|
|
|
|
|
virtual ~FGATC();
|
|
|
|
|
|
|
|
// Run the internal calculations
|
|
|
|
virtual void Update();
|
|
|
|
|
2002-04-03 23:54:44 +00:00
|
|
|
// Add plane to a stack
|
|
|
|
virtual void AddPlane(string pid);
|
|
|
|
|
|
|
|
// Remove plane from stack
|
|
|
|
virtual int RemovePlane();
|
|
|
|
|
2002-03-01 17:39:52 +00:00
|
|
|
// Indicate that this instance should output to the display if appropriate
|
|
|
|
virtual void SetDisplay();
|
|
|
|
|
|
|
|
// Indicate that this instance should not output to the display
|
|
|
|
virtual void SetNoDisplay();
|
|
|
|
|
|
|
|
// Return the ATC station ident (generally the ICAO code of the airport)
|
|
|
|
virtual const char* GetIdent();
|
|
|
|
|
|
|
|
// Return the type of ATC station that the class represents
|
|
|
|
virtual atc_type GetType();
|
|
|
|
};
|
|
|
|
|
2002-03-03 22:47:06 +00:00
|
|
|
#endif // _FG_ATC_HXX
|