/*---------------------------------------------------------------------------*/
/* Distributed by Agilent Technologies */
/* */
/* Do not modify the contents of this file. */
/*---------------------------------------------------------------------------*/
/* */
/* Title : VISA.H */
/* Date : 12-06-2010 */
/* Purpose : Include file for the VISA Library 4.0 specification */
/* with Agilent extensions. */
/* */
/*---------------------------------------------------------------------------*/
#ifndef __VISA_HEADER__
#define __VISA_HEADER__
#include <stdarg.h>
#if !defined(__VISATYPE_HEADER__)
#include "visatype.h"
#endif
#define VI_SPEC_VERSION (0x00400000UL)
#if defined(__cplusplus) || defined(__cplusplus__)
extern "C" {
#endif
#if defined(_CVI_)
#pragma EnableLibraryRuntimeChecking
#endif
/*- VISA Types --------------------------------------------------------------*/
typedef ViObject ViEvent;
typedef ViEvent _VI_PTR ViPEvent;
typedef ViObject ViFindList;
typedef ViFindList _VI_PTR ViPFindList;
#if defined(_VI_INT64_UINT64_DEFINED) && defined(_VISA_ENV_IS_64_BIT)
typedef ViUInt64 ViBusAddress;
typedef ViUInt64 ViBusSize;
typedef ViUInt64 ViAttrState;
#else
typedef ViUInt32 ViBusAddress;
typedef ViUInt32 ViBusSize;
typedef ViUInt32 ViAttrState;
#endif
#if defined(_VI_INT64_UINT64_DEFINED)
typedef ViUInt64 ViBusAddress64;
typedef ViBusAddress64 _VI_PTR ViPBusAddress64;
#endif
typedef ViUInt32 ViEventType;
typedef ViEventType _VI_PTR ViPEventType;
typedef ViEventType _VI_PTR ViAEventType;
typedef void _VI_PTR ViPAttrState;
typedef ViAttr _VI_PTR ViPAttr;
typedef ViAttr _VI_PTR ViAAttr;
typedef ViString ViKeyId;
typedef ViPString ViPKeyId;
typedef ViUInt32 ViJobId;
typedef ViJobId _VI_PTR ViPJobId;
typedef ViUInt32 ViAccessMode;
typedef ViAccessMode _VI_PTR ViPAccessMode;
typedef ViBusAddress _VI_PTR ViPBusAddress;
typedef ViUInt32 ViEventFilter;
typedef va_list ViVAList;
typedef ViStatus (_VI_FUNCH _VI_PTR ViHndlr)
(ViSession vi, ViEventType eventType, ViEvent event, ViAddr userHandle);
/*- Resource Manager Functions and Operations -------------------------------*/
ViStatus _VI_FUNC viOpenDefaultRM (ViPSession vi);
ViStatus _VI_FUNC viFindRsrc (ViSession sesn, ViString expr, ViPFindList vi,
ViPUInt32 retCnt, ViChar _VI_FAR desc[]);
ViStatus _VI_FUNC viFindNext (ViFindList vi, ViChar _VI_FAR desc[]);
ViStatus _VI_FUNC viParseRsrc (ViSession rmSesn, ViRsrc rsrcName,
ViPUInt16 intfType, ViPUInt16 intfNum);
ViStatus _VI_FUNC viParseRsrcEx (ViSession rmSesn, ViRsrc rsrcName, ViPUInt16 intfType,
ViPUInt16 intfNum, ViChar _VI_FAR rsrcClass[],
ViChar _VI_FAR expandedUnaliasedName[],
ViChar _VI_FAR aliasIfExists[]);
ViStatus _VI_FUNC viOpen (ViSession sesn, ViRsrc name, ViAccessMode mode,
ViUInt32 timeout, ViPSession vi);
/*- Resource Template Operations --------------------------------------------*/
ViStatus _VI_FUNC viClose (ViObject vi);
ViStatus _VI_FUNC viSetAttribute (ViObject vi, ViAttr attrName, ViAttrState attrValue);
ViStatus _VI_FUNC viGetAttribute (ViObject vi, ViAttr attrName, void _VI_PTR attrValue);
ViStatus _VI_FUNC viStatusDesc (ViObject vi, ViStatus status, ViChar _VI_FAR desc[]);
ViStatus _VI_FUNC viTerminate (ViObject vi, ViUInt16 degree, ViJobId jobId);
ViStatus _VI_FUNC viLock (ViSession vi, ViAccessMode lockType, ViUInt32 timeout,
ViKeyId requestedKey, ViChar _VI_FAR accessKey[]);
ViStatus _VI_FUNC viUnlock (ViSession vi);
ViStatus _VI_FUNC viEnableEvent (ViSession vi, ViEventType eventType, ViUInt16 mechanism,
ViEventFilter context);
ViStatus _VI_FUNC viDisableEvent (ViSession vi, ViEventType eventType, ViUInt16 mechanism);
ViStatus _VI_FUNC viDiscardEvents (ViSession vi, ViEventType eventType, ViUInt16 mechanism);
ViStatus _VI_FUNC viWaitOnEvent (ViSession vi, ViEventType inEventType, ViUInt32 timeout,
ViPEventType outEventType, ViPEvent outContext);
ViStatus _VI_FUNC viInstallHandler(ViSession vi, ViEventType eventType, ViHndlr handler,
ViAddr userHandle);
ViStatus _VI_FUNC viUninstallHandler(ViSession vi, ViEventType eventType, ViHndlr handler,
ViAddr userHandle);
/*- Basic I/O Operations ----------------------------------------------------*/
ViStatus _VI_FUNC viRead (ViSession vi, ViPBuf buf, ViUInt32 cnt, ViPUInt32 retCnt);
ViStatus _VI_FUNC viReadAsync (ViSession vi, ViPBuf buf, ViUInt32 cnt, ViPJobId jobId);
ViStatus _VI_FUNC viReadToFile (ViSession vi, ViConstString filename, ViUInt32 cnt,
ViPUInt32 retCnt);
ViStatus _VI_FUNC viWrite (ViSession vi, ViBuf buf, ViUInt32 cnt, ViPUInt32 retCnt);
ViStatus _VI_FUNC viWriteAsync (ViSession vi, ViBuf buf, ViUInt32 cnt, ViPJobId jobId);
ViStatus _VI_FUNC viWriteFromFile (ViSession vi, ViConstString filename, ViUInt32 cnt,
ViPUInt32 retCnt);
ViStatus _VI_FUNC viAssertTrigger (ViSession vi, ViUInt16 protocol);
ViStatus _VI_FUNC viReadSTB (ViSession vi, ViPUInt16 status);
ViStatus _VI_FUNC viClear (ViSession vi);
/*- Formatted and Buffered I/O Operations -----------------------------------*/
ViStatus _VI_FUNC viSetBuf (ViSession vi, ViUInt16 mask, ViUInt32 size);
ViStatus _VI_FUNC viFlush (ViSession vi, ViUInt16 mask);
ViStatus _VI_FUNC viBufWrite (ViSession vi, ViBuf buf, ViUInt32 cnt, ViPUInt32 retCnt);
ViStatus _VI_FUNC viBufRead (ViSession vi, ViPBuf buf, ViUInt32 cnt, ViPUInt32 retCnt);
ViStatus _VI_FUNCC viPrintf (ViSession vi, ViString writeFmt, ...);
ViStatus _VI_FUNC viVPrintf (ViSession vi, ViString writeFmt, ViVAList params);
ViStatus _VI_FUNCC viSPrintf (ViSession vi, ViPBuf buf, ViString writeFmt, ...);
ViStatus _VI_FUNC viVSPrintf (ViSession vi, ViPBuf buf, ViString writeFmt,
ViVAList parms);
ViStatus _VI_FUNCC viScanf (ViSession vi, ViString readFmt, ...);
ViStatus _VI_FUNC viVScanf (ViSession vi, ViString readFmt, ViVAList params);
ViStatus _VI_FUNCC viSScanf (ViSession vi, ViBuf buf, ViString readFmt, ...);
ViStatus _VI_FUNC viVSScanf (ViSession vi, ViBuf buf, ViString readFmt,
ViVAList parms);
ViStatus _VI_FUNCC viQueryf (ViSession vi, ViString writeFmt, ViString readFmt, ...);
ViStatus _VI_FUNC viVQueryf (ViSession vi, ViString writeFmt, ViString readFmt,
ViVAList params);
/*- Memory I/O Operations ---------------------------------------------------*/
ViStatus _VI_FUNC viIn8 (ViSession vi, ViUInt16 space,
ViBusAddress offset, ViPUInt8 val8);
ViStatus _VI_FUNC viOu