- Timestamp:
- Mar 31, 2011, 6:47:31 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/BNC/upload/bncrtnetuploadcaster.cpp
r3227 r3230 194 194 QMutexLocker locker(&_mutex); 195 195 196 // Append to buffer197 // ---------------- 196 // Append to internal buffer 197 // ------------------------- 198 198 _rtnetStreamBuffer.append(QByteArray(buffer, bufLen)); 199 int iLastAsterix = _rtnetStreamBuffer.lastIndexOf('*'); // begin of last epoch 200 if (iLastAsterix == -1) { 199 200 // Select buffer part that contains last epoch 201 // ------------------------------------------- 202 QStringList lines; 203 int iEpoBeg = _rtnetStreamBuffer.lastIndexOf('*'); // begin of last epoch 204 if (iEpoBeg == -1) { 201 205 _rtnetStreamBuffer.clear(); 202 206 return; 203 207 } 208 _rtnetStreamBuffer = _rtnetStreamBuffer.mid(iEpoBeg); 209 210 int iEpoEnd = _rtnetStreamBuffer.lastIndexOf("EOE"); // end of last epoch 211 if (iEpoEnd == -1) { 212 return; 213 } 204 214 else { 205 _rtnetStreamBuffer = _rtnetStreamBuffer.mid(iLastAsterix); 206 } 207 208 // Prepare list of lines with satellite positions in SP3-like format 209 // ----------------------------------------------------------------- 210 QStringList lines = _rtnetStreamBuffer.split('\n', QString::SkipEmptyParts); 215 lines = _rtnetStreamBuffer.left(iEpoEnd).split('\n', QString::SkipEmptyParts); 216 _rtnetStreamBuffer = _rtnetStreamBuffer.mid(iEpoEnd+3); 217 } 211 218 212 219 if (lines.size() < 2) {
Note:
See TracChangeset
for help on using the changeset viewer.