source: ntrip/trunk/BNS/bns.cpp@ 760

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

* empty log message *

File size: 1.6 KB
Line 
1/* -------------------------------------------------------------------------
2 * BKG NTRIP Server
3 * -------------------------------------------------------------------------
4 *
5 * Class: bns
6 *
7 * Purpose: This class implements the main application behaviour
8 *
9 * Author: L. Mervart
10 *
11 * Created: 29-Mar-2008
12 *
13 * Changes:
14 *
15 * -----------------------------------------------------------------------*/
16
17#include <iostream>
18
19#include "bns.h"
20
21using namespace std;
22
23// Constructor
24////////////////////////////////////////////////////////////////////////////
25t_bns::t_bns(QObject* parent) : QThread(parent) {
26
27 _bnseph = new t_bnseph(parent);
28
29 connect(_bnseph, SIGNAL(newMessage(QByteArray)),
30 this, SLOT(slotMessage(const QByteArray)));
31
32 connect(_bnseph, SIGNAL(error(QByteArray)),
33 this, SLOT(slotError(const QByteArray)));
34}
35
36// Destructor
37////////////////////////////////////////////////////////////////////////////
38t_bns::~t_bns() {
39 delete _bnseph;
40}
41
42// Write a Program Message
43////////////////////////////////////////////////////////////////////////////
44void t_bns::slotMessage(const QByteArray msg) {
45 cout << msg.data() << endl;
46 emit(newMessage(msg));
47}
48
49// Write a Program Message
50////////////////////////////////////////////////////////////////////////////
51void t_bns::slotError(const QByteArray msg) {
52 cerr << msg.data() << endl;
53 emit(error(msg));
54}
55
56// Start
57////////////////////////////////////////////////////////////////////////////
58void t_bns::run() {
59 slotMessage("============ Start BNS ============");
60 _bnseph->start();
61}
62
Note: See TracBrowser for help on using the repository browser.