ProjectsOld/Utils/IoT/Sensor/Luminanz.cs

21 lines
593 B
C#
Raw Permalink Normal View History

2017-09-26 21:44:41 +02:00
using System;
using System.Collections.Generic;
using System.Globalization;
2017-10-02 18:32:06 +02:00
using BlubbFish.Utils.IoT.Connector;
2017-09-26 21:44:41 +02:00
2017-10-02 18:32:06 +02:00
namespace BlubbFish.Utils.IoT.Sensor {
2017-09-26 21:44:41 +02:00
class Luminanz : ASensor {
2017-10-02 00:49:44 +02:00
public Luminanz(Dictionary<String, String> settings, String name, ADataBackend backend) : base(settings, name, backend) {
2017-09-26 21:44:41 +02:00
this.GetBool = true;
this.GetFloat = 0.0f;
this.GetInt = 0;
this.Datatypes = Types.Int;
}
2017-10-02 00:49:44 +02:00
protected override Boolean UpdateValue(MqttEventArgs e) {
this.GetInt = Int32.Parse(e.Message, new CultureInfo("en-US"));
return true;
2017-09-26 21:44:41 +02:00
}
}
}