using System;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;

namespace CSStudio6Lib
{
	[ClassInterface(ClassInterfaceType.None), Guid("82423ECF-EFC0-47E0-8AB0-35ADE2CD3EEF"), TypeLibType(TypeLibTypeFlags.FCanCreate)]
	[ComImport]
	public class CSStudio6Class : ICSStudio6, CSStudio6
	{
		[DispId(1)]
		[MethodImpl(MethodImplOptions.InternalCall)]
		public virtual extern bool FindDevice();

		[DispId(2)]
		[MethodImpl(MethodImplOptions.InternalCall)]
		public virtual extern bool FindDeviceInLan();

		[DispId(3)]
		[MethodImpl(MethodImplOptions.InternalCall)]
		public virtual extern bool FindDeviceInCom();

		[DispId(4)]
		[MethodImpl(MethodImplOptions.InternalCall)]
		public virtual extern bool FindDeviceByName([MarshalAs(UnmanagedType.BStr)] string strName);

		[DispId(5)]
		[MethodImpl(MethodImplOptions.InternalCall)]
		public virtual extern bool DeviceIsOpen();

		[DispId(6)]
		[MethodImpl(MethodImplOptions.InternalCall)]
		public virtual extern void DeviceDisconnect();

		[DispId(7)]
		[MethodImpl(MethodImplOptions.InternalCall)]
		public virtual extern bool DeviceStart();

		[DispId(8)]
		[MethodImpl(MethodImplOptions.InternalCall)]
		public virtual extern bool DeviceStop();

		[DispId(9)]
		[MethodImpl(MethodImplOptions.InternalCall)]
		public virtual extern bool DevicePause();

		[DispId(10)]
		[MethodImpl(MethodImplOptions.InternalCall)]
		public virtual extern bool DeviceContinue();

		[DispId(11)]
		[MethodImpl(MethodImplOptions.InternalCall)]
		[return: MarshalAs(UnmanagedType.BStr)]
		public virtual extern string GetLastError();

		[DispId(12)]
		[MethodImpl(MethodImplOptions.InternalCall)]
		[return: MarshalAs(UnmanagedType.BStr)]
		public virtual extern string GetSerialNumber();

		[DispId(13)]
		[MethodImpl(MethodImplOptions.InternalCall)]
		[return: MarshalAs(UnmanagedType.BStr)]
		public virtual extern string GetLibVersion();

		[DispId(14)]
		[MethodImpl(MethodImplOptions.InternalCall)]
		public virtual extern bool SetCurrentRange(bool isAutoRange, int nRange, int nMinRange, int nMaxRange, bool isOnlyInc);

		[DispId(15)]
		[MethodImpl(MethodImplOptions.InternalCall)]
		public virtual extern bool SetVoltRange(bool isAuto, int nRange);

		[DispId(16)]
		[MethodImpl(MethodImplOptions.InternalCall)]
		public virtual extern bool SetGNDMode(bool isVirMode);

		[DispId(17)]
		[MethodImpl(MethodImplOptions.InternalCall)]
		public virtual extern bool SetIRValue(bool isEnable, float fValue);

		[DispId(18)]
		[MethodImpl(MethodImplOptions.InternalCall)]
		public virtual extern bool SetEisFilter(int nHigh, int nMid, int nLow);

		[DispId(19)]
		[MethodImpl(MethodImplOptions.InternalCall)]
		public virtual extern bool GetOcpValue(out double ocpValue);

		[DispId(20)]
		[MethodImpl(MethodImplOptions.InternalCall)]
		public virtual extern bool SetOcpParams(float fTestTime, float fFreq);

		[DispId(21)]
		[MethodImpl(MethodImplOptions.InternalCall)]
		public virtual extern bool SetPotStaticParams(float fWaitTime, float fPotValue, float fTestTime, float fFreq);

		[DispId(22)]
		[MethodImpl(MethodImplOptions.InternalCall)]
		public virtual extern bool SetGalStaticParams(float fWaitTime, float fCurrentValue, float fTestTime, float fFreq);

		[DispId(23)]
		[MethodImpl(MethodImplOptions.InternalCall)]
		public virtual extern bool SetLSVAParams(float fWaitTime, float fInitE, float fFinalE, float fScanRate, float fFrq);

