00001 #ifndef mswINS_DATA_RECORD_H 00002 #define mswINS_DATA_RECORD_H 00003 /******************************************************************************* 00004 * E.S.O. - VLT project 00005 * 00006 * "@(#) $Id: mswINS_DATA_RECORD.h,v 1.115 2003/11/12 14:33:37 vltsccm Exp $" 00007 * 00008 * who when what 00009 * -------- -------- ---------------------------------------------- 00010 * rkarban 06/08/99 add virtual destructor 00011 * gchiozzi 17/07/98 Added fields for detector reference pixel and adapter focus offset. 00012 * gchiozzi 02/09/97 Modified table format. 00013 * gchiozzi 11/02/97 Created 00014 */ 00015 00016 /************************************************************************ 00017 * 00018 *---------------------------------------------------------------------- 00019 */ 00020 #ifndef __cplusplus 00021 #error This is a C++ include file and cannot be used from plain C 00022 #endif 00023 00024 #include "msw.h" 00025 #include "eccsErr.h" 00026 #include "evhDB_CMD_SEND.h" 00027 #include "fndARRAY.h" 00028 #include "fndOBJECT.h" 00029 #include "fndSTRING.h" 00030 #include "eccsDB_TABLE.h" 00031 00032 // support classes mswINS_DATA_RECORD et al. 00033 // ----------------------------------------------------- 00034 // These support class is used to hold and manipulate data from 00035 // the instrument data description table 00036 00037 typedef vltBYTES32 mswINSID; 00038 typedef vltBYTES32 mswINSMODE; 00039 00040 class mswINS_DATA_RECORD: public eccsDB_TABLE_RECORD, public eccsERROR_CLASS 00041 { 00042 public: 00043 mswINS_DATA_RECORD(); 00044 mswINS_DATA_RECORD( const mswINS_DATA_RECORD& ); 00045 mswINS_DATA_RECORD& operator =( const mswINS_DATA_RECORD& ); 00046 virtual ~mswINS_DATA_RECORD(); 00047 00048 // Pack() and Unpack() methods used while accessing the database table 00049 // to convert from RTAP internal format to C class members 00050 virtual ccsCOMPL_STAT Pack( void *buffer ); 00051 virtual ccsCOMPL_STAT Unpack( void *buffer ); 00052 00053 // Methods to retrieve/set the instrument data configuration 00054 // in the format of a command message buffer 00055 virtual const char *Data(); 00056 virtual ccsCOMPL_STAT Data(const char *msgBuffer); 00057 00058 // Empties the record 00059 virtual ccsCOMPL_STAT CleanUp(); 00060 00061 // Checks if a given mswINSID correspond to this record 00062 const vltLOGICAL IsInsId(const mswINSID &insId) const; 00063 00064 // Data member read access methods 00065 const mswINSID &InsId() const; 00066 const mswINSMODE &InsMode() const; 00067 const vltINT32 FocusStation() const; 00068 const char *FocusStationName() const; 00069 const vltDOUBLE RotOffset() const; 00070 const vltDOUBLE FocusOffset() const; 00071 const vltDOUBLE AdFocusPos() const; 00072 00073 const vltDOUBLE PixelSizeX() const; 00074 const vltDOUBLE PixelSizeY() const; 00075 const vltDOUBLE RefX() const; 00076 const vltDOUBLE RefY() const; 00077 00078 const vltDOUBLE VigAreaSizeX() const; 00079 const vltDOUBLE VigAreaSizeY() const; 00080 const vltDOUBLE VigAreaCntX() const; 00081 const vltDOUBLE VigAreaCntY() const; 00082 00083 const vltDOUBLE PointAxisOffX() const; 00084 const vltDOUBLE PointAxisOffY() const; 00085 00086 const char *DetectorLCU() const; 00087 00088 private: 00089 mswINSID insId; // identifier for a pair (ins,detector) 00090 mswINSID insMode; // identifier for instrument mode 00091 vltINT32 focusStation; // instrument focus station (defines in mswDefines.h) 00092 00093 vltDOUBLE rotOffset; // rotator offset (deg) 00094 vltDOUBLE focusOffset; // optimal focus offset (mm) 00095 vltDOUBLE adFocusPos; // optimal adapter focus Pos (mm) 00096 00097 vltDOUBLE pixelSizeX; // detector pixel size in X (arcsec/pixel) 00098 vltDOUBLE pixelSizeY; // detector pixel size in Y (arcsec/pixel) 00099 vltDOUBLE refX; // detector reference pixel X (pixel) 00100 vltDOUBLE refY; // detector reference pixel Y (pixel) 00101 00102 vltDOUBLE vigAreaSizeX; // vignetting area: X size (arcsec) 00103 vltDOUBLE vigAreaSizeY; // vignetting area: Y size (arcsec) 00104 vltDOUBLE vigAreaCntX; // vignetting area: X offset of center 00105 // with respect to center (arcsec) 00106 vltDOUBLE vigAreaCntY; // vignetting area: Y offset of center 00107 // with respect to center (arcsec) 00108 00109 vltDOUBLE pointAxisOffX; // X pointing axis offset (arcsec) 00110 vltDOUBLE pointAxisOffY; // Y pointing axis offset (arcsec) 00111 00112 vltBYTES256 detectorLCU; // environment and process name 00113 00114 fndSTRING cmdString; 00115 }; 00116 00117 00118 // include inline code for support classes 00119 #include "mswINS_DATA_RECORD.icc" 00120 00121 #endif