THM1176InstrumentManager  1.0
Qt Object abstraction for Metrolab THM1176
visatype.h
Go to the documentation of this file.
1 // Copyright (c) 2020 Metrolab Technology S.A., Geneva, Switzerland (www.metrolab.com)
2 // See the included file LICENSE.txt for the licensing conditions.
3 
4 /*---------------------------------------------------------------------------*/
5 /* Distributed by IVI Foundation Inc. */
6 /* */
7 /* Do not modify the contents of this file. */
8 /*---------------------------------------------------------------------------*/
9 /* */
10 /* Title : VISATYPE.H */
11 /* Date : 07-22-2015 */
12 /* Purpose : Fundamental VISA data types and macro definitions */
13 /* */
14 /*---------------------------------------------------------------------------*/
15 
16 /* IviVisaType.h defines the include guard of this file for backward
17  * compatibility reasons. Please ensure that changes in this file are reflected
18  * in IviVisaType.h when necessary.
19  */
20 #ifndef __VISATYPE_HEADER__
21 #define __VISATYPE_HEADER__
22 
23 #if defined(_WIN64)
24 #define _VI_FAR
25 #define _VI_FUNC __fastcall
26 #define _VI_FUNCC __fastcall
27 #define _VI_FUNCH __fastcall
28 #define _VI_SIGNED signed
29 #elif (defined(WIN32) || defined(_WIN32) || defined(__WIN32__) || defined(__NT__)) && !defined(_NI_mswin16_)
30 #define _VI_FAR
31 #define _VI_FUNC __stdcall
32 #define _VI_FUNCC __cdecl
33 #define _VI_FUNCH __stdcall
34 #define _VI_SIGNED signed
35 #elif defined(_CVI_) && defined(_NI_i386_)
36 #define _VI_FAR
37 #define _VI_FUNC _pascal
38 #define _VI_FUNCC
39 #define _VI_FUNCH _pascal
40 #define _VI_SIGNED signed
41 #elif (defined(_WINDOWS) || defined(_Windows)) && !defined(_NI_mswin16_)
42 #define _VI_FAR _far
43 #define _VI_FUNC _far _pascal _export
44 #define _VI_FUNCC _far _cdecl _export
45 #define _VI_FUNCH _far _pascal
46 #define _VI_SIGNED signed
47 #elif (defined(hpux) || defined(__hpux)) && (defined(__cplusplus) || defined(__cplusplus__))
48 #define _VI_FAR
49 #define _VI_FUNC
50 #define _VI_FUNCC
51 #define _VI_FUNCH
52 #define _VI_SIGNED
53 #else
54 #define _VI_FAR
55 #define _VI_FUNC
56 #define _VI_FUNCC
57 #define _VI_FUNCH
58 #define _VI_SIGNED signed
59 #endif
60 
61 #define _VI_ERROR (-2147483647L-1) /* 0x80000000 */
62 #define _VI_PTR _VI_FAR *
63 
64 /*- VISA Types --------------------------------------------------------------*/
65 
66 #ifndef _VI_INT64_UINT64_DEFINED
67 #if defined(_WIN64) || ((defined(WIN32) || defined(_WIN32) || defined(__WIN32__) || defined(__NT__)) && !defined(_NI_mswin16_))
68 #if (defined(_MSC_VER) && (_MSC_VER >= 1200)) || (defined(_CVI_) && (_CVI_ >= 700)) || (defined(__BORLANDC__) && (__BORLANDC__ >= 0x0520)) || defined(__LCC__) || (defined(__GNUC__) && (__GNUC__ >= 3)) || (defined(__clang__) && (__clang_major__ >= 3))
69 typedef unsigned __int64 ViUInt64;
70 typedef _VI_SIGNED __int64 ViInt64;
71 #define _VI_INT64_UINT64_DEFINED
72 #if defined(_WIN64)
73 #define _VISA_ENV_IS_64_BIT
74 #else
75 /* This is a 32-bit OS, not a 64-bit OS */
76 #endif
77 #endif
78 #elif defined(__GNUC__) && (__GNUC__ >= 3)
79 #include <limits.h>
80 #include <sys/types.h>
81 typedef u_int64_t ViUInt64;
82 typedef int64_t ViInt64;
83 #define _VI_INT64_UINT64_DEFINED
84 #if defined(LONG_MAX) && (LONG_MAX > 0x7FFFFFFFL)
85 #define _VISA_ENV_IS_64_BIT
86 #else
87 /* This is a 32-bit OS, not a 64-bit OS */
88 #endif
89 #else
90 /* This platform does not support 64-bit types */
91 #endif
92 #endif
93 
94 #if defined(_VI_INT64_UINT64_DEFINED)
95 typedef ViUInt64 _VI_PTR ViPUInt64;
96 typedef ViUInt64 _VI_PTR ViAUInt64;
97 typedef ViInt64 _VI_PTR ViPInt64;
98 typedef ViInt64 _VI_PTR ViAInt64;
99 #endif
100 
101 #if defined(LONG_MAX) && (LONG_MAX > 0x7FFFFFFFL)
102 typedef unsigned int ViUInt32;
103 typedef _VI_SIGNED int ViInt32;
104 #else
105 typedef unsigned long ViUInt32;
106 typedef _VI_SIGNED long ViInt32;
107 #endif
108 
113 
114 typedef unsigned short ViUInt16;
117 
118 typedef _VI_SIGNED short ViInt16;
121 
122 typedef unsigned char ViUInt8;
125 
126 typedef _VI_SIGNED char ViInt8;
129 
130 typedef char ViChar;
133 
134 typedef unsigned char ViByte;
137 
138 typedef void _VI_PTR ViAddr;
141 
142 typedef float ViReal32;
145 
146 typedef double ViReal64;
149 
150 typedef ViPByte ViBuf;
151 typedef ViPByte ViPBuf;
153 
157 
158 typedef ViString ViRsrc;
161 
165 
169 
173 
177 
181 
182 typedef ViUInt32 ViAttr;
183 
184 #ifndef _VI_CONST_STRING_DEFINED
185 typedef const ViChar * ViConstString;
186 #define _VI_CONST_STRING_DEFINED
187 #endif
188 
189 /*- Completion and Error Codes ----------------------------------------------*/
190 
191 #define VI_SUCCESS (0L)
192 
193 /*- Other VISA Definitions --------------------------------------------------*/
194 
195 #define VI_NULL (0)
196 
197 #define VI_TRUE (1)
198 #define VI_FALSE (0)
199 
200 /*- Backward Compatibility Macros -------------------------------------------*/
201 
202 #define VISAFN _VI_FUNC
203 #define ViPtr _VI_PTR
204 
205 #endif
206 
207 /*- The End -----------------------------------------------------------------*/
208 
ViPUInt16
ViUInt16 _VI_PTR ViPUInt16
Definition: visatype.h:115
ViAUInt8
ViUInt8 _VI_PTR ViAUInt8
Definition: visatype.h:124
ViAddr
void _VI_PTR ViAddr
Definition: visatype.h:138
ViUInt8
unsigned char ViUInt8
Definition: visatype.h:122
ViReal32
float ViReal32
Definition: visatype.h:142
ViAReal64
ViReal64 _VI_PTR ViAReal64
Definition: visatype.h:148
ViInt8
_VI_SIGNED char ViInt8
Definition: visatype.h:126
ViObject
ViUInt32 ViObject
Definition: visatype.h:174
ViPByte
ViByte _VI_PTR ViPByte
Definition: visatype.h:135
ViPSession
ViSession _VI_PTR ViPSession
Definition: visatype.h:179
ViARsrc
ViString _VI_PTR ViARsrc
Definition: visatype.h:160
ViPChar
ViChar _VI_PTR ViPChar
Definition: visatype.h:131
ViPBuf
ViPByte ViPBuf
Definition: visatype.h:151
ViABuf
ViPByte _VI_PTR ViABuf
Definition: visatype.h:152
ViAVersion
ViVersion _VI_PTR ViAVersion
Definition: visatype.h:172
ViString
ViPChar ViString
Definition: visatype.h:154
ViUInt32
unsigned long ViUInt32
Definition: visatype.h:105
ViAChar
ViChar _VI_PTR ViAChar
Definition: visatype.h:132
ViReal64
double ViReal64
Definition: visatype.h:146
ViASession
ViSession _VI_PTR ViASession
Definition: visatype.h:180
ViInt16
_VI_SIGNED short ViInt16
Definition: visatype.h:118
ViAObject
ViObject _VI_PTR ViAObject
Definition: visatype.h:176
ViSession
ViObject ViSession
Definition: visatype.h:178
ViAByte
ViByte _VI_PTR ViAByte
Definition: visatype.h:136
ViPReal64
ViReal64 _VI_PTR ViPReal64
Definition: visatype.h:147
ViPUInt8
ViUInt8 _VI_PTR ViPUInt8
Definition: visatype.h:123
ViConstString
const ViChar * ViConstString
Definition: visatype.h:185
_VI_PTR
#define _VI_PTR
Definition: visatype.h:62
ViPInt16
ViInt16 _VI_PTR ViPInt16
Definition: visatype.h:119
ViPReal32
ViReal32 _VI_PTR ViPReal32
Definition: visatype.h:143
ViABoolean
ViBoolean _VI_PTR ViABoolean
Definition: visatype.h:164
ViByte
unsigned char ViByte
Definition: visatype.h:134
ViAStatus
ViStatus _VI_PTR ViAStatus
Definition: visatype.h:168
ViPString
ViPChar ViPString
Definition: visatype.h:155
ViAUInt16
ViUInt16 _VI_PTR ViAUInt16
Definition: visatype.h:116
ViChar
char ViChar
Definition: visatype.h:130
ViAInt16
ViInt16 _VI_PTR ViAInt16
Definition: visatype.h:120
ViAString
ViPChar _VI_PTR ViAString
Definition: visatype.h:156
ViPInt8
ViInt8 _VI_PTR ViPInt8
Definition: visatype.h:127
ViInt32
_VI_SIGNED long ViInt32
Definition: visatype.h:106
ViBoolean
ViUInt16 ViBoolean
Definition: visatype.h:162
ViRsrc
ViString ViRsrc
Definition: visatype.h:158
ViPStatus
ViStatus _VI_PTR ViPStatus
Definition: visatype.h:167
ViAttr
ViUInt32 ViAttr
Definition: visatype.h:182
ViAAddr
ViAddr _VI_PTR ViAAddr
Definition: visatype.h:140
ViAInt32
ViInt32 _VI_PTR ViAInt32
Definition: visatype.h:112
ViPUInt32
ViUInt32 _VI_PTR ViPUInt32
Definition: visatype.h:109
ViAReal32
ViReal32 _VI_PTR ViAReal32
Definition: visatype.h:144
ViPInt32
ViInt32 _VI_PTR ViPInt32
Definition: visatype.h:111
ViPVersion
ViVersion _VI_PTR ViPVersion
Definition: visatype.h:171
ViStatus
ViInt32 ViStatus
Definition: visatype.h:166
_VI_SIGNED
#define _VI_SIGNED
Definition: visatype.h:58
ViAUInt32
ViUInt32 _VI_PTR ViAUInt32
Definition: visatype.h:110
ViAInt8
ViInt8 _VI_PTR ViAInt8
Definition: visatype.h:128
ViUInt16
unsigned short ViUInt16
Definition: visatype.h:114
ViBuf
ViPByte ViBuf
Definition: visatype.h:150
ViPAddr
ViAddr _VI_PTR ViPAddr
Definition: visatype.h:139
ViPRsrc
ViString ViPRsrc
Definition: visatype.h:159
ViPBoolean
ViBoolean _VI_PTR ViPBoolean
Definition: visatype.h:163
ViVersion
ViUInt32 ViVersion
Definition: visatype.h:170
ViPObject
ViObject _VI_PTR ViPObject
Definition: visatype.h:175