rohdeschwarz  0.2.0
TCPIP socket library for Rohde & Schwarz instrument control
Public Member Functions | List of all members
rohdeschwarz::instruments::vna::Vna Class Reference

Object-oriented R&S ZNX-series VNA control. More...

#include <vna.hpp>

Inheritance diagram for rohdeschwarz::instruments::vna::Vna:
rohdeschwarz::instruments::Instrument

Public Member Functions

Display display ()
 Object-oriented control of the display. More...
 
DataFormat dataFormat ()
 Object-oriented control of the data transfer format. More...
 
bool isChannel (unsigned int index)
 Checks for existence of channel index More...
 
Channel createChannel (unsigned int index)
 Create new channel with specified index. More...
 
Channel channel (unsigned int index)
 Object-oriented control of a measurement channel. More...
 
std::vector< unsigned int > channels ()
 Query existing channels, by indexes. More...
 
bool isTrace (const char *name)
 Checks for existence of a trace by name. More...
 
bool isTrace (const std::string &name)
 Checks for existence of a trace by name. More...
 
Trace createTrace (const char *name, unsigned int channel=1)
 Creates a new trace. More...
 
Trace createTrace (const std::string &name, unsigned int channel=1)
 Creates a new trace. More...
 
Trace trace (const char *name)
 Object-oriented control of a trace. More...
 
Trace trace (const std::string &name)
 Object-oriented control of a trace. More...
 
std::vector< std::string > traces ()
 Query existing traces by name. More...
 
- Public Member Functions inherited from rohdeschwarz::instruments::Instrument
bool isOpen () const
 Check for an open connection to an instrument. More...
 
bool openVisa (std::string resource, unsigned int timeout_ms=2000)
 Open VISA connection to instrument. More...
 
bool openTcp (std::string host, unsigned int timeout_ms=2000)
 Open tcp socket connection to an instrument. More...
 
void close ()
 Close the connection to the instrument. More...
 
std::size_t bufferSize_B () const
 
void setBufferSize (std::size_t size_bytes)
 
std::vector< unsigned char > * buffer ()
 
const std::vector< unsigned char > * buffer () const
 
std::vector< unsigned char > takeData ()
 
int timeout_ms ()
 Query IO timeout time, in milliseconds. More...
 
bool setTimeout (int timeout_ms)
 Set IO timeout time. More...
 
bool readData (unsigned char *buffer, std::size_t bufferSize, std::size_t *readSize=nullptr)
 
bool writeData (const unsigned char *data, std::size_t dataSize, std::size_t *writeSize=nullptr)
 
bool readData (std::size_t *readSize=nullptr)
 
std::string read ()
 
template<class... Args>
bool write (std::string scpi_command, Args &&... args)
 
template<class... Args>
std::string query (std::string scpi_command, Args &&... args)
 
template<class OutputType >
OutputType readValue ()
 
template<class OutputType , class... Args>
OutputType queryValue (std::string scpi_command, Args &&... args)
 
bool readScpiBool ()
 
template<class... Args>
bool queryScpiBool (std::string scpi_command, Args &&... args)
 
std::vector< double > readAsciiVector ()
 reads ascii data and parses it into vector <double> More...
 
std::vector< std::complex< double > > readAsciiComplexVector ()
 reads ascii data and parses it into vector <complex <double>> More...
 
scpi::BlockData readBlockData ()
 Read Block Data. More...
 
std::vector< double > read64BitVector ()
 Reads block data and parses it into vector <double> More...
 
std::vector< std::complex< double > > read64BitComplexVector ()
 Reads block data and parses it into vector <complex <double>> More...
 
bool isBusError () const
 Checks the bus status for an error. More...
 
std::string busStatus () const
 Gets the bus status as a human-readable string. More...
 
std::string id ()
 Queries instrument ID string. More...
 
std::string options ()
 Queries instrument options string. More...
 
void clearErrors ()
 Clears SCPI errors. More...
 
void preset ()
 Perform instrument preset. More...
 
void wait ()
 Instructs instrument to perform previous SCPI commands before proceeding. More...
 
bool blockUntilOperationComplete (unsigned int timeout_ms=2000)
 Queries *OPC? - block until operation complete. More...
 

Detailed Description

Object-oriented R&S ZNX-series VNA control.

Vna provides object-oriented control of a Rohde & Schwarz ZNX-series Vector Network Analyzer via a VISA connection and SCPI commands.

Definition at line 33 of file vna.hpp.

Member Function Documentation

◆ channel()

Channel Vna::channel ( unsigned int  index)

Object-oriented control of a measurement channel.

Parameters
[in]indexchannel index

Definition at line 47 of file vna.cpp.

◆ channels()

std::vector< unsigned int > Vna::channels ( )

Query existing channels, by indexes.

Definition at line 53 of file vna.cpp.

◆ createChannel()

Channel Vna::createChannel ( unsigned int  index)

Create new channel with specified index.

Parameters
[in]indexchannel index

Definition at line 40 of file vna.cpp.

◆ createTrace() [1/2]

Trace Vna::createTrace ( const char *  name,
unsigned int  channel = 1 
)

Creates a new trace.

Parameters
[in]namename of the created trace as C style string
[in]channelchannel index of created trace

Definition at line 78 of file vna.cpp.

◆ createTrace() [2/2]

Trace Vna::createTrace ( const std::string &  name,
unsigned int  channel = 1 
)

Creates a new trace.

Parameters
[in]namename of the created trace as a C++ style string
[in]channelchannel index of the created trace

Definition at line 85 of file vna.cpp.

◆ dataFormat()

DataFormat Vna::dataFormat ( )

Object-oriented control of the data transfer format.

Definition at line 26 of file vna.cpp.

◆ display()

Display Vna::display ( )

Object-oriented control of the display.

Definition at line 20 of file vna.cpp.

◆ isChannel()

bool Vna::isChannel ( unsigned int  index)

Checks for existence of channel index

Parameters
[in]indexchannel index

Definition at line 32 of file vna.cpp.

◆ isTrace() [1/2]

bool Vna::isTrace ( const char *  name)

Checks for existence of a trace by name.

Parameters
[in]nametrace name as a C style string

Definition at line 63 of file vna.cpp.

◆ isTrace() [2/2]

bool Vna::isTrace ( const std::string &  name)

Checks for existence of a trace by name.

Parameters
[in]nametrace name as a C++ style string

Definition at line 70 of file vna.cpp.

◆ trace() [1/2]

Trace Vna::trace ( const char *  name)

Object-oriented control of a trace.

Parameters
[in]nametrace name as a C style string

Definition at line 92 of file vna.cpp.

◆ trace() [2/2]

Trace Vna::trace ( const std::string &  name)

Object-oriented control of a trace.

Parameters
[in]nametrace name as a C++ style string

Definition at line 99 of file vna.cpp.

◆ traces()

std::vector< std::string > Vna::traces ( )

Query existing traces by name.

Definition at line 105 of file vna.cpp.


The documentation for this class was generated from the following files: