12#error This is a C++ include file and cannot be used from plain C
24#define ngcdcsAO_ALICE 0x00010000
25#define ngcdcsAO_ALICE_REV0 0x00100000
30#define ngcdcsAO_UNITY_GAIN 1
35#define ngcdcsAO_MAX_GAIN 2000
40#define ngcdcsAO_MAX_INITFILES 8
45#define ngcdcsAO_OVRILLUM_MAXCNT 1
50#define ngcdcsAO_SENS_TEMP 1
51#define ngcdcsAO_SENS_RHUM 2
52#define ngcdcsAO_SENS_PRESSURE 4
53#define ngcdcsAO_SENS_OVRILLUM 8
58#define ngcdcsAO_SENS_ALL (ngcdcsAO_SENS_TEMP|ngcdcsAO_SENS_RHUM|ngcdcsAO_SENS_PRESSURE|ngcdcsAO_SENS_OVRILLUM)
210 msb |= ((
mask[i].yStart >> 12) & 0x1) << (i * 2);
211 msb |= ((
mask[i].yEnd >> 12) & 0x1) << ((i * 2) + 1);
219 msb |= ((
pat.xStart >> 12) & 0xf);
220 msb |= ((
pat.xEnd >> 12) & 0xf) << 4;
228 for (i=0;i<7;i++) msb |= ((
region[i].yEnd >> 12) & 0x1) << i;
234 if ((idx == 0) || (idx == 1))
return (0);
235 else if (idx == 2)
return (1);
236 else if ((idx == 3) || (idx == 4))
return (2);
237 else if (idx == 5)
return (3);
238 else if (idx == 6)
return (4);
247 if (idx == 0)
return (0);
248 else if ((idx == 1) || (idx == 2))
return (1);
249 else if (idx == 3)
return (2);
250 else if ((idx == 4) || (idx == 5))
return (3);
251 else if (idx == 6)
return (4);
263 msb |= (
region[0].xStart >> 12) & 0xf;
264 msb |= ((
region[0].xEnd >> 12) & 0xf) << 4;
265 msb |= ((
region[1].xStart >> 12) & 0xf) << 8;
269 msb |= (
region[1].xEnd >> 12) & 0xf;
270 msb |= ((
region[2].xStart >> 12) & 0xf) << 4;
271 msb |= ((
region[2].xEnd >> 12) & 0xf) << 8;
275 msb |= (
region[3].xStart >> 12) & 0xf;
276 msb |= ((
region[3].xEnd >> 12) & 0xf) << 4;
277 msb |= ((
region[4].xStart >> 12) & 0xf) << 8;
281 msb |= (
region[4].xEnd >> 12) & 0xf;
282 msb |= ((
region[5].xStart >> 12) & 0xf) << 4;
283 msb |= ((
region[5].xEnd >> 12) & 0xf) << 8;
287 msb |= (
region[6].xStart >> 12) & 0xf;
288 msb |= ((
region[6].xEnd >> 12) & 0xf) << 4;
297 for (i=0;i<7;i++) pol |= (
region[i].pol & 0x1) << i;
298 pol |= (
pat.pol & 0x1) << 8;
299 for (i=0;i<3;i++) pol |= (
mask[i].pol & 0x1) << (i + 9);
422 int Enable(
int check = 1);
443 int CkAddrCB(
int addr,
const int *buffer,
int size);
446 void WrAddrCB(
int addr,
const int *buffer,
int size);
449 virtual int Update(
int sensor,
int force = 0);
491 int Gain(
int quadrant,
int value);
494 int Delay(
int idx,
int ticks);
503 int Dim(
int x,
int y);
518 int Shift(
int clkNum,
int shift,
int edge,
int force = 0);
521 int GetClk(
int clkNum,
int patNum,
char *clkString);
524 int AmpGain(
int channel,
double value);
527 int Clamp(
int channel,
int level);
530 int ClampOn(
int side,
int flag);
533 int Input(
int channel,
int input);
539 int SetupKey(
const char *key,
const int *idx,
const char *value,
543 int StatusKey(
const char *key,
const int *idx,
char *value,
550 struct timeval timeReset_;
583 int overIlluminationCnt_;
586 unsigned int aliceAdc_[4];
595 void Log_(
const char *msg);
598 int LvlIPhase2Reg_(
double volt);
601 int LvlSPhase2Reg_(
double volt);
604 double Reg2LvlIPhase_(
int value);
607 double Reg2LvlSPhase_(
int value);
610 int UpdateSensors_(
int sensor,
int force);
613 int WrAdc_(
int adc,
int chan,
int addr,
int value);
616 int WrAdc_(
int addr,
int value);
622 int RcpEndY_(
int idx,
int value);
625 int RcpStartX_(
int idx,
int value);
628 int RcpEndX_(
int idx,
int value);
631 int RcpTC_(
int idx,
int value);
634 int RcpPol_(
int idx,
int value);\
637 int MaskStartY_(
int idx,
int value);
640 int MaskEndY_(
int idx,
int value);
643 int MaskPol_(
int idx,
int value);
646 int PatStartX_(
int value);
649 int PatEndX_(
int value);
652 int PatPol_(
int value);
Definition ngcbALARM.hpp:99
Definition ngcbIFC.hpp:754
ngcbMOD(const ngcbMOD &other)
Copy constructor.
Definition ngcbMOD.cpp:43
Definition ngcdcsAO.hpp:151
int pol
Definition ngcdcsAO.hpp:153
int yStart
Definition ngcdcsAO.hpp:154
int yEnd
Definition ngcdcsAO.hpp:155
virtual ~ngcdcsAO_MASK()
Destructor.
Definition ngcdcsAO.hpp:161
ngcdcsAO_MASK()
Constructor.
Definition ngcdcsAO.hpp:158
Definition ngcdcsAO.hpp:170
ngcdcsAO_PAT()
Constructor.
Definition ngcdcsAO.hpp:177
int xStart
Definition ngcdcsAO.hpp:173
int xEnd
Definition ngcdcsAO.hpp:174
virtual ~ngcdcsAO_PAT()
Destructor.
Definition ngcdcsAO.hpp:180
int pol
Definition ngcdcsAO.hpp:172
Definition ngcdcsAO.hpp:130
int tc
Definition ngcdcsAO.hpp:136
ngcdcsAO_REGION()
Constructor.
Definition ngcdcsAO.hpp:139
int xEnd
Definition ngcdcsAO.hpp:135
int pol
Definition ngcdcsAO.hpp:132
virtual ~ngcdcsAO_REGION()
Destructor.
Definition ngcdcsAO.hpp:142
int xStart
Definition ngcdcsAO.hpp:134
int yEnd
Definition ngcdcsAO.hpp:133
Definition ngcdcsAO.hpp:189
int MsbX2(int idx)
Get region xEnd MSB register value.
Definition ngcdcsAO.hpp:256
virtual ~ngcdcsAO_RMP()
Destructor.
Definition ngcdcsAO.hpp:202
int Pol()
Get polarity register value.
Definition ngcdcsAO.hpp:294
int RegMsbX1(int idx)
Get region xStart MSB register index.
Definition ngcdcsAO.hpp:233
int MsbY()
Get region line-end MSB register value.
Definition ngcdcsAO.hpp:225
int MsbX(int idx)
Get region xStart,xEnd MSB register value.
Definition ngcdcsAO.hpp:259
ngcdcsAO_MASK mask[3]
Definition ngcdcsAO.hpp:192
ngcdcsAO_PAT pat
Definition ngcdcsAO.hpp:193
ngcdcsAO_RMP()
Constructor.
Definition ngcdcsAO.hpp:196
int MsbMask()
Get mask MSB register value.
Definition ngcdcsAO.hpp:205
ngcdcsAO_REGION region[7]
Definition ngcdcsAO.hpp:191
int RegMsbX2(int idx)
Get region xEnd MSB register index.
Definition ngcdcsAO.hpp:246
int MsbPat()
Get pattern MSB register value.
Definition ngcdcsAO.hpp:217
int MsbX1(int idx)
Get region xStart MSB register value.
Definition ngcdcsAO.hpp:243
int DimY(int y)
Set image y-dimension.
Definition ngcdcsAO.cpp:2409
virtual int AfterStop()
Function to be executed after read-out stop.
Definition ngcdcsAO.cpp:856
int hvChan[4]
High-voltage channel.
Definition ngcdcsAO.hpp:401
int Enable(int check=1)
Call-back at transition to operational state.
Definition ngcdcsAO.cpp:197
int ny
Image transfer y-dimension.
Definition ngcdcsAO.hpp:395
char initFile[ngcdcsAO_MAX_INITFILES][256]
Register initialization file.
Definition ngcdcsAO.hpp:323
int Dim(int x, int y)
Set image dimension.
Definition ngcdcsAO.cpp:2363
void Reset()
Align software state after reset.
Definition ngcdcsAO.cpp:162
ngcdcsCLDC * cldc
Assocoated clock- and bias-generator.
Definition ngcdcsAO.hpp:413
int ResetHead()
Reset AO camera.
Definition ngcdcsAO.cpp:1001
virtual ~ngcdcsAO()
Destructor.
Definition ngcdcsAO.cpp:50
double reDelay[8]
Rising edge calibration delays (in ticks)
Definition ngcdcsAO.hpp:380
int serialLink
Serial link to AO-system disabled/enabled flag.
Definition ngcdcsAO.hpp:347
virtual int AutoStart()
Function to be executed after read-out start.
Definition ngcdcsAO.cpp:881
double viph[4]
Multi-level-clock voltage levels I-phase.
Definition ngcdcsAO.hpp:389
int autoStart
Automatic immediate start.
Definition ngcdcsAO.hpp:329
int SerialLink(int flag)
Enable/disable serial link to AO-system.
Definition ngcdcsAO.cpp:1363
int dataLink
Data-link to NGC-LLCU disabled/enabled flag.
Definition ngcdcsAO.hpp:344
int SetupKey(const char *key, const int *idx, const char *value, int *status=NULL)
Setup.
Definition ngcdcsAoSetup.cpp:25
double sensSettleTime
Sensor settling time.
Definition ngcdcsAO.hpp:371
int Gain(int value)
Set gain.
Definition ngcdcsAO.cpp:1374
int nx
Image transfer x-dimension.
Definition ngcdcsAO.hpp:392
ngcdcsAO_RMP rmp
ALICE rgions, masks, patterns.
Definition ngcdcsAO.hpp:398
int maxGain
Maximum gain.
Definition ngcdcsAO.hpp:353
int ResetRHum()
Reset humidity sensor.
Definition ngcdcsAO.cpp:1059
void WrAddrCB(int addr, const int *buffer, int size)
Write-to-address call-back for alignment.
Definition ngcdcsAO.cpp:598
int sensEnabled
Sensor interface disabled/enabled flag.
Definition ngcdcsAO.hpp:365
int master
Synchronisation master flag.
Definition ngcdcsAO.hpp:341
int DimX(int x)
Set image x-dimension.
Definition ngcdcsAO.cpp:2404
int ResetPressure()
Reset pressure sensor.
Definition ngcdcsAO.cpp:1126
int VoltageSPhase(int idx, double volt)
Set multi-level-clock voltage levels (S-phase)
Definition ngcdcsAO.cpp:2303
int gain
Gain step.
Definition ngcdcsAO.hpp:350
int VoltageIPhase(int idx, double volt)
Set multi-level-clock voltage levels (I-phase)
Definition ngcdcsAO.cpp:2243
ngcdcsSEQ * seq
Associated sequencer.
Definition ngcdcsAO.hpp:416
int StatusKey(const char *key, const int *idx, char *value, int *status=NULL)
Status.
Definition ngcdcsAoStatus.cpp:25
ngcdcs_aocal_t calib[4]
High voltage calibration.
Definition ngcdcsAO.hpp:404
int ResetTemp()
Reset temperature sensor.
Definition ngcdcsAO.cpp:1085
int DataLink(int flag)
Enable/disable data-link to NGC-LLCU.
Definition ngcdcsAO.cpp:1324
int CtrlReg()
Return actual control register mirror.
Definition ngcdcsAO.hpp:536
int Clamp(int channel, int level)
Set clamp level (0 - 1020)
Definition ngcdcsAO.cpp:2828
int shpWidth
SHP-widht (ALICE)
Definition ngcdcsAO.hpp:374
int Delay(int idx, int ticks)
Set delay (in ticks)
Definition ngcdcsAO.cpp:2004
int CheckOvrIllum()
Check over-illumination sensor.
Definition ngcdcsAO.cpp:890
char pixMask[256]
Calibration pixel mask.
Definition ngcdcsAO.hpp:407
int GetClk(int clkNum, int patNum, char *clkString)
Get clock state values.
Definition ngcdcsAO.cpp:2656
int ClampOn(int side, int flag)
Enable Clamp.
Definition ngcdcsAO.cpp:2924
ngcdcsSHTx_TEMP temp
Temperature sensor (degC)
Definition ngcdcsAO.hpp:332
unsigned int FrameCnt()
Return current frame counter.
Definition ngcdcsAO.cpp:3077
virtual int AtStop()
Function to be executed before read-out stop.
Definition ngcdcsAO.cpp:847
int rstStart
Reset at start.
Definition ngcdcsAO.hpp:359
int Disable()
Call-back at transition to not operational state.
Definition ngcdcsAO.cpp:513
int sensPrefill
Prefill sensor filter windows.
Definition ngcdcsAO.hpp:368
int ResetOvrIllum()
Reset over-illumination detection.
Definition ngcdcsAO.cpp:1193
int AmpGain(int channel, double value)
Set amplifier gain (in dB - from 0.0 to 36.0 dB)
Definition ngcdcsAO.cpp:2742
int Selftest()
Execute selftest.
Definition ngcdcsAO.cpp:564
int ResetAfe(int update=1)
Reset AFE interface.
Definition ngcdcsAO.cpp:3025
double vsph[4]
Multi-level-clock voltage levels S-phase.
Definition ngcdcsAO.hpp:386
int SensorError(int sensor)
Return sensor error state.
Definition ngcdcsAO.cpp:1170
virtual int AtStart()
Function to be executed before read-out start.
Definition ngcdcsAO.cpp:865
ngcdcs_afe_t afe
Analog Front End control (AFE)
Definition ngcdcsAO.hpp:410
ngcdcsSHTx_RHUM rhum
Relative humidity sensor (%)
Definition ngcdcsAO.hpp:335
int hwRev
Hardware revision (0=protoype, 1=reshaped)
Definition ngcdcsAO.hpp:326
int Shift(int clkNum, int shift, int edge, int force=0)
Clock-shifter.
Definition ngcdcsAO.cpp:2450
ngcdcsAO(const ngcb_route_t &r)
Constructor with route.
Definition ngcdcsAO.cpp:29
int Master(int flag)
Enable/disable synchronisation master flag.
Definition ngcdcsAO.cpp:1285
int expAbort
Abort exposure on over-illumination.
Definition ngcdcsAO.hpp:362
double FrameRate()
Return actual frame rate (Hz)
Definition ngcdcsAO.cpp:3096
virtual int Update(int sensor, int force=0)
Run next sensor update cycle.
Definition ngcdcsAO.cpp:668
int delay[42]
42 delays (in ticks)
Definition ngcdcsAO.hpp:377
ngcdcsMPL115A pressure
Pressure sensor (kPa)
Definition ngcdcsAO.hpp:338
int ResetSensors(int errFlag=0)
Reset all sensors.
Definition ngcdcsAO.cpp:949
int overIllumination
Over-illumination flag.
Definition ngcdcsAO.hpp:356
double feDelay[8]
Falling edge calibration delays (in ticks)
Definition ngcdcsAO.hpp:383
int CkAddrCB(int addr, const int *buffer, int size)
Check-address call-back for alignment.
Definition ngcdcsAO.cpp:572
int Input(int channel, int input)
Select AFE input (0=CCD, 1=AUX1, 2=AUX2)
Definition ngcdcsAO.cpp:2964
Definition ngcdcsCLDC.hpp:594
Definition ngcdcsSENS.hpp:233
Definition ngcdcsSEQ.hpp:574
Definition ngcdcsSENS.hpp:176
Definition ngcdcsSENS.hpp:157
#define ngcdcsAO_MAX_INITFILES
Definition ngcdcsAO.hpp:40
Definition ngcbIFC.hpp:72
Definition ngcdcsAO.hpp:63
ngcdcs_afe_chan_t()
Constructor.
Definition ngcdcsAO.hpp:69
int input
Definition ngcdcsAO.hpp:66
int clamp
Definition ngcdcsAO.hpp:65
double gain
Definition ngcdcsAO.hpp:64
Definition ngcdcsAO.hpp:79
int delay
Definition ngcdcsAO.hpp:80
int clampL
Definition ngcdcsAO.hpp:81
ngcdcs_afe_chan_t chan[8]
Definition ngcdcsAO.hpp:84
int enabled
Definition ngcdcsAO.hpp:83
ngcdcs_afe_t()
Constructor.
Definition ngcdcsAO.hpp:87
int clampR
Definition ngcdcsAO.hpp:82
Definition ngcdcsAO.hpp:98
double hvprc1
Definition ngcdcsAO.hpp:105
double hvsty2
Definition ngcdcsAO.hpp:103
double hv1
Definition ngcdcsAO.hpp:99
double eqSlope
Definition ngcdcsAO.hpp:109
double hvprc3
Definition ngcdcsAO.hpp:107
double hv2
Definition ngcdcsAO.hpp:100
double hvsty1
Definition ngcdcsAO.hpp:102
double hvsty3
Definition ngcdcsAO.hpp:104
ngcdcs_aocal_t()
Constructor.
Definition ngcdcsAO.hpp:112
double hv3
Definition ngcdcsAO.hpp:101
double eqOffset
Definition ngcdcsAO.hpp:108
double hvprc2
Definition ngcdcsAO.hpp:106