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

An instance of this class is created by AntennaMaster and passed to the constructors of other tasks. More...

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

Inherits sza::util::AntennaDataFrameManager.

Inherited by sza::antenna::corba::SzaShareCorba.

Classes

struct  DataPtr
 An object of the following type will be used to specify an arbitrary pointer. More...
 
struct  HostAddress
 Struct used to store names and IP addresses of trusted hosts. More...
 
class  SzaAstrom
 Encapsulate the astrometry details of the array in this class. More...
 
class  SzaClock
 The following structure is used by the SZA UTC clock. More...
 
class  SzaPmacLock
 The following structure encapsulates the reader lock used to prevent clashes when freezing and unfreezing the pmac monitor registers. More...
 
class  SzaRegDb
 Access to the register database and its shadow registers is provided through an object of the following type. More...
 

Public Types

enum  TimeOut { NO_WAIT, WAIT_FOREVER, NO_WAIT, WAIT_FOREVER }
 Enumerate supported timeouts. More...
 
enum  TimeOut { NO_WAIT, WAIT_FOREVER, NO_WAIT, WAIT_FOREVER }
 Enumerate supported timeouts. More...
 
enum  Type {
  CHAR, UCHAR, SHORT, USHORT,
  INT, UINT, LONG, ULONG,
  FLOAT, DOUBLE
}
 Enumerate valid data types. More...
 

Public Member Functions

void extendEqnEqx (double tt, double eqneqx)
 Extend the quadratic interpolation table of the equation of the equinoxes versus Terrestrial Time (as a Modified Julian Date). More...
 
void extendEqnEqx (double tt, double eqneqx)
 Extend the quadratic interpolation table of the equation of the equinoxes versus Terrestrial Time (as a Modified Julian Date). More...
 
void extendUt1Utc (double utc, double ut1utc)
 Extend the quadratic interpolation table of ut1 - utc versus MJD UTC. More...
 
void extendUt1Utc (double utc, double ut1utc)
 Extend the quadratic interpolation table of ut1 - utc versus MJD UTC. More...
 
RegMapBoard * findRegMapBoard (std::string boardName)
 Return a pointer to the requested register. More...
 
RegMapBoard * findRegMapBoard (std::string boardName)
 Return a pointer to the requested register. More...
 
void flagBoard (int board)
 
void flagBoard (int board)
 
void freezePmacReadout ()
 Freeze the pmac readout. More...
 
double getEqnEqx (double tt)
 Get the value of the equation of the equinoxes for a given terrestrial time. More...
 
double getEqnEqx (double tt)
 Get the value of the equation of the equinoxes for a given terrestrial time. More...
 
virtual double getLst (double utc)
 Get the Local Sidereal Time that corresponds to a given MJD UTC. More...
 
double getLst (double utc)
 Get the Local Sidereal Time that corresponds to a given MJD UTC. More...
 
unsigned int getNarchived ()
 Return the number of archived registers in the register map. More...
 
unsigned int getNarchived ()
 Return the number of archived registers in the register map. More...
 
unsigned int getNboard ()
 Return the number of boards in the register map. More...
 
unsigned int getNboard ()
 Return the number of boards in the register map. More...
 
unsigned int getNbyte ()
 Return the number of bytes. More...
 
unsigned int getNreg ()
 Return the total number of registers in the register map. More...
 
RegMap * getRegMap ()
 
double getTt (double lst)
 Get the terrestrial time as MJD. More...
 
double getTt (double lst)
 Get the terrestrial time as MJD. More...
 
double getUt1Utc (double utc)
 Get the value of UT1-UTC for a given UTC. More...
 
double getUt1Utc (double utc)
 Get the value of UT1-UTC for a given UTC. More...
 
double getUtc ()
 Return the Utc as MJD. More...
 
double getUtc ()
 Return the Utc as MJD. More...
 
void grabRegs (TimeOut timeout)
 Acquire exlusive use of the register database. More...
 
void grabRegs (TimeOut timeout)
 Acquire exlusive use of the register database. More...
 
void packFrame (sza::util::DataFrameManager *frame)
 Public method to pack a frame. More...
 
void packFrame (sza::util::DataFrameManager *frame)
 Public method to pack a frame. More...
 
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. More...
 
void readReg (RegMapBlock *blk, unsigned first, unsigned nreg, unsigned *value)
 Read one or more elements of a given register from the register database. More...
 
void setClock (unsigned long mjd, unsigned long sec, unsigned long nanoSeconds)
 Set the current time. More...
 
void setClock (sza::util::TimeVal &time)
 Set the current time via a TimeVal ref. More...
 
void setClock ()
 Set the current time. More...
 
void setClock (unsigned long mjd, unsigned long sec, unsigned long nanoSeconds)
 Set the current time. More...
 
