]> git.mxchange.org Git - flightgear.git/blobdiff - src/ATCDCL/atis.hxx
Merge branch 'next' of gitorious.org:fg/flightgear into next
[flightgear.git] / src / ATCDCL / atis.hxx
index 60335e18561d5d810bfcf14a01a5f8a360bae4f2..cd35ea476fa4e6d7cdb887e5be57b123b88e1233 100644 (file)
 #ifndef _FG_ATIS_HXX
 #define _FG_ATIS_HXX
 
-#include <stdio.h>
 #include <string>
+#include <iosfwd>
 
 #include <simgear/compiler.h>
-#include <simgear/math/sg_geodesy.hxx>
-#include <simgear/misc/sgstream.hxx>
-#include <simgear/magvar/magvar.hxx>
 #include <simgear/timing/sg_time.hxx>
 
-#  include <iosfwd>
-
 #include "ATC.hxx"
 
 //DCL - a complete guess for now.
 #define FG_ATIS_DEFAULT_RANGE 30
        
+typedef std::map<std::string,std::string> MSS;
+
 class FGATIS : public FGATC {
        
        //atc_type type;
@@ -48,8 +45,16 @@ class FGATIS : public FGATC {
        
        // for failure modeling
        std::string trans_ident;                // transmitted ident
+       double old_volume;
        bool atis_failed;               // atis failed?
+       time_t msg_time;                // for moderating error messages
+       time_t cur_time;
+       int msg_OK;
+       int attention;
        
+       bool _prev_display;             // Previous value of _display flag
+       MSS _remap;                     // abbreviations to be expanded
+
        // Aircraft position
        // ATIS is actually a special case in that unlike other ATC eg.tower it doesn't actually know about
        // or the whereabouts of the aircraft it is transmitting to.  However, to ensure consistancy of
@@ -63,7 +68,9 @@ class FGATIS : public FGATC {
        
        FGATIS(void);
        ~FGATIS(void);
-       
+       virtual void Init();
+       void attend (int);
+
        //run the ATIS instance
        void Update(double dt);
        
@@ -75,10 +82,12 @@ class FGATIS : public FGATC {
        
        std::string refname;            // Holds the refname of a transmission in progress
        
-       //Update the transmission string
-       void UpdateTransmission(void);
+       int GenTransmission(const int regen, 
+               const int special);             // Generate the transmission string
        
        friend std::istream& operator>> ( std::istream&, FGATIS& );
 };
 
+typedef int (FGATIS::*int_getter)() const;
+
 #endif // _FG_ATIS_HXX