Public Member Functions | List of all members
gnsstk::IRNWeekSecond Class Reference

Detailed Description

This class handles the week and seconds-of-week of the IRN TimeTag classes. The IRN week is specified by 10-bit ModWeek, rollover at 1023, bitmask 0x03FF and epoch IRN_EPOCH_MJD

Definition at line 56 of file IRNWeekSecond.hpp.

#include <IRNWeekSecond.hpp>

Inheritance diagram for gnsstk::IRNWeekSecond:
Inheritance graph
[legend]

Public Member Functions

int bitmask (void) const
 Return the bitmask used to get the ModWeek from the full week. More...
 
virtual std::string getDefaultFormat () const
 Return a string containing the default format to use in printing. More...
 
virtual std::string getPrintChars () const
 
 IRNWeekSecond (const CommonTime &right)
 Constructor from CommonTime. More...
 
 IRNWeekSecond (unsigned int w=0, double s=0., TimeSystem ts=TimeSystem::IRN)
 Constructor. More...
 
long MJDEpoch (void) const
 Return the Modified Julian Date (MJD) of epoch for this system. More...
 
int Nbits (void) const
 
virtual std::string printError (const std::string &fmt) const
 
virtual std::string printf (const std::string &fmt) const
 
bool setFromInfo (const IdToValue &info)
 
 ~IRNWeekSecond () noexcept
 Destructor. More...
 
- Public Member Functions inherited from gnsstk::WeekSecond
 WeekSecond (unsigned int w=0, double s=0., TimeSystem ts=TimeSystem::Unknown)
 
 WeekSecond (const WeekSecond &right)
 
 WeekSecond (const TimeTag &right)
 
 WeekSecond (const CommonTime &right)
 
WeekSecondoperator= (const WeekSecond &right)
 
virtual ~WeekSecond ()
 Virtual Destructor. More...
 
virtual CommonTime convertToCommonTime () const
 
virtual void convertFromCommonTime (const CommonTime &ct)
 
virtual bool isValid () const
 Returns true if this object's members are valid, false otherwise. More...
 
virtual void reset ()
 Reset this object to the default state. More...
 
virtual unsigned int getDayOfWeek () const
 Force this interface on this classes descendants. More...
 
double getSOW () const
 
bool operator== (const WeekSecond &right) const
 
bool operator!= (const WeekSecond &right) const
 
bool operator< (const WeekSecond &right) const
 
bool operator> (const WeekSecond &right) const
 
bool operator<= (const WeekSecond &right) const
 
bool operator>= (const WeekSecond &right) const
 
- Public Member Functions inherited from gnsstk::Week
int MAXWEEK (void) const
 
Weekoperator= (const Week &right)
 Assignment Operator. More...
 
virtual int rollover (void) const
 
 Week (int w=0, TimeSystem ts=TimeSystem::Unknown)
 Constructor. More...
 
virtual ~Week ()
 Virtual Destructor. More...
 
bool operator== (const Week &right) const
 
bool operator!= (const Week &right) const
 
bool operator< (const Week &right) const
 
bool operator<= (const Week &right) const
 
bool operator> (const Week &right) const
 
bool operator>= (const Week &right) const
 
virtual unsigned int getWeek () const
 
virtual unsigned int getModWeek () const
 
virtual unsigned int getEpoch () const
 
virtual void getEpochModWeek (unsigned int &e, unsigned int &w) const
 
virtual void setEpoch (unsigned int e)
 
virtual void setModWeek (unsigned int w)
 
virtual void setEpochModWeek (unsigned int e, unsigned int w)
 
virtual void adjustToYear (unsigned int y)
 
- Public Member Functions inherited from gnsstk::TimeTag
virtual std::string asString () const
 
bool changeTimeSystem (TimeSystem timeSys)
 
bool changeTimeSystem (TimeSystem timeSys, TimeSystemConverter *conv)
 
TimeSystem getTimeSystem () const
 Obtain time system info (enum). More...
 
virtual operator CommonTime () const
 
virtual void scanf (const std::string &str, const std::string &fmt)
 
void setTimeSystem (const TimeSystem &timeSys)
 Set method for internal variable timeSystem (enum). More...
 
 TimeTag ()
 Default constructor. More...
 
 TimeTag (const TimeSystem &ts)
 Constructor. More...
 
