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