Ejemplo n.º 1
0
        public Write(string serial, IBluetooth bluetooth)
        {
            this.serial = serial;
            thermostats = Thermostats.Read();
            accessor    = new PeripheralAccessor(bluetooth);

            if (!thermostats.HasSecretAndUuidFor(serial))
            {
                Console.Error.WriteLine($"Has not previously connected to {serial}. Do a read first.");
                Environment.Exit(1);
            }
        }
Ejemplo n.º 2
0
 public Read(string serial, IBluetooth bluetooth)
 {
     this.serial = serial;
     thermostats = Thermostats.Read();
     accessor    = new PeripheralAccessor(bluetooth);
 }