Changeset 9880 in ntrip for trunk/BNC/src
- Timestamp:
- Nov 21, 2022, 1:06:02 PM (2 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/BNC/src/upload/bncrtnetuploadcaster.cpp
r9879 r9880 296 296 } 297 297 298 QStringList lines; 298 299 // If there is there more than 1 epoch line in the buffer 299 300 while (_rtnetStreamBuffer.count('*') > 1) { 300 cout << "more than 1 epoch in buffer: " << _rtnetStreamBuffer.count('*') << endl; 301 emit(newMessage(QString("bncRtnetUploadCaster: more than 1 epoch in buffer: %1").arg(_rtnetStreamBuffer.count('*')).toLatin1(), false)); 302 int nextEpochEnd = _rtnetStreamBuffer.indexOf("EOE"); 303 QString rtnetStreamBuffer = _rtnetStreamBuffer.mid(nextEpochEnd); 301 cout << "more than 1 epoch in buffer: " << _rtnetStreamBuffer.count('*') << endl; emit(newMessage(QString("bncRtnetUploadCaster: more than 1 epoch in buffer: %1").arg(_rtnetStreamBuffer.count('*')).toLatin1(), false)); 302 QString rtnetStreamBuffer = _rtnetStreamBuffer; 304 303 int nextEpoch = rtnetStreamBuffer.indexOf('*'); 305 cout << "=============" << endl;306 cout << "nextEpochEnd: " << nextEpochEnd << endl;307 cout << "nextEpoch: " << nextEpoch << endl;308 cout << "iEpoEnd : " << iEpoEnd << endl;304 int nextEpochEnd = rtnetStreamBuffer.indexOf("EOE"); 305 _rtnetStreamBuffer = _rtnetStreamBuffer.mid(1); 306 nextEpoch = rtnetStreamBuffer.indexOf('*'); 307 _rtnetStreamBuffer = _rtnetStreamBuffer.mid(nextEpoch); 309 308 if (nextEpoch != -1 && nextEpoch < iEpoEnd) { 310 _rtnetStreamBuffer = _rtnetStreamBuffer.mid(nextEpoch); 311 cout << "next Epoch:\n" << _rtnetStreamBuffer.toStdString().c_str() << endl; 309 rtnetStreamBuffer = rtnetStreamBuffer.mid(nextEpoch); 310 lines = _rtnetStreamBuffer.left(nextEpochEnd).split('\n', QString::SkipEmptyParts); 311 if (lines.size() > 2) { 312 decodeRtnetEpoch(lines); 313 } 312 314 } 313 315 else if (nextEpoch != -1 && nextEpoch >= iEpoEnd) { 314 316 break; 315 317 } 316 else { 317 cout << "_rtnetStreamBuffer: \n" << _rtnetStreamBuffer.toStdString().c_str() << endl; 318 } 319 cout << "=============" << endl; 320 } 321 322 QStringList lines = _rtnetStreamBuffer.left(iEpoEnd).split('\n', QString::SkipEmptyParts); 318 } 319 320 lines = _rtnetStreamBuffer.left(iEpoEnd).split('\n', QString::SkipEmptyParts); 323 321 324 322 _rtnetStreamBuffer = _rtnetStreamBuffer.mid(iEpoEnd + 3);
Note:
See TracChangeset
for help on using the changeset viewer.