virtual ~TimeTag ()
 Virtual Destructor. More...
 

Additional Inherited Members

- Public Types inherited from gnsstk::TimeTag
typedef std::map< char, std::string > IdToValue
 
- Static Public Member Functions inherited from gnsstk::TimeTag
static void checkTimeSystem (TimeSystem ts1, TimeSystem ts2)
 
static std::string getError ()
 This returns the default error string for the TimeTag classes. More...
 
static std::string getFormatPrefixFloat ()
 
static std::string getFormatPrefixInt ()
 
static void getInfo (const std::string &str, const std::string &fmt, IdToValue &info)
 
- Public Attributes inherited from gnsstk::WeekSecond
double sow
 
- Public Attributes inherited from gnsstk::Week
int week
 Full week number. More...
 
- Protected Attributes inherited from gnsstk::TimeTag
TimeSystem timeSystem
 time system (representation) of the data More...
 

Constructor & Destructor Documentation

◆ IRNWeekSecond() [1/2]

gnsstk::IRNWeekSecond::IRNWeekSecond ( unsigned int  w = 0,
double  s = 0.,
TimeSystem  ts = TimeSystem::IRN 
)
inline

Constructor.

Definition at line 61 of file IRNWeekSecond.hpp.

◆ IRNWeekSecond() [2/2]

gnsstk::IRNWeekSecond::IRNWeekSecond ( const CommonTime right)
inline

Constructor from CommonTime.

Definition at line 68 of file IRNWeekSecond.hpp.

◆ ~IRNWeekSecond()

gnsstk::IRNWeekSecond::~IRNWeekSecond ( )
inlinenoexcept

Destructor.

Definition at line 74 of file IRNWeekSecond.hpp.

Member Function Documentation

◆ bitmask()

int gnsstk::IRNWeekSecond::bitmask ( void  ) const
inlinevirtual

Return the bitmask used to get the ModWeek from the full week.

Implements gnsstk::Week.

Definition at line 87 of file IRNWeekSecond.hpp.

◆ getDefaultFormat()

virtual std::string gnsstk::IRNWeekSecond::getDefaultFormat ( ) const
inlinevirtual

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

Reimplemented from gnsstk::Week.

Definition at line 108 of file IRNWeekSecond.hpp.

◆ getPrintChars()

virtual std::string gnsstk::IRNWeekSecond::getPrintChars ( ) const
inlinevirtual

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

Reimplemented from gnsstk::Week.

Definition at line 102 of file IRNWeekSecond.hpp.

◆ MJDEpoch()

long gnsstk::IRNWeekSecond::MJDEpoch ( void  ) const
inlinevirtual

Return the Modified Julian Date (MJD) of epoch for this system.

Implements gnsstk::Week.

Definition at line 94 of file IRNWeekSecond.hpp.

◆ Nbits()

int gnsstk::IRNWeekSecond::Nbits ( void  ) const
inlinevirtual

Return the number of bits in the bitmask used to get the ModWeek from the full week.

Implements gnsstk::Week.

Definition at line 80 of file IRNWeekSecond.hpp.

◆ printError()

virtual std::string gnsstk::IRNWeekSecond::printError ( const std::string &  fmt) const
inlinevirtual

This function works similarly to printf. Instead of filling the format with data, it fills with error messages.

Implements gnsstk::TimeTag.

Definition at line 141 of file IRNWeekSecond.hpp.

◆ printf()

virtual std::string gnsstk::IRNWeekSecond::printf ( const std::string &  fmt) const
inlinevirtual

This function formats this time to a string. The exceptions thrown would only be due to problems parsing the fmt string.

Implements gnsstk::TimeTag.

Definition at line 115 of file IRNWeekSecond.hpp.

◆ setFromInfo()

bool gnsstk::IRNWeekSecond::setFromInfo ( const IdToValue info)
inlinevirtual

Set this object using the information provided in info.

Parameters
[in]infothe 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.

Implements gnsstk::TimeTag.

Definition at line 170 of file IRNWeekSecond.hpp.


The documentation for this class was generated from the following file:


gnsstk
Author(s):
autogenerated on Wed Oct 25 2023 02:40:45