- Timestamp:
- Mar 28, 2007, 3:04:59 PM (18 years ago)
- Location:
- trunk/BNC
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/BNC/bncgetthread.cpp
r423 r424 317 317 else if (_format.indexOf("SP3") != -1 || _format.indexOf("ASCII") != -1) { 318 318 emit(newMessage("Get Data in ASCII format")); 319 _decoder = new bncZeroDecoder( );319 _decoder = new bncZeroDecoder(_staID); 320 320 } 321 321 else { -
trunk/BNC/bnczerodecoder.cpp
r423 r424 26 26 #include <iostream> 27 27 #include "bnczerodecoder.h" 28 #include "bncutils.h" 28 29 29 30 using namespace std; … … 31 32 // Constructor 32 33 //////////////////////////////////////////////////////////////////////// 33 bncZeroDecoder::bncZeroDecoder() { 34 bncZeroDecoder::bncZeroDecoder(const QString& fileName) { 35 QSettings settings; 36 QString path = settings.value("rnxPath").toString(); 37 expandEnvVar(path); 38 39 if ( path.length() > 0 && path[path.length()-1] != QDir::separator() ) { 40 path += QDir::separator(); 41 } 42 43 _fileName = path + fileName; 44 45 _out.open(_fileName.toAscii().data()); 34 46 } 35 47 … … 37 49 //////////////////////////////////////////////////////////////////////// 38 50 bncZeroDecoder::~bncZeroDecoder() { 51 _out.close(); 39 52 } 40 53 … … 42 55 //////////////////////////////////////////////////////////////////////// 43 56 void bncZeroDecoder::Decode(char* buffer, int bufLen) { 44 cout.write(buffer, bufLen); 57 _out.write(buffer, bufLen); 58 _out.flush(); 45 59 } 46 60 -
trunk/BNC/bnczerodecoder.h
r423 r424 27 27 #define INC_BNCZERODECODER_H 28 28 29 #include <fstream> 30 #include <QtCore> 29 31 #include "RTCM/GPSDecoder.h" 30 32 31 33 class bncZeroDecoder: public GPSDecoder { 32 34 public: 33 bncZeroDecoder( );35 bncZeroDecoder(const QString& fileName); 34 36 ~bncZeroDecoder(); 35 37 virtual void Decode(char* buffer, int bufLen); 36 38 private: 39 QString _fileName; 40 std::ofstream _out; 37 41 }; 38 42
Note:
See TracChangeset
for help on using the changeset viewer.