ngc 1.4.0
 
Loading...
Searching...
No Matches
ngcdcsNGC2.hpp
Go to the documentation of this file.
1
7#ifndef ngcdcsNGC2_H
8#define ngcdcsNGC2_H
9
10
11#ifndef __cplusplus
12#error This is a C++ include file and cannot be used from plain C
13#endif
14
15#include <ngc/core/ngcbAddr.h>
16#include <ngc/core/ngcbMOD.hpp>
18
22#define ngcdcsNGC2_MAX_INITFILES 8
23
24/*
25 * Board types
26 */
27#define ngcdcsNGC2_AQ22 0x00010000 //< NGCII AQ22
28#define ngcdcsNGC2_AQ8 0x00020000 //< NGCII AQ8
29
33#define ngcdcsNGC2_MAX_TEL 20
34
38class ngcdcsNGC2: public ngcbMOD
39{
40public:
43
46
49
52
54 double aqOffset[2];
55
57 double aqGain[2];
58
60 double aqFilter[2];
61
63 int aqShort[2];
64
66 int aqCancel[2];
67
70
72 int aqBypass[2];
73
76
79
81 explicit ngcdcsNGC2(const ngcb_route_t &r);
82
84 ngcdcsNGC2(ngcbIFC *ifc, const ngcb_route_t &r);
85
87 virtual ~ngcdcsNGC2();
88
90 void Reset();
91
93 int Enable(int check = 1);
94
96 int Disable();
97
99 int Selftest();
100
102 int Telemetry();
103
105 int SetPA(double volt);
106
108 int GetPA(double *volt);
109
111 int SetPA(double pos, double neg);
112
114 int SetAqOffset(double offset0, double offset1);
115
117 int SetAqGain(double gain0, double gain1);
118
120 int SetAqFilter(double filter0, double filter1);
121
123 int SetAqShort(int short0, int short1);
124
126 int SetAqCancel(int cancel0, int cancel1);
127
129 int SetAqCross(int mode);
130
132 int SetAqBypass(int bypass0, int bypass1);
133
135 int SetMon(int idx, ngcdcs_fpm_t port);
136
138 int GetMon(int idx, ngcdcs_fpm_t *port);
139
141 int SetupKey(const char *key, const int *idx, const char *value,
142 int *status = NULL);
143
145 int StatusKey(const char *key, const int *idx, char *value,
146 int *status = NULL);
147
148protected:
149
150private:
152 void Init_();
153
155 int Tel_(int chan);
156
158 int pa_;
159};
160
161#endif
Definition ngcbIFC.hpp:754
ngcbMOD(const ngcbMOD &other)
Copy constructor.
Definition ngcbMOD.cpp:43
int Disable()
Call-back at transition to not operational state.
Definition ngcdcsNGC2.cpp:336
double aqOffset[2]
AQ offset (bank-0 and bank-1)
Definition ngcdcsNGC2.hpp:54
double aqGain[2]
AQ gain (bank-0 and bank-1)
Definition ngcdcsNGC2.hpp:57
double aqFilter[2]
AQ filter (bank-0 and bank-1)
Definition ngcdcsNGC2.hpp:60
char initFile[ngcdcsNGC2_MAX_INITFILES][256]
Register initialization file.
Definition ngcdcsNGC2.hpp:42
int aqCross
AQ cross mode.
Definition ngcdcsNGC2.hpp:69
int SetPA(double volt)
Set preamplifier supply voltage.
Definition ngcdcsNGC2.cpp:438
int aqShort[2]
AQ short input (bank-0 and bank-1)
Definition ngcdcsNGC2.hpp:63
int SetAqOffset(double offset0, double offset1)
Set AQ offset (bank-0 and bank-1)
Definition ngcdcsNGC2.cpp:589
int SetupKey(const char *key, const int *idx, const char *value, int *status=NULL)
Setup.
Definition ngcdcsNGC2.cpp:966
void Reset()
Align software state after reset.
Definition ngcdcsNGC2.cpp:106
double preampSupply
Preamplifier supply voltage.
Definition ngcdcsNGC2.hpp:45
double preampSupplyNeg
Preamplifier neg. supply voltage.
Definition ngcdcsNGC2.hpp:51
int SetAqShort(int short0, int short1)
Set AQ short input (bank-0 and bank-1)
Definition ngcdcsNGC2.cpp:723
ngcdcs_tel_t tel[ngcdcsNGC2_MAX_TEL]
Internal telemetry.
Definition ngcdcsNGC2.hpp:75
int SetAqBypass(int bypass0, int bypass1)
Set AQ bypass (bank-0 and bank-1)
Definition ngcdcsNGC2.cpp:812
int SetAqCross(int mode)
Set AQ cross mode.
Definition ngcdcsNGC2.cpp:787
int GetPA(double *volt)
Get preamplifier supply voltage.
Definition ngcdcsNGC2.cpp:507
int StatusKey(const char *key, const int *idx, char *value, int *status=NULL)
Status.
Definition ngcdcsNGC2.cpp:1338
int Enable(int check=1)
Call-back at transition to operational state.
Definition ngcdcsNGC2.cpp:111
int Telemetry()
Internal telemetry.
Definition ngcdcsNGC2.cpp:349
int SetAqFilter(double filter0, double filter1)
Set AQ filter (bank-0 and bank-1)
Definition ngcdcsNGC2.cpp:663
int SetAqGain(double gain0, double gain1)
Set AQ gain (bank-0 and bank-1)
Definition ngcdcsNGC2.cpp:625
int Selftest()
Execute selftest.
Definition ngcdcsNGC2.cpp:341
int GetMon(int idx, ngcdcs_fpm_t *port)
Get front panel monitor.
Definition ngcdcsNGC2.cpp:895
int aqCancel[2]
AQ bias current cancellation (bank-0 and bank-1)
Definition ngcdcsNGC2.hpp:66
ngcdcsNGC2(const ngcb_route_t &r)
Constructor with route.
Definition ngcdcsNGC2.cpp:30
double preampSupplyPos
Preamplifier pos. supply voltage.
Definition ngcdcsNGC2.hpp:48
ngcdcs_fpm_t monitor[4]
Front panel monitors.
Definition ngcdcsNGC2.hpp:78
virtual ~ngcdcsNGC2()
Destructor.
Definition ngcdcsNGC2.cpp:45
int SetMon(int idx, ngcdcs_fpm_t port)
Set front panel monitor.
Definition ngcdcsNGC2.cpp:841
int SetAqCancel(int cancel0, int cancel1)
Set AQ bias current cancellation (bank-0 and bank-1)
Definition ngcdcsNGC2.cpp:758
int aqBypass[2]
AQ bypass (bank-0 and bank-1)
Definition ngcdcsNGC2.hpp:72
#define ngcdcsNGC2_MAX_TEL
Definition ngcdcsNGC2.hpp:33
#define ngcdcsNGC2_MAX_INITFILES
Definition ngcdcsNGC2.hpp:22
Definition ngcbIFC.hpp:72
Definition ngcdcsTypes.hpp:56
Definition ngcdcsTypes.hpp:44