using NIDAQmx.DAQmxEnum;
using NIDAQmxConst;
using System;
using System.Collections.Generic;
using System.Diagnostics.CodeAnalysis;
using System.Diagnostics.SymbolStore;
using System.Linq;
using System.Runtime.CompilerServices;
using System.Text;
using System.Threading.Tasks;

namespace NIDAQmx
{


    public class AIChannelConfig:BaseChannelConfig
    {
        internal AIChannelConfig(ChannelAttributeSession session):base(session) 
        {
            AttributeSession = session;
            GeneralProperties = new AIGeneralProperties(session);
            Voltage = new AIVoltageChannelConfig(session);
            Current = new AICurrentChannelConfig(session);
            Temperature = new AITempChannelConfig(session);
            RosetteStrainGage=new AIRosetteStrainGageChannelConfig(session);
            Resistance= new AIResistanceChannelConfig(session);
            Freq = new AIFreqChannelConfig(session);
            Position = new AIPositionChannelConfig(session);
            SoundPressure = new AISoundPressureChannelConfig(session);
            Accel = new AIBaseAccelChannelConfig(session);
            Velocity = new AIVelocityChannelConfig(session);
            Force = new AIForceChannelConfig(session);
            Pressure = new AIPressureChannelConfig(session);
            Torque = new AITorqueChannelConfig(session);
            Bridge = new AIBridgeChannelConfig(session);
            Charge = new AIChargeChannelConfig(session);
        }
        public bool IsTEDS => AttributeSession.GetValue<Internal.AI.DAQmxGetAIIsTEDS, bool>();
        public string TEDSUnits => AttributeSession.GetValue<Internal.AI.DAQmxGetAITEDSUnits>();
        public double Max { get => AttributeSession.GetValue<Internal.AI.DAQmxGetAIMax, double>(); set => AttributeSession.SetValue<Internal.AI.DAQmxSetAIMax,double>(value); }
        public double Min { get => AttributeSession.GetValue<Internal.AI.DAQmxGetAIMin,double>(); set => AttributeSession.SetValue<Internal.AI.DAQmxSetAIMin,double>(value); }
        public string CustomScaleName { get => AttributeSession.GetValue<Internal.AI.DAQmxGetAICustomScaleName>(); set => AttributeSession.SetValue<Internal.AI.DAQmxSetAICustomScaleName>(value); }
        public AIMeasType MeasType { get => AttributeSession.GetValue<Internal.AI.DAQmxGetAIMeasType,AIMeasType>();  }
        [AllowNull]
        internal override ChannelAttributeSession AttributeSession { get; }
        public AIGeneralProperties GeneralProperties { get; }
        public AIVoltageChannelConfig Voltage { get; }
        public AICurrentChannelConfig Current { get; }
        public AITempChannelConfig Temperature { get; }
        public AIRosetteStrainGageChannelConfig RosetteStrainGage { get; }
        public AIResistanceChannelConfig Resistance { get; }
        public AIFreqChannelConfig Freq { get; }
        public AIPositionChannelConfig Position { get; }
        public AISoundPressureChannelConfig SoundPressure { get; }
        public AIBaseAccelChannelConfig Accel { get; }
        public AIVelocityChannelConfig Velocity { get; }
        public AIForceChannelConfig Force { get; }
        public AIPressureChannelConfig Pressure { get; }
        public AITorqueChannelConfig Torque { get; }
        public AIBridgeChannelConfig Bridge { get; }
        public AIChargeChannelConfig Charge { get; }

    }

    public class AIGeneralProperties : BaseChannelConfig
    {
        internal AIGeneralProperties(ChannelAttributeSession session) : base(session)
        {
            AttributeSession = session;
            Input = new AIInput(session);
            SingalConditioning = new AISingalConditioning(session);
            Filter = new FilterConfig(session);
            ADC = new ADCConfig(session);
            ChanCal = new ChanCalConfig(session);
            Advanced= new AdvancedConfig(session);
        }
        [AllowNull]
        internal override ChannelAttributeSession AttributeSession { get; }
        public AIInput Input { get; }

        public AISingalConditioning SingalConditioning { get; }
        public FilterConfig Filter { get; }
        public ADCConfig ADC { get; }
        public ChanCalConfig ChanCal { get; }
        public AdvancedConfig Advanced { get; }


        public class AIInput
        {
            ChannelAttributeSession _Session;
            internal AIInput(ChannelAttributeSession session)
            {
                _Session = session;
            }
            public AICoupling Coupling { get => _Session.GetValue<Internal.AI.DAQmxGetAICoupling,AICoupling>(); set => _Session.SetValue<Internal.AI.DAQmxSetAICoupling,AICoupling>(value); }
            public AIImpedance Impedance { get => (AIImpedance)_Session.GetValue<Internal.AI.DAQmxGetAIImpedance,double>(); set => _Session.SetValue<Internal.AI.DAQmxSetAIImpedance,double>((double)value); }
            public TerminalConfig TerminalConfig { get => _Session.GetValue<Internal.AI.DAQmxGetAITermCfg,TerminalConfig>(); set => _Session.SetValue<Internal.AI.DAQmxSetAITermCfg,TerminalConfig>(value); }
            public string InputSrc { get => _Session.GetValue<Internal.AI.DAQmxGetAIInputSrc>(); set => _Session.SetValue<Internal.AI.DAQmxSetAIInputSrc>(value); }
        }
        public class AISingalConditioning
        {
            ChannelAttributeSession _Session;
            internal AISingalConditioning(ChannelAttributeSession session)
            {
                _Session = session;
                Bridge = new BridgeConfig(session);
                Balance = new BalanceConfig(session);
                SensorPower = new SensorPowerConfig(session);
                Thrmcpl = new ThrmcplConfig(session);
            }
            public double Atten { get => _Session.GetValue<Internal.AI.DAQmxGetAIAtten,double>(); set => _Session.SetValue<Internal.AI.DAQmxSetAIAtten,double>(value); }
            public double ProbeAtten { get => _Session.GetValue<Internal.AI.DAQmxGetAIProbeAtten,double>(); set => _Session.SetValue<Internal.AI.DAQmxSetAIProbeAtten,double>(value); }
            public AIResistanceCfg ResistanceCfg { get => _Session.GetValue<Internal.AI.DAQmxGetAIResistanceCfg,AIResistanceCfg>(); set => _Session.SetValue<Internal.AI.DAQmxSetAIResistanceCfg,AIResistanceCfg>(value); }
            public double LeadWireResistance { get => _Session.GetValue<Internal.AI.DAQmxGetAILeadWireResistance,double>(); set => _Session.SetValue<Internal.AI.DAQmxSetAILeadWireResistance,double>(value); }

            public BridgeConfig Bridge { get; }
            public BalanceConfig Balance { get; }
            public SensorPowerConfig SensorPower { get; }
            public ThrmcplConfig Thrmcpl { get; }
            public class BridgeConfig
            {
                ChannelAttributeSession _Session;
                internal BridgeConfig(ChannelAttributeSession session)
                {
                    _Session = session;
                    ShuntCal = new ShuntCalConfig(session);
                }
                public ShuntCalConfig ShuntCal { get; }
                public AIBridgeCfg BridgeCfg { get => _Session.GetValue<Internal.AI.DAQmxGetAIBridgeCfg,AIBridgeCfg>(); set => _Session.SetValue<Internal.AI.DAQmxSetAIBridgeCfg,AIBridgeCfg>(value); }
                public double NomResistance { get => _Session.GetValue<Internal.AI.DAQmxGetAIBridgeNomResistance,double>(); set => _Session.SetValue<Internal.AI.DAQmxSetAIBridgeNomResistance,double>(value); }
                public double InitialVoltage { get => _Session.GetValue<Internal.AI.DAQmxGetAIBridgeInitialVoltage,double>(); set => _Session.SetValue<Internal.AI.DAQmxSetAIBridgeInitialVoltage,double>(value); }
                public double InitialRatio { get => _Session.GetValue<Internal.AI.DAQmxGetAIBridgeInitialRatio,double>(); set => _Session.SetValue<Internal.AI.DAQmxSetAIBridgeInitialRatio,double>(value); }

            }

            public class ShuntCalConfig
            {
                ChannelAttributeSession _Session;
                internal ShuntCalConfig(ChannelAttributeSession session)
                {
                    _Session = session;
                }

                public bool Enable { get => _Session.GetValue<Internal.AI.DAQmxGetAIBridgeShuntCalEnable, bool>(); set => _Session.SetValue<Internal.AI.DAQmxSetAIBridgeShuntCalEnable,bool>(value); }
                public AIBridgeShuntCalSelect Select { get => _Session.GetValue<Internal.AI.DAQmxGetAIBridgeShuntCalSelect, AIBridgeShuntCalSelect>(); set => _Session.SetValue<Internal.AI.DAQmxSetAIBridgeShuntCalSelect,AIBridgeShuntCalSelect>(value); }
                public AIBridgeShuntCalShuntCalASrc ASrc { get => _Session.GetValue<Internal.AI.DAQmxGetAIBridgeShuntCalShuntCalASrc,AIBridgeShuntCalShuntCalASrc>(); set => _Session.SetValue<Internal.AI.DAQmxSetAIBridgeShuntCalShuntCalASrc,AIBridgeShuntCalShuntCalASrc>(value); }
                public double GainAdjust { get => _Session.GetValue<Internal.AI.DAQmxGetAIBridgeShuntCalGainAdjust,double>(); set => _Session.SetValue<Internal.AI.DAQmxSetAIBridgeShuntCalGainAdjust,double>(value); }
                public double AResistance { get => _Session.GetValue<Internal.AI.DAQmxGetAIBridgeShuntCalShuntCalAResistance,double>(); set => _Session.SetValue<Internal.AI.DAQmxSetAIBridgeShuntCalShuntCalAResistance,double>(value); }
                public double AActualResistance { get => _Session.GetValue<Internal.AI.DAQmxGetAIBridgeShuntCalShuntCalAActualResistance,double>(); set => _Session.SetValue<Internal.AI.DAQmxSetAIBridgeShuntCalShuntCalAActualResistance,double>(value); }
                public double BResistance { get => _Session.GetValue<Internal.AI.DAQmxGetAIBridgeShuntCalShuntCalBResistance, double>(); set => _Session.SetValue<Internal.AI.DAQmxSetAIBridgeShuntCalShuntCalBResistance,double>(value); }
                public double BActualResistance { get => _Session.GetValue<Internal.AI.DAQmxGetAIBridgeShuntCalShuntCalBActualResistance,double>(); set => _Session.SetValue<Internal.AI.DAQmxSetAIBridgeShuntCalShuntCalBActualResistance,double>(value); }

            }

