From 418cdb25a106f2fa41361a2bb9d7167c1288c92e Mon Sep 17 00:00:00 2001 From: pahnjy Date: Fri, 9 Dec 2016 15:33:51 +0900 Subject: [PATCH] =?UTF-8?q?Device=20Subscription=EC=97=90=20=EB=94=B0?= =?UTF-8?q?=EB=A5=B8=20=EB=A1=9C=EC=A7=81=20=EB=B3=80=EA=B2=BD=20#291?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/pineone/icbms/so/device/logic/DeviceManagerLogic.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/so-device/src/main/java/com/pineone/icbms/so/device/logic/DeviceManagerLogic.java b/so-device/src/main/java/com/pineone/icbms/so/device/logic/DeviceManagerLogic.java index 1fc71d86..f77c0d35 100644 --- a/so-device/src/main/java/com/pineone/icbms/so/device/logic/DeviceManagerLogic.java +++ b/so-device/src/main/java/com/pineone/icbms/so/device/logic/DeviceManagerLogic.java @@ -219,16 +219,20 @@ public List searchDeviceList() { @Override public void deviceUpdate(DeviceStatusData deviceStatusData) { // + logger.debug(LogPrint.LogMethodNamePrint() + "Device Update Start!!! DeviceStatusData = " + deviceStatusData.toString()); if(!deviceStatusData.get_uri().isEmpty()){ String deviceUri = getOnem2mDeviceUri(deviceStatusData.get_uri()); Device device = deviceSearchById(deviceUri); DeviceSubscriptionObject deviceSubscriptionObject = deviceSubscriptionStore.retrieve(deviceStatusData.get_commandId()); if(deviceSubscriptionObject != null && deviceSubscriptionObject.get_commandId().equals(deviceStatusData.get_commandId()) && deviceSubscriptionObject.getDeviceStatus().equals(deviceStatusData.getCon())){ + logger.debug(LogPrint.LogMethodNamePrint() + "Device Data Update"); device.setDeviceStatus(deviceStatusData.getCon()); deviceStore.update(device); deviceSubscriptionRelease(deviceUri + (ClientProfile.actionDeviceCommand(device.getDeviceUri()) ? ClientProfile.SI_CONTAINER_ACTION : ClientProfile.SI_CONTAINER_POWER) + ClientProfile.SI_CONTAINER_STATUS); deviceSubscriptionStore.delete(deviceSubscriptionObject.get_id()); + } else { + logger.debug(LogPrint.LogMethodNamePrint() + "The state or command of the device is different."); } } }