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

namespace NIDAQmx
{
    public class CITiming : BaseDevice
    {
        internal CITiming(DAQmxSession session, string deviceName) : base(session, deviceName)
        {
            _Session.CheckResult(_Session.GetDelegate<Internal.Internal.DAQmxGetDevCISampClkSupported>()(DeviceName, ref sampClkSupported));
            SampleModes[] modes = new SampleModes[Enum.GetValues<SampleModes>().Length];
            _Session.CheckResult(_Session.GetDelegate<Internal.Internal.DAQmxGetDevCISampModes>()(DeviceName, ref modes[0], (uint)modes.Length));
            SampleModes = modes.Where(x => x != 0).ToArray();
        }
        private bool sampClkSupported = false;
        public bool SampClkSupported => sampClkSupported;
        public SampleModes[] SampleModes { get; }
    }
}