            public class BalanceConfig
            {
                ChannelAttributeSession _Session;
                internal BalanceConfig(ChannelAttributeSession session)
                {
                    _Session = session;
                }
                public int CoarsePot { get => _Session.GetValue<Internal.AI.DAQmxGetAIBridgeBalanceCoarsePot, int>(); set => _Session.SetValue<Internal.AI.DAQmxSetAIBridgeBalanceCoarsePot,int>(value); }
                public int FinePot { get => _Session.GetValue<Internal.AI.DAQmxGetAIBridgeBalanceFinePot,int>(); set => _Session.SetValue<Internal.AI.DAQmxSetAIBridgeBalanceFinePot,int>(value); }
            }
            public class CurrentShuntConfig
            {
                ChannelAttributeSession _Session;
                internal CurrentShuntConfig(ChannelAttributeSession session)
                {
                    _Session = session;
                }
                public AICurrentShuntLoc Loc { get => _Session.GetValue<Internal.AI.DAQmxGetAICurrentShuntLoc,AICurrentShuntLoc>(); set => _Session.SetValue<Internal.AI.DAQmxSetAICurrentShuntLoc,AICurrentShuntLoc>(value); }
                public double Resistance { get => _Session.GetValue<Internal.AI.DAQmxGetAICurrentShuntResistance,double>(); set => _Session.SetValue<Internal.AI.DAQmxSetAICurrentShuntResistance,double>(value); }
            }

            public class ExcitConfig
            {
                ChannelAttributeSession _Session;
                internal ExcitConfig(ChannelAttributeSession session)
                {
                    _Session = session;
                    ACExcit = new ACExcitConfig(_Session);
                }
                public ACExcitConfig ACExcit { get; }
                public AIExcitSrc Src { get => _Session.GetValue<Internal.AI.DAQmxGetAIExcitSrc,AIExcitSrc>(); set => _Session.SetValue<Internal.AI.DAQmxSetAIExcitSrc,AIExcitSrc>(value); }
                public AIExcitSense Sense { get => _Session.GetValue<Internal.AI.DAQmxGetAIExcitSense,AIExcitSense>(); set => _Session.SetValue<Internal.AI.DAQmxSetAIExcitSense,AIExcitSense>(value); }
                public double Val { get => _Session.GetValue<Internal.AI.DAQmxGetAIExcitVal,double>(); set => _Session.SetValue<Internal.AI.DAQmxSetAIExcitVal,double>(value); }

                public bool UseForScaling { get => _Session.GetValue<Internal.AI.DAQmxGetAIExcitUseForScaling, bool>(); set => _Session.SetValue<Internal.AI.DAQmxSetAIExcitUseForScaling,bool>(value); }
                public bool UseMultiplexed { get => _Session.GetValue<Internal.AI.DAQmxGetAIExcitUseMultiplexed, bool>(); set => _Session.SetValue<Internal.AI.DAQmxSetAIExcitUseMultiplexed,bool>(value); }
                public double ActualVal { get => _Session.GetValue<Internal.AI.DAQmxGetAIExcitActualVal,double>(); set => _Session.SetValue<Internal.AI.DAQmxSetAIExcitActualVal,double>(value); }
                public AIExcitVoltageOrCurrent VoltageOrCurrent { get => _Session.GetValue<Internal.AI.DAQmxGetAIExcitVoltageOrCurrent,AIExcitVoltageOrCurrent>(); set => _Session.SetValue<Internal.AI.DAQmxSetAIExcitVoltageOrCurrent,AIExcitVoltageOrCurrent>(value); }
                public AIExcitDCorAC DCorAC { get => _Session.GetValue<Internal.AI.DAQmxGetAIExcitDCorAC,AIExcitDCorAC>(); set => _Session.SetValue<Internal.AI.DAQmxSetAIExcitDCorAC,AIExcitDCorAC>(value); }
                public AIExcitIdleOutputBehavior IdleOutputBehavior { get => _Session.GetValue<Internal.AI.DAQmxGetAIExcitIdleOutputBehavior, AIExcitIdleOutputBehavior>(); set => _Session.SetValue<Internal.AI.DAQmxSetAIExcitIdleOutputBehavior,AIExcitIdleOutputBehavior>(value); }

            }
            public class ACExcitConfig
            {
                ChannelAttributeSession _Session;
                internal ACExcitConfig(ChannelAttributeSession session)
                {
                    _Session = session;
                }
                public double Freq { get => _Session.GetValue<Internal.AI.DAQmxGetAIACExcitFreq, double>(); set => _Session.SetValue<Internal.AI.DAQmxSetAIACExcitFreq,double>(value); }
                public bool SyncEnable { get => _Session.GetValue<Internal.AI.DAQmxGetAIACExcitSyncEnable, bool>(); set => _Session.SetValue<Internal.AI.DAQmxSetAIACExcitSyncEnable,bool>(value); }
                public AIACExcitWireMode WireMode { get => _Session.GetValue<Internal.AI.DAQmxGetAIACExcitWireMode, AIACExcitWireMode>(); set => _Session.SetValue<Internal.AI.DAQmxSetAIACExcitWireMode,AIACExcitWireMode>(value); }
            }

            public class SensorPowerConfig
            {
                ChannelAttributeSession _Session;
                internal SensorPowerConfig(ChannelAttributeSession session)
                {
                    _Session = session;
                }
                public double Voltage { get => _Session.GetValue<Internal.AI.DAQmxGetAISensorPowerVoltage, double>(); set => _Session.SetValue<Internal.AI.DAQmxSetAISensorPowerVoltage,double>(value); }
                public AISensorPowerCfg Cfg { get => _Session.GetValue<Internal.AI.DAQmxGetAISensorPowerCfg,AISensorPowerCfg>(); set => _Session.SetValue<Internal.AI.DAQmxSetAISensorPowerCfg,AISensorPowerCfg>(value); }
                public SensorPowerType Type { get => _Session.GetValue<Internal.AI.DAQmxGetAISensorPowerType,SensorPowerType>(); set => _Session.SetValue<Internal.AI.DAQmxSetAISensorPowerType,SensorPowerType>(value); }
            }
            public class ThrmcplConfig
            {
                ChannelAttributeSession _Session;
                internal ThrmcplConfig(ChannelAttributeSession session)
                {
                    _Session = session;
                }
                public bool OpenThrmcplDetectEnable { get => _Session.GetValue<Internal.AI.DAQmxGetAIOpenThrmcplDetectEnable,bool>(); set => _Session.SetValue<Internal.AI.DAQmxSetAIOpenThrmcplDetectEnable,bool>(value); }
                public double LeadOffsetVoltage { get => _Session.GetValue<Internal.AI.DAQmxGetAIThrmcplLeadOffsetVoltage,double>(); set => _Session.SetValue<Internal.AI.DAQmxSetAIThrmcplLeadOffsetVoltage,double>(value); }
            }
        }

        public class FilterConfig
        {
            ChannelAttributeSession _Session;
            internal FilterConfig(ChannelAttributeSession session)
            {
                _Session = session;
                AnalogFilter = new AnalogFilterConfig(session);
                DigtalFilter = new DigtalFilterConfig(session);
            }
            public AnalogFilterConfig AnalogFilter { get; }
            public DigtalFilterConfig DigtalFilter { get; }
            public uint AveragingWinSize { get => _Session.GetValue<Internal.AI.DAQmxGetAIAveragingWinSize, uint>(); set => _Session.SetValue<Internal.AI.DAQmxSetAIAveragingWinSize,uint>(value); }
            public bool Enable { get => _Session.GetValue<Internal.AI.DAQmxGetAIFilterEnable, bool>(); set => _Session.SetValue<Internal.AI.DAQmxSetAIFilterEnable,bool>(value); }
            public double Freq { get => _Session.GetValue<Internal.AI.DAQmxGetAIFilterFreq,double>(); set => _Session.SetValue<Internal.AI.DAQmxSetAIFilterFreq,double>(value); }
            public FilterResponse Response { get => _Session.GetValue<Internal.AI.DAQmxGetAIFilterResponse, FilterResponse>(); set => _Session.SetValue<Internal.AI.DAQmxSetAIFilterResponse,FilterResponse>(value); }
            public uint Order { get => _Session.GetValue<Internal.AI.DAQmxGetAIFilterOrder, uint>(); set => _Session.SetValue<Internal.AI.DAQmxSetAIFilterOrder,uint>(value); }
            public double Delay => _Session.GetValue<Internal.AI.DAQmxGetAIFilterDelay, double>();
            public FilterDelayUnits DelayUnits { get => _Session.GetValue<Internal.AI.DAQmxGetAIFilterDelayUnits,FilterDelayUnits>(); set => _Session.SetValue<Internal.AI.DAQmxSetAIFilterDelayUnits,FilterDelayUnits>(value); }
            public bool RemoveFilterDelay { get => _Session.GetValue<Internal.AI.DAQmxGetAIRemoveFilterDelay, bool>(); set => _Session.SetValue<Internal.AI.DAQmxSetAIRemoveFilterDelay,bool>(value); }
            public double DelayAdjustment { get => _Session.GetValue<Internal.AI.DAQmxGetAIFilterDelayAdjustment,double>(); set => _Session.SetValue<Internal.AI.DAQmxSetAIFilterDelayAdjustment,double>(value); }

