00001 /*************************************************************************** 00002 ** 00003 ** This file is part of waran. 00004 ** 00005 ** This file may be distributed and/or modified under the terms of the 00006 ** GNU General Public License version 2 or 3 as published by the Free 00007 ** Software Foundation and appearing in the file LICENSE.GPL included 00008 ** in the packaging of this file. 00009 ** 00010 ** This file is distributed in the hope that it will be useful, but WITHOUT 00011 ** ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 00012 ** FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for 00013 ** more details. 00014 ** 00015 ** You should have received a copy of the GNU General Public License 00016 ** along with this program. If not, see <http://www.gnu.org/licenses/>. 00017 ** 00018 ** See http://www.geopsy.org for more information. 00019 ** 00020 ** Created: 2011-09-05 00021 ** Authors: 00022 ** Marc Wathelet (ISTerre, Grenoble, France) 00023 ** 00024 ***************************************************************************/ 00025 00026 #ifndef STATION_H 00027 #define STATION_H 00028 00029 #include <QGpCoreTools.h> 00030 00031 class CubeLink; 00032 class GpsLink; 00033 class NetLink; 00034 class SystemLink; 00035 class SeismicParameters; 00036 00037 class Station: public QObject 00038 { 00039 Q_OBJECT 00040 public: 00041 Station(); 00042 ~Station(); 00043 00044 enum Type {AcquisitionUnit, ProcessingUnit, RepeaterUnit}; 00045 00046 const QString& name() const {return _name;} 00047 void setName(const QString& n) {_name=n;} 00048 00049 Type type() const {return _type;} 00050 void setType(Type t); 00051 00052 QString gpsFileName(); 00053 QString currentGpsFileName() const {return _currentGpsFileName;} 00054 00055 const QString& address() const {return _address;} 00056 void setAddress(const QString& a) {_address=a;} 00057 00058 int index() const {return _index;} 00059 void setIndex(int i) {_index=i;} 00060 00061 bool isAvailable(); 00062 00063 int frequency() const {return _frequency;} 00064 void setFrequency(int f); 00065 00066 int hardwareGain() const {return _hardwareGain;} 00067 void setHardwareGain(int g); 00068 00069 double numberOfBits() const {return _numberOfBits;} 00070 void setNumberOfBits(double n); 00071 00072 const QString& seismicState() const {return _seismicState;} 00073 void setSeismicState(const QString& s); 00074 00075 const QString& gpsState() const {return _gpsState;} 00076 void setGpsState(const QString& s); 00077 00078 double diskSpace() const {return _diskSpace;} 00079 void setDiskSpace(double s); 00080 00081 double battery() const {return _battery;} 00082 void setBattery(double b); 00083 00084 double temperature() const {return _temperature;} 00085 void setTemperature(double t); 00086 00087 QString buddies() const {return _buddies;} 00088 void setBuddies(const QString& b); 00089 00090 void requestComments(); 00091 void addComment(const QString& c); 00092 00093 QString comments() const {return _comments;} 00094 void setComments(const QString& c); 00095 00096 QString linkState() const; 00097 00098 void setSeismicParameters(const SeismicParameters& param); 00099 void startSeismic(); 00100 void stopSeismic(); 00101 void startGps(); 00102 void stopGps(); 00103 void navigationGps(); 00104 void downloadGps(); 00105 void abortDownloadGps(); 00106 void reboot(); 00107 void powerOff(); 00108 void clearUsb(); 00109 signals: 00110 void dataChanged(int index); 00111 void commentsRefreshed(int index); 00112 void rawFileSize(int size); 00113 void rawFileReady(); 00114 void rawFileError(); 00115 private: 00116 void clear(); 00117 00118 Type _type; 00119 QString _name, _buddies; 00120 QString _currentGpsFileName; 00121 QString _address; 00122 QString _seismicState, _gpsState; 00123 int _index; 00124 int _frequency, _hardwareGain; 00125 double _numberOfBits, _diskSpace, _battery, _temperature; 00126 QString _comments; 00127 00128 CubeLink * _cubeLink; 00129 GpsLink * _gpsLink; 00130 NetLink * _netLink; 00131 SystemLink * _systemLink; 00132 }; 00133 00134 #endif // STATION_H 00135