Changeset 2523 in ntrip for trunk/BNC/bncrawfile.cpp
- Timestamp:
- Aug 3, 2010, 1:13:59 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/BNC/bncrawfile.cpp
r2522 r2523 52 52 _format = format; 53 53 _staID = fileName.mid(fileName.lastIndexOf(QDir::separator())+1,5); 54 _inp OutFlag = ioFlg;54 _inpFile = 0; 55 55 _outFile = 0; 56 _version = 0; 56 57 57 // Initialize 58 // ---------- 59 if (_inpOutFlag == input) { 58 // Initialize for Input 59 // -------------------- 60 if (ioFlg == input) { 61 _inpFile = new QFile(_fileName); 62 _inpFile->open(QIODevice::ReadOnly); 63 QString line = _inpFile->readLine(); 64 QStringList lst1 = line.split(' '); 65 _version = lst1.value(0).toInt(); 66 67 line = _inpFile->readLine(); 60 68 bncApp* app = (bncApp*) qApp; 61 // TODO: set date and time 69 app->_currentDateAndTimeGPS = 70 new QDateTime(QDateTime::fromString(line, Qt::ISODate)); 71 } 72 73 // Initialize for Output 74 // --------------------- 75 else { 76 _outFile = new QFile(_fileName); 77 _outFile->open(QIODevice::WriteOnly); 78 QByteArray header = "1 Version of BNC raw file\n" + 79 currentDateAndTimeGPS().toString(Qt::ISODate).toAscii(); 80 _outFile->write(header); 62 81 } 63 82 } … … 73 92 void bncRawFile::writeRawData(const QByteArray& data, const QByteArray& staID, 74 93 const QByteArray& format) { 75 76 if ( !_outFile && !_fileName.isEmpty() ) {77 _outFile = new QFile(_fileName);78 _outFile->open(QIODevice::WriteOnly);79 QByteArray header = "1 Version of BNC raw file\n" +80 currentDateAndTimeGPS().toString(Qt::ISODate).toAscii();81 _outFile->write(header);82 }83 84 94 if (_outFile) { 85 95 QString chunkHeader = … … 94 104 // Raw Input 95 105 //////////////////////////////////////////////////////////////////////////// 96 QByteArray bncRawFile::read () {106 QByteArray bncRawFile::readChunk() { 97 107 98 108 return "";
Note:
See TracChangeset
for help on using the changeset viewer.