- Timestamp:
- Feb 19, 2009, 1:41:34 PM (16 years ago)
- Location:
- trunk/BNC
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/BNC/bnchelp.html
r1620 r1622 848 848 <ul> 849 849 <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> 851 851 <li>Specify a mountpoint. Recommended is a 4-character reference station ID. Example: FFMJ</li> 852 852 <li>Specify the stream format. Available options are 'RTCM_2', 'RTCM_3', 'RTIGS', and 'ZERO'.</li> -
trunk/BNC/bncnetqueryv0.cpp
r1620 r1622 5 5 * Class: bncNetQueryV0 6 6 * 7 * Purpose: BlockingNetwork Requests(NTRIP Version 1)7 * Purpose: Direct TCP/IP Network Requests no NTRIP 8 8 * 9 9 * Author: L. Mervart … … 106 106 } 107 107 108 // Send Request109 // ------------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 stream126 // --------------------------------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 141 108 // Read Caster Response 142 109 // -------------------- … … 153 120 QString line = _socket->readLine(); 154 121 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; 162 124 } 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);170 125 } 171 126 }
Note:
See TracChangeset
for help on using the changeset viewer.