		[DispId(24)]
		[MethodImpl(MethodImplOptions.InternalCall)]
		public virtual extern bool SetCVParams(float fWaitTime, float fInitE, float fStepE1, float fStepE2, float fFinalE, float fScanRate, float fFrq, uint nCycles);

		[DispId(25)]
		[MethodImpl(MethodImplOptions.InternalCall)]
		public virtual extern bool SetSCVAParams(float fWaitTime, float fInitE, float fFinalE, float fIncE, uint nCycles, uint nSampleWidth, float fJumpTime);

		[DispId(26)]
		[MethodImpl(MethodImplOptions.InternalCall)]
		public virtual extern bool SetSWVAParams(float fWaitTime, float fInitE, float fFinalE, float fIncE, float fAmplitude, float fFrequency, uint nSampleWidth);

		[DispId(27)]
		[MethodImpl(MethodImplOptions.InternalCall)]
		public virtual extern bool SetEISVSfrqParams(float fInitFreq, float fFinalFreq, float fSineBias, float fSineAmp, uint nPoints);

		[DispId(28)]
		[MethodImpl(MethodImplOptions.InternalCall)]
		public virtual extern int GetValuesCount();

		[DispId(29)]
		[MethodImpl(MethodImplOptions.InternalCall)]
		public virtual extern bool GetValue(int nIndex, out double dVoltValue, out double dCurrValue, out double dTimeValue);

		[DispId(30)]
		[MethodImpl(MethodImplOptions.InternalCall)]
		public virtual extern bool GetLastValue(out double dVoltValue, out double dCurrValue, out double dTimeValue);

		[DispId(31)]
		[MethodImpl(MethodImplOptions.InternalCall)]
		public virtual extern bool GetValues([MarshalAs(UnmanagedType.Struct)] out object dVoltValues, [MarshalAs(UnmanagedType.Struct)] out object dCurrValues, [MarshalAs(UnmanagedType.Struct)] out object dTimeValues);

		[DispId(32)]
		[MethodImpl(MethodImplOptions.InternalCall)]
		public virtual extern int GetEisValueCount();

		[DispId(33)]
		[MethodImpl(MethodImplOptions.InternalCall)]
		public virtual extern bool GetEisValue(int nIndex, out double dFreqValue, out double dRealValue, out double dImaginaryValue, out double dZValue, out double dPhaseAngleValue);

		[DispId(34)]
		[MethodImpl(MethodImplOptions.InternalCall)]
		public virtual extern bool GetLastEisValue(out double dFreqValue, out double dRealValue, out double dImaginaryValue, out double dZValue, out double dPhaseAngleValue);

		[DispId(35)]
		[MethodImpl(MethodImplOptions.InternalCall)]
		public virtual extern bool GetEisValues([MarshalAs(UnmanagedType.Struct)] out object dFreqValues, [MarshalAs(UnmanagedType.Struct)] out object dRealValues, [MarshalAs(UnmanagedType.Struct)] out object dImaginaryValues, [MarshalAs(UnmanagedType.Struct)] out object dZValues, [MarshalAs(UnmanagedType.Struct)] out object dPhaseAngleValues);

		[DispId(36)]
		[MethodImpl(MethodImplOptions.InternalCall)]
		public virtual extern void ClearData();

		[DispId(37)]
		[MethodImpl(MethodImplOptions.InternalCall)]
		public virtual extern bool ExpIsEnd();

		[DispId(38)]
		[MethodImpl(MethodImplOptions.InternalCall)]
		public virtual extern bool SetMsgHandle(int nHandle);

		[DispId(39)]
		[MethodImpl(MethodImplOptions.InternalCall)]
		public virtual extern bool DeviceStartST();

		[DispId(40)]
		[MethodImpl(MethodImplOptions.InternalCall)]
		public virtual extern bool GetOcpValueEx(out double ocpValue, out double currentValue);

		[DispId(41)]
		[MethodImpl(MethodImplOptions.InternalCall)]
		public virtual extern bool SetACVParams(float fWaitTime, float fInitE, float fFinalE, float fIncE, float fAmplitude, float fACFreq, float fSamplePeriod);

		[DispId(42)]
		[MethodImpl(MethodImplOptions.InternalCall)]
		public virtual extern bool SetSHACVParams(float fWaitTime, float fInitE, float fFinalE, float fIncE, float fAmplitude, float fACFreq, float fSamplePeriod);

