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

tacDefines.h

Go to the documentation of this file.
00001 /*******************************************************************************
00002 * E.S.O. - VLT project
00003 *
00004 * "@(#) $Id: tacDefines.h,v 1.38 2003/11/27 21:36:51 vltsccm Exp $"
00005 *
00006 * who       when        what
00007 * --------  ----------  ----------------------------------------------
00008 * pduhoux   2000-02-24  created
00009 * bbauvir   2001-07-23  automatic creation for module 'tac'
00010 */
00011 
00012 #ifndef TAC_DEFINES_H
00013 #define TAC_DEFINES_H
00014 
00015 /************************************************************************
00016  *  tacDefines.h - This file provides the definition of all constants 
00017  *                 related to the tac module.
00018  *
00019  *----------------------------------------------------------------------
00020  */
00021 
00022 /* 
00023  * System Headers
00024  */
00025 
00026 /* 
00027  * Local Headers
00028  */
00029 
00030 #include "lsfDefines.h"
00031 #include "slamac.h"    /* VLTSW20010698 */
00032 
00033 /*
00034  * LSF Constants
00035  */
00036 
00037 #define tacVERSION      "$Revision: 1.38 $"
00038 #define tacVERSION_DATE "APR2003"
00039 
00040 #define tacMODULE_ID    "tac"
00041 #define tacMODULE_NAME   tacMODULE_ID
00042 #define tacMODULE_TITLE "Tools for Advanced Control"
00043 #define tacLOG_ID    101    
00044 
00045 /*
00046  * Constants
00047  */
00048 
00049 #undef tacDEBUG    /* Debug information */
00050 #undef tacDEBUG_LOG_TIME_STAMP
00051 
00052 #define tacSYNCHRO_NO_SYNC_CONTEXT   "NO_SYNC"
00053 #define tacSYNCHRO_AUX_CLK_CONTEXT   "AUX_CLK"
00054 #define tacSYNCHRO_SEMAPHORE_CONTEXT "TASK"
00055 #define tacSYNCHRO_INT_CONTEXT       "INT"
00056 
00057 #define tacIO_BASE_ADDR 0xfbff0000
00058 
00059 #define tacMAX_NAME_SIZE    48
00060 #define tacMAX_DATA_NUMBER  10
00061 
00062 #if 0 /* VLTSW20020037 */
00063 #define tacMAX_PARAM_NUMBER 5
00064 #else
00065 #define tacMAX_PARAM_NUMBER 10
00066 #endif
00067 
00068 #define tacMAX_PARAM_SIZE tacMAX_PARAM_NUMBER*sizeof(double)
00069 
00070 #define tacMAX_BLOCK_NUMBER     256
00071 #define tacMAX_LINK_NUMBER      256
00072 #define tacMAX_BLOCK_TYPE_NUMBER 80
00073 
00074 #if 0 /* VLTSW20010698 */
00075 #define tacPI 3.14159265358979
00076 #else
00077 #define tacPI DPI    /* Keep tacPI for backward compatibility */
00078 #endif
00079 
00080 /* VLTSW20030076 - Support PCI interrupts */
00081 #define tacINT_VME_BUS 0
00082 #define tacINT_PCI_BUS 1
00083 #define tacINT_MASK 0xff
00084 
00085 /* 
00086  * Types
00087  */
00088 
00089 /*
00090  * Macros
00091  */
00092 
00093 #define tacRTC_ERR(errNumber,string) \
00094   {                                         \
00095     error->errNum = errNumber;                 \
00096     strcpy(error->location, __FILE_LINE__); \
00097     sprintf(error->param, "%.40s",string);   \
00098   }                                         \
00099 
00100 #define tacRTC_ERR_ADD(tacError) \
00101   {                                                                                 \
00102     errAdd(error,tacMODULE_ID,tacError.errNum,tacError.location,"",tacError.param); \
00103   }                                                                                 \
00104 
00105 /* VLTSW20030076 - Support PCI interrupts */
00106 #define tacRtcDefineInterrupt(synchro, busType, intLevel, intVector) \
00107   {                                                                     \
00108     synchro.type = tacSYNCHRO_INTERRUPT;                                \
00109     synchro.interrupt.level = (busType * (tacINT_MASK + 1)) + intLevel; \
00110     synchro.interrupt.vector = intVector;                               \
00111   }
00112 
00113 #define tacRtcIsPCIInterrupt(synchro) (synchro.interrupt.level > tacINT_MASK)
00114 #define tacRtcIsVMEInterrupt(synchro) (synchro.interrupt.level <= tacINT_MASK)
00115 #define tacRtcGetInterruptLevel(synchro) (synchro.interrupt.level & tacINT_MASK)
00116 
00117 #define tacRtcDefineSemaphore(synchro, semaphore, taskLevel) \
00118   {                                         \
00119     synchro.type = tacSYNCHRO_SEMAPHORE;    \
00120     synchro.task.semId = semaphore;         \
00121     synchro.task.priority = taskLevel;      \
00122   }
00123 
00124 /*
00125  * Global variables
00126  */
00127 
00128 /*
00129  * Functions
00130  */
00131 
00132 #endif 

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