            public class AnalogFilterConfig
            {
                ChannelAttributeSession _Session;
                internal AnalogFilterConfig(ChannelAttributeSession session)
                {
                    _Session = session;
                    LowpassFiler = new LowpassFilerConfig(session);
                }
                public LowpassFilerConfig LowpassFiler { get; }
                public class LowpassFilerConfig
                {
                    ChannelAttributeSession _Session;
                    internal LowpassFilerConfig(ChannelAttributeSession session)
                    {
                        _Session = session;
                        SwitchCap = new SwitchCapConfig(session);
                    }
                    public SwitchCapConfig SwitchCap { get; }
                    public bool Enable { get => _Session.GetValue<Internal.AI.DAQmxGetAILowpassEnable,bool>(); set => _Session.SetValue<Internal.AI.DAQmxSetAILowpassEnable,bool>(value); }
                    public double CutoffFreq { get => _Session.GetValue<Internal.AI.DAQmxGetAILowpassCutoffFreq,double>(); set => _Session.SetValue<Internal.AI.DAQmxSetAILowpassCutoffFreq,double>(value); }

                    public class SwitchCapConfig
                    {
                        ChannelAttributeSession _Session;
                        internal SwitchCapConfig(ChannelAttributeSession session)
                        {
                            _Session = session;
                        }
                        public ClkSrc ClkSrc { get => _Session.GetValue<Internal.AI.DAQmxGetAILowpassSwitchCapClkSrc, ClkSrc>(); set => _Session.SetValue<Internal.AI.DAQmxSetAILowpassSwitchCapClkSrc,ClkSrc>(value); }
                        public double ExtClkFreq { get => _Session.GetValue<Internal.AI.DAQmxGetAILowpassSwitchCapExtClkFreq, double>(); set => _Session.SetValue<Internal.AI.DAQmxSetAILowpassSwitchCapExtClkFreq,double>(value); }
                        public uint ExtClkDiv { get => _Session.GetValue<Internal.AI.DAQmxGetAILowpassSwitchCapExtClkDiv, uint>(); set => _Session.SetValue<Internal.AI.DAQmxSetAILowpassSwitchCapExtClkDiv,uint>(value); }
                        public uint OutClkDiv { get => _Session.GetValue<Internal.AI.DAQmxGetAILowpassSwitchCapOutClkDiv,uint>(); set => _Session.SetValue<Internal.AI.DAQmxSetAILowpassSwitchCapOutClkDiv,uint>(value); }
                    }
                }
            }


            public class DigtalFilterConfig
            {

                ChannelAttributeSession _Session;
                internal DigtalFilterConfig(ChannelAttributeSession session)
                {
                    _Session = session;
                    LowpassFiler = new LowpassFilerConfig(session);
                    HighpassFilter = new HighpassFilterConfig(session);
                    BandpassFilter = new BandpassFilterConfig(session);
                    NotchFilter = new NotchFilterConfig(session);
                }
                public LowpassFilerConfig LowpassFiler { get; }
                public HighpassFilterConfig HighpassFilter { get; }
                public BandpassFilterConfig BandpassFilter { get; }
                public NotchFilterConfig NotchFilter { get; }
                public bool Enable { get => _Session.GetValue<Internal.AI.DAQmxGetAIDigFltrEnable,bool>(); set => _Session.SetValue<Internal.AI.DAQmxSetAIDigFltrEnable,bool>(value); }
                public AIDigFltrType FltrType { get => _Session.GetValue<Internal.AI.DAQmxGetAIDigFltrType, AIDigFltrType>(); set => _Session.SetValue<Internal.AI.DAQmxSetAIDigFltrType,AIDigFltrType>(value); }
                public AIDigFltrResponse Response { get => _Session.GetValue<Internal.AI.DAQmxGetAIDigFltrResponse, AIDigFltrResponse>(); set => _Session.SetValue<Internal.AI.DAQmxSetAIDigFltrResponse,AIDigFltrResponse>(value); }
                public uint Order { get => _Session.GetValue<Internal.AI.DAQmxGetAIDigFltrOrder, uint>(); set => _Session.SetValue<Internal.AI.DAQmxSetAIDigFltrOrder,uint>(value); }
                public double[] Coeff 
                {
                    get
                    {
                        double[] values = new double[100];
                        _Session.Session.CheckResult(_Session.Session.GetDelegate<Internal.AI.DAQmxGetAIDigFltrCoeff>()(_Session.Session.TaskHandle, _Session.ActiveChans, ref values[0], (uint)values.Length));
                        return values.Where(x=>x!=0).ToArray();
                    }
                    set
                    {
                        if(value ==null || value.Length ==0)
                        {
                            _Session.Session.CheckResult(_Session.Session.GetDelegate<Internal.AI.DAQmxResetAIDigFltrCoeff>()(_Session.Session.TaskHandle, _Session.ActiveChans));
                            return;
                        }
                        _Session.Session.CheckResult(_Session.Session.GetDelegate<Internal.AI.DAQmxSetAIDigFltrCoeff>()(_Session.Session.TaskHandle, _Session.ActiveChans, ref value[0], (uint)value.Length));
                    }
                }
                public class LowpassFilerConfig
                {
                    ChannelAttributeSession _Session;
                    internal LowpassFilerConfig(ChannelAttributeSession session)
                    {
                        _Session = session;
                    }
                    public double CutoffFreq { get => _Session.GetValue<Internal.AI.DAQmxGetAIDigFltrLowpassCutoffFreq,double>(); set => _Session.SetValue<Internal.AI.DAQmxSetAIDigFltrLowpassCutoffFreq,double>(value); }
                }
                public class HighpassFilterConfig
                {
                    ChannelAttributeSession _Session;
                    internal HighpassFilterConfig(ChannelAttributeSession session)
                    {
                        _Session = session;
                    }
                    public double CutoffFreq { get => _Session.GetValue<Internal.AI.DAQmxGetAIDigFltrHighpassCutoffFreq, double>(); set => _Session.SetValue<Internal.AI.DAQmxSetAIDigFltrHighpassCutoffFreq, double>(value); }
                }
                public class BandpassFilterConfig
                {
                    ChannelAttributeSession _Session;
                    internal BandpassFilterConfig(ChannelAttributeSession session)
                    {
                        _Session = session;
                    }
                    public double Width { get => _Session.GetValue<Internal.AI.DAQmxGetAIDigFltrBandpassWidth, double>(); set => _Session.SetValue<Internal.AI.DAQmxSetAIDigFltrBandpassWidth,double>(value); }
                    public double CenterFreq { get => _Session.GetValue<Internal.AI.DAQmxGetAIDigFltrBandpassCenterFreq, double>(); set => _Session.SetValue<Internal.AI.DAQmxSetAIDigFltrBandpassCenterFreq,double>(value); }
                }

                public class NotchFilterConfig
                {
                    ChannelAttributeSession _Session;
                    internal NotchFilterConfig(ChannelAttributeSession session)
                    {
                        _Session = session;
                    }
                    public double Width { get => _Session.GetValue<Internal.AI.DAQmxGetAIDigFltrNotchWidth, double>(); set => _Session.SetValue<Internal.AI.DAQmxSetAIDigFltrNotchWidth,double>(value); }
                    public double CenterFreq { get => _Session.GetValue<Internal.AI.DAQmxGetAIDigFltrNotchCenterFreq,double>(); set => _Session.SetValue<Internal.AI.DAQmxSetAIDigFltrNotchCenterFreq,double>(value); }
                }
            }
        }


        public class ADCConfig
        {
            ChannelAttributeSession _Session;
            internal ADCConfig(ChannelAttributeSession session)
            {
                _Session = session;
            }
            public bool DitherEnable { get => _Session.GetValue<Internal.AI.DAQmxGetAIDitherEnable, bool>(); set => _Session.SetValue<Internal.AI.DAQmxSetAIDitherEnable,bool>(value); }
            public ResolutionUnits ResolutionUnits => _Session.GetValue<Internal.AI.DAQmxGetAIResolutionUnits, ResolutionUnits>();
            public double Resolution => _Session.GetValue<Internal.AI.DAQmxGetAIResolution, double>();
            public uint RawSampSize => _Session.GetValue<Internal.AI.DAQmxGetAIRawSampSize, uint>();
            public RawSampJustification RawSampJustification => _Session.GetValue<Internal.AI.DAQmxGetAIRawSampJustification, RawSampJustification>();
            public AIADCTimingMode ADCTimingMode { get => _Session.GetValue<Internal.AI.DAQmxGetAIADCTimingMode, AIADCTimingMode>(); set => _Session.SetValue<Internal.AI.DAQmxSetAIADCTimingMode,AIADCTimingMode>(value); }
            public uint ADCCustomTimingMode { get => _Session.GetValue<Internal.AI.DAQmxGetAIADCCustomTimingMode, uint>(); set => _Session.SetValue<Internal.AI.DAQmxSetAIADCCustomTimingMode,uint>(value); }
        }
        public class ChanCalConfig
        {
            ChannelAttributeSession _Session;
            internal ChanCalConfig(ChannelAttributeSession session)
            {
                _Session = session;
            }
            public bool HasValidCalInfo => _Session.GetValue<Internal.AI.DAQmxGetAIChanCalHasValidCalInfo, bool>();
            public bool EnableCal { get => _Session.GetValue<Internal.AI.DAQmxGetAIChanCalEnableCal, bool>(); set => _Session.SetValue<Internal.AI.DAQmxSetAIChanCalEnableCal,bool>(value); }
            public bool ApplyCalIfExp { get => _Session.GetValue<Internal.AI.DAQmxGetAIChanCalApplyCalIfExp, bool>(); set => _Session.SetValue<Internal.AI.DAQmxSetAIChanCalApplyCalIfExp,bool>(value); }
            public DateTime CalDate
            {
                get
                {
                    uint year = 0;
                    uint month = 0;
                    uint day = 0;
                    uint hour = 0;
                    uint minute = 0;
                    _Session.Session.CheckResult(_Session.Session.GetDelegate<Internal.Cal.DAQmxGetAIChanCalCalDate>()(_Session.Session.TaskHandle, _Session.ActiveChans, ref year, ref month, ref day, ref hour, ref minute));
                    return new DateTime((int)year, (int)month, (int)day, (int)hour, (int)minute, 0);
                }
                set
                {
                    _Session.Session.CheckResult(_Session.Session.GetDelegate<Internal.Cal.DAQmxSetAIChanCalCalDate>()(_Session.Session.TaskHandle, _Session.ActiveChans, (uint)value.Year, (uint)value.Month, (uint)value.Day, (uint)value.Hour, (uint)value.Minute));
                }
            }
            public DateTime ExpDate
            {
                get
                {
                    uint year = 0;
                    uint month = 0;
                    uint day = 0;
                    uint hour = 0;
                    uint minute = 0;
                    _Session.Session.CheckResult(_Session.Session.GetDelegate<Internal.Cal.DAQmxGetAIChanCalExpDate>()(_Session.Session.TaskHandle, _Session.ActiveChans, ref  year, ref  month, ref day, ref hour, ref minute));
                    return new DateTime((int)year,(int)month,(int)day,(int)hour,(int)minute,0);
                }
                set
                {
                    _Session.Session.CheckResult(_Session.Session.GetDelegate<Internal.Cal.DAQmxSetAIChanCalExpDate>()(_Session.Session.TaskHandle, _Session.ActiveChans, (uint)value.Year, (uint)value.Month, (uint)value.Day, (uint)value.Hour, (uint)value.Minute));
                }
            }
            public string OperatorName { get => _Session.GetValue<Internal.AI.DAQmxGetAIChanCalOperatorName>(); set => _Session.SetValue<Internal.AI.DAQmxSetAIChanCalOperatorName>(value); }
            public string Desc { get => _Session.GetValue<Internal.AI.DAQmxGetAIChanCalDesc>(); set => _Session.SetValue<Internal.AI.DAQmxSetAIChanCalDesc>(value); }
            public AIChanCalScaleType ScaleType { get => _Session.GetValue<Internal.AI.DAQmxGetAIChanCalScaleType, AIChanCalScaleType>(); set => _Session.SetValue<Internal.AI.DAQmxSetAIChanCalScaleType,AIChanCalScaleType>(value); }

