21 #include "carma/antenna/sza/antenna/control/Site.h"
25 #include "carma/szaarrayutils/szaregs.h"
26 #include "carma/szaarrayutils/astrom.h"
37 class SzaShare :
public sza::util::AntennaDataFrameManager {
147 pthread_mutex_t guard_;
168 unsigned* boardStatusReg(
int board);
200 void setClock(
unsigned long mjd,
unsigned long sec,
201 unsigned long nanoSeconds);
230 pthread_mutex_t guard_;
264 virtual void setSite(
double longitude,
double latitude,
double altitude);
310 pthread_mutex_t guard_;
364 pthread_mutex_t guard_;
379 RegMapBlock *host_read_;
419 virtual void setTuningPending(
bool pending) {};
482 void flagBoard(
int board);
492 void unflagBoard(
int board);
506 virtual double getLst(
double utc);
511 double getTt(
double lst);
525 void setClock(
unsigned long mjd,
unsigned long sec,
526 unsigned long nanoSeconds);
547 virtual void setSite(
double longitude,
double latitude,
double altitude);
639 std::string controlHost_;
659 SzaPmacLock *pmac_lock_;
void setClock()
Fill the internal time representation with the current time.
bool verifyBoard(int board)
Return the value of the status register of a given register board.
void packFrame(sza::util::DataFrameManager *frame)
Public method to pack a frame.
void getSite(sza::antenna::control::Site *site)
Get a copy of the SZA site-specification object.
DataFrame * frame()
Return a handle to the raw data frame managed by this object.
A class to handle quadrature interpolation of ephemerides received from the control program...
double getLst(double utc)
Get the Local Sidereal Time that corresponds to a given MJD UTC.
A class for managing timeval/timespec structs.
static void pciBusErrorHandler(int sig)
This is a signal handler for trapping bus and address errors while readReg() and writeReg() access PC...
~SzaPmacLock()
Destructor.
void grabRegs(TimeOut timeout)
Acquire exclusive access to the database.
static std::string hostIpAddress(std::string host)
Validate a specified IP address or host-name alias, and return a malloc'd copy of the resulting IP ad...
double getTt(double lst)
Get the terrestrial time as MJD.
RegMapBoard * findRegMapBoard(std::string boardName)
Return a pointer to the requested register.
void extendUt1Utc(double utc, double ut1utc)
Extend the quadratic interpolation table of ut1 - utc versus MJD UTC.
This is a base class for managing a generic dataframe of registers.
double getUt1Utc(double utc)
Get the value of UT1-UTC for a given UTC.
Tagged: Fri Nov 14 12:39:38 UTC 2003.
TimeOut
Enumerate supported timeouts.
Tagged: Thu Nov 13 16:53:49 UTC 2003.
Class for managing antenna site-specific parameters.
void freezePmacReadout()
Freeze the pmac readout.
void setSite(double longitude, double latitude, double altitude)
Record new site-location details in share->site.
RegMapBoard * findRegMapBoard(std::string boardName)
Look up a board in the register map.
double getUtc()
Return the Utc as MJD.
void unfreezePmacReadout()
Un-freeze the pmac readout.
void unflagBoard(int board)
Mark a given register board as reachable.
unsigned int getNboard()
Return the number of boards in the register map.
static SzaShare * share
Static pointer for use in signal handlers.
void extendEqnEqx(double tt, double eqneqx)
Extend the quadratic interpolation table of the equation of the equinoxes versus Terrestrial Time (as...
Tagged: Sat Mar 20 05:20:30 UTC 2004.
unsigned int getNarchived()
Return the number of archived registers in the register map.
unsigned int getNreg()
Return the total number of registers in the register map.
double getUt1Utc(double utc)
Get the value of UT1-UTC for a given UTC.
void grabRegs(TimeOut timeout)
Acquire exlusive use of the register database.
void flagBoard(int board)
Flag a given register board as unreachable.
Struct used to store names and IP addresses of trusted hosts.
void setClock()
Set the current time.
SzaPmacLock(SzaShare *share)
Constructor.
The following structure encapsulates the reader lock used to prevent clashes when freezing and unfree...
double getEqnEqx(double tt)
Get the value of the equation of the equinoxes for a given terrestrial time.
double getEqnEqx(double tt)
Get the value of the equation of the equinoxes for a given terrestrial time.
bool verifyBoard(int board)
Return false if a board is flagged as unreachable.
static void pciSegvErrorHandler(int sig)
This is a signal handler for trapping bus and address errors while readReg() and writeReg() access PC...
void extendEqnEqx(double tt, double eqneqx)
Extend the quadratic interpolation table of the equation of the equinoxes versus Terrestrial Time (as...
Tagged: Thu Nov 13 16:53:48 UTC 2003.
void setSite(double longitude, double latitude, double altitude)
Public function to set the site parameters.
void extendUt1Utc(double utc, double ut1utc)
Extend the quadratic interpolation table of ut1 - utc versus MJD UTC.
double getUtc()
Get the current UTC as a Modified Julian Date.
static HostAddress host_address[]
An array of trusted hosts.
An instance of this class is created by AntennaMaster and passed to the constructors of other tasks...
void ungrabRegs()
Release the database.
SzaShare(std::string host)
Constructor.
unsigned int getNbyte()
Return the number of bytes.
void ungrabRegs()
Relinquish exclusive use to the register database.