[DW] Fixing some Json Topics

This commit is contained in:
BlubbFish 2017-12-21 22:59:55 +00:00
parent f406b09ffa
commit 08047db287
4 changed files with 10 additions and 49 deletions

View File

@ -10,55 +10,14 @@ namespace BlubbFish.IoT.Zway.Events {
public DeviceUpdateEvent() { public DeviceUpdateEvent() {
} }
public DeviceUpdateEvent(Double value, DateTime time, Object parent) { public DeviceUpdateEvent(Object value, DateTime time, Object parent) {
this.GetDouble = value; this.GetValue = value;
this.UpdateTime = time; this.UpdateTime = time;
this.Parent = parent; this.Parent = parent;
} }
public DeviceUpdateEvent(Boolean value, DateTime time, Object parent) { public Object GetValue { get; }
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<String, String, Double> value, DateTime time, Object parent) {
this.GetStringStringDoubleTuple = value;
this.UpdateTime = time;
this.Parent = parent;
}
public DeviceUpdateEvent(Tuple<String, String, Double, Double, Double, Boolean> value, DateTime time, Object parent) {
this.GetStringStringDoubleDoubleDoubleDoubleBooleanTuple = value;
this.UpdateTime = time;
this.Parent = parent;
}
public DeviceUpdateEvent(Tuple<Int32, Int32> value, DateTime time, Object parent) {
this.GetIntegerTuple = value;
this.UpdateTime = time;
this.Parent = parent;
}
public DeviceUpdateEvent(Tuple<Int64, Int32> value, DateTime time, Object parent) {
this.GetLongIntegerTuple = value;
this.UpdateTime = time;
this.Parent = parent;
}
public Double GetDouble { get; }
public DateTime GetDate { get; }
public Tuple<String, String, Double> GetStringStringDoubleTuple { get; }
public Tuple<String, String, Double, Double, Double, Boolean> GetStringStringDoubleDoubleDoubleDoubleBooleanTuple { get; }
public Tuple<Int64, Int32> GetLongIntegerTuple { get; }
public DateTime UpdateTime { get; } public DateTime UpdateTime { get; }
public Object Parent { get; private set; } public Object Parent { get; private set; }
public Boolean GetBoolean { get; }
public Tuple<Int32,Int32> GetIntegerTuple { get; }
} }
} }

View File

@ -213,9 +213,9 @@ namespace BlubbFish.IoT.Zway.Interfaces {
public String ToJson() { public String ToJson() {
Dictionary<String, Object> json = this.ToDictionary(); Dictionary<String, Object> json = this.ToDictionary();
json.Add("date", this.LastUpdate.ToString()); json.Add("LastUpdate", this.LastUpdate.ToString());
json.Add("name", this.Name); json.Add("Name", this.Name);
json.Add("class", this.Commandclass.ToString()); json.Add("Commandclass", this.Commandclass.ToString());
return JsonMapper.ToJson(json); return JsonMapper.ToJson(json);
} }

View File

@ -32,5 +32,5 @@ using System.Runtime.InteropServices;
// Sie können alle Werte angeben oder Standardwerte für die Build- und Revisionsnummern verwenden, // Sie können alle Werte angeben oder Standardwerte für die Build- und Revisionsnummern verwenden,
// indem Sie "*" wie unten gezeigt eingeben: // indem Sie "*" wie unten gezeigt eingeben:
// [assembly: AssemblyVersion("1.0.*")] // [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.3.4.0")] [assembly: AssemblyVersion("1.3.4.1")]
[assembly: AssemblyFileVersion("1.3.4.0")] [assembly: AssemblyFileVersion("1.3.4.1")]

View File

@ -45,12 +45,14 @@
<ItemGroup> <ItemGroup>
<Compile Include="Devices\CommandClasses\Battery.cs" /> <Compile Include="Devices\CommandClasses\Battery.cs" />
<Compile Include="Devices\CommandClasses\CommandClassSubs\Configurationsub.cs" /> <Compile Include="Devices\CommandClasses\CommandClassSubs\Configurationsub.cs" />
<Compile Include="Devices\CommandClasses\CommandClassSubs\SensorBinarySub.cs" />
<Compile Include="Devices\CommandClasses\CommandClassSubs\ThermostatSetPointSub.cs" /> <Compile Include="Devices\CommandClasses\CommandClassSubs\ThermostatSetPointSub.cs" />
<Compile Include="Devices\CommandClasses\Configuration.cs" /> <Compile Include="Devices\CommandClasses\Configuration.cs" />
<Compile Include="Devices\CommandClasses\Indicator.cs" /> <Compile Include="Devices\CommandClasses\Indicator.cs" />
<Compile Include="Devices\CommandClasses\Meter.cs" /> <Compile Include="Devices\CommandClasses\Meter.cs" />
<Compile Include="Devices\CommandClasses\CommandClassSubs\MeterSub.cs" /> <Compile Include="Devices\CommandClasses\CommandClassSubs\MeterSub.cs" />
<Compile Include="Devices\CommandClasses\CommandClassSubs\SensorMultilevelSub.cs" /> <Compile Include="Devices\CommandClasses\CommandClassSubs\SensorMultilevelSub.cs" />
<Compile Include="Devices\CommandClasses\SensorBinary.cs" />
<Compile Include="Devices\CommandClasses\Wakeup.cs" /> <Compile Include="Devices\CommandClasses\Wakeup.cs" />
<Compile Include="Devices\Device.cs" /> <Compile Include="Devices\Device.cs" />
<Compile Include="Interfaces\ACommandClass.cs" /> <Compile Include="Interfaces\ACommandClass.cs" />