void setClock (sza::util::TimeVal &time)
 Set the current time via a TimeVal ref. More...
 
void setClock ()
 Set the current time. More...
 
virtual void setSite (double longitude, double latitude, double altitude)
 Public function to set the site parameters. More...
 
void setSite (double longitude, double latitude, double altitude)
 Public function to set the site parameters. More...
 
virtual void setTuningPending (bool pending)
 
 SzaShare (std::string host)
 Constructor. More...
 
 SzaShare (std::string host)
 Constructor. More...
 
void unflagBoard (int board)
 
void unflagBoard (int board)
 
void unfreezePmacReadout ()
 Un-freeze the pmac readout. More...
 
void ungrabRegs ()
 Relinquish exclusive use to the register database. More...
 
void ungrabRegs ()
 Relinquish exclusive use to the register database. More...
 
bool verifyBoard (int board)
 Return false if a board is flagged as unreachable. More...
 
bool verifyBoard (int board)
 Return false if a board is flagged as unreachable. More...
 
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. More...
 
void writeRawReg (RegMapBlock *blk, unsigned first, unsigned nreg, unsigned short *value)
 
void writeRawReg (RegMapBlock *blk, unsigned first, unsigned nreg, unsigned *value)
 
void writeRawReg (RegMapBlock *blk, unsigned first, unsigned nreg, float *value)
 
void writeRawReg (RegMapBlock *blk, unsigned first, unsigned nreg, double *value)
 
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. More...
 
void writeReg (RegMapBlock *blk, unsigned first, unsigned nreg, unsigned char *value)
 
void writeReg (RegMapBlock *blk, unsigned first, unsigned nreg, signed short *value)
 
void writeReg (RegMapBlock *blk, unsigned first, unsigned nreg, unsigned short *value)
 
void writeReg (RegMapBlock *blk, unsigned first, unsigned nreg, int *value)
 
void writeReg (RegMapBlock *blk, unsigned first, unsigned nreg, unsigned int *value)
 
void writeReg (RegMapBlock *blk, unsigned first, unsigned nreg, long *value)
 
void writeReg (RegMapBlock *blk, unsigned first, unsigned nreg, unsigned long *value)
 
void writeReg (RegMapBlock *blk, unsigned first, unsigned nreg, float *value)
 
void writeReg (RegMapBlock *blk, unsigned first, unsigned nreg, double *value)
 
 ~SzaShare ()
 Destructor. More...
 
 ~SzaShare ()
 Destructor. More...
 
- Public Member Functions inherited from sza::util::AntennaDataFrameManager
 AntennaDataFrameManager (bool archivedOnly=false)
 Constructors. More...
 
 AntennaDataFrameManager (const sza::util::AntNum &antNum, bool archivedOnly=false)
 
 AntennaDataFrameManager (sza::util::AntNum *antNum, bool archivedOnly=false)
 
 AntennaDataFrameManager (AntennaDataFrameManager &fm)
 
AntNum getAnt ()
 Return the antenna descriptor associated with this dataframe. More...
 
unsigned int getAntIntId ()
 Return the antenna number associated with this dataframe. More...
 
void initialize (bool archivedOnly=false)
 Initialize this object. More...
 
void operator= (RegMapDataFrameManager &fm)
 Assignment operators. More...
 
void operator= (AntennaDataFrameManager &fm)
 
void setAnt (sza::util::AntNum::Id antennaId)
 Set the antenna number associated with this dataframe. More...
 
virtual ~AntennaDataFrameManager ()
 Destructor. More...
 
- Public Member Functions inherited from sza::util::RegMapDataFrameManager
bool archivedOnly ()
 
int byteOffsetInFrameOf (RegMapBlock *blk, Coord *coord=0)
 Return the offset in bytes of the data for the requested register, from the beginning of the frame buffer. More...
 
int byteOffsetInFrameOf (std::string board, std::string block, Coord *coord=0)
 
int byteOffsetInFrameOf (RegMapBlock *blk, CoordRange *range)
 
int byteOffsetInFrameOf (std::string board, std::string block, CoordRange *range)
 
RegMapBlock * findReg (char *boardName, char *blockName)
 
RegMapBoard * findRegMapBoard (std::string boardName)
 
unsigned int getId (unsigned nanoSecondInterval)
 Get a unique frame id based on integral MJD half-seconds. More...
 
RegMapBlock * getReg (std::string board, std::string block)
 Get the descriptor for this reg map block. More...
 
void operator= (DataFrameManager &manager)
 Overloaded base-class operator. More...
 
virtual void operator= (RegMapDataFrameManager &manager)
 Inherited class assignment operator. More...
 
void readReg (std::string board, std::string name, unsigned char *data, CoordRange *range=0)
 
