source: ntrip/trunk/BNC/bnccaster.h@ 136

Last change on this file since 136 was 136, checked in by mervart, 18 years ago

* empty log message *

File size: 1.2 KB
Line 
1
2#ifndef BNCCASTER_H
3#define BNCCASTER_H
4
5#include <QFile>
6#include <QThread>
7#include <QtNetwork>
8#include <QMultiMap>
9
10#include "RTCM/GPSDecoder.h"
11#include "bncrinex.h"
12
13class bncGetThread;
14
15class bncCaster : public QThread {
16 Q_OBJECT
17
18 public:
19 bncCaster(const QString& outFileName, int port);
20 ~bncCaster();
21 void addGetThread(bncGetThread* getThread);
22 int numStations() const {return _staIDs.size();}
23
24 signals:
25 void getThreadErrors();
26 void newMessage(const QByteArray& msg);
27
28 public slots:
29 void slotNewObs(const QByteArray& staID, Observation* obs);
30
31 private slots:
32 void slotNewConnection();
33 void slotGetThreadError(const QByteArray& staID);
34
35 protected:
36 virtual void run();
37
38 private:
39 void dumpEpochs(long minTime, long maxTime);
40
41 QFile* _outFile;
42 int _port;
43 QTextStream* _out;
44 QMultiMap<long, Observation*>* _epochs;
45 long _lastDumpSec;
46 QTcpServer* _server;
47 QList<QTcpSocket*>* _sockets;
48 QList<QByteArray> _staIDs;
49 QMap<QString, bncRinex*> _rinexWriters;
50 int _samplingRate;
51 long _waitTime;
52};
53
54#endif
Note: See TracBrowser for help on using the repository browser.