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, const QByteArray& format);
|
---|
16 | ~bncGetThread();
|
---|
17 |
|
---|
18 | static QTcpSocket* bncGetThread::request(const QUrl& mountPoint,
|
---|
19 | int timeOut, QString& msg);
|
---|
20 |
|
---|
21 | QByteArray staID() const {return _staID;}
|
---|
22 |
|
---|
23 | signals:
|
---|
24 | void newObs(const QByteArray& staID, Observation* obs);
|
---|
25 | void error(const QByteArray& staID);
|
---|
26 | void newMessage(const QByteArray& msg);
|
---|
27 |
|
---|
28 | protected:
|
---|
29 | virtual void run();
|
---|
30 |
|
---|
31 | private:
|
---|
32 | t_irc initRun();
|
---|
33 | void message(const QString&);
|
---|
34 | void exit(int exitCode = 0);
|
---|
35 | void tryReconnect();
|
---|
36 | GPSDecoder* _decoder;
|
---|
37 | QTcpSocket* _socket;
|
---|
38 | QUrl _mountPoint;
|
---|
39 | QByteArray _staID;
|
---|
40 | QByteArray _format;
|
---|
41 | int _timeOut;
|
---|
42 | int _nextSleep;
|
---|
43 | };
|
---|
44 |
|
---|
45 | #endif
|
---|
Note:
See
TracBrowser
for help on using the repository browser.