void readReg (std::string board, std::string name, signed char *data, CoordRange *range=0)
 
void readReg (std::string board, std::string name, bool *data, CoordRange *range=0)
 
void readReg (std::string board, std::string name, unsigned short *data, CoordRange *range=0)
 
void readReg (std::string board, std::string name, signed short *data, CoordRange *range=0)
 
void readReg (std::string board, std::string name, unsigned int *data, CoordRange *range=0)
 
void readReg (std::string board, std::string name, signed int *data, CoordRange *range=0)
 
void readReg (std::string board, std::string name, float *data, CoordRange *range=0)
 
void readReg (std::string board, std::string name, double *data, CoordRange *range=0)
 
void readReg (std::string board, std::string name, RegDate::Data *data, CoordRange *range=0)
 
void readReg (std::string board, std::string name, Complex< float >::Data *data, CoordRange *range=0)
 
void readReg (RegMapBlock *blk, unsigned char *data, CoordRange *range=0)
 
void readReg (RegMapBlock *blk, signed char *data, CoordRange *range=0)
 
void readReg (RegMapBlock *blk, bool *data, CoordRange *range=0)
 
void readReg (RegMapBlock *blk, unsigned short *data, CoordRange *range=0)
 
void readReg (RegMapBlock *blk, signed short *data, CoordRange *range=0)
 
void readReg (RegMapBlock *blk, unsigned int *data, CoordRange *range=0)
 
void readReg (RegMapBlock *blk, signed int *data, CoordRange *range=0)
 
void readReg (RegMapBlock *blk, float *data, CoordRange *range=0)
 
void readReg (RegMapBlock *blk, double *data, CoordRange *range=0)
 
void readReg (RegMapBlock *blk, RegDate::Data *data, CoordRange *range=0)
 
void readReg (RegMapBlock *blk, Complex< float >::Data *data, CoordRange *range=0)
 
void readRegNoLock (std::string board, std::string name, unsigned char *data, CoordRange *range=0)
 
void readRegNoLock (std::string board, std::string name, signed char *data, CoordRange *range=0)
 
void readRegNoLock (std::string board, std::string name, bool *data, CoordRange *range=0)
 
void readRegNoLock (std::string board, std::string name, unsigned short *data, CoordRange *range=0)
 
void readRegNoLock (std::string board, std::string name, signed short *data, CoordRange *range=0)
 
void readRegNoLock (std::string board, std::string name, unsigned int *data, CoordRange *range=0)
 
void readRegNoLock (std::string board, std::string name, signed int *data, CoordRange *range=0)
 
void readRegNoLock (std::string board, std::string name, float *data, CoordRange *range=0)
 
void readRegNoLock (std::string board, std::string name, double *data, CoordRange *range=0)
 
void readRegNoLock (std::string board, std::string name, RegDate::Data *data, CoordRange *range=0)
 
void readRegNoLock (std::string board, std::string name, Complex< float >::Data *data, CoordRange *range=0)
 
void readRegNoLock (RegMapBlock *blk, unsigned char *data, CoordRange *range=0)
 
void readRegNoLock (RegMapBlock *blk, signed char *data, CoordRange *range=0)
 
void readRegNoLock (RegMapBlock *blk, bool *data, CoordRange *range=0)
 
void readRegNoLock (RegMapBlock *blk, unsigned short *data, CoordRange *range=0)
 
void readRegNoLock (RegMapBlock *blk, signed short *data, CoordRange *range=0)
 
void readRegNoLock (RegMapBlock *blk, unsigned int *data, CoordRange *range=0)
 
void readRegNoLock (RegMapBlock *blk, signed int *data, CoordRange *range=0)
 
void readRegNoLock (RegMapBlock *blk, float *data, CoordRange *range=0)
 
void readRegNoLock (RegMapBlock *blk, double *data, CoordRange *range=0)
 
void readRegNoLock (RegMapBlock *blk, RegDate::Data *data, CoordRange *range=0)
 
void readRegNoLock (RegMapBlock *blk, Complex< float >::Data *data, CoordRange *range=0)
 
void setMjd (TimeVal &mjd)
 Set the mjd of this frame. More...
 
void setMjd (double mjd)
 
void writeReg (std::string board, std::string name, unsigned char *data, CoordRange *range=0)
 
void writeReg (std::string board, std::string name, signed char *data, CoordRange *range=0)
 
void writeReg (std::string board, std::string name, bool *data, CoordRange *range=0)
 
void writeReg (std::string board, std::string name, unsigned short *data, CoordRange *range=0)
 
void writeReg (std::string board, std::string name, signed short *data, CoordRange *range=0)
 
void writeReg (std::string board, std::string name, unsigned int *data, CoordRange *range=0)
 
void writeReg (std::string board, std::string name, signed int *data, CoordRange *range=0)
 