            public double[] PreScaledVals
            {
                get
                {
                    double[] value = new double[100];
                    _Session.Session.CheckResult(_Session.Session.GetDelegate<Internal.AI.DAQmxGetAIChanCalTablePreScaledVals>()(_Session.Session.TaskHandle, _Session.ActiveChans, ref value[0], (uint)value.Length));
                    return value.Where(x => x != 0).ToArray();
                }
                set
                {
                    if (value == null || value.Length == 0)
                    {
                        _Session.Session.CheckResult(_Session.Session.GetDelegate<Internal.AI.DAQmxResetAIChanCalTablePreScaledVals>()(_Session.Session.TaskHandle, _Session.ActiveChans));
                        return;
                    }
                    _Session.Session.CheckResult(_Session.Session.GetDelegate<Internal.AI.DAQmxSetAIChanCalTablePreScaledVals>()(_Session.Session.TaskHandle, _Session.ActiveChans, ref value[0], (uint)value.Length));
                }
            }

            public double[] ScaledVals
            {
                get
                {
                    double[] value = new double[100];
                    _Session.Session.CheckResult(_Session.Session.GetDelegate<Internal.AI.DAQmxGetAIChanCalTableScaledVals>()(_Session.Session.TaskHandle, _Session.ActiveChans, ref value[0], (uint)value.Length));
                    return value.Where(x => x != 0).ToArray();
                }
                set
                {
                    if (value == null || value.Length == 0)
                    {
                        _Session.Session.CheckResult(_Session.Session.GetDelegate<Internal.AI.DAQmxResetAIChanCalTableScaledVals>()(_Session.Session.TaskHandle, _Session.ActiveChans));
                        return;
                    }
                    _Session.Session.CheckResult(_Session.Session.GetDelegate<Internal.AI.DAQmxSetAIChanCalTableScaledVals>()(_Session.Session.TaskHandle, _Session.ActiveChans, ref value[0], (uint)value.Length));
                }
            }

            public double[] ForwardCoeff
            {
                get
                {
                    double[] value = new double[100];
                    _Session.Session.CheckResult(_Session.Session.GetDelegate<Internal.AI.DAQmxGetAIChanCalPolyForwardCoeff>()(_Session.Session.TaskHandle, _Session.ActiveChans, ref value[0], (uint)value.Length));
                    return value.Where(x => x != 0).ToArray();
                }
                set
                {
                    if (value == null || value.Length == 0)
                    {
                        _Session.Session.CheckResult(_Session.Session.GetDelegate<Internal.AI.DAQmxResetAIChanCalPolyForwardCoeff>()(_Session.Session.TaskHandle, _Session.ActiveChans));
                        return;
                    }
                    _Session.Session.CheckResult(_Session.Session.GetDelegate<Internal.AI.DAQmxSetAIChanCalPolyForwardCoeff>()(_Session.Session.TaskHandle, _Session.ActiveChans, ref value[0], (uint)value.Length));
                }
            }

            public double[] ReverseCoeff
            {
                get
                {
                    double[] value = new double[100];
                    _Session.Session.CheckResult(_Session.Session.GetDelegate<Internal.AI.DAQmxGetAIChanCalPolyReverseCoeff>()(_Session.Session.TaskHandle, _Session.ActiveChans, ref value[0], (uint)value.Length));
                    return value.Where(x => x != 0).ToArray();
                }
                set
                {
                    if (value == null || value.Length == 0)
                    {
                        _Session.Session.CheckResult(_Session.Session.GetDelegate<Internal.AI.DAQmxResetAIChanCalPolyReverseCoeff>()(_Session.Session.TaskHandle, _Session.ActiveChans));
                        return;
                    }
                    _Session.Session.CheckResult(_Session.Session.GetDelegate<Internal.AI.DAQmxSetAIChanCalPolyReverseCoeff>()(_Session.Session.TaskHandle, _Session.ActiveChans, ref value[0], (uint)value.Length));
                }
            }

            public double[] RefVals
            {
                get
                {
                    double[] value = new double[100];
                    _Session.Session.CheckResult(_Session.Session.GetDelegate<Internal.AI.DAQmxGetAIChanCalVerifRefVals>()(_Session.Session.TaskHandle, _Session.ActiveChans, ref value[0], (uint)value.Length));
                    return value.Where(x => x != 0).ToArray();
                }
                set
                {
                    if (value == null || value.Length == 0)
                    {
                        _Session.Session.CheckResult(_Session.Session.GetDelegate<Internal.AI.DAQmxResetAIChanCalVerifRefVals>()(_Session.Session.TaskHandle, _Session.ActiveChans));
                        return;
                    }
                    _Session.Session.CheckResult(_Session.Session.GetDelegate<Internal.AI.DAQmxSetAIChanCalVerifRefVals>()(_Session.Session.TaskHandle, _Session.ActiveChans, ref value[0], (uint)value.Length));
                }
            }
            public double[] AcqVals
            {
                get
                {
                    double[] value = new double[100];
                    _Session.Session.CheckResult(_Session.Session.GetDelegate<Internal.AI.DAQmxGetAIChanCalVerifAcqVals>()(_Session.Session.TaskHandle, _Session.ActiveChans, ref value[0], (uint)value.Length));
                    return value.Where(x => x != 0).ToArray();
                }
                set
                {
                    if (value == null || value.Length == 0)
                    {
                        _Session.Session.CheckResult(_Session.Session.GetDelegate<Internal.AI.DAQmxResetAIChanCalVerifAcqVals>()(_Session.Session.TaskHandle, _Session.ActiveChans));
                        return;
                    }
                    _Session.Session.CheckResult(_Session.Session.GetDelegate<Internal.AI.DAQmxSetAIChanCalVerifAcqVals>()(_Session.Session.TaskHandle, _Session.ActiveChans, ref value[0], (uint)value.Length));
                }
            }
        }
        public class AdvancedConfig
        {
            ChannelAttributeSession _Session;
            internal AdvancedConfig(ChannelAttributeSession session)
            {
                _Session = session;
            }
            public double RangeHigh { get => _Session.GetValue<Internal.AI.DAQmxGetAIRngHigh, double>(); set => _Session.SetValue<Internal.AI.DAQmxSetAIRngHigh,double>(value); }
            public double RangeLow { get => _Session.GetValue<Internal.AI.DAQmxGetAIRngLow,double>(); set => _Session.SetValue<Internal.AI.DAQmxSetAIRngLow,double>(value); }
            public double DCOffset { get => _Session.GetValue<Internal.AI.DAQmxGetAIDCOffset, double>(); set => _Session.SetValue<Internal.AI.DAQmxSetAIDCOffset,double>(value); }
            public double Gain { get => _Session.GetValue<Internal.AI.DAQmxGetAIGain, double>(); set => _Session.SetValue<Internal.AI.DAQmxSetAIGain,double>(value); }
            public bool SampAndHoldEnable { get => _Session.GetValue<Internal.AI.DAQmxGetAISampAndHoldEnable, bool>(); set => _Session.SetValue<Internal.AI.DAQmxSetAISampAndHoldEnable,bool>(value); }
            public AIAutoZeroMode AutoZeroMode { get => _Session.GetValue<Internal.AI.DAQmxGetAIAutoZeroMode, AIAutoZeroMode>(); set => _Session.SetValue<Internal.AI.DAQmxGetAIAutoZeroMode,AIAutoZeroMode>(value); }
            public bool ChopEnable { get => _Session.GetValue<Internal.AI.DAQmxGetAIChopEnable, bool>(); set => _Session.SetValue<Internal.AI.DAQmxSetAIChopEnable,bool>(value); }
            public double DataXferMaxRate { get => _Session.GetValue<Internal.AI.DAQmxGetAIDataXferMaxRate, double>(); set => _Session.SetValue<Internal.AI.DAQmxSetAIDataXferMaxRate,double>(value); }
            public DataXferMech DataXferMech { get => _Session.GetValue<Internal.AI.DAQmxGetAIDataXferMech, DataXferMech>(); set => _Session.SetValue<Internal.AI.DAQmxSetAIDataXferMech,DataXferMech>(value); }
            public InputDataXferReqCond DataXferReqCond { get => _Session.GetValue<Internal.AI.DAQmxGetAIDataXferReqCond, InputDataXferReqCond>(); set => _Session.SetValue<Internal.AI.DAQmxSetAIDataXferReqCond,InputDataXferReqCond>(value); }
            public uint DataXferCustomThreshold { get => _Session.GetValue<Internal.AI.DAQmxGetAIDataXferCustomThreshold, uint>(); set => _Session.SetValue<Internal.AI.DAQmxSetAIDataXferCustomThreshold,uint>(value); }
            public uint UsbXferReqSize { get => _Session.GetValue<Internal.AI.DAQmxGetAIUsbXferReqSize, uint>(); set => _Session.SetValue<Internal.AI.DAQmxSetAIUsbXferReqSize,uint>(value); }
            public uint UsbXferReqCount { get => _Session.GetValue<Internal.AI.DAQmxGetAIUsbXferReqCount, uint>(); set => _Session.SetValue<Internal.AI.DAQmxSetAIUsbXferReqCount,uint>(value); }
            public bool MemMapEnable { get => _Session.GetValue<Internal.AI.DAQmxGetAIMemMapEnable, bool>(); set => _Session.SetValue<Internal.AI.DAQmxSetAIMemMapEnable,bool>(value); }
            public RawDataCompressionType RawDataCompressionType { get => _Session.GetValue<Internal.AI.DAQmxGetAIRawDataCompressionType, RawDataCompressionType>(); set => _Session.SetValue<Internal.AI.DAQmxSetAIRawDataCompressionType,RawDataCompressionType>(value); }
            public uint CompressedSampSize { get => _Session.GetValue<Internal.AI.DAQmxGetAILossyLSBRemovalCompressedSampSize, uint>(); set => _Session.SetValue<Internal.AI.DAQmxSetAILossyLSBRemovalCompressedSampSize,uint>(value); }
            public double[] DevScalingCoeff
            {
                get
                {
                    double[] val = new double[100];
                    _Session.Session.CheckResult(_Session.Session.GetDelegate<Internal.AI.DAQmxGetAIDevScalingCoeff>()(_Session.Session.TaskHandle, _Session.ActiveChans, ref val[0], (uint)val.Length));
                    return val.Where(x=>x!=0).ToArray();
                }
            }
            public bool EnhancedAliasRejectionEnable { get => _Session.GetValue<Internal.AI.DAQmxGetAIEnhancedAliasRejectionEnable, bool>(); set => _Session.SetValue<Internal.AI.DAQmxSetAIEnhancedAliasRejectionEnable,bool>(value); }
            public bool OpenChanDetectEnable { get => _Session.GetValue<Internal.AI.DAQmxGetAIOpenChanDetectEnable, bool>(); set => _Session.SetValue<Internal.AI.DAQmxSetAIOpenChanDetectEnable,bool>(value); }
            public double InputLimitsFaultDetectUpperLimit { get => _Session.GetValue<Internal.AI.DAQmxGetAIInputLimitsFaultDetectUpperLimit,double>(); set => _Session.SetValue<Internal.AI.DAQmxSetAIInputLimitsFaultDetectUpperLimit,double>(value); }
            public double InputLimitsFaultDetectLowerLimit { get => _Session.GetValue<Internal.AI.DAQmxGetAIInputLimitsFaultDetectLowerLimit,double>(); set => _Session.SetValue<Internal.AI.DAQmxSetAIInputLimitsFaultDetectLowerLimit,double>(value); }
            public bool InputLimitsFaultDetectEnable { get => _Session.GetValue<Internal.AI.DAQmxGetAIInputLimitsFaultDetectEnable,bool>(); set => _Session.SetValue<Internal.AI.DAQmxSetAIInputLimitsFaultDetectEnable,bool>(value); }
            public bool PowerSupplyFaultDetectEnable { get => _Session.GetValue<Internal.AI.DAQmxGetAIPowerSupplyFaultDetectEnable,bool>(); set => _Session.SetValue<Internal.AI.DAQmxSetAIPowerSupplyFaultDetectEnable,bool>(value); }
            public bool OvercurrentDetectEnable { get => _Session.GetValue<Internal.AI.DAQmxGetAIOvercurrentDetectEnable,bool>(); set => _Session.SetValue<Internal.AI.DAQmxSetAIOvercurrentDetectEnable,bool>(value); }
        }
    }
    public class AIVoltageChannelConfig : BaseChannelConfig
    {
        internal AIVoltageChannelConfig(ChannelAttributeSession session) : base(session)
        {
            AttributeSession = session;
        }
        [AllowNull]
        internal override ChannelAttributeSession AttributeSession { get; }
        public AIVoltageUnits Units { get => AttributeSession.GetValue<Internal.AI.DAQmxGetAIVoltageUnits,AIVoltageUnits>(); set => AttributeSession.SetValue<Internal.AI.DAQmxSetAIVoltageUnits,AIVoltageUnits>(value); }
    }
    public class AITempChannelConfig : BaseChannelConfig
    {
        internal AITempChannelConfig(ChannelAttributeSession session) : base(session)
        {
            AttributeSession = session;
            Thrm = new AIThrmChannelConfig(session);
            RTD = new AIRTDChannelConfig(session);
            Thrmstr = new AIThrmstrChannelConfig(session);
        }
        [AllowNull]
        internal override ChannelAttributeSession AttributeSession { get; }
        public AITempUnits Units { get => AttributeSession.GetValue<Internal.AI.DAQmxGetAITempUnits,AITempUnits>(); set => AttributeSession.SetValue<Internal.AI.DAQmxSetAITempUnits,AITempUnits>(value); }
        public bool ForceReadFromChan { get => AttributeSession.GetValue<Internal.AI.DAQmxGetAIForceReadFromChan,bool>(); set => AttributeSession.SetValue<Internal.AI.DAQmxSetAIForceReadFromChan,bool>(value); }
        public AIThrmChannelConfig Thrm { get; }
        public AIRTDChannelConfig RTD { get; }
        public AIThrmstrChannelConfig Thrmstr { get; }
    }
    public class AIThrmChannelConfig : BaseChannelConfig
    {
        internal AIThrmChannelConfig(ChannelAttributeSession session) : base(session)
        {
            AttributeSession = session;
        }
        [AllowNull]
        internal override ChannelAttributeSession AttributeSession { get; }
        public ThrmcplType Type { get => AttributeSession.GetValue<Internal.AI.DAQmxGetAIThrmcplType,ThrmcplType>(); set => AttributeSession.SetValue<Internal.AI.DAQmxSetAIThrmcplType,ThrmcplType>(value); }
        public ThrmcplScaleType ScaleType { get => AttributeSession.GetValue<Internal.AI.DAQmxGetAIThrmcplScaleType, ThrmcplScaleType>();set=> AttributeSession.SetValue<Internal.AI.DAQmxSetAIThrmcplScaleType,ThrmcplScaleType>(value); }
        public ThrmcplCJCSrc CJCSrc { get => AttributeSession.GetValue<Internal.AI.DAQmxGetAIThrmcplCJCSrc,ThrmcplCJCSrc>();}
        public double CJCValue { get => AttributeSession.GetValue<Internal.AI.DAQmxGetAIThrmcplCJCVal,double>(); set => AttributeSession.SetValue<Internal.AI.DAQmxSetAIThrmcplCJCVal,double>(value); }
        public string CJCChan { get => AttributeSession.GetValue<Internal.AI.DAQmxGetAIThrmcplCJCChan>(); set => AttributeSession.SetValue<Internal.AI.DAQmxSetAIThrmcplCJCVal>(value); }
    }
    public class AIRTDChannelConfig : BaseChannelConfig
    {
        internal AIRTDChannelConfig(ChannelAttributeSession session) : base(session)
        {
            AttributeSession = session;
        }
        [AllowNull]
        internal override ChannelAttributeSession AttributeSession { get; }
        public RTDType Type { get => AttributeSession.GetValue<Internal.AI.DAQmxGetAIRTDType,RTDType>(); set => AttributeSession.SetValue<Internal.AI.DAQmxSetAIRTDType,RTDType>(value); }
        public double R0 { get => AttributeSession.GetValue<Internal.AI.DAQmxGetAIRTDR0, double>(); set => AttributeSession.SetValue<Internal.AI.DAQmxSetAIRTDR0, double>(value); }
        public double A { get => AttributeSession.GetValue<Internal.AI.DAQmxGetAIRTDA, double>();set=> AttributeSession.SetValue<Internal.AI.DAQmxSetAIRTDA,double>(value); }
        public double B { get => AttributeSession.GetValue<Internal.AI.DAQmxGetAIRTDB, double>(); set => AttributeSession.SetValue<Internal.AI.DAQmxSetAIRTDB,double>(value); }
        public double C { get => AttributeSession.GetValue<Internal.AI.DAQmxGetAIRTDC, double>();set=> AttributeSession.SetValue<Internal.AI.DAQmxSetAIRTDC,double>(value); }
    }
    public class AIThrmstrChannelConfig : BaseChannelConfig
    {
        internal AIThrmstrChannelConfig(ChannelAttributeSession session) : base(session)
        {
            AttributeSession = session;
        }
        [AllowNull]
        internal override ChannelAttributeSession AttributeSession { get; }
        public double A { get => AttributeSession.GetValue<Internal.AI.DAQmxGetAIThrmstrA, double>(); set => AttributeSession.SetValue<Internal.AI.DAQmxSetAIThrmstrA,double>(value); }
        public double B { get => AttributeSession.GetValue<Internal.AI.DAQmxGetAIThrmstrB, double>();set => AttributeSession.SetValue<Internal.AI.DAQmxSetAIThrmstrB,double>(value); }
        public double C { get => AttributeSession.GetValue<Internal.AI.DAQmxGetAIThrmstrC,double>();set=> AttributeSession.SetValue<Internal.AI.DAQmxSetAIThrmstrC,double>(value); }
        public double R1 { get => AttributeSession.GetValue<Internal.AI.DAQmxGetAIThrmstrR1,double>();set=> AttributeSession.SetValue<Internal.AI.DAQmxSetAIThrmstrR1,double>(value); }
    }

    public class AICurrentChannelConfig : BaseChannelConfig
    {
        internal AICurrentChannelConfig(ChannelAttributeSession session) : base(session)
        {
            AttributeSession = session;
        }
        [AllowNull]
        internal override ChannelAttributeSession AttributeSession { get; }
        public AnalogCurrentUnit Unit { get => AttributeSession.GetValue<Internal.AI.DAQmxGetAICurrentUnits,AnalogCurrentUnit>(); set => AttributeSession.SetValue<Internal.AI.DAQmxSetAICurrentUnits,AnalogCurrentUnit>(value); }
    }
    public class AIStrainChannelConfig : BaseChannelConfig
    {
        internal AIStrainChannelConfig(ChannelAttributeSession session) : base(session)
        {
            AttributeSession = session;
            StrainGage = new AIStrainGageChannelConfig(session);
        }
        [AllowNull]
        internal override ChannelAttributeSession AttributeSession { get; }
        public AIStrainGageChannelConfig StrainGage { get; }
        public StrainUnits Units { get => AttributeSession.GetValue<Internal.AI.DAQmxGetAIStrainUnits,StrainUnits>();set=> AttributeSession.SetValue<Internal.AI.DAQmxSetAIStrainUnits,StrainUnits>(value); }
        public bool ForceReadFromChan { get => AttributeSession.GetValue<Internal.AI.DAQmxGetAIStrainGageForceReadFromChan,bool>(); set => AttributeSession.SetValue<Internal.AI.DAQmxSetAIStrainGageForceReadFromChan,bool>(value); }
    }
    public class AIStrainGageChannelConfig : BaseChannelConfig
    {
        internal AIStrainGageChannelConfig(ChannelAttributeSession session) : base(session)
        {
            AttributeSession = session;
        }
        [AllowNull]
        internal override ChannelAttributeSession AttributeSession { get; }
        public double GageFactor { get => AttributeSession.GetValue<Internal.AI.DAQmxGetAIStrainGageGageFactor,double>(); set => AttributeSession.SetValue<Internal.AI.DAQmxSetAIStrainGageGageFactor,double>(value); }
        public double PoissonRatio { get => AttributeSession.GetValue<Internal.AI.DAQmxGetAIStrainGagePoissonRatio,double>(); set => AttributeSession.SetValue<Internal.AI.DAQmxSetAIStrainGagePoissonRatio,double>(value); }
        public StrainGageCfg StrainGageCfg { get => AttributeSession.GetValue<Internal.AI.DAQmxGetAIStrainGageCfg,StrainGageCfg>(); set => AttributeSession.SetValue<Internal.AI.DAQmxSetAIStrainGageCfg,StrainGageCfg>(value); }
    }
    public class AIRosetteStrainGageChannelConfig : BaseChannelConfig
    {
        internal AIRosetteStrainGageChannelConfig(ChannelAttributeSession session) : base(session)
        {
            AttributeSession = session;
        }
        [AllowNull]
        internal override ChannelAttributeSession AttributeSession { get; }
        public RosetteStrainGageRosetteType RosetteType { get => AttributeSession.GetValue<Internal.AI.DAQmxGetAIRosetteStrainGageRosetteType, RosetteStrainGageRosetteType>(); }
        public double Orientation { get => AttributeSession.GetValue<Internal.AI.DAQmxGetAIRosetteStrainGageOrientation,double>(); set => AttributeSession.SetValue<Internal.AI.DAQmxSetAIRosetteStrainGageOrientation,double>(value); }
        public string[] StrainChans =>AttributeSession.GetValue<Internal.AI.DAQmxGetAIRosetteStrainGageStrainChans>().Split(',').Where(x=>!string.IsNullOrEmpty(x)).ToArray();
        public RosetteStrainGageRosetteMeasType RosetteMeasType { get => AttributeSession.GetValue<Internal.AI.DAQmxGetAIRosetteStrainGageRosetteMeasType,RosetteStrainGageRosetteMeasType>(); set => AttributeSession.SetValue<Internal.AI.DAQmxSetAIRosetteStrainGageRosetteMeasType,RosetteStrainGageRosetteMeasType>(value); }

    }
    public class AIResistanceChannelConfig : BaseChannelConfig
    {
        internal AIResistanceChannelConfig(ChannelAttributeSession session) : base(session)
        {
            AttributeSession = session;
        }
        [AllowNull]
        internal override ChannelAttributeSession AttributeSession { get; }
        public ResistanceUnits Units { get => AttributeSession.GetValue<Internal.AI.DAQmxGetAIResistanceUnits, ResistanceUnits>(); set => AttributeSession.SetValue<Internal.AI.DAQmxSetAIResistanceUnits,ResistanceUnits>(value); }
    }
    public class AIFreqChannelConfig : BaseChannelConfig
    {
        internal AIFreqChannelConfig(ChannelAttributeSession session) : base(session)
        {
            AttributeSession = session;
            FreqVoltage = new AIFreqVoltageChannelConfig(session);
        }
        [AllowNull]
        internal override ChannelAttributeSession AttributeSession { get; }
        public AIFreqVoltageChannelConfig FreqVoltage { get; }

