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

Object-oriented trace control. More...

#include <trace.hpp>

Public Member Functions

 Trace (Vna *vna, const char *name)
 Constructor. More...
 
 Trace (Vna *vna, const std::string &name)
 Constructor. More...
 
std::string name () const
 Trace name. More...
 
void select ()
 Make trace the active trace. More...
 
std::string parameter ()
 Gets the measurement parameter for this trace. More...
 
void setParameter (const char *parameter)
 Sets the measurement parameter for this trace. More...
 
void setParameter (const std::string &parameter)
 Sets the measurement parameter for this trace. More...
 
std::string format ()
 Queries the trace format. More...
 
void setFormat (const char *format)
 Sets the trace format. More...
 
void setFormat (const std::string &format)
 Sets the trace format. More...
 
unsigned int channel ()
 Queries the index of the measurement channel for this trace. More...
 
unsigned int diagram ()
 Queries the index of the diagram for this trace. More...
 
void setDiagram (unsigned int diagram)
 Adds trace to diagram. More...
 
std::vector< double > y ()
 Returns formatted Y values from the last measurement of this trace. More...
 
std::vector< std::complex< double > > y_complex ()
 Returns unformatted Y values from the last measurement of this trace. More...
 

Detailed Description

Object-oriented trace control.

Trace provides object-oriented control of an existing trace via VISA and SCPI commands

Definition at line 30 of file trace.hpp.

Constructor & Destructor Documentation

◆ Trace() [1/2]

Trace::Trace ( Vna vna,
const char *  name 
)

Constructor.

Parameters
[in]vnaPointer to underlying Vna instance
[in]nameName of existing trace to control as C style string

Definition at line 17 of file trace.cpp.

◆ Trace() [2/2]

Trace::Trace ( Vna vna,
const std::string &  name 
)

Constructor.

Parameters
[in]vnaPointer to underlying Vna instance
[in]nameName of existing trace to control as C++ style string

Definition at line 25 of file trace.cpp.

Member Function Documentation

◆ channel()

unsigned int Trace::channel ( )

Queries the index of the measurement channel for this trace.

Definition at line 87 of file trace.cpp.

◆ diagram()

unsigned int Trace::diagram ( )

Queries the index of the diagram for this trace.

Definition at line 92 of file trace.cpp.

◆ format()

std::string Trace::format ( )

Queries the trace format.

See the table of formats from the ZNA manual for possible formats.

Definition at line 65 of file trace.cpp.

◆ name()

std::string Trace::name ( ) const

Trace name.

Definition at line 33 of file trace.cpp.

◆ parameter()

std::string Trace::parameter ( )

Gets the measurement parameter for this trace.

parameter returns the measurement parameter for this trace (e.g. S21). See the table String Identifiers for Measurement Results for a complete list of possible parameters.

Definition at line 45 of file trace.cpp.

◆ select()

void Trace::select ( )

Make trace the active trace.

Some SCPI commands apply to the active trace in a channel. select makes this trace the active trace in its channel.

Definition at line 39 of file trace.cpp.

◆ setDiagram()

void Trace::setDiagram ( unsigned int  diagram)

Adds trace to diagram.

Parameters
[in]diagramIndex of diagram to add trace to

Definition at line 99 of file trace.cpp.

◆ setFormat() [1/2]

void Trace::setFormat ( const char *  format)

Sets the trace format.

See the table of formats from the ZNA manual for possible formats.

Parameters
[in]formatTrace format as a C style string

Definition at line 73 of file trace.cpp.

◆ setFormat() [2/2]

void Trace::setFormat ( const std::string &  format)

Sets the trace format.

See the table of formats from the ZNA manual for possible formats.

Parameters
[in]formatTrace format as a C++ style string

Definition at line 80 of file trace.cpp.

◆ setParameter() [1/2]

void Trace::setParameter ( const char *  parameter)

Sets the measurement parameter for this trace.

See the table String Identifiers for Measurement Results for a complete list of possible parameters.

Parameters
[in]parameterMeasurement parameter as a C style string

Definition at line 52 of file trace.cpp.

◆ setParameter() [2/2]

void Trace::setParameter ( const std::string &  parameter)

Sets the measurement parameter for this trace.

See the table String Identifiers for Measurement Results for a complete list of possible parameters.

Parameters
[in]parameterMeasurement parameter as a C++ style string

Definition at line 59 of file trace.cpp.

◆ y()

std::vector< double > Trace::y ( )

Returns formatted Y values from the last measurement of this trace.

Definition at line 105 of file trace.cpp.

◆ y_complex()

std::vector< std::complex< double > > Trace::y_complex ( )

Returns unformatted Y values from the last measurement of this trace.

Most unformatted trace parameters are measured and stored as complex values (e.g. S21). Note that some parameters, however, are purely real (e.g. Power Added Efficiency [PAE]).

Definition at line 125 of file trace.cpp.


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