private void DeviceAddedToBus(OneWireDevice device) { if (DeviceAdded != null) { DeviceAdded(this, new DeviceAddedEvent(device)); } }
public OneWireDevice CreateDevice(string address) { //Console.WriteLine("Address: " + address); string devicetype = address.Substring(0, 2); OneWireDevice device = null; //Console.WriteLine("Device Type: " + devicetype); switch (devicetype) { case "28": device = new TempSensorDS18B20(address); break; } return(device); }
public DeviceAddedEvent(OneWireDevice device) { this.Device = device; }