void writeReg (std::string board, std::string name, float *data, CoordRange *range=0)
 
void writeReg (std::string board, std::string name, double *data, CoordRange *range=0)
 
void writeReg (std::string board, std::string name, RegDate::Data *data, CoordRange *range=0)
 
void writeReg (std::string board, std::string name, Complex< float >::Data *data, CoordRange *range=0)
 
void writeReg (std::string board, std::string name, unsigned char data, CoordRange *range=0)
 
void writeReg (std::string board, std::string name, signed char data, CoordRange *range=0)
 
void writeReg (std::string board, std::string name, bool data, CoordRange *range=0)
 
void writeReg (std::string board, std::string name, unsigned short data, CoordRange *range=0)
 
void writeReg (std::string board, std::string name, signed short data, CoordRange *range=0)
 
void writeReg (std::string board, std::string name, unsigned int data, CoordRange *range=0)
 
void writeReg (std::string board, std::string name, signed int data, CoordRange *range=0)
 
void writeReg (std::string board, std::string name, float data, CoordRange *range=0)
 
void writeReg (std::string board, std::string name, double data, CoordRange *range=0)
 
void writeReg (std::string board, std::string name, RegDate::Data data, CoordRange *range=0)
 
void writeReg (std::string board, std::string name, Complex< float >::Data data, CoordRange *range=0)
 
void writeReg (RegMapBlock *blk, unsigned char *data, CoordRange *range=0)
 
void writeReg (RegMapBlock *blk, signed char *data, CoordRange *range=0)
 
void writeReg (RegMapBlock *blk, bool *data, CoordRange *range=0)
 
void writeReg (RegMapBlock *blk, unsigned short *data, CoordRange *range=0)
 
void writeReg (RegMapBlock *blk, signed short *data, CoordRange *range=0)
 
void writeReg (RegMapBlock *blk, unsigned int *data, CoordRange *range=0)
 
void writeReg (RegMapBlock *blk, signed int *data, CoordRange *range=0)
 
void writeReg (RegMapBlock *blk, float *data, CoordRange *range=0)
 
void writeReg (RegMapBlock *blk, double *data, CoordRange *range=0)
 
void writeReg (RegMapBlock *blk, RegDate::Data *data, CoordRange *range=0)
 
void writeReg (RegMapBlock *blk, Complex< float >::Data *data, CoordRange *range=0)
 
void writeReg (RegMapBlock *blk, unsigned char data, CoordRange *range=0)
 
void writeReg (RegMapBlock *blk, signed char data, CoordRange *range=0)
 
void writeReg (RegMapBlock *blk, bool data, CoordRange *range=0)
 
void writeReg (RegMapBlock *blk, unsigned short data, CoordRange *range=0)
 
void writeReg (RegMapBlock *blk, signed short data, CoordRange *range=0)
 
void writeReg (RegMapBlock *blk, unsigned int data, CoordRange *range=0)
 
void writeReg (RegMapBlock *blk, signed int data, CoordRange *range=0)
 
void writeReg (RegMapBlock *blk, float data, CoordRange *range=0)
 
void writeReg (RegMapBlock *blk, double data, CoordRange *range=0)
 
void writeReg (RegMapBlock *blk, RegDate::Data data, CoordRange *range=0)
 
void writeReg (RegMapBlock *blk, Complex< float >::Data data, CoordRange *range=0)
 
void writeRegNoLock (std::string board, std::string name, unsigned char *data, CoordRange *range=0)
 
void writeRegNoLock (std::string board, std::string name, signed char *data, CoordRange *range=0)
 
void writeRegNoLock (std::string board, std::string name, bool *data, CoordRange *range=0)
 
void writeRegNoLock (std::string board, std::string name, unsigned short *data, CoordRange *range=0)
 
void writeRegNoLock (std::string board, std::string name, signed short *data, CoordRange *range=0)
 
void writeRegNoLock (std::string board, std::string name, unsigned int *data, CoordRange *range=0)
 
void writeRegNoLock (std::string board, std::string name, signed int *data, CoordRange *range=0)
 
void writeRegNoLock (std::string board, std::string name, float *data, CoordRange *range=0)
 
void writeRegNoLock (std::string board, std::string name, double *data, CoordRange *range=0)
 
void writeRegNoLock (std::string board, std::string name, RegDate::Data *data, CoordRange *range=0)
 
void writeRegNoLock (std::string board, std::string name, Complex< float >::Data *data, CoordRange *range=0)
 
void writeRegNoLock (std::string board, std::string name, unsigned char data, CoordRange *range=0)
 
void writeRegNoLock (std::string board, std::string name, signed char data, CoordRange *range=0)
 
void writeRegNoLock (std::string board, std::string name, bool data, CoordRange *range=0)
 
