1 // ATISmgr.hxx - definition of FGATISMgr
2 // - a global management class for FlightGear generated ATIS
4 // Written by David Luff, started February 2002.
6 // Copyright (C) 2002 David C Luff - david.luff@nottingham.ac.uk
8 // This program is free software; you can redistribute it and/or
9 // modify it under the terms of the GNU General Public License as
10 // published by the Free Software Foundation; either version 2 of the
11 // License, or (at your option) any later version.
13 // This program is distributed in the hope that it will be useful, but
14 // WITHOUT ANY WARRANTY; without even the implied warranty of
15 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 // General Public License for more details.
18 // You should have received a copy of the GNU General Public License
19 // along with this program; if not, write to the Free Software
20 // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
22 #ifndef _FG_ATCMGR_HXX
23 #define _FG_ATCMGR_HXX
25 #include <simgear/structure/subsystem_mgr.hxx>
40 SGPropertyNode_ptr freq;
44 class FGATISMgr : public SGSubsystem
48 // A vector containing all comm radios
49 typedef std::vector<CommRadioData> radio_list_type;
50 radio_list_type radios;
52 // Any member function of FGATISMgr is permitted to leave this iterator pointing
53 // at any point in or at the end of the list.
54 // Hence any new access must explicitly first check for atc_list.end() before dereferencing.
56 // Position of the Users Aircraft
59 // Pointers to current users position
60 SGPropertyNode_ptr lon_node;
61 SGPropertyNode_ptr lat_node;
62 SGPropertyNode_ptr elev_node;
64 unsigned int _currentUnit;
65 unsigned int _maxCommRadios;
67 // Voice related stuff
68 bool voice; // Flag - true if we are using voice
69 #ifdef ENABLE_AUDIO_SUPPORT
83 void update(double dt);
85 // Return a pointer to an appropriate voice for a given type of ATC
86 // creating the voice if necessary - i.e. make sure exactly one copy
87 // of every voice in use exists in memory.
89 // TODO - in the future this will get more complex and dole out country/airport
90 // specific voices, and possible make sure that the same voice doesn't get used
91 // at different airports in quick succession if a large enough selection are available.
92 FGATCVoice* GetVoicePointer(const atc_type& type);
95 // Search the specified radio for stations on the same frequency and in range.
96 void FreqSearch(const unsigned int unit);
99 #endif // _FG_ATCMGR_HXX