 |
THM1176InstrumentManager
1.0
Qt Object abstraction for Metrolab THM1176
|
Go to the documentation of this file.
117 "USBTMC FindResources: Invalid filter",
118 "USBTMC FindResources: Failed to find USBTMC-USB488 interface",
119 "USBTMC GetDeviceListEntry: Resource not found",
120 "USBTMC Write: invalid transfer count",
121 "USBTMC Read: Buffer is invalid for append read (no room for read header)",
122 "USBTMC Read: Read header is invalid",
123 "USBTMC Read: Message size is wrong",
124 "USBTMC Clear: Response error",
125 "USBTMC Clear BulkIn: Response error",
126 "USBTMC Clear BulkOut: Response error",
127 "USBTMC ReadSTB: Control endpoint response error",
128 "USBTMC ReadSTB: Interrupt endpoint response error",
129 "USBTMC: Instrument is locked by someone else",
130 "USBTMC: Instrument is not open"
140 #define R8(x) ((unsigned)((const U8*)(x))[0])
147 #define RB16(x) (((unsigned)((const U8*)(x))[0] << 8) | \
148 (unsigned)((const U8*)(x))[1])
155 #define RL16(x) (((unsigned)((const U8*)(x))[1] << 8) | \
156 (unsigned)((const U8*)(x))[0])
163 #define RB16S(x) ((int16_t) \
164 (((unsigned)((const U8*)(x))[0] << 8) | \
165 (unsigned)((const U8*)(x))[1]))
172 #define RL16S(x) ((int16_t) \
173 (((unsigned)((const U8*)(x))[1] << 8) | \
174 (unsigned)((const U8*)(x))[0]))
181 #define RB32(x) (((unsigned)((const U8*)(x))[0] << 24) | \
182 ((unsigned)((const U8*)(x))[1] << 16) | \
183 ((unsigned)((const U8*)(x))[2] << 8) | \
184 (unsigned)((const U8*)(x))[3])
191 #define RL32(x) (((unsigned)((const U8*)(x))[3] << 24) | \
192 ((unsigned)((const U8*)(x))[2] << 16) | \
193 ((unsigned)((const U8*)(x))[1] << 8) | \
194 (unsigned)((const U8*)(x))[0])
201 #define RB32S(x) ((int32_t) \
202 (((unsigned)((const U8*)(x))[0] << 24) | \
203 ((unsigned)((const U8*)(x))[1] << 16) | \
204 ((unsigned)((const U8*)(x))[2] << 8) | \
205 (unsigned)((const U8*)(x))[3]))
212 #define RL32S(x) ((int32_t) \
213 (((unsigned)((const U8*)(x))[3] << 24) | \
214 ((unsigned)((const U8*)(x))[2] << 16) | \
215 ((unsigned)((const U8*)(x))[1] << 8) | \
216 (unsigned)((const U8*)(x))[0]))
223 #define RB64(x) (((uint64_t)((const U8*)(x))[0] << 56) | \
224 ((uint64_t)((const U8*)(x))[1] << 48) | \
225 ((uint64_t)((const U8*)(x))[2] << 40) | \
226 ((uint64_t)((const U8*)(x))[3] << 32) | \
227 ((uint64_t)((const U8*)(x))[4] << 24) | \
228 ((uint64_t)((const U8*)(x))[5] << 16) | \
229 ((uint64_t)((const U8*)(x))[6] << 8) | \
230 (uint64_t)((const U8*)(x))[7])
237 #define RL64(x) (((uint64_t)((const U8*)(x))[7] << 56) | \
238 ((uint64_t)((const U8*)(x))[6] << 48) | \
239 ((uint64_t)((const U8*)(x))[5] << 40) | \
240 ((uint64_t)((const U8*)(x))[4] << 32) | \
241 ((uint64_t)((const U8*)(x))[3] << 24) | \
242 ((uint64_t)((const U8*)(x))[2] << 16) | \
243 ((uint64_t)((const U8*)(x))[1] << 8) | \
244 (uint64_t)((const U8*)(x))[0])
251 #define RL64S(x) ((int64_t) \
252 (((uint64_t)((const U8*)(x))[7] << 56) | \
253 ((uint64_t)((const U8*)(x))[6] << 48) | \
254 ((uint64_t)((const U8*)(x))[5] << 40) | \
255 ((uint64_t)((const U8*)(x))[4] << 32) | \
256 ((uint64_t)((const U8*)(x))[3] << 24) | \
257 ((uint64_t)((const U8*)(x))[2] << 16) | \
258 ((uint64_t)((const U8*)(x))[1] << 8) | \
259 (uint64_t)((const U8*)(x))[0]))
266 #define RBFL(x) ((union { uint32_t u; float f; }) { .u = RB32(x) }.f)
273 #define RLFL(x) ((union { uint32_t u; float f; }) { .u = RL32(x) }.f)
280 #define W8(p, x) do { ((U8*)(p))[0] = (U8) (x); } while (0)
287 #define WB16(p, x) do { ((U8*)(p))[1] = (U8) (x); \
288 ((U8*)(p))[0] = (U8)((x)>>8); } while (0)
295 #define WL16(p, x) do { ((U8*)(p))[0] = (U8) (x); \
296 ((U8*)(p))[1] = (U8)((x)>>8); } while (0)
303 #define WB32(p, x) do { ((U8*)(p))[3] = (U8) (x); \
304 ((U8*)(p))[2] = (U8)((x)>>8); \
305 ((U8*)(p))[1] = (U8)((x)>>16); \
306 ((U8*)(p))[0] = (U8)((x)>>24); } while (0)
313 #define WL32(p, x) do { ((U8*)(p))[0] = (U8) (x); \
314 ((U8*)(p))[1] = (U8)((x)>>8); \
315 ((U8*)(p))[2] = (U8)((x)>>16); \
316 ((U8*)(p))[3] = (U8)((x)>>24); } while (0)
323 #define WBFL(p, x) WB32(p, (union { uint32_t u; float f; }) { .f = x }.u)
330 #define WLFL(p, x) WL32(p, (union { uint32_t u; float f; }) { .f = x }.u)
static const I32 USBTMC_BULK_MIN_BUFFER_SIZE
static const U8 USB488_DEV_CAP_SCPI
static const U8 USBTMC_INT_CAP_INDICATOR
@ USBTMC_ERROR_FIND_RESRC_BAD_FILTER
static const U8 BULKIN_FIFO_BYTES
static const U8 USBTMC_BM_REQUEST_TYPE_IN_CLS_EP
static const U8 USB488_DEV_CAP_SR1
@ USBTMC_ERROR_GET_RESRC_NOT_FOUND
static const I32 USB_MAX_PORT_DEPTH
static const U16 USBTMC_READSTB_INTR_RESP_LENGTH
@ USBTMC_ERROR_INSTRUMENT_LOCKED
@ USBTMC_ERROR_READSTB_CONTROL_RESPONSE_ERROR
@ USBTMC_ERROR_CLEAR_RESPONSE_ERROR
Abstract IEEE488 instrument class: type definitions.
@ INITIATE_ABORT_BULK_OUT
static const U8 USBTMC_INT_CAP_LISTEN_ONLY
static const U16 USBTMC_INITIATE_ABORT_BULKOUT_RESP_LENGTH
static const U16 USBTMC_READSTB_CTRL_RESP_LENGTH
static const U8 USBTMC_DEV_CAP_TERMCHAR
@ USBTMC_ERROR_READ_WRONG_MSG_SIZE
static const U16 USBTMC_INITIATE_ABORT_BULKIN_RESP_LENGTH
static const U8 USBTMC_USB488
static const U8 REQUEST_DEV_DEP_MSG_IN
@ USBTMC_STATUS_INTERRUPT_IN_BUSY
static const U8 USBTMC_BM_REQUEST_TYPE_IN_CLS_IF
static const I32 USBTMC_BULK_TRIGGER_MSG_SIZE
static const I32 USBTMC_BULK_HEADER_SIZE
@ USBTMC_STATUS_TRANSFER_NOT_IN_PROGRESS
static const U8 SUBCLASS_USBTMC
Constants for USBTMC and USB488.
@ USBTMC_STATUS_SPLIT_NOT_IN_PROGRESS
@ USBTMC_ERROR_READSTB_INTERRUPT_RESPONSE_ERROR
@ USBTMC_ERROR_WRITE_INVALID_TRANSFER_COUNT
static const U8 TERM_CHAR_ENABLED
static const U8 DEV_DEP_MSG_OUT
static const U16 USBTMC_READ_BUFFER_SIZE
@ USBTMC_ERROR_CLEAR_BULKIN_RESPONSE_ERROR
int I32
32-bit signed integer.
static const U16 USBTMC_CHECK_CLEAR_STATUS_RESP_LENGTH
static const U16 USB_CONTROL_ENDPOINT_NUMBER
@ USBTMC_ERROR_FIND_RESRC_NO_USBTMC_USB488
static const U16 USBTMC_INITIATE_CLEAR_RESP_LENGTH
static const U16 USBTMC_CHECK_ABORT_BULKOUT_STATUS_RESP_LENGTH
static const U8 DEV_DEP_MSG_IN
static const U32 USBTMC_CHECK_CLEAR_STATUS_INTERVAL
@ CHECK_ABORT_BULK_IN_STATUS
static const U8 USB488_DEV_CAP_DT1
static const U16 USBTMC_CHECK_ABORT_BULKIN_STATUS_RESP_LENGTH
@ USBTMC_ERROR_READ_INVALID_HEADER
unsigned char U8
Unsigned byte.
@ USBTMC_ERROR_READ_INVALID_BUFFER_FOR_APPEND
static const U8 USB488_DEV_CAP_RL1
unsigned short U16
16-bit unsigned integer.
@ USBTMC_ERROR_CLEAR_BULKOUT_RESPONSE_ERROR
static const U8 USBTMC_INT_CAP_TALK_ONLY
@ USBTMC_ERROR_DEVICE_NOT_OPEN
static const char * USBTMC_ERROR_EXPLANATION[]
Error explanations.
USBTMCError
Error codes. Complementary to libusb errors (0 to -99).
unsigned int U32
32-bit unsigned integer.
@ USBTMC_STATUS_SPLIT_IN_PROGRESS
@ CHECK_ABORT_BULK_OUT_STATUS
static const U32 USB_DESCRIPTOR_STRING_LENGTH