Changeset 1622 in ntrip


Ignore:
Timestamp:
Feb 19, 2009, 1:41:34 PM (15 years ago)
Author:
weber
Message:

* empty log message *

Location:
trunk/BNC
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/BNC/bnchelp.html

    r1620 r1622  
    848848<ul>
    849849<li>Enter the IP address of the stream providing host.</li>
    850 <li>Enter the port number of the stream providing host.</li>
     850<li>Enter the IP port number of the stream providing host.</li>
    851851<li>Specify a mountpoint. Recommended is a 4-character reference station ID. Example: FFMJ</li>
    852852<li>Specify the stream format. Available options are 'RTCM_2', 'RTCM_3', 'RTIGS', and 'ZERO'.</li>
  • trunk/BNC/bncnetqueryv0.cpp

    r1620 r1622  
    55 * Class:      bncNetQueryV0
    66 *
    7  * Purpose:    Blocking Network Requests (NTRIP Version 1)
     7 * Purpose:    Direct TCP/IP Network Requests no NTRIP
    88 *
    99 * Author:     L. Mervart
     
    106106  }
    107107
    108   // Send Request
    109   // ------------
    110   QString uName = QUrl::fromPercentEncoding(_url.userName().toAscii());
    111   QString passW = QUrl::fromPercentEncoding(_url.password().toAscii());
    112   QByteArray userAndPwd;
    113 
    114   if(!uName.isEmpty() || !passW.isEmpty()) {
    115     userAndPwd = "Authorization: Basic " + (uName.toAscii() + ":" +
    116     passW.toAscii()).toBase64() + "\r\n";
    117   }
    118 
    119   QByteArray reqStr;
    120   if (_url.path().indexOf("/") != 0) _url.setPath("/");
    121   reqStr = "GET " + _url.path().toAscii() + " HTTP/1.0\r\n"
    122            + "User-Agent: NTRIP BNC/" BNCVERSION "\r\n"
    123            + userAndPwd + "\r\n";
    124 
    125   // NMEA string to handle VRS stream
    126   // --------------------------------
    127   if (!gga.isEmpty()) {
    128     reqStr += gga + "\r\n";
    129   }
    130 
    131   _socket->write(reqStr, reqStr.length());
    132 
    133   if (!_socket->waitForBytesWritten(_timeOut)) {
    134     delete _socket;
    135     _socket = 0;
    136     _status = error;
    137     emit newMessage(_url.path().toAscii() + " write timeout", true);
    138     return;
    139   }
    140 
    141108  // Read Caster Response
    142109  // --------------------
     
    153120      QString line = _socket->readLine();
    154121      response.push_back(line);
    155       if (line.trimmed().isEmpty()) {
    156         break;
    157       }
    158       if (line.indexOf("200 OK") == -1) { // != weber
    159         response.clear();
    160         break;
    161       }
     122      response.clear();
     123      break;
    162124    }
    163   }
    164   if (response.size() > 0) {
    165     delete _socket;
    166     _socket = 0;
    167     _status = error;
    168     emit newMessage(_url.path().toAscii() + " wrong caster response\n" +
    169                     response.join("\n").toAscii(), true);
    170125  }
    171126}
Note: See TracChangeset for help on using the changeset viewer.