| THM1176InstrumentManager 1.2 Qt Object abstraction for Metrolab THM1176

Loading...
Searching...
No Matches
IEEE488InstrumentTest.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
7
8#pragma once
9
10#include "IEEE488Instrument.h"
11
12#if (INSTRUMENT_TYPE_IS_USBTMC)
13 #define IEEE4888_TEST_RESOURCE_MANAGER_CLASS CUSBTMCResourceManager
14 #define IEEE4888_TEST_INSTRUMENT_CLASS CUSBTMCInstrument
15 #define IEEE4888_TEST_RESOURCE_FILTER "7162:1176"
16 #include "USBTMCInstrument.h"
17#elif (INSTRUMENT_TYPE_IS_VISA)
18 #define IEEE4888_TEST_RESOURCE_MANAGER_CLASS CVISAResourceManager
19 #define IEEE4888_TEST_INSTRUMENT_CLASS CVISAInstrument
20 #define IEEE4888_TEST_RESOURCE_FILTER "USB[0-9]*::0x1BFA::0x0498::[0-9]+::INSTR"
21 #include "VISAInstrument.h"
22#elif (INSTRUMENT_TYPE_IS_VXI11)
23 #define IEEE4888_TEST_RESOURCE_MANAGER_CLASS CVXI11ResourceManager
24 #define IEEE4888_TEST_INSTRUMENT_CLASS CVXI11Instrument
25 #define IEEE4888_TEST_RESOURCE_FILTER ".*"
26 #include "VXI11Instrument.h"
27#else
28 #error "One of TEST_INSTRUMENT_TYPE_IS_VISA or ..._USBTMC must be defined"
29#endif
30
31 using namespace MTL::Instrument;
32
37 bool FetchIEEE4888Resource (IEEE4888_TEST_RESOURCE_MANAGER_CLASS & rResourceManager, tResourceName & rInstrumentName);
38
45 bool ConnectToIEEE488Instrument (IEEE4888_TEST_RESOURCE_MANAGER_CLASS * & rpResourceManager, IEEE4888_TEST_INSTRUMENT_CLASS * & rpIEEE488Instrument);
46
50 bool CheckIDNResponse (const CSCPIBuffer &rBuffer);
IEEE488Instrument.h
Abstract IEEE488 instrument class: interface definition.
ConnectToIEEE488Instrument
bool ConnectToIEEE488Instrument(IEEE4888_TEST_RESOURCE_MANAGER_CLASS *&rpResourceManager, IEEE4888_TEST_INSTRUMENT_CLASS *&rpIEEE488Instrument)
Connect to an IEEE488Instrument.
Definition IEEE488InstrumentTest.cpp:40
FetchIEEE4888Resource
bool FetchIEEE4888Resource(IEEE4888_TEST_RESOURCE_MANAGER_CLASS &rResourceManager, tResourceName &rInstrumentName)
Open a connection to the Resource Manager and find an IEEE488Instrument.
Definition IEEE488InstrumentTest.cpp:14
CheckIDNResponse
bool CheckIDNResponse(const CSCPIBuffer &rBuffer)
Sanity-check of the response to an *IDN? query.
Definition IEEE488InstrumentTest.cpp:70
USBTMCInstrument.h
USBTMC driver based on libusb: interface definition.
VISAInstrument.h
C++ wrapper for NI-VISA: interface definition.
MTL::Instrument::CSCPIBuffer
Instrument Buffer.
Definition SCPIInstrumentBuffer.h:44
MTL::Instrument
Definition THM1176.h:74
MTL::Instrument::tResourceName
std::string tResourceName
IEEE488 resource name.
Definition IEEE488InstrumentTypes.h:22