-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathhp8648c_hp436a_sweeper.h
70 lines (60 loc) · 1.2 KB
/
hp8648c_hp436a_sweeper.h
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
58
59
60
61
62
63
64
65
66
67
68
69
70
#include <stdint.h>
#include <gtk/gtk.h>
#include <glib.h>
typedef struct {
int controller; //GPIB controller 0-
int device; //GPIB address 0-31
char eot;
int ud;
}
hp436a_record;
typedef struct {
int controller; //GPIB controller 0-
int device; //GPIB address 0-31
int ud;
char eot;
uint8_t run_f; //0 power 1 frequency
uint8_t run;
gdouble f; // frequency
gdouble f_start;
gdouble f_stop;
gdouble f_step;
gdouble rl; // level
gdouble rl_start;
gdouble rl_stop;
gdouble rl_step;
}
hp8648c_record;
typedef struct {
gdouble level;
gdouble avg_value;
gdouble diff_level;
gdouble rmsd;
gdouble rmsd_limit;
gdouble delta_value;
guint sample; //Counter
guint unterflow_counter;//Counter is measurement unterflow
guint avg_count;
gdouble value[100];
gdouble diff_avg;
}
sample_record;
typedef struct {
gdouble frequency;
gdouble ref_level;
gdouble avg_value;
gdouble rmsd;
}
m_record;
#define GPIB_INTERFACE 0
#define HP8648C_GPIB_ADR 7
#define HP436A_GPIB_ADR 10
#define GPIB_LENGTH 16348
#define SAMPLE 100
#define MINF 0.15
#define MAXF 3200
#define MAXSTEP_F 500
#define MINL -136
#define MAXL 13
enum{MOD_OFF, FM_INT, AM_INT, AM_EXT, Fm_EXT};
enum{RF_OFF,RF_ON};