Add new Class and throw on exeption
This commit is contained in:
parent
3a19253230
commit
c47895e6bb
@ -8,7 +8,7 @@ using LitJson;
|
||||
|
||||
namespace BlubbFish.IoT.Zway.Devices {
|
||||
public class Device {
|
||||
private Boolean polling;
|
||||
private readonly Boolean polling;
|
||||
|
||||
public delegate void UpdatedDevice(Object sender, DeviceUpdateEvent e);
|
||||
public event UpdatedDevice Update;
|
||||
|
@ -24,6 +24,7 @@ namespace BlubbFish.IoT.Zway.Interfaces {
|
||||
MeterPulse = 53,
|
||||
MeterTableMonitor = 61,
|
||||
ThermostatOperatingState = 66,
|
||||
ClimateControlSchedule = 70,
|
||||
CRC16 = 86,
|
||||
AssociationGroupInformation = 89,
|
||||
DeviceResetLocally = 90,
|
||||
|
@ -16,7 +16,7 @@ namespace BlubbFish.IoT.Zway {
|
||||
private Thread updatethread;
|
||||
private Thread pollthread;
|
||||
public static ReadOnlyDictionary<String, String> namelist;
|
||||
private Boolean polling;
|
||||
private readonly Boolean polling;
|
||||
|
||||
public delegate void DataUpdate(Object sender, DeviceUpdateEvent e);
|
||||
public event DataUpdate Update;
|
||||
|
Binary file not shown.
@ -6,9 +6,9 @@ using LitJson;
|
||||
|
||||
namespace BlubbFish.IoT.Zway.lib {
|
||||
public class HttpConnection {
|
||||
private String auth;
|
||||
private String server;
|
||||
private Object getLock = new Object();
|
||||
private readonly String auth;
|
||||
private readonly String server;
|
||||
private readonly Object getLock = new Object();
|
||||
|
||||
internal HttpConnection(String server, String user, String pass) {
|
||||
this.auth = "Basic " + Convert.ToBase64String(Encoding.ASCII.GetBytes(user + ":" + pass));
|
||||
@ -54,9 +54,9 @@ namespace BlubbFish.IoT.Zway.lib {
|
||||
}
|
||||
}
|
||||
} catch (Exception e) {
|
||||
Helper.WriteError("Konnte keine Verbindung zum Razzbery Server herstellen. Resource: \"" + this.server + v + "\" Fehler: " + e.Message);
|
||||
return null;
|
||||
//throw new Exceptions.ConnectionException("Konnte keine Verbindung zum Razzbery Server herstellen: " + e.Message);
|
||||
//Helper.WriteError("Konnte keine Verbindung zum Razzbery Server herstellen. Resource: \"" + this.server + v + "\" Fehler: " + e.Message);
|
||||
//return null;
|
||||
throw new Exceptions.ConnectionException("Konnte keine Verbindung zum Razzbery Server herstellen: " + e.Message);
|
||||
}
|
||||
}
|
||||
return ret;
|
||||
|
Loading…
Reference in New Issue
Block a user