Refactor classes

This commit is contained in:
2018-08-23 15:25:12 +02:00
parent 3798d18844
commit 09d8b7781f
13 changed files with 392 additions and 384 deletions

View File

@@ -4,6 +4,8 @@ import de.fh_zwickau.informatik.sensor.IZWayApi;
import de.fh_zwickau.informatik.sensor.ZWayApiHttp;
import de.fh_zwickau.informatik.sensor.model.devices.Device;
import de.fh_zwickau.informatik.sensor.model.devices.DeviceList;
import support.ZWaySimpleCallback;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -21,15 +23,12 @@ public class Sensor {
public IZWayApi zwayApi;
private DeviceList allZWaveDevices;
private DeviceList devices;
private Integer nodeId;
public Sensor() {
this(null);
}
public Sensor (Integer nodeId) {
this.nodeId = nodeId;
// create an instance of the Z-Way library; all the params are mandatory (we are not going to use the remote service/id)
zwayApi = new ZWayApiHttp(ipAddress, 8083, "http", username, password, 0, false, new ZWaySimpleCallback());