#pragma once #include "DppUSB.h" #include ".\DPP\CFG\DppConfig.h" #include ".\DPP\CFG\dppfile.h" #include ".\DPP\CFG\DppCfgFileIO.h" #include ".\DPPDLG\GainPZ\dpppx4gain.h" //@enum cfgDeviceType | DPP/MCA device type values enum DPPAPISTATE { dastateIDLE, //@emem dastateREADINGDATA, //@emem dastateREADCONFIGHW, //@emem dastateWRITECONFIGHW, //@emem dastateREADCONFIGFILE, //@emem dastateWRITECONFIGFILE, //@emem dastateREADSTATUS, //@emem dastateGETCONFIG, //@emem dastateSETCONFIG, //@emem dastateUNKNOWN //@emem }; //-------------------------------------------------------------------------------------- // DppConfigSettingsType //-------------------------------------------------------------------------------------- typedef struct _DPP_CONFIG_SETTINGS { //MCA Properties byte MCAChannels; //@cmember number of channels 4=256,3=512,2=1024,1=2048,0=4096,5=8192 byte BufferSelect; //@cmember Holds Buffer Sel A&B,Buffer Sel Hardware,see DPPBufferSelect byte TTLGate; //@cmember gate input settings, determines events included/excluded from spectrum, see DPPGate byte SlowThreshold; //@cmember Slow ch threshold, Events w/amp lower not added to spectrum long PresetTime; //@cmember var holds preset time, used in usb long PresetCount; //@cmember preset count in selected channels, ch are set in SCA8 long SCA[8]; //@cmember SCA values, LL, UL, and Enable are stored together //Shaping Properties byte TimeToPeak; //@cmember TimeToPeak register setting byte Decimation; //@cmember decimation setting for pulse shaping byte FlatTop; //@cmember flatop register setting byte PUREnable; //@cmember pile-up rejection enabled byte FastThreshold; //@cmember Fast Ch Threshold, events w/fch amp below this are rejected byte RTDSlow; //@cmember Risetime Discrimination slow threshold byte RTDOn; //@cmember Turns RTD on, and sets the amplitude and timing thresholds byte RTDFast; //@cmember RTD Time Threshold,Events w/HWHM wider than this are rejected byte BLR; //@cmember Baseline Restoration, see udBLR.Value notes for values byte BaselineOn; //@cmember use autobaseline during detector reset //Gain PZ Properties double Gain; //@cmember stores current gain value for px4 toolbar/menu gain change function long PoleZero; //@cmember pole zero adjust value long InputOffset; //@cmember input offset byte InputPolarity; //@cmember use InvertEnable during detector reset byte DetReset; //@cmember detector reset lockout period //Power Properties long TEC; //@cmember TEC temperature setting (displayed in Kelvin) byte HVEnabled; //@cmember high voltage setting enable long HV; //@cmember high voltage setting value byte PreampPower; //@cmember preamp power select value (5v or 8.5v) //Misc Properties byte AnalogOut; //@cmember dac enabled and DAC output type,(stobed peak,shaped pulse,dec inp,fast ch) byte OutputOffset; //@cmember Output DAC offset, -64…+63,(signed)(D7-D1) (-500mV to +492mV) byte AuxOut; //@cmember Aux output type byte AudibleCounter; //@cmember audio volume setting } DPP_CONFIG_SETTINGS, *LP_DPP_CONFIG_SETTINGS; class CDppApiCom { public: CDppApiCom(void); ~CDppApiCom(void); CDppUSB DppUSB; CDppConfig DppConfig; // CDppConfig DppConfigSet; // for setting config values from dialog CDppFile DppFile; DPPAPISTATE DppApiState; void SetTempDppGain(double NewGain); };