CARMA C++
sza::antenna::control::GpsBoard Class Reference

Encapsulate details about the registers of the GPS time-code reader. More...

#include <carma/antenna/sza/antenna/control/GpsBoard.h>

Inheritance diagram for sza::antenna::control::GpsBoard:
sza::antenna::control::Board

Public Member Functions

void arm (int mjd, int sec)
 Arm the gps time-code reader to output a start pulse at a given time. More...
 
void connect (int year)
 Activate the time-code-reader board. More...
 
void disconnect ()
 Shutdown the time-code-reader board. More...
 
void enableLeapYear (int year)
 Enable the leap-year flag of the GPS if the year is a leap year. More...
 
void failedConnect ()
 A private function of GpsBoard::connect(), called on error. More...
 
 GpsBoard (SzaShare *share, std::string name)
 Constructor function for this board. More...
 
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 Date. More...
 
void reset ()
 Called to intialize. More...
 
- Public Member Functions inherited from sza::antenna::control::Board
 Board (SzaShare *share, std::string name)
 Constructor looks up a board by name and stores a pointer to it in private member board_ (below). More...
 
 Board (SzaShare *share, sza::util::AntNum ant)
 Constructor looks up the rx board corresponding to the requested antenna and stores a pointer to it in private member board_ (below) More...
 
 Board (SzaShare *share)
 Constructor for a virtual board. More...
 
RegMapBlock * findReg (char *name)
 Return a pointer to a register of the board managed by this object. More...
 
int getIndex ()
 Public function to return the index of this board in the register database. More...
 
bool isReachable ()
 Verify that this board is reachable. More...
 
virtual void readReg (RegMapBlock *blk, unsigned int first, unsigned int nreg, unsigned int *value)
 Method to read a register from this board. More...
 
virtual void writeReg (RegMapBlock *blk, unsigned int first, unsigned int nreg, unsigned int *value)
 Methods to write to a register of this board. More...
 
virtual void writeReg (RegMapBlock *blk, unsigned int first, unsigned int nreg, bool *value)
 Methods to write to a register of this board. More...
 
virtual ~Board ()
 Declaration of destructor as pure virtual prevents instantiation of this base class. More...
 

Additional Inherited Members

- Protected Attributes inherited from sza::antenna::control::Board
RegMapBoard * board_
 A pointer to the board this object refers to. More...
 
bool hasBoard_
 True if this Board has a real board corresponding to it. More...
 
SzaShareshare_
 The resource object of the shared memory database. More...
 

Detailed Description

Encapsulate details about the registers of the GPS time-code reader.

Definition at line 22 of file GpsBoard.h.

Constructor & Destructor Documentation

sza::antenna::control::GpsBoard::GpsBoard ( SzaShare share,
std::string  name 
)

Constructor function for this board.

Exceptions
Exception

Member Function Documentation

void sza::antenna::control::GpsBoard::arm ( int  mjd,
int  sec 
)

Arm the gps time-code reader to output a start pulse at a given time.

Input: mjd int The Modified Julian Day number at which to output the start pulse. sec int The number of seconds into the day at which to output the start pulse.

Exceptions
Exception
void sza::antenna::control::GpsBoard::connect ( int  year)

Activate the time-code-reader board.

void sza::antenna::control::GpsBoard::disconnect ( )

Shutdown the time-code-reader board.

Exceptions
Exception
void sza::antenna::control::GpsBoard::enableLeapYear ( int  year)

Enable the leap-year flag of the GPS if the year is a leap year.

Exceptions
Exception
void sza::antenna::control::GpsBoard::failedConnect ( )

A private function of GpsBoard::connect(), called on error.

void sza::antenna::control::GpsBoard::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 Date.

Be aware that this function is expensive and that it can fail.

Parameters
yearint The current year.
mjdlong * On output the Modified Julian Day number will be assigned to *mjd.
mslong * On output the time of day (milli- seconds) will be assigned to *ms.
Exceptions
Exception
void sza::antenna::control::GpsBoard::reset ( )
virtual

Called to intialize.

Exceptions
Exception

Reimplemented from sza::antenna::control::Board.


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