Main Page   Modules   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members  

probeDbAccess.h

Go to the documentation of this file.
00001 #ifndef PROBE_DB_ACCESS_H
00002 #define PROBE_DB_ACCESS_H
00003 /*******************************************************************************
00004 * E.S.O. - VLT project
00005 *
00006 * "@(#) $Id: probeDbAccess.h,v 1.48 2003/11/24 13:21:27 vltsccm Exp $"
00007 *
00008 * who       when      what
00009 * --------  --------  ----------------------------------------------
00010 * rdonalds 2001-09-15  Added UVW offsets
00011 * rkarban  2000-08-10 created
00012 */
00013 
00014 /* Indexes for classes in the public data branch of the application. */
00015 typedef enum
00016 {
00017   probeDB_CI_REF_COORD,
00018   probeDB_CI_ACT_COORD,
00019   probeDB_CI_SENDREFS,
00020   probeDB_CI_STATUS,
00021   probeDB_CI_LAST
00022 } probeDB_ACCESS_CLASS_INDEX;
00023 
00024 /* Index for database attributes of the REF_COORD class. */
00025 typedef enum
00026 {
00027   probeDB_RC_ALPHA,
00028   probeDB_RC_DELTA,
00029   probeDB_RC_ALPHA_HMS,
00030   probeDB_RC_DELTA_DMS,
00031   probeDB_RC_ALPHA_OBSERVED,
00032   probeDB_RC_DELTA_OBSERVED,
00033   probeDB_RC_DELTA_ALPHA,
00034   probeDB_RC_DELTA_DELTA,
00035   probeDB_RC_OFFSET_ALPHA,
00036   probeDB_RC_OFFSET_DELTA,
00037   probeDB_RC_R,
00038   probeDB_RC_THETA,
00039   probeDB_RC_AV_ALPHA,
00040   probeDB_RC_AV_DELTA,
00041   probeDB_RC_OFFSETU,
00042   probeDB_RC_OFFSETV,
00043   probeDB_RC_OFFSETW,
00044   probeDB_RC_LAST
00045 } probeDB_REF_COORD_INDEX;
00046 
00047 /* Index for database attributes of the ACT_COORD class. */
00048 typedef enum
00049 {
00050   probeDB_AC_ALPHA,
00051   probeDB_AC_DELTA,
00052   probeDB_AC_ALPHA_HMS,
00053   probeDB_AC_DELTA_DMS,
00054   probeDB_AC_ALPHA_OBSERVED,
00055   probeDB_AC_DELTA_OBSERVED,
00056   probeDB_AC_ALPHA_MEAN_DEG,
00057   probeDB_AC_DELTA_MEAN_DEG,
00058   probeDB_AC_DELTA_ALPHA,
00059   probeDB_AC_DELTA_DELTA,
00060   probeDB_AC_OFFSET_ALPHA,
00061   probeDB_AC_OFFSET_DELTA,
00062   probeDB_AC_R,
00063   probeDB_AC_THETA,
00064   probeDB_AC_OFFSETU,
00065   probeDB_AC_OFFSETV,
00066   probeDB_AC_OFFSETW,
00067   probeDB_AC_CCDANGLE,
00068   probeDB_AC_LAST
00069 } probeDB_ACT_COORD_INDEX;
00070 
00071 /* Index for database attributes of the TRK_ACTION class. */
00072 typedef enum
00073 {
00074   probeDB_SR_ACTION,
00075   probeDB_SR_LAST
00076 } probeDB_SENDREFS_INDEX;
00077 
00078  
00079 /* Index for database attributes of the STATUS class. */
00080 typedef enum
00081 { 
00082    probeDB_ST_GP_OUT_OF_FIELD,
00083    probeDB_ST_GP_IN_POS,
00084    probeDB_ST_PROBE_TRK_LIMIT,
00085    probeDB_ST_PROBE_REM_TRK_TIME,
00086    probeDB_ST_GS_SELECTED,
00087    probeDB_ST_SS_SELECTED,
00088    probeDB_ST_DIFF_TRACKING,
00089    probeDB_ST_LAST
00090 }  probeDB_STATUS_INDEX;
00091 
00092 
00094 #define probeDB_ROOT      ":probe"
00095 
00104 #define probeDB_READ_ATTR(classIndex, attrIndex, buffer,error) \
00105     if (caiRWAttribute(probeDbAccessGetAttrTable(classIndex),ccsFALSE,attrIndex,buffer,  \
00106         error) == FAILURE)                                                    \
00107         {                                                                     \
00108         probeERR_ADD(probeERR_DBREAD,error,probeDbAccessGetAttrName(classIndex,attrIndex));  \
00109         return FAILURE;                                                       \
00110         }
00111 
00120 #define probeDB_WRITE_ATTR(classIndex, attrIndex,buffer,error) \
00121     if (caiRWAttribute(probeDbAccessGetAttrTable(classIndex),ccsTRUE,attrIndex,buffer,   \
00122         error) == FAILURE)                                                    \
00123         {                                                                     \
00124         probeERR_ADD(probeERR_DBWRITE, error, probeDbAccessGetAttrName(classIndex,attrIndex)); \
00125         return FAILURE;                                                       \
00126         }
00127 
00129 ccsCOMPL_STAT probeDbAccessConstructor(const char *dbRoot, ccsERROR *error);
00130 
00132 void probeDbAccessDestructor(void);
00133 
00134 char *probeDbAccessGetAttrTable (const vltINT32 classIndex);
00135 const char *probeDbAccessGetAttrName(const vltINT32 classIndex, const vltINT32 index);
00136 
00137 
00138 
00139 #endif 

Generated on Wed Dec 3 14:52:17 2003 for ATCS API by doxygen1.2.13.1 written by Dimitri van Heesch, © 1997-2001