13#error This is a C++ include file and cannot be used from plain C
25#define ngcdcsAO_ALICE 0x00010000
26#define ngcdcsAO_ALICE_REV0 0x00100000
31#define ngcdcsAO_UNITY_GAIN 1
36#define ngcdcsAO_MAX_GAIN 2000
41#define ngcdcsAO_MAX_INITFILES 8
46#define ngcdcsAO_OVRILLUM_MAXCNT 1
51#define ngcdcsAO_SENS_TEMP 1
52#define ngcdcsAO_SENS_RHUM 2
53#define ngcdcsAO_SENS_PRESSURE 4
54#define ngcdcsAO_SENS_OVRILLUM 8
59#define ngcdcsAO_SENS_ALL (ngcdcsAO_SENS_TEMP|ngcdcsAO_SENS_RHUM|ngcdcsAO_SENS_PRESSURE|ngcdcsAO_SENS_OVRILLUM)
211 msb |= ((
mask[i].yStart >> 12) & 0x1) << (i * 2);
212 msb |= ((
mask[i].yEnd >> 12) & 0x1) << ((i * 2) + 1);
220 msb |= ((
pat.xStart >> 12) & 0xf);
221 msb |= ((
pat.xEnd >> 12) & 0xf) << 4;
229 for (i=0;i<7;i++) msb |= ((
region[i].yEnd >> 12) & 0x1) << i;
235 if ((idx == 0) || (idx == 1))
return (0);
236 else if (idx == 2)
return (1);
237 else if ((idx == 3) || (idx == 4))
return (2);
238 else if (idx == 5)
return (3);
239 else if (idx == 6)
return (4);
248 if (idx == 0)
return (0);
249 else if ((idx == 1) || (idx == 2))
return (1);
250 else if (idx == 3)
return (2);
251 else if ((idx == 4) || (idx == 5))
return (3);
252 else if (idx == 6)
return (4);
264 msb |= (
region[0].xStart >> 12) & 0xf;
265 msb |= ((
region[0].xEnd >> 12) & 0xf) << 4;
266 msb |= ((
region[1].xStart >> 12) & 0xf) << 8;
270 msb |= (
region[1].xEnd >> 12) & 0xf;
271 msb |= ((
region[2].xStart >> 12) & 0xf) << 4;
272 msb |= ((
region[2].xEnd >> 12) & 0xf) << 8;
276 msb |= (
region[3].xStart >> 12) & 0xf;
277 msb |= ((
region[3].xEnd >> 12) & 0xf) << 4;
278 msb |= ((
region[4].xStart >> 12) & 0xf) << 8;
282 msb |= (
region[4].xEnd >> 12) & 0xf;
283 msb |= ((
region[5].xStart >> 12) & 0xf) << 4;
284 msb |= ((
region[5].xEnd >> 12) & 0xf) << 8;
288 msb |= (
region[6].xStart >> 12) & 0xf;
289 msb |= ((
region[6].xEnd >> 12) & 0xf) << 4;
298 for (i=0;i<7;i++) pol |= (
region[i].pol & 0x1) << i;
299 pol |= (
pat.pol & 0x1) << 8;
300 for (i=0;i<3;i++) pol |= (
mask[i].pol & 0x1) << (i + 9);
426 int Enable(
int check = 1);
447 int CkAddrCB(
int addr,
const int *buffer,
int size);
450 void WrAddrCB(
int addr,
const int *buffer,
int size);
453 virtual int Update(
int sensor,
int force = 0);
495 int Gain(
int quadrant,
int value);
498 int Delay(
int idx,
int ticks);
507 int Dim(
int x,
int y);
522 int Shift(
int clkNum,
int shift,
int edge,
int force = 0);
525 int GetClk(
int clkNum,
int patNum,
char *clkString);
528 int AmpGain(
int channel,
double value);
531 int Clamp(
int channel,
int level);
534 int ClampOn(
int side,
int flag);
537 int Input(
int channel,
int input);
543 int SetupKey(
const char *key,
const int *idx,
const char *value,
547 int StatusKey(
const char *key,
const int *idx,
char *value,
554 struct timeval timeReset_;
587 int overIlluminationCnt_;
590 unsigned int aliceAdc_[4];
599 void Log_(
const char *msg);
602 int LvlIPhase2Reg_(
double volt);
605 int LvlSPhase2Reg_(
double volt);
608 double Reg2LvlIPhase_(
int value);
611 double Reg2LvlSPhase_(
int value);
614 int UpdateSensors_(
int sensor,
int force);
617 int WrAdc_(
int adc,
int chan,
int addr,
int value);
620 int WrAdc_(
int addr,
int value);
626 int RcpEndY_(
int idx,
int value);
629 int RcpStartX_(
int idx,
int value);
632 int RcpEndX_(
int idx,
int value);
635 int RcpTC_(
int idx,
int value);
638 int RcpPol_(
int idx,
int value);\
641 int MaskStartY_(
int idx,
int value);
644 int MaskEndY_(
int idx,
int value);
647 int MaskPol_(
int idx,
int value);
650 int PatStartX_(
int value);
653 int PatEndX_(
int value);
656 int PatPol_(
int value);
Definition ngcbALARM.hpp:100
Definition ngcbIFC.hpp:760
ngcbMOD(const ngcbMOD &other)
Copy constructor.
Definition ngcbMOD.cpp:43
Definition ngcdcsAO.hpp:152
int pol
Definition ngcdcsAO.hpp:154
int yStart
Definition ngcdcsAO.hpp:155
int yEnd
Definition ngcdcsAO.hpp:156
virtual ~ngcdcsAO_MASK()
Destructor.
Definition ngcdcsAO.hpp:162
ngcdcsAO_MASK()
Constructor.
Definition ngcdcsAO.hpp:159
Definition ngcdcsAO.hpp:171
ngcdcsAO_PAT()
Constructor.
Definition ngcdcsAO.hpp:178
int xStart
Definition ngcdcsAO.hpp:174
int xEnd
Definition ngcdcsAO.hpp:175
virtual ~ngcdcsAO_PAT()
Destructor.
Definition ngcdcsAO.hpp:181
int pol
Definition ngcdcsAO.hpp:173
Definition ngcdcsAO.hpp:131
int tc
Definition ngcdcsAO.hpp:137
ngcdcsAO_REGION()
Constructor.
Definition ngcdcsAO.hpp:140
int xEnd
Definition ngcdcsAO.hpp:136
int pol
Definition ngcdcsAO.hpp:133
virtual ~ngcdcsAO_REGION()
Destructor.
Definition ngcdcsAO.hpp:143
int xStart
Definition ngcdcsAO.hpp:135
int yEnd
Definition ngcdcsAO.hpp:134
Definition ngcdcsAO.hpp:190
int MsbX2(int idx)
Get region xEnd MSB register value.
Definition ngcdcsAO.hpp:257
virtual ~ngcdcsAO_RMP()
Destructor.
Definition ngcdcsAO.hpp:203
int Pol()
Get polarity register value.
Definition ngcdcsAO.hpp:295
int RegMsbX1(int idx)
Get region xStart MSB register index.
Definition ngcdcsAO.hpp:234
int MsbY()
Get region line-end MSB register value.
Definition ngcdcsAO.hpp:226
int MsbX(int idx)
Get region xStart,xEnd MSB register value.
Definition ngcdcsAO.hpp:260
ngcdcsAO_MASK mask[3]
Definition ngcdcsAO.hpp:193
ngcdcsAO_PAT pat
Definition ngcdcsAO.hpp:194
ngcdcsAO_RMP()
Constructor.
Definition ngcdcsAO.hpp:197
int MsbMask()
Get mask MSB register value.
Definition ngcdcsAO.hpp:206
ngcdcsAO_REGION region[7]
Definition ngcdcsAO.hpp:192
int RegMsbX2(int idx)
Get region xEnd MSB register index.
Definition ngcdcsAO.hpp:247
int MsbPat()
Get pattern MSB register value.
Definition ngcdcsAO.hpp:218
int MsbX1(int idx)
Get region xStart MSB register value.
Definition ngcdcsAO.hpp:244
int DimY(int y)
Set image y-dimension.
Definition ngcdcsAO.cpp:2432
virtual int AfterStop()
Function to be executed after read-out stop.
Definition ngcdcsAO.cpp:879
int hvChan[4]
High-voltage channel.
Definition ngcdcsAO.hpp:405
int Enable(int check=1)
Call-back at transition to operational state.
Definition ngcdcsAO.cpp:202
int ny
Image transfer y-dimension.
Definition ngcdcsAO.hpp:399
char initFile[ngcdcsAO_MAX_INITFILES][256]
Register initialization files.
Definition ngcdcsAO.hpp:324
int Dim(int x, int y)
Set image dimension.
Definition ngcdcsAO.cpp:2386
void Reset()
Align software state after reset.
Definition ngcdcsAO.cpp:167
ngcdcsCLDC * cldc
Assocoated clock- and bias-generator.
Definition ngcdcsAO.hpp:417
int ResetHead()
Reset AO camera.
Definition ngcdcsAO.cpp:1024
virtual ~ngcdcsAO()
Destructor.
Definition ngcdcsAO.cpp:51
double reDelay[8]
Rising edge calibration delays (in ticks)
Definition ngcdcsAO.hpp:384
int serialLink
Serial link to AO-system disabled/enabled flag.
Definition ngcdcsAO.hpp:351
virtual int AutoStart()
Function to be executed after read-out start.
Definition ngcdcsAO.cpp:904
double viph[4]
Multi-level-clock voltage levels I-phase.
Definition ngcdcsAO.hpp:393
int autoStart
Automatic immediate start.
Definition ngcdcsAO.hpp:333
int SerialLink(int flag)
Enable/disable serial link to AO-system.
Definition ngcdcsAO.cpp:1386
int dataLink
Data-link to NGC-LLCU disabled/enabled flag.
Definition ngcdcsAO.hpp:348
int SetupKey(const char *key, const int *idx, const char *value, int *status=NULL)
Setup.
Definition ngcdcsAoSetup.cpp:26
double sensSettleTime
Sensor settling time.
Definition ngcdcsAO.hpp:375
int Gain(int value)
Set gain.
Definition ngcdcsAO.cpp:1397
int nx
Image transfer x-dimension.
Definition ngcdcsAO.hpp:396
ngcdcsAO_RMP rmp
ALICE rgions, masks, patterns.
Definition ngcdcsAO.hpp:402
int maxGain
Maximum gain.
Definition ngcdcsAO.hpp:357
int ResetRHum()
Reset humidity sensor.
Definition ngcdcsAO.cpp:1082
void WrAddrCB(int addr, const int *buffer, int size)
Write-to-address call-back for alignment.
Definition ngcdcsAO.cpp:621
int sensEnabled
Sensor interface disabled/enabled flag.
Definition ngcdcsAO.hpp:369
int master
Synchronisation master flag.
Definition ngcdcsAO.hpp:345
int DimX(int x)
Set image x-dimension.
Definition ngcdcsAO.cpp:2427
int ResetPressure()
Reset pressure sensor.
Definition ngcdcsAO.cpp:1149
int VoltageSPhase(int idx, double volt)
Set multi-level-clock voltage levels (S-phase)
Definition ngcdcsAO.cpp:2326
int gain
Gain step.
Definition ngcdcsAO.hpp:354
int VoltageIPhase(int idx, double volt)
Set multi-level-clock voltage levels (I-phase)
Definition ngcdcsAO.cpp:2266
ngcdcsSEQ * seq
Associated sequencer.
Definition ngcdcsAO.hpp:420
int StatusKey(const char *key, const int *idx, char *value, int *status=NULL)
Status.
Definition ngcdcsAoStatus.cpp:26
ngcdcs_aocal_t calib[4]
High voltage calibration.
Definition ngcdcsAO.hpp:408
int ResetTemp()
Reset temperature sensor.
Definition ngcdcsAO.cpp:1108
int DataLink(int flag)
Enable/disable data-link to NGC-LLCU.
Definition ngcdcsAO.cpp:1347
int CtrlReg()
Return actual control register mirror.
Definition ngcdcsAO.hpp:540
int Clamp(int channel, int level)
Set clamp level (0 - 1020)
Definition ngcdcsAO.cpp:2851
int shpWidth
SHP-widht (ALICE)
Definition ngcdcsAO.hpp:378
int Delay(int idx, int ticks)
Set delay (in ticks)
Definition ngcdcsAO.cpp:2027
int CheckOvrIllum()
Check over-illumination sensor.
Definition ngcdcsAO.cpp:913
char pixMask[256]
Calibration pixel mask.
Definition ngcdcsAO.hpp:411
int GetClk(int clkNum, int patNum, char *clkString)
Get clock state values.
Definition ngcdcsAO.cpp:2679
int ClampOn(int side, int flag)
Enable Clamp.
Definition ngcdcsAO.cpp:2947
ngcdcsSHTx_TEMP temp
Temperature sensor (degC)
Definition ngcdcsAO.hpp:336
unsigned int FrameCnt()
Return current frame counter.
Definition ngcdcsAO.cpp:3100
virtual int AtStop()
Function to be executed before read-out stop.
Definition ngcdcsAO.cpp:870
int rstStart
Reset at start.
Definition ngcdcsAO.hpp:363
int Disable()
Call-back at transition to not operational state.
Definition ngcdcsAO.cpp:518
int sensPrefill
Prefill sensor filter windows.
Definition ngcdcsAO.hpp:372
int ResetOvrIllum()
Reset over-illumination detection.
Definition ngcdcsAO.cpp:1216
int AmpGain(int channel, double value)
Set amplifier gain (in dB - from 0.0 to 36.0 dB)
Definition ngcdcsAO.cpp:2765
int Selftest()
Execute selftest.
Definition ngcdcsAO.cpp:587
int ResetAfe(int update=1)
Reset AFE interface.
Definition ngcdcsAO.cpp:3048
double vsph[4]
Multi-level-clock voltage levels S-phase.
Definition ngcdcsAO.hpp:390
int SensorError(int sensor)
Return sensor error state.
Definition ngcdcsAO.cpp:1193
virtual int AtStart()
Function to be executed before read-out start.
Definition ngcdcsAO.cpp:888
ngcdcs_afe_t afe
Analog Front End control (AFE)
Definition ngcdcsAO.hpp:414
ngcdcsSHTx_RHUM rhum
Relative humidity sensor (%)
Definition ngcdcsAO.hpp:339
int hwRev
Hardware revision (0=protoype, 1=reshaped)
Definition ngcdcsAO.hpp:330
int Shift(int clkNum, int shift, int edge, int force=0)
Clock-shifter.
Definition ngcdcsAO.cpp:2473
ngcdcsAO(const ngcb_route_t &r)
Constructor with route.
Definition ngcdcsAO.cpp:30
int Master(int flag)
Enable/disable synchronisation master flag.
Definition ngcdcsAO.cpp:1308
int expAbort
Abort exposure on over-illumination.
Definition ngcdcsAO.hpp:366
double FrameRate()
Return actual frame rate (Hz)
Definition ngcdcsAO.cpp:3119
virtual int Update(int sensor, int force=0)
Run next sensor update cycle.
Definition ngcdcsAO.cpp:691
int delay[42]
42 delays (in ticks)
Definition ngcdcsAO.hpp:381
char resetFile[ngcdcsAO_MAX_INITFILES][256]
Register reset files.
Definition ngcdcsAO.hpp:327
ngcdcsMPL115A pressure
Pressure sensor (kPa)
Definition ngcdcsAO.hpp:342
int ResetSensors(int errFlag=0)
Reset all sensors.
Definition ngcdcsAO.cpp:972
int overIllumination
Over-illumination flag.
Definition ngcdcsAO.hpp:360
double feDelay[8]
Falling edge calibration delays (in ticks)
Definition ngcdcsAO.hpp:387
int CkAddrCB(int addr, const int *buffer, int size)
Check-address call-back for alignment.
Definition ngcdcsAO.cpp:595
int Input(int channel, int input)
Select AFE input (0=CCD, 1=AUX1, 2=AUX2)
Definition ngcdcsAO.cpp:2987
Definition ngcdcsCLDC.hpp:595
Definition ngcdcsSENS.hpp:234
Definition ngcdcsSEQ.hpp:582
Definition ngcdcsSENS.hpp:177
Definition ngcdcsSENS.hpp:158
#define ngcdcsAO_MAX_INITFILES
Definition ngcdcsAO.hpp:41
Definition ngcbIFC.hpp:78
Definition ngcdcsAO.hpp:64
ngcdcs_afe_chan_t()
Constructor.
Definition ngcdcsAO.hpp:70
int input
Definition ngcdcsAO.hpp:67
int clamp
Definition ngcdcsAO.hpp:66
double gain
Definition ngcdcsAO.hpp:65
Definition ngcdcsAO.hpp:80
int delay
Definition ngcdcsAO.hpp:81
int clampL
Definition ngcdcsAO.hpp:82
ngcdcs_afe_chan_t chan[8]
Definition ngcdcsAO.hpp:85
int enabled
Definition ngcdcsAO.hpp:84
ngcdcs_afe_t()
Constructor.
Definition ngcdcsAO.hpp:88
int clampR
Definition ngcdcsAO.hpp:83
Definition ngcdcsAO.hpp:99
double hvprc1
Definition ngcdcsAO.hpp:106
double hvsty2
Definition ngcdcsAO.hpp:104
double hv1
Definition ngcdcsAO.hpp:100
double eqSlope
Definition ngcdcsAO.hpp:110
double hvprc3
Definition ngcdcsAO.hpp:108
double hv2
Definition ngcdcsAO.hpp:101
double hvsty1
Definition ngcdcsAO.hpp:103
double hvsty3
Definition ngcdcsAO.hpp:105
ngcdcs_aocal_t()
Constructor.
Definition ngcdcsAO.hpp:113
double hv3
Definition ngcdcsAO.hpp:102
double eqOffset
Definition ngcdcsAO.hpp:109
double hvprc2
Definition ngcdcsAO.hpp:107