void writeRegNoLock (std::string board, std::string name, unsigned short data, CoordRange *range=0)
 
void writeRegNoLock (std::string board, std::string name, signed short data, CoordRange *range=0)
 
void writeRegNoLock (std::string board, std::string name, unsigned int data, CoordRange *range=0)
 
void writeRegNoLock (std::string board, std::string name, signed int data, CoordRange *range=0)
 
void writeRegNoLock (std::string board, std::string name, float data, CoordRange *range=0)
 
void writeRegNoLock (std::string board, std::string name, double data, CoordRange *range=0)
 
void writeRegNoLock (std::string board, std::string name, RegDate::Data data, CoordRange *range=0)
 
void writeRegNoLock (std::string board, std::string name, Complex< float >::Data data, CoordRange *range=0)
 
void writeRegNoLock (RegMapBlock *blk, unsigned char *data, CoordRange *range=0)
 
void writeRegNoLock (RegMapBlock *blk, signed char *data, CoordRange *range=0)
 
void writeRegNoLock (RegMapBlock *blk, bool *data, CoordRange *range=0)
 
void writeRegNoLock (RegMapBlock *blk, unsigned short *data, CoordRange *range=0)
 
void writeRegNoLock (RegMapBlock *blk, signed short *data, CoordRange *range=0)
 
void writeRegNoLock (RegMapBlock *blk, unsigned int *data, CoordRange *range=0)
 
void writeRegNoLock (RegMapBlock *blk, signed int *data, CoordRange *range=0)
 
void writeRegNoLock (RegMapBlock *blk, float *data, CoordRange *range=0)
 
void writeRegNoLock (RegMapBlock *blk, double *data, CoordRange *range=0)
 
void writeRegNoLock (RegMapBlock *blk, RegDate::Data *data, CoordRange *range=0)
 
void writeRegNoLock (RegMapBlock *blk, Complex< float >::Data *data, CoordRange *range=0)
 
void writeRegNoLock (RegMapBlock *blk, unsigned char data, CoordRange *range=0)
 
void writeRegNoLock (RegMapBlock *blk, signed char data, CoordRange *range=0)
 
void writeRegNoLock (RegMapBlock *blk, bool data, CoordRange *range=0)
 
void writeRegNoLock (RegMapBlock *blk, unsigned short data, CoordRange *range=0)
 
void writeRegNoLock (RegMapBlock *blk, signed short data, CoordRange *range=0)
 
void writeRegNoLock (RegMapBlock *blk, unsigned int data, CoordRange *range=0)
 
void writeRegNoLock (RegMapBlock *blk, signed int data, CoordRange *range=0)
 
void writeRegNoLock (RegMapBlock *blk, float data, CoordRange *range=0)
 
void writeRegNoLock (RegMapBlock *blk, double data, CoordRange *range=0)
 
void writeRegNoLock (RegMapBlock *blk, RegDate::Data data, CoordRange *range=0)
 
void writeRegNoLock (RegMapBlock *blk, Complex< float >::Data data, CoordRange *range=0)
 
virtual ~RegMapDataFrameManager ()
 Destructor. More...
 
- Public Member Functions inherited from sza::util::DataFrameManager
void advance (unsigned ndata)
 Advance the internal buffer ndata elements. More...
 
unsigned byteOffsetInFrameOfData ()
 The data portion of the buffer will be offset by the size in bytes of the header. More...
 
 DataFrameManager ()
 Constructors. More...
 
 DataFrameManager (unsigned nBuffer)
 
 DataFrameManager (DataFrameManager &fm)
 
 DataFrameManager (DataFrame *frame)
 
void fillBuffer (unsigned char val, unsigned int ndata)
 Fill the next ndata registers with a constant value. More...
 
void fillBuffer (unsigned char val)
 Fill all data registers with a constant value. More...
 
DataFrameframe ()
 Return a handle to the raw data frame managed by this object. More...
 
virtual unsigned int getId ()
 Get a unique frame id based on integral MJD half-seconds. More...
 
void lock ()
 Lock the frame. More...
 
virtual void operator= (DataFrameManager &fm)
 Define an overloadable assignment operator. More...
 
void pack (unsigned int *data, unsigned int ndata, int startIndex=-1)
 Pack an array of unsigned ints. More...
 
void pack (unsigned long *data, unsigned int ndata, int startIndex=-1)
 Pack an array of unsigned longs. More...
 
void pack (float *data, unsigned int ndata, int startIndex=-1)
 Pack an array of floats. More...
 
void pack (DataFrame *frame, int startIndex)
 Pack a dataframe into the requested starting location. More...
 
virtual void reinitialize ()
 Reinitialize. More...
 
void resize (unsigned int nBuffer)
 Resize the data frame. More...
 
