CARMA C++
GpsBoard.h
Go to the documentation of this file.
1 #ifndef GPSBOARD_H
2 #define GPSBOARD_H
3 
12 
13 namespace sza {
14  namespace antenna {
15  namespace control {
16 
17 
22  class GpsBoard : public Board {
23 
24  public:
25 
31  GpsBoard(SzaShare* share, std::string name);
32 
46  void readTime(int year, long* mjd, long* ms);
47 
54  void enableLeapYear(int year);
55 
61  void reset();
62 
66  void connect(int year);
67 
73  void disconnect();
74 
78  void failedConnect();
79 
92  void arm(int mjd, int sec);
93 
94  private:
95 
99  RegMapBlock *config_;
100 
104  RegMapBlock *freeze_;
105 
109  RegMapBlock *release_;
110 
114  RegMapBlock *utc_reg0_;
115 
119  RegMapBlock *utc_regs_;
120 
124  RegMapBlock *period_;
125 
129  RegMapBlock *intset_;
130 
134  RegMapBlock *intvec_;
135 
139  RegMapBlock *start_;
140 
144  RegMapBlock *stop_;
145 
149  bool reported_error_;
150 
154  bool reported_unlock_;
155 
159  bool reported_badday_;
160 
164  bool reported_unreachable_;
165 
169  bool isLeapYear(int year);
170 
171  }; // End class GpsBoard
172 
173  }; // End namespace control
174  }; // End namespace antenna
175 }; // End namespace sza
176 
177 #endif // End #ifndef
Encapsulate details about the registers of the GPS time-code reader.
Definition: GpsBoard.h:22
void failedConnect()
A private function of GpsBoard::connect(), called on error.
void reset()
Called to intialize.
void enableLeapYear(int year)
Enable the leap-year flag of the GPS if the year is a leap year.
void connect(int year)
Activate the time-code-reader board.
void readTime(int year, long *mjd, long *ms)
Read the current date and time from the time code reader card, and return it as a Modified Julian Dat...
void disconnect()
Shutdown the time-code-reader board.
GpsBoard(SzaShare *share, std::string name)
Constructor function for this board.
A class which encapsulates resources of a board of the shared register map.
Definition: Board.h:24
void arm(int mjd, int sec)
Arm the gps time-code reader to output a start pulse at a given time.
Tagged: Thu Nov 13 16:53:34 UTC 2003.
An instance of this class is created by AntennaMaster and passed to the constructors of other tasks...
Definition: Share.h:38