Esempio n. 1
0
 private void DeviceAddedToBus(OneWireDevice device)
 {
     if (DeviceAdded != null)
     {
         DeviceAdded(this, new DeviceAddedEvent(device));
     }
 }
Esempio n. 2
0
        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);
        }
Esempio n. 3
0
 public DeviceAddedEvent(OneWireDevice device)
 {
     this.Device = device;
 }