ngc 1.4.0
 
Loading...
Searching...
No Matches
ngcdcsADC.hpp
Go to the documentation of this file.
1
7#ifndef ngcdcsADC_H
8#define ngcdcsADC_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 ngcdcsADC_PP_MAXSIZE (320 * 256)
23
28 int nx; //< Frame x-dimension
29 int ny; //< Frame y-dimension
30 int nint; //< Integration frame counter (0 = disable)
31 int nsamp; //< Number of sub-pixel samples
32 int enabled; //< Pre-processor enabled
33 int fowler; //< Enable/disable Fowler mode
34 int invert; //< Invert Fowler pairs
35 int ndsamp2nint; //< Align integration frame counter with NDSAMPLES
36
39 nx = 0;
40 ny = 0;
41 nint = 1;
42 nsamp = 1;
43 enabled = 0;
44 fowler = 0;
45 invert = 0;
46 ndsamp2nint = 1;
47 }
48};
49
53class ngcdcsADC: public ngcbMOD
54{
55public:
57 explicit ngcdcsADC(const ngcb_route_t &r);
58
60 ngcdcsADC(ngcbIFC *dev, const ngcb_route_t &r);
61
63 ngcdcsADC(const ngcb_route_t &r, int n, int b);
64
66 ngcdcsADC(ngcbIFC *dev, const ngcb_route_t &r, int n, int b);
67
69 virtual ~ngcdcsADC();
70
72 int bitPix;
73
75 int numAdc;
76
78 int enable;
79
81 int delay;
82
84 int opMode;
85
88
91
94
97
100
103
105 int link2;
106
108 double offset;
109
112
115
117 int clamp;
118
120 int filter;
121
123 double temp;
124
127
130
132 void Reset();
133
135 int Enable(int check = 1);
136
138 int Disable();
139
141 int Selftest();
142
144 void Preset(int size, int n);
145
147 int Clear();
148
150 int ChanDisable();
151
153 int ChanEnable(int n);
154
156 int ChanEnable();
157
159 int PacketSize(int size);
160
162 int PacketCnt(int len);
163
165 int First(int flag);
166
168 int Convert(int cvt1, int cvt2);
169
171 int OpMode(int newMode);
172
174 int SimMode(int newMode);
175
177 int Delay(int ticks);
178
180 int Offset(double newOffset);
181
183 void LED(int stat);
184
186 int Monitor(int num, int chan);
187
189 int Clamp(int flag);
190
192 int Filter(int value);
193
195 int DualLink(int flag);
196
198 int Status(int *hwStatus, int *swStatus);
199
201 int Update();
202
204 int PixPerWord();
205
207 int PPEnable();
208
210 int PPDisable();
211
213 int PPDim(int nx, int ny);
214
216 int PPNumInt(int n);
217
219 int PPNumSamp(int n);
220
222 int PPFowler(int flag);
223
225 int PPInvert(int flag);
226
228 int SetupKey(const char *key, const int *idx, const char *value,
229 int *status = NULL);
230
232 int StatusKey(const char *key, const int *idx, char *value,
233 int *status = NULL);
234
235protected:
236
237private:
239 void Init_();
240
242 int revision_;
243
245 int ctrlReg_;
246
248 int packetSizeOrig_;
249
251 int mon32Reg_;
252
254 int Volt2Reg_(double *volt);
255
257 int SetDac_(double *volt, int chna);
258
260 int SetDacDiff_(double *volt, int chan1, int chan2);
261};
262
263#endif
Definition ngcbIFC.hpp:754
ngcbIFC * dev
Interface device.
Definition ngcbMOD.hpp:27
ngcbMOD(const ngcbMOD &other)
Copy constructor.
Definition ngcbMOD.cpp:43
int simMode
Simulation mode.
Definition ngcdcsADC.hpp:87
int clamp
Clamp (0/1)
Definition ngcdcsADC.hpp:117
int PPNumInt(int n)
Set pre-processor integration frame counter.
Definition ngcdcsAdcPP.cpp:87
int delay
Conversion strobe delay (in ticks)
Definition ngcdcsADC.hpp:81
int enable
Number of enabled ADC channels on module.
Definition ngcdcsADC.hpp:78
int DualLink(int flag)
Enable/disable second link.
Definition ngcdcsADC.cpp:876
int link2
2nd link
Definition ngcdcsADC.hpp:105
int OpMode(int newMode)
Set operation mode.
Definition ngcdcsADC.cpp:620
ngcdcsADC(const ngcb_route_t &r)
Constructor with route.
Definition ngcdcsADC.cpp:29
int Monitor(int num, int chan)
Set channel for video monitor.
Definition ngcdcsADC.cpp:949
int convert2
Enable conversion on convert strobe 2.
Definition ngcdcsADC.hpp:93
void LED(int stat)
Enable/disable LEDs.
Definition ngcdcsADC.cpp:907
ngcdcs_adcpp_t pp
Pre-processor.
Definition ngcdcsADC.hpp:129
int Update()
Update sensor values.
Definition ngcdcsADC.cpp:313
int First(int flag)
Set first in chain bit.
Definition ngcdcsADC.cpp:499
int monitor1
Channel on monitor 1.
Definition ngcdcsADC.hpp:111
int Disable()
Call-back at transition to not operational state.
Definition ngcdcsADC.cpp:278
void Preset(int size, int n)
Configuration preset.
Definition ngcdcsADC.cpp:350
int Status(int *hwStatus, int *swStatus)
Read current status.
Definition ngcdcsADC.cpp:283
int bitPix
Bits per pixel.
Definition ngcdcsADC.hpp:72
ngcdcsCLDC * cldc
Assigned clock- and bias-generator.
Definition ngcdcsADC.hpp:126
int Enable(int check=1)
Call-back at transition to operational state.
Definition ngcdcsADC.cpp:125
int opMode
Operation mode.
Definition ngcdcsADC.hpp:84
int convert1
Enable conversion on convert strobe 1.
Definition ngcdcsADC.hpp:90
int monitor2
Channel on monitor 2.
Definition ngcdcsADC.hpp:114
int packetCnt
Route length.
Definition ngcdcsADC.hpp:99
int Convert(int cvt1, int cvt2)
Enable/disable conversion strobes.
Definition ngcdcsADC.cpp:470
int PPDim(int nx, int ny)
Set pre-processor frame dimension.
Definition ngcdcsAdcPP.cpp:25
virtual ~ngcdcsADC()
Destructor.
Definition ngcdcsADC.cpp:64
int packetSize
Packet size.
Definition ngcdcsADC.hpp:96
int PPFowler(int flag)
Enable/disable Fowler mode.
Definition ngcdcsAdcPP.cpp:256
void Reset()
Align soft-states after reset.
Definition ngcdcsADC.cpp:120
int SetupKey(const char *key, const int *idx, const char *value, int *status=NULL)
Setup.
Definition ngcdcsAdcSetup.cpp:25
int Offset(double newOffset)
Set ADC offset.
Definition ngcdcsADC.cpp:1066
int Delay(int ticks)
Set conversion strobe delay in ticks.
Definition ngcdcsADC.cpp:776
int ChanEnable()
Enable all ADC channels on module.
Definition ngcdcsADC.cpp:766
int PacketCnt(int len)
Set packet routing length.
Definition ngcdcsADC.cpp:526
int PacketSize(int size)
Set packet size.
Definition ngcdcsADC.cpp:561
int PPDisable()
Disable pre-processor.
Definition ngcdcsAdcPP.cpp:229
int PPInvert(int flag)
Invert Fowler pairs.
Definition ngcdcsAdcPP.cpp:317
int Clear()
Clear all data FIFOs.
Definition ngcdcsADC.cpp:434
int PixPerWord()
Pixel per 32-bit word (1 or 2)
Definition ngcdcsADC.cpp:342
int PPNumSamp(int n)
Set number of pre-processor sub-pixel samples.
Definition ngcdcsAdcPP.cpp:130
int numAdc
Number of ADC channels on module.
Definition ngcdcsADC.hpp:75
int Selftest()
Execute self-test.
Definition ngcdcsADC.cpp:334
int firstInChain
First in chain.
Definition ngcdcsADC.hpp:102
double temp
Board temperature.
Definition ngcdcsADC.hpp:123
int ChanDisable()
Disable all ADC channels on module.
Definition ngcdcsADC.cpp:771
int filter
Filter (0/1)
Definition ngcdcsADC.hpp:120
int StatusKey(const char *key, const int *idx, char *value, int *status=NULL)
Status.
Definition ngcdcsAdcStatus.cpp:25
int Filter(int value)
Set filter.
Definition ngcdcsADC.cpp:844
int SimMode(int newMode)
Set simulation mode.
Definition ngcdcsADC.cpp:660
int PPEnable()
Enable pre-processor.
Definition ngcdcsAdcPP.cpp:188
int Clamp(int flag)
Set clamp.
Definition ngcdcsADC.cpp:805
double offset
Video offset.
Definition ngcdcsADC.hpp:108
Definition ngcdcsCLDC.hpp:594
Definition ngcbIFC.hpp:72
Definition ngcdcsADC.hpp:27
int nx
Definition ngcdcsADC.hpp:28
int ndsamp2nint
Definition ngcdcsADC.hpp:35
ngcdcs_adcpp_t()
Constructor.
Definition ngcdcsADC.hpp:38
int nint
Definition ngcdcsADC.hpp:30
int invert
Definition ngcdcsADC.hpp:34
int enabled
Definition ngcdcsADC.hpp:32
int ny
Definition ngcdcsADC.hpp:29
int nsamp
Definition ngcdcsADC.hpp:31
int fowler
Definition ngcdcsADC.hpp:33