Changeset 3004 in ntrip


Ignore:
Timestamp:
Feb 22, 2011, 11:53:04 AM (13 years ago)
Author:
mervart
Message:
 
Location:
trunk/BNC
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/BNC/bncapp.cpp

    r2922 r3004  
    839839    QByteArray fileName = settings.value("rawOutFile").toByteArray();
    840840    if (!fileName.isEmpty()) {
    841       _rawFile = new bncRawFile(fileName, format, bncRawFile::output);
     841      _rawFile = new bncRawFile(fileName, staID, format, bncRawFile::output);
    842842    }
    843843  }
  • trunk/BNC/bncmain.cpp

    r2909 r3004  
    6464  QByteArray rawFileName;
    6565  QByteArray format;
     66  QByteArray staID;
    6667  QString    confFileName;
    6768
     
    8182        format = QByteArray(argv[ii+1]);
    8283      }
     84      if (QByteArray(argv[ii]).indexOf("-staID") != -1) {
     85        staID = QByteArray(argv[ii+1]);
     86      }
    8387    }
    8488  }
     
    8993
    9094  QString printHelp = "Usage: bnc -nw\n"
    91                       "           --conf <confFileName>\n"
    92                       "           --file <rawFileName>\n"
     95                      "           --conf   <confFileName>\n"
     96                      "           --file   <rawFileName>\n"
     97                      "           --staID  <station>\n"
    9398                      "           --format <RTIGS | RTCM_2 | RTCM_3>\n";
    9499
     
    150155    // -----------------------------
    151156    else {
    152       if ( format.isEmpty() ) {
     157      if ( format.isEmpty() || staID.isEmpty() ) {
    153158        cout << printHelp.toAscii().data() << endl;
    154159        exit(0);
    155160      }
    156161
    157       bncRawFile* rawFile = new bncRawFile(rawFileName, format,
     162      bncRawFile* rawFile = new bncRawFile(rawFileName, staID, format,
    158163                                           bncRawFile::input);
    159164
  • trunk/BNC/bncrawfile.cpp

    r2543 r3004  
    4949// Constructor
    5050////////////////////////////////////////////////////////////////////////////
    51 bncRawFile::bncRawFile(const QByteArray& fileName, const QByteArray& format,
    52                        inpOutFlag ioFlg) {
     51bncRawFile::bncRawFile(const QByteArray& fileName, const QByteArray& staID,
     52                       const QByteArray& format, inpOutFlag ioFlg) {
     53
    5354  _fileName   = fileName; expandEnvVar(_fileName);
     55  _staID      = staID;
    5456  _format     = format;
    55   _staID      = fileName.mid(fileName.lastIndexOf(QDir::separator())+1,5); 
    5657  _inpFile    = 0;
    5758  _outFile    = 0;
  • trunk/BNC/bncrawfile.h

    r2542 r3004  
    3636  enum inpOutFlag {input, output};
    3737
    38   bncRawFile(const QByteArray& fileName, const QByteArray& format,
    39              inpOutFlag ioflg);
     38  bncRawFile(const QByteArray& fileName, const QByteArray& staID,
     39             const QByteArray& format, inpOutFlag ioflg);
    4040
    4141  ~bncRawFile(); 
Note: See TracChangeset for help on using the changeset viewer.