using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace NIDAQmx
{
    public class CompactRIO : BaseDevice
    {
        internal CompactRIO(DAQmxSession session, string deviceName) : base(session, deviceName)
        {
            byte[] bytes = new byte[1024];
            _Session.CheckResult(_Session.GetDelegate<Internal.Internal.DAQmxGetDevCompactRIOChassisDevName>()(DeviceName, ref bytes[0], (uint)bytes.Length));
            ChassisDevName = System.Text.Encoding.UTF8.GetString(bytes).Trim('\0');
            _Session.CheckResult(_Session.GetDelegate<Internal.Internal.DAQmxGetDevCompactRIOSlotNum>()(DeviceName, ref slotnum));
        }
        public string ChassisDevName { get; }
        private uint slotnum = 0;
        public uint SlotNum => slotnum;
    }
}
