home *** CD-ROM | disk | FTP | other *** search
/ Chip 1997 September / CHIP_CD_1997_09_PL.iso / software / testsoft / labwind / demo.6 / main / include / visa.h < prev    next >
Encoding:
C/C++ Source or Header  |  1996-08-02  |  21.1 KB  |  404 lines

  1. /*---------------------------------------------------------------------------*/
  2. /* Distributed by VXIplug&play Systems Alliance                              */
  3. /*                                                                           */
  4. /* Do not modify the contents of this file.                                  */
  5. /*---------------------------------------------------------------------------*/
  6. /*                                                                           */
  7. /* Title   : VISA.H                                                          */
  8. /* Date    : 01-01-96                                                        */
  9. /* Purpose : Include file for the VISA Library 1.0 specification             */
  10. /*                                                                           */
  11. /*---------------------------------------------------------------------------*/
  12.  
  13. #ifndef __VISA_HEADER__
  14. #define __VISA_HEADER__
  15.  
  16. #include <stdarg.h>
  17. #include "visatype.h"
  18.  
  19. #define VI_SPEC_VERSION     (0x00100000L)
  20.  
  21. #if defined(__cplusplus) || defined(__cplusplus__)
  22.    extern "C" {
  23. #endif
  24.  
  25. #if defined(_CVI_)
  26. #pragma EnableLibraryRuntimeChecking
  27. #endif
  28.  
  29. /*- VISA Types --------------------------------------------------------------*/
  30.  
  31. typedef ViObject             ViEvent;
  32. typedef ViEvent      _VI_PTR ViPEvent;
  33. typedef ViObject             ViFindList;
  34. typedef ViFindList   _VI_PTR ViPFindList;
  35.  
  36. typedef ViUInt32             ViEventType;
  37. typedef ViEventType  _VI_PTR ViPEventType;
  38. typedef ViUInt32             ViAttrState;
  39. typedef void         _VI_PTR ViPAttrState;
  40.  
  41. typedef ViString             ViKeyId;
  42. typedef ViPString            ViPKeyId;
  43. typedef ViUInt32             ViJobId;
  44. typedef ViJobId      _VI_PTR ViPJobId;
  45. typedef ViUInt32             ViAccessMode;
  46. typedef ViUInt32             ViBusAddress;
  47. typedef ViBusAddress _VI_PTR ViPBusAddress;
  48. typedef ViUInt32             ViBusSize;
  49. typedef ViUInt32             ViAttr;
  50. typedef ViUInt32             ViEventFilter;
  51.  
  52. typedef va_list              ViVAList;
  53.  
  54. typedef ViStatus (_VI_FUNCH _VI_PTR ViHndlr)
  55.    (ViSession vi, ViEventType eventType, ViEvent event, ViAddr userHandle);
  56.  
  57. /*- Resource Manager Functions and Operations -------------------------------*/
  58.  
  59. ViStatus _VI_FUNC  viOpenDefaultRM (ViPSession vi);
  60. #define viGetDefaultRM(vi) viOpenDefaultRM(vi)
  61.  
  62. ViStatus _VI_FUNC  viFindRsrc      (ViSession sesn, ViString expr, ViPFindList vi,
  63.                                     ViPUInt32 retCnt, ViPRsrc desc);
  64. ViStatus _VI_FUNC  viFindNext      (ViFindList vi, ViPRsrc desc);
  65.  
  66. ViStatus _VI_FUNC  viOpen          (ViSession sesn, ViRsrc name, ViAccessMode mode,
  67.                                     ViUInt32 timeout, ViPSession vi);
  68.  
  69. /*- Resource Template Operations --------------------------------------------*/
  70.  
  71. ViStatus _VI_FUNC  viClose         (ViObject vi);
  72. ViStatus _VI_FUNC  viSetAttribute  (ViObject vi, ViAttr attrName, ViAttrState attrValue);
  73. ViStatus _VI_FUNC  viGetAttribute  (ViObject vi, ViAttr attrName, ViPAttrState attrValue);
  74. ViStatus _VI_FUNC  viStatusDesc    (ViObject vi, ViStatus status, ViPString desc);
  75. ViStatus _VI_FUNC  viTerminate     (ViObject vi, ViUInt16 degree, ViJobId jobId);
  76.  
  77. ViStatus _VI_FUNC  viLock          (ViSession vi, ViAccessMode lockType, ViUInt32 timeout,
  78.                                     ViKeyId requestedKey, ViPKeyId accessKey);
  79. ViStatus _VI_FUNC  viUnlock        (ViSession vi);
  80. ViStatus _VI_FUNC  viEnableEvent   (ViSession vi, ViEventType eventType, ViUInt16 mechanism,
  81.                                     ViEventFilter context);
  82. ViStatus _VI_FUNC  viDisableEvent  (ViSession vi, ViEventType eventType, ViUInt16 mechanism);
  83. ViStatus _VI_FUNC  viDiscardEvents (ViSession vi, ViEventType eventType, ViUInt16 mechanism);
  84. ViStatus _VI_FUNC  viWaitOnEvent   (ViSession vi, ViEventType inEventType, ViUInt32 timeout,
  85.                                     ViPEventType outEventType, ViPEvent outContext);
  86. ViStatus _VI_FUNC  viInstallHandler(ViSession vi, ViEventType eventType, ViHndlr handler,
  87.                                     ViAddr userHandle);
  88. ViStatus _VI_FUNC  viUninstallHandler(ViSession vi, ViEventType eventType, ViHndlr handler,
  89.                                       ViAddr userHandle);
  90.  
  91. /*- Basic I/O Operations ----------------------------------------------------*/
  92.  
  93. ViStatus _VI_FUNC  viRead          (ViSession vi, ViPBuf buf, ViUInt32 cnt, ViPUInt32 retCnt);
  94. ViStatus _VI_FUNC  viReadAsync     (ViSession vi, ViPBuf buf, ViUInt32 cnt, ViPJobId  jobId);
  95. ViStatus _VI_FUNC  viWrite         (ViSession vi, ViBuf  buf, ViUInt32 cnt, ViPUInt32 retCnt);
  96. ViStatus _VI_FUNC  viWriteAsync    (ViSession vi, ViBuf  buf, ViUInt32 cnt, ViPJobId  jobId);
  97. ViStatus _VI_FUNC  viAssertTrigger (ViSession vi, ViUInt16 protocol);
  98. ViStatus _VI_FUNC  viReadSTB       (ViSession vi, ViPUInt16 status);
  99. ViStatus _VI_FUNC  viClear         (ViSession vi);
  100.  
  101. /*- Formatted I/O Operations ------------------------------------------------*/
  102.  
  103. ViStatus _VI_FUNC  viSetBuf        (ViSession vi, ViUInt16 mask, ViUInt32 size);
  104. ViStatus _VI_FUNC  viFlush         (ViSession vi, ViUInt16 mask);
  105. ViStatus _VI_FUNCC viPrintf        (ViSession vi, ViString writeFmt, ...);
  106. ViStatus _VI_FUNC  viVPrintf       (ViSession vi, ViString writeFmt, ViVAList params);
  107. ViStatus _VI_FUNCC viScanf         (ViSession vi, ViString readFmt, ...);
  108. ViStatus _VI_FUNC  viVScanf        (ViSession vi, ViString readFmt, ViVAList params);
  109. ViStatus _VI_FUNCC viQueryf        (ViSession vi, ViString writeFmt, ViString readFmt, ...);
  110. ViStatus _VI_FUNC  viVQueryf       (ViSession vi, ViString writeFmt, ViString readFmt, 
  111.                                     ViVAList params);
  112.  
  113. /*- Memory I/O Operations ---------------------------------------------------*/
  114.  
  115. ViStatus _VI_FUNC  viIn8           (ViSession vi, ViUInt16 space,
  116.                                     ViBusAddress offset, ViPUInt8  val8);
  117. ViStatus _VI_FUNC  viOut8          (ViSession vi, ViUInt16 space,
  118.                                     ViBusAddress offset, ViUInt8   val8);
  119. ViStatus _VI_FUNC  viIn16          (ViSession vi, ViUInt16 space,
  120.                                     ViBusAddress offset, ViPUInt16 val16);
  121. ViStatus _VI_FUNC  viOut16         (ViSession vi, ViUInt16 space,
  122.                                     ViBusAddress offset, ViUInt16  val16);
  123. ViStatus _VI_FUNC  viIn32          (ViSession vi, ViUInt16 space,
  124.                                     ViBusAddress offset, ViPUInt32 val32);
  125. ViStatus _VI_FUNC  viOut32         (ViSession vi, ViUInt16 space,
  126.                                     ViBusAddress offset, ViUInt32  val32);
  127.  
  128. ViStatus _VI_FUNC  viMoveIn8       (ViSession vi, ViUInt16 space, ViBusAddress offset,
  129.                                     ViBusSize length, ViAUInt8  buf8);
  130. ViStatus _VI_FUNC  viMoveOut8      (ViSession vi, ViUInt16 space, ViBusAddress offset,
  131.                                     ViBusSize length, ViAUInt8  buf8);
  132. ViStatus _VI_FUNC  viMoveIn16      (ViSession vi, ViUInt16 space, ViBusAddress offset,
  133.                                     ViBusSize length, ViAUInt16 buf16);
  134. ViStatus _VI_FUNC  viMoveOut16     (ViSession vi, ViUInt16 space, ViBusAddress offset,
  135.                                     ViBusSize length, ViAUInt16 buf16);
  136. ViStatus _VI_FUNC  viMoveIn32      (ViSession vi, ViUInt16 space, ViBusAddress offset,
  137.                                     ViBusSize length, ViAUInt32 buf32);
  138. ViStatus _VI_FUNC  viMoveOut32     (ViSession vi, ViUInt16 space, ViBusAddress offset,
  139.                                     ViBusSize length, ViAUInt32 buf32);
  140.  
  141. ViStatus _VI_FUNC  viMapAddress    (ViSession vi, ViUInt16 mapSpace, ViBusAddress mapOffset,
  142.                                     ViBusSize mapSize, ViBoolean access,
  143.                                     ViAddr suggested, ViPAddr address);
  144. ViStatus _VI_FUNC  viUnmapAddress  (ViSession vi);
  145.  
  146. void     _VI_FUNC  viPeek8         (ViSession vi, ViAddr address, ViPUInt8  val8);
  147. void     _VI_FUNC  viPoke8         (ViSession vi, ViAddr address, ViUInt8   val8);
  148. void     _VI_FUNC  viPeek16        (ViSession vi, ViAddr address, ViPUInt16 val16);
  149. void     _VI_FUNC  viPoke16        (ViSession vi, ViAddr address, ViUInt16  val16);
  150. void     _VI_FUNC  viPeek32        (ViSession vi, ViAddr address, ViPUInt32 val32);
  151. void     _VI_FUNC  viPoke32        (ViSession vi, ViAddr address, ViUInt32  val32);
  152.  
  153. /*- Shared Memory Operations ------------------------------------------------*/
  154.  
  155. ViStatus _VI_FUNC  viMemAlloc      (ViSession vi, ViBusSize size, ViPBusAddress offset);
  156. ViStatus _VI_FUNC  viMemFree       (ViSession vi, ViBusAddress offset);
  157.  
  158. /*- Attributes --------------------------------------------------------------*/
  159.  
  160. #define VI_ATTR_RSRC_NAME           (0xBFFF0002L)
  161. #define VI_ATTR_RSRC_IMPL_VERSION   (0x3FFF0003L)
  162. #define VI_ATTR_RSRC_LOCK_STATE     (0x3FFF0004L)
  163. #define VI_ATTR_MAX_QUEUE_LENGTH    (0x3FFF0005L)
  164. #define VI_ATTR_USER_DATA           (0x3FFF0007L)
  165. #define VI_ATTR_FDC_CHNL            (0x3FFF000DL)
  166. #define VI_ATTR_FDC_MODE            (0x3FFF000FL)
  167. #define VI_ATTR_FDC_GEN_SIGNAL_EN   (0x3FFF0011L)
  168. #define VI_ATTR_FDC_USE_PAIR        (0x3FFF0013L)
  169. #define VI_ATTR_SEND_END_EN         (0x3FFF0016L)
  170. #define VI_ATTR_TERMCHAR            (0x3FFF0018L)
  171. #define VI_ATTR_TMO_VALUE           (0x3FFF001AL)
  172. #define VI_ATTR_IO_PROT             (0x3FFF001CL)
  173. #define VI_ATTR_ASRL_BAUD           (0x3FFF0021L)
  174. #define VI_ATTR_ASRL_DATA_BITS      (0x3FFF0022L)
  175. #define VI_ATTR_ASRL_PARITY         (0x3FFF0023L)
  176. #define VI_ATTR_ASRL_STOP_BITS      (0x3FFF0024L)
  177. #define VI_ATTR_ASRL_FLOW_CNTRL     (0x3FFF0025L)
  178. #define VI_ATTR_RD_BUF_OPER_MODE    (0x3FFF002AL)
  179. #define VI_ATTR_WR_BUF_OPER_MODE    (0x3FFF002DL)
  180. #define VI_ATTR_SUPPRESS_END_EN     (0x3FFF0036L)
  181. #define VI_ATTR_TERMCHAR_EN         (0x3FFF0038L)
  182. #define VI_ATTR_SRC_INCREMENT       (0x3FFF0040L)
  183. #define VI_ATTR_DEST_INCREMENT      (0x3FFF0041L)
  184. #define VI_ATTR_CMDR_LA             (0x3FFF006BL)
  185. #define VI_ATTR_MAINFRAME_LA        (0x3FFF0070L)
  186. #define VI_ATTR_WIN_BASE_ADDR       (0x3FFF0098L)
  187. #define VI_ATTR_WIN_SIZE            (0x3FFF009AL)
  188. #define VI_ATTR_ASRL_AVAIL_NUM      (0x3FFF00ACL)
  189. #define VI_ATTR_MEM_BASE            (0x3FFF00ADL)
  190. #define VI_ATTR_ASRL_END_IN         (0x3FFF00B3L)
  191. #define VI_ATTR_ASRL_END_OUT        (0x3FFF00B4L)
  192. #define VI_ATTR_WIN_ACCESS          (0x3FFF00C3L)
  193. #define VI_ATTR_RM_SESSION          (0x3FFF00C4L)
  194. #define VI_ATTR_VXI_LA              (0x3FFF00D5L)
  195. #define VI_ATTR_MANF_ID             (0x3FFF00D9L)
  196. #define VI_ATTR_MEM_SIZE            (0x3FFF00DDL)
  197. #define VI_ATTR_MEM_SPACE           (0x3FFF00DEL)
  198. #define VI_ATTR_MODEL_CODE          (0x3FFF00DFL)
  199. #define VI_ATTR_SLOT                (0x3FFF00E8L)
  200. #define VI_ATTR_IMMEDIATE_SERV      (0x3FFF0100L)
  201. #define VI_ATTR_INTF_PARENT_NUM     (0x3FFF0101L)
  202. #define VI_ATTR_RSRC_SPEC_VERSION   (0x3FFF0170L)
  203. #define VI_ATTR_INTF_TYPE           (0x3FFF0171L)
  204. #define VI_ATTR_GPIB_PRIMARY_ADDR   (0x3FFF0172L)
  205. #define VI_ATTR_GPIB_SECONDARY_ADDR (0x3FFF0173L)
  206. #define VI_ATTR_RSRC_MANF_NAME      (0xBFFF0174L)
  207. #define VI_ATTR_RSRC_MANF_ID        (0x3FFF0175L)
  208. #define VI_ATTR_INTF_NUM            (0x3FFF0176L)
  209. #define VI_ATTR_TRIG_ID             (0x3FFF0177L)
  210. #define VI_ATTR_JOB_ID              (0x3FFF4006L)
  211. #define VI_ATTR_EVENT_TYPE          (0x3FFF4010L)
  212. #define VI_ATTR_SIGP_STATUS_ID      (0x3FFF4011L)
  213. #define VI_ATTR_RECV_TRIG_ID        (0x3FFF4012L)
  214. #define VI_ATTR_STATUS              (0x3FFF4025L)
  215. #define VI_ATTR_RET_COUNT           (0x3FFF4026L)
  216. #define VI_ATTR_BUFFER              (0x3FFF4027L)
  217.  
  218. /*- Event Types -------------------------------------------------------------*/
  219.  
  220. #define VI_EVENT_IO_COMPLETION      (0x3FFF2009L)
  221. #define VI_EVENT_TRIG               (0xBFFF200AL)
  222. #define VI_EVENT_SERVICE_REQ        (0x3FFF200BL)
  223. #define VI_EVENT_VXI_SIGP           (0x3FFF2020L)
  224.  
  225. #define VI_ALL_ENABLED_EVENTS       (0x3FFF7FFFL)
  226.  
  227. /*- Completion and Error Codes ----------------------------------------------*/
  228.  
  229. #define VI_SUCCESS_EVENT_EN                   (0x3FFF0002L) /* 3FFF0002,  1073676290 */
  230. #define VI_SUCCESS_EVENT_DIS                  (0x3FFF0003L) /* 3FFF0003,  1073676291 */
  231. #define VI_SUCCESS_QUEUE_EMPTY                (0x3FFF0004L) /* 3FFF0004,  1073676292 */
  232. #define VI_SUCCESS_TERM_CHAR                  (0x3FFF0005L) /* 3FFF0005,  1073676293 */
  233. #define VI_SUCCESS_MAX_CNT                    (0x3FFF0006L) /* 3FFF0006,  1073676294 */
  234. #define VI_SUCCESS_QUEUE_NEMPTY               (0x3FFF0080L) /* 3FFF0080,  1073676416 */
  235. #define VI_SUCCESS_NESTED_SHARED              (0x3FFF0099L) /* 3FFF0099,  1073676441 */
  236. #define VI_SUCCESS_NESTED_EXCLUSIVE           (0x3FFF009AL) /* 3FFF009A,  1073676442 */
  237. #define VI_SUCCESS_SYNC                       (0x3FFF009BL) /* 3FFF009B,  1073676443 */
  238. #define VI_WARN_NSUP_ATTR_STATE               (0x3FFF0084L) /* 3FFF0084,  1073676420 */
  239. #define VI_WARN_UNKNOWN_STATUS                (0x3FFF0085L) /* 3FFF0085,  1073676421 */
  240. #define VI_WARN_NSUP_BUF                      (0x3FFF0088L) /* 3FFF0088,  1073676424 */
  241.  
  242. #define VI_ERROR_SYSTEM_ERROR       (_VI_ERROR+0x3FFF0000L) /* BFFF0000, -1073807360 */
  243. #define VI_ERROR_INV_OBJECT         (_VI_ERROR+0x3FFF000EL) /* BFFF000E, -1073807346 */
  244. #define VI_ERROR_RSRC_LOCKED        (_VI_ERROR+0x3FFF000FL) /* BFFF000F, -1073807345 */
  245. #define VI_ERROR_INV_EXPR           (_VI_ERROR+0x3FFF0010L) /* BFFF0010, -1073807344 */
  246. #define VI_ERROR_RSRC_NFOUND        (_VI_ERROR+0x3FFF0011L) /* BFFF0011, -1073807343 */
  247. #define VI_ERROR_INV_RSRC_NAME      (_VI_ERROR+0x3FFF0012L) /* BFFF0012, -1073807342 */
  248. #define VI_ERROR_INV_ACC_MODE       (_VI_ERROR+0x3FFF0013L) /* BFFF0013, -1073807341 */
  249. #define VI_ERROR_TMO                (_VI_ERROR+0x3FFF0015L) /* BFFF0015, -1073807339 */
  250. #define VI_ERROR_CLOSING_FAILED     (_VI_ERROR+0x3FFF0016L) /* BFFF0016, -1073807338 */
  251. #define VI_ERROR_INV_DEGREE         (_VI_ERROR+0x3FFF001BL) /* BFFF001B, -1073807333 */
  252. #define VI_ERROR_INV_JOB_ID         (_VI_ERROR+0x3FFF001CL) /* BFFF001C, -1073807332 */
  253. #define VI_ERROR_NSUP_ATTR          (_VI_ERROR+0x3FFF001DL) /* BFFF001D, -1073807331 */
  254. #define VI_ERROR_NSUP_ATTR_STATE    (_VI_ERROR+0x3FFF001EL) /* BFFF001E, -1073807330 */
  255. #define VI_ERROR_ATTR_READONLY      (_VI_ERROR+0x3FFF001FL) /* BFFF001F, -1073807329 */
  256. #define VI_ERROR_INV_LOCK_TYPE      (_VI_ERROR+0x3FFF0020L) /* BFFF0020, -1073807328 */
  257. #define VI_ERROR_INV_ACCESS_KEY     (_VI_ERROR+0x3FFF0021L) /* BFFF0021, -1073807327 */
  258. #define VI_ERROR_INV_EVENT          (_VI_ERROR+0x3FFF0026L) /* BFFF0026, -1073807322 */
  259. #define VI_ERROR_INV_MECH           (_VI_ERROR+0x3FFF0027L) /* BFFF0027, -1073807321 */
  260. #define VI_ERROR_HNDLR_NINSTALLED   (_VI_ERROR+0x3FFF0028L) /* BFFF0028, -1073807320 */
  261. #define VI_ERROR_INV_HNDLR_REF      (_VI_ERROR+0x3FFF0029L) /* BFFF0029, -1073807319 */
  262. #define VI_ERROR_INV_CONTEXT        (_VI_ERROR+0x3FFF002AL) /* BFFF002A, -1073807318 */
  263. #define VI_ERROR_ABORT              (_VI_ERROR+0x3FFF0030L) /* BFFF0030, -1073807312 */
  264. #define VI_ERROR_RAW_WR_PROT_VIOL   (_VI_ERROR+0x3FFF0034L) /* BFFF0034, -1073807308 */
  265. #define VI_ERROR_RAW_RD_PROT_VIOL   (_VI_ERROR+0x3FFF0035L) /* BFFF0035, -1073807307 */
  266. #define VI_ERROR_OUTP_PROT_VIOL     (_VI_ERROR+0x3FFF0036L) /* BFFF0036, -1073807306 */
  267. #define VI_ERROR_INP_PROT_VIOL      (_VI_ERROR+0x3FFF0037L) /* BFFF0037, -1073807305 */
  268. #define VI_ERROR_BERR               (_VI_ERROR+0x3FFF0038L) /* BFFF0038, -1073807304 */
  269. #define VI_ERROR_INV_SETUP          (_VI_ERROR+0x3FFF003AL) /* BFFF003A, -1073807302 */
  270. #define VI_ERROR_QUEUE_ERROR        (_VI_ERROR+0x3FFF003BL) /* BFFF003B, -1073807301 */
  271. #define VI_ERROR_ALLOC              (_VI_ERROR+0x3FFF003CL) /* BFFF003C, -1073807300 */
  272. #define VI_ERROR_INV_MASK           (_VI_ERROR+0x3FFF003DL) /* BFFF003D, -1073807299 */
  273. #define VI_ERROR_IO                 (_VI_ERROR+0x3FFF003EL) /* BFFF003E, -1073807298 */
  274. #define VI_ERROR_INV_FMT            (_VI_ERROR+0x3FFF003FL) /* BFFF003F, -1073807297 */
  275. #define VI_ERROR_NSUP_FMT           (_VI_ERROR+0x3FFF0041L) /* BFFF0041, -1073807295 */
  276. #define VI_ERROR_LINE_IN_USE        (_VI_ERROR+0x3FFF0042L) /* BFFF0042, -1073807294 */
  277. #define VI_ERROR_SRQ_NOCCURRED      (_VI_ERROR+0x3FFF004AL) /* BFFF004A, -1073807286 */
  278. #define VI_ERROR_INV_SPACE          (_VI_ERROR+0x3FFF004EL) /* BFFF004E, -1073807282 */
  279. #define VI_ERROR_INV_OFFSET         (_VI_ERROR+0x3FFF0051L) /* BFFF0051, -1073807279 */
  280. #define VI_ERROR_NSUP_OFFSET        (_VI_ERROR+0x3FFF0054L) /* BFFF0054, -1073807276 */
  281. #define VI_ERROR_WINDOW_NMAPPED     (_VI_ERROR+0x3FFF0057L) /* BFFF0057, -1073807273 */
  282. #define VI_ERROR_NLISTENERS         (_VI_ERROR+0x3FFF005FL) /* BFFF005F, -1073807265 */
  283. #define VI_ERROR_NCIC               (_VI_ERROR+0x3FFF0060L) /* BFFF0060, -1073807264 */
  284. #define VI_ERROR_NSUP_OPER          (_VI_ERROR+0x3FFF0067L) /* BFFF0067, -1073807257 */
  285. #define VI_ERROR_ASRL_PARITY        (_VI_ERROR+0x3FFF006AL) /* BFFF006A, -1073807254 */
  286. #define VI_ERROR_ASRL_FRAMING       (_VI_ERROR+0x3FFF006BL) /* BFFF006B, -1073807253 */
  287. #define VI_ERROR_ASRL_OVERRUN       (_VI_ERROR+0x3FFF006CL) /* BFFF006C, -1073807252 */
  288. #define VI_ERROR_NSUP_WIDTH         (_VI_ERROR+0x3FFF0076L) /* BFFF0076, -1073807242 */
  289. #define VI_ERROR_INV_PARAMETER      (_VI_ERROR+0x3FFF0078L) /* BFFF0078, -1073807240 */
  290. #define VI_ERROR_INV_PROT           (_VI_ERROR+0x3FFF0079L) /* BFFF0079, -1073807239 */
  291. #define VI_ERROR_INV_SIZE           (_VI_ERROR+0x3FFF007BL) /* BFFF007B, -1073807237 */
  292. #define VI_ERROR_WINDOW_MAPPED      (_VI_ERROR+0x3FFF0080L) /* BFFF0080, -1073807232 */
  293. #define VI_ERROR_NIMPL_OPER         (_VI_ERROR+0x3FFF0081L) /* BFFF0081, -1073807231 */
  294. #define VI_ERROR_INV_LENGTH         (_VI_ERROR+0x3FFF0083L) /* BFFF0083, -1073807229 */
  295. #define VI_ERROR_SESN_NLOCKED       (_VI_ERROR+0x3FFF009CL) /* BFFF009C, -1073807204 */
  296. #define VI_ERROR_MEM_NSHARED        (_VI_ERROR+0x3FFF009DL) /* BFFF009D, -1073807203 */
  297.  
  298. /*- Other VISA Definitions --------------------------------------------------*/
  299.  
  300. #define VI_VERSION_MAJOR(ver)       ((((ViVersion)ver) & 0xFFF00000UL) >> 20)
  301. #define VI_VERSION_MINOR(ver)       ((((ViVersion)ver) & 0x000FFF00UL) >>  8)
  302. #define VI_VERSION_SUBMINOR(ver)    ((((ViVersion)ver) & 0x000000FFUL)      )
  303.  
  304. #define VI_ERROR_INV_SESSION        (VI_ERROR_INV_OBJECT)
  305.  
  306. #define VI_FIND_BUFLEN              (256)
  307.  
  308. #define VI_INTF_GPIB                (1)
  309. #define VI_INTF_VXI                 (2)
  310. #define VI_INTF_GPIB_VXI            (3)
  311. #define VI_INTF_ASRL                (4)
  312.  
  313. #define VI_NORMAL                   (1)
  314. #define VI_FDC                      (2)
  315. #define VI_HS488                    (3)
  316.  
  317. #define VI_FDC_NORMAL               (1)
  318. #define VI_FDC_STREAM               (2)
  319.  
  320. #define VI_A16_SPACE                (1)
  321. #define VI_A24_SPACE                (2)
  322. #define VI_A32_SPACE                (3)
  323.  
  324. #define VI_UNKNOWN_LA               (-1)
  325. #define VI_UNKNOWN_SLOT             (-1)
  326.  
  327. #define VI_QUEUE                    (1)
  328. #define VI_HNDLR                    (2)
  329. #define VI_SUSPEND_HNDLR            (4)
  330. #define VI_ALL_MECH                 (0xFFFF)
  331.  
  332. #define VI_ANY_HNDLR                (0)
  333.  
  334. #define VI_TRIG_SW                  (-1)
  335. #define VI_TRIG_TTL0                (0)
  336. #define VI_TRIG_TTL1                (1)
  337. #define VI_TRIG_TTL2                (2)
  338. #define VI_TRIG_TTL3                (3)
  339. #define VI_TRIG_TTL4                (4)
  340. #define VI_TRIG_TTL5                (5)
  341. #define VI_TRIG_TTL6                (6)
  342. #define VI_TRIG_TTL7                (7)
  343. #define VI_TRIG_ECL0                (8)
  344. #define VI_TRIG_ECL1                (9)
  345.  
  346. #define VI_TRIG_PROT_DEFAULT        (0)
  347. #define VI_TRIG_PROT_ON             (1)
  348. #define VI_TRIG_PROT_OFF            (2)
  349. #define VI_TRIG_PROT_SYNC           (5)
  350.  
  351. #define VI_READ_BUF                 (1)
  352. #define VI_WRITE_BUF                (2)
  353. #define VI_READ_BUF_DISCARD         (4)
  354. #define VI_WRITE_BUF_DISCARD        (8)
  355. #define VI_ASRL_IN_BUF              (16)
  356. #define VI_ASRL_OUT_BUF             (32)
  357. #define VI_ASRL_IN_BUF_DISCARD      (64)
  358. #define VI_ASRL_OUT_BUF_DISCARD     (128)
  359.  
  360. #define VI_FLUSH_ON_ACCESS          (1)
  361. #define VI_FLUSH_WHEN_FULL          (2)
  362. #define VI_FLUSH_DISABLE            (3)
  363.  
  364. #define VI_NMAPPED                  (1)
  365. #define VI_USE_OPERS                (2)
  366. #define VI_DEREF_ADDR               (3)
  367.  
  368. #define VI_TMO_IMMEDIATE            (0L)
  369. #define VI_TMO_INFINITE             (0xFFFFFFFFL)
  370. #define VI_INFINITE                 (VI_TMO_INFINITE)
  371.  
  372. #define VI_NO_LOCK                  (0)
  373. #define VI_EXCLUSIVE_LOCK           (1)
  374. #define VI_SHARED_LOCK              (2)
  375.  
  376. #define VI_NO_SEC_ADDR              (0xFFFF)
  377.  
  378. #define VI_ASRL_PAR_NONE            (0)
  379. #define VI_ASRL_PAR_ODD             (1)
  380. #define VI_ASRL_PAR_EVEN            (2)
  381. #define VI_ASRL_PAR_MARK            (3)
  382. #define VI_ASRL_PAR_SPACE           (4)
  383.  
  384. #define VI_ASRL_STOP_ONE            (10)
  385. #define VI_ASRL_STOP_TWO            (20)
  386.  
  387. #define VI_ASRL_FLOW_NONE           (0)
  388. #define VI_ASRL_FLOW_XON_XOFF       (1)
  389. #define VI_ASRL_FLOW_RTS_CTS        (2)
  390.  
  391. #define VI_ASRL_END_NONE            (0)
  392. #define VI_ASRL_END_LAST_BIT        (1)
  393. #define VI_ASRL_END_TERMCHAR        (2)
  394. #define VI_ASRL_END_BREAK           (3)
  395.  
  396. #if defined(__cplusplus) || defined(__cplusplus__)
  397.    }
  398. #endif
  399.  
  400. #endif
  401.  
  402. /*- The End -----------------------------------------------------------------*/
  403.  
  404.