rohdeschwarz  0.2.0
TCPIP socket library for Rohde & Schwarz instrument control
trace.hpp
Go to the documentation of this file.
1 
7 #ifndef ROHDESCHWARZ_INSTRUMENTS_VNA_TRACE_HPP
8 #define ROHDESCHWARZ_INSTRUMENTS_VNA_TRACE_HPP
9 
10 
11 // std lib
12 #include <complex>
13 #include <string>
14 #include <vector>
15 
16 
18 {
19 
20 
21 // forward declarations
22 class Vna;
23 
30 class Trace
31 {
32 
33 public:
34 
35  // life cycle
36 
43  Trace(Vna* vna, const char* name);
44 
45 
52  Trace(Vna* vna, const std::string& name);
53 
54 
58  std::string name() const;
59 
60 
67  void select();
68 
69 
70  // parameter
71 
78  std::string parameter();
79 
80 
88  void setParameter(const char* parameter);
89 
90 
98  void setParameter(const std::string& parameter);
99 
100 
101  // format
102 
108  std::string format();
109 
110 
118  void setFormat(const char* format);
119 
120 
128  void setFormat(const std::string& format);
129 
130 
134  unsigned int channel();
135 
136 
137  // diagram
138 
142  unsigned int diagram();
143 
144 
150  void setDiagram(unsigned int diagram);
151 
152 
153  // data
154 
158  std::vector<double> y();
159 
160 
168  std::vector<std::complex<double>> y_complex();
169 
170 
171 private:
172 
173  Vna* _vna;
174  std::string _name;
175 
176 
177 };
178 
179 
180 } // rohdeschwarz::instruments::vna
181 #endif // ROHDESCHWARZ_INSTRUMENTS_VNA_TRACE_HPP
Object-oriented trace control.
Definition: trace.hpp:31
unsigned int diagram()
Queries the index of the diagram for this trace.
Definition: trace.cpp:92
void setParameter(const char *parameter)
Sets the measurement parameter for this trace.
Definition: trace.cpp:52
void select()
Make trace the active trace.
Definition: trace.cpp:39
std::string format()
Queries the trace format.
Definition: trace.cpp:65
void setFormat(const char *format)
Sets the trace format.
Definition: trace.cpp:73
std::string name() const
Trace name.
Definition: trace.cpp:33
Trace(Vna *vna, const char *name)
Constructor.
Definition: trace.cpp:17
void setDiagram(unsigned int diagram)
Adds trace to diagram.
Definition: trace.cpp:99
unsigned int channel()
Queries the index of the measurement channel for this trace.
Definition: trace.cpp:87
std::vector< double > y()
Returns formatted Y values from the last measurement of this trace.
Definition: trace.cpp:105
std::string parameter()
Gets the measurement parameter for this trace.
Definition: trace.cpp:45
std::vector< std::complex< double > > y_complex()
Returns unformatted Y values from the last measurement of this trace.
Definition: trace.cpp:125
Object-oriented R&S ZNX-series VNA control.
Definition: vna.hpp:34