Details | Last modification | View Log | RSS feed
| Rev | Author | Line No. | Line | 
|---|---|---|---|
| 212 | f9daq | 1 | #ifndef AITINTERFACE_H | 
        
| 2 | #define AITINTERFACE_H | 
        ||
| 3 | |||
| 4 | void SetupAcquisition(int neve);  | 
        ||
| 5 | void GetStatistics(int events);  | 
        ||
| 6 | int Acquire(int events);  | 
        ||
| 7 | void InitInterface(int events);  | 
        ||
| 8 | void ShowEvent(int eventNumber);  | 
        ||
| 9 | int ExtractEventCount(int eventNum);  | 
        ||
| 10 | long ExtractTimeStamp(int eventNum);  | 
        ||
| 11 | unsigned short ExtractAdcData(int eventNum,int channel);  | 
        ||
| 12 | int GetEventPosition(int eventNum);  | 
        ||
| 13 | int GetAdcEventSize();  | 
        ||
| 14 | void InitializeConnection();  | 
        ||
| 15 | void ReconfigureDevice();  | 
        ||
| 16 | void ReconnectDevice();  | 
        ||
| 17 | void ResetDevice();  | 
        ||
| 18 | int UpdateDeviceList();  | 
        ||
| 19 | void GetDeviceId();  | 
        ||
| 20 | void ReadRegisters();  | 
        ||
| 21 | void QuickSetupTriggerOff();  | 
        ||
| 22 | void QuickSetupDiscriminator();  | 
        ||
| 23 | void QuickSetupContinuous();  | 
        ||
| 24 | void SetAdcOffsets(int offsetInMv);  | 
        ||
| 25 | void SetAdcGain(int gain);  | 
        ||
| 26 | double GetRampRate();  | 
        ||
| 27 | void SetRampRate(double voltsPerSecond);  | 
        ||
| 28 | void CycleHvReset();  | 
        ||
| 29 | void SetMaximumHvSetting(double volts);  | 
        ||
| 30 | void SetHvOn(bool hvOn);  | 
        ||
| 31 | double GetHvVoltageSetting();  | 
        ||
| 32 | double GetHvIlimitSetting();  | 
        ||
| 33 | void SetHvVoltage(int reg,double volts);  | 
        ||
| 34 | void SetHvCurrentLimit(double milliamps);  | 
        ||
| 35 | void SetDetectorVaHiRange(bool range);  | 
        ||
| 36 | void SetDetectorVaOn(bool on);  | 
        ||
| 37 | void AddChannelNumber(bool addChannelNumber);  | 
        ||
| 38 | extern bool addTimeStamp;  | 
        ||
| 39 | void AddTimeStamp(bool addTimeStamp);  | 
        ||
| 40 | extern bool addEventCount;  | 
        ||
| 41 | void AddEventCount(bool addEventCount);  | 
        ||
| 42 | void SetAdcOffset(int reg,double milliVolts);  | 
        ||
| 43 | double GetAdcOffsetInMv(int reg);  | 
        ||
| 44 | void ResetAdc(bool reset);  | 
        ||
| 45 | void SetAdcCoupling(bool acCoupling);  | 
        ||
| 46 | int GetIntegrationTime();  | 
        ||
| 47 | void SetIntegrationTime(int integrationTime);  | 
        ||
| 48 | void SetDeadTime(int deadTimeInNs);  | 
        ||
| 49 | void DisableTriggers();  | 
        ||
| 50 | void EnableTrigger(int bitIndex);  | 
        ||
| 51 | void SetTriggerBurst(int triggerBurst);  | 
        ||
| 52 | void SetTriggerInterval(int triggerInterval);  | 
        ||
| 53 | void SetSumOffset(double milliVolts);  | 
        ||
| 54 | double GetSumOffsetInMv();  | 
        ||
| 55 | double GetThreshold();  | 
        ||
| 56 | void SetThreshold(double thresholdInMillivolts);  | 
        ||
| 57 | void SetSumCoupling(bool acCoupling);  | 
        ||
| 58 | void SetSumGain(int gain);  | 
        ||
| 59 | double GetVoltage75(int reg);  | 
        ||
| 60 | double GetHvCurrentInUa();  | 
        ||
| 61 | double GetHvVoltage(int reg);  | 
        ||
| 62 | double GetDetectorTemperature();  | 
        ||
| 63 | double GetVoltage(int reg);  | 
        ||
| 64 | int ReadAdcByteBuffer();  | 
        ||
| 65 | int ReadAdcBuffer();  | 
        ||
| 66 | int BlockTransferTime();  | 
        ||
| 67 | double LimitSetting(double value,double min,double max);  | 
        ||
| 68 | void ReadModifyWrite(int reg,int bitIndex,bool bitValue);  | 
        ||
| 69 | void WriteSD4Register32(int addrHi,int addrLo,unsigned int data);  | 
        ||
| 70 | void WriteSD4Register(int address,unsigned short data);  | 
        ||
| 71 | unsigned int ReadSD4Register32(int addrHi,int addrLo);  | 
        ||
| 72 | unsigned short ReadSD4Register(int reg);  | 
        ||
| 73 | bool GetBit(int data,int bitIndex);  | 
        ||
| 74 | unsigned short SetBit(unsigned short data,int bitIndex,bool bitValue);  | 
        ||
| 75 | void Sleep(int musec);  | 
        ||
| 76 | extern int TIMESTAMP_LSB;  | 
        ||
| 77 | extern bool addChannelNum;  | 
        ||
| 78 | extern const int ADCMAX;  | 
        ||
| 79 | extern const int CHANNELS;  | 
        ||
| 80 | extern const char statusDone[0xFF];  | 
        ||
| 81 | extern const char statusReconnect[0xFF];  | 
        ||
| 82 | extern const char statusReset[0xFF];  | 
        ||
| 83 | extern const char statusReconfig[0xFF];  | 
        ||
| 84 | extern const char statusNoDevice[0xFF];  | 
        ||
| 85 | extern const double RAMPRATESCALE;  | 
        ||
| 86 | extern const int INTEGRATOR_LSB;  | 
        ||
| 87 | extern const double HV_VRANGE;  | 
        ||
| 88 | extern const double HV_IRANGE;  | 
        ||
| 89 | extern const double DISCR_THRESHOLDRANGE;  | 
        ||
| 90 | extern const double DISCR_OFFSETRANGE;  | 
        ||
| 91 | extern const double MONADC_VRANGE;  | 
        ||
| 92 | extern const double DAC_SCALE;  | 
        ||
| 93 | extern const double MONADC_SCALE;  | 
        ||
| 94 | extern int histogramTotalEvents;  | 
        ||
| 95 | extern int histogramtotal[0xFFF *4];  | 
        ||
| 96 | extern int histograms[4][0xFFF];  | 
        ||
| 97 | extern unsigned short *adcBuffer;  | 
        ||
| 98 | extern int adcBufferLen;  | 
        ||
| 99 | extern int deviceIndex;  | 
        ||
| 100 | extern unsigned int deviceId;  | 
        ||
| 101 | #if defined(_CVI_) | 
        ||
| 102 | int sprintf_s(const char *dest,int len,const char *format,...);  | 
        ||
| 103 | #endif | 
        ||
| 104 | int AddMessage(const char *format,...);  | 
        ||
| 105 | |||
| 106 | #endif |