1 #ifndef SZA_ANTENNA_SZASHARE_H
2 #define SZA_ANTENNA_SZASHARE_H
22 #include "carma/antenna/sza/antenna/control/Site.h"
26 #include "carma/szaarrayutils/szaregs.h"
27 #include "carma/szaarrayutils/astrom.h"
112 unsigned nreg,
DataPtr& value);
128 unsigned nreg, Dataptr& value);
203 sza::util::Mutex guard_;
208 unsigned char* shadow_;
225 unsigned* SzaShare::SzaRegDb::boardStatusReg(
int board);
257 void setClock(
unsigned long mjd,
unsigned long sec,
258 unsigned long nanoSeconds);
287 sza::util::Mutex guard_;
321 void setSite(
double longitude,
double latitude,
double altitude);
367 sza::util::Mutex guard_;
459 void readReg(RegMapBlock *blk,
unsigned first,
unsigned nreg,
477 void readRawReg(RegMapBlock *blk,
unsigned first,
unsigned nreg,
494 void writeReg(RegMapBlock* blk,
unsigned first,
unsigned nreg,
497 void writeReg(RegMapBlock* blk,
unsigned first,
unsigned nreg,
498 unsigned char* value);
500 void writeReg(RegMapBlock* blk,
unsigned first,
unsigned nreg,
501 signed short* value);
503 void writeReg(RegMapBlock* blk,
unsigned first,
unsigned nreg,
504 unsigned short* value);
506 void writeReg(RegMapBlock* blk,
unsigned first,
unsigned nreg,
509 void writeReg(RegMapBlock* blk,
unsigned first,
unsigned nreg,
510 unsigned int* value);
512 void writeReg(RegMapBlock* blk,
unsigned first,
unsigned nreg,
515 void writeReg(RegMapBlock* blk,
unsigned first,
unsigned nreg,
516 unsigned long* value);
518 void writeReg(RegMapBlock *blk,
unsigned first,
unsigned nreg,
521 void writeReg(RegMapBlock *blk,
unsigned first,
unsigned nreg,
538 void writeRawReg(RegMapBlock* blk,
unsigned first,
unsigned nreg,
539 unsigned char* value);
541 void writeRawReg(RegMapBlock* blk,
unsigned first,
unsigned nreg,
542 unsigned short* value);
544 void writeRawReg(RegMapBlock* blk,
unsigned first,
unsigned nreg,
547 void writeRawReg(RegMapBlock* blk,
unsigned first,
unsigned nreg,
550 void writeRawReg(RegMapBlock* blk,
unsigned first,
unsigned nreg,
583 void flagBoard(
int board);
593 void unflagBoard(
int board);
607 double getLst(
double utc);
612 double getTt(
double lst);
626 void setClock(
unsigned long mjd,
unsigned long sec,
627 unsigned long nanoSeconds);
648 void setSite(
double longitude,
double latitude,
double altitude);
715 void packRegBoard(RegMapBoard* brd,
721 unsigned char* tmpbuf_;
726 std::string controlHost_;
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.
An object of the following type will be used to specify an arbitrary pointer.
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.
void writeRawReg(RegMapBlock *blk, unsigned first, unsigned nreg, unsigned char *value)
The same as writeReg() but mutual exclusion and exception handling are left up to the caller...
Tagged: Thu Nov 13 16:53:49 UTC 2003.
Class for managing antenna site-specific parameters.
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 unflagBoard(int board)
Mark a given register board as reachable.
unsigned int getNboard()
Return the number of boards in the register map.
void readReg(RegMapBlock *blk, unsigned first, unsigned nreg, unsigned *value)
Read one or more elements of a given register from the register database.
void extendEqnEqx(double tt, double eqneqx)
Extend the quadratic interpolation table of the equation of the equinoxes versus Terrestrial Time (as...
unsigned int getNarchived()
Return the number of archived 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.
void writeReg(RegMapBlock *blk, unsigned first, unsigned nreg, signed char *value)
Write one or more elements of a given SZA PCI register, with mutual exlusion and exception handling...
Struct used to store names and IP addresses of trusted hosts.
Encapsulate the astrometry details of the array in this class.
Tagged: Sat Mar 27 16:28:13 PST 2004.
void setClock()
Set the current time.
double getEqnEqx(double tt)
Get the value of the equation of the equinoxes for a given terrestrial time.
Access to the register database and its shadow registers is provided through an object of the followi...
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.
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.
Type
Enumerate valid data types.
void writeShadowReg(RegMapBlock *blk, unsigned first, unsigned nreg, Dataptr &value)
A private function of writeReg() and writeRawReg() to write one or more elements of a shadow register...
void readShadowReg(RegMapBlock *blk, unsigned first, unsigned nreg, DataPtr &value)
A private function of readReg() and readRawReg() to read one or more elements of a shadow register...
void extendUt1Utc(double utc, double ut1utc)
Extend the quadratic interpolation table of ut1 - utc versus MJD UTC.
void readRawReg(RegMapBlock *blk, unsigned first, unsigned nreg, unsigned *value)
The same as readReg() but mutual exclusion and exception handling are left up to the caller...
double getUtc()
Get the current UTC as a Modified Julian Date.
static SzaShare * share_
Static pointer for use in signal handlers.
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.
Tagged: Fri Nov 14 12:37:53 UTC 2003.
The following structure is used by the SZA UTC clock.
void ungrabRegs()
Relinquish exclusive use to the register database.