ngc 1.5.0
 
Loading...
Searching...
No Matches
ngcdcsADC.hpp
Go to the documentation of this file.
1
8#ifndef ngcdcsADC_H
9#define ngcdcsADC_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 ngcdcsADC_PP_MAXSIZE (320 * 256)
24
29 int nx; //< Frame x-dimension
30 int ny; //< Frame y-dimension
31 int nint; //< Integration frame counter (0 = disable)
32 int nsamp; //< Number of sub-pixel samples
33 int enabled; //< Pre-processor enabled
34 int fowler; //< Enable/disable Fowler mode
35 int invert; //< Invert Fowler pairs
36 int ndsamp2nint; //< Align integration frame counter with NDSAMPLES
37
40 nx = 0;
41 ny = 0;
42 nint = 1;
43 nsamp = 1;
44 enabled = 0;
45 fowler = 0;
46 invert = 0;
47 ndsamp2nint = 1;
48 }
49};
50
54class ngcdcsADC: public ngcbMOD
55{
56public:
58 explicit ngcdcsADC(const ngcb_route_t &r);
59
61 ngcdcsADC(ngcbIFC *dev, const ngcb_route_t &r);
62
64 ngcdcsADC(const ngcb_route_t &r, int n, int b);
65
67 ngcdcsADC(ngcbIFC *dev, const ngcb_route_t &r, int n, int b);
68
70 virtual ~ngcdcsADC();
71
73 int bitPix;
74
76 int numAdc;
77
79 int enable;
80
82 int delay;
83
85 int opMode;
86
89
92
95
98
101
104
106 int link2;
107
109 double offset;
110
113
116
118 int clamp;
119
121 int filter;
122
124 double temp;
125
128
131
133 void Reset();
134
136 int Enable(int check = 1);
137
139 int Disable();
140
142 int Selftest();
143
145 void Preset(int size, int n);
146
148 int Clear();
149
151 int ChanDisable();
152
154 int ChanEnable(int n);
155
157 int ChanEnable();
158
160 int PacketSize(int size);
161
163 int PacketCnt(int len);
164
166 int First(int flag);
167
169 int Convert(int cvt1, int cvt2);
170
172 int OpMode(int newMode);
173
175 int SimMode(int newMode);
176
178 int Delay(int ticks);
179
181 int Offset(double newOffset);
182
184 void LED(int stat);
185
187 int Monitor(int num, int chan);
188
190 int Clamp(int flag);
191
193 int Filter(int value);
194
196 int DualLink(int flag);
197
199 int Status(int *hwStatus, int *swStatus);
200
202 int Update();
203
205 int PixPerWord();
206
208 int PPEnable();
209
211 int PPDisable();
212
214 int PPDim(int nx, int ny);
215
217 int PPNumInt(int n);
218
220 int PPNumSamp(int n);
221
223 int PPFowler(int flag);
224
226 int PPInvert(int flag);
227
229 int SetupKey(const char *key, const int *idx, const char *value,
230 int *status = NULL);
231
233 int StatusKey(const char *key, const int *idx, char *value,
234 int *status = NULL);
235
236protected:
237
238private:
240 void Init_();
241
243 int revision_;
244
246 int ctrlReg_;
247
249 int packetSizeOrig_;
250
252 int mon32Reg_;
253
255 int Volt2Reg_(double *volt);
256
258 int SetDac_(double *volt, int chna);
259
261 int SetDacDiff_(double *volt, int chan1, int chan2);
262};
263
264#endif
Definition ngcbIFC.hpp:760
ngcbIFC * dev
Interface device.
Definition ngcbMOD.hpp:28
ngcbMOD(const ngcbMOD &other)
Copy constructor.
Definition ngcbMOD.cpp:43
int simMode
Simulation mode.
Definition ngcdcsADC.hpp:88
int clamp
Clamp (0/1)
Definition ngcdcsADC.hpp:118
int PPNumInt(int n)
Set pre-processor integration frame counter.
Definition ngcdcsAdcPP.cpp:88
int delay
Conversion strobe delay (in ticks)
Definition ngcdcsADC.hpp:82
int enable
Number of enabled ADC channels on module.
Definition ngcdcsADC.hpp:79
int DualLink(int flag)
Enable/disable second link.
Definition ngcdcsADC.cpp:877
int link2
2nd link
Definition ngcdcsADC.hpp:106
int OpMode(int newMode)
Set operation mode.
Definition ngcdcsADC.cpp:621
ngcdcsADC(const ngcb_route_t &r)
Constructor with route.
Definition ngcdcsADC.cpp:30
int Monitor(int num, int chan)
Set channel for video monitor.
Definition ngcdcsADC.cpp:950
int convert2
Enable conversion on convert strobe 2.
Definition ngcdcsADC.hpp:94
void LED(int stat)
Enable/disable LEDs.
Definition ngcdcsADC.cpp:908
ngcdcs_adcpp_t pp
Pre-processor.
Definition ngcdcsADC.hpp:130
int Update()
Update sensor values.
Definition ngcdcsADC.cpp:314
int First(int flag)
Set first in chain bit.
Definition ngcdcsADC.cpp:500
int monitor1
Channel on monitor 1.
Definition ngcdcsADC.hpp:112
int Disable()
Call-back at transition to not operational state.
Definition ngcdcsADC.cpp:279
void Preset(int size, int n)
Configuration preset.
Definition ngcdcsADC.cpp:351
int Status(int *hwStatus, int *swStatus)
Read current status.
Definition ngcdcsADC.cpp:284
int bitPix
Bits per pixel.
Definition ngcdcsADC.hpp:73
ngcdcsCLDC * cldc
Assigned clock- and bias-generator.
Definition ngcdcsADC.hpp:127
int Enable(int check=1)
Call-back at transition to operational state.
Definition ngcdcsADC.cpp:126
int opMode
Operation mode.
Definition ngcdcsADC.hpp:85
int convert1
Enable conversion on convert strobe 1.
Definition ngcdcsADC.hpp:91
int monitor2
Channel on monitor 2.
Definition ngcdcsADC.hpp:115
int packetCnt
Route length.
Definition ngcdcsADC.hpp:100
int Convert(int cvt1, int cvt2)
Enable/disable conversion strobes.
Definition ngcdcsADC.cpp:471
int PPDim(int nx, int ny)
Set pre-processor frame dimension.
Definition ngcdcsAdcPP.cpp:26
virtual ~ngcdcsADC()
Destructor.
Definition ngcdcsADC.cpp:65
int packetSize
Packet size.
Definition ngcdcsADC.hpp:97
int PPFowler(int flag)
Enable/disable Fowler mode.
Definition ngcdcsAdcPP.cpp:257
void Reset()
Align soft-states after reset.
Definition ngcdcsADC.cpp:121
int SetupKey(const char *key, const int *idx, const char *value, int *status=NULL)
Setup.
Definition ngcdcsAdcSetup.cpp:26
int Offset(double newOffset)
Set ADC offset.
Definition ngcdcsADC.cpp:1067
int Delay(int ticks)
Set conversion strobe delay in ticks.
Definition ngcdcsADC.cpp:777
int ChanEnable()
Enable all ADC channels on module.
Definition ngcdcsADC.cpp:767
int PacketCnt(int len)
Set packet routing length.
Definition ngcdcsADC.cpp:527
int PacketSize(int size)
Set packet size.
Definition ngcdcsADC.cpp:562
int PPDisable()
Disable pre-processor.
Definition ngcdcsAdcPP.cpp:230
int PPInvert(int flag)
Invert Fowler pairs.
Definition ngcdcsAdcPP.cpp:318
int Clear()
Clear all data FIFOs.
Definition ngcdcsADC.cpp:435
int PixPerWord()
Pixel per 32-bit word (1 or 2)
Definition ngcdcsADC.cpp:343
int PPNumSamp(int n)
Set number of pre-processor sub-pixel samples.
Definition ngcdcsAdcPP.cpp:131
int numAdc
Number of ADC channels on module.
Definition ngcdcsADC.hpp:76
int Selftest()
Execute self-test.
Definition ngcdcsADC.cpp:335
int firstInChain
First in chain.
Definition ngcdcsADC.hpp:103
double temp
Board temperature.
Definition ngcdcsADC.hpp:124
int ChanDisable()
Disable all ADC channels on module.
Definition ngcdcsADC.cpp:772
int filter
Filter (0/1)
Definition ngcdcsADC.hpp:121
int StatusKey(const char *key, const int *idx, char *value, int *status=NULL)
Status.
Definition ngcdcsAdcStatus.cpp:26
int Filter(int value)
Set filter.
Definition ngcdcsADC.cpp:845
int SimMode(int newMode)
Set simulation mode.
Definition ngcdcsADC.cpp:661
int PPEnable()
Enable pre-processor.
Definition ngcdcsAdcPP.cpp:189
int Clamp(int flag)
Set clamp.
Definition ngcdcsADC.cpp:806
double offset
Video offset.
Definition ngcdcsADC.hpp:109
Definition ngcdcsCLDC.hpp:595
Definition ngcbIFC.hpp:78
Definition ngcdcsADC.hpp:28
int nx
Definition ngcdcsADC.hpp:29
int ndsamp2nint
Definition ngcdcsADC.hpp:36
ngcdcs_adcpp_t()
Constructor.
Definition ngcdcsADC.hpp:39
int nint
Definition ngcdcsADC.hpp:31
int invert
Definition ngcdcsADC.hpp:35
int enabled
Definition ngcdcsADC.hpp:33
int ny
Definition ngcdcsADC.hpp:30
int nsamp
Definition ngcdcsADC.hpp:32
int fowler
Definition ngcdcsADC.hpp:34