        public AIFreqUnits Units { get => AttributeSession.GetValue<Internal.AI.DAQmxGetAIFreqUnits,AIFreqUnits>(); set => AttributeSession.SetValue<Internal.AI.DAQmxSetAIFreqUnits,AIFreqUnits>(value); }

    }
    public class AIFreqVoltageChannelConfig : BaseChannelConfig
    {
        internal AIFreqVoltageChannelConfig(ChannelAttributeSession session) : base(session)
        {
            AttributeSession = session;
        }
        [AllowNull]
        internal override ChannelAttributeSession AttributeSession { get; }
        public double ThreshVoltage { get => AttributeSession.GetValue<Internal.AI.DAQmxGetAIFreqThreshVoltage,double>(); set => AttributeSession.SetValue<Internal.AI.DAQmxSetAIFreqThreshVoltage,double>(value); }
        public double Hyst { get => AttributeSession.GetValue<Internal.AI.DAQmxGetAIFreqHyst,double>(); set => AttributeSession.SetValue<Internal.AI.DAQmxSetAIFreqHyst,double>(value); }
    }
    public class AIPositionChannelConfig : BaseChannelConfig
    {
        internal AIPositionChannelConfig(ChannelAttributeSession session) : base(session)
        {
            AttributeSession = session;
            LVDT = new AILVDTChannelConfig(session);
            RVDT = new AIRVDTChannelConfig(session);
            EddyCurrentProx = new AIEddyCurrentProxChannelConfig(session);
        }
        internal override ChannelAttributeSession AttributeSession { get; }
        public AILVDTChannelConfig LVDT { get; }
        public AIRVDTChannelConfig RVDT { get; }
        public AIEddyCurrentProxChannelConfig EddyCurrentProx { get; }
    }
    public class AILVDTChannelConfig : BaseChannelConfig
    {
        internal AILVDTChannelConfig(ChannelAttributeSession session) : base(session)
        {
            AttributeSession = session;
        }
        [AllowNull]
        internal override ChannelAttributeSession AttributeSession { get; }
        public LVDTUnits Units { get => AttributeSession.GetValue<Internal.AI.DAQmxGetAILVDTUnits,LVDTUnits>(); set => AttributeSession.SetValue<Internal.AI.DAQmxSetAILVDTUnits,LVDTUnits>(value); }
        public double Sensitivity { get => AttributeSession.GetValue<Internal.AI.DAQmxGetAILVDTSensitivity,double>(); set => AttributeSession.SetValue<Internal.AI.DAQmxSetAILVDTSensitivity,double>(value); }
        public LVDTSensitivityUnits SensitivityUnits { get => AttributeSession.GetValue<Internal.AI.DAQmxGetAILVDTSensitivityUnits,LVDTSensitivityUnits>(); set => AttributeSession.SetValue<Internal.AI.DAQmxSetAILVDTSensitivityUnits,LVDTSensitivityUnits>(value); }
    }
    public class AIRVDTChannelConfig : BaseChannelConfig
    {
        internal AIRVDTChannelConfig(ChannelAttributeSession session) : base(session)
        {
            AttributeSession = session;
        }
        [AllowNull]
        internal override ChannelAttributeSession AttributeSession { get; }
        public RVDTUnits Units { get => AttributeSession.GetValue<Internal.AI.DAQmxGetAIRVDTUnits,RVDTUnits>(); set => AttributeSession.SetValue<Internal.AI.DAQmxSetAIRVDTUnits,RVDTUnits>(value); }
        public double Sensitivity { get => AttributeSession.GetValue<Internal.AI.DAQmxGetAIRVDTSensitivity,double>(); set => AttributeSession.SetValue<Internal.AI.DAQmxSetAIRVDTSensitivity,double>(value); }
        public RVDTSensitivityUnits SensitivityUnits { get => AttributeSession.GetValue<Internal.AI.DAQmxGetAIRVDTSensitivityUnits,RVDTSensitivityUnits>(); set => AttributeSession.SetValue<Internal.AI.DAQmxSetAIRVDTSensitivityUnits,RVDTSensitivityUnits>(value); }
    }
    public class AIEddyCurrentProxChannelConfig : BaseChannelConfig
    {
        internal AIEddyCurrentProxChannelConfig(ChannelAttributeSession session) : base(session)
        {
            AttributeSession = session;

        }
        [AllowNull]
        internal override ChannelAttributeSession AttributeSession { get; }
        public LVDTUnits Units { get => AttributeSession.GetValue<Internal.AI.DAQmxGetAIEddyCurrentProxProbeUnits,LVDTUnits>(); set => AttributeSession.SetValue<Internal.AI.DAQmxSetAIEddyCurrentProxProbeUnits,LVDTUnits>(value); }
        public double Sensitivity { get => AttributeSession.GetValue<Internal.AI.DAQmxGetAIEddyCurrentProxProbeSensitivity,double>(); set => AttributeSession.SetValue<Internal.AI.DAQmxSetAIEddyCurrentProxProbeSensitivity,double>(value); }
        public EddyCurrentProxSensitivityUnits SensitivityUnits { get => AttributeSession.GetValue<Internal.AI.DAQmxGetAIEddyCurrentProxProbeSensitivityUnits,EddyCurrentProxSensitivityUnits>(); set => AttributeSession.SetValue<Internal.AI.DAQmxSetAIEddyCurrentProxProbeSensitivityUnits,EddyCurrentProxSensitivityUnits>(value); }
    }
    public class AISoundPressureChannelConfig : BaseChannelConfig
    {
        internal AISoundPressureChannelConfig(ChannelAttributeSession session) : base(session)
        {
            AttributeSession = session;
            Microphone = new AIMicrophoneChannelConfig(session);
        }
        [AllowNull]
        internal override ChannelAttributeSession AttributeSession { get; }
        public AIMicrophoneChannelConfig Microphone { get; }
        public double MaxSoundPressureLvl { get => AttributeSession.GetValue<Internal.AI.DAQmxGetAISoundPressureMaxSoundPressureLvl,double>(); set => AttributeSession.SetValue<Internal.AI.DAQmxSetAISoundPressureMaxSoundPressureLvl,double>(value); }
        public SoundPressureUnits Units { get => AttributeSession.GetValue<Internal.AI.DAQmxGetAISoundPressureUnits,SoundPressureUnits>(); set => AttributeSession.SetValue<Internal.AI.DAQmxSetAISoundPressureUnits,SoundPressureUnits>(value); }
        public double dBRef { get => AttributeSession.GetValue<Internal.AI.DAQmxGetAISoundPressuredBRef,double>(); set => AttributeSession.SetValue<Internal.AI.DAQmxSetAISoundPressuredBRef,double>(value); }
    }
    public class AIMicrophoneChannelConfig : BaseChannelConfig
    {
        internal AIMicrophoneChannelConfig(ChannelAttributeSession session) : base(session)
        {
            AttributeSession = session;
        }
        [AllowNull]
        internal override ChannelAttributeSession AttributeSession { get; }
        public double Sensitivity { get => AttributeSession.GetValue<Internal.AI.DAQmxGetAIMicrophoneSensitivity,double>(); set => AttributeSession.SetValue<Internal.AI.DAQmxSetAIMicrophoneSensitivity,double>(value); }
    }
    public class AIBaseAccelChannelConfig : BaseChannelConfig
    {
        internal AIBaseAccelChannelConfig(ChannelAttributeSession session) : base(session)
        {
            AttributeSession = session;
            Wire4DCVoltage = new AI4WireDCVoltageChannelConfig(session);
            Accel = new AIAccelChannelConfig(session);
            AccelCharge = new AIAccelChargeChannelConfig(session);
        }
        [AllowNull]
        internal override ChannelAttributeSession AttributeSession { get; }
        public AI4WireDCVoltageChannelConfig Wire4DCVoltage { get; }
        public AIAccelChannelConfig Accel { get; }
        public AIAccelChargeChannelConfig AccelCharge { get; }
        public AccelUnits Units { get => AttributeSession.GetValue<Internal.AI.DAQmxGetAIAccelUnits,AccelUnits>(); set => AttributeSession.SetValue<Internal.AI.DAQmxSetAIAccelUnits,AccelUnits>(value); }
        public double dBRef { get => AttributeSession.GetValue<Internal.AI.DAQmxGetAIAcceldBRef,double>(); set => AttributeSession.SetValue<Internal.AI.DAQmxSetAIAcceldBRef,double>(value); }
    }
    public class AI4WireDCVoltageChannelConfig : BaseChannelConfig
    {
        internal AI4WireDCVoltageChannelConfig(ChannelAttributeSession session) : base(session)
        {
            AttributeSession = session;
        }
        [AllowNull]
        internal override ChannelAttributeSession AttributeSession { get; }
        public double Sensitivity { get => AttributeSession.GetValue<Internal.AI.DAQmxGetAIAccel4WireDCVoltageSensitivity,double>(); set => AttributeSession.SetValue<Internal.AI.DAQmxSetAIAccel4WireDCVoltageSensitivity,double>(value); }
        public AccelSensitivityUnits SensitivityUnits { get => AttributeSession.GetValue<Internal.AI.DAQmxGetAIAccel4WireDCVoltageSensitivityUnits,AccelSensitivityUnits>(); set => AttributeSession.SetValue<Internal.AI.DAQmxSetAIAccel4WireDCVoltageSensitivityUnits,AccelSensitivityUnits>(value); }
    }
    public class AIAccelChannelConfig : BaseChannelConfig
    {
        internal AIAccelChannelConfig(ChannelAttributeSession session) : base(session)
        {
            AttributeSession = session;
        }
        [AllowNull]
        internal override ChannelAttributeSession AttributeSession { get; }
        public double Sensitivity { get => AttributeSession.GetValue<Internal.AI.DAQmxGetAIAccelSensitivity,double>(); set => AttributeSession.SetValue<Internal.AI.DAQmxSetAIAccelSensitivity,double>(value); }
        public AccelSensitivityUnits SensitivityUnits { get => AttributeSession.GetValue<Internal.AI.DAQmxGetAIAccelSensitivityUnits,AccelSensitivityUnits>(); set => AttributeSession.SetValue<Internal.AI.DAQmxSetAIAccelSensitivityUnits,AccelSensitivityUnits>(value); }
    }
    public class AIAccelChargeChannelConfig : BaseChannelConfig
    {
        internal AIAccelChargeChannelConfig(ChannelAttributeSession session) : base(session)
        {
            AttributeSession = session;
        }
        [AllowNull]
        internal override ChannelAttributeSession AttributeSession { get; }
        public double Sensitivity { get => AttributeSession.GetValue<Internal.AI.DAQmxGetAIAccelChargeSensitivity,double>(); set => AttributeSession.SetValue<Internal.AI.DAQmxSetAIAccelChargeSensitivity,double>(value); }
        public AccelSensitivityUnits SensitivityUnits { get => AttributeSession.GetValue<Internal.AI.DAQmxGetAIAccelChargeSensitivityUnits,AccelSensitivityUnits>(); set => AttributeSession.SetValue<Internal.AI.DAQmxSetAIAccelChargeSensitivityUnits,AccelSensitivityUnits>(value); }
    }
    public class AIVelocityChannelConfig : BaseChannelConfig
    {
        internal AIVelocityChannelConfig(ChannelAttributeSession session) : base(session)
        {
            AttributeSession = session;
            VelocityIEPE = new AIVelocityIEPEChannelConfig(session);
        }
        [AllowNull]
        internal override ChannelAttributeSession AttributeSession { get; }
        public AIVelocityIEPEChannelConfig VelocityIEPE { get; }
        public VelocityUnits Units { get => AttributeSession.GetValue<Internal.AI.DAQmxGetAIVelocityUnits,VelocityUnits>(); set => AttributeSession.SetValue<Internal.AI.DAQmxSetAIVelocityUnits,VelocityUnits>(value); }

    }
    public class AIVelocityIEPEChannelConfig : BaseChannelConfig
    {
        internal AIVelocityIEPEChannelConfig(ChannelAttributeSession session) : base(session)
        {
            AttributeSession = session;
        }
        [AllowNull]
        internal override ChannelAttributeSession AttributeSession { get; }
        public double dBRef { get => AttributeSession.GetValue<Internal.AI.DAQmxGetAIVelocityIEPESensordBRef,double>(); set => AttributeSession.SetValue<Internal.AI.DAQmxSetAIVelocityIEPESensordBRef,double>(value); }
        public double Sensitivity { get => AttributeSession.GetValue<Internal.AI.DAQmxGetAIVelocityIEPESensorSensitivity,double>(); set => AttributeSession.SetValue<Internal.AI.DAQmxSetAIVelocityIEPESensorSensitivity,double>(value); }
        public VelocityIEPESensorSensitivityUnits SensitivityUnits { get => AttributeSession.GetValue<Internal.AI.DAQmxGetAIVelocityIEPESensorSensitivityUnits,VelocityIEPESensorSensitivityUnits>(); set => AttributeSession.SetValue<Internal.AI.DAQmxSetAIVelocityIEPESensorSensitivityUnits,VelocityIEPESensorSensitivityUnits>(value); }
    }
    public class AIForceChannelConfig : BaseChannelConfig
    {
        internal AIForceChannelConfig(ChannelAttributeSession session) : base(session)
        {
            AttributeSession = session;
            ForceIEPE = new AIForceIEPEChannelConfig(session);
        }
        [AllowNull]
        internal override ChannelAttributeSession AttributeSession { get; }
        public AIForceIEPEChannelConfig ForceIEPE { get; }
        public ForceUnits Units { get => AttributeSession.GetValue<Internal.AI.DAQmxGetAIForceUnits,ForceUnits>(); set => AttributeSession.SetValue<Internal.AI.DAQmxSetAIForceUnits,ForceUnits>(value); }
    }
    public class AIForceIEPEChannelConfig : BaseChannelConfig
    {
        internal AIForceIEPEChannelConfig(ChannelAttributeSession session) : base(session)
        {
            AttributeSession = session;
        }
        [AllowNull]
        internal override ChannelAttributeSession AttributeSession { get; }
        public double Sensitivity { get => AttributeSession.GetValue<Internal.AI.DAQmxGetAIForceIEPESensorSensitivity,double>(); set => AttributeSession.SetValue<Internal.AI.DAQmxSetAIForceIEPESensorSensitivity,double>(value); }
        public ForceIEPESensorSensitivityUnits SensitivityUnits { get => AttributeSession.GetValue<Internal.AI.DAQmxGetAIForceIEPESensorSensitivityUnits,ForceIEPESensorSensitivityUnits>(); set => AttributeSession.SetValue<Internal.AI.DAQmxSetAIForceIEPESensorSensitivityUnits,ForceIEPESensorSensitivityUnits>(value); }
    }
    public class AIPressureChannelConfig : BaseChannelConfig
    {
        internal AIPressureChannelConfig(ChannelAttributeSession session) : base(session)
        {
            AttributeSession = session;
        }
        [AllowNull]
        internal override ChannelAttributeSession AttributeSession { get; }
        public AIPressureUnits Units { get => AttributeSession.GetValue<Internal.AI.DAQmxGetAIPressureUnits,AIPressureUnits>(); set => AttributeSession.SetValue<Internal.AI.DAQmxSetAIPressureUnits,AIPressureUnits>(value); }
    }
    public class AITorqueChannelConfig : BaseChannelConfig
    {
        internal AITorqueChannelConfig(ChannelAttributeSession session) : base(session)
        {
            AttributeSession = session;
        }
        [AllowNull]
        internal override ChannelAttributeSession AttributeSession { get; }
        public AITorqueUnits Units { get => AttributeSession.GetValue<Internal.AI.DAQmxGetAITorqueUnits,AITorqueUnits>(); set => AttributeSession.SetValue<Internal.AI.DAQmxSetAITorqueUnits,AITorqueUnits>(value); }
    }
    public class AIBridgeChannelConfig : BaseChannelConfig
    {
        internal AIBridgeChannelConfig(ChannelAttributeSession session) : base(session)
        {
            AttributeSession = session;
            Poly = new AIBridgePolyChannelConfig(session);
            Table = new AIBridgeTableChannelConfig(session);
            TwoPointLin = new AIBridgeTwoPointLinChannelConfig(session);
        }
        [AllowNull]
        internal override ChannelAttributeSession AttributeSession { get; }
        public AIBridgePolyChannelConfig Poly { get; }
        public AIBridgeTwoPointLinChannelConfig TwoPointLin { get; }
        public AIBridgeTableChannelConfig Table { get; }
        public AIBridgeUnits Units { get => AttributeSession.GetValue<Internal.AI.DAQmxGetAIBridgeUnits, AIBridgeUnits>(); set => AttributeSession.SetValue<Internal.AI.DAQmxSetAIBridgeUnits,AIBridgeUnits>(value); }
        public AIBridgePhysicalUnits PhysicalUnits { get => AttributeSession.GetValue<Internal.AI.DAQmxGetAIBridgePhysicalUnits, AIBridgePhysicalUnits>(); set => AttributeSession.SetValue<Internal.AI.DAQmxSetAIBridgePhysicalUnits,AIBridgePhysicalUnits>(value); }
        public AIBridgeElectricalUnits ElectricalUnits { get => AttributeSession.GetValue<Internal.AI.DAQmxGetAIBridgeElectricalUnits,AIBridgeElectricalUnits>(); set => AttributeSession.SetValue<Internal.AI.DAQmxSetAIBridgeElectricalUnits,AIBridgeElectricalUnits>(value); }
        public AIBridgeScaleType ScaleType { get => AttributeSession.GetValue<Internal.AI.DAQmxGetAIBridgeScaleType, AIBridgeScaleType>(); set => AttributeSession.SetValue<Internal.AI.DAQmxSetAIBridgeScaleType,AIBridgeScaleType>(value); }
    }
    public class AIBridgeTwoPointLinChannelConfig : BaseChannelConfig
    {
        internal AIBridgeTwoPointLinChannelConfig(ChannelAttributeSession session) : base(session)
        {
            AttributeSession = session;
        }
        [AllowNull]
        internal override ChannelAttributeSession AttributeSession { get; }
        public double FirstPhysicalVal { get => AttributeSession.GetValue<Internal.AI.DAQmxGetAIBridgeTwoPointLinFirstPhysicalVal,double>(); set => AttributeSession.SetValue<Internal.AI.DAQmxSetAIBridgeTwoPointLinFirstPhysicalVal,double>(value); }
        public double FirstElectricalVal { get => AttributeSession.GetValue<Internal.AI.DAQmxGetAIBridgeTwoPointLinFirstElectricalVal,double>(); set => AttributeSession.SetValue<Internal.AI.DAQmxSetAIBridgeTwoPointLinFirstElectricalVal,double>(value); }