void setErrorStatus (bool wasError)
 Set a global error status for this frame. More...
 
unsigned sizeInBytes ()
 Return the size in bytes of the frame managed by this object. More...
 
unsigned sizeInBytesOfData ()
 Return the size in bytes of the data portion only, of the frame managed by this object. More...
 
void unlock ()
 Unlock the frame. More...
 
void unpack (unsigned char *data, unsigned int ndata)
 Unpack the next ndata elements of the frame into a passed byte array (incremental unpack) More...
 
void unpack (unsigned char *data)
 Unpack the whole frame. More...
 
virtual ~DataFrameManager ()
 Destructor. More...
 

Static Public Member Functions

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 address. More...
 
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 address. More...
 
static void pciBusErrorHandler (int sig)
 This is a signal handler for trapping bus and address errors while readReg() and writeReg() access PCI registers. More...
 
static void pciSegvErrorHandler (int sig)
 This is a signal handler for trapping bus and address errors while readReg() and writeReg() access PCI registers. More...
 

Static Public Attributes

static HostAddress host_address []
 An array of trusted hosts. More...
 
static SzaShareshare
 Static pointer for use in signal handlers. More...
 
static SzaShareshare_
 Static pointer for use in signal handlers. More...
 

Additional Inherited Members

- Public Attributes inherited from sza::util::DataFrameManager
unsigned currentIndex_
 
bool dataIsInitialized_
 
sza::util::DataFrameframe_
 
unsigned nBuffer_
 
unsigned nUsed_
 
- Protected Member Functions inherited from sza::util::RegMapDataFrameManager
bool blockIsPresent (RegMapBlock *blk)
 Return true if the block is present in the register map. More...
 
bool boardIsFlagged (RegMapBoard *brd)
 Return true if this board is flagged. More...
 
bool boardIsPresent (RegMapBoard *brd)
 Return true if the passed board is present in the register map. More...
 
int byteOffsetInRegMapOf (RegMapBlock *blk, Coord *coord=0)
 Return the offset in the register map, of the data for this register. More...
 
int byteOffsetInRegMapOf (std::string board, std::string block, Coord *coord=0)
 
int byteOffsetInRegMapOf (RegMapBlock *blk, CoordRange *range)
 
int byteOffsetInRegMapOf (std::string board, std::string block, CoordRange *range)
 
void checkType (std::string board, std::string block, DataType::Type type, CoordRange *range)
 Check the type and element number of a regmap block. More...
 
void checkType (RegMapBlock *blk, DataType::Type type, CoordRange *range)
 
virtual void packData (RegMapBlock *blk, void *data, CoordRange *range, DataType::Type type, bool lock=true)
 Pack data of an arbitrary type into the underlying frame. More...
 
virtual void packData (std::string board, std::string block, void *data, CoordRange *range, DataType::Type type, bool lock=true)
 
virtual void packValue (RegMapBlock *blk, void *data, CoordRange *range, DataType::Type type, bool lock=true)
 
virtual void packValue (std::string board, std::string block, void *data, CoordRange *range, DataType::Type type, bool lock=true)
 
 RegMapDataFrameManager (bool archivedOnly=false)
 Private constructors. More...
 
void unpackData (RegMapBlock *blk, void *data, CoordRange *range, DataType::Type type, bool lock=true)
 Unpack data of an arbitrary type from the underlying frame. More...
 
void unpackData (std::string board, std::string block, void *data, CoordRange *range, DataType::Type type, bool lock=true)
 
- Protected Attributes inherited from sza::util::RegMapDataFrameManager
bool archivedOnly_
 A flag which will determine if this manager's frame contains all registers, or only archived registers. More...
 
SzaRegMap * regMap_
 

Detailed Description

An instance of this class is created by AntennaMaster and passed to the constructors of other tasks.

It contains resources that are shared between all SZA tasks.

Definition at line 38 of file Share.h.

Member Enumeration Documentation

Enumerate supported timeouts.

Definition at line 44 of file SzaShare.h.

Enumerate supported timeouts.

Definition at line 45 of file Share.h.

Enumerate valid data types.

Definition at line 53 of file Share.h.

Constructor & Destructor Documentation

sza::antenna::control::SzaShare::SzaShare ( std::string  host)

Constructor.

Exceptions
Exception
sza::antenna::control::SzaShare::~SzaShare ( )

Destructor.

sza::antenna::control::SzaShare::SzaShare ( std::string  host)

Constructor.

Exceptions
Exception
sza::antenna::control::SzaShare::~SzaShare ( )

Destructor.

Member Function Documentation

void sza::antenna::control::SzaShare::extendEqnEqx ( double  tt,
double  eqneqx 
)

Extend the quadratic interpolation table of the equation of the equinoxes versus Terrestrial Time (as a Modified Julian Date).

