00001 #pragma ident "$Id: $"
00002
00008 #ifndef GPSTK_NETWORK_OBS_STREAMS_HPP
00009 #define GPSTK_NETWORK_OBS_STREAMS_HPP
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033 #include <iostream>
00034 #include <string>
00035 #include <list>
00036 #include <map>
00037 #include "RinexObsStream.hpp"
00038 #include "DataStructures.hpp"
00039 #include "Synchronize.hpp"
00040
00041 namespace gpstk
00042 {
00043
00046
00047
00086 class NetworkObsStreams
00087 {
00088 public:
00090 NetworkObsStreams() : synchronizeException(false)
00091 {}
00092
00094 virtual ~NetworkObsStreams()
00095 { cleanUp(); }
00096
00099 bool addRinexObsFile(const std::string& obsFile);
00100
00105 void setReferenceSource(const SourceID& refSource)
00106 { referenceSource = refSource; }
00107
00108
00109 void setSynchronizeException(const bool& synException = true)
00110 { synchronizeException = synException; }
00111
00115 bool readEpochData(gnssDataMap& gdsMap)
00116 throw(SynchronizeException);
00117
00119 SourceID sourceIDOfRinexObsFile(std::string obsFile);
00120
00121 RinexObsStream* getRinexObsStream(const SourceID& source)
00122 { return mapSourceStream[source]; }
00123
00124 protected:
00125
00127 struct ObsData
00128 {
00129 std::string obsFile;
00130
00131 SourceID obsSource;
00132
00133 Synchronize* pSynchro;
00134 RinexObsStream* pObsStream;
00135 };
00136
00138 std::list<ObsData> allStreamData;
00139
00141 std::map<SourceID, RinexObsStream*> mapSourceStream;
00142
00144 std::map<SourceID, Synchronize*> mapSourceSynchro;
00145
00147 SourceID referenceSource;
00148
00150 bool synchronizeException;
00151
00152 private:
00153
00154 virtual void cleanUp();
00155
00156 };
00157
00159
00160
00161 }
00162
00163 #endif // NetworkObsStreams
00164