コード例 #1
0
 @Override
 public void registerDeviceStateListener(DeviceStatusListener listener) {
   if (listener != null) {
     this.listener = listener;
     listener.onDeviceAdded(this);
   }
 }
コード例 #2
0
 /**
  * if the device is added to ESH we save ever device state update to change it in ESH if the
  * device isn't added ESH we only save the current device state
  */
 private void addEshThingStateUpdate(DeviceStateUpdate deviceStateUpdate) {
   if (listener != null) {
     listener.onDeviceStateChanged(deviceStateUpdate);
   }
   /*
   if(isAddToESH){
   	System.out.println("Add deviceStatusUpdate command {} to eshThingUpdates" + deviceStateUpdate.getType());
   	this.eshThingStateUpdates.add(deviceStateUpdate);
   }else{
   	this.eshThingStateUpdates.clear();
   }
   */
 }