Exceptions
Exception
void sza::antenna::control::SzaShare::extendEqnEqx ( double  tt,
double  eqneqx 
)

Extend the quadratic interpolation table of the equation of the equinoxes versus Terrestrial Time (as a Modified Julian Date).

Exceptions
Exception
void sza::antenna::control::SzaShare::extendUt1Utc ( double  utc,
double  ut1utc 
)

Extend the quadratic interpolation table of ut1 - utc versus MJD UTC.

Exceptions
Exception
void sza::antenna::control::SzaShare::extendUt1Utc ( double  utc,
double  ut1utc 
)

Extend the quadratic interpolation table of ut1 - utc versus MJD UTC.

Exceptions
Exception
RegMapBoard* sza::antenna::control::SzaShare::findRegMapBoard ( std::string  boardName)

Return a pointer to the requested register.

RegMapBoard* sza::antenna::control::SzaShare::findRegMapBoard ( std::string  boardName)

Return a pointer to the requested register.

void sza::antenna::control::SzaShare::freezePmacReadout ( )

Freeze the pmac readout.

Exceptions
Exception
double sza::antenna::control::SzaShare::getEqnEqx ( double  tt)

Get the value of the equation of the equinoxes for a given terrestrial time.

Exceptions
Exception
double sza::antenna::control::SzaShare::getEqnEqx ( double  tt)

Get the value of the equation of the equinoxes for a given terrestrial time.

Exceptions
Exception
virtual double sza::antenna::control::SzaShare::getLst ( double  utc)
virtual

Get the Local Sidereal Time that corresponds to a given MJD UTC.

Exceptions
Exception
double sza::antenna::control::SzaShare::getLst ( double  utc)

Get the Local Sidereal Time that corresponds to a given MJD UTC.

Exceptions
Exception
unsigned int sza::antenna::control::SzaShare::getNarchived ( )

Return the number of archived registers in the register map.

unsigned int sza::antenna::control::SzaShare::getNarchived ( )

Return the number of archived registers in the register map.

unsigned int sza::antenna::control::SzaShare::getNboard ( )

Return the number of boards in the register map.

unsigned int sza::antenna::control::SzaShare::getNboard ( )

Return the number of boards in the register map.

unsigned int sza::antenna::control::SzaShare::getNbyte ( )

Return the number of bytes.

unsigned int sza::antenna::control::SzaShare::getNreg ( )

Return the total number of registers in the register map.

double sza::antenna::control::SzaShare::getTt ( double  lst)

Get the terrestrial time as MJD.

double sza::antenna::control::SzaShare::getTt ( double  lst)

Get the terrestrial time as MJD.

double sza::antenna::control::SzaShare::getUt1Utc ( double  utc)

Get the value of UT1-UTC for a given UTC.

Exceptions
Exception
double sza::antenna::control::SzaShare::getUt1Utc ( double  utc)

Get the value of UT1-UTC for a given UTC.

Exceptions
Exception
double sza::antenna::control::SzaShare::getUtc ( )

Return the Utc as MJD.

Exceptions
Exception
double sza::antenna::control::SzaShare::getUtc ( )

Return the Utc as MJD.

Exceptions
Exception
void sza::antenna::control::SzaShare::grabRegs ( TimeOut  timeout)

Acquire exlusive use of the register database.

The following grab and ungrab calls can be used to bracket multiple calls to (raw_)read_sza_reg() and/or (raw_)write_sza_reg() to prevent other tasks from gaining access to the SZA registers between calls. These functions must be called by users of the raw_ read and write functions.

Exceptions
Exception
void sza::antenna::control::SzaShare::grabRegs ( TimeOut  timeout)

Acquire exlusive use of the register database.

The following grab and ungrab calls can be used to bracket multiple calls to (raw_)read_sza_reg() and/or (raw_)write_sza_reg() to prevent other tasks from gaining access to the SZA registers between calls. These functions must be called by users of the raw_ read and write functions.

Exceptions
Exception
static std::string sza::antenna::control::SzaShare::hostIpAddress ( std::string  host)
static

Validate a specified IP address or host-name alias, and return a malloc'd copy of the resulting IP address.

returns char * The IP address of the host, or NULL on error. This should be free'd when no longer required.

Parameters
hostchar * The IP address or host-name alias of the host.
static std::string sza::antenna::control::SzaShare::hostIpAddress ( std::string  host)
static

Validate a specified IP address or host-name alias, and return a malloc'd copy of the resulting IP address.

returns char * The IP address of the host, or NULL on error. This should be free'd when no longer required.

Parameters
hostchar * The IP address or host-name alias of the host.
void sza::antenna::control::SzaShare::packFrame ( sza::util::DataFrameManager frame)

Public method to pack a frame.

