[NF] v1.3.0.0 Remove Interface ICommandClass.cs and dublicated classes CommandClass.cs and CommandClassSub.cs, put them into the abstracted class ACommandClass.cs

[NF] v1.2.0.0 Change classid to enum, so its more readable
[NF] v1.1.0.0 Rename a lot of internal functions
This commit is contained in:
2017-12-17 20:05:03 +00:00
parent 1445a16930
commit d439471051
24 changed files with 439 additions and 316 deletions
+9 -3
View File
@@ -11,14 +11,14 @@ namespace BlubbFish.IoT.Zway.Devices.CommandClasses {
/// <summary>
/// 91 = CentralScene
/// </summary>
public class Centralscene : CommandClass {
public class Centralscene : ACommandClass {
public override event UpdatedValue Update;
public ReadOnlyDictionary<Int32, ReadOnlyCollection<Int32>> ValidScenesModes { get; private set; }
public Int32 Scene { get; private set; }
public Int32 Key { get; private set; }
public Centralscene(JsonData json, HttpConnection http, Tuple<Int32, Int32, Int32> id, Boolean polling) : base(json, http, id, polling) {
public Centralscene(JsonData json, Tuple<Int32, Int32, Classes> id, HttpConnection http, Boolean polling) : base(json, id, http, polling) {
this.ValidScenesModes = new ReadOnlyDictionary<Int32, ReadOnlyCollection<Int32>>(new Dictionary<Int32, ReadOnlyCollection<Int32>>());
this.InitComplex(json);
}
@@ -74,7 +74,13 @@ namespace BlubbFish.IoT.Zway.Devices.CommandClasses {
return "CentralScene " + this.Name + " [" + this.Id + "]: " + this.Scene+"-"+this.Key;
}
internal override void Poll() {
internal override void Poll() => this.PollNone();
public override Dictionary<String, Object> ToDictionary() {
return new Dictionary<String, Object> {
{ "scene", this.Scene.ToString() },
{ "key", this.Key.ToString() },
};
}
}
}