28 #ifndef __VISA_HEADER__
29 #define __VISA_HEADER__
33 #if !defined(__VISATYPE_HEADER__)
37 #define VI_SPEC_VERSION (0x00400000UL)
39 #if defined(__cplusplus) || defined(__cplusplus__)
44 #pragma EnableLibraryRuntimeChecking
49 typedef ViObject ViEvent;
50 typedef ViEvent _VI_PTR ViPEvent;
51 typedef ViObject ViFindList;
52 typedef ViFindList _VI_PTR ViPFindList;
54 #if defined(_VI_INT64_UINT64_DEFINED) && defined(_VISA_ENV_IS_64_BIT)
55 typedef ViUInt64 ViBusAddress;
56 typedef ViUInt64 ViBusSize;
57 typedef ViUInt64 ViAttrState;
59 typedef ViUInt32 ViBusAddress;
60 typedef ViUInt32 ViBusSize;
61 typedef ViUInt32 ViAttrState;
64 #if defined(_VI_INT64_UINT64_DEFINED)
65 typedef ViUInt64 ViBusAddress64;
66 typedef ViBusAddress64 _VI_PTR ViPBusAddress64;
69 typedef ViUInt32 ViEventType;
70 typedef ViEventType _VI_PTR ViPEventType;
71 typedef ViEventType _VI_PTR ViAEventType;
72 typedef void _VI_PTR ViPAttrState;
73 typedef ViAttr _VI_PTR ViPAttr;
74 typedef ViAttr _VI_PTR ViAAttr;
76 typedef ViString ViKeyId;
77 typedef ViPString ViPKeyId;
78 typedef ViUInt32 ViJobId;
79 typedef ViJobId _VI_PTR ViPJobId;
80 typedef ViUInt32 ViAccessMode;
81 typedef ViAccessMode _VI_PTR ViPAccessMode;
82 typedef ViBusAddress _VI_PTR ViPBusAddress;
83 typedef ViUInt32 ViEventFilter;
85 typedef va_list ViVAList;
87 typedef ViStatus (_VI_FUNCH _VI_PTR ViHndlr)
88 (ViSession vi, ViEventType eventType, ViEvent event, ViAddr userHandle);
92 ViStatus _VI_FUNC viOpenDefaultRM (ViPSession vi);
93 ViStatus _VI_FUNC viFindRsrc (ViSession sesn, ViString expr, ViPFindList vi,
94 ViPUInt32 retCnt, ViChar _VI_FAR desc[]);
95 ViStatus _VI_FUNC viFindNext (ViFindList vi, ViChar _VI_FAR desc[]);
96 ViStatus _VI_FUNC viParseRsrc (ViSession rmSesn, ViRsrc rsrcName,
97 ViPUInt16 intfType, ViPUInt16 intfNum);
98 ViStatus _VI_FUNC viParseRsrcEx (ViSession rmSesn, ViRsrc rsrcName, ViPUInt16 intfType,
99 ViPUInt16 intfNum, ViChar _VI_FAR rsrcClass[],
100 ViChar _VI_FAR expandedUnaliasedName[],
101 ViChar _VI_FAR aliasIfExists[]);
102 ViStatus _VI_FUNC viOpen (ViSession sesn, ViRsrc name, ViAccessMode mode,
103 ViUInt32 timeout, ViPSession vi);
107 ViStatus _VI_FUNC viClose (ViObject vi);
108 ViStatus _VI_FUNC viSetAttribute (ViObject vi, ViAttr attrName, ViAttrState attrValue);
109 ViStatus _VI_FUNC viGetAttribute (ViObject vi, ViAttr attrName,
void _VI_PTR attrValue);
110 ViStatus _VI_FUNC viStatusDesc (ViObject vi, ViStatus status, ViChar _VI_FAR desc[]);
111 ViStatus _VI_FUNC viTerminate (ViObject vi, ViUInt16 degree, ViJobId jobId);
113 ViStatus _VI_FUNC viLock (ViSession vi, ViAccessMode lockType, ViUInt32 timeout,
114 ViKeyId requestedKey, ViChar _VI_FAR accessKey[]);
115 ViStatus _VI_FUNC viUnlock (ViSession vi);
116 ViStatus _VI_FUNC viEnableEvent (ViSession vi, ViEventType eventType, ViUInt16 mechanism,
117 ViEventFilter context);
118 ViStatus _VI_FUNC viDisableEvent (ViSession vi, ViEventType eventType, ViUInt16 mechanism);
119 ViStatus _VI_FUNC viDiscardEvents (ViSession vi, ViEventType eventType, ViUInt16 mechanism);
120 ViStatus _VI_FUNC viWaitOnEvent (ViSession vi, ViEventType inEventType, ViUInt32 timeout,
121 ViPEventType outEventType, ViPEvent outContext);
122 ViStatus _VI_FUNC viInstallHandler(ViSession vi, ViEventType eventType, ViHndlr handler,
124 ViStatus _VI_FUNC viUninstallHandler(ViSession vi, ViEventType eventType, ViHndlr handler,
129 ViStatus _VI_FUNC viRead (ViSession vi, ViPBuf buf, ViUInt32 cnt, ViPUInt32 retCnt);
130 ViStatus _VI_FUNC viReadAsync (ViSession vi, ViPBuf buf, ViUInt32 cnt, ViPJobId jobId);
131 ViStatus _VI_FUNC viReadToFile (ViSession vi, ViConstString filename, ViUInt32 cnt,
133 ViStatus _VI_FUNC viWrite (ViSession vi, ViBuf buf, ViUInt32 cnt, ViPUInt32 retCnt);
134 ViStatus _VI_FUNC viWriteAsync (ViSession vi, ViBuf buf, ViUInt32 cnt, ViPJobId jobId);
135 ViStatus _VI_FUNC viWriteFromFile (ViSession vi, ViConstString filename, ViUInt32 cnt,
137 ViStatus _VI_FUNC viAssertTrigger (ViSession vi, ViUInt16 protocol);
138 ViStatus _VI_FUNC viReadSTB (ViSession vi, ViPUInt16 status);
139 ViStatus _VI_FUNC viClear (ViSession vi);
143 ViStatus _VI_FUNC viSetBuf (ViSession vi, ViUInt16 mask, ViUInt32 size);
144 ViStatus _VI_FUNC viFlush (ViSession vi, ViUInt16 mask);
146 ViStatus _VI_FUNC viBufWrite (ViSession vi, ViBuf buf, ViUInt32 cnt, ViPUInt32 retCnt);
147 ViStatus _VI_FUNC viBufRead (ViSession vi, ViPBuf buf, ViUInt32 cnt, ViPUInt32 retCnt);
149 ViStatus _VI_FUNCC viPrintf (ViSession vi, ViString writeFmt, ...);
150 ViStatus _VI_FUNC viVPrintf (ViSession vi, ViString writeFmt, ViVAList params);
151 ViStatus _VI_FUNCC viSPrintf (ViSession vi, ViPBuf buf, ViString writeFmt, ...);
152 ViStatus _VI_FUNC viVSPrintf (ViSession vi, ViPBuf buf, ViString writeFmt,
155 ViStatus _VI_FUNCC viScanf (ViSession vi, ViString readFmt, ...);
156 ViStatus _VI_FUNC viVScanf (ViSession vi, ViString readFmt, ViVAList params);
157 ViStatus _VI_FUNCC viSScanf (ViSession vi, ViBuf buf, ViString readFmt, ...);
158 ViStatus _VI_FUNC viVSScanf (ViSession vi, ViBuf buf, ViString readFmt,
161 ViStatus _VI_FUNCC viQueryf (ViSession vi, ViString writeFmt, ViString readFmt, ...);
162 ViStatus _VI_FUNC viVQueryf (ViSession vi, ViString writeFmt, ViString readFmt,
167 ViStatus _VI_FUNC viIn8 (ViSession vi, ViUInt16 space,
168 ViBusAddress offset, ViPUInt8 val8);
169 ViStatus _VI_FUNC viOut8 (ViSession vi, ViUInt16 space,
170 ViBusAddress offset, ViUInt8 val8);
171 ViStatus _VI_FUNC viIn16 (ViSession vi, ViUInt16 space,
172 ViBusAddress offset, ViPUInt16 val16);
173 ViStatus _VI_FUNC viOut16 (ViSession vi, ViUInt16 space,
174 ViBusAddress offset, ViUInt16 val16);
175 ViStatus _VI_FUNC viIn32 (ViSession vi, ViUInt16 space,
176 ViBusAddress offset, ViPUInt32 val32);
177 ViStatus _VI_FUNC viOut32 (ViSession vi, ViUInt16 space,
178 ViBusAddress offset, ViUInt32 val32);
180 #if defined(_VI_INT64_UINT64_DEFINED)
181 ViStatus _VI_FUNC viIn64 (ViSession vi, ViUInt16 space,
182 ViBusAddress offset, ViPUInt64 val64);
183 ViStatus _VI_FUNC viOut64 (ViSession vi, ViUInt16 space,
184 ViBusAddress offset, ViUInt64 val64);
186 ViStatus _VI_FUNC viIn8Ex (ViSession vi, ViUInt16 space,
187 ViBusAddress64 offset, ViPUInt8 val8);
188 ViStatus _VI_FUNC viOut8Ex (ViSession vi, ViUInt16 space,
189 ViBusAddress64 offset, ViUInt8 val8);
190 ViStatus _VI_FUNC viIn16Ex (ViSession vi, ViUInt16 space,
191 ViBusAddress64 offset, ViPUInt16 val16);
192 ViStatus _VI_FUNC viOut16Ex (ViSession vi, ViUInt16 space,
193 ViBusAddress64 offset, ViUInt16 val16);
194 ViStatus _VI_FUNC viIn32Ex (ViSession vi, ViUInt16 space,
195 ViBusAddress64 offset, ViPUInt32 val32);
196 ViStatus _VI_FUNC viOut32Ex (ViSession vi, ViUInt16 space,
197 ViBusAddress64 offset, ViUInt32 val32);
198 ViStatus _VI_FUNC viIn64Ex (ViSession vi, ViUInt16 space,
199 ViBusAddress64 offset, ViPUInt64 val64);
200 ViStatus _VI_FUNC viOut64Ex (ViSession vi, ViUInt16 space,
201 ViBusAddress64 offset, ViUInt64 val64);
204 ViStatus _VI_FUNC viMoveIn8 (ViSession vi, ViUInt16 space, ViBusAddress offset,
205 ViBusSize length, ViAUInt8 buf8);
206 ViStatus _VI_FUNC viMoveOut8 (ViSession vi, ViUInt16 space, ViBusAddress offset,
207 ViBusSize length, ViAUInt8 buf8);
208 ViStatus _VI_FUNC viMoveIn16 (ViSession vi, ViUInt16 space, ViBusAddress offset,
209 ViBusSize length, ViAUInt16 buf16);
210 ViStatus _VI_FUNC viMoveOut16 (ViSession vi, ViUInt16 space, ViBusAddress offset,
211 ViBusSize length, ViAUInt16 buf16);
212 ViStatus _VI_FUNC viMoveIn32 (ViSession vi, ViUInt16 space, ViBusAddress offset,
213 ViBusSize length, ViAUInt32 buf32);
214 ViStatus _VI_FUNC viMoveOut32 (ViSession vi, ViUInt16 space, ViBusAddress offset,
215 ViBusSize length, ViAUInt32 buf32);
217 #if defined(_VI_INT64_UINT64_DEFINED)
218 ViStatus _VI_FUNC viMoveIn64 (ViSession vi, ViUInt16 space, ViBusAddress offset,
219 ViBusSize length, ViAUInt64 buf64);
220 ViStatus _VI_FUNC viMoveOut64 (ViSession vi, ViUInt16 space, ViBusAddress offset,
221 ViBusSize length, ViAUInt64 buf64);
223 ViStatus _VI_FUNC viMoveIn8Ex (ViSession vi, ViUInt16 space, ViBusAddress64 offset,
224 ViBusSize length, ViAUInt8 buf8);
225 ViStatus _VI_FUNC viMoveOut8Ex (ViSession vi, ViUInt16 space, ViBusAddress64 offset,
226 ViBusSize length, ViAUInt8 buf8);
227 ViStatus _VI_FUNC viMoveIn16Ex (ViSession vi, ViUInt16 space, ViBusAddress64 offset,
228 ViBusSize length, ViAUInt16 buf16);
229 ViStatus _VI_FUNC viMoveOut16Ex (ViSession vi, ViUInt16 space, ViBusAddress64 offset,
230 ViBusSize length, ViAUInt16 buf16);
231 ViStatus _VI_FUNC viMoveIn32Ex (ViSession vi, ViUInt16 space, ViBusAddress64 offset,
232 ViBusSize length, ViAUInt32 buf32);
233 ViStatus _VI_FUNC viMoveOut32Ex (ViSession vi, ViUInt16 space, ViBusAddress64 offset,
234 ViBusSize length, ViAUInt32 buf32);
235 ViStatus _VI_FUNC viMoveIn64Ex (ViSession vi, ViUInt16 space, ViBusAddress64 offset,
236 ViBusSize length, ViAUInt64 buf64);
237 ViStatus _VI_FUNC viMoveOut64Ex (ViSession vi, ViUInt16 space, ViBusAddress64 offset,
238 ViBusSize length, ViAUInt64 buf64);
241 ViStatus _VI_FUNC viMove (ViSession vi, ViUInt16 srcSpace, ViBusAddress srcOffset,
242 ViUInt16 srcWidth, ViUInt16 destSpace,
243 ViBusAddress destOffset, ViUInt16 destWidth,
244 ViBusSize srcLength);
245 ViStatus _VI_FUNC viMoveAsync (ViSession vi, ViUInt16 srcSpace, ViBusAddress srcOffset,
246 ViUInt16 srcWidth, ViUInt16 destSpace,
247 ViBusAddress destOffset, ViUInt16 destWidth,
248 ViBusSize srcLength, ViPJobId jobId);
250 #if defined(_VI_INT64_UINT64_DEFINED)
251 ViStatus _VI_FUNC viMoveEx (ViSession vi, ViUInt16 srcSpace, ViBusAddress64 srcOffset,
252 ViUInt16 srcWidth, ViUInt16 destSpace,
253 ViBusAddress64 destOffset, ViUInt16 destWidth,
254 ViBusSize srcLength);
255 ViStatus _VI_FUNC viMoveAsyncEx (ViSession vi, ViUInt16 srcSpace, ViBusAddress64 srcOffset,
256 ViUInt16 srcWidth, ViUInt16 destSpace,
257 ViBusAddress64 destOffset, ViUInt16 destWidth,
258 ViBusSize srcLength, ViPJobId jobId);
261 ViStatus _VI_FUNC viMapAddress (ViSession vi, ViUInt16 mapSpace, ViBusAddress mapOffset,
262 ViBusSize mapSize, ViBoolean access,
263 ViAddr suggested, ViPAddr address);
264 ViStatus _VI_FUNC viUnmapAddress (ViSession vi);
266 #if defined(_VI_INT64_UINT64_DEFINED)
267 ViStatus _VI_FUNC viMapAddressEx (ViSession vi, ViUInt16 mapSpace, ViBusAddress64 mapOffset,
268 ViBusSize mapSize, ViBoolean access,
269 ViAddr suggested, ViPAddr address);
272 void _VI_FUNC viPeek8 (ViSession vi, ViAddr address, ViPUInt8 val8);
273 void _VI_FUNC viPoke8 (ViSession vi, ViAddr address, ViUInt8 val8);
274 void _VI_FUNC viPeek16 (ViSession vi, ViAddr address, ViPUInt16 val16);
275 void _VI_FUNC viPoke16 (ViSession vi, ViAddr address, ViUInt16 val16);
276 void _VI_FUNC viPeek32 (ViSession vi, ViAddr address, ViPUInt32 val32);
277 void _VI_FUNC viPoke32 (ViSession vi, ViAddr address, ViUInt32 val32);
279 #if defined(_VI_INT64_UINT64_DEFINED)
280 void _VI_FUNC viPeek64 (ViSession vi, ViAddr address, ViPUInt64 val64);
281 void _VI_FUNC viPoke64 (ViSession vi, ViAddr address, ViUInt64 val64);
286 ViStatus _VI_FUNC viMemAlloc (ViSession vi, ViBusSize size, ViPBusAddress offset);
287 ViStatus _VI_FUNC viMemFree (ViSession vi, ViBusAddress offset);
289 #if defined(_VI_INT64_UINT64_DEFINED)
290 ViStatus _VI_FUNC viMemAllocEx (ViSession vi, ViBusSize size, ViPBusAddress64 offset);
291 ViStatus _VI_FUNC viMemFreeEx (ViSession vi, ViBusAddress64 offset);
296 ViStatus _VI_FUNC viGpibControlREN(ViSession vi, ViUInt16 mode);
297 ViStatus _VI_FUNC viGpibControlATN(ViSession vi, ViUInt16 mode);
298 ViStatus _VI_FUNC viGpibSendIFC (ViSession vi);
299 ViStatus _VI_FUNC viGpibCommand (ViSession vi, ViBuf cmd, ViUInt32 cnt, ViPUInt32 retCnt);
300 ViStatus _VI_FUNC viGpibPassControl(ViSession vi, ViUInt16 primAddr, ViUInt16 secAddr);
302 ViStatus _VI_FUNC viVxiCommandQuery(ViSession vi, ViUInt16 mode, ViUInt32 cmd,
304 ViStatus _VI_FUNC viAssertUtilSignal(ViSession vi, ViUInt16 line);
305 ViStatus _VI_FUNC viAssertIntrSignal(ViSession vi, ViInt16 mode, ViUInt32 statusID);
306 ViStatus _VI_FUNC viMapTrigger (ViSession vi, ViInt16 trigSrc, ViInt16 trigDest,
308 ViStatus _VI_FUNC viUnmapTrigger (ViSession vi, ViInt16 trigSrc, ViInt16 trigDest);
309 ViStatus _VI_FUNC viUsbControlOut (ViSession vi, ViInt16 bmRequestType, ViInt16 bRequest,
310 ViUInt16 wValue, ViUInt16 wIndex, ViUInt16 wLength,
312 ViStatus _VI_FUNC viUsbControlIn (ViSession vi, ViInt16 bmRequestType, ViInt16 bRequest,
313 ViUInt16 wValue, ViUInt16 wIndex, ViUInt16 wLength,
314 ViPBuf buf, ViPUInt16 retCnt);
318 #define VI_ATTR_RSRC_CLASS (0xBFFF0001UL)
319 #define VI_ATTR_RSRC_NAME (0xBFFF0002UL)
320 #define VI_ATTR_RSRC_IMPL_VERSION (0x3FFF0003UL)
321 #define VI_ATTR_RSRC_LOCK_STATE (0x3FFF0004UL)
322 #define VI_ATTR_MAX_QUEUE_LENGTH (0x3FFF0005UL)
323 #define VI_ATTR_USER_DATA_32 (0x3FFF0007UL)
324 #define VI_ATTR_FDC_CHNL (0x3FFF000DUL)
325 #define VI_ATTR_FDC_MODE (0x3FFF000FUL)
326 #define VI_ATTR_FDC_GEN_SIGNAL_EN (0x3FFF0011UL)
327 #define VI_ATTR_FDC_USE_PAIR (0x3FFF0013UL)
328 #define VI_ATTR_SEND_END_EN (0x3FFF0016UL)
329 #define VI_ATTR_TERMCHAR (0x3FFF0018UL)
330 #define VI_ATTR_TMO_VALUE (0x3FFF001AUL)
331 #define VI_ATTR_GPIB_READDR_EN (0x3FFF001BUL)
332 #define VI_ATTR_IO_PROT (0x3FFF001CUL)
333 #define VI_ATTR_DMA_ALLOW_EN (0x3FFF001EUL)
334 #define VI_ATTR_ASRL_BAUD (0x3FFF0021UL)
335 #define VI_ATTR_ASRL_DATA_BITS (0x3FFF0022UL)
336 #define VI_ATTR_ASRL_PARITY (0x3FFF0023UL)
337 #define VI_ATTR_ASRL_STOP_BITS (0x3FFF0024UL)
338 #define VI_ATTR_ASRL_FLOW_CNTRL (0x3FFF0025UL)
339 #define VI_ATTR_RD_BUF_OPER_MODE (0x3FFF002AUL)
340 #define VI_ATTR_RD_BUF_SIZE (0x3FFF002BUL)
341 #define VI_ATTR_WR_BUF_OPER_MODE (0x3FFF002DUL)
342 #define VI_ATTR_WR_BUF_SIZE (0x3FFF002EUL)
343 #define VI_ATTR_SUPPRESS_END_EN (0x3FFF0036UL)
344 #define VI_ATTR_TERMCHAR_EN (0x3FFF0038UL)
345 #define VI_ATTR_DEST_ACCESS_PRIV (0x3FFF0039UL)
346 #define VI_ATTR_DEST_BYTE_ORDER (0x3FFF003AUL)
347 #define VI_ATTR_SRC_ACCESS_PRIV (0x3FFF003CUL)
348 #define VI_ATTR_SRC_BYTE_ORDER (0x3FFF003DUL)
349 #define VI_ATTR_SRC_INCREMENT (0x3FFF0040UL)
350 #define VI_ATTR_DEST_INCREMENT (0x3FFF0041UL)
351 #define VI_ATTR_WIN_ACCESS_PRIV (0x3FFF0045UL)
352 #define VI_ATTR_WIN_BYTE_ORDER (0x3FFF0047UL)
353 #define VI_ATTR_GPIB_ATN_STATE (0x3FFF0057UL)
354 #define VI_ATTR_GPIB_ADDR_STATE (0x3FFF005CUL)
355 #define VI_ATTR_GPIB_CIC_STATE (0x3FFF005EUL)
356 #define VI_ATTR_GPIB_NDAC_STATE (0x3FFF0062UL)
357 #define VI_ATTR_GPIB_SRQ_STATE (0x3FFF0067UL)
358 #define VI_ATTR_GPIB_SYS_CNTRL_STATE (0x3FFF0068UL)
359 #define VI_ATTR_GPIB_HS488_CBL_LEN (0x3FFF0069UL)
360 #define VI_ATTR_CMDR_LA (0x3FFF006BUL)
361 #define VI_ATTR_VXI_DEV_CLASS (0x3FFF006CUL)
362 #define VI_ATTR_MAINFRAME_LA (0x3FFF0070UL)
363 #define VI_ATTR_MANF_NAME (0xBFFF0072UL)
364 #define VI_ATTR_MODEL_NAME (0xBFFF0077UL)
365 #define VI_ATTR_VXI_VME_INTR_STATUS (0x3FFF008BUL)
366 #define VI_ATTR_VXI_TRIG_STATUS (0x3FFF008DUL)
367 #define VI_ATTR_VXI_VME_SYSFAIL_STATE (0x3FFF0094UL)
368 #define VI_ATTR_WIN_BASE_ADDR_32 (0x3FFF0098UL)
369 #define VI_ATTR_WIN_SIZE_32 (0x3FFF009AUL)
370 #define VI_ATTR_ASRL_AVAIL_NUM (0x3FFF00ACUL)
371 #define VI_ATTR_MEM_BASE_32 (0x3FFF00ADUL)
372 #define VI_ATTR_ASRL_CTS_STATE (0x3FFF00AEUL)
373 #define VI_ATTR_ASRL_DCD_STATE (0x3FFF00AFUL)
374 #define VI_ATTR_ASRL_DSR_STATE (0x3FFF00B1UL)
375 #define VI_ATTR_ASRL_DTR_STATE (0x3FFF00B2UL)
376 #define VI_ATTR_ASRL_END_IN (0x3FFF00B3UL)
377 #define VI_ATTR_ASRL_END_OUT (0x3FFF00B4UL)
378 #define VI_ATTR_ASRL_REPLACE_CHAR (0x3FFF00BEUL)
379 #define VI_ATTR_ASRL_RI_STATE (0x3FFF00BFUL)
380 #define VI_ATTR_ASRL_RTS_STATE (0x3FFF00C0UL)
381 #define VI_ATTR_ASRL_XON_CHAR (0x3FFF00C1UL)
382 #define VI_ATTR_ASRL_XOFF_CHAR (0x3FFF00C2UL)
383 #define VI_ATTR_WIN_ACCESS (0x3FFF00C3UL)
384 #define VI_ATTR_RM_SESSION (0x3FFF00C4UL)
385 #define VI_ATTR_VXI_LA (0x3FFF00D5UL)
386 #define VI_ATTR_MANF_ID (0x3FFF00D9UL)
387 #define VI_ATTR_MEM_SIZE_32 (0x3FFF00DDUL)
388 #define VI_ATTR_MEM_SPACE (0x3FFF00DEUL)
389 #define VI_ATTR_MODEL_CODE (0x3FFF00DFUL)
390 #define VI_ATTR_SLOT (0x3FFF00E8UL)
391 #define VI_ATTR_INTF_INST_NAME (0xBFFF00E9UL)
392 #define VI_ATTR_IMMEDIATE_SERV (0x3FFF0100UL)
393 #define VI_ATTR_INTF_PARENT_NUM (0x3FFF0101UL)
394 #define VI_ATTR_RSRC_SPEC_VERSION (0x3FFF0170UL)
395 #define VI_ATTR_INTF_TYPE (0x3FFF0171UL)
396 #define VI_ATTR_GPIB_PRIMARY_ADDR (0x3FFF0172UL)
397 #define VI_ATTR_GPIB_SECONDARY_ADDR (0x3FFF0173UL)
398 #define VI_ATTR_RSRC_MANF_NAME (0xBFFF0174UL)
399 #define VI_ATTR_RSRC_MANF_ID (0x3FFF0175UL)
400 #define VI_ATTR_INTF_NUM (0x3FFF0176UL)
401 #define VI_ATTR_TRIG_ID (0x3FFF0177UL)
402 #define VI_ATTR_GPIB_REN_STATE (0x3FFF0181UL)
403 #define VI_ATTR_GPIB_UNADDR_EN (0x3FFF0184UL)
404 #define VI_ATTR_DEV_STATUS_BYTE (0x3FFF0189UL)
405 #define VI_ATTR_FILE_APPEND_EN (0x3FFF0192UL)
406 #define VI_ATTR_VXI_TRIG_SUPPORT (0x3FFF0194UL)
407 #define VI_ATTR_TCPIP_ADDR (0xBFFF0195UL)
408 #define VI_ATTR_TCPIP_HOSTNAME (0xBFFF0196UL)
409 #define VI_ATTR_TCPIP_PORT (0x3FFF0197UL)
410 #define VI_ATTR_TCPIP_DEVICE_NAME (0xBFFF0199UL)
411 #define VI_ATTR_TCPIP_NODELAY (0x3FFF019AUL)
412 #define VI_ATTR_TCPIP_KEEPALIVE (0x3FFF019BUL)
413 #define VI_ATTR_4882_COMPLIANT (0x3FFF019FUL)
414 #define VI_ATTR_USB_SERIAL_NUM (0xBFFF01A0UL)
415 #define VI_ATTR_USB_INTFC_NUM (0x3FFF01A1UL)
416 #define VI_ATTR_USB_PROTOCOL (0x3FFF01A7UL)
417 #define VI_ATTR_USB_MAX_INTR_SIZE (0x3FFF01AFUL)
418 #define VI_ATTR_PXI_DEV_NUM (0x3FFF0201UL)
419 #define VI_ATTR_PXI_FUNC_NUM (0x3FFF0202UL)
420 #define VI_ATTR_PXI_BUS_NUM (0x3FFF0205UL)
421 #define VI_ATTR_PXI_CHASSIS (0x3FFF0206UL)
422 #define VI_ATTR_PXI_SLOTPATH (0xBFFF0207UL)
423 #define VI_ATTR_PXI_SLOT_LBUS_LEFT (0x3FFF0208UL)
424 #define VI_ATTR_PXI_SLOT_LBUS_RIGHT (0x3FFF0209UL)
425 #define VI_ATTR_PXI_TRIG_BUS (0x3FFF020AUL)
426 #define VI_ATTR_PXI_STAR_TRIG_BUS (0x3FFF020BUL)
427 #define VI_ATTR_PXI_STAR_TRIG_LINE (0x3FFF020CUL)
428 #define VI_ATTR_PXI_MEM_TYPE_BAR0 (0x3FFF0211UL)
429 #define VI_ATTR_PXI_MEM_TYPE_BAR1 (0x3FFF0212UL)
430 #define VI_ATTR_PXI_MEM_TYPE_BAR2 (0x3FFF0213UL)
431 #define VI_ATTR_PXI_MEM_TYPE_BAR3 (0x3FFF0214UL)
432 #define VI_ATTR_PXI_MEM_TYPE_BAR4 (0x3FFF0215UL)
433 #define VI_ATTR_PXI_MEM_TYPE_BAR5 (0x3FFF0216UL)
434 #define VI_ATTR_PXI_MEM_BASE_BAR0 (0x3FFF0221UL)
435 #define VI_ATTR_PXI_MEM_BASE_BAR1 (0x3FFF0222UL)
436 #define VI_ATTR_PXI_MEM_BASE_BAR2 (0x3FFF0223UL)
437 #define VI_ATTR_PXI_MEM_BASE_BAR3 (0x3FFF0224UL)
438 #define VI_ATTR_PXI_MEM_BASE_BAR4 (0x3FFF0225UL)
439 #define VI_ATTR_PXI_MEM_BASE_BAR5 (0x3FFF0226UL)
440 #define VI_ATTR_PXI_MEM_SIZE_BAR0 (0x3FFF0231UL)
441 #define VI_ATTR_PXI_MEM_SIZE_BAR1 (0x3FFF0232UL)
442 #define VI_ATTR_PXI_MEM_SIZE_BAR2 (0x3FFF0233UL)
443 #define VI_ATTR_PXI_MEM_SIZE_BAR3 (0x3FFF0234UL)
444 #define VI_ATTR_PXI_MEM_SIZE_BAR4 (0x3FFF0235UL)
445 #define VI_ATTR_PXI_MEM_SIZE_BAR5 (0x3FFF0236UL)
446 #define VI_ATTR_PXI_IS_EXPRESS (0x3FFF0240UL)
447 #define VI_ATTR_PXI_SLOT_LWIDTH (0x3FFF0241UL)
448 #define VI_ATTR_PXI_MAX_LWIDTH (0x3FFF0242UL)
449 #define VI_ATTR_PXI_ACTUAL_LWIDTH (0x3FFF0243UL)
450 #define VI_ATTR_PXI_DSTAR_BUS (0x3FFF0244UL)
451 #define VI_ATTR_PXI_DSTAR_SET (0x3FFF0245UL)
453 #define VI_ATTR_JOB_ID (0x3FFF4006UL)
454 #define VI_ATTR_EVENT_TYPE (0x3FFF4010UL)
455 #define VI_ATTR_SIGP_STATUS_ID (0x3FFF4011UL)
456 #define VI_ATTR_RECV_TRIG_ID (0x3FFF4012UL)
457 #define VI_ATTR_INTR_STATUS_ID (0x3FFF4023UL)
458 #define VI_ATTR_STATUS (0x3FFF4025UL)
459 #define VI_ATTR_RET_COUNT_32 (0x3FFF4026UL)
460 #define VI_ATTR_BUFFER (0x3FFF4027UL)
461 #define VI_ATTR_RECV_INTR_LEVEL (0x3FFF4041UL)
462 #define VI_ATTR_OPER_NAME (0xBFFF4042UL)
463 #define VI_ATTR_GPIB_RECV_CIC_STATE (0x3FFF4193UL)
464 #define VI_ATTR_RECV_TCPIP_ADDR (0xBFFF4198UL)
465 #define VI_ATTR_USB_RECV_INTR_SIZE (0x3FFF41B0UL)
466 #define VI_ATTR_USB_RECV_INTR_DATA (0xBFFF41B1UL)
470 #if defined(_VI_INT64_UINT64_DEFINED) && defined(_VISA_ENV_IS_64_BIT)
471 #define VI_ATTR_USER_DATA_64 (0x3FFF000AUL)
472 #define VI_ATTR_RET_COUNT_64 (0x3FFF4028UL)
473 #define VI_ATTR_USER_DATA (VI_ATTR_USER_DATA_64)
474 #define VI_ATTR_RET_COUNT (VI_ATTR_RET_COUNT_64)
476 #define VI_ATTR_USER_DATA (VI_ATTR_USER_DATA_32)
477 #define VI_ATTR_RET_COUNT (VI_ATTR_RET_COUNT_32)
480 #if defined(_VI_INT64_UINT64_DEFINED)
481 #define VI_ATTR_WIN_BASE_ADDR_64 (0x3FFF009BUL)
482 #define VI_ATTR_WIN_SIZE_64 (0x3FFF009CUL)
483 #define VI_ATTR_MEM_BASE_64 (0x3FFF00D0UL)
484 #define VI_ATTR_MEM_SIZE_64 (0x3FFF00D1UL)
486 #if defined(_VI_INT64_UINT64_DEFINED) && defined(_VISA_ENV_IS_64_BIT)
487 #define VI_ATTR_WIN_BASE_ADDR (VI_ATTR_WIN_BASE_ADDR_64)
488 #define VI_ATTR_WIN_SIZE (VI_ATTR_WIN_SIZE_64)
489 #define VI_ATTR_MEM_BASE (VI_ATTR_MEM_BASE_64)
490 #define VI_ATTR_MEM_SIZE (VI_ATTR_MEM_SIZE_64)
492 #define VI_ATTR_WIN_BASE_ADDR (VI_ATTR_WIN_BASE_ADDR_32)
493 #define VI_ATTR_WIN_SIZE (VI_ATTR_WIN_SIZE_32)
494 #define VI_ATTR_MEM_BASE (VI_ATTR_MEM_BASE_32)
495 #define VI_ATTR_MEM_SIZE (VI_ATTR_MEM_SIZE_32)
500 #define VI_EVENT_IO_COMPLETION (0x3FFF2009UL)
501 #define VI_EVENT_TRIG (0xBFFF200AUL)
502 #define VI_EVENT_SERVICE_REQ (0x3FFF200BUL)
503 #define VI_EVENT_CLEAR (0x3FFF200DUL)
504 #define VI_EVENT_EXCEPTION (0xBFFF200EUL)
505 #define VI_EVENT_GPIB_CIC (0x3FFF2012UL)
506 #define VI_EVENT_GPIB_TALK (0x3FFF2013UL)
507 #define VI_EVENT_GPIB_LISTEN (0x3FFF2014UL)
508 #define VI_EVENT_VXI_VME_SYSFAIL (0x3FFF201DUL)
509 #define VI_EVENT_VXI_VME_SYSRESET (0x3FFF201EUL)
510 #define VI_EVENT_VXI_SIGP (0x3FFF2020UL)
511 #define VI_EVENT_VXI_VME_INTR (0xBFFF2021UL)
512 #define VI_EVENT_PXI_INTR (0x3FFF2022UL)
513 #define VI_EVENT_TCPIP_CONNECT (0x3FFF2036UL)
514 #define VI_EVENT_USB_INTR (0x3FFF2037UL)
516 #define VI_ALL_ENABLED_EVENTS (0x3FFF7FFFUL)
520 #define VI_SUCCESS_EVENT_EN (0x3FFF0002L)
521 #define VI_SUCCESS_EVENT_DIS (0x3FFF0003L)
522 #define VI_SUCCESS_QUEUE_EMPTY (0x3FFF0004L)
523 #define VI_SUCCESS_TERM_CHAR (0x3FFF0005L)
524 #define VI_SUCCESS_MAX_CNT (0x3FFF0006L)
525 #define VI_SUCCESS_DEV_NPRESENT (0x3FFF007DL)
526 #define VI_SUCCESS_TRIG_MAPPED (0x3FFF007EL)
527 #define VI_SUCCESS_QUEUE_NEMPTY (0x3FFF0080L)
528 #define VI_SUCCESS_NCHAIN (0x3FFF0098L)
529 #define VI_SUCCESS_NESTED_SHARED (0x3FFF0099L)
530 #define VI_SUCCESS_NESTED_EXCLUSIVE (0x3FFF009AL)
531 #define VI_SUCCESS_SYNC (0x3FFF009BL)
533 #define VI_WARN_QUEUE_OVERFLOW (0x3FFF000CL)
534 #define VI_WARN_CONFIG_NLOADED (0x3FFF0077L)
535 #define VI_WARN_NULL_OBJECT (0x3FFF0082L)
536 #define VI_WARN_NSUP_ATTR_STATE (0x3FFF0084L)
537 #define VI_WARN_UNKNOWN_STATUS (0x3FFF0085L)
538 #define VI_WARN_NSUP_BUF (0x3FFF0088L)
539 #define VI_WARN_EXT_FUNC_NIMPL (0x3FFF00A9L)
541 #define VI_ERROR_SYSTEM_ERROR (_VI_ERROR+0x3FFF0000L)
542 #define VI_ERROR_INV_OBJECT (_VI_ERROR+0x3FFF000EL)
543 #define VI_ERROR_RSRC_LOCKED (_VI_ERROR+0x3FFF000FL)
544 #define VI_ERROR_INV_EXPR (_VI_ERROR+0x3FFF0010L)
545 #define VI_ERROR_RSRC_NFOUND (_VI_ERROR+0x3FFF0011L)
546 #define VI_ERROR_INV_RSRC_NAME (_VI_ERROR+0x3FFF0012L)
547 #define VI_ERROR_INV_ACC_MODE (_VI_ERROR+0x3FFF0013L)
548 #define VI_ERROR_TMO (_VI_ERROR+0x3FFF0015L)
549 #define VI_ERROR_CLOSING_FAILED (_VI_ERROR+0x3FFF0016L)
550 #define VI_ERROR_INV_DEGREE (_VI_ERROR+0x3FFF001BL)
551 #define VI_ERROR_INV_JOB_ID (_VI_ERROR+0x3FFF001CL)
552 #define VI_ERROR_NSUP_ATTR (_VI_ERROR+0x3FFF001DL)
553 #define VI_ERROR_NSUP_ATTR_STATE (_VI_ERROR+0x3FFF001EL)
554 #define VI_ERROR_ATTR_READONLY (_VI_ERROR+0x3FFF001FL)
555 #define VI_ERROR_INV_LOCK_TYPE (_VI_ERROR+0x3FFF0020L)
556 #define VI_ERROR_INV_ACCESS_KEY (_VI_ERROR+0x3FFF0021L)
557 #define VI_ERROR_INV_EVENT (_VI_ERROR+0x3FFF0026L)
558 #define VI_ERROR_INV_MECH (_VI_ERROR+0x3FFF0027L)
559 #define VI_ERROR_HNDLR_NINSTALLED (_VI_ERROR+0x3FFF0028L)
560 #define VI_ERROR_INV_HNDLR_REF (_VI_ERROR+0x3FFF0029L)
561 #define VI_ERROR_INV_CONTEXT (_VI_ERROR+0x3FFF002AL)
562 #define VI_ERROR_QUEUE_OVERFLOW (_VI_ERROR+0x3FFF002DL)
563 #define VI_ERROR_NENABLED (_VI_ERROR+0x3FFF002FL)
564 #define VI_ERROR_ABORT (_VI_ERROR+0x3FFF0030L)
565 #define VI_ERROR_RAW_WR_PROT_VIOL (_VI_ERROR+0x3FFF0034L)
566 #define VI_ERROR_RAW_RD_PROT_VIOL (_VI_ERROR+0x3FFF0035L)
567 #define VI_ERROR_OUTP_PROT_VIOL (_VI_ERROR+0x3FFF0036L)
568 #define VI_ERROR_INP_PROT_VIOL (_VI_ERROR+0x3FFF0037L)
569 #define VI_ERROR_BERR (_VI_ERROR+0x3FFF0038L)
570 #define VI_ERROR_IN_PROGRESS (_VI_ERROR+0x3FFF0039L)
571 #define VI_ERROR_INV_SETUP (_VI_ERROR+0x3FFF003AL)
572 #define VI_ERROR_QUEUE_ERROR (_VI_ERROR+0x3FFF003BL)
573 #define VI_ERROR_ALLOC (_VI_ERROR+0x3FFF003CL)
574 #define VI_ERROR_INV_MASK (_VI_ERROR+0x3FFF003DL)
575 #define VI_ERROR_IO (_VI_ERROR+0x3FFF003EL)
576 #define VI_ERROR_INV_FMT (_VI_ERROR+0x3FFF003FL)
577 #define VI_ERROR_NSUP_FMT (_VI_ERROR+0x3FFF0041L)
578 #define VI_ERROR_LINE_IN_USE (_VI_ERROR+0x3FFF0042L)
579 #define VI_ERROR_NSUP_MODE (_VI_ERROR+0x3FFF0046L)
580 #define VI_ERROR_SRQ_NOCCURRED (_VI_ERROR+0x3FFF004AL)
581 #define VI_ERROR_INV_SPACE (_VI_ERROR+0x3FFF004EL)
582 #define VI_ERROR_INV_OFFSET (_VI_ERROR+0x3FFF0051L)
583 #define VI_ERROR_INV_WIDTH (_VI_ERROR+0x3FFF0052L)
584 #define VI_ERROR_NSUP_OFFSET (_VI_ERROR+0x3FFF0054L)
585 #define VI_ERROR_NSUP_VAR_WIDTH (_VI_ERROR+0x3FFF0055L)
586 #define VI_ERROR_WINDOW_NMAPPED (_VI_ERROR+0x3FFF0057L)
587 #define VI_ERROR_RESP_PENDING (_VI_ERROR+0x3FFF0059L)
588 #define VI_ERROR_NLISTENERS (_VI_ERROR+0x3FFF005FL)
589 #define VI_ERROR_NCIC (_VI_ERROR+0x3FFF0060L)
590 #define VI_ERROR_NSYS_CNTLR (_VI_ERROR+0x3FFF0061L)
591 #define VI_ERROR_NSUP_OPER (_VI_ERROR+0x3FFF0067L)
592 #define VI_ERROR_INTR_PENDING (_VI_ERROR+0x3FFF0068L)
593 #define VI_ERROR_ASRL_PARITY (_VI_ERROR+0x3FFF006AL)
594 #define VI_ERROR_ASRL_FRAMING (_VI_ERROR+0x3FFF006BL)
595 #define VI_ERROR_ASRL_OVERRUN (_VI_ERROR+0x3FFF006CL)
596 #define VI_ERROR_TRIG_NMAPPED (_VI_ERROR+0x3FFF006EL)
597 #define VI_ERROR_NSUP_ALIGN_OFFSET (_VI_ERROR+0x3FFF0070L)
598 #define VI_ERROR_USER_BUF (_VI_ERROR+0x3FFF0071L)
599 #define VI_ERROR_RSRC_BUSY (_VI_ERROR+0x3FFF0072L)
600 #define VI_ERROR_NSUP_WIDTH (_VI_ERROR+0x3FFF0076L)
601 #define VI_ERROR_INV_PARAMETER (_VI_ERROR+0x3FFF0078L)
602 #define VI_ERROR_INV_PROT (_VI_ERROR+0x3FFF0079L)
603 #define VI_ERROR_INV_SIZE (_VI_ERROR+0x3FFF007BL)
604 #define VI_ERROR_WINDOW_MAPPED (_VI_ERROR+0x3FFF0080L)
605 #define VI_ERROR_NIMPL_OPER (_VI_ERROR+0x3FFF0081L)
606 #define VI_ERROR_INV_LENGTH (_VI_ERROR+0x3FFF0083L)
607 #define VI_ERROR_INV_MODE (_VI_ERROR+0x3FFF0091L)
608 #define VI_ERROR_SESN_NLOCKED (_VI_ERROR+0x3FFF009CL)
609 #define VI_ERROR_MEM_NSHARED (_VI_ERROR+0x3FFF009DL)
610 #define VI_ERROR_LIBRARY_NFOUND (_VI_ERROR+0x3FFF009EL)
611 #define VI_ERROR_NSUP_INTR (_VI_ERROR+0x3FFF009FL)
612 #define VI_ERROR_INV_LINE (_VI_ERROR+0x3FFF00A0L)
613 #define VI_ERROR_FILE_ACCESS (_VI_ERROR+0x3FFF00A1L)
614 #define VI_ERROR_FILE_IO (_VI_ERROR+0x3FFF00A2L)
615 #define VI_ERROR_NSUP_LINE (_VI_ERROR+0x3FFF00A3L)
616 #define VI_ERROR_NSUP_MECH (_VI_ERROR+0x3FFF00A4L)
617 #define VI_ERROR_INTF_NUM_NCONFIG (_VI_ERROR+0x3FFF00A5L)
618 #define VI_ERROR_CONN_LOST (_VI_ERROR+0x3FFF00A6L)
619 #define VI_ERROR_MACHINE_NAVAIL (_VI_ERROR+0x3FFF00A7L)
620 #define VI_ERROR_NPERMISSION (_VI_ERROR+0x3FFF00A8L)
624 #define VI_VERSION_MAJOR(ver) ((((ViVersion)ver) & 0xFFF00000UL) >> 20)
625 #define VI_VERSION_MINOR(ver) ((((ViVersion)ver) & 0x000FFF00UL) >> 8)
626 #define VI_VERSION_SUBMINOR(ver) ((((ViVersion)ver) & 0x000000FFUL) )
628 #define VI_FIND_BUFLEN (256)
630 #define VI_INTF_GPIB (1)
631 #define VI_INTF_VXI (2)
632 #define VI_INTF_GPIB_VXI (3)
633 #define VI_INTF_ASRL (4)
634 #define VI_INTF_PXI (5)
635 #define VI_INTF_TCPIP (6)
636 #define VI_INTF_USB (7)
638 #define VI_PROT_NORMAL (1)
639 #define VI_PROT_FDC (2)
640 #define VI_PROT_HS488 (3)
641 #define VI_PROT_4882_STRS (4)
642 #define VI_PROT_USBTMC_VENDOR (5)
644 #define VI_FDC_NORMAL (1)
645 #define VI_FDC_STREAM (2)
647 #define VI_LOCAL_SPACE (0)
648 #define VI_A16_SPACE (1)
649 #define VI_A24_SPACE (2)
650 #define VI_A32_SPACE (3)
651 #define VI_A64_SPACE (4)
652 #define VI_PXI_ALLOC_SPACE (9)
653 #define VI_PXI_CFG_SPACE (10)
654 #define VI_PXI_BAR0_SPACE (11)
655 #define VI_PXI_BAR1_SPACE (12)
656 #define VI_PXI_BAR2_SPACE (13)
657 #define VI_PXI_BAR3_SPACE (14)
658 #define VI_PXI_BAR4_SPACE (15)
659 #define VI_PXI_BAR5_SPACE (16)
660 #define VI_OPAQUE_SPACE (0xFFFF)
662 #define VI_UNKNOWN_LA (-1)
663 #define VI_UNKNOWN_SLOT (-1)
664 #define VI_UNKNOWN_LEVEL (-1)
665 #define VI_UNKNOWN_CHASSIS (-1)
669 #define VI_SUSPEND_HNDLR (4)
670 #define VI_ALL_MECH (0xFFFF)
672 #define VI_ANY_HNDLR (0)
674 #define VI_TRIG_ALL (-2)
675 #define VI_TRIG_SW (-1)
676 #define VI_TRIG_TTL0 (0)
677 #define VI_TRIG_TTL1 (1)
678 #define VI_TRIG_TTL2 (2)
679 #define VI_TRIG_TTL3 (3)
680 #define VI_TRIG_TTL4 (4)
681 #define VI_TRIG_TTL5 (5)
682 #define VI_TRIG_TTL6 (6)
683 #define VI_TRIG_TTL7 (7)
684 #define VI_TRIG_ECL0 (8)
685 #define VI_TRIG_ECL1 (9)
686 #define VI_TRIG_PANEL_IN (27)
687 #define VI_TRIG_PANEL_OUT (28)
689 #define VI_TRIG_PROT_DEFAULT (0)
690 #define VI_TRIG_PROT_ON (1)
691 #define VI_TRIG_PROT_OFF (2)
692 #define VI_TRIG_PROT_SYNC (5)
693 #define VI_TRIG_PROT_RESERVE (6)
694 #define VI_TRIG_PROT_UNRESERVE (7)
696 #define VI_READ_BUF (1)
697 #define VI_WRITE_BUF (2)
698 #define VI_READ_BUF_DISCARD (4)
699 #define VI_WRITE_BUF_DISCARD (8)
700 #define VI_IO_IN_BUF (16)
701 #define VI_IO_OUT_BUF (32)
702 #define VI_IO_IN_BUF_DISCARD (64)
703 #define VI_IO_OUT_BUF_DISCARD (128)
705 #define VI_FLUSH_ON_ACCESS (1)
706 #define VI_FLUSH_WHEN_FULL (2)
707 #define VI_FLUSH_DISABLE (3)
709 #define VI_NMAPPED (1)
710 #define VI_USE_OPERS (2)
711 #define VI_DEREF_ADDR (3)
712 #define VI_DEREF_ADDR_BYTE_SWAP (4)
714 #define VI_TMO_IMMEDIATE (0L)
715 #define VI_TMO_INFINITE (0xFFFFFFFFUL)
717 #define VI_NO_LOCK (0)
718 #define VI_EXCLUSIVE_LOCK (1)
719 #define VI_SHARED_LOCK (2)
720 #define VI_LOAD_CONFIG (4)
722 #define VI_NO_SEC_ADDR (0xFFFF)
724 #define VI_ASRL_PAR_NONE (0)
725 #define VI_ASRL_PAR_ODD (1)
726 #define VI_ASRL_PAR_EVEN (2)
727 #define VI_ASRL_PAR_MARK (3)
728 #define VI_ASRL_PAR_SPACE (4)
730 #define VI_ASRL_STOP_ONE (10)
731 #define VI_ASRL_STOP_ONE5 (15)
732 #define VI_ASRL_STOP_TWO (20)
734 #define VI_ASRL_FLOW_NONE (0)
735 #define VI_ASRL_FLOW_XON_XOFF (1)
736 #define VI_ASRL_FLOW_RTS_CTS (2)
737 #define VI_ASRL_FLOW_DTR_DSR (4)
739 #define VI_ASRL_END_NONE (0)
740 #define VI_ASRL_END_LAST_BIT (1)
741 #define VI_ASRL_END_TERMCHAR (2)
742 #define VI_ASRL_END_BREAK (3)
744 #define VI_STATE_ASSERTED (1)
745 #define VI_STATE_UNASSERTED (0)
746 #define VI_STATE_UNKNOWN (-1)
748 #define VI_BIG_ENDIAN (0)
749 #define VI_LITTLE_ENDIAN (1)
751 #define VI_DATA_PRIV (0)
752 #define VI_DATA_NPRIV (1)
753 #define VI_PROG_PRIV (2)
754 #define VI_PROG_NPRIV (3)
755 #define VI_BLCK_PRIV (4)
756 #define VI_BLCK_NPRIV (5)
757 #define VI_D64_PRIV (6)
758 #define VI_D64_NPRIV (7)
760 #define VI_WIDTH_8 (1)
761 #define VI_WIDTH_16 (2)
762 #define VI_WIDTH_32 (4)
763 #define VI_WIDTH_64 (8)
765 #define VI_GPIB_REN_DEASSERT (0)
766 #define VI_GPIB_REN_ASSERT (1)
767 #define VI_GPIB_REN_DEASSERT_GTL (2)
768 #define VI_GPIB_REN_ASSERT_ADDRESS (3)
769 #define VI_GPIB_REN_ASSERT_LLO (4)
770 #define VI_GPIB_REN_ASSERT_ADDRESS_LLO (5)
771 #define VI_GPIB_REN_ADDRESS_GTL (6)
773 #define VI_GPIB_ATN_DEASSERT (0)
774 #define VI_GPIB_ATN_ASSERT (1)
775 #define VI_GPIB_ATN_DEASSERT_HANDSHAKE (2)
776 #define VI_GPIB_ATN_ASSERT_IMMEDIATE (3)
778 #define VI_GPIB_HS488_DISABLED (0)
779 #define VI_GPIB_HS488_NIMPL (-1)
781 #define VI_GPIB_UNADDRESSED (0)
782 #define VI_GPIB_TALKER (1)
783 #define VI_GPIB_LISTENER (2)
785 #define VI_VXI_CMD16 (0x0200)
786 #define VI_VXI_CMD16_RESP16 (0x0202)
787 #define VI_VXI_RESP16 (0x0002)
788 #define VI_VXI_CMD32 (0x0400)
789 #define VI_VXI_CMD32_RESP16 (0x0402)
790 #define VI_VXI_CMD32_RESP32 (0x0404)
791 #define VI_VXI_RESP32 (0x0004)
793 #define VI_ASSERT_SIGNAL (-1)
794 #define VI_ASSERT_USE_ASSIGNED (0)
795 #define VI_ASSERT_IRQ1 (1)
796 #define VI_ASSERT_IRQ2 (2)
797 #define VI_ASSERT_IRQ3 (3)
798 #define VI_ASSERT_IRQ4 (4)
799 #define VI_ASSERT_IRQ5 (5)
800 #define VI_ASSERT_IRQ6 (6)
801 #define VI_ASSERT_IRQ7 (7)
803 #define VI_UTIL_ASSERT_SYSRESET (1)
804 #define VI_UTIL_ASSERT_SYSFAIL (2)
805 #define VI_UTIL_DEASSERT_SYSFAIL (3)
807 #define VI_VXI_CLASS_MEMORY (0)
808 #define VI_VXI_CLASS_EXTENDED (1)
809 #define VI_VXI_CLASS_MESSAGE (2)
810 #define VI_VXI_CLASS_REGISTER (3)
811 #define VI_VXI_CLASS_OTHER (4)
813 #define VI_PXI_ADDR_NONE (0)
814 #define VI_PXI_ADDR_MEM (1)
815 #define VI_PXI_ADDR_IO (2)
816 #define VI_PXI_ADDR_CFG (3)
818 #define VI_TRIG_UNKNOWN (-1)
820 #define VI_PXI_LBUS_UNKNOWN (-1)
821 #define VI_PXI_LBUS_NONE (0)
822 #define VI_PXI_LBUS_STAR_TRIG_BUS_0 (1000)
823 #define VI_PXI_LBUS_STAR_TRIG_BUS_1 (1001)
824 #define VI_PXI_LBUS_STAR_TRIG_BUS_2 (1002)
825 #define VI_PXI_LBUS_STAR_TRIG_BUS_3 (1003)
826 #define VI_PXI_LBUS_STAR_TRIG_BUS_4 (1004)
827 #define VI_PXI_LBUS_STAR_TRIG_BUS_5 (1005)
828 #define VI_PXI_LBUS_STAR_TRIG_BUS_6 (1006)
829 #define VI_PXI_LBUS_STAR_TRIG_BUS_7 (1007)
830 #define VI_PXI_LBUS_STAR_TRIG_BUS_8 (1008)
831 #define VI_PXI_LBUS_STAR_TRIG_BUS_9 (1009)
832 #define VI_PXI_STAR_TRIG_CONTROLLER (1413)
836 #define viGetDefaultRM(vi) viOpenDefaultRM(vi)
837 #define VI_ERROR_INV_SESSION (VI_ERROR_INV_OBJECT)
838 #define VI_INFINITE (VI_TMO_INFINITE)
839 #define VI_NORMAL (VI_PROT_NORMAL)
840 #define VI_FDC (VI_PROT_FDC)
841 #define VI_HS488 (VI_PROT_HS488)
842 #define VI_ASRL488 (VI_PROT_4882_STRS)
843 #define VI_ASRL_IN_BUF (VI_IO_IN_BUF)
844 #define VI_ASRL_OUT_BUF (VI_IO_OUT_BUF)
845 #define VI_ASRL_IN_BUF_DISCARD (VI_IO_IN_BUF_DISCARD)
846 #define VI_ASRL_OUT_BUF_DISCARD (VI_IO_OUT_BUF_DISCARD)
850 #define VI_INTF_RIO (8)
851 #define VI_INTF_FIREWIRE (9)
853 #define VI_ATTR_SYNC_MXI_ALLOW_EN (0x3FFF0161UL)
857 #define VI_EVENT_VXI_DEV_CMD (0xBFFF200FUL)
858 #define VI_ATTR_VXI_DEV_CMD_TYPE (0x3FFF4037UL)
859 #define VI_ATTR_VXI_DEV_CMD_VALUE (0x3FFF4038UL)
861 #define VI_VXI_DEV_CMD_TYPE_16 (16)
862 #define VI_VXI_DEV_CMD_TYPE_32 (32)
864 ViStatus _VI_FUNC viVxiServantResponse(ViSession vi, ViInt16 mode, ViUInt32 resp);
866 #define VI_VXI_RESP_NONE (0)
867 #define VI_VXI_RESP_PROT_ERROR (-1)
871 #define VI_ATTR_ASRL_DISCARD_NULL (0x3FFF00B0UL)
872 #define VI_ATTR_ASRL_CONNECTED (0x3FFF01BBUL)
873 #define VI_ATTR_ASRL_BREAK_STATE (0x3FFF01BCUL)
874 #define VI_ATTR_ASRL_BREAK_LEN (0x3FFF01BDUL)
875 #define VI_ATTR_ASRL_ALLOW_TRANSMIT (0x3FFF01BEUL)
876 #define VI_ATTR_ASRL_WIRE_MODE (0x3FFF01BFUL)
878 #define VI_ASRL_WIRE_485_4 (0)
879 #define VI_ASRL_WIRE_485_2_DTR_ECHO (1)
880 #define VI_ASRL_WIRE_485_2_DTR_CTRL (2)
881 #define VI_ASRL_WIRE_485_2_AUTO (3)
882 #define VI_ASRL_WIRE_232_DTE (128)
883 #define VI_ASRL_WIRE_232_DCE (129)
884 #define VI_ASRL_WIRE_232_AUTO (130)
886 #define VI_EVENT_ASRL_BREAK (0x3FFF2023UL)
887 #define VI_EVENT_ASRL_CTS (0x3FFF2029UL)
888 #define VI_EVENT_ASRL_DSR (0x3FFF202AUL)
889 #define VI_EVENT_ASRL_DCD (0x3FFF202CUL)
890 #define VI_EVENT_ASRL_RI (0x3FFF202EUL)
891 #define VI_EVENT_ASRL_CHAR (0x3FFF2035UL)
892 #define VI_EVENT_ASRL_TERMCHAR (0x3FFF2024UL)
896 #if defined(NIVISA_PEEKPOKE)
898 #if defined(NIVISA_PEEKPOKE_SUPP)
899 #undef NIVISA_PEEKPOKE_SUPP
902 #if (defined(WIN32) || defined(_WIN32) || defined(__WIN32__) || defined(__NT__)) && !defined(_NI_mswin16_)
904 #define NIVISA_PEEKPOKE_SUPP
905 #elif (defined(_WINDOWS) || defined(_Windows)) && !defined(_CVI_) && !defined(_NI_mswin16_)
907 #define NIVISA_PEEKPOKE_SUPP
908 #elif defined(_CVI_) && defined(_NI_sparc_)
910 #define NIVISA_PEEKPOKE_SUPP
915 #if defined(NIVISA_PEEKPOKE_SUPP)
917 extern ViBoolean NI_viImplVISA1;
918 ViStatus _VI_FUNC NI_viOpenDefaultRM (ViPSession vi);
919 #define viOpenDefaultRM(vi) NI_viOpenDefaultRM(vi)
921 #define viPeek8(vi,addr,val) \
923 if ((NI_viImplVISA1) && (*((ViPUInt32)(vi)))) \
925 do (*((ViPUInt8)(val)) = *((volatile ViUInt8 _VI_PTR)(addr))); \
926 while (**((volatile ViUInt8 _VI_PTR _VI_PTR)(vi)) & 0x10); \
930 (viPeek8)((vi),(addr),(val)); \
934 #define viPoke8(vi,addr,val) \
936 if ((NI_viImplVISA1) && (*((ViPUInt32)(vi)))) \
938 do (*((volatile ViUInt8 _VI_PTR)(addr)) = ((ViUInt8)(val))); \
939 while (**((volatile ViUInt8 _VI_PTR _VI_PTR)(vi)) & 0x10); \
943 (viPoke8)((vi),(addr),(val)); \
947 #define viPeek16(vi,addr,val) \
949 if ((NI_viImplVISA1) && (*((ViPUInt32)(vi)))) \
951 do (*((ViPUInt16)(val)) = *((volatile ViUInt16 _VI_PTR)(addr))); \
952 while (**((volatile ViUInt8 _VI_PTR _VI_PTR)(vi)) & 0x10); \
956 (viPeek16)((vi),(addr),(val)); \
960 #define viPoke16(vi,addr,val) \
962 if ((NI_viImplVISA1) && (*((ViPUInt32)(vi)))) \
964 do (*((volatile ViUInt16 _VI_PTR)(addr)) = ((ViUInt16)(val))); \
965 while (**((volatile ViUInt8 _VI_PTR _VI_PTR)(vi)) & 0x10); \
969 (viPoke16)((vi),(addr),(val)); \
973 #define viPeek32(vi,addr,val) \
975 if ((NI_viImplVISA1) && (*((ViPUInt32)(vi)))) \
977 do (*((ViPUInt32)(val)) = *((volatile ViUInt32 _VI_PTR)(addr))); \
978 while (**((volatile ViUInt8 _VI_PTR _VI_PTR)(vi)) & 0x10); \
982 (viPeek32)((vi),(addr),(val)); \
986 #define viPoke32(vi,addr,val) \
988 if ((NI_viImplVISA1) && (*((ViPUInt32)(vi)))) \
990 do (*((volatile ViUInt32 _VI_PTR)(addr)) = ((ViUInt32)(val))); \
991 while (**((volatile ViUInt8 _VI_PTR _VI_PTR)(vi)) & 0x10); \
995 (viPoke32)((vi),(addr),(val)); \
1003 #if defined(NIVISA_PXI) || defined(PXISAVISA_PXI)
1011 #define VI_ATTR_PXI_SUB_MANF_ID (0x3FFF0203UL)
1012 #define VI_ATTR_PXI_SUB_MODEL_CODE (0x3FFF0204UL)
1015 #define VI_ATTR_PXI_SRC_TRIG_BUS (0x3FFF020DUL)
1016 #define VI_ATTR_PXI_DEST_TRIG_BUS (0x3FFF020EUL)
1018 #define VI_ATTR_PXI_RECV_INTR_SEQ (0x3FFF4240UL)
1019 #define VI_ATTR_PXI_RECV_INTR_DATA (0x3FFF4241UL)
1023 #if defined(NIVISA_USB)
1025 #define VI_ATTR_USB_BULK_OUT_PIPE (0x3FFF01A2UL)
1026 #define VI_ATTR_USB_BULK_IN_PIPE (0x3FFF01A3UL)
1027 #define VI_ATTR_USB_INTR_IN_PIPE (0x3FFF01A4UL)
1028 #define VI_ATTR_USB_CLASS (0x3FFF01A5UL)
1029 #define VI_ATTR_USB_SUBCLASS (0x3FFF01A6UL)
1030 #define VI_ATTR_USB_ALT_SETTING (0x3FFF01A8UL)
1031 #define VI_ATTR_USB_END_IN (0x3FFF01A9UL)
1032 #define VI_ATTR_USB_NUM_INTFCS (0x3FFF01AAUL)
1033 #define VI_ATTR_USB_NUM_PIPES (0x3FFF01ABUL)
1034 #define VI_ATTR_USB_BULK_OUT_STATUS (0x3FFF01ACUL)
1035 #define VI_ATTR_USB_BULK_IN_STATUS (0x3FFF01ADUL)
1036 #define VI_ATTR_USB_INTR_IN_STATUS (0x3FFF01AEUL)
1037 #define VI_ATTR_USB_CTRL_PIPE (0x3FFF01B0UL)
1039 #define VI_USB_PIPE_STATE_UNKNOWN (-1)
1040 #define VI_USB_PIPE_READY (0)
1041 #define VI_USB_PIPE_STALLED (1)
1043 #define VI_USB_END_NONE (0)
1044 #define VI_USB_END_SHORT (4)
1045 #define VI_USB_END_SHORT_OR_COUNT (5)
1049 #define VI_ATTR_FIREWIRE_DEST_UPPER_OFFSET (0x3FFF01F0UL)
1050 #define VI_ATTR_FIREWIRE_SRC_UPPER_OFFSET (0x3FFF01F1UL)
1051 #define VI_ATTR_FIREWIRE_WIN_UPPER_OFFSET (0x3FFF01F2UL)
1052 #define VI_ATTR_FIREWIRE_VENDOR_ID (0x3FFF01F3UL)
1053 #define VI_ATTR_FIREWIRE_LOWER_CHIP_ID (0x3FFF01F4UL)
1054 #define VI_ATTR_FIREWIRE_UPPER_CHIP_ID (0x3FFF01F5UL)
1056 #define VI_FIREWIRE_DFLT_SPACE (5)
1058 #if defined(__cplusplus) || defined(__cplusplus__)