Exceptions
Exception
void sza::antenna::control::SzaShare::packFrame ( sza::util::DataFrameManager frame)

Public method to pack a frame.

Exceptions
Exception
static void sza::antenna::control::SzaShare::pciBusErrorHandler ( int  sig)
static

This is a signal handler for trapping bus and address errors while readReg() and writeReg() access PCI registers.

It simply calls longjmp to abort the I/O operation and return to an error catching part of the originating function.

static void sza::antenna::control::SzaShare::pciSegvErrorHandler ( int  sig)
static

This is a signal handler for trapping bus and address errors while readReg() and writeReg() access PCI registers.

It simply calls longjmp to abort the I/O operation and return to an error catching part of the originating function.

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

Parameters
blkRegMapBlock * The register-map description of the register block to be read.
firstunsigned The index of the first element of the register to be read (0..blk->nreg-1).
nregunsigned The number of elements to be read.
valueunsigned * An array of 'nreg' elements into which to read the reg.
Exceptions
Exception
void sza::antenna::control::SzaShare::readReg ( RegMapBlock *  blk,
unsigned  first,
unsigned  nreg,
unsigned *  value 
)

Read one or more elements of a given register from the register database.

This function allocates the database before proceding, arranges to catch PCI bus and address exceptions, and deallocates the database when finished. If large numbers of registers are to be read, the per-register overhead of allocating the database and setting up * exception handlers may be significant. In such cases * readRawReg() may be better suited, albeit more difficult to use.

Parameters
blkRegMapBlock * The register-map description of the register block to be read.
firstunsigned The index of the first element of the register to be read (0..blk->nreg-1).
nregunsigned The number of elements to be read.
valueunsigned * An array of 'nreg' elements into which to read the data.
Exceptions
Exception
void sza::antenna::control::SzaShare::setClock ( unsigned long  mjd,
unsigned long  sec,
unsigned long  nanoSeconds 
)

Set the current time.

Exceptions
Exception
void sza::antenna::control::SzaShare::setClock ( sza::util::TimeVal time)

Set the current time via a TimeVal ref.

Exceptions
Exception
void sza::antenna::control::SzaShare::setClock ( )

Set the current time.

Exceptions
Exception
void sza::antenna::control::SzaShare::setClock ( unsigned long  mjd,
unsigned long  sec,
unsigned long  nanoSeconds 
)

Set the current time.

Exceptions
Exception
void sza::antenna::control::SzaShare::setClock ( sza::util::TimeVal time)

Set the current time via a TimeVal ref.

Exceptions
Exception
void sza::antenna::control::SzaShare::setClock ( )

Set the current time.

Exceptions
Exception
virtual void sza::antenna::control::SzaShare::setSite ( double  longitude,
double  latitude,
double  altitude 
)
virtual

Public function to set the site parameters.

Exceptions
Exception
void sza::antenna::control::SzaShare::setSite ( double  longitude,
double  latitude,
double  altitude 
)

Public function to set the site parameters.

Exceptions
Exception
void sza::antenna::control::SzaShare::unfreezePmacReadout ( )

Un-freeze the pmac readout.

Exceptions
Exception
void sza::antenna::control::SzaShare::ungrabRegs ( )

Relinquish exclusive use to the register database.

Exceptions
Exception
void sza::antenna::control::SzaShare::ungrabRegs ( )

Relinquish exclusive use to the register database.

Exceptions
Exception
bool sza::antenna::control::SzaShare::verifyBoard ( int  board)

Return false if a board is flagged as unreachable.

Exceptions
Exception
bool sza::antenna::control::SzaShare::verifyBoard ( int  board)

Return false if a board is flagged as unreachable.

Exceptions
Exception
void sza::antenna::control::SzaShare::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.

Parameters
blkRegMapBlock * The register-map description of the register block to be written.
firstunsigned The index of the first element of the register to be written (0..blk->nreg-1).
nregunsigned The number of elements to be written.
valueunsigned * An array of 'nreg' elements to be written.
Exceptions
Exception
void sza::antenna::control::SzaShare::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.

Parameters
blkRegMapBlock * The register-map description of the register block to be written.
firstunsigned The index of the first element of the register to be written (0..blk->nreg-1).
nregunsigned The number of elements to be written.
valueunsigned * An array of 'nreg' elements to be written.
Exceptions
Exception

Member Data Documentation

static HostAddress sza::antenna::control::SzaShare::host_address
static

An array of trusted hosts.

Definition at line 412 of file Share.h.

SzaShare* sza::antenna::control::SzaShare::share
static

Static pointer for use in signal handlers.

Definition at line 401 of file SzaShare.h.

SzaShare* sza::antenna::control::SzaShare::share_
static

Static pointer for use in signal handlers.

Definition at line 407 of file Share.h.


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