/// <summary> /// Поиск PMBus устройств /// </summary> /// <returns>Коллекция найденных устройств, null - если устройства не найдены</returns> public static List <ParamerusPMBusDevice> PMBusInit() { var opts = new PMBusDevice.DiscoverOptions(); opts.Scan_Mode = PMBusDevice.ScanMode.DeviceCode; if (PMBusDevice.Discover(opts) == 0) { opts.Scan_Mode = PMBusDevice.ScanMode.DeviceID; if (PMBusDevice.Discover(opts) == 0) { opts.Scan_Mode = PMBusDevice.ScanMode.TPS53951; if (PMBusDevice.Discover(opts) == 0) { return(null); } } } List <ParamerusPMBusDevice> listDevices = new List <ParamerusPMBusDevice>(); foreach (var dev in PMBusDevice.Devices) { listDevices.Add(new ParamerusPMBusDevice(dev)); } return(listDevices); }
public PMBusReadCommand(PMBusDevice _dev, Action <object> _propertyChangeDelegate, Func <bool> _checkNullPropertyDelegate) { dev = _dev; propertyChangeDelegate = _propertyChangeDelegate; checkNullPropertyDelegate = _checkNullPropertyDelegate; }
public ReadTemp2Command(PMBusDevice _dev, Action <object> act, Func <bool> check) : base(_dev, act, check) { command_code = PMBusCode.READ_TEMP_2; }
public ReadIinCommand(PMBusDevice _dev, Action <object> act, Func <bool> check) : base(_dev, act, check) { command_code = PMBusCode.READ_IIN; }