GPSWeekZcount Class Reference

#include <GPSWeekZcount.hpp>

Inheritance diagram for GPSWeekZcount:

Inheritance graph
[legend]
Collaboration diagram for GPSWeekZcount:

Collaboration graph
[legend]
List of all members.

Detailed Description

This class encapsulates the "Full GPS Week and GPS Z-count" time representation.

Definition at line 39 of file GPSWeekZcount.hpp.

Public Member Functions

 GPSWeekZcount (int w=0, int z=0) throw ()
 Default Constructor.
 GPSWeekZcount (const GPSWeekZcount &right) throw ()
 Copy Constructor.
 GPSWeekZcount (const TimeTag &right) throw ( gpstk::InvalidRequest )
 Alternate Copy Constructor.
 GPSWeekZcount (const CommonTime &right) throw ( InvalidRequest )
 Alternate Copy Constructor.
GPSWeekZcountoperator= (const GPSWeekZcount &right) throw ()
 Assignment Operator.
virtual ~GPSWeekZcount () throw ()
 Virtual Destructor.
virtual CommonTime convertToCommonTime () const throw (InvalidRequest)
 
Exceptions:
InvalidRequest if this TimeTag cannot be correctly represented by a CommonTime object.

virtual void convertFromCommonTime (const CommonTime &ct) throw (InvalidRequest)
virtual std::string printf (const std::string &fmt) const throw ( gpstk::StringUtils::StringException )
 This function formats this time to a string.
virtual std::string printError (const std::string &fmt) const throw ( gpstk::StringUtils::StringException )
 This function works similarly to printf.
virtual bool setFromInfo (const IdToValue &info) throw ()
 Set this object using the information provided in info.
virtual std::string getPrintChars () const throw ()
 Return a string containing the characters that this class understands when printing times.
virtual std::string getDefaultFormat () const throw ()
 Return a string containing the default format to use in printing.
virtual bool isValid () const throw ()
 Returns true if this object's members are valid, false otherwise.
virtual void reset () throw ()
 Reset this object to the default state.
virtual unsigned int getDayOfWeek () const throw ()
 Force this interface on this classes descendants.
bool operator== (const GPSWeekZcount &right) const throw ()
bool operator!= (const GPSWeekZcount &right) const throw ()
bool operator< (const GPSWeekZcount &right) const throw ()
bool operator> (const GPSWeekZcount &right) const throw ()
bool operator<= (const GPSWeekZcount &right) const throw ()
bool operator>= (const GPSWeekZcount &right) const throw ()
Special Zcount-related Methods.
Note:
The 29- and 32-bit Zcounts cannot represent time from GPS weeks over 1023 and 8191 respectively.


unsigned int getZcount29 () const
unsigned int getZcount32 () const
GPSWeekZcountsetZcount29 (unsigned int z) throw ()
GPSWeekZcountsetZcount32 (unsigned int z) throw ()

Public Attributes

unsigned int zcount

Static Public Attributes

const unsigned int bits19 = 0x7FFFF
 This is just a 19-bit mask.


Member Function Documentation

void convertFromCommonTime const CommonTime ct  )  throw (InvalidRequest) [virtual]
 

This is the earliest CommonTime representable by GPSWeekZcount.

Implements TimeTag.

Definition at line 60 of file GPSWeekZcount.cpp.

References GPSTK_THROW.

CommonTime convertToCommonTime  )  const throw (InvalidRequest) [virtual]
 

Exceptions:
InvalidRequest if this TimeTag cannot be correctly represented by a CommonTime object.

Implements TimeTag.

Definition at line 41 of file GPSWeekZcount.cpp.

References gpstk::GPS_EPOCH_JDAY, GPSTK_THROW, and GPSWeekZcount::zcount.

Referenced by gpstk::mixedScanTime(), and gpstk::scanTime().

virtual unsigned int getDayOfWeek  )  const throw () [inline, virtual]
 

Force this interface on this classes descendants.

Implements GPSWeek.

Definition at line 185 of file GPSWeekZcount.hpp.

virtual std::string getDefaultFormat  )  const throw () [inline, virtual]
 

Return a string containing the default format to use in printing.

Reimplemented from GPSWeek.

Definition at line 144 of file GPSWeekZcount.hpp.

virtual std::string getPrintChars  )  const throw () [inline, virtual]
 

Return a string containing the characters that this class understands when printing times.

Reimplemented from GPSWeek.

Definition at line 137 of file GPSWeekZcount.hpp.

unsigned int getZcount29  )  const [inline]
 

Definition at line 168 of file GPSWeekZcount.hpp.

unsigned int getZcount32  )  const [inline]
 

Definition at line 173 of file GPSWeekZcount.hpp.

virtual bool isValid  )  const throw () [inline, virtual]
 

Returns true if this object's members are valid, false otherwise.

Reimplemented from GPSWeek.

Definition at line 150 of file GPSWeekZcount.hpp.

std::string printError const std::string &  fmt  )  const throw ( gpstk::StringUtils::StringException ) [virtual]
 

This function works similarly to printf.

Instead of filling the format with data, it fills with error messages.

Reimplemented from GPSWeek.

Definition at line 114 of file GPSWeekZcount.cpp.

References gpstk::StringUtils::formattedPrint(), and GPSTK_RETHROW.

std::string printf const std::string &  fmt  )  const throw ( gpstk::StringUtils::StringException ) [virtual]
 

This function formats this time to a string.

The exceptions thrown would only be due to problems parsing the fmt string.

Reimplemented from GPSWeek.

Definition at line 87 of file GPSWeekZcount.cpp.

References gpstk::StringUtils::formattedPrint(), and GPSTK_RETHROW.

virtual void reset  )  throw () [inline, virtual]
 

Reset this object to the default state.

Reimplemented from GPSWeek.

Definition at line 157 of file GPSWeekZcount.hpp.

bool setFromInfo const IdToValue info  )  throw () [virtual]
 

Set this object using the information provided in info.

Parameters:
info the IdToValue object to which this object shall be set.
Returns:
true if this object was successfully set using the data in info, false if not.

Reimplemented from GPSWeek.

Definition at line 141 of file GPSWeekZcount.cpp.

References gpstk::StringUtils::asInt().

Referenced by gpstk::scanTime().

GPSWeekZcount & setZcount29 unsigned int  z  )  throw ()
 

Definition at line 191 of file GPSWeekZcount.cpp.

Referenced by gpstk::mixedScanTime().

GPSWeekZcount & setZcount32 unsigned int  z  )  throw ()
 

Definition at line 199 of file GPSWeekZcount.cpp.


Member Data Documentation

const unsigned int bits19 = 0x7FFFF [static]
 

This is just a 19-bit mask.

Definition at line 43 of file GPSWeekZcount.hpp.

unsigned int zcount
 

Definition at line 251 of file GPSWeekZcount.hpp.

Referenced by GPSWeekZcount::convertToCommonTime(), gpstk::mixedScanTime(), Epoch::operator GPSZcount(), and Epoch::set().


The documentation for this class was generated from the following files:
Generated on Wed Feb 8 03:31:39 2012 for GPS ToolKit Software Library by  doxygen 1.3.9.1