WPILib 2012
WPILibRoboticsLibraryforFRC
visa/visatype.h
00001 /*---------------------------------------------------------------------------*/
00002 /* Distributed by IVI Foundation Inc.                                        */
00003 /*                                                                           */
00004 /* Do not modify the contents of this file.                                  */
00005 /*---------------------------------------------------------------------------*/
00006 /*                                                                           */
00007 /* Title   : VISATYPE.H                                                      */
00008 /* Date    : 04-14-2006                                                      */
00009 /* Purpose : Fundamental VISA data types and macro definitions               */
00010 /*                                                                           */
00011 /*---------------------------------------------------------------------------*/
00012 
00013 #ifndef __VISATYPE_HEADER__
00014 #define __VISATYPE_HEADER__
00015 
00016 #if defined(_WIN64)
00017 #define _VI_FAR
00018 #define _VI_FUNC            __fastcall
00019 #define _VI_FUNCC           __fastcall
00020 #define _VI_FUNCH           __fastcall
00021 #define _VI_SIGNED          signed
00022 #elif (defined(WIN32) || defined(_WIN32) || defined(__WIN32__) || defined(__NT__)) && !defined(_NI_mswin16_)
00023 #define _VI_FAR
00024 #define _VI_FUNC            __stdcall
00025 #define _VI_FUNCC           __cdecl
00026 #define _VI_FUNCH           __stdcall
00027 #define _VI_SIGNED          signed
00028 #elif defined(_CVI_) && defined(_NI_i386_)
00029 #define _VI_FAR
00030 #define _VI_FUNC            _pascal
00031 #define _VI_FUNCC
00032 #define _VI_FUNCH           _pascal
00033 #define _VI_SIGNED          signed
00034 #elif (defined(_WINDOWS) || defined(_Windows)) && !defined(_NI_mswin16_)
00035 #define _VI_FAR             _far
00036 #define _VI_FUNC            _far _pascal _export
00037 #define _VI_FUNCC           _far _cdecl  _export
00038 #define _VI_FUNCH           _far _pascal
00039 #define _VI_SIGNED          signed
00040 #elif (defined(hpux) || defined(__hpux)) && (defined(__cplusplus) || defined(__cplusplus__))
00041 #define _VI_FAR
00042 #define _VI_FUNC
00043 #define _VI_FUNCC
00044 #define _VI_FUNCH
00045 #define _VI_SIGNED
00046 #else
00047 #define _VI_FAR
00048 #define _VI_FUNC
00049 #define _VI_FUNCC
00050 #define _VI_FUNCH
00051 #define _VI_SIGNED          signed
00052 #endif
00053 
00054 #define _VI_ERROR           (-2147483647L-1)  /* 0x80000000 */
00055 #define _VI_PTR             _VI_FAR *
00056 
00057 /*- VISA Types --------------------------------------------------------------*/
00058 
00059 #ifndef _VI_INT64_UINT64_DEFINED
00060 #if defined(_WIN64) || ((defined(WIN32) || defined(_WIN32) || defined(__WIN32__) || defined(__NT__)) && !defined(_NI_mswin16_))
00061 #if (defined(_MSC_VER) && (_MSC_VER >= 1200)) || (defined(_CVI_) && (_CVI_ >= 700)) || (defined(__BORLANDC__) && (__BORLANDC__ >= 0x0520))
00062 typedef unsigned   __int64  ViUInt64;
00063 typedef _VI_SIGNED __int64  ViInt64;
00064 #define _VI_INT64_UINT64_DEFINED
00065 #if defined(_WIN64)
00066 #define _VISA_ENV_IS_64_BIT
00067 #else
00068 /* This is a 32-bit OS, not a 64-bit OS */
00069 #endif
00070 #endif
00071 #elif defined(__GNUC__) && (__GNUC__ >= 3)
00072 #include <limits.h>
00073 #include <sys/types.h>
00074 typedef u_int64_t           ViUInt64;
00075 typedef int64_t             ViInt64;
00076 #define _VI_INT64_UINT64_DEFINED
00077 #if defined(LONG_MAX) && (LONG_MAX > 0x7FFFFFFFL)
00078 #define _VISA_ENV_IS_64_BIT
00079 #else
00080 /* This is a 32-bit OS, not a 64-bit OS */
00081 #endif
00082 #else
00083 /* This platform does not support 64-bit types */
00084 #endif
00085 #endif
00086 
00087 #if defined(_VI_INT64_UINT64_DEFINED)
00088 typedef ViUInt64    _VI_PTR ViPUInt64;
00089 typedef ViUInt64    _VI_PTR ViAUInt64;
00090 typedef ViInt64     _VI_PTR ViPInt64;
00091 typedef ViInt64     _VI_PTR ViAInt64;
00092 #endif
00093 
00094 #if defined(LONG_MAX) && (LONG_MAX > 0x7FFFFFFFL)
00095 typedef unsigned int        ViUInt32;
00096 typedef _VI_SIGNED int      ViInt32;
00097 #else
00098 typedef unsigned long       ViUInt32;
00099 typedef _VI_SIGNED long     ViInt32;
00100 #endif
00101 
00102 typedef ViUInt32    _VI_PTR ViPUInt32;
00103 typedef ViUInt32    _VI_PTR ViAUInt32;
00104 typedef ViInt32     _VI_PTR ViPInt32;
00105 typedef ViInt32     _VI_PTR ViAInt32;
00106 
00107 typedef unsigned short      ViUInt16;
00108 typedef ViUInt16    _VI_PTR ViPUInt16;
00109 typedef ViUInt16    _VI_PTR ViAUInt16;
00110 
00111 typedef _VI_SIGNED short    ViInt16;
00112 typedef ViInt16     _VI_PTR ViPInt16;
00113 typedef ViInt16     _VI_PTR ViAInt16;
00114 
00115 typedef unsigned char       ViUInt8;
00116 typedef ViUInt8     _VI_PTR ViPUInt8;
00117 typedef ViUInt8     _VI_PTR ViAUInt8;
00118 
00119 typedef _VI_SIGNED char     ViInt8;
00120 typedef ViInt8      _VI_PTR ViPInt8;
00121 typedef ViInt8      _VI_PTR ViAInt8;
00122 
00123 typedef char                ViChar;
00124 typedef ViChar      _VI_PTR ViPChar;
00125 typedef ViChar      _VI_PTR ViAChar;
00126 
00127 typedef unsigned char       ViByte;
00128 typedef ViByte      _VI_PTR ViPByte;
00129 typedef ViByte      _VI_PTR ViAByte;
00130 
00131 typedef void        _VI_PTR ViAddr;
00132 typedef ViAddr      _VI_PTR ViPAddr;
00133 typedef ViAddr      _VI_PTR ViAAddr;
00134 
00135 typedef float               ViReal32;
00136 typedef ViReal32    _VI_PTR ViPReal32;
00137 typedef ViReal32    _VI_PTR ViAReal32;
00138 
00139 typedef double              ViReal64;
00140 typedef ViReal64    _VI_PTR ViPReal64;
00141 typedef ViReal64    _VI_PTR ViAReal64;
00142 
00143 typedef ViPByte             ViBuf;
00144 typedef ViPByte             ViPBuf;
00145 typedef ViPByte     _VI_PTR ViABuf;
00146 
00147 typedef ViPChar             ViString;
00148 typedef ViPChar             ViPString;
00149 typedef ViPChar     _VI_PTR ViAString;
00150 
00151 typedef ViString            ViRsrc;
00152 typedef ViString            ViPRsrc;
00153 typedef ViString    _VI_PTR ViARsrc;
00154 
00155 typedef ViUInt16            ViBoolean;
00156 typedef ViBoolean   _VI_PTR ViPBoolean;
00157 typedef ViBoolean   _VI_PTR ViABoolean;
00158 
00159 typedef ViInt32             ViStatus;
00160 typedef ViStatus    _VI_PTR ViPStatus;
00161 typedef ViStatus    _VI_PTR ViAStatus;
00162 
00163 typedef ViUInt32            ViVersion;
00164 typedef ViVersion   _VI_PTR ViPVersion;
00165 typedef ViVersion   _VI_PTR ViAVersion;
00166 
00167 typedef ViUInt32            ViObject;
00168 typedef ViObject    _VI_PTR ViPObject;
00169 typedef ViObject    _VI_PTR ViAObject;
00170 
00171 typedef ViObject            ViSession;
00172 typedef ViSession   _VI_PTR ViPSession;
00173 typedef ViSession   _VI_PTR ViASession;
00174 
00175 typedef ViUInt32             ViAttr;
00176 
00177 #ifndef _VI_CONST_STRING_DEFINED
00178 typedef const ViChar * ViConstString;
00179 #define _VI_CONST_STRING_DEFINED
00180 #endif  
00181 
00182 /*- Completion and Error Codes ----------------------------------------------*/
00183 
00184 #define VI_SUCCESS          (0L)
00185 
00186 /*- Other VISA Definitions --------------------------------------------------*/
00187 
00188 #define VI_NULL             (0)
00189 
00190 #define VI_TRUE             (1)
00191 #define VI_FALSE            (0)
00192 
00193 /*- Backward Compatibility Macros -------------------------------------------*/
00194 
00195 #define VISAFN              _VI_FUNC
00196 #define ViPtr               _VI_PTR
00197 
00198 #endif
00199 
00200 /*- The End -----------------------------------------------------------------*/
00201 
 All Classes Functions Variables