		[DispId(43)]
		[MethodImpl(MethodImplOptions.InternalCall)]
		public virtual extern bool SetFTACVParams(float fWaitTime, float fInitE, float fFinalE, float fIncE, float fAmplitude, float fACFreq, float fSamplePeriod);

		[DispId(44)]
		[MethodImpl(MethodImplOptions.InternalCall)]
		public virtual extern bool SetEISVSfrqGalParams(float fInitFreq, float fFinalFreq, float fSineBiasI, float fSineAmpI, uint nPoints);

		[DispId(45)]
		[MethodImpl(MethodImplOptions.InternalCall)]
		public virtual extern bool SetEISVSPotParams(float fFreq, float fSineAmp, float fInitE, float fFinalE, float fIncE);

		[DispId(46)]
		[MethodImpl(MethodImplOptions.InternalCall)]
		public virtual extern bool SetEISVSTimeParams(float fFreq, float fSineBias, float fSineAmp, float fPeriod, float fTime);

		[DispId(47)]
		[MethodImpl(MethodImplOptions.InternalCall)]
		public virtual extern bool SetStaticChange(int nMode, float fValue);

		[DispId(48)]
		[MethodImpl(MethodImplOptions.InternalCall)]
		public virtual extern bool SetEarthMode(bool isSet);

		[DispId(49)]
		[MethodImpl(MethodImplOptions.InternalCall)]
		public virtual extern bool SetEISVSTimeGalParams(float fFreq, float fSineBiasI, float fSineAmpI, float fPeriod, float fTime);

		[DispId(50)]
		[MethodImpl(MethodImplOptions.InternalCall)]
		public virtual extern bool SetPotSquareParams(float fWaitTime, float fInitE, float fInitTime, float fStepE1, float fStepE1Time, float fStepE2, float fStepE2Time, float fFinalE, float fFinalTime, float fFrq, uint nCycles);

		[DispId(51)]
		[MethodImpl(MethodImplOptions.InternalCall)]
		public virtual extern bool SetGalSquareParams(float fWaitTime, float fInitI, float fInitTime, float fStepI1, float fStepI1Time, float fStepI2, float fStepI2Time, float fFinalI, float fFinalTime, float fFrq, uint nCycles);

        [DispId(52)]
		[MethodImpl(MethodImplOptions.InternalCall)]
		public virtual extern bool SetEINoiseParams(float fWaitTime, float fTestTime, float fFreq);
        [DispId(53)]
		[MethodImpl(MethodImplOptions.InternalCall)]
		public virtual extern bool SetDPVParams(float fWaitTime, float fInitE, float fFinalE, float fIncE, float fAmplitude, float fPulseWidth, float fPulsePeriod, uint nSampleWidth);
        [DispId(54)]
		[MethodImpl(MethodImplOptions.InternalCall)]
		public virtual extern bool SetNPVParams(float fWaitTime, float fInitE, float fFinalE, float fIncE, float fPulseWidth, float fPulsePeriod, uint nSampleWidth);
        [DispId(55)]
		[MethodImpl(MethodImplOptions.InternalCall)]
		public virtual extern bool SetDNPVParams(float fWaitTime, float fInitE, float fFinalE, float fIncE, float fAmplitude, float fPulseWidth1, float fPulseWidth2, float fPulsePeriod, uint nSampleWidth);
        [DispId(56)]
		[MethodImpl(MethodImplOptions.InternalCall)]
		public virtual extern bool DeviceReset();
        [DispId(57)]
		[MethodImpl(MethodImplOptions.InternalCall)]
		public virtual extern bool CallEisResultValue(out double dRsValue, out double dRpValue, out double dCValue);
        [DispId(58)]
		[MethodImpl(MethodImplOptions.InternalCall)]
		public virtual extern bool SetDevFilter(int nFilter);
        [DispId(59)]
		[MethodImpl(MethodImplOptions.InternalCall)]
		public virtual extern bool SetEisBiasGain(bool bBiasE, int nBiasGainE, bool bBiasI, int nBiasGainI);
        [DispId(60)]
		[MethodImpl(MethodImplOptions.InternalCall)]
		public virtual extern bool SetEisACAttenuation(bool bACAttenuation, int nACRatio);
    }
}
