Line | |
---|
1 |
|
---|
2 | #ifndef BNCGETTHREAD_H
|
---|
3 | #define BNCGETTHREAD_H
|
---|
4 |
|
---|
5 | #include <QThread>
|
---|
6 | #include <QtNetwork>
|
---|
7 |
|
---|
8 | #include "RTCM/GPSDecoder.h"
|
---|
9 | #include "bncconst.h"
|
---|
10 |
|
---|
11 | class bncGetThread : public QThread {
|
---|
12 | Q_OBJECT
|
---|
13 |
|
---|
14 | public:
|
---|
15 | bncGetThread(const QUrl& mountPoint,
|
---|
16 | const QByteArray& format, int iMount);
|
---|
17 | ~bncGetThread();
|
---|
18 |
|
---|
19 | static QTcpSocket* bncGetThread::request(const QUrl& mountPoint,
|
---|
20 | int timeOut, QString& msg);
|
---|
21 |
|
---|
22 | QByteArray staID() const {return _staID;}
|
---|
23 |
|
---|
24 | signals:
|
---|
25 | void newObs(const QByteArray& staID, Observation* obs);
|
---|
26 | void error(const QByteArray& staID);
|
---|
27 | void newMessage(const QByteArray& msg);
|
---|
28 |
|
---|
29 | protected:
|
---|
30 | virtual void run();
|
---|
31 |
|
---|
32 | private:
|
---|
33 | t_irc initRun();
|
---|
34 | void message(const QString&);
|
---|
35 | void exit(int exitCode = 0);
|
---|
36 | void tryReconnect();
|
---|
37 | GPSDecoder* _decoder;
|
---|
38 | QTcpSocket* _socket;
|
---|
39 | QUrl _mountPoint;
|
---|
40 | QByteArray _staID;
|
---|
41 | QByteArray _staID_orig;
|
---|
42 | QByteArray _format;
|
---|
43 | int _timeOut;
|
---|
44 | int _nextSleep;
|
---|
45 | int _iMount;
|
---|
46 | };
|
---|
47 |
|
---|
48 | #endif
|
---|
Note:
See
TracBrowser
for help on using the repository browser.