-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathvna_test.cpp
57 lines (43 loc) · 906 Bytes
/
vna_test.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
#include "vna_test.h"
#include <iostream>
using namespace std;
int port_t;
VnaTest::VnaTest()
{
}
VnaTest::~VnaTest()
{
}
int VnaTest::initVna(int port_init, QString device_init)
{
port_t = port_init;
cout << port_t << " VNA init" <<endl;
return (0);
}
void VnaTest::initMeasure(unsigned int start, unsigned int step, int points, int mode)
{
cout << "Scan start" << endl;
}
void VnaTest::setFrequency(unsigned int n)
{
cout << port_t << " VNA set to:" << n << endl;
}
void VnaTest::getData(int n, int *return_loss, int *angle, int *gain1, int *gain2, int *gain3)
{
*amplitude = 200;
*phase = 100;
}
void VnaTest::closePort()
{
}
int VnaTest::getError()
{
return (0);
}
void VnaTest::setToTransmittance(bool transm)
{
if (transm)
cout << "Set to transmittance measurement" << endl;
else
cout << "Set to impedance measurement" << endl;
}