projects
/
iot2.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Completing ZigbeeTest with doorlock test
[iot2.git]
/
benchmarks
/
other
/
ZigbeeTest
/
MotionSensor.java
diff --git
a/benchmarks/other/ZigbeeTest/MotionSensor.java
b/benchmarks/other/ZigbeeTest/MotionSensor.java
index 68dfe29d9def4914971e7842d4257a9c4415a0e5..5fe888ae7d4f8bc7b02597aabd2270d4380c4426 100644
(file)
--- a/
benchmarks/other/ZigbeeTest/MotionSensor.java
+++ b/
benchmarks/other/ZigbeeTest/MotionSensor.java
@@
-38,8
+38,6
@@
public class MotionSensor implements IoTZigbeeCallback, SmartthingsSensor {
private List < SmartthingsSensorCallback > callbackList = new CopyOnWriteArrayList < SmartthingsSensorCallback > ();
private List < SmartthingsSensorCallback > callbackList = new CopyOnWriteArrayList < SmartthingsSensorCallback > ();
- private int sensorId = 0;
-
@config private IoTSet<IoTDeviceAddress> devUdpAddress;
@config private IoTSet<IoTZigbeeAddress> devZigbeeAddress;
@config private IoTSet<IoTDeviceAddress> devUdpAddress;
@config private IoTSet<IoTZigbeeAddress> devZigbeeAddress;
@@
-82,9
+80,10
@@
public class MotionSensor implements IoTZigbeeCallback, SmartthingsSensor {
//made by changwoo
sleep(10);
//made by changwoo
sleep(10);
- System.out.println("Sending Management Permit Joining Request");
+
//
System.out.println("Sending Management Permit Joining Request");
for(int z=0; z<3; z++){
zigConnection.sendManagementPermitJoiningRequest(0x0001, 0x0036, 0x00);
for(int z=0; z<3; z++){
zigConnection.sendManagementPermitJoiningRequest(0x0001, 0x0036, 0x00);
+ System.out.println("Sending Management Permit Joining Request");
sleep(0);
}
sleep(0);
}
@@
-140,18
+139,6
@@
public class MotionSensor implements IoTZigbeeCallback, SmartthingsSensor {
}
}
}
}
- public void setId(int id) {
-
- sensorId = id;
-
- }
-
- public int getId() {
-
- return sensorId;
-
- }
-
public int getValue() {
int tmp = 0;
public int getValue() {
int tmp = 0;
@@
-216,7
+203,7
@@
public class MotionSensor implements IoTZigbeeCallback, SmartthingsSensor {
gettingLatestDataMutex.release();
try {
for (SmartthingsSensorCallback cb : callbackList) {
gettingLatestDataMutex.release();
try {
for (SmartthingsSensorCallback cb : callbackList) {
- cb.newReadingAvailable(this.get
Id(), this.get
Value(), this.isActiveValue());
+ cb.newReadingAvailable(this.getValue(), this.isActiveValue());
}
} catch (Exception e) {
e.printStackTrace();
}
} catch (Exception e) {
e.printStackTrace();