Changeset 787 in ntrip


Ignore:
Timestamp:
Apr 8, 2008, 2:45:41 PM (16 years ago)
Author:
mervart
Message:

* empty log message *

Location:
trunk/BNS
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/BNS/bns.cpp

    r786 r787  
    2727  this->setTerminationEnabled(true);
    2828 
     29  // Thread that handles broadcast ephemeris
     30  // ---------------------------------------
    2931  _bnseph = new t_bnseph(parent);
    3032
    3133  connect(_bnseph, SIGNAL(newEph(gpsEph*)), this, SLOT(slotNewEph(gpsEph*)));
    32 
    3334  connect(_bnseph, SIGNAL(newMessage(QByteArray)),
    3435          this, SLOT(slotMessage(const QByteArray)));
    35 
    3636  connect(_bnseph, SIGNAL(error(QByteArray)),
    3737          this, SLOT(slotError(const QByteArray)));
    3838
    39   // Start listening for rtnet results
    40   // ---------------------------------
     39  // Server listening for rtnet results
     40  // ----------------------------------
    4141  QSettings settings;
    4242  _clkSocket = 0;
    4343  _clkServer = new QTcpServer;
    44   /////  _clkServer->listen(QHostAddress::Any, settings.value("clkPort").toInt());
    45   _clkServer->listen(QHostAddress::Any, 5555);
     44  _clkServer->listen(QHostAddress::Any, settings.value("clkPort").toInt());
    4645  connect(_clkServer, SIGNAL(newConnection()),this, SLOT(slotNewConnection()));
    4746
     47  // Socket for outputting the results
     48  // ---------------------------------
    4849  _outSocket = 0;
    4950}
     
    5455  deleteBnsEph();
    5556  delete _clkServer;
     57  delete _clkSocket;
    5658  delete _outSocket;
    5759  QMapIterator<QString, t_ephPair*> it(_ephList);
     
    9294void t_bns::slotNewConnection() {
    9395  slotMessage("t_bns::slotNewConnection");
     96  delete _clkSocket;
    9497  _clkSocket = _clkServer->nextPendingConnection();
    9598}
  • trunk/BNS/bnswindow.cpp

    r764 r787  
    112112  setCentralWidget(_canvas);
    113113
    114   _ephHostLineEdit  = new QLineEdit(settings.value("ephHost").toString());
    115   _ephHostLineEdit->setWhatsThis(tr("Host for broadcast ephemeris (from BNC)"));
    116114  _ephPortLineEdit  = new QLineEdit(settings.value("ephPort").toString());
    117115  _ephPortLineEdit->setWhatsThis(tr("Port for broadcast ephemeris (from BNC)"));
    118116  _ephPortLineEdit->setMaximumWidth(9*ww);
    119117
    120   _proxyHostLineEdit  = new QLineEdit(settings.value("proxyHost").toString());
    121   _proxyHostLineEdit->setWhatsThis(tr("<p>If you are running BNS within a protected Local Area Network (LAN), you might need to use a proxy server to access the Internet. Enter your proxy server IP and port number in case one is operated in front of BNC. If you do not know the IP and port of your proxy server, check the proxy server settings in your Internet browser or ask your network administrator.</p><p>Note that IP streaming is sometimes not allowed in a LAN. In this case you need to ask your network administrator for an appropriate modification of the local security policy or for the installation of a TCP relay to the NTRIP broadcasters. If these are not possible, you might need to run BNC outside your LAN on a network that has unobstructed connection to the Internet.</p>"));
    122   _proxyPortLineEdit  = new QLineEdit(settings.value("proxyPort").toString());
    123   _proxyPortLineEdit->setWhatsThis(tr("<p>If you are running BNS within a protected Local Area Network (LAN), you might need to use a proxy server to access the Internet. Enter your proxy server IP and port number in case one is operated in front of BNC. If you do not know the IP and port of your proxy server, check the proxy server settings in your Internet browser or ask your network administrator.</p><p>Note that IP streaming is sometimes not allowed in a LAN. In this case you need to ask your network administrator for an appropriate modification of the local security policy or for the installation of a TCP relay to the NTRIP broadcasters. If these are not possible, you might need to run BNC outside your LAN on a network that has unobstructed connection to the Internet.</p>"));
    124   _proxyPortLineEdit->setMaximumWidth(9*ww);
     118  _clkPortLineEdit  = new QLineEdit(settings.value("clkPort").toString());
     119  _clkPortLineEdit->setWhatsThis(tr("Port for clock results (from RTNET)"));
     120  _clkPortLineEdit->setMaximumWidth(9*ww);
    125121
    126122  // TabWidget
    127123  // ---------
    128124  QTabWidget* tabs = new QTabWidget();
    129   QWidget* tab_inp   = new QWidget();
    130   QWidget* tab_out   = new QWidget();
    131   QWidget* tab_proxy = new QWidget();
    132   tabs->addTab(tab_inp,  tr("Input"));
    133   tabs->addTab(tab_out,  tr("Output"));
    134   tabs->addTab(tab_proxy,tr("Proxy"));
     125  QWidget* tab_inp = new QWidget();
     126  QWidget* tab_out = new QWidget();
     127  tabs->addTab(tab_inp,  tr("INPUT"));
     128  tabs->addTab(tab_out,  tr("OUTPUT"));
    135129
    136130  // Input-Tab
    137131  // ---------
    138132  QGridLayout* iLayout = new QGridLayout;
    139   ///  iLayout->setColumnMinimumWidth(0,12*ww);
    140   iLayout->addWidget(new QLabel("Input Options"),0, 0, 1, 2, Qt::AlignLeft);
    141   iLayout->addWidget(new QLabel("Host (Ephemeris)"),1,0, Qt::AlignLeft);
    142   iLayout->addWidget(_ephHostLineEdit,1, 1);
    143   iLayout->addWidget(new QLabel("Port (Ephemeris)"),2,0, Qt::AlignLeft);
    144   iLayout->addWidget(_ephPortLineEdit,2, 1);
     133  iLayout->addWidget(new QLabel("Port (Ephemeris)"), 0, 0, Qt::AlignLeft);
     134  iLayout->addWidget(_ephPortLineEdit, 0, 1);
     135  iLayout->addWidget(new QLabel("Port (Clocks)"), 1, 0, Qt::AlignLeft);
     136  iLayout->addWidget(_clkPortLineEdit, 1, 1);
    145137  tab_inp->setLayout(iLayout);
    146 
    147   // Proxy-Tab
    148   // ---------
    149   QGridLayout* pLayout = new QGridLayout;
    150   pLayout->setColumnMinimumWidth(0,12*ww);
    151   pLayout->addWidget(new QLabel("Settings for the proxy in protected networks, leave the boxes blank if none."),0, 0, 1, 2, Qt::AlignLeft);
    152   pLayout->addWidget(new QLabel("Proxy host"),1,0, Qt::AlignLeft);
    153   pLayout->addWidget(_proxyHostLineEdit,1, 1);
    154   pLayout->addWidget(new QLabel("Proxy port"),2,0, Qt::AlignLeft);
    155   pLayout->addWidget(_proxyPortLineEdit,2,1);
    156   tab_proxy->setLayout(pLayout);
    157138
    158139  // Log
     
    262243void bnsWindow::slotSaveOptions() {
    263244  QSettings settings;
    264   settings.setValue("ephHost",     _ephHostLineEdit->text());
    265245  settings.setValue("ephPort",     _ephPortLineEdit->text());
    266   settings.setValue("proxyHost",   _proxyHostLineEdit->text());
    267   settings.setValue("proxyPort",   _proxyPortLineEdit->text());
     246  settings.setValue("clkPort",     _clkPortLineEdit->text());
    268247}
    269248
  • trunk/BNS/bnswindow.h

    r760 r787  
    5656  QWidget*   _canvas;
    5757
    58   QLineEdit* _ephHostLineEdit;
    5958  QLineEdit* _ephPortLineEdit;
    60   QLineEdit* _proxyHostLineEdit;
    61   QLineEdit* _proxyPortLineEdit;
     59  QLineEdit* _clkPortLineEdit;
    6260
    6361  QTextEdit*  _log;
Note: See TracChangeset for help on using the changeset viewer.