Changeset 426 in ntrip


Ignore:
Timestamp:
Mar 28, 2007, 3:21:19 PM (17 years ago)
Author:
mervart
Message:

* empty log message *

Location:
trunk/BNC
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/BNC/bnczerodecoder.cpp

    r424 r426  
    4343  _fileName = path + fileName;
    4444
    45   _out.open(_fileName.toAscii().data());
     45  reopen();
    4646}
    4747
     
    5252}
    5353
     54// Reopen Output File
     55////////////////////////////////////////////////////////////////////////
     56void bncZeroDecoder::reopen() {
     57  QDate currDate = QDate::currentDate();
     58  if (!_fileDate.isValid() || _fileDate != currDate) {
     59    _out.close();
     60    _out.open( (_fileName + "_" + currDate.toString("yyMMdd")).toAscii().data());
     61    _fileDate = currDate;
     62  }
     63}
     64
    5465// Decode Method
    5566////////////////////////////////////////////////////////////////////////
    5667void bncZeroDecoder::Decode(char* buffer, int bufLen) {
     68  reopen();
    5769  _out.write(buffer, bufLen);
    5870  _out.flush();
  • trunk/BNC/bnczerodecoder.h

    r424 r426  
    3737    virtual void Decode(char* buffer, int bufLen);
    3838  private:
     39    void reopen();
    3940    QString        _fileName;
    4041    std::ofstream  _out;
     42    QDate          _fileDate;
    4143};
    4244
Note: See TracChangeset for help on using the changeset viewer.