From 2eba3404144081fd37fb468751adf485e8ce3644 Mon Sep 17 00:00:00 2001 From: pahnjy Date: Thu, 19 Jan 2017 18:52:32 +0900 Subject: [PATCH] =?UTF-8?q?Device=20=EC=83=81=ED=83=9C=20=EB=B3=80?= =?UTF-8?q?=EA=B2=BD=20#331?= 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 c9605a8b..46ede0ab 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 @@ -132,6 +132,10 @@ public String deviceExecute(String deviceId,String deviceCommand, String session * Device 제어 후 제어 결과가 Success면 Device Subscription 요청 */ if(resultMessage.getCode().equals(ClientProfile.RESPONSE_SUCCESS_ONEM2MCODE)) { + // 디바이스 상태 저장. + device.setDeviceStatus(deviceCommand); + deviceStore.update(device); + String subscriptionUri = device.getDeviceUri() + (ClientProfile.actionDeviceCommand(device.getDeviceUri()) ? ClientProfile.SI_CONTAINER_ACTION : ClientProfile.SI_CONTAINER_POWER) + ClientProfile.SI_CONTAINER_STATUS; String response = deviceSubscription(subscriptionUri, deviceControlMessage.get_commandId()); logger.debug(LogPrint.LogMethodNamePrint() + " | Device Subscription : " + " , Device Uri = " + device.getDeviceUri() + " , Result : " + response + " , Session ID = " + sessionId);