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

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

* empty log message *

File size: 1.6 KB
RevLine 
[756]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////////////////////////////////////////////////////////////////////////////
[757]25t_bns::t_bns(QObject* parent) : QThread(parent) {
[760]26
[758]27 _bnseph = new t_bnseph(parent);
[760]28
[758]29 connect(_bnseph, SIGNAL(newMessage(QByteArray)),
30 this, SLOT(slotMessage(const QByteArray)));
[760]31
32 connect(_bnseph, SIGNAL(error(QByteArray)),
33 this, SLOT(slotError(const QByteArray)));
[756]34}
35
36// Destructor
37////////////////////////////////////////////////////////////////////////////
[757]38t_bns::~t_bns() {
[758]39 delete _bnseph;
[756]40}
41
42// Write a Program Message
43////////////////////////////////////////////////////////////////////////////
[758]44void t_bns::slotMessage(const QByteArray msg) {
[756]45 cout << msg.data() << endl;
[757]46 emit(newMessage(msg));
[756]47}
48
[760]49// Write a Program Message
50////////////////////////////////////////////////////////////////////////////
51void t_bns::slotError(const QByteArray msg) {
52 cerr << msg.data() << endl;
53 emit(error(msg));
54}
55
[756]56// Start
57////////////////////////////////////////////////////////////////////////////
[757]58void t_bns::run() {
[758]59 slotMessage("============ Start BNS ============");
60 _bnseph->start();
[756]61}
62
Note: See TracBrowser for help on using the repository browser.