00001 #pragma ident "$Id: AntexHeader.hpp 2293 2010-02-12 18:14:16Z btolman $"
00002
00008 #ifndef GPSTK_ANTEX_HEADER_HPP
00009 #define GPSTK_ANTEX_HEADER_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
00034
00035
00036
00037
00038
00039
00040
00041
00042
00043
00044
00045
00046
00047 #include <string>
00048 #include <vector>
00049
00050 #include "AntexBase.hpp"
00051 #include "FFStream.hpp"
00052
00053 namespace gpstk
00054 {
00057
00062 class AntexHeader : public AntexBase
00063 {
00064 public:
00065
00067 AntexHeader() : version(1.3), valid(false) {}
00068
00070 inline void clear()
00071 {
00072 version = 1.3;
00073 valid = false;
00074 commentList.clear();
00075 }
00076
00079
00080 static const std::string versionString;
00081 static const std::string pcvTypeString;
00082 static const std::string headerCommentString;
00083 static const std::string endOfHeaderString;
00084
00085
00088 enum validBits
00089 {
00090 versionValid = 0x01,
00091 systemValid = 0x02,
00092 pcvTypeValid = 0x04,
00093 commentValid = 0x08,
00094 endValid = 0x080000000,
00095 allValid13 = 0x080000007
00096 };
00097
00099
00100 unsigned long valid;
00101 double version;
00102 char system;
00103 char pcvType;
00104 std::string refAntType;
00105 std::string refAntSerNum;
00106 std::vector<std::string> commentList;
00107
00108
00110 virtual ~AntexHeader() {}
00111
00112
00114 virtual bool isHeader() const {return true;}
00115
00118 virtual void dump(std::ostream& s) const;
00119
00122 void ParseHeaderRecord(std::string& line)
00123 throw(FFStreamError);
00124
00127 void WriteHeaderRecords(FFStream& s) const
00128 throw(FFStreamError, StringUtils::StringException);
00129
00131 bool isValid() const { return ((valid & allValid13) == allValid13); }
00132
00133 protected:
00135 virtual void reallyPutRecord(FFStream& s) const
00136 throw(std::exception, FFStreamError, StringUtils::StringException);
00137
00145 virtual void reallyGetRecord(FFStream& s)
00146 throw(std::exception, FFStreamError, StringUtils::StringException);
00147
00148 };
00149
00151
00152 }
00153
00154 #endif // GPSTK_ANTEX_HEADER_HPP