source: ntrip/trunk/BNS/bns.h@ 778

Last change on this file since 778 was 778, checked in by mervart, 16 years ago

* empty log message *

File size: 934 bytes
Line 
1#ifndef BNS_H
2#define BNS_H
3
4#include <QtNetwork>
5#include <QThread>
6
7#include "bnseph.h"
8
9class t_ephPair {
10 public:
11 t_ephPair() {
12 eph = 0;
13 oldEph = 0;
14 }
15
16 ~t_ephPair() {
17 delete eph;
18 delete oldEph;
19 }
20
21 gpsEph* eph;
22 gpsEph* oldEph;
23};
24
25class t_bns : public QThread {
26 Q_OBJECT
27 public:
28 t_bns(QObject* parent = 0);
29 virtual ~t_bns();
30 virtual void run();
31
32 signals:
33 void newMessage(const QByteArray msg);
34 void error(const QByteArray msg);
35
36 private slots:
37 void slotNewEph(gpsEph* ep);
38 void slotNewConnection();
39 void slotMessage(const QByteArray msg);
40 void slotError(const QByteArray msg);
41
42 private:
43 void deleteBnsEph();
44 void openCaster();
45 QTcpServer* _clkServer;
46 QTcpSocket* _clkSocket;
47 QTcpSocket* _outSocket;
48 t_bnseph* _bnseph;
49 QMutex _mutex;
50 QMap<QString, t_ephPair*> _ephList;
51};
52#endif
Note: See TracBrowser for help on using the repository browser.