import java.util.concurrent.CopyOnWriteArrayList;
import java.util.concurrent.Semaphore;
-// Checker annotations
-//import iotchecker.qual.*;
-import iotcode.annotation.*;
-
// IoT Packages
+import iotcode.annotation.*;
import iotruntime.slave.*;
import iotcode.interfaces.*;
import iotruntime.zigbee.*;
private AtomicBoolean didWriteAttrb = new AtomicBoolean(false);
private AtomicBoolean didMatchDscr = new AtomicBoolean(false);
private AtomicBoolean didBind = new AtomicBoolean(false);
- private AtomicBoolean didDoorLockConfigureReporting = new AtomicBoolean(false); //made by Jiawei
+ private AtomicBoolean didDoorLockConfigureReporting = new AtomicBoolean(false); // made by Jiawei
static Semaphore gettingLatestDataMutex = new Semaphore(1);
private List < SmartthingsSensorSmartCallback > callbackList = new CopyOnWriteArrayList < SmartthingsSensorSmartCallback > ();
//made by changwoo
sleep(10);
- // System.out.println("BroadcastingRouteRecordRequest ");
- // zigConnection.sendBroadcastingRouteRecordRequest(0x0001);
- // sleep(6);
-
System.out.println("Sending Management Permit Joining Request");
+ // TODO: Might/might not need to send this 3 times
// for(int z=0; z<3; z++){
zigConnection.sendManagementPermitJoiningRequest(0x0002, 0x0036, 0x00);
sleep(0);
}
}
- //made by changwoo
+ // made by Changwoo
private void sleep(int multipleTime){
if(multipleTime<=0){
multipleTime=1;
}
// made by Jiawei
- //public int getStatus() {
public int getValue() {
int tmp = 0;
public void newMessageAvailable(IoTZigbeeMessage _zm) {
- //made by yuting
+ // made by Yuting
if (_zm instanceof IoTZigbeeMessageZdoBindResponse) {
IoTZigbeeMessageZdoBindResponse message = (IoTZigbeeMessageZdoBindResponse)_zm;
if (message.getSucceeded()) {