// fgcom.hxx -- FGCom: Voice communication
//
-// Written by Clement de l'Hamaide, started Mai 2013.
+// Written by Clement de l'Hamaide, started May 2013.
//
// This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public License as
virtual void update(double dt);
virtual void valueChanged(SGPropertyNode *prop);
virtual void shutdown();
+ void iaxTextEvent(struct iaxc_ev_text text);
+
private:
SGPropertyNode_ptr _ptt0_node; // instrumentation/nav[0]/ptt
- //SGPropertyNode_ptr _nav0_node; // instrumentation/nav[0]/frequencies/selected-mhz
- //SGPropertyNode_ptr _nav1_node; // instrumentation/nav[1]/frequencies/selected-mhz
SGPropertyNode_ptr _comm0_node; // instrumentation/comm[0]/frequencies/selected-mhz
- //SGPropertyNode_ptr _comm1_node; // instrumentation/comm[1]/frequencies/selected-mhz
+ SGPropertyNode_ptr _comm1_node; // instrumentation/comm[1]/frequencies/selected-mhz
SGPropertyNode_ptr _test_node; // sim/fgcom/test
+ SGPropertyNode_ptr _text_node; // sim/fgcom/text
SGPropertyNode_ptr _server_node; // sim/fgcom/server
SGPropertyNode_ptr _enabled_node; // sim/fgcom/enabled
+ SGPropertyNode_ptr _version_node; // sim/version/flightgear
SGPropertyNode_ptr _micBoost_node; // sim/fgcom/mic-boost
SGPropertyNode_ptr _callsign_node; // sim/multiplay/callsign
SGPropertyNode_ptr _register_node; // sim/fgcom/register/enabled
SGPropertyNode_ptr _username_node; // sim/fgcom/register/username
SGPropertyNode_ptr _password_node; // sim/fgcom/register/password
SGPropertyNode_ptr _micLevel_node; // sim/fgcom/mic-level
+ SGPropertyNode_ptr _silenceThd_node; // sim/fgcom/silence-threshold
SGPropertyNode_ptr _speakerLevel_node; // sim/fgcom/speaker-level
SGPropertyNode_ptr _deviceID_node[4]; // sim/fgcom/device[n]/id
SGPropertyNode_ptr _deviceName_node[4]; // sim/fgcom/device[n]/name
SGPropertyNode_ptr _deviceOutput_node[4]; // sim/fgcom/device[n]/available-output
SGPropertyNode_ptr _selectedInput_node; // sim/fgcom/device-input
SGPropertyNode_ptr _selectedOutput_node; // sim/fgcom/device-output
+ SGPropertyNode_ptr _showMessages_node; // sim/fgcom/show-messages
+ double _maxRange;
+ double _minRange;
double _currentComm0;
- //double _currentComm1;
- //double _currentNav0;
- //double _currentNav1;
- //bool _nav0Changed;
- //bool _nav1Changed;
+ double _currentComm1;
bool _comm0Changed;
- //bool _comm1Changed;
+ bool _comm1Changed;
bool _register;
bool _enabled;
+ bool _initialized;
int _regId;
- //int _callNav0;
- //int _callNav1;
int _callComm0;
//int _callComm1;
int _listener_active;
int _currentFreqKhz;
+ int _selectedComm;
std::string _server;
std::string _callsign;
std::string _username;
std::string computePhoneNumber(const double& freq, const std::string& icao) const;
std::string getAirportCode(const double& freq);
- //std::string getVorCode(const double& freq) const;
SGGeod getAirportPos(const double& freq) const;
bool isInRange(const double& freq) const;