WPILib 2012
WPILibRoboticsLibraryforFRC
visa/visa.h
00001 /*---------------------------------------------------------------------------*/
00002 /* Distributed by IVI Foundation Inc.                                        */
00003 /* Contains National Instruments extensions.                                 */
00004 /* Do not modify the contents of this file.                                  */
00005 /*---------------------------------------------------------------------------*/
00006 /*                                                                           */
00007 /* Title   : VISA.H                                                          */
00008 /* Date    : 10-09-2006                                                      */
00009 /* Purpose : Include file for the VISA Library 4.0 specification             */
00010 /*                                                                           */
00011 /*---------------------------------------------------------------------------*/
00012 /* When using NI-VISA extensions, you must link with the VISA library that   */
00013 /* comes with NI-VISA.  Currently, the extensions provided by NI-VISA are:   */
00014 /*                                                                           */
00015 /* PXI (Compact PCI eXtensions for Instrumentation) and PCI support.  To use */
00016 /* this, you must define the macro NIVISA_PXI before including this header.  */
00017 /* You must also create an INF file with the VISA Driver Development Wizard. */
00018 /*                                                                           */
00019 /* A fast set of macros for viPeekXX/viPokeXX that guarantees binary         */
00020 /* compatibility with other implementations of VISA.  To use this, you must  */
00021 /* define the macro NIVISA_PEEKPOKE before including this header.            */
00022 /*                                                                           */
00023 /* Support for USB devices that do not conform to a specific class.  To use  */
00024 /* this, you must define the macro NIVISA_USB before including this header.  */
00025 /* You must also create an INF file with the VISA Driver Development Wizard. */
00026 /*---------------------------------------------------------------------------*/
00027 
00028 #ifndef __VISA_HEADER__
00029 #define __VISA_HEADER__
00030 
00031 #include <stdarg.h>
00032 
00033 #if !defined(__VISATYPE_HEADER__)
00034 #include "visatype.h"
00035 #endif
00036 
00037 #define VI_SPEC_VERSION     (0x00400000UL)
00038 
00039 #if defined(__cplusplus) || defined(__cplusplus__)
00040    extern "C" {
00041 #endif
00042 
00043 #if defined(_CVI_)
00044 #pragma EnableLibraryRuntimeChecking
00045 #endif
00046 
00047 /*- VISA Types --------------------------------------------------------------*/
00048 
00049 typedef ViObject             ViEvent;
00050 typedef ViEvent      _VI_PTR ViPEvent;
00051 typedef ViObject             ViFindList;
00052 typedef ViFindList   _VI_PTR ViPFindList;
00053 
00054 #if defined(_VI_INT64_UINT64_DEFINED) && defined(_VISA_ENV_IS_64_BIT)
00055 typedef ViUInt64             ViBusAddress;
00056 typedef ViUInt64             ViBusSize;
00057 typedef ViUInt64             ViAttrState;
00058 #else
00059 typedef ViUInt32             ViBusAddress;
00060 typedef ViUInt32             ViBusSize;
00061 typedef ViUInt32             ViAttrState;
00062 #endif
00063 
00064 #if defined(_VI_INT64_UINT64_DEFINED)
00065 typedef ViUInt64             ViBusAddress64;
00066 typedef ViBusAddress64 _VI_PTR ViPBusAddress64;
00067 #endif
00068 
00069 typedef ViUInt32             ViEventType;
00070 typedef ViEventType  _VI_PTR ViPEventType;
00071 typedef ViEventType  _VI_PTR ViAEventType;
00072 typedef void         _VI_PTR ViPAttrState;
00073 typedef ViAttr       _VI_PTR ViPAttr;
00074 typedef ViAttr       _VI_PTR ViAAttr;
00075 
00076 typedef ViString             ViKeyId;
00077 typedef ViPString            ViPKeyId;
00078 typedef ViUInt32             ViJobId;
00079 typedef ViJobId      _VI_PTR ViPJobId;
00080 typedef ViUInt32             ViAccessMode;
00081 typedef ViAccessMode _VI_PTR ViPAccessMode;
00082 typedef ViBusAddress _VI_PTR ViPBusAddress;
00083 typedef ViUInt32             ViEventFilter;
00084 
00085 typedef va_list              ViVAList;
00086 
00087 typedef ViStatus (_VI_FUNCH _VI_PTR ViHndlr)
00088    (ViSession vi, ViEventType eventType, ViEvent event, ViAddr userHandle);
00089 
00090 /*- Resource Manager Functions and Operations -------------------------------*/
00091 
00092 ViStatus _VI_FUNC  viOpenDefaultRM (ViPSession vi);
00093 ViStatus _VI_FUNC  viFindRsrc      (ViSession sesn, ViString expr, ViPFindList vi,
00094                                     ViPUInt32 retCnt, ViChar _VI_FAR desc[]);
00095 ViStatus _VI_FUNC  viFindNext      (ViFindList vi, ViChar _VI_FAR desc[]);
00096 ViStatus _VI_FUNC  viParseRsrc     (ViSession rmSesn, ViRsrc rsrcName,
00097                                     ViPUInt16 intfType, ViPUInt16 intfNum);
00098 ViStatus _VI_FUNC  viParseRsrcEx   (ViSession rmSesn, ViRsrc rsrcName, ViPUInt16 intfType,
00099                                     ViPUInt16 intfNum, ViChar _VI_FAR rsrcClass[],
00100                                     ViChar _VI_FAR expandedUnaliasedName[],
00101                                     ViChar _VI_FAR aliasIfExists[]);
00102 ViStatus _VI_FUNC  viOpen          (ViSession sesn, ViRsrc name, ViAccessMode mode,
00103                                     ViUInt32 timeout, ViPSession vi);
00104 
00105 /*- Resource Template Operations --------------------------------------------*/
00106 
00107 ViStatus _VI_FUNC  viClose         (ViObject vi);
00108 ViStatus _VI_FUNC  viSetAttribute  (ViObject vi, ViAttr attrName, ViAttrState attrValue);
00109 ViStatus _VI_FUNC  viGetAttribute  (ViObject vi, ViAttr attrName, void _VI_PTR attrValue);
00110 ViStatus _VI_FUNC  viStatusDesc    (ViObject vi, ViStatus status, ViChar _VI_FAR desc[]);
00111 ViStatus _VI_FUNC  viTerminate     (ViObject vi, ViUInt16 degree, ViJobId jobId);
00112 
00113 ViStatus _VI_FUNC  viLock          (ViSession vi, ViAccessMode lockType, ViUInt32 timeout,
00114                                     ViKeyId requestedKey, ViChar _VI_FAR accessKey[]);
00115 ViStatus _VI_FUNC  viUnlock        (ViSession vi);
00116 ViStatus _VI_FUNC  viEnableEvent   (ViSession vi, ViEventType eventType, ViUInt16 mechanism,
00117                                     ViEventFilter context);
00118 ViStatus _VI_FUNC  viDisableEvent  (ViSession vi, ViEventType eventType, ViUInt16 mechanism);
00119 ViStatus _VI_FUNC  viDiscardEvents (ViSession vi, ViEventType eventType, ViUInt16 mechanism);
00120 ViStatus _VI_FUNC  viWaitOnEvent   (ViSession vi, ViEventType inEventType, ViUInt32 timeout,
00121                                     ViPEventType outEventType, ViPEvent outContext);
00122 ViStatus _VI_FUNC  viInstallHandler(ViSession vi, ViEventType eventType, ViHndlr handler,
00123                                     ViAddr userHandle);
00124 ViStatus _VI_FUNC  viUninstallHandler(ViSession vi, ViEventType eventType, ViHndlr handler,
00125                                       ViAddr userHandle);
00126 
00127 /*- Basic I/O Operations ----------------------------------------------------*/
00128 
00129 ViStatus _VI_FUNC  viRead          (ViSession vi, ViPBuf buf, ViUInt32 cnt, ViPUInt32 retCnt);
00130 ViStatus _VI_FUNC  viReadAsync     (ViSession vi, ViPBuf buf, ViUInt32 cnt, ViPJobId  jobId);
00131 ViStatus _VI_FUNC  viReadToFile    (ViSession vi, ViConstString filename, ViUInt32 cnt,
00132                                     ViPUInt32 retCnt);
00133 ViStatus _VI_FUNC  viWrite         (ViSession vi, ViBuf  buf, ViUInt32 cnt, ViPUInt32 retCnt);
00134 ViStatus _VI_FUNC  viWriteAsync    (ViSession vi, ViBuf  buf, ViUInt32 cnt, ViPJobId  jobId);
00135 ViStatus _VI_FUNC  viWriteFromFile (ViSession vi, ViConstString filename, ViUInt32 cnt,
00136                                     ViPUInt32 retCnt);
00137 ViStatus _VI_FUNC  viAssertTrigger (ViSession vi, ViUInt16 protocol);
00138 ViStatus _VI_FUNC  viReadSTB       (ViSession vi, ViPUInt16 status);
00139 ViStatus _VI_FUNC  viClear         (ViSession vi);
00140 
00141 /*- Formatted and Buffered I/O Operations -----------------------------------*/
00142 
00143 ViStatus _VI_FUNC  viSetBuf        (ViSession vi, ViUInt16 mask, ViUInt32 size);
00144 ViStatus _VI_FUNC  viFlush         (ViSession vi, ViUInt16 mask);
00145 
00146 ViStatus _VI_FUNC  viBufWrite      (ViSession vi, ViBuf  buf, ViUInt32 cnt, ViPUInt32 retCnt);
00147 ViStatus _VI_FUNC  viBufRead       (ViSession vi, ViPBuf buf, ViUInt32 cnt, ViPUInt32 retCnt);
00148 
00149 ViStatus _VI_FUNCC viPrintf        (ViSession vi, ViString writeFmt, ...);
00150 ViStatus _VI_FUNC  viVPrintf       (ViSession vi, ViString writeFmt, ViVAList params);
00151 ViStatus _VI_FUNCC viSPrintf       (ViSession vi, ViPBuf buf, ViString writeFmt, ...);
00152 ViStatus _VI_FUNC  viVSPrintf      (ViSession vi, ViPBuf buf, ViString writeFmt,
00153                                     ViVAList parms);
00154 
00155 ViStatus _VI_FUNCC viScanf         (ViSession vi, ViString readFmt, ...);
00156 ViStatus _VI_FUNC  viVScanf        (ViSession vi, ViString readFmt, ViVAList params);
00157 ViStatus _VI_FUNCC viSScanf        (ViSession vi, ViBuf buf, ViString readFmt, ...);
00158 ViStatus _VI_FUNC  viVSScanf       (ViSession vi, ViBuf buf, ViString readFmt,
00159                                     ViVAList parms);
00160 
00161 ViStatus _VI_FUNCC viQueryf        (ViSession vi, ViString writeFmt, ViString readFmt, ...);
00162 ViStatus _VI_FUNC  viVQueryf       (ViSession vi, ViString writeFmt, ViString readFmt, 
00163                                     ViVAList params);
00164 
00165 /*- Memory I/O Operations ---------------------------------------------------*/
00166 
00167 ViStatus _VI_FUNC  viIn8           (ViSession vi, ViUInt16 space,
00168                                     ViBusAddress offset, ViPUInt8  val8);
00169 ViStatus _VI_FUNC  viOut8          (ViSession vi, ViUInt16 space,
00170                                     ViBusAddress offset, ViUInt8   val8);
00171 ViStatus _VI_FUNC  viIn16          (ViSession vi, ViUInt16 space,
00172                                     ViBusAddress offset, ViPUInt16 val16);
00173 ViStatus _VI_FUNC  viOut16         (ViSession vi, ViUInt16 space,
00174                                     ViBusAddress offset, ViUInt16  val16);
00175 ViStatus _VI_FUNC  viIn32          (ViSession vi, ViUInt16 space,
00176                                     ViBusAddress offset, ViPUInt32 val32);
00177 ViStatus _VI_FUNC  viOut32         (ViSession vi, ViUInt16 space,
00178                                     ViBusAddress offset, ViUInt32  val32);
00179 
00180 #if defined(_VI_INT64_UINT64_DEFINED)
00181 ViStatus _VI_FUNC  viIn64          (ViSession vi, ViUInt16 space,
00182                                     ViBusAddress offset, ViPUInt64 val64);
00183 ViStatus _VI_FUNC  viOut64         (ViSession vi, ViUInt16 space,
00184                                     ViBusAddress offset, ViUInt64  val64);
00185 
00186 ViStatus _VI_FUNC  viIn8Ex         (ViSession vi, ViUInt16 space,
00187                                     ViBusAddress64 offset, ViPUInt8  val8);
00188 ViStatus _VI_FUNC  viOut8Ex        (ViSession vi, ViUInt16 space,
00189                                     ViBusAddress64 offset, ViUInt8   val8);
00190 ViStatus _VI_FUNC  viIn16Ex        (ViSession vi, ViUInt16 space,
00191                                     ViBusAddress64 offset, ViPUInt16 val16);
00192 ViStatus _VI_FUNC  viOut16Ex       (ViSession vi, ViUInt16 space,
00193                                     ViBusAddress64 offset, ViUInt16  val16);
00194 ViStatus _VI_FUNC  viIn32Ex        (ViSession vi, ViUInt16 space,
00195                                     ViBusAddress64 offset, ViPUInt32 val32);
00196 ViStatus _VI_FUNC  viOut32Ex       (ViSession vi, ViUInt16 space,
00197                                     ViBusAddress64 offset, ViUInt32  val32);
00198 ViStatus _VI_FUNC  viIn64Ex        (ViSession vi, ViUInt16 space,
00199                                     ViBusAddress64 offset, ViPUInt64 val64);
00200 ViStatus _VI_FUNC  viOut64Ex       (ViSession vi, ViUInt16 space,
00201                                     ViBusAddress64 offset, ViUInt64  val64);
00202 #endif
00203 
00204 ViStatus _VI_FUNC  viMoveIn8       (ViSession vi, ViUInt16 space, ViBusAddress offset,
00205                                     ViBusSize length, ViAUInt8  buf8);
00206 ViStatus _VI_FUNC  viMoveOut8      (ViSession vi, ViUInt16 space, ViBusAddress offset,
00207                                     ViBusSize length, ViAUInt8  buf8);
00208 ViStatus _VI_FUNC  viMoveIn16      (ViSession vi, ViUInt16 space, ViBusAddress offset,
00209                                     ViBusSize length, ViAUInt16 buf16);
00210 ViStatus _VI_FUNC  viMoveOut16     (ViSession vi, ViUInt16 space, ViBusAddress offset,
00211                                     ViBusSize length, ViAUInt16 buf16);
00212 ViStatus _VI_FUNC  viMoveIn32      (ViSession vi, ViUInt16 space, ViBusAddress offset,
00213                                     ViBusSize length, ViAUInt32 buf32);
00214 ViStatus _VI_FUNC  viMoveOut32     (ViSession vi, ViUInt16 space, ViBusAddress offset,
00215                                     ViBusSize length, ViAUInt32 buf32);
00216 
00217 #if defined(_VI_INT64_UINT64_DEFINED)
00218 ViStatus _VI_FUNC  viMoveIn64      (ViSession vi, ViUInt16 space, ViBusAddress offset,
00219                                     ViBusSize length, ViAUInt64 buf64);
00220 ViStatus _VI_FUNC  viMoveOut64     (ViSession vi, ViUInt16 space, ViBusAddress offset,
00221                                     ViBusSize length, ViAUInt64 buf64);
00222 
00223 ViStatus _VI_FUNC  viMoveIn8Ex     (ViSession vi, ViUInt16 space, ViBusAddress64 offset,
00224                                     ViBusSize length, ViAUInt8  buf8);
00225 ViStatus _VI_FUNC  viMoveOut8Ex    (ViSession vi, ViUInt16 space, ViBusAddress64 offset,
00226                                     ViBusSize length, ViAUInt8  buf8);
00227 ViStatus _VI_FUNC  viMoveIn16Ex    (ViSession vi, ViUInt16 space, ViBusAddress64 offset,
00228                                     ViBusSize length, ViAUInt16 buf16);
00229 ViStatus _VI_FUNC  viMoveOut16Ex   (ViSession vi, ViUInt16 space, ViBusAddress64 offset,
00230                                     ViBusSize length, ViAUInt16 buf16);
00231 ViStatus _VI_FUNC  viMoveIn32Ex    (ViSession vi, ViUInt16 space, ViBusAddress64 offset,
00232                                     ViBusSize length, ViAUInt32 buf32);
00233 ViStatus _VI_FUNC  viMoveOut32Ex   (ViSession vi, ViUInt16 space, ViBusAddress64 offset,
00234                                     ViBusSize length, ViAUInt32 buf32);
00235 ViStatus _VI_FUNC  viMoveIn64Ex    (ViSession vi, ViUInt16 space, ViBusAddress64 offset,
00236                                     ViBusSize length, ViAUInt64 buf64);
00237 ViStatus _VI_FUNC  viMoveOut64Ex   (ViSession vi, ViUInt16 space, ViBusAddress64 offset,
00238                                     ViBusSize length, ViAUInt64 buf64);
00239 #endif
00240 
00241 ViStatus _VI_FUNC  viMove          (ViSession vi, ViUInt16 srcSpace, ViBusAddress srcOffset,
00242                                     ViUInt16 srcWidth, ViUInt16 destSpace, 
00243                                     ViBusAddress destOffset, ViUInt16 destWidth, 
00244                                     ViBusSize srcLength); 
00245 ViStatus _VI_FUNC  viMoveAsync     (ViSession vi, ViUInt16 srcSpace, ViBusAddress srcOffset,
00246                                     ViUInt16 srcWidth, ViUInt16 destSpace, 
00247                                     ViBusAddress destOffset, ViUInt16 destWidth, 
00248                                     ViBusSize srcLength, ViPJobId jobId);
00249 
00250 #if defined(_VI_INT64_UINT64_DEFINED)
00251 ViStatus _VI_FUNC  viMoveEx        (ViSession vi, ViUInt16 srcSpace, ViBusAddress64 srcOffset,
00252                                     ViUInt16 srcWidth, ViUInt16 destSpace, 
00253                                     ViBusAddress64 destOffset, ViUInt16 destWidth, 
00254                                     ViBusSize srcLength); 
00255 ViStatus _VI_FUNC  viMoveAsyncEx   (ViSession vi, ViUInt16 srcSpace, ViBusAddress64 srcOffset,
00256                                     ViUInt16 srcWidth, ViUInt16 destSpace, 
00257                                     ViBusAddress64 destOffset, ViUInt16 destWidth, 
00258                                     ViBusSize srcLength, ViPJobId jobId);
00259 #endif
00260 
00261 ViStatus _VI_FUNC  viMapAddress    (ViSession vi, ViUInt16 mapSpace, ViBusAddress mapOffset,
00262                                     ViBusSize mapSize, ViBoolean access,
00263                                     ViAddr suggested, ViPAddr address);
00264 ViStatus _VI_FUNC  viUnmapAddress  (ViSession vi);
00265 
00266 #if defined(_VI_INT64_UINT64_DEFINED)
00267 ViStatus _VI_FUNC  viMapAddressEx  (ViSession vi, ViUInt16 mapSpace, ViBusAddress64 mapOffset,
00268                                     ViBusSize mapSize, ViBoolean access,
00269                                     ViAddr suggested, ViPAddr address);
00270 #endif
00271 
00272 void     _VI_FUNC  viPeek8         (ViSession vi, ViAddr address, ViPUInt8  val8);
00273 void     _VI_FUNC  viPoke8         (ViSession vi, ViAddr address, ViUInt8   val8);
00274 void     _VI_FUNC  viPeek16        (ViSession vi, ViAddr address, ViPUInt16 val16);
00275 void     _VI_FUNC  viPoke16        (ViSession vi, ViAddr address, ViUInt16  val16);
00276 void     _VI_FUNC  viPeek32        (ViSession vi, ViAddr address, ViPUInt32 val32);
00277 void     _VI_FUNC  viPoke32        (ViSession vi, ViAddr address, ViUInt32  val32);
00278 
00279 #if defined(_VI_INT64_UINT64_DEFINED)
00280 void     _VI_FUNC  viPeek64        (ViSession vi, ViAddr address, ViPUInt64 val64);
00281 void     _VI_FUNC  viPoke64        (ViSession vi, ViAddr address, ViUInt64  val64);
00282 #endif
00283 
00284 /*- Shared Memory Operations ------------------------------------------------*/
00285 
00286 ViStatus _VI_FUNC  viMemAlloc      (ViSession vi, ViBusSize size, ViPBusAddress offset);
00287 ViStatus _VI_FUNC  viMemFree       (ViSession vi, ViBusAddress offset);
00288 
00289 #if defined(_VI_INT64_UINT64_DEFINED)
00290 ViStatus _VI_FUNC  viMemAllocEx    (ViSession vi, ViBusSize size, ViPBusAddress64 offset);
00291 ViStatus _VI_FUNC  viMemFreeEx     (ViSession vi, ViBusAddress64 offset);
00292 #endif
00293 
00294 /*- Interface Specific Operations -------------------------------------------*/
00295 
00296 ViStatus _VI_FUNC  viGpibControlREN(ViSession vi, ViUInt16 mode);
00297 ViStatus _VI_FUNC  viGpibControlATN(ViSession vi, ViUInt16 mode);
00298 ViStatus _VI_FUNC  viGpibSendIFC   (ViSession vi);
00299 ViStatus _VI_FUNC  viGpibCommand   (ViSession vi, ViBuf cmd, ViUInt32 cnt, ViPUInt32 retCnt);
00300 ViStatus _VI_FUNC  viGpibPassControl(ViSession vi, ViUInt16 primAddr, ViUInt16 secAddr);
00301 
00302 ViStatus _VI_FUNC  viVxiCommandQuery(ViSession vi, ViUInt16 mode, ViUInt32 cmd,
00303                                      ViPUInt32 response);
00304 ViStatus _VI_FUNC  viAssertUtilSignal(ViSession vi, ViUInt16 line);
00305 ViStatus _VI_FUNC  viAssertIntrSignal(ViSession vi, ViInt16 mode, ViUInt32 statusID);
00306 ViStatus _VI_FUNC  viMapTrigger    (ViSession vi, ViInt16 trigSrc, ViInt16 trigDest, 
00307                                     ViUInt16 mode);
00308 ViStatus _VI_FUNC  viUnmapTrigger  (ViSession vi, ViInt16 trigSrc, ViInt16 trigDest);
00309 ViStatus _VI_FUNC  viUsbControlOut (ViSession vi, ViInt16 bmRequestType, ViInt16 bRequest,
00310                                     ViUInt16 wValue, ViUInt16 wIndex, ViUInt16 wLength,
00311                                     ViBuf buf);
00312 ViStatus _VI_FUNC  viUsbControlIn  (ViSession vi, ViInt16 bmRequestType, ViInt16 bRequest,
00313                                     ViUInt16 wValue, ViUInt16 wIndex, ViUInt16 wLength,
00314                                     ViPBuf buf, ViPUInt16 retCnt);
00315 
00316 /*- Attributes (platform independent size) ----------------------------------*/
00317 
00318 #define VI_ATTR_RSRC_CLASS          (0xBFFF0001UL)
00319 #define VI_ATTR_RSRC_NAME           (0xBFFF0002UL)
00320 #define VI_ATTR_RSRC_IMPL_VERSION   (0x3FFF0003UL)
00321 #define VI_ATTR_RSRC_LOCK_STATE     (0x3FFF0004UL)
00322 #define VI_ATTR_MAX_QUEUE_LENGTH    (0x3FFF0005UL)
00323 #define VI_ATTR_USER_DATA_32        (0x3FFF0007UL)
00324 #define VI_ATTR_FDC_CHNL            (0x3FFF000DUL)
00325 #define VI_ATTR_FDC_MODE            (0x3FFF000FUL)
00326 #define VI_ATTR_FDC_GEN_SIGNAL_EN   (0x3FFF0011UL)
00327 #define VI_ATTR_FDC_USE_PAIR        (0x3FFF0013UL)
00328 #define VI_ATTR_SEND_END_EN         (0x3FFF0016UL)
00329 #define VI_ATTR_TERMCHAR            (0x3FFF0018UL)
00330 #define VI_ATTR_TMO_VALUE           (0x3FFF001AUL)
00331 #define VI_ATTR_GPIB_READDR_EN      (0x3FFF001BUL)
00332 #define VI_ATTR_IO_PROT             (0x3FFF001CUL)
00333 #define VI_ATTR_DMA_ALLOW_EN        (0x3FFF001EUL)
00334 #define VI_ATTR_ASRL_BAUD           (0x3FFF0021UL)
00335 #define VI_ATTR_ASRL_DATA_BITS      (0x3FFF0022UL)
00336 #define VI_ATTR_ASRL_PARITY         (0x3FFF0023UL)
00337 #define VI_ATTR_ASRL_STOP_BITS      (0x3FFF0024UL)
00338 #define VI_ATTR_ASRL_FLOW_CNTRL     (0x3FFF0025UL)
00339 #define VI_ATTR_RD_BUF_OPER_MODE    (0x3FFF002AUL)
00340 #define VI_ATTR_RD_BUF_SIZE         (0x3FFF002BUL)
00341 #define VI_ATTR_WR_BUF_OPER_MODE    (0x3FFF002DUL)
00342 #define VI_ATTR_WR_BUF_SIZE         (0x3FFF002EUL)
00343 #define VI_ATTR_SUPPRESS_END_EN     (0x3FFF0036UL)
00344 #define VI_ATTR_TERMCHAR_EN         (0x3FFF0038UL)
00345 #define VI_ATTR_DEST_ACCESS_PRIV    (0x3FFF0039UL)
00346 #define VI_ATTR_DEST_BYTE_ORDER     (0x3FFF003AUL)
00347 #define VI_ATTR_SRC_ACCESS_PRIV     (0x3FFF003CUL)
00348 #define VI_ATTR_SRC_BYTE_ORDER      (0x3FFF003DUL)
00349 #define VI_ATTR_SRC_INCREMENT       (0x3FFF0040UL)
00350 #define VI_ATTR_DEST_INCREMENT      (0x3FFF0041UL)
00351 #define VI_ATTR_WIN_ACCESS_PRIV     (0x3FFF0045UL)
00352 #define VI_ATTR_WIN_BYTE_ORDER      (0x3FFF0047UL)
00353 #define VI_ATTR_GPIB_ATN_STATE      (0x3FFF0057UL)
00354 #define VI_ATTR_GPIB_ADDR_STATE     (0x3FFF005CUL)
00355 #define VI_ATTR_GPIB_CIC_STATE      (0x3FFF005EUL)
00356 #define VI_ATTR_GPIB_NDAC_STATE     (0x3FFF0062UL)
00357 #define VI_ATTR_GPIB_SRQ_STATE      (0x3FFF0067UL)
00358 #define VI_ATTR_GPIB_SYS_CNTRL_STATE (0x3FFF0068UL)
00359 #define VI_ATTR_GPIB_HS488_CBL_LEN  (0x3FFF0069UL)
00360 #define VI_ATTR_CMDR_LA             (0x3FFF006BUL)
00361 #define VI_ATTR_VXI_DEV_CLASS       (0x3FFF006CUL)
00362 #define VI_ATTR_MAINFRAME_LA        (0x3FFF0070UL)
00363 #define VI_ATTR_MANF_NAME           (0xBFFF0072UL)
00364 #define VI_ATTR_MODEL_NAME          (0xBFFF0077UL)
00365 #define VI_ATTR_VXI_VME_INTR_STATUS (0x3FFF008BUL)
00366 #define VI_ATTR_VXI_TRIG_STATUS     (0x3FFF008DUL)
00367 #define VI_ATTR_VXI_VME_SYSFAIL_STATE (0x3FFF0094UL)
00368 #define VI_ATTR_WIN_BASE_ADDR_32    (0x3FFF0098UL)
00369 #define VI_ATTR_WIN_SIZE_32         (0x3FFF009AUL)
00370 #define VI_ATTR_ASRL_AVAIL_NUM      (0x3FFF00ACUL)
00371 #define VI_ATTR_MEM_BASE_32         (0x3FFF00ADUL)
00372 #define VI_ATTR_ASRL_CTS_STATE      (0x3FFF00AEUL)
00373 #define VI_ATTR_ASRL_DCD_STATE      (0x3FFF00AFUL)
00374 #define VI_ATTR_ASRL_DSR_STATE      (0x3FFF00B1UL)
00375 #define VI_ATTR_ASRL_DTR_STATE      (0x3FFF00B2UL)
00376 #define VI_ATTR_ASRL_END_IN         (0x3FFF00B3UL)
00377 #define VI_ATTR_ASRL_END_OUT        (0x3FFF00B4UL)
00378 #define VI_ATTR_ASRL_REPLACE_CHAR   (0x3FFF00BEUL)
00379 #define VI_ATTR_ASRL_RI_STATE       (0x3FFF00BFUL)
00380 #define VI_ATTR_ASRL_RTS_STATE      (0x3FFF00C0UL)
00381 #define VI_ATTR_ASRL_XON_CHAR       (0x3FFF00C1UL)
00382 #define VI_ATTR_ASRL_XOFF_CHAR      (0x3FFF00C2UL)
00383 #define VI_ATTR_WIN_ACCESS          (0x3FFF00C3UL)
00384 #define VI_ATTR_RM_SESSION          (0x3FFF00C4UL)
00385 #define VI_ATTR_VXI_LA              (0x3FFF00D5UL)
00386 #define VI_ATTR_MANF_ID             (0x3FFF00D9UL)
00387 #define VI_ATTR_MEM_SIZE_32         (0x3FFF00DDUL)
00388 #define VI_ATTR_MEM_SPACE           (0x3FFF00DEUL)
00389 #define VI_ATTR_MODEL_CODE          (0x3FFF00DFUL)
00390 #define VI_ATTR_SLOT                (0x3FFF00E8UL)
00391 #define VI_ATTR_INTF_INST_NAME      (0xBFFF00E9UL)
00392 #define VI_ATTR_IMMEDIATE_SERV      (0x3FFF0100UL)
00393 #define VI_ATTR_INTF_PARENT_NUM     (0x3FFF0101UL)
00394 #define VI_ATTR_RSRC_SPEC_VERSION   (0x3FFF0170UL)
00395 #define VI_ATTR_INTF_TYPE           (0x3FFF0171UL)
00396 #define VI_ATTR_GPIB_PRIMARY_ADDR   (0x3FFF0172UL)
00397 #define VI_ATTR_GPIB_SECONDARY_ADDR (0x3FFF0173UL)
00398 #define VI_ATTR_RSRC_MANF_NAME      (0xBFFF0174UL)
00399 #define VI_ATTR_RSRC_MANF_ID        (0x3FFF0175UL)
00400 #define VI_ATTR_INTF_NUM            (0x3FFF0176UL)
00401 #define VI_ATTR_TRIG_ID             (0x3FFF0177UL)
00402 #define VI_ATTR_GPIB_REN_STATE      (0x3FFF0181UL)
00403 #define VI_ATTR_GPIB_UNADDR_EN      (0x3FFF0184UL)
00404 #define VI_ATTR_DEV_STATUS_BYTE     (0x3FFF0189UL)
00405 #define VI_ATTR_FILE_APPEND_EN      (0x3FFF0192UL)
00406 #define VI_ATTR_VXI_TRIG_SUPPORT    (0x3FFF0194UL)
00407 #define VI_ATTR_TCPIP_ADDR          (0xBFFF0195UL)
00408 #define VI_ATTR_TCPIP_HOSTNAME      (0xBFFF0196UL)
00409 #define VI_ATTR_TCPIP_PORT          (0x3FFF0197UL)
00410 #define VI_ATTR_TCPIP_DEVICE_NAME   (0xBFFF0199UL)
00411 #define VI_ATTR_TCPIP_NODELAY       (0x3FFF019AUL)
00412 #define VI_ATTR_TCPIP_KEEPALIVE     (0x3FFF019BUL)
00413 #define VI_ATTR_4882_COMPLIANT      (0x3FFF019FUL)
00414 #define VI_ATTR_USB_SERIAL_NUM      (0xBFFF01A0UL)
00415 #define VI_ATTR_USB_INTFC_NUM       (0x3FFF01A1UL)
00416 #define VI_ATTR_USB_PROTOCOL        (0x3FFF01A7UL)
00417 #define VI_ATTR_USB_MAX_INTR_SIZE   (0x3FFF01AFUL)
00418 #define VI_ATTR_PXI_DEV_NUM         (0x3FFF0201UL)
00419 #define VI_ATTR_PXI_FUNC_NUM        (0x3FFF0202UL)
00420 #define VI_ATTR_PXI_BUS_NUM         (0x3FFF0205UL)
00421 #define VI_ATTR_PXI_CHASSIS         (0x3FFF0206UL)
00422 #define VI_ATTR_PXI_SLOTPATH        (0xBFFF0207UL)
00423 #define VI_ATTR_PXI_SLOT_LBUS_LEFT  (0x3FFF0208UL)
00424 #define VI_ATTR_PXI_SLOT_LBUS_RIGHT (0x3FFF0209UL)
00425 #define VI_ATTR_PXI_TRIG_BUS        (0x3FFF020AUL)
00426 #define VI_ATTR_PXI_STAR_TRIG_BUS   (0x3FFF020BUL)
00427 #define VI_ATTR_PXI_STAR_TRIG_LINE  (0x3FFF020CUL)
00428 #define VI_ATTR_PXI_MEM_TYPE_BAR0   (0x3FFF0211UL)
00429 #define VI_ATTR_PXI_MEM_TYPE_BAR1   (0x3FFF0212UL)
00430 #define VI_ATTR_PXI_MEM_TYPE_BAR2   (0x3FFF0213UL)
00431 #define VI_ATTR_PXI_MEM_TYPE_BAR3   (0x3FFF0214UL)
00432 #define VI_ATTR_PXI_MEM_TYPE_BAR4   (0x3FFF0215UL)
00433 #define VI_ATTR_PXI_MEM_TYPE_BAR5   (0x3FFF0216UL)
00434 #define VI_ATTR_PXI_MEM_BASE_BAR0   (0x3FFF0221UL)
00435 #define VI_ATTR_PXI_MEM_BASE_BAR1   (0x3FFF0222UL)
00436 #define VI_ATTR_PXI_MEM_BASE_BAR2   (0x3FFF0223UL)
00437 #define VI_ATTR_PXI_MEM_BASE_BAR3   (0x3FFF0224UL)
00438 #define VI_ATTR_PXI_MEM_BASE_BAR4   (0x3FFF0225UL)
00439 #define VI_ATTR_PXI_MEM_BASE_BAR5   (0x3FFF0226UL)
00440 #define VI_ATTR_PXI_MEM_SIZE_BAR0   (0x3FFF0231UL)
00441 #define VI_ATTR_PXI_MEM_SIZE_BAR1   (0x3FFF0232UL)
00442 #define VI_ATTR_PXI_MEM_SIZE_BAR2   (0x3FFF0233UL)
00443 #define VI_ATTR_PXI_MEM_SIZE_BAR3   (0x3FFF0234UL)
00444 #define VI_ATTR_PXI_MEM_SIZE_BAR4   (0x3FFF0235UL)
00445 #define VI_ATTR_PXI_MEM_SIZE_BAR5   (0x3FFF0236UL)
00446 #define VI_ATTR_PXI_IS_EXPRESS      (0x3FFF0240UL)
00447 #define VI_ATTR_PXI_SLOT_LWIDTH     (0x3FFF0241UL)
00448 #define VI_ATTR_PXI_MAX_LWIDTH      (0x3FFF0242UL)
00449 #define VI_ATTR_PXI_ACTUAL_LWIDTH   (0x3FFF0243UL)
00450 #define VI_ATTR_PXI_DSTAR_BUS       (0x3FFF0244UL)
00451 #define VI_ATTR_PXI_DSTAR_SET       (0x3FFF0245UL)
00452 
00453 #define VI_ATTR_JOB_ID              (0x3FFF4006UL)
00454 #define VI_ATTR_EVENT_TYPE          (0x3FFF4010UL)
00455 #define VI_ATTR_SIGP_STATUS_ID      (0x3FFF4011UL)
00456 #define VI_ATTR_RECV_TRIG_ID        (0x3FFF4012UL)
00457 #define VI_ATTR_INTR_STATUS_ID      (0x3FFF4023UL)
00458 #define VI_ATTR_STATUS              (0x3FFF4025UL)
00459 #define VI_ATTR_RET_COUNT_32        (0x3FFF4026UL)
00460 #define VI_ATTR_BUFFER              (0x3FFF4027UL)
00461 #define VI_ATTR_RECV_INTR_LEVEL     (0x3FFF4041UL)
00462 #define VI_ATTR_OPER_NAME           (0xBFFF4042UL)
00463 #define VI_ATTR_GPIB_RECV_CIC_STATE (0x3FFF4193UL)
00464 #define VI_ATTR_RECV_TCPIP_ADDR     (0xBFFF4198UL)
00465 #define VI_ATTR_USB_RECV_INTR_SIZE  (0x3FFF41B0UL)
00466 #define VI_ATTR_USB_RECV_INTR_DATA  (0xBFFF41B1UL)
00467 
00468 /*- Attributes (platform dependent size) ------------------------------------*/
00469 
00470 #if defined(_VI_INT64_UINT64_DEFINED) && defined(_VISA_ENV_IS_64_BIT)
00471 #define VI_ATTR_USER_DATA_64        (0x3FFF000AUL)
00472 #define VI_ATTR_RET_COUNT_64        (0x3FFF4028UL)
00473 #define VI_ATTR_USER_DATA           (VI_ATTR_USER_DATA_64)
00474 #define VI_ATTR_RET_COUNT           (VI_ATTR_RET_COUNT_64)
00475 #else
00476 #define VI_ATTR_USER_DATA           (VI_ATTR_USER_DATA_32)
00477 #define VI_ATTR_RET_COUNT           (VI_ATTR_RET_COUNT_32)
00478 #endif
00479 
00480 #if defined(_VI_INT64_UINT64_DEFINED)
00481 #define VI_ATTR_WIN_BASE_ADDR_64    (0x3FFF009BUL)
00482 #define VI_ATTR_WIN_SIZE_64         (0x3FFF009CUL)
00483 #define VI_ATTR_MEM_BASE_64         (0x3FFF00D0UL)
00484 #define VI_ATTR_MEM_SIZE_64         (0x3FFF00D1UL)
00485 #endif
00486 #if defined(_VI_INT64_UINT64_DEFINED) && defined(_VISA_ENV_IS_64_BIT)
00487 #define VI_ATTR_WIN_BASE_ADDR       (VI_ATTR_WIN_BASE_ADDR_64)
00488 #define VI_ATTR_WIN_SIZE            (VI_ATTR_WIN_SIZE_64)
00489 #define VI_ATTR_MEM_BASE            (VI_ATTR_MEM_BASE_64)
00490 #define VI_ATTR_MEM_SIZE            (VI_ATTR_MEM_SIZE_64)
00491 #else
00492 #define VI_ATTR_WIN_BASE_ADDR       (VI_ATTR_WIN_BASE_ADDR_32)
00493 #define VI_ATTR_WIN_SIZE            (VI_ATTR_WIN_SIZE_32)
00494 #define VI_ATTR_MEM_BASE            (VI_ATTR_MEM_BASE_32)
00495 #define VI_ATTR_MEM_SIZE            (VI_ATTR_MEM_SIZE_32)
00496 #endif
00497 
00498 /*- Event Types -------------------------------------------------------------*/
00499 
00500 #define VI_EVENT_IO_COMPLETION      (0x3FFF2009UL)
00501 #define VI_EVENT_TRIG               (0xBFFF200AUL)
00502 #define VI_EVENT_SERVICE_REQ        (0x3FFF200BUL)
00503 #define VI_EVENT_CLEAR              (0x3FFF200DUL)
00504 #define VI_EVENT_EXCEPTION          (0xBFFF200EUL)
00505 #define VI_EVENT_GPIB_CIC           (0x3FFF2012UL)
00506 #define VI_EVENT_GPIB_TALK          (0x3FFF2013UL)
00507 #define VI_EVENT_GPIB_LISTEN        (0x3FFF2014UL)
00508 #define VI_EVENT_VXI_VME_SYSFAIL    (0x3FFF201DUL)
00509 #define VI_EVENT_VXI_VME_SYSRESET   (0x3FFF201EUL)
00510 #define VI_EVENT_VXI_SIGP           (0x3FFF2020UL)
00511 #define VI_EVENT_VXI_VME_INTR       (0xBFFF2021UL)
00512 #define VI_EVENT_PXI_INTR           (0x3FFF2022UL)
00513 #define VI_EVENT_TCPIP_CONNECT      (0x3FFF2036UL)
00514 #define VI_EVENT_USB_INTR           (0x3FFF2037UL)
00515 
00516 #define VI_ALL_ENABLED_EVENTS       (0x3FFF7FFFUL)
00517 
00518 /*- Completion and Error Codes ----------------------------------------------*/
00519 
00520 #define VI_SUCCESS_EVENT_EN                   (0x3FFF0002L) /* 3FFF0002,  1073676290 */
00521 #define VI_SUCCESS_EVENT_DIS                  (0x3FFF0003L) /* 3FFF0003,  1073676291 */
00522 #define VI_SUCCESS_QUEUE_EMPTY                (0x3FFF0004L) /* 3FFF0004,  1073676292 */
00523 #define VI_SUCCESS_TERM_CHAR                  (0x3FFF0005L) /* 3FFF0005,  1073676293 */
00524 #define VI_SUCCESS_MAX_CNT                    (0x3FFF0006L) /* 3FFF0006,  1073676294 */
00525 #define VI_SUCCESS_DEV_NPRESENT               (0x3FFF007DL) /* 3FFF007D,  1073676413 */
00526 #define VI_SUCCESS_TRIG_MAPPED                (0x3FFF007EL) /* 3FFF007E,  1073676414 */
00527 #define VI_SUCCESS_QUEUE_NEMPTY               (0x3FFF0080L) /* 3FFF0080,  1073676416 */
00528 #define VI_SUCCESS_NCHAIN                     (0x3FFF0098L) /* 3FFF0098,  1073676440 */
00529 #define VI_SUCCESS_NESTED_SHARED              (0x3FFF0099L) /* 3FFF0099,  1073676441 */
00530 #define VI_SUCCESS_NESTED_EXCLUSIVE           (0x3FFF009AL) /* 3FFF009A,  1073676442 */
00531 #define VI_SUCCESS_SYNC                       (0x3FFF009BL) /* 3FFF009B,  1073676443 */
00532 
00533 #define VI_WARN_QUEUE_OVERFLOW                (0x3FFF000CL) /* 3FFF000C,  1073676300 */
00534 #define VI_WARN_CONFIG_NLOADED                (0x3FFF0077L) /* 3FFF0077,  1073676407 */
00535 #define VI_WARN_NULL_OBJECT                   (0x3FFF0082L) /* 3FFF0082,  1073676418 */
00536 #define VI_WARN_NSUP_ATTR_STATE               (0x3FFF0084L) /* 3FFF0084,  1073676420 */
00537 #define VI_WARN_UNKNOWN_STATUS                (0x3FFF0085L) /* 3FFF0085,  1073676421 */
00538 #define VI_WARN_NSUP_BUF                      (0x3FFF0088L) /* 3FFF0088,  1073676424 */
00539 #define VI_WARN_EXT_FUNC_NIMPL                (0x3FFF00A9L) /* 3FFF00A9,  1073676457 */
00540 
00541 #define VI_ERROR_SYSTEM_ERROR       (_VI_ERROR+0x3FFF0000L) /* BFFF0000, -1073807360 */
00542 #define VI_ERROR_INV_OBJECT         (_VI_ERROR+0x3FFF000EL) /* BFFF000E, -1073807346 */
00543 #define VI_ERROR_RSRC_LOCKED        (_VI_ERROR+0x3FFF000FL) /* BFFF000F, -1073807345 */
00544 #define VI_ERROR_INV_EXPR           (_VI_ERROR+0x3FFF0010L) /* BFFF0010, -1073807344 */
00545 #define VI_ERROR_RSRC_NFOUND        (_VI_ERROR+0x3FFF0011L) /* BFFF0011, -1073807343 */
00546 #define VI_ERROR_INV_RSRC_NAME      (_VI_ERROR+0x3FFF0012L) /* BFFF0012, -1073807342 */
00547 #define VI_ERROR_INV_ACC_MODE       (_VI_ERROR+0x3FFF0013L) /* BFFF0013, -1073807341 */
00548 #define VI_ERROR_TMO                (_VI_ERROR+0x3FFF0015L) /* BFFF0015, -1073807339 */
00549 #define VI_ERROR_CLOSING_FAILED     (_VI_ERROR+0x3FFF0016L) /* BFFF0016, -1073807338 */
00550 #define VI_ERROR_INV_DEGREE         (_VI_ERROR+0x3FFF001BL) /* BFFF001B, -1073807333 */
00551 #define VI_ERROR_INV_JOB_ID         (_VI_ERROR+0x3FFF001CL) /* BFFF001C, -1073807332 */
00552 #define VI_ERROR_NSUP_ATTR          (_VI_ERROR+0x3FFF001DL) /* BFFF001D, -1073807331 */
00553 #define VI_ERROR_NSUP_ATTR_STATE    (_VI_ERROR+0x3FFF001EL) /* BFFF001E, -1073807330 */
00554 #define VI_ERROR_ATTR_READONLY      (_VI_ERROR+0x3FFF001FL) /* BFFF001F, -1073807329 */
00555 #define VI_ERROR_INV_LOCK_TYPE      (_VI_ERROR+0x3FFF0020L) /* BFFF0020, -1073807328 */
00556 #define VI_ERROR_INV_ACCESS_KEY     (_VI_ERROR+0x3FFF0021L) /* BFFF0021, -1073807327 */
00557 #define VI_ERROR_INV_EVENT          (_VI_ERROR+0x3FFF0026L) /* BFFF0026, -1073807322 */
00558 #define VI_ERROR_INV_MECH           (_VI_ERROR+0x3FFF0027L) /* BFFF0027, -1073807321 */
00559 #define VI_ERROR_HNDLR_NINSTALLED   (_VI_ERROR+0x3FFF0028L) /* BFFF0028, -1073807320 */
00560 #define VI_ERROR_INV_HNDLR_REF      (_VI_ERROR+0x3FFF0029L) /* BFFF0029, -1073807319 */
00561 #define VI_ERROR_INV_CONTEXT        (_VI_ERROR+0x3FFF002AL) /* BFFF002A, -1073807318 */
00562 #define VI_ERROR_QUEUE_OVERFLOW     (_VI_ERROR+0x3FFF002DL) /* BFFF002D, -1073807315 */
00563 #define VI_ERROR_NENABLED           (_VI_ERROR+0x3FFF002FL) /* BFFF002F, -1073807313 */
00564 #define VI_ERROR_ABORT              (_VI_ERROR+0x3FFF0030L) /* BFFF0030, -1073807312 */
00565 #define VI_ERROR_RAW_WR_PROT_VIOL   (_VI_ERROR+0x3FFF0034L) /* BFFF0034, -1073807308 */
00566 #define VI_ERROR_RAW_RD_PROT_VIOL   (_VI_ERROR+0x3FFF0035L) /* BFFF0035, -1073807307 */
00567 #define VI_ERROR_OUTP_PROT_VIOL     (_VI_ERROR+0x3FFF0036L) /* BFFF0036, -1073807306 */
00568 #define VI_ERROR_INP_PROT_VIOL      (_VI_ERROR+0x3FFF0037L) /* BFFF0037, -1073807305 */
00569 #define VI_ERROR_BERR               (_VI_ERROR+0x3FFF0038L) /* BFFF0038, -1073807304 */
00570 #define VI_ERROR_IN_PROGRESS        (_VI_ERROR+0x3FFF0039L) /* BFFF0039, -1073807303 */
00571 #define VI_ERROR_INV_SETUP          (_VI_ERROR+0x3FFF003AL) /* BFFF003A, -1073807302 */
00572 #define VI_ERROR_QUEUE_ERROR        (_VI_ERROR+0x3FFF003BL) /* BFFF003B, -1073807301 */
00573 #define VI_ERROR_ALLOC              (_VI_ERROR+0x3FFF003CL) /* BFFF003C, -1073807300 */
00574 #define VI_ERROR_INV_MASK           (_VI_ERROR+0x3FFF003DL) /* BFFF003D, -1073807299 */
00575 #define VI_ERROR_IO                 (_VI_ERROR+0x3FFF003EL) /* BFFF003E, -1073807298 */
00576 #define VI_ERROR_INV_FMT            (_VI_ERROR+0x3FFF003FL) /* BFFF003F, -1073807297 */
00577 #define VI_ERROR_NSUP_FMT           (_VI_ERROR+0x3FFF0041L) /* BFFF0041, -1073807295 */
00578 #define VI_ERROR_LINE_IN_USE        (_VI_ERROR+0x3FFF0042L) /* BFFF0042, -1073807294 */
00579 #define VI_ERROR_NSUP_MODE          (_VI_ERROR+0x3FFF0046L) /* BFFF0046, -1073807290 */
00580 #define VI_ERROR_SRQ_NOCCURRED      (_VI_ERROR+0x3FFF004AL) /* BFFF004A, -1073807286 */
00581 #define VI_ERROR_INV_SPACE          (_VI_ERROR+0x3FFF004EL) /* BFFF004E, -1073807282 */
00582 #define VI_ERROR_INV_OFFSET         (_VI_ERROR+0x3FFF0051L) /* BFFF0051, -1073807279 */
00583 #define VI_ERROR_INV_WIDTH          (_VI_ERROR+0x3FFF0052L) /* BFFF0052, -1073807278 */
00584 #define VI_ERROR_NSUP_OFFSET        (_VI_ERROR+0x3FFF0054L) /* BFFF0054, -1073807276 */
00585 #define VI_ERROR_NSUP_VAR_WIDTH     (_VI_ERROR+0x3FFF0055L) /* BFFF0055, -1073807275 */
00586 #define VI_ERROR_WINDOW_NMAPPED     (_VI_ERROR+0x3FFF0057L) /* BFFF0057, -1073807273 */
00587 #define VI_ERROR_RESP_PENDING       (_VI_ERROR+0x3FFF0059L) /* BFFF0059, -1073807271 */
00588 #define VI_ERROR_NLISTENERS         (_VI_ERROR+0x3FFF005FL) /* BFFF005F, -1073807265 */
00589 #define VI_ERROR_NCIC               (_VI_ERROR+0x3FFF0060L) /* BFFF0060, -1073807264 */
00590 #define VI_ERROR_NSYS_CNTLR         (_VI_ERROR+0x3FFF0061L) /* BFFF0061, -1073807263 */
00591 #define VI_ERROR_NSUP_OPER          (_VI_ERROR+0x3FFF0067L) /* BFFF0067, -1073807257 */
00592 #define VI_ERROR_INTR_PENDING       (_VI_ERROR+0x3FFF0068L) /* BFFF0068, -1073807256 */
00593 #define VI_ERROR_ASRL_PARITY        (_VI_ERROR+0x3FFF006AL) /* BFFF006A, -1073807254 */
00594 #define VI_ERROR_ASRL_FRAMING       (_VI_ERROR+0x3FFF006BL) /* BFFF006B, -1073807253 */
00595 #define VI_ERROR_ASRL_OVERRUN       (_VI_ERROR+0x3FFF006CL) /* BFFF006C, -1073807252 */
00596 #define VI_ERROR_TRIG_NMAPPED       (_VI_ERROR+0x3FFF006EL) /* BFFF006E, -1073807250 */
00597 #define VI_ERROR_NSUP_ALIGN_OFFSET  (_VI_ERROR+0x3FFF0070L) /* BFFF0070, -1073807248 */
00598 #define VI_ERROR_USER_BUF           (_VI_ERROR+0x3FFF0071L) /* BFFF0071, -1073807247 */
00599 #define VI_ERROR_RSRC_BUSY          (_VI_ERROR+0x3FFF0072L) /* BFFF0072, -1073807246 */
00600 #define VI_ERROR_NSUP_WIDTH         (_VI_ERROR+0x3FFF0076L) /* BFFF0076, -1073807242 */
00601 #define VI_ERROR_INV_PARAMETER      (_VI_ERROR+0x3FFF0078L) /* BFFF0078, -1073807240 */
00602 #define VI_ERROR_INV_PROT           (_VI_ERROR+0x3FFF0079L) /* BFFF0079, -1073807239 */
00603 #define VI_ERROR_INV_SIZE           (_VI_ERROR+0x3FFF007BL) /* BFFF007B, -1073807237 */
00604 #define VI_ERROR_WINDOW_MAPPED      (_VI_ERROR+0x3FFF0080L) /* BFFF0080, -1073807232 */
00605 #define VI_ERROR_NIMPL_OPER         (_VI_ERROR+0x3FFF0081L) /* BFFF0081, -1073807231 */
00606 #define VI_ERROR_INV_LENGTH         (_VI_ERROR+0x3FFF0083L) /* BFFF0083, -1073807229 */
00607 #define VI_ERROR_INV_MODE           (_VI_ERROR+0x3FFF0091L) /* BFFF0091, -1073807215 */
00608 #define VI_ERROR_SESN_NLOCKED       (_VI_ERROR+0x3FFF009CL) /* BFFF009C, -1073807204 */
00609 #define VI_ERROR_MEM_NSHARED        (_VI_ERROR+0x3FFF009DL) /* BFFF009D, -1073807203 */
00610 #define VI_ERROR_LIBRARY_NFOUND     (_VI_ERROR+0x3FFF009EL) /* BFFF009E, -1073807202 */
00611 #define VI_ERROR_NSUP_INTR          (_VI_ERROR+0x3FFF009FL) /* BFFF009F, -1073807201 */
00612 #define VI_ERROR_INV_LINE           (_VI_ERROR+0x3FFF00A0L) /* BFFF00A0, -1073807200 */
00613 #define VI_ERROR_FILE_ACCESS        (_VI_ERROR+0x3FFF00A1L) /* BFFF00A1, -1073807199 */
00614 #define VI_ERROR_FILE_IO            (_VI_ERROR+0x3FFF00A2L) /* BFFF00A2, -1073807198 */
00615 #define VI_ERROR_NSUP_LINE          (_VI_ERROR+0x3FFF00A3L) /* BFFF00A3, -1073807197 */
00616 #define VI_ERROR_NSUP_MECH          (_VI_ERROR+0x3FFF00A4L) /* BFFF00A4, -1073807196 */
00617 #define VI_ERROR_INTF_NUM_NCONFIG   (_VI_ERROR+0x3FFF00A5L) /* BFFF00A5, -1073807195 */
00618 #define VI_ERROR_CONN_LOST          (_VI_ERROR+0x3FFF00A6L) /* BFFF00A6, -1073807194 */
00619 #define VI_ERROR_MACHINE_NAVAIL     (_VI_ERROR+0x3FFF00A7L) /* BFFF00A7, -1073807193 */
00620 #define VI_ERROR_NPERMISSION        (_VI_ERROR+0x3FFF00A8L) /* BFFF00A8, -1073807192 */
00621 
00622 /*- Other VISA Definitions --------------------------------------------------*/
00623 
00624 #define VI_VERSION_MAJOR(ver)       ((((ViVersion)ver) & 0xFFF00000UL) >> 20)
00625 #define VI_VERSION_MINOR(ver)       ((((ViVersion)ver) & 0x000FFF00UL) >>  8)
00626 #define VI_VERSION_SUBMINOR(ver)    ((((ViVersion)ver) & 0x000000FFUL)      )
00627 
00628 #define VI_FIND_BUFLEN              (256)
00629 
00630 #define VI_INTF_GPIB                (1)
00631 #define VI_INTF_VXI                 (2)
00632 #define VI_INTF_GPIB_VXI            (3)
00633 #define VI_INTF_ASRL                (4)
00634 #define VI_INTF_PXI                 (5)
00635 #define VI_INTF_TCPIP               (6)
00636 #define VI_INTF_USB                 (7)
00637 
00638 #define VI_PROT_NORMAL              (1)
00639 #define VI_PROT_FDC                 (2)
00640 #define VI_PROT_HS488               (3)
00641 #define VI_PROT_4882_STRS           (4)
00642 #define VI_PROT_USBTMC_VENDOR       (5)
00643 
00644 #define VI_FDC_NORMAL               (1)
00645 #define VI_FDC_STREAM               (2)
00646 
00647 #define VI_LOCAL_SPACE              (0)
00648 #define VI_A16_SPACE                (1)
00649 #define VI_A24_SPACE                (2)
00650 #define VI_A32_SPACE                (3)
00651 #define VI_A64_SPACE                (4)
00652 #define VI_PXI_ALLOC_SPACE          (9)
00653 #define VI_PXI_CFG_SPACE            (10)
00654 #define VI_PXI_BAR0_SPACE           (11)
00655 #define VI_PXI_BAR1_SPACE           (12)
00656 #define VI_PXI_BAR2_SPACE           (13)
00657 #define VI_PXI_BAR3_SPACE           (14)
00658 #define VI_PXI_BAR4_SPACE           (15)
00659 #define VI_PXI_BAR5_SPACE           (16)
00660 #define VI_OPAQUE_SPACE             (0xFFFF)
00661 
00662 #define VI_UNKNOWN_LA               (-1)
00663 #define VI_UNKNOWN_SLOT             (-1)
00664 #define VI_UNKNOWN_LEVEL            (-1)
00665 #define VI_UNKNOWN_CHASSIS          (-1)
00666 
00667 #define VI_QUEUE                    (1)
00668 #define VI_HNDLR                    (2)
00669 #define VI_SUSPEND_HNDLR            (4)
00670 #define VI_ALL_MECH                 (0xFFFF)
00671 
00672 #define VI_ANY_HNDLR                (0)
00673 
00674 #define VI_TRIG_ALL                 (-2)
00675 #define VI_TRIG_SW                  (-1)
00676 #define VI_TRIG_TTL0                (0)
00677 #define VI_TRIG_TTL1                (1)
00678 #define VI_TRIG_TTL2                (2)
00679 #define VI_TRIG_TTL3                (3)
00680 #define VI_TRIG_TTL4                (4)
00681 #define VI_TRIG_TTL5                (5)
00682 #define VI_TRIG_TTL6                (6)
00683 #define VI_TRIG_TTL7                (7)
00684 #define VI_TRIG_ECL0                (8)
00685 #define VI_TRIG_ECL1                (9)
00686 #define VI_TRIG_PANEL_IN            (27)
00687 #define VI_TRIG_PANEL_OUT           (28)
00688 
00689 #define VI_TRIG_PROT_DEFAULT        (0)
00690 #define VI_TRIG_PROT_ON             (1)
00691 #define VI_TRIG_PROT_OFF            (2)
00692 #define VI_TRIG_PROT_SYNC           (5)
00693 #define VI_TRIG_PROT_RESERVE        (6)
00694 #define VI_TRIG_PROT_UNRESERVE      (7)
00695 
00696 #define VI_READ_BUF                 (1)
00697 #define VI_WRITE_BUF                (2)
00698 #define VI_READ_BUF_DISCARD         (4)
00699 #define VI_WRITE_BUF_DISCARD        (8)
00700 #define VI_IO_IN_BUF                (16)
00701 #define VI_IO_OUT_BUF               (32)
00702 #define VI_IO_IN_BUF_DISCARD        (64)
00703 #define VI_IO_OUT_BUF_DISCARD       (128)
00704 
00705 #define VI_FLUSH_ON_ACCESS          (1)
00706 #define VI_FLUSH_WHEN_FULL          (2)
00707 #define VI_FLUSH_DISABLE            (3)
00708 
00709 #define VI_NMAPPED                  (1)
00710 #define VI_USE_OPERS                (2)
00711 #define VI_DEREF_ADDR               (3)
00712 #define VI_DEREF_ADDR_BYTE_SWAP     (4)
00713 
00714 #define VI_TMO_IMMEDIATE            (0L)
00715 #define VI_TMO_INFINITE             (0xFFFFFFFFUL)
00716 
00717 #define VI_NO_LOCK                  (0)
00718 #define VI_EXCLUSIVE_LOCK           (1)
00719 #define VI_SHARED_LOCK              (2)
00720 #define VI_LOAD_CONFIG              (4)
00721 
00722 #define VI_NO_SEC_ADDR              (0xFFFF)
00723 
00724 #define VI_ASRL_PAR_NONE            (0)
00725 #define VI_ASRL_PAR_ODD             (1)
00726 #define VI_ASRL_PAR_EVEN            (2)
00727 #define VI_ASRL_PAR_MARK            (3)
00728 #define VI_ASRL_PAR_SPACE           (4)
00729 
00730 #define VI_ASRL_STOP_ONE            (10)
00731 #define VI_ASRL_STOP_ONE5           (15)
00732 #define VI_ASRL_STOP_TWO            (20)
00733 
00734 #define VI_ASRL_FLOW_NONE           (0)
00735 #define VI_ASRL_FLOW_XON_XOFF       (1)
00736 #define VI_ASRL_FLOW_RTS_CTS        (2)
00737 #define VI_ASRL_FLOW_DTR_DSR        (4)
00738 
00739 #define VI_ASRL_END_NONE            (0)
00740 #define VI_ASRL_END_LAST_BIT        (1)
00741 #define VI_ASRL_END_TERMCHAR        (2)
00742 #define VI_ASRL_END_BREAK           (3)
00743 
00744 #define VI_STATE_ASSERTED           (1)
00745 #define VI_STATE_UNASSERTED         (0)
00746 #define VI_STATE_UNKNOWN            (-1)
00747 
00748 #define VI_BIG_ENDIAN               (0)
00749 #define VI_LITTLE_ENDIAN            (1)
00750 
00751 #define VI_DATA_PRIV                (0)
00752 #define VI_DATA_NPRIV               (1)
00753 #define VI_PROG_PRIV                (2)
00754 #define VI_PROG_NPRIV               (3)
00755 #define VI_BLCK_PRIV                (4)
00756 #define VI_BLCK_NPRIV               (5)
00757 #define VI_D64_PRIV                 (6)
00758 #define VI_D64_NPRIV                (7)
00759 
00760 #define VI_WIDTH_8                  (1)
00761 #define VI_WIDTH_16                 (2)
00762 #define VI_WIDTH_32                 (4)
00763 #define VI_WIDTH_64                 (8)
00764 
00765 #define VI_GPIB_REN_DEASSERT        (0)
00766 #define VI_GPIB_REN_ASSERT          (1)
00767 #define VI_GPIB_REN_DEASSERT_GTL    (2)
00768 #define VI_GPIB_REN_ASSERT_ADDRESS  (3)
00769 #define VI_GPIB_REN_ASSERT_LLO      (4)
00770 #define VI_GPIB_REN_ASSERT_ADDRESS_LLO (5)
00771 #define VI_GPIB_REN_ADDRESS_GTL     (6)
00772 
00773 #define VI_GPIB_ATN_DEASSERT        (0)
00774 #define VI_GPIB_ATN_ASSERT          (1)
00775 #define VI_GPIB_ATN_DEASSERT_HANDSHAKE (2)
00776 #define VI_GPIB_ATN_ASSERT_IMMEDIATE (3)
00777 
00778 #define VI_GPIB_HS488_DISABLED      (0)
00779 #define VI_GPIB_HS488_NIMPL         (-1)
00780 
00781 #define VI_GPIB_UNADDRESSED         (0)
00782 #define VI_GPIB_TALKER              (1)
00783 #define VI_GPIB_LISTENER            (2)
00784 
00785 #define VI_VXI_CMD16                (0x0200)
00786 #define VI_VXI_CMD16_RESP16         (0x0202)
00787 #define VI_VXI_RESP16               (0x0002)
00788 #define VI_VXI_CMD32                (0x0400)
00789 #define VI_VXI_CMD32_RESP16         (0x0402)
00790 #define VI_VXI_CMD32_RESP32         (0x0404)
00791 #define VI_VXI_RESP32               (0x0004)
00792 
00793 #define VI_ASSERT_SIGNAL            (-1)
00794 #define VI_ASSERT_USE_ASSIGNED      (0)
00795 #define VI_ASSERT_IRQ1              (1)
00796 #define VI_ASSERT_IRQ2              (2)
00797 #define VI_ASSERT_IRQ3              (3)
00798 #define VI_ASSERT_IRQ4              (4)
00799 #define VI_ASSERT_IRQ5              (5)
00800 #define VI_ASSERT_IRQ6              (6)
00801 #define VI_ASSERT_IRQ7              (7)
00802 
00803 #define VI_UTIL_ASSERT_SYSRESET     (1)
00804 #define VI_UTIL_ASSERT_SYSFAIL      (2)
00805 #define VI_UTIL_DEASSERT_SYSFAIL    (3)
00806 
00807 #define VI_VXI_CLASS_MEMORY         (0)
00808 #define VI_VXI_CLASS_EXTENDED       (1)
00809 #define VI_VXI_CLASS_MESSAGE        (2)
00810 #define VI_VXI_CLASS_REGISTER       (3)
00811 #define VI_VXI_CLASS_OTHER          (4)
00812 
00813 #define VI_PXI_ADDR_NONE            (0)
00814 #define VI_PXI_ADDR_MEM             (1)
00815 #define VI_PXI_ADDR_IO              (2)
00816 #define VI_PXI_ADDR_CFG             (3)
00817 
00818 #define VI_TRIG_UNKNOWN             (-1)
00819 
00820 #define VI_PXI_LBUS_UNKNOWN         (-1)
00821 #define VI_PXI_LBUS_NONE            (0)
00822 #define VI_PXI_LBUS_STAR_TRIG_BUS_0 (1000)
00823 #define VI_PXI_LBUS_STAR_TRIG_BUS_1 (1001)
00824 #define VI_PXI_LBUS_STAR_TRIG_BUS_2 (1002)
00825 #define VI_PXI_LBUS_STAR_TRIG_BUS_3 (1003)
00826 #define VI_PXI_LBUS_STAR_TRIG_BUS_4 (1004)
00827 #define VI_PXI_LBUS_STAR_TRIG_BUS_5 (1005)
00828 #define VI_PXI_LBUS_STAR_TRIG_BUS_6 (1006)
00829 #define VI_PXI_LBUS_STAR_TRIG_BUS_7 (1007)
00830 #define VI_PXI_LBUS_STAR_TRIG_BUS_8 (1008)
00831 #define VI_PXI_LBUS_STAR_TRIG_BUS_9 (1009)
00832 #define VI_PXI_STAR_TRIG_CONTROLLER (1413)
00833 
00834 /*- Backward Compatibility Macros -------------------------------------------*/
00835 
00836 #define viGetDefaultRM(vi)          viOpenDefaultRM(vi)
00837 #define VI_ERROR_INV_SESSION        (VI_ERROR_INV_OBJECT)
00838 #define VI_INFINITE                 (VI_TMO_INFINITE)
00839 #define VI_NORMAL                   (VI_PROT_NORMAL)
00840 #define VI_FDC                      (VI_PROT_FDC)
00841 #define VI_HS488                    (VI_PROT_HS488)
00842 #define VI_ASRL488                  (VI_PROT_4882_STRS)
00843 #define VI_ASRL_IN_BUF              (VI_IO_IN_BUF)
00844 #define VI_ASRL_OUT_BUF             (VI_IO_OUT_BUF)
00845 #define VI_ASRL_IN_BUF_DISCARD      (VI_IO_IN_BUF_DISCARD)
00846 #define VI_ASRL_OUT_BUF_DISCARD     (VI_IO_OUT_BUF_DISCARD)
00847 
00848 /*- National Instruments ----------------------------------------------------*/
00849 
00850 #define VI_INTF_RIO                 (8)
00851 #define VI_INTF_FIREWIRE            (9) 
00852 
00853 #define VI_ATTR_SYNC_MXI_ALLOW_EN   (0x3FFF0161UL) /* ViBoolean, read/write */
00854 
00855 /* This is for VXI SERVANT resources */
00856 
00857 #define VI_EVENT_VXI_DEV_CMD        (0xBFFF200FUL)
00858 #define VI_ATTR_VXI_DEV_CMD_TYPE    (0x3FFF4037UL) /* ViInt16, read-only */
00859 #define VI_ATTR_VXI_DEV_CMD_VALUE   (0x3FFF4038UL) /* ViUInt32, read-only */
00860 
00861 #define VI_VXI_DEV_CMD_TYPE_16      (16)
00862 #define VI_VXI_DEV_CMD_TYPE_32      (32)
00863 
00864 ViStatus _VI_FUNC viVxiServantResponse(ViSession vi, ViInt16 mode, ViUInt32 resp);
00865 /* mode values include VI_VXI_RESP16, VI_VXI_RESP32, and the next 2 values */
00866 #define VI_VXI_RESP_NONE            (0)
00867 #define VI_VXI_RESP_PROT_ERROR      (-1)
00868 
00869 /* This allows extended Serial support on Win32 and on NI ENET Serial products */
00870 
00871 #define VI_ATTR_ASRL_DISCARD_NULL   (0x3FFF00B0UL)
00872 #define VI_ATTR_ASRL_CONNECTED      (0x3FFF01BBUL)
00873 #define VI_ATTR_ASRL_BREAK_STATE    (0x3FFF01BCUL)
00874 #define VI_ATTR_ASRL_BREAK_LEN      (0x3FFF01BDUL)
00875 #define VI_ATTR_ASRL_ALLOW_TRANSMIT (0x3FFF01BEUL)
00876 #define VI_ATTR_ASRL_WIRE_MODE      (0x3FFF01BFUL)
00877 
00878 #define VI_ASRL_WIRE_485_4          (0)
00879 #define VI_ASRL_WIRE_485_2_DTR_ECHO (1)
00880 #define VI_ASRL_WIRE_485_2_DTR_CTRL (2)
00881 #define VI_ASRL_WIRE_485_2_AUTO     (3)
00882 #define VI_ASRL_WIRE_232_DTE        (128)
00883 #define VI_ASRL_WIRE_232_DCE        (129)
00884 #define VI_ASRL_WIRE_232_AUTO       (130)
00885 
00886 #define VI_EVENT_ASRL_BREAK         (0x3FFF2023UL)
00887 #define VI_EVENT_ASRL_CTS           (0x3FFF2029UL)
00888 #define VI_EVENT_ASRL_DSR           (0x3FFF202AUL)
00889 #define VI_EVENT_ASRL_DCD           (0x3FFF202CUL)
00890 #define VI_EVENT_ASRL_RI            (0x3FFF202EUL)
00891 #define VI_EVENT_ASRL_CHAR          (0x3FFF2035UL)
00892 #define VI_EVENT_ASRL_TERMCHAR      (0x3FFF2024UL)
00893 
00894 /* This is for fast viPeek/viPoke macros */
00895 
00896 #if defined(NIVISA_PEEKPOKE)
00897 
00898 #if defined(NIVISA_PEEKPOKE_SUPP)
00899 #undef NIVISA_PEEKPOKE_SUPP
00900 #endif
00901 
00902 #if (defined(WIN32) || defined(_WIN32) || defined(__WIN32__) || defined(__NT__)) && !defined(_NI_mswin16_)
00903 /* This macro is supported for all Win32 compilers, including CVI. */
00904 #define NIVISA_PEEKPOKE_SUPP
00905 #elif (defined(_WINDOWS) || defined(_Windows)) && !defined(_CVI_) && !defined(_NI_mswin16_)
00906 /* This macro is supported for Borland and Microsoft compilers on Win16, but not CVI. */
00907 #define NIVISA_PEEKPOKE_SUPP
00908 #elif defined(_CVI_) && defined(_NI_sparc_)
00909 /* This macro is supported for Solaris 1 and 2, from CVI only. */
00910 #define NIVISA_PEEKPOKE_SUPP
00911 #else
00912 /* This macro is not supported on other platforms. */
00913 #endif
00914 
00915 #if defined(NIVISA_PEEKPOKE_SUPP)
00916 
00917 extern ViBoolean NI_viImplVISA1;
00918 ViStatus _VI_FUNC NI_viOpenDefaultRM (ViPSession vi);
00919 #define viOpenDefaultRM(vi) NI_viOpenDefaultRM(vi)
00920 
00921 #define viPeek8(vi,addr,val)                                                \
00922    {                                                                        \
00923       if ((NI_viImplVISA1) && (*((ViPUInt32)(vi))))                         \
00924       {                                                                     \
00925          do (*((ViPUInt8)(val)) = *((volatile ViUInt8 _VI_PTR)(addr)));     \
00926          while (**((volatile ViUInt8 _VI_PTR _VI_PTR)(vi)) & 0x10);         \
00927       }                                                                     \
00928       else                                                                  \
00929       {                                                                     \
00930          (viPeek8)((vi),(addr),(val));                                      \
00931       }                                                                     \
00932    }
00933 
00934 #define viPoke8(vi,addr,val)                                                \
00935    {                                                                        \
00936       if ((NI_viImplVISA1) && (*((ViPUInt32)(vi))))                         \
00937       {                                                                     \
00938          do (*((volatile ViUInt8 _VI_PTR)(addr)) = ((ViUInt8)(val)));       \
00939          while (**((volatile ViUInt8 _VI_PTR _VI_PTR)(vi)) & 0x10);         \
00940       }                                                                     \
00941       else                                                                  \
00942       {                                                                     \
00943          (viPoke8)((vi),(addr),(val));                                      \
00944       }                                                                     \
00945    }
00946 
00947 #define viPeek16(vi,addr,val)                                               \
00948    {                                                                        \
00949       if ((NI_viImplVISA1) && (*((ViPUInt32)(vi))))                         \
00950       {                                                                     \
00951          do (*((ViPUInt16)(val)) = *((volatile ViUInt16 _VI_PTR)(addr)));   \
00952          while (**((volatile ViUInt8 _VI_PTR _VI_PTR)(vi)) & 0x10);         \
00953       }                                                                     \
00954       else                                                                  \
00955       {                                                                     \
00956          (viPeek16)((vi),(addr),(val));                                     \
00957       }                                                                     \
00958    }
00959 
00960 #define viPoke16(vi,addr,val)                                               \
00961    {                                                                        \
00962       if ((NI_viImplVISA1) && (*((ViPUInt32)(vi))))                         \
00963       {                                                                     \
00964          do (*((volatile ViUInt16 _VI_PTR)(addr)) = ((ViUInt16)(val)));     \
00965          while (**((volatile ViUInt8 _VI_PTR _VI_PTR)(vi)) & 0x10);         \
00966       }                                                                     \
00967       else                                                                  \
00968       {                                                                     \
00969          (viPoke16)((vi),(addr),(val));                                     \
00970       }                                                                     \
00971    }
00972 
00973 #define viPeek32(vi,addr,val)                                               \
00974    {                                                                        \
00975       if ((NI_viImplVISA1) && (*((ViPUInt32)(vi))))                         \
00976       {                                                                     \
00977          do (*((ViPUInt32)(val)) = *((volatile ViUInt32 _VI_PTR)(addr)));   \
00978          while (**((volatile ViUInt8 _VI_PTR _VI_PTR)(vi)) & 0x10);         \
00979       }                                                                     \
00980       else                                                                  \
00981       {                                                                     \
00982          (viPeek32)((vi),(addr),(val));                                     \
00983       }                                                                     \
00984    }
00985 
00986 #define viPoke32(vi,addr,val)                                               \
00987    {                                                                        \
00988       if ((NI_viImplVISA1) && (*((ViPUInt32)(vi))))                         \
00989       {                                                                     \
00990          do (*((volatile ViUInt32 _VI_PTR)(addr)) = ((ViUInt32)(val)));     \
00991          while (**((volatile ViUInt8 _VI_PTR _VI_PTR)(vi)) & 0x10);         \
00992       }                                                                     \
00993       else                                                                  \
00994       {                                                                     \
00995          (viPoke32)((vi),(addr),(val));                                     \
00996       }                                                                     \
00997    }
00998 
00999 #endif
01000 
01001 #endif
01002 
01003 #if defined(NIVISA_PXI) || defined(PXISAVISA_PXI)
01004 
01005 #if 0
01006 /* The following 2 attributes were incorrectly implemented in earlier
01007    versions of NI-VISA.  You should now query VI_ATTR_MANF_ID or
01008    VI_ATTR_MODEL_CODE.  Those attributes contain sub-vendor information
01009    when it exists.  To get both the actual primary and subvendor codes
01010    from the device, you should call viIn16 using VI_PXI_CFG_SPACE. */
01011 #define VI_ATTR_PXI_SUB_MANF_ID     (0x3FFF0203UL)
01012 #define VI_ATTR_PXI_SUB_MODEL_CODE  (0x3FFF0204UL)
01013 #endif
01014 
01015 #define VI_ATTR_PXI_SRC_TRIG_BUS    (0x3FFF020DUL)
01016 #define VI_ATTR_PXI_DEST_TRIG_BUS   (0x3FFF020EUL)
01017 
01018 #define VI_ATTR_PXI_RECV_INTR_SEQ   (0x3FFF4240UL)
01019 #define VI_ATTR_PXI_RECV_INTR_DATA  (0x3FFF4241UL)
01020 
01021 #endif
01022 
01023 #if defined(NIVISA_USB)
01024 
01025 #define VI_ATTR_USB_BULK_OUT_PIPE   (0x3FFF01A2UL)
01026 #define VI_ATTR_USB_BULK_IN_PIPE    (0x3FFF01A3UL)
01027 #define VI_ATTR_USB_INTR_IN_PIPE    (0x3FFF01A4UL)
01028 #define VI_ATTR_USB_CLASS           (0x3FFF01A5UL)
01029 #define VI_ATTR_USB_SUBCLASS        (0x3FFF01A6UL)
01030 #define VI_ATTR_USB_ALT_SETTING     (0x3FFF01A8UL)
01031 #define VI_ATTR_USB_END_IN          (0x3FFF01A9UL)
01032 #define VI_ATTR_USB_NUM_INTFCS      (0x3FFF01AAUL)
01033 #define VI_ATTR_USB_NUM_PIPES       (0x3FFF01ABUL)
01034 #define VI_ATTR_USB_BULK_OUT_STATUS (0x3FFF01ACUL)
01035 #define VI_ATTR_USB_BULK_IN_STATUS  (0x3FFF01ADUL)
01036 #define VI_ATTR_USB_INTR_IN_STATUS  (0x3FFF01AEUL)
01037 #define VI_ATTR_USB_CTRL_PIPE       (0x3FFF01B0UL)
01038 
01039 #define VI_USB_PIPE_STATE_UNKNOWN   (-1)
01040 #define VI_USB_PIPE_READY           (0)
01041 #define VI_USB_PIPE_STALLED         (1)
01042 
01043 #define VI_USB_END_NONE             (0)
01044 #define VI_USB_END_SHORT            (4)
01045 #define VI_USB_END_SHORT_OR_COUNT   (5)
01046 
01047 #endif
01048 
01049 #define VI_ATTR_FIREWIRE_DEST_UPPER_OFFSET (0x3FFF01F0UL)
01050 #define VI_ATTR_FIREWIRE_SRC_UPPER_OFFSET  (0x3FFF01F1UL)
01051 #define VI_ATTR_FIREWIRE_WIN_UPPER_OFFSET  (0x3FFF01F2UL)
01052 #define VI_ATTR_FIREWIRE_VENDOR_ID         (0x3FFF01F3UL)
01053 #define VI_ATTR_FIREWIRE_LOWER_CHIP_ID     (0x3FFF01F4UL)
01054 #define VI_ATTR_FIREWIRE_UPPER_CHIP_ID     (0x3FFF01F5UL)
01055 
01056 #define VI_FIREWIRE_DFLT_SPACE           (5)
01057 
01058 #if defined(__cplusplus) || defined(__cplusplus__)
01059    }
01060 #endif
01061 
01062 #endif
01063 
01064 /*- The End -----------------------------------------------------------------*/
 All Classes Functions Variables