Exemple #1
0
        public RandomAmbientLightBricklet(UID uid)
            : base(uid, DeviceIdentifier.BrickletAmbientLight)
        {
            AnalogValue = new ValueDecorator <UInt16>(UID, 2, 5, 6, 14);
            Illuminance = new ValueDecorator <UInt16>(UID, 1, 3, 4, 13, AnalogValue);
            Decorators  = Illuminance;

            Illuminance.CurrentValue = 5000;
        }
        public RandomBarometerBricklet(UID uid)
            : base(uid, DeviceIdentifier.BrickletBarometer)
        {
            AirPressure = new ValueDecorator <Int32>(UID, 1, 3, 4, 15);
            Altitude    = new ValueDecorator <Int32>(UID, 2, 5, 6, 16, AirPressure);
            Temperature = new ValueDecorator <Int16>(UID, 14, Altitude);
            Decorators  = Temperature;

            AirPressure.CurrentValue = 200000;
            CalculateAltitude();
            Temperature.CurrentValue = 2300;
        }
 public RandomTemperatureBricklet(UID uid)
     : base(uid, DeviceIdentifier.BrickletTemperature)
 {
     Temperature = new ValueDecorator <Int16>(UID, 1, 2, 3, 8);
     Temperature.CurrentValue = 2300;
 }