ngc 1.5.0
 
Loading...
Searching...
No Matches
ngcdcsNGC2.hpp
Go to the documentation of this file.
1
8#ifndef ngcdcsNGC2_H
9#define ngcdcsNGC2_H
10
11
12#ifndef __cplusplus
13#error This is a C++ include file and cannot be used from plain C
14#endif
15
16#include <ngc/core/ngcbAddr.h>
17#include <ngc/core/ngcbMOD.hpp>
19
23#define ngcdcsNGC2_MAX_INITFILES 8
24
25/*
26 * Board types
27 */
28#define ngcdcsNGC2_AQ22 0x00010000 //< NGCII AQ22
29#define ngcdcsNGC2_AQ8 0x00020000 //< NGCII AQ8
30
34#define ngcdcsNGC2_MAX_TEL 20
35
39class ngcdcsNGC2: public ngcbMOD
40{
41public:
44
47
50
53
56
59
61 double aqOffset[2];
62
64 double aqGain[2];
65
67 double aqFilter[2];
68
70 int aqShort[2];
71
73 int aqCancel[2];
74
77
79 int aqBypass[2];
80
83
86
88 explicit ngcdcsNGC2(const ngcb_route_t &r);
89
91 ngcdcsNGC2(ngcbIFC *ifc, const ngcb_route_t &r);
92
94 virtual ~ngcdcsNGC2();
95
97 void Reset();
98
100 int Enable(int check = 1);
101
103 int Disable();
104
106 int Selftest();
107
109 int OutputEnable();
110
112 int OutputDisable();
113
115 char *VStatusString() {return statStr_;}
116
118 int Telemetry();
119
121 int SetPA(double volt);
122
124 int GetPA(double *volt);
125
127 int SetPA(double pos, double neg);
128
130 int SetAqOffset(double offset0, double offset1);
131
133 int SetAqGain(double gain0, double gain1);
134
136 int SetAqFilter(double filter0, double filter1);
137
139 int SetAqShort(int short0, int short1);
140
142 int SetAqCancel(int cancel0, int cancel1);
143
145 int SetAqCross(int mode);
146
148 int SetAqBypass(int bypass0, int bypass1);
149
151 int SetMon(int idx, ngcdcs_fpm_t port);
152
154 int GetMon(int idx, ngcdcs_fpm_t *port);
155
157 int SetupKey(const char *key, const int *idx, const char *value,
158 int *status = NULL);
159
161 int StatusKey(const char *key, const int *idx, char *value,
162 int *status = NULL);
163
164protected:
165
166private:
168 void Init_();
169
171 int Tel_(int chan);
172
174 int pa_;
175
177 char statStr_[32];
178};
179
180#endif
Definition ngcbIFC.hpp:760
ngcbMOD(const ngcbMOD &other)
Copy constructor.
Definition ngcbMOD.cpp:43
int Disable()
Call-back at transition to not operational state.
Definition ngcdcsNGC2.cpp:362
double aqOffset[2]
AQ offset (bank-0 and bank-1)
Definition ngcdcsNGC2.hpp:61
double aqGain[2]
AQ gain (bank-0 and bank-1)
Definition ngcdcsNGC2.hpp:64
double aqFilter[2]
AQ filter (bank-0 and bank-1)
Definition ngcdcsNGC2.hpp:67
char initFile[ngcdcsNGC2_MAX_INITFILES][256]
Register initialization files.
Definition ngcdcsNGC2.hpp:43
int aqCross
AQ cross mode.
Definition ngcdcsNGC2.hpp:76
int SetPA(double volt)
Set preamplifier supply voltage.
Definition ngcdcsNGC2.cpp:539
int aqShort[2]
AQ short input (bank-0 and bank-1)
Definition ngcdcsNGC2.hpp:70
char resetFile[ngcdcsNGC2_MAX_INITFILES][256]
Register reset files.
Definition ngcdcsNGC2.hpp:46
int SetAqOffset(double offset0, double offset1)
Set AQ offset (bank-0 and bank-1)
Definition ngcdcsNGC2.cpp:745
int SetupKey(const char *key, const int *idx, const char *value, int *status=NULL)
Setup.
Definition ngcdcsNGC2.cpp:1122
void Reset()
Align software state after reset.
Definition ngcdcsNGC2.cpp:113
double preampSupply
Preamplifier supply voltage.
Definition ngcdcsNGC2.hpp:49
double preampSupplyNeg
Preamplifier neg. supply voltage.
Definition ngcdcsNGC2.hpp:55
int SetAqShort(int short0, int short1)
Set AQ short input (bank-0 and bank-1)
Definition ngcdcsNGC2.cpp:879
ngcdcs_tel_t tel[ngcdcsNGC2_MAX_TEL]
Internal telemetry.
Definition ngcdcsNGC2.hpp:82
int SetAqBypass(int bypass0, int bypass1)
Set AQ bypass (bank-0 and bank-1)
Definition ngcdcsNGC2.cpp:968
int SetAqCross(int mode)
Set AQ cross mode.
Definition ngcdcsNGC2.cpp:943
int GetPA(double *volt)
Get preamplifier supply voltage.
Definition ngcdcsNGC2.cpp:618
int StatusKey(const char *key, const int *idx, char *value, int *status=NULL)
Status.
Definition ngcdcsNGC2.cpp:1521
int OutputEnable()
Enable output.
Definition ngcdcsNGC2.cpp:401
int Enable(int check=1)
Call-back at transition to operational state.
Definition ngcdcsNGC2.cpp:118
int Telemetry()
Internal telemetry.
Definition ngcdcsNGC2.cpp:450
char * VStatusString()
Get voltage status string.
Definition ngcdcsNGC2.hpp:115
int SetAqFilter(double filter0, double filter1)
Set AQ filter (bank-0 and bank-1)
Definition ngcdcsNGC2.cpp:819
int SetAqGain(double gain0, double gain1)
Set AQ gain (bank-0 and bank-1)
Definition ngcdcsNGC2.cpp:781
int Selftest()
Execute selftest.
Definition ngcdcsNGC2.cpp:393
int GetMon(int idx, ngcdcs_fpm_t *port)
Get front panel monitor.
Definition ngcdcsNGC2.cpp:1051
int aqCancel[2]
AQ bias current cancellation (bank-0 and bank-1)
Definition ngcdcsNGC2.hpp:73
ngcdcsNGC2(const ngcb_route_t &r)
Constructor with route.
Definition ngcdcsNGC2.cpp:31
double preampSupplyPos
Preamplifier pos. supply voltage.
Definition ngcdcsNGC2.hpp:52
int autoEnable
Enable at online.
Definition ngcdcsNGC2.hpp:58
ngcdcs_fpm_t monitor[4]
Front panel monitors.
Definition ngcdcsNGC2.hpp:85
virtual ~ngcdcsNGC2()
Destructor.
Definition ngcdcsNGC2.cpp:46
int SetMon(int idx, ngcdcs_fpm_t port)
Set front panel monitor.
Definition ngcdcsNGC2.cpp:997
int SetAqCancel(int cancel0, int cancel1)
Set AQ bias current cancellation (bank-0 and bank-1)
Definition ngcdcsNGC2.cpp:914
int OutputDisable()
Disable output.
Definition ngcdcsNGC2.cpp:425
int aqBypass[2]
AQ bypass (bank-0 and bank-1)
Definition ngcdcsNGC2.hpp:79
#define ngcdcsNGC2_MAX_TEL
Definition ngcdcsNGC2.hpp:34
#define ngcdcsNGC2_MAX_INITFILES
Definition ngcdcsNGC2.hpp:23
Definition ngcbIFC.hpp:78
Definition ngcdcsTypes.hpp:57
Definition ngcdcsTypes.hpp:45