        public double SecondPhysicalVal { get => AttributeSession.GetValue<Internal.AI.DAQmxGetAIBridgeTwoPointLinSecondPhysicalVal,double>(); set => AttributeSession.SetValue<Internal.AI.DAQmxSetAIBridgeTwoPointLinSecondPhysicalVal,double>(value); }
        public double SecondElectricalVal { get => AttributeSession.GetValue<Internal.AI.DAQmxGetAIBridgeTwoPointLinSecondElectricalVal,double>(); set => AttributeSession.SetValue<Internal.AI.DAQmxSetAIBridgeTwoPointLinSecondElectricalVal,double>(value); }
    }
    public class AIBridgeTableChannelConfig : BaseChannelConfig
    {
        internal AIBridgeTableChannelConfig(ChannelAttributeSession session) : base(session)
        {
            AttributeSession = session;
        }
        [AllowNull]
        internal override ChannelAttributeSession AttributeSession { get; }
        public double[] PhysicalVals
        {
            get
            {
                double[] value = new double[1000];
                _DAQmxSession.CheckResult(_DAQmxSession.GetDelegate<Internal.AI.DAQmxGetAIBridgeTablePhysicalVals>()(_DAQmxSession.TaskHandle, AttributeSession.ActiveChans, ref value[0],(uint)value.Length));
                return value.Where(x => x != 0).ToArray();
            }
            set
            {
                if(value ==null  || value.Length==0)
                {

                    _DAQmxSession.Invoke<Internal.AI.DAQmxResetAIBridgeTablePhysicalVals>(_DAQmxSession.TaskHandle, AttributeSession.ActiveChans);
                }
                else _DAQmxSession.CheckResult(_DAQmxSession.GetDelegate<Internal.AI.DAQmxSetAIBridgeTablePhysicalVals>()(_DAQmxSession.TaskHandle, AttributeSession.ActiveChans, ref value[0],(uint)value.Length));
            }
        }

        public double[] ElectricalVals
        {
            get
            {
                double[] value = new double[1000];
                _DAQmxSession.CheckResult(_DAQmxSession.GetDelegate<Internal.AI.DAQmxGetAIBridgeTableElectricalVals>()(_DAQmxSession.TaskHandle, AttributeSession.ActiveChans, ref value[0],(uint)value.Length));
                return value.Where(x => x != 0).ToArray();
            }
            set
            {
                if (value == null || value.Length == 0)
                {

                    _DAQmxSession.Invoke<Internal.AI.DAQmxResetAIBridgeTableElectricalVals>(_DAQmxSession.TaskHandle, AttributeSession.ActiveChans);
                }
                else _DAQmxSession.CheckResult(_DAQmxSession.GetDelegate<Internal.AI.DAQmxSetAIBridgeTableElectricalVals>()(_DAQmxSession.TaskHandle, AttributeSession.ActiveChans, ref value[0],(uint)value.Length));
            }
        }
    }
    public class AIBridgePolyChannelConfig : BaseChannelConfig
    {
        internal AIBridgePolyChannelConfig(ChannelAttributeSession session) : base(session)
        {
            AttributeSession = session;
        }
        [AllowNull]
        internal override ChannelAttributeSession AttributeSession { get; }
        public double[] ForwardCoeff
        {
            get
            {
                double[] value = new double[1000];
                _DAQmxSession.CheckResult(_DAQmxSession.GetDelegate<Internal.AI.DAQmxGetAIBridgePolyForwardCoeff>()(_DAQmxSession.TaskHandle, AttributeSession.ActiveChans, ref value[0], (uint)value.Length));
                return value.Where(x => x != 0).ToArray();
            }
            set
            {
                if (value == null || value.Length == 0)
                {

                    _DAQmxSession.Invoke<Internal.AI.DAQmxResetAIBridgeTablePhysicalVals>(_DAQmxSession.TaskHandle, AttributeSession.ActiveChans);
                }
                else _DAQmxSession.CheckResult(_DAQmxSession.GetDelegate<Internal.AI.DAQmxSetAIBridgePolyForwardCoeff>()(_DAQmxSession.TaskHandle, AttributeSession.ActiveChans, ref value[0], (uint)value.Length));
            }
        }

        public double[] ReverseCoeff
        {
            get
            {
                double[] value = new double[1000];
                _DAQmxSession.CheckResult(_DAQmxSession.GetDelegate<Internal.AI.DAQmxGetAIBridgePolyReverseCoeff>()(_DAQmxSession.TaskHandle, AttributeSession.ActiveChans, ref value[0], (uint)value.Length));
                return value.Where(x => x != 0).ToArray();
            }
            set
            {
                if (value == null || value.Length == 0)
                {

                    _DAQmxSession.Invoke<Internal.AI.DAQmxResetAIBridgeTableElectricalVals>(_DAQmxSession.TaskHandle,AttributeSession.ActiveChans);
                }
                else _DAQmxSession.CheckResult(_DAQmxSession.GetDelegate<Internal.AI.DAQmxSetAIBridgePolyReverseCoeff>()(_DAQmxSession.TaskHandle, AttributeSession.ActiveChans, ref value[0], (uint)value.Length));
            }
        }
    }
    public class AIChargeChannelConfig : BaseChannelConfig
    {
        internal AIChargeChannelConfig(ChannelAttributeSession session) : base(session)
        {
            AttributeSession = session;
        }
        [AllowNull]
        internal override ChannelAttributeSession AttributeSession { get; }
        public AIChargeUnits Units { get => AttributeSession.GetValue<Internal.AI.DAQmxGetAIChargeUnits, AIChargeUnits>(); set => AttributeSession.SetValue<Internal.AI.DAQmxSetAIChargeUnits,AIChargeUnits>(value); }
    }
}
