From 08047db28777c1343f6f93c238919de0f5020aa0 Mon Sep 17 00:00:00 2001 From: BlubbFish Date: Thu, 21 Dec 2017 22:59:55 +0000 Subject: [PATCH] [DW] Fixing some Json Topics --- Zway/Events/DeviceUpdateEvent.cs | 47 ++------------------------------ Zway/Interfaces/ACommandClass.cs | 6 ++-- Zway/Properties/AssemblyInfo.cs | 4 +-- Zway/Zway.csproj | 2 ++ 4 files changed, 10 insertions(+), 49 deletions(-) diff --git a/Zway/Events/DeviceUpdateEvent.cs b/Zway/Events/DeviceUpdateEvent.cs index a743e0e..0ad9158 100644 --- a/Zway/Events/DeviceUpdateEvent.cs +++ b/Zway/Events/DeviceUpdateEvent.cs @@ -10,55 +10,14 @@ namespace BlubbFish.IoT.Zway.Events { public DeviceUpdateEvent() { } - public DeviceUpdateEvent(Double value, DateTime time, Object parent) { - this.GetDouble = value; + public DeviceUpdateEvent(Object value, DateTime time, Object parent) { + this.GetValue = value; this.UpdateTime = time; this.Parent = parent; } - public DeviceUpdateEvent(Boolean value, DateTime time, Object parent) { - this.GetBoolean = value; - this.UpdateTime = time; - this.Parent = parent; - } - - public DeviceUpdateEvent(DateTime value, DateTime time, Object parent) { - this.GetDate = value; - this.UpdateTime = time; - this.Parent = parent; - } - - public DeviceUpdateEvent(Tuple value, DateTime time, Object parent) { - this.GetStringStringDoubleTuple = value; - this.UpdateTime = time; - this.Parent = parent; - } - public DeviceUpdateEvent(Tuple value, DateTime time, Object parent) { - this.GetStringStringDoubleDoubleDoubleDoubleBooleanTuple = value; - this.UpdateTime = time; - this.Parent = parent; - } - - public DeviceUpdateEvent(Tuple value, DateTime time, Object parent) { - this.GetIntegerTuple = value; - this.UpdateTime = time; - this.Parent = parent; - } - - public DeviceUpdateEvent(Tuple value, DateTime time, Object parent) { - this.GetLongIntegerTuple = value; - this.UpdateTime = time; - this.Parent = parent; - } - - public Double GetDouble { get; } - public DateTime GetDate { get; } - public Tuple GetStringStringDoubleTuple { get; } - public Tuple GetStringStringDoubleDoubleDoubleDoubleBooleanTuple { get; } - public Tuple GetLongIntegerTuple { get; } + public Object GetValue { get; } public DateTime UpdateTime { get; } public Object Parent { get; private set; } - public Boolean GetBoolean { get; } - public Tuple GetIntegerTuple { get; } } } \ No newline at end of file diff --git a/Zway/Interfaces/ACommandClass.cs b/Zway/Interfaces/ACommandClass.cs index 363da46..5071e5f 100644 --- a/Zway/Interfaces/ACommandClass.cs +++ b/Zway/Interfaces/ACommandClass.cs @@ -213,9 +213,9 @@ namespace BlubbFish.IoT.Zway.Interfaces { public String ToJson() { Dictionary json = this.ToDictionary(); - json.Add("date", this.LastUpdate.ToString()); - json.Add("name", this.Name); - json.Add("class", this.Commandclass.ToString()); + json.Add("LastUpdate", this.LastUpdate.ToString()); + json.Add("Name", this.Name); + json.Add("Commandclass", this.Commandclass.ToString()); return JsonMapper.ToJson(json); } diff --git a/Zway/Properties/AssemblyInfo.cs b/Zway/Properties/AssemblyInfo.cs index e206ba6..c395f52 100644 --- a/Zway/Properties/AssemblyInfo.cs +++ b/Zway/Properties/AssemblyInfo.cs @@ -32,5 +32,5 @@ using System.Runtime.InteropServices; // Sie können alle Werte angeben oder Standardwerte für die Build- und Revisionsnummern verwenden, // indem Sie "*" wie unten gezeigt eingeben: // [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("1.3.4.0")] -[assembly: AssemblyFileVersion("1.3.4.0")] +[assembly: AssemblyVersion("1.3.4.1")] +[assembly: AssemblyFileVersion("1.3.4.1")] diff --git a/Zway/Zway.csproj b/Zway/Zway.csproj index 380b95f..366008d 100644 --- a/Zway/Zway.csproj +++ b/Zway/Zway.csproj @@ -45,12 +45,14 @@ + +