Changeset 2529 in ntrip
- Timestamp:
- Aug 3, 2010, 7:43:07 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/BNC/bncrawfile.cpp
r2527 r2529 45 45 using namespace std; 46 46 47 #define RAW_FILE_VERSION "1" 48 47 49 // Constructor 48 50 //////////////////////////////////////////////////////////////////////////// … … 64 66 QStringList lst = line.split(' '); 65 67 _version = lst.value(0).toInt(); 66 67 line = _inpFile->readLine();68 bncApp* app = (bncApp*) qApp;69 app->_currentDateAndTimeGPS =70 new QDateTime(QDateTime::fromString(line, Qt::ISODate));71 68 } 72 69 … … 76 73 _outFile = new QFile(_fileName); 77 74 _outFile->open(QIODevice::WriteOnly); 78 QByteArray header = "1 Version of BNC raw file\n" + 79 currentDateAndTimeGPS().toString(Qt::ISODate).toAscii(); 80 _outFile->write(header); 75 _outFile->write(RAW_FILE_VERSION " Version of BNC raw file"); 81 76 } 82 77 } … … 94 89 const QByteArray& format) { 95 90 if (_outFile) { 96 QString chunkHeader = 97 QString("\n%1 %2 %3\n").arg(QString(staID)).arg(QString(format)).arg(data.size()); 91 QString chunkHeader = QString("\n%1 %2 %3 %4\n") 92 .arg(currentDateAndTimeGPS().toString(Qt::ISODate)) 93 .arg(QString(staID)) 94 .arg(QString(format)) 95 .arg(data.size()); 98 96 _outFile->write(chunkHeader.toAscii()); 99 97 _outFile->write(data); … … 113 111 QStringList lst = line.split(' '); 114 112 115 _staID = lst.value(0).toAscii(); 116 _format = lst.value(1).toAscii(); 117 int nBytes = lst.value(2).toInt(); 113 bncApp* app = (bncApp*) qApp; 114 delete app->_currentDateAndTimeGPS; 115 app->_currentDateAndTimeGPS = 116 new QDateTime(QDateTime::fromString(lst.value(0), Qt::ISODate)); 117 118 _staID = lst.value(1).toAscii(); 119 _format = lst.value(2).toAscii(); 120 int nBytes = lst.value(3).toInt(); 118 121 119 122 data = _inpFile->read(nBytes);
Note:
See TracChangeset
for help on using the changeset viewer.