|
Last change
on this file since 9398 was 8770, checked in by stuerze, 7 years ago |
|
minor changes in ntrip 1 upload
|
|
File size:
1.2 KB
|
| Line | |
|---|
| 1 | #ifndef BNCUPLOADCASTER_H
|
|---|
| 2 | #define BNCUPLOADCASTER_H
|
|---|
| 3 |
|
|---|
| 4 | #include <QDateTime>
|
|---|
| 5 | #include <QMutex>
|
|---|
| 6 | #include <QTcpSocket>
|
|---|
| 7 | #include <QNetworkProxy>
|
|---|
| 8 | #include <QThread>
|
|---|
| 9 |
|
|---|
| 10 | class bncUploadCaster : public QThread {
|
|---|
| 11 | Q_OBJECT
|
|---|
| 12 | public:
|
|---|
| 13 | bncUploadCaster(const QString& mountpoint,
|
|---|
| 14 | const QString& outHost, int outPort,
|
|---|
| 15 | const QString& ntripVersion,
|
|---|
| 16 | const QString& userName, const QString& password,
|
|---|
| 17 | int iRow, int rate);
|
|---|
| 18 | virtual void deleteSafely();
|
|---|
| 19 | void setOutBuffer(const QByteArray& outBuffer) {
|
|---|
| 20 | QMutexLocker locker(&_mutex);
|
|---|
| 21 | _outBuffer = outBuffer;
|
|---|
| 22 | }
|
|---|
| 23 |
|
|---|
| 24 | protected:
|
|---|
| 25 | virtual ~bncUploadCaster();
|
|---|
| 26 | QMutex _mutex;
|
|---|
| 27 | QByteArray _outBuffer;
|
|---|
| 28 |
|
|---|
| 29 | signals:
|
|---|
| 30 | void newMessage(const QByteArray msg, bool showOnScreen);
|
|---|
| 31 | void newBytes(QByteArray staID, double nbyte);
|
|---|
| 32 |
|
|---|
| 33 | private:
|
|---|
| 34 | void open();
|
|---|
| 35 | virtual void run();
|
|---|
| 36 | bool _isToBeDeleted;
|
|---|
| 37 | QString _mountpoint;
|
|---|
| 38 | QString _outHost;
|
|---|
| 39 | int _outPort;
|
|---|
| 40 | QString _userName;
|
|---|
| 41 | QString _password;
|
|---|
| 42 | QString _ntripVersion;
|
|---|
| 43 | bool _secure;
|
|---|
| 44 | QTcpSocket* _outSocket;
|
|---|
| 45 | int _sOpenTrial;
|
|---|
| 46 | QDateTime _outSocketOpenTime;
|
|---|
| 47 | int _iRow;
|
|---|
| 48 | int _rate;
|
|---|
| 49 | };
|
|---|
| 50 |
|
|---|
| 51 | #endif
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.