| THM1176InstrumentManager 1.2 Qt Object abstraction for Metrolab THM1176

Loading...
Searching...
No Matches
USBTMCInstrument.cpp File Reference

USBTMC driver based on libusb: implementation. More...

`#include <string>`
`#include <cstring>`
`#include <regex>`
`#include <map>`
`#include <chrono>`
`#include <thread>`
`#include "USBTMCInstrument.h"`
`#include "USBTMCPrivate.h"`
`#include "OSDefines.h"`
`#include "Helpers.h"`
Include dependency graph for USBTMCInstrument.cpp:

Go to the source code of this file.

## Classes
class | tControlRecord

## Macros
#define | DEBUG_MTL_USBTMC_INSTRUMENT 0
#define | DEBUG_MTL_USBTMC_INSTRUMENT_ERRORS_ONLY 0
#define | MTL_USBTMC_INSTRUMENT_DEBUG_COUT(__X__)
#define | MTL_USBTMC_INSTRUMENT_DEBUG_CERR(__X__)
#define | MTL_USBTMC_PAUSE_BETWEEN_READS 2

## Functions
static bool | USBTMCReadSTBResponse (U8 *pResponse, U8 USBTMC_status, U8 bTag, U8 StatusByte)
static void | USBTMCBulkOutHeaderWrite (U8 *pHeader, U8 MsgID, U8 bTag, U32 TransferSize, U8 bmTransferAttributes, char TermChar)
static bool | USBTMCBulkInHeaderRead (U8 *pHeader, U8 MsgID, U8 bTag, I32 &TransferSize, U8 &bmTransferAttributes)
bool | Register (libusb_device *pDevice)
bool | Unregister (libusb_device *pDevice)
bool | Claim (libusb_device *pDevice, U32 Timeout=0)
bool | Release (libusb_device *pDevice)

## Variables
static | class
| l_USBTMCAccessControl

## Detailed Description

USBTMC driver based on libusb: implementation.

Definition in file USBTMCInstrument.cpp.

## Macro Definition Documentation

## ◆ DEBUG_MTL_USBTMC_INSTRUMENT

#define DEBUG_MTL_USBTMC_INSTRUMENT 0

Definition at line 23 of file USBTMCInstrument.cpp.

## ◆ DEBUG_MTL_USBTMC_INSTRUMENT_ERRORS_ONLY

#define DEBUG_MTL_USBTMC_INSTRUMENT_ERRORS_ONLY 0

Definition at line 24 of file USBTMCInstrument.cpp.

## ◆ MTL_USBTMC_INSTRUMENT_DEBUG_CERR

#define MTL_USBTMC_INSTRUMENT_DEBUG_CERR | ( |  | __X__ | ) |

Definition at line 34 of file USBTMCInstrument.cpp.

## ◆ MTL_USBTMC_INSTRUMENT_DEBUG_COUT

#define MTL_USBTMC_INSTRUMENT_DEBUG_COUT | ( |  | __X__ | ) |

Definition at line 33 of file USBTMCInstrument.cpp.

## ◆ MTL_USBTMC_PAUSE_BETWEEN_READS

#define MTL_USBTMC_PAUSE_BETWEEN_READS 2

Definition at line 36 of file USBTMCInstrument.cpp.

## Function Documentation

## ◆ Claim()

bool Claim | ( | libusb_device * | pDevice,
|  | U32 | Timeout = 0 )

Definition at line 429 of file USBTMCInstrument.cpp.

## ◆ Register()

bool Register | ( | libusb_device * | pDevice | ) |

Definition at line 394 of file USBTMCInstrument.cpp.

## ◆ Release()

bool Release | ( | libusb_device * | pDevice | ) |

Definition at line 438 of file USBTMCInstrument.cpp.

## ◆ Unregister()

bool Unregister | ( | libusb_device * | pDevice | ) |

Definition at line 410 of file USBTMCInstrument.cpp.

## ◆ USBTMCBulkInHeaderRead()

bool USBTMCBulkInHeaderRead | ( | U8 * | pHeader,
|  | U8 | MsgID,
|  | U8 | bTag,
|  | I32 & | TransferSize,
|  | U8 & | bmTransferAttributes )
| static

Definition at line 360 of file USBTMCInstrument.cpp.

## ◆ USBTMCBulkOutHeaderWrite()

void USBTMCBulkOutHeaderWrite | ( | U8 * | pHeader,
|  | U8 | MsgID,
|  | U8 | bTag,
|  | U32 | TransferSize,
|  | U8 | bmTransferAttributes,
|  | char | TermChar )
| static

Definition at line 343 of file USBTMCInstrument.cpp.

## ◆ USBTMCReadSTBResponse()

bool USBTMCReadSTBResponse | ( | U8 * | pResponse,
|  | U8 | USBTMC_status,
|  | U8 | bTag,
|  | U8 | StatusByte )
| static

Definition at line 333 of file USBTMCInstrument.cpp.

## Variable Documentation

## ◆ class

class
| static

Definition at line 389 of file USBTMCInstrument.cpp.

## ◆ l_USBTMCAccessControl

l_USBTMCAccessControl

Definition at line 451 of file USBTMCInstrument.cpp.