浏览代码

Merge remote-tracking branch 'origin/master'

DESKTOP-UNEGUH3\MadeinLab_SW_02 3 年之前
父节点
当前提交
80376cce1a
共有 22 个文件被更改,包括 341 次插入154 次删除
  1. 1 1
      ManagerSetting/src/main/AndroidManifest.xml
  2. 8 1
      ManagerSetting/src/main/java/com/artncore/managersetting/ui/fragments/SettingDetailFunctionFragment.java
  3. 二进制
      WallPadAPI/jar/WallPadAPI.jar
  4. 11 0
      WallPadAPI/src/main/java/com/artncore/WallPadDataMgr/wallpaddbmgr.java
  5. 1 1
      WallPadAddService/src/main/AndroidManifest.xml
  6. 14 9
      WallPadAddService/src/main/java/kr/co/icontrols/wallpadaddservice/screen/VIPElecCarMainScreen.java
  7. 1 1
      WallPadConfig/src/main/java/kr/co/icontrols/wallpadconfig/MainActivity.java
  8. 15 15
      WallPadConfig/src/main/java/kr/co/icontrols/wallpadconfig/screen/ConfigSettingMainScreen.java
  9. 1 1
      WallPadDevService/src/main/AndroidManifest.xml
  10. 1 1
      WallPadEmergency/src/main/AndroidManifest.xml
  11. 1 1
      WallPadEnergyCtrl/src/main/AndroidManifest.xml
  12. 8 9
      WallPadEnergyCtrl/src/main/java/kr/co/icontrols/wallpadenergyctrl/screen/VIPIcEnergyMgrScreen.java
  13. 二进制
      WallPadEnergyCtrl/src/main/res/drawable-ldpi/bg_graph_gray_3.png
  14. 1 1
      WallPadHomeCtrl/src/main/AndroidManifest.xml
  15. 72 23
      WallPadHomeCtrl/src/main/java/kr/co/icontrols/wallpadhomectrl/screen/screen_multi/HybridCookTopTestScreen.java
  16. 二进制
      WallPadMain/libs/WallPadAPI.jar
  17. 1 1
      WallPadMain/src/main/AndroidManifest.xml
  18. 9 7
      WallPadMain/src/main/java/kr/co/icontrols/wallpadmain/util/IconManager.java
  19. 3 1
      WallPadMultiControlService/src/main/AndroidManifest.xml
  20. 2 0
      WallPadMultiControlService/src/main/java/kr/co/icontrols/wallpadmulticontrolservice/Common.java
  21. 119 81
      WallPadMultiControlService/src/main/java/kr/co/icontrols/wallpadmulticontrolservice/DataSenderService.java
  22. 72 0
      WallPadMultiControlService/src/main/java/kr/co/icontrols/wallpadmulticontrolservice/control/CookTopControl.java

+ 1 - 1
ManagerSetting/src/main/AndroidManifest.xml

@@ -2,7 +2,7 @@
 <manifest xmlns:android="http://schemas.android.com/apk/res/android"
     package="com.artncore.managersetting"
     android:versionCode="23"
-    android:versionName="2021.12.08.01">
+    android:versionName="2022.01.24.01">
 
     <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
     <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />

+ 8 - 1
ManagerSetting/src/main/java/com/artncore/managersetting/ui/fragments/SettingDetailFunctionFragment.java

@@ -2897,7 +2897,14 @@ public class SettingDetailFunctionFragment extends Fragment
                         {
                             if(GetData[1].equals("12345678") == true)
                             {
-                                Toast.makeText(mActivity, "SiteCode (\"12345678\")가 이미 입력되어 있습니다.", Toast.LENGTH_LONG).show();
+                                //Toast.makeText(mActivity, "SiteCode (\"12345678\")가 이미 입력되어 있습니다.", Toast.LENGTH_LONG).show();
+                                devset.UpdateSettingData("site_code"
+                                        , "site_code"
+                                        , 0
+                                        , "12341234"
+                                );
+                                Toast.makeText(mActivity, "기존 SiteCode \""+GetData[1]+"\" 에서 \"12341234\"로 변경합니다.", Toast.LENGTH_LONG).show();
+                                MainApplication.getApplication().setReboot(); //16.05.31 남창우 과장 요청으로 인한 추가
                             }
                             else
                             {

二进制
WallPadAPI/jar/WallPadAPI.jar


+ 11 - 0
WallPadAPI/src/main/java/com/artncore/WallPadDataMgr/wallpaddbmgr.java

@@ -2630,6 +2630,17 @@ public class wallpaddbmgr {
             InsertinitWidgetData(10, define.ICONS.MENUS.ENERGY_ENERGYCONSUMPTION.getID());   // 에너지 사용량
             InsertinitWidgetData(11, define.ICONS.MENUS.SETTING_CONFIG.getID());
         }
+        else if(mModelType == Version.MODEL_TYPE.IHN_1010_I_LX2){
+            InsertinitWidgetData(0, define.ICONS.MENUS.TALK_NEIGHBOR.getID());
+            InsertinitWidgetData(1, define.ICONS.MENUS.TALK_FRONT.getID());
+            InsertinitWidgetData(2, define.ICONS.MENUS.TALK_CALLHISTORY.getID());
+            InsertinitWidgetData(3, define.ICONS.MENUS.TALK_VISITORPIC.getID());
+            InsertinitWidgetData(4, define.ICONS.MENUS.SETTING_CLREANSCREEN.getID());
+            InsertinitWidgetData(5, define.ICONS.MENUS.SETTING_CONFIG.getID());
+            InsertinitWidgetData(6, define.ICONS.MENUS.SETTING_PWCHANGE.getID());
+            InsertinitWidgetData(7, define.ICONS.MENUS.SETTING_CALENDAR.getID());
+            InsertinitWidgetData(8, define.ICONS.MENUS.ADD_WEATHER.getID());
+        }
         else if (mModelType == Version.MODEL_TYPE.IHN_HS101 || mModelType == Version.MODEL_TYPE.IHN_HS101_I) {
             InsertinitWidgetData(0, define.ICONS.MENUS.MAIN_CALRENDAR.getID());   // 달력/시계
             InsertinitWidgetData(1, define.ICONS.MENUS.MAIN_ELEVATOR.getID());   // 엘리베이터

+ 1 - 1
WallPadAddService/src/main/AndroidManifest.xml

@@ -1,7 +1,7 @@
 <manifest xmlns:android="http://schemas.android.com/apk/res/android"
     package="kr.co.icontrols.wallpadaddservice"
     android:versionCode="17"
-    android:versionName="2021.07.27.01">
+    android:versionName="2022.01.25.01">
 
     <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
     <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />

+ 14 - 9
WallPadAddService/src/main/java/kr/co/icontrols/wallpadaddservice/screen/VIPElecCarMainScreen.java

@@ -50,7 +50,7 @@ public class VIPElecCarMainScreen extends WpadScreen {
     WpadImageView BG;
     WpadImageView ELEC_CAR_1;
     WpadImageView ELEC_CAR_2;
-    WpadImageView ELEC_CHARGER[]  = new WpadImageView[2];
+    WpadImageView ELEC_CHARGER[] = new WpadImageView[2];
 
     public static int CurrentIndex = 0;
 
@@ -483,14 +483,19 @@ public class VIPElecCarMainScreen extends WpadScreen {
     }
 
     void MakeContent() {
-        if (m_SampleMode == Common.MODE_BUSINESS_SAMPLE) {
-            LoadSampleData_Page1();
-            MakeContentPage1_Image();
-            LoadSampleData_Page3();
-            MakeContentPage3_Image();
-        } else {
-            LoadDataFromServerCharging();
-            LoadDataFromServerCharger();
+        try {
+            if (m_SampleMode == Common.MODE_BUSINESS_SAMPLE) {
+                LoadSampleData_Page1();
+                MakeContentPage1_Image();
+                LoadSampleData_Page3();
+                MakeContentPage3_Image();
+            } else {
+                LoadDataFromServerCharging();
+                //Thread.sleep(10000);
+                LoadDataFromServerCharger();
+            }
+        } catch (Exception e) {
+            e.printStackTrace();
         }
     }
 

+ 1 - 1
WallPadConfig/src/main/java/kr/co/icontrols/wallpadconfig/MainActivity.java

@@ -344,7 +344,7 @@ public class MainActivity extends WpadActivity
         mChildList.add(API_Menu.SubMenuConfig.CleanLcd);
         mChildList.add(API_Menu.SubMenuConfig.PassWordChange);
         //mChildList.add(API_Menu.SubMenuConfig.SkinChange);
-        mChildList.add(API_Menu.SubMenuConfig.MorningCall);
+        //mChildList.add(API_Menu.SubMenuConfig.MorningCall);
         mChildList.add(API_Menu.SubMenuConfig.TimeSetting);
 
         Log.w(TAG, "[Create] DcamSetting = " + DcamSetting);

+ 15 - 15
WallPadConfig/src/main/java/kr/co/icontrols/wallpadconfig/screen/ConfigSettingMainScreen.java

@@ -368,9 +368,9 @@ public class ConfigSettingMainScreen extends WpadScreen {
 				SettingData.add(data);
 				setting_manual_str += "NOTI_SOUND:" + SettingData.size() + "/";
 
-				data = new SetKind(TYPE_CHECKBOX , ConfingSettingMainID.button.CAR_SOUND_CHECKBOX_USE , ConfingSettingMainID.button.CAR_SOUND_CHECKBOX_NOTUSE , TXT_CAR_SOUND);
-				SettingData.add(data);
-				setting_manual_str += "CAR_ARRIVAL_SND:" + SettingData.size() + "/";
+				//data = new SetKind(TYPE_CHECKBOX , ConfingSettingMainID.button.CAR_SOUND_CHECKBOX_USE , ConfingSettingMainID.button.CAR_SOUND_CHECKBOX_NOTUSE , TXT_CAR_SOUND);
+				//SettingData.add(data);
+				//setting_manual_str += "CAR_ARRIVAL_SND:" + SettingData.size() + "/";
 			}
 
 
@@ -422,15 +422,15 @@ public class ConfigSettingMainScreen extends WpadScreen {
 				//setting_manual_str += "AS_REGI:" + SettingData.size() + "/";
 
 				if (Version.getModelType() != Version.MODEL_TYPE.IHN_750 && !bRoomNameEditV2Usage && !isSubWallPad) {
-					data = new SetKind( TYPE_BUTTON , ConfingSettingMainID.button.NAME_SET , 0 , TXT_ROOM_NAME );
-					SettingData.add(data);
-					setting_manual_str += "ROOMNAME_SET:" + SettingData.size() + "/";
+					//data = new SetKind( TYPE_BUTTON , ConfingSettingMainID.button.NAME_SET , 0 , TXT_ROOM_NAME );
+					//SettingData.add(data);
+					//setting_manual_str += "ROOMNAME_SET:" + SettingData.size() + "/";
 				}
 
 				if (!internetUse && !isSubWallPad) {
-					//data = new SetKind(TYPE_CHECKBOX , ConfingSettingMainID.button.REMOTE_CONTROL_CHECKBOX_USE , ConfingSettingMainID.button.REMOTE_CONTROL_CHECKBOX_NOTUSE , TXT_RMOTE_CONTROL );
-					//SettingData.add(data);
-					//setting_manual_str += "REMOTE_CTR:" + SettingData.size() + "/";
+					data = new SetKind(TYPE_CHECKBOX , ConfingSettingMainID.button.REMOTE_CONTROL_CHECKBOX_USE , ConfingSettingMainID.button.REMOTE_CONTROL_CHECKBOX_NOTUSE , TXT_RMOTE_CONTROL );
+					SettingData.add(data);
+					setting_manual_str += "REMOTE_CTR:" + SettingData.size() + "/";
 
 					if (mNewDanjiServer) {
 						//data = new SetKind( TYPE_BUTTON_WEBPWD , ConfingSettingMainID.button.WEB_CTR_PWD , 0 , TXT_WEB_CTR_PWD );
@@ -449,9 +449,9 @@ public class ConfigSettingMainScreen extends WpadScreen {
 				}
 
 				if (!internetUse && !isSubWallPad) {
-					//data = new SetKind(TYPE_CHECKBOX, ConfingSettingMainID.button.REMOTE_CONTROL_CHECKBOX_USE, ConfingSettingMainID.button.REMOTE_CONTROL_CHECKBOX_NOTUSE, TXT_RMOTE_CONTROL);
-					//SettingData.add(data);
-					//setting_manual_str += "REMOTE_CTR:" + SettingData.size() + "/";
+					data = new SetKind(TYPE_CHECKBOX, ConfingSettingMainID.button.REMOTE_CONTROL_CHECKBOX_USE, ConfingSettingMainID.button.REMOTE_CONTROL_CHECKBOX_NOTUSE, TXT_RMOTE_CONTROL);
+					SettingData.add(data);
+					setting_manual_str += "REMOTE_CTR:" + SettingData.size() + "/";
 
 					//data = new SetKind(TYPE_BUTTON_WEBPWD, ConfingSettingMainID.button.WEB_CTR_PWD, 0, TXT_WEB_CTR_PWD);
 					//SettingData.add(data);
@@ -1217,9 +1217,9 @@ public class ConfigSettingMainScreen extends WpadScreen {
 
 				SetKind data;
 				if (Version.getModelType() != Version.MODEL_TYPE.IHN_750 && bRoomNameEditV2Usage && !isSubWallPad) {
-					data = new SetKind( TYPE_BUTTON , ConfingSettingMainID.button.NAME_SET , 0 , TXT_ROOM_NAME );
-					SettingData.add(data);
-					setting_manual_str += "ROOMNAME_SET:" + SettingData.size() + "/";
+					//data = new SetKind( TYPE_BUTTON , ConfingSettingMainID.button.NAME_SET , 0 , TXT_ROOM_NAME );
+					//SettingData.add(data);
+					//setting_manual_str += "ROOMNAME_SET:" + SettingData.size() + "/";
 				}
 
 				/** JEFF, 2020.01.01

+ 1 - 1
WallPadDevService/src/main/AndroidManifest.xml

@@ -1,7 +1,7 @@
 <manifest xmlns:android="http://schemas.android.com/apk/res/android"
     package="com.artncore.deviceservice"
     android:versionCode="1"
-    android:versionName="2021.08.11.01">
+    android:versionName="2022.01.20.01">
 
     <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
     <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"/>

+ 1 - 1
WallPadEmergency/src/main/AndroidManifest.xml

@@ -1,7 +1,7 @@
 <manifest xmlns:android="http://schemas.android.com/apk/res/android"
     package="kr.co.icontrols.wallpademergency"
     android:versionCode="01"
-    android:versionName="2021.07.27.01">
+    android:versionName="2022.01.25.01">
 
     <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
     <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />

+ 1 - 1
WallPadEnergyCtrl/src/main/AndroidManifest.xml

@@ -1,7 +1,7 @@
 <manifest xmlns:android="http://schemas.android.com/apk/res/android"
     package="kr.co.icontrols.wallpadenergyctrl"
     android:versionCode="01"
-    android:versionName="2021.07.27.01">
+    android:versionName="2022.01.25.01">
 
     <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
     <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />

+ 8 - 9
WallPadEnergyCtrl/src/main/java/kr/co/icontrols/wallpadenergyctrl/screen/VIPIcEnergyMgrScreen.java

@@ -356,7 +356,7 @@ public class VIPIcEnergyMgrScreen extends WpadScreen {
         ViewRegistration(layout, Background, Common.ImgPosion.GetX(0), Common.ImgPosion.GetY(110));
 
         //계기판 배경
-        CircleGraph = new WpadImageView(context, TOUCH_KIND.NONE, 340, 170, CircleGraph_bg[0], 0, ID.IcEnergyMgrID.image.MOMENT_GRAPH);
+        CircleGraph = new WpadImageView(context, TOUCH_KIND.NONE, 340, 170, R.drawable.bg_graph_gray_3, 0, ID.IcEnergyMgrID.image.MOMENT_GRAPH);
         ViewRegistration(layout, CircleGraph, Common.ImgPosion.GetX(300), Common.ImgPosion.GetY(190));
 
         drawgraph[0] = new DrawGraph(getContext(), 0);
@@ -514,8 +514,6 @@ public class VIPIcEnergyMgrScreen extends WpadScreen {
             }
         }
 
-        
-
         Log.d(TAG, "[End - Screen] -------------------------------------------- ");
     }
 
@@ -1271,7 +1269,7 @@ public class VIPIcEnergyMgrScreen extends WpadScreen {
                         break;
 
                     case ID.IcEnergyMgrID.button.SOLAR:
-                        CircleGraph.setImageResource(CircleGraph_bg[1]);
+                        CircleGraph.setImageResource(CircleGraph_bg[0]);
                         NowShowEnergyKind = ID.IcEnergyMgrID.DataKind.SOLAR;
 
                         if (RealtimeMeterUse == false) {
@@ -1484,6 +1482,7 @@ public class VIPIcEnergyMgrScreen extends WpadScreen {
 
                     case ID.IcEnergyMgrID.DataKind.SOLAR:
                         Draw_TextValueWrite(ID.IcEnergyMgrID.DataKind.SOLAR, arrayListDayEnergyData.get(arrayListDayEnergyData.size()-1).getSolar_used());
+                        CircleGraph.setImageResource(CircleGraph_bg[0]);
                         break;
 
                     case ID.IcEnergyMgrID.DataKind.FUEL:
@@ -1578,7 +1577,7 @@ public class VIPIcEnergyMgrScreen extends WpadScreen {
 
 
     /**
-     * 실시간 사용량 계기판 그리는 함수
+     * 실시간 생산량 계기판 그리는 함수
      **/
     public void ReDraw() {
         if (EnergyMax_Double <= RealTimeData_Double) {
@@ -1593,7 +1592,7 @@ public class VIPIcEnergyMgrScreen extends WpadScreen {
     }
 
     /**
-     * 실시간 사용량 계기판 그리는 클래스
+     * 실시간 생산량 계기판 그리는 클래스
      **/
     public class DrawGraph extends View {
         private float Degree;
@@ -1896,8 +1895,8 @@ public class VIPIcEnergyMgrScreen extends WpadScreen {
                     }
                     break;
 
-                case 7://태양광
-                    mLinePaint.setColor(Color.parseColor("#6c44a3"));
+                case 7://연료전지
+                    mLinePaint.setColor(Color.parseColor("#3588d5"));
                     if (EnergyCount == 6) {
                         Y_Coordinate = (71 * 3);
                     } else if (EnergyCount == 3) {
@@ -1932,7 +1931,7 @@ public class VIPIcEnergyMgrScreen extends WpadScreen {
                     break;
 
                 case 9://연료전지
-                    mLinePaint.setColor(Color.parseColor("#a55f7f"));
+                    mLinePaint.setColor(Color.parseColor("#99d300"));
 
                     if (EnergyCount == 5) {
                         Y_Coordinate = (86 * 4);

二进制
WallPadEnergyCtrl/src/main/res/drawable-ldpi/bg_graph_gray_3.png


+ 1 - 1
WallPadHomeCtrl/src/main/AndroidManifest.xml

@@ -1,7 +1,7 @@
 <manifest xmlns:android="http://schemas.android.com/apk/res/android"
     package="kr.co.icontrols.wallpadhomectrl"
     android:versionCode="17"
-    android:versionName="2021.08.11.01">
+    android:versionName="2022.01.19.01">
 
     <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
     <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />

+ 72 - 23
WallPadHomeCtrl/src/main/java/kr/co/icontrols/wallpadhomectrl/screen/screen_multi/HybridCookTopTestScreen.java

@@ -26,6 +26,9 @@ import org.json.JSONArray;
 import org.json.JSONException;
 import org.json.JSONObject;
 
+import java.util.Timer;
+import java.util.TimerTask;
+
 import kr.co.icontrols.wallpadhomectrl.MainActivity;
 import kr.co.icontrols.wallpadhomectrl.R;
 import kr.co.icontrols.wallpadhomectrl.data.AirconArrayData;
@@ -275,7 +278,7 @@ public class HybridCookTopTestScreen extends WpadScreen {
     /**
      * 전체방의 구조를 정의한다.
      */
-    private HybridCookTopTestScreen.RoomView[] roomView = null;
+    private RoomView[] roomView = null;
 
 
     // [Variables]
@@ -339,7 +342,7 @@ public class HybridCookTopTestScreen extends WpadScreen {
             cookTopData = gson.fromJson(jsonObject.toString(), CookTopData.class);
             JSONArray jsonArray = jsonObject.getJSONArray("data_array");
             int nCircuitCount = jsonArray.length();
-            mData.DeviceCnt = (byte) nCircuitCount;
+            mData.DeviceCnt = (byte) cookTopData.getDevice_count();
             DataClasses.CooktopCtrl device = new DataClasses.CooktopCtrl();
             DataClasses.CooktopCtrl.Circuit[] circuit = new DataClasses.CooktopCtrl.Circuit[nCircuitCount];
 
@@ -394,19 +397,18 @@ public class HybridCookTopTestScreen extends WpadScreen {
                 TXT_PAGE_NO = new WpadTextView(getContext(), false, 264, 110, Gravity.CENTER, Color.WHITE, mPageFontSize[UX_MODE], false, ID.HybridCookTopmain.text.PAGE_TEXT);
                 ViewRegistration(getLayout(), TXT_PAGE_NO, Common.ImgPosion.GetX(372), Common.ImgPosion.GetY(670));
                 TXT_PAGE_NO.setText(nCurrentPageNo + "/" + nTotalPageNo);
-            }
 
-
-            if((mData.DeviceCnt > 0) && (mData.DeviceCnt <= 15)) {
-                if(mData.DeviceCnt > 0)
-                {
-                    roomView = new HybridCookTopTestScreen.RoomView[mData.Device[MainDeviceID].circuit.length];
-                    astrRoomTitle = new String[mData.Device[MainDeviceID].circuit.length];
+                if((mData.DeviceCnt > 0) && (mData.DeviceCnt <= 15)) {
+                    if(mData.DeviceCnt > 0)
+                    {
+                        roomView = new RoomView[mData.Device[MainDeviceID].circuit.length];
+                        astrRoomTitle = new String[mData.Device[MainDeviceID].circuit.length];
+                    }
                 }
-            }
 
-            nCurrentPageNo = 1;
-            drawCurrentPage(mData, (nCurrentPageNo - 1) * ROOM_CNT);
+                nCurrentPageNo = 1;
+                drawCurrentPage(mData, (nCurrentPageNo - 1) * ROOM_CNT);
+            }
 
             //     6.3. update
             try {
@@ -431,14 +433,21 @@ public class HybridCookTopTestScreen extends WpadScreen {
         }
     }
 
-    private void requestMultiCommand(int kind, int reason, int position, String category, int number, int state){
-        ((MainActivity) mContext).requestMultiControl(handler, Common.JSON.MENU.GAS, kind, reason, position, category, number, state);
+    private void requestMultiControl(int kind, int reason, int position, String category, int number, int state){
+        resetTimer();
+        ((MainActivity) mContext).requestMultiControl(handler, Common.JSON.MENU.COOKTOP, kind, reason, position, category, number, state);
+    }
+
+    private void requestMultiStatus(int kind, int reason, int position){
+        ((MainActivity) mContext).requestMultiStatus(handler, Common.JSON.MENU.COOKTOP, kind, reason, position);
     }
 
     private void updateData() {
         try {
+            //가스 전체 상태 조회. 조회한 다음 data에 대입해준다.
+            requestMultiStatus(Common.JSON.KIND.All, Common.JSON.REASON.Status, Common.JSON.POSITION.All);
             //가스 전체 상태 조회. 조회해서 data에 대입해준다.
-            requestMultiCommand(Common.JSON.KIND.All, Common.JSON.REASON.Status,0, "",0,0);
+            //requestMultiCommand(Common.JSON.KIND.All, Common.JSON.REASON.Status,0, "",0,0);
         } catch (RuntimeException re) {
             LogUtil.errorLogInfo("", TAG, re);
         }
@@ -464,7 +473,8 @@ public class HybridCookTopTestScreen extends WpadScreen {
                         ResultData resultData = gson.fromJson(jsonObject.toString(), ResultData.class);
                         if(resultData.getType().equals("controlResponse")&&resultData.getResult().equals("ok")) {
                             //제어 명령을 내리고 제대로 응답이 오면 상태를 다시 조회해서 UI 갱신하도록 한다.
-                            updateData();
+                            Sound().Play(WpadSound.SND.effect.TOUCH_LATCHED);
+                            startRefreshTimer(1000);
                         }
                         else if(resultData.getType().equals("updateResponse")) {
                             //상태 조회 응답이 오면, data를 갱신한다.
@@ -524,7 +534,37 @@ public class HybridCookTopTestScreen extends WpadScreen {
         //Sample_DataDefaultSetting();
         Log.e(TAG, "OPERATION_MODE : " + OPERATION_MODE + " Out of range !!!");
 
-        updateData();
+        timer = new Timer();
+        startRefreshTimer(500);
+        //updateData();
+    }
+
+    Timer timer;
+    TimerTask TT;
+
+    private void resetTimer(){
+        try {
+            if (TT != null) {
+                TT.cancel();
+                TT = null;
+            }
+            if (timer != null)
+                timer.purge();
+        }catch (Exception e){}
+    }
+
+    private void startRefreshTimer(int delay){
+        try {
+            resetTimer();
+            TT = new TimerTask() {
+                @Override
+                public void run() {
+                    // 반복실행할 구문
+                    updateData();
+                }
+            };
+            timer.schedule(TT, delay, 25000); //Timer 실행
+        }catch (Exception e){}
     }
 
     // =================================================================================================
@@ -566,6 +606,12 @@ public class HybridCookTopTestScreen extends WpadScreen {
     protected void onClose() {
         super.onClose();
 
+        try {
+            resetTimer();
+            if (timer != null)
+                timer.cancel();
+        }catch (Exception e){}
+
         Log.i(TAG, "[END   - Screen] ********************************************");
     }
 
@@ -591,9 +637,11 @@ public class HybridCookTopTestScreen extends WpadScreen {
 
                 if(OPERATION_MODE == Common.MODE_NOMAL)
                 {
-                    int ret = AllDeviceClose();
-                    if(ret >= 0) Sound().Play(WpadSound.SND.effect.TOUCH_LATCHED);
-                    else Sound().Play(WpadSound.SND.effect.TOUCH_UNLATCHED);
+                    requestMultiControl(Common.JSON.KIND.All, Common.JSON.REASON.Control, Common.JSON.POSITION.All, "all_device_close", 0, 0);
+
+                    //int ret = AllDeviceClose();
+                    //if(ret >= 0) Sound().Play(WpadSound.SND.effect.TOUCH_LATCHED);
+                    //else Sound().Play(WpadSound.SND.effect.TOUCH_UNLATCHED);
                 }
             }
             else if ((TargetId >= ID.HybridCookTopmain.button.ROOM_ONOFF_1) && (TargetId <= ID.HybridCookTopmain.button.ROOM_ONOFF_15)) {
@@ -612,8 +660,10 @@ public class HybridCookTopTestScreen extends WpadScreen {
                     //임의로 모드 변경
                     if(mData.Device[MainDeviceID].circuit[index].hStatus == DataClasses.CooktopCtrl.DEVICE_STATUS.OPEN)
                     {
-                        ctrlDeviceMode((byte)(mData.Device[MainDeviceID].circuit[index].hID));
-                        Sound().Play(WpadSound.SND.effect.TOUCH_LATCHED);
+                        requestMultiControl(Common.JSON.KIND.Individual, Common.JSON.REASON.Control, index, "close", 0, 0);
+
+                        //ctrlDeviceMode((byte)(mData.Device[MainDeviceID].circuit[index].hID));
+                        //Sound().Play(WpadSound.SND.effect.TOUCH_LATCHED);
                     }
                 }
             }
@@ -747,7 +797,6 @@ public class HybridCookTopTestScreen extends WpadScreen {
 
     private void drawCurrentPage(Data info, int startIdx) {
         try {
-            Log.d(TAG, "[drawCurrentPage] startIdx [" + startIdx + "], CurrentPageNum [" + nCurrentPageNo + "], ROOM_CNT [" + ROOM_CNT + "], roomView.length [" + roomView.length + "]");
             if (info.DeviceCnt <= ROOM_CNT) {
                 BTN_PAGE_UP.setVisibility(View.INVISIBLE);
                 BTN_PAGE_DOWN.setVisibility(View.INVISIBLE);

二进制
WallPadMain/libs/WallPadAPI.jar


+ 1 - 1
WallPadMain/src/main/AndroidManifest.xml

@@ -1,7 +1,7 @@
 <manifest xmlns:android="http://schemas.android.com/apk/res/android"
     package="kr.co.icontrols.wallpadmain"
     android:versionCode="17"
-    android:versionName="2022.01.12.01">
+    android:versionName="2022.01.24.01">
     <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
     <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
     <uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW"/>

+ 9 - 7
WallPadMain/src/main/java/kr/co/icontrols/wallpadmain/util/IconManager.java

@@ -51,7 +51,8 @@ public class IconManager {
     // 부가기능
     int nNoticeEnable = WallpadDeviceSet.DEV_DATA_DISABLE;   // 공지사항
     int nEframeEnable = WallpadDeviceSet.DEV_DATA_DISABLE;   // 전자액자
-    int nMemoEnable = WallpadDeviceSet.DEV_DATA_DISABLE;   // 전자액자
+    int nMemoEnable = WallpadDeviceSet.DEV_DATA_DISABLE;   // 메모
+    int nScheduleEnable = WallpadDeviceSet.DEV_DATA_DISABLE;   // 메모
     int nParkingLocationEnable = WallpadDeviceSet.DEV_DATA_DISABLE;   // 주차위치
     int nCCTVMonitoringEnable = WallpadDeviceSet.DEV_DATA_DISABLE;   // CCTV 모니터링
     int nElecVehicleChargingEnable = WallpadDeviceSet.DEV_DATA_DISABLE;   // 전기차 충전
@@ -190,7 +191,8 @@ public class IconManager {
             // 부가기능
             nNoticeEnable = mWallpadDeviceSet.GetDeviceSetted("공지사항");   // 공지사항
             nEframeEnable = mWallpadDeviceSet.GetDeviceSetted("전자액자");   // 전자액자
-            nMemoEnable = mWallpadDeviceSet.GetDeviceSetted("메모");   // 전자액자
+            nMemoEnable = mWallpadDeviceSet.GetDeviceSetted("메모");   // 메모
+            nScheduleEnable = mWallpadDeviceSet.GetDeviceSetted("일정표");   // 메모
             nParkingLocationEnable = mWallpadDeviceSet.GetDeviceSetted("주차확인");   // 주차위치
             nCCTVMonitoringEnable = mWallpadDeviceSet.GetDeviceSetted("CCTV");   // CCTV
             nElecVehicleChargingEnable = mWallpadDeviceSet.GetDeviceSetted("전기차충전");   // 전기차 충전
@@ -471,7 +473,7 @@ public class IconManager {
             }
 
             // 일정표
-            if (!bNonInternetSupportEnable) {
+            if (nScheduleEnable == WallpadDeviceSet.DEV_DATA_ENABLE) {
                 mIconInfoTable.addIconInfo(ID.ICONS.MENUS.ADD_SCHEDULE.getID(), ID.ICONS.MENUS.ADD_SCHEDULE.getNameKR(), ID.LINKEDSCREEN.SubMenuAddService.Schedule,
                         R.drawable.icon_add_schedule_normal, R.drawable.icon_add_schedule_pressed, R.drawable.icon_add_schedule_pressed, R.drawable.icon_add_schedule_pressed);
             }
@@ -617,8 +619,8 @@ public class IconManager {
                     R.drawable.icon_setting_pw_normal, R.drawable.icon_setting_pw_pressed, R.drawable.icon_setting_pw_pressed, R.drawable.icon_setting_pw_pressed);
 
             // 모닝콜
-            mIconInfoTable.addIconInfo(ID.ICONS.MENUS.SETTING_MORNINGCALL.getID(), ID.ICONS.MENUS.SETTING_MORNINGCALL.getNameKR(), ID.LINKEDSCREEN.SubMenuConfig.MoningCall,
-                    R.drawable.icon_setting_morningcall_normal, R.drawable.icon_setting_morningcall_pressed, R.drawable.icon_setting_morningcall_pressed, R.drawable.icon_setting_morningcall_pressed);
+            //mIconInfoTable.addIconInfo(ID.ICONS.MENUS.SETTING_MORNINGCALL.getID(), ID.ICONS.MENUS.SETTING_MORNINGCALL.getNameKR(), ID.LINKEDSCREEN.SubMenuConfig.MoningCall,
+            //        R.drawable.icon_setting_morningcall_normal, R.drawable.icon_setting_morningcall_pressed, R.drawable.icon_setting_morningcall_pressed, R.drawable.icon_setting_morningcall_pressed);
 
             // 출입키
             if (naFrontCamInfoEnable != null && naFrontCamInfoEnable[0] == WallpadDeviceSet.DO_USE) {
@@ -1481,8 +1483,8 @@ public class IconManager {
                     R.drawable.icon_setting_pw_normal, R.drawable.icon_setting_pw_pressed, R.drawable.icon_setting_pw_pressed, R.drawable.icon_setting_pw_pressed);
 
             // 모닝콜
-            mIconInfoTable.addIconInfo(ID.ICONS.MENUS.SETTING_MORNINGCALL.getID(), ID.ICONS.MENUS.SETTING_MORNINGCALL.getNameKR(), ID.LINKEDSCREEN.SubMenuConfig.MoningCall,
-                    R.drawable.icon_setting_morningcall_normal, R.drawable.icon_setting_morningcall_pressed, R.drawable.icon_setting_morningcall_pressed, R.drawable.icon_setting_morningcall_pressed);
+            //mIconInfoTable.addIconInfo(ID.ICONS.MENUS.SETTING_MORNINGCALL.getID(), ID.ICONS.MENUS.SETTING_MORNINGCALL.getNameKR(), ID.LINKEDSCREEN.SubMenuConfig.MoningCall,
+            //        R.drawable.icon_setting_morningcall_normal, R.drawable.icon_setting_morningcall_pressed, R.drawable.icon_setting_morningcall_pressed, R.drawable.icon_setting_morningcall_pressed);
 
             // 시간설정
             mIconInfoTable.addIconInfo(ID.ICONS.MENUS.SETTING_CALENDAR.getID(), ID.ICONS.MENUS.SETTING_CALENDAR.getNameKR(), ID.LINKEDSCREEN.SubMenuConfig.TimeSetting,

+ 3 - 1
WallPadMultiControlService/src/main/AndroidManifest.xml

@@ -1,6 +1,8 @@
 <?xml version="1.0" encoding="utf-8"?>
 <manifest xmlns:android="http://schemas.android.com/apk/res/android"
-    package="kr.co.icontrols.wallpadmulticontrolservice">
+    package="kr.co.icontrols.wallpadmulticontrolservice"
+    android:versionCode="17"
+    android:versionName="2022.01.24.01">
 
     <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
     <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />

+ 2 - 0
WallPadMultiControlService/src/main/java/kr/co/icontrols/wallpadmulticontrolservice/Common.java

@@ -6,6 +6,8 @@ public final class Common
 {
     public final static boolean DEBUG_LOG_ON = true;
 
+    public final static byte     INDEX_ALL = (byte)0xFF;           // 인덱스 전체 지정
+
     // Operation mode
     public final static int     MODE_NOMAL = 0;                 // 노말
     public final static int     MODE_BUSINESS_SAMPLE = 1;       // 영업샘플

+ 119 - 81
WallPadMultiControlService/src/main/java/kr/co/icontrols/wallpadmulticontrolservice/DataSenderService.java

@@ -51,6 +51,7 @@ import java.util.ArrayList;
 import java.util.Random;
 
 import kr.co.icontrols.wallpadmulticontrolservice.control.AirconControl;
+import kr.co.icontrols.wallpadmulticontrolservice.control.CookTopControl;
 import kr.co.icontrols.wallpadmulticontrolservice.control.HeatingControl;
 import kr.co.icontrols.wallpadmulticontrolservice.control.KnxAirconControl;
 import kr.co.icontrols.wallpadmulticontrolservice.control.LightControl;
@@ -63,10 +64,13 @@ import kr.co.icontrols.wallpadsupport.WpadSound;
 
 public class DataSenderService extends Service {
     String TAG = this.getClass().getSimpleName();
+
     private void DebugLogOutput(String s) {
         if (Common.DEBUG_LOG_ON) Log.d(TAG, s);
     }
+
     protected Context mContext = null;
+
     public Context getContext() {
         return mContext;
     }
@@ -93,6 +97,7 @@ public class DataSenderService extends Service {
         //public final static String BR_ENERGY_METER = BR_ACTION_BASE + "ENERGY_METER_HDC" + "(" + BASE + ")";
         public final static String BR_BATCH_LIGHT = BR_ACTION_BASE + "BATCH_LIGHT_HDC" + "(" + BASE + ")";
         public final static String BR_GAS = BR_ACTION_BASE + "GAS_HDC" + "(" + BASE + ")";
+        public final static String BR_COOKTOP = BR_ACTION_BASE + "COOKTOP_HDC" + "(" + BASE + ")";
         public final static String BR_VENTIL = BR_ACTION_BASE + "VENTIL_HDC" + "(" + BASE + ")";
         public final static String BR_HEATING = BR_ACTION_BASE + "HEATING_HDC" + "(" + BASE + ")";
         public final static String BR_AIRCON = BR_ACTION_BASE + "AIRCON_HDC" + "(" + BASE + ")";
@@ -107,6 +112,7 @@ public class DataSenderService extends Service {
     // 가스
     private GasAPI mGasAPI = null;
     private CooktopAPI mCooktopAPI;       // 쿡탑 API
+    private CookTopControl mCookTopControl;
     private CooktopAPI.Data mCookTopData = null;
     private int nGasCnt = 1;
     //최대 3대
@@ -116,6 +122,7 @@ public class DataSenderService extends Service {
     private VentiAPI mVentiAPI = null;
     private VentiControl mVentiControl;
     public Ventilation mVentilation = new Ventilation();
+
     public static class Ventilation {
         /**
          * ON/OFF 상태
@@ -333,8 +340,7 @@ public class DataSenderService extends Service {
                         outputStream.writeObject(json);
                         outputStream.close();
                         Log.d("ServerThread", "result 보냄 : " + result);
-                    }
-                    else if (data != null && !data.trim().equals("") && basicData.getType().equalsIgnoreCase("request") && basicData.getReason() == JSON.REASON.Status) {
+                    } else if (data != null && !data.trim().equals("") && basicData.getType().equalsIgnoreCase("request") && basicData.getReason() == JSON.REASON.Status) {
                         try {
                             JSONObject result = updateRequest(basicData.getMenu(), basicData.getKind(), basicData.getPosition());
                             Random rand = new Random();
@@ -468,8 +474,7 @@ public class DataSenderService extends Service {
                             outputStream.close();
                             e.printStackTrace();
                         }
-                    }
-                    else if (data != null && !data.trim().equals("") && basicData.getType().equalsIgnoreCase("request") && basicData.getMenu() == JSON.MENU.PASSWORD) {
+                    } else if (data != null && !data.trim().equals("") && basicData.getType().equalsIgnoreCase("request") && basicData.getMenu() == JSON.MENU.PASSWORD) {
                         //비밀번호 변경 요청
                         int result = passwordChangeRequest(basicData.getNumber());
                         String json = "";
@@ -497,8 +502,7 @@ public class DataSenderService extends Service {
                         outputStream.writeObject(json);
                         outputStream.close();
                         Log.d("ServerThread", "result 보냄 : " + result);
-                    }
-                    else if (data != null && !data.trim().equals("") && basicData.getType().equalsIgnoreCase("request") && basicData.getMenu() == JSON.MENU.MOBILE) {
+                    } else if (data != null && !data.trim().equals("") && basicData.getType().equalsIgnoreCase("request") && basicData.getMenu() == JSON.MENU.MOBILE) {
                         //모바일 등록 관련
                         int result = updateMobile(basicData.getReason(), basicData.getName(), basicData.getId());
                         String json = "";
@@ -526,14 +530,13 @@ public class DataSenderService extends Service {
                         outputStream.writeObject(json);
                         outputStream.close();
                         Log.d("ServerThread", "result 보냄 : " + result);
-                    }
-                    else if (data != null && !data.trim().equals("") && basicData.getType().equalsIgnoreCase("request") && basicData.getMenu() == JSON.MENU.DEVICE_INFO) {
+                    } else if (data != null && !data.trim().equals("") && basicData.getType().equalsIgnoreCase("request") && basicData.getMenu() == JSON.MENU.DEVICE_INFO) {
                         //제어 디바이스 목록 가져오기
                         String result = getDeviceInfo(basicData.getPosition());
                         outputStream.writeObject(result);
                         outputStream.close();
                         Log.d("ServerThread", "result 보냄 : " + result);
-                    } else{
+                    } else {
                         outputStream.close();
                     }
                     inputStream.close();
@@ -1110,7 +1113,8 @@ public class DataSenderService extends Service {
             int state = reqData.getState();
             if (category.equalsIgnoreCase("all_execution_release")) {
                 result = mLightControl.Device_All_Excecution_Release(state == 1 ? true : false);
-            } else if (category.equalsIgnoreCase("set_light_dimming")) {
+            }
+            else if (category.equalsIgnoreCase("set_light_dimming")) {
                 result = mLightControl.SetLightDimming((byte) state);
             }
         } else if (kind == 1) {
@@ -1120,13 +1124,17 @@ public class DataSenderService extends Service {
             if (category.equalsIgnoreCase("switch_liv")) {
                 boolean onoff = state == 0 ? true : false;
                 result = mLightControl.SetLivingLightOnOff(onoff);
-            } else if (category.equalsIgnoreCase("switch_bed")) {
+            }
+            else if (category.equalsIgnoreCase("switch_bed")) {
                 result = setOnOff_BadRoom_EnergyMeter(pos);
-            } else if (category.equalsIgnoreCase("switch_light_switch")) {
+            }
+            else if (category.equalsIgnoreCase("switch_light_switch")) {
                 result = setOnOff_Light_Switch(pos);
-            } else if (category.equalsIgnoreCase("switch_light_switch_individual")) {
+            }
+            else if (category.equalsIgnoreCase("switch_light_switch_individual")) {
                 result = Device_LightOnOffIndividual((byte) pos, (byte) lightNum);
-            } else if (category.equalsIgnoreCase("switch_light_switch_all")) {
+            }
+            else if (category.equalsIgnoreCase("switch_light_switch_all")) {
                 result = Device_LightOnOffAll((byte) pos, state == 0 ? true : false);
             }
         }
@@ -1315,6 +1323,26 @@ public class DataSenderService extends Service {
         return result;
     }
 
+    private int controlCookTop(int kind, int pos, RequestData reqData) {
+        int result = JSON.ERROR.ResultFail;
+        String category = reqData.getCategory();
+        if (kind == 0) {
+            //전체 제어
+            int state = reqData.getState();
+            if (category.equalsIgnoreCase("all_device_close")) {
+                result = mCookTopControl.AllDeviceClose();
+                return result;
+            }
+        } else if (kind == 1) {
+            //개별 제어
+            if (category.equalsIgnoreCase("close")) {
+                result = mCookTopControl.ctrlDeviceUnitStatus((byte)(mCookTopData.Device[0].circuit[pos].hID));
+                return result;
+            }
+        }
+        return result;
+    }
+
     private int controlCurtain(int kind, RequestData reqData) {
         int result = JSON.ERROR.ResultFail;
         String category = reqData.getCategory();
@@ -1338,20 +1366,27 @@ public class DataSenderService extends Service {
             if (menu == JSON.MENU.LIGHT) {
                 //조명 상태, 제어
                 return controlLight(kind, pos, reqData);
-            } else if (menu == JSON.MENU.HEATING) {
+            }
+            else if (menu == JSON.MENU.HEATING) {
                 //난방 상태, 제어
                 return controlHeating(kind, pos, reqData);
-            } else if (menu == JSON.MENU.AIRCON) {
+            }
+            else if (menu == JSON.MENU.AIRCON) {
                 //에어컨 상태, 제어
                 //return controlAircon(kind, pos, reqData);
                 return controlKnxAircon(kind, pos, reqData);
-            } else if (menu == JSON.MENU.VENTI) {
+            }
+            else if (menu == JSON.MENU.VENTI) {
                 //환기 상태, 제어
                 return controlPurity(kind, reqData);
-            } else if (menu == JSON.MENU.GAS) {
+            }
+            else if (menu == JSON.MENU.GAS) {
                 //가스 상태, 제어
                 return controlGas(kind, reqData);
             }
+            else if (menu == JSON.MENU.COOKTOP) {
+                return controlCookTop(kind, pos, reqData);
+            }
         } catch (JSONException e) {
             e.printStackTrace();
             return JSON.ERROR.JsonException;
@@ -1363,7 +1398,7 @@ public class DataSenderService extends Service {
     }
 
     private JSONObject updateLight(int kind, int position) {
-        String [] astrRoomTitle = null;
+        String[] astrRoomTitle = null;
         String strLight = "1_2_3_4_5_6_7_8_9_10_11_12_13_14_15_16_17_18_19_20";
         String strRoomTitle = "";
         if (mKnxData == null) {
@@ -1387,9 +1422,9 @@ public class DataSenderService extends Service {
             astrRoomTitle = wallpadStatusData.GetDevRoomNameList(define.ROOM_NAME_LIGHT);
             wallpadStatusData.closeDB();
             for (int i = 0; i < astrRoomTitle.length; i++) {
-                if(i==astrRoomTitle.length-1){
-                    strRoomTitle = strRoomTitle+astrRoomTitle[i];
-                }else {
+                if (i == astrRoomTitle.length - 1) {
+                    strRoomTitle = strRoomTitle + astrRoomTitle[i];
+                } else {
                     strRoomTitle = strRoomTitle + astrRoomTitle[i] + "_";
                 }
             }
@@ -1492,7 +1527,7 @@ public class DataSenderService extends Service {
 
     private JSONObject updateHeating(int kind, int pos) {
         String strHeating = "1_2_3_4_5_6_7_8_9_10_11_12_13_14_15_16_17_18_19_20";
-        String [] astrRoomTitle = null;
+        String[] astrRoomTitle = null;
         String strRoomTitle = "";
         int roomCount = mHeatingV2API.data.Device.info.RoomCount;
         try {
@@ -1504,9 +1539,9 @@ public class DataSenderService extends Service {
             astrRoomTitle = wallpadStatusData.GetDevRoomNameList(define.ROOM_NAME_HEATING);
             wallpadStatusData.closeDB();
             for (int i = 0; i < astrRoomTitle.length; i++) {
-                if(i==astrRoomTitle.length-1){
-                    strRoomTitle = strRoomTitle+astrRoomTitle[i];
-                }else {
+                if (i == astrRoomTitle.length - 1) {
+                    strRoomTitle = strRoomTitle + astrRoomTitle[i];
+                } else {
                     strRoomTitle = strRoomTitle + astrRoomTitle[i] + "_";
                 }
             }
@@ -1524,7 +1559,7 @@ public class DataSenderService extends Service {
                     strHeating = "1_2_3_4_5_6_7_8_9_10_11_12_13_14_15_16_17_18_19_20";
                 }
             }
-        }catch (Exception e) {
+        } catch (Exception e) {
             e.printStackTrace();
         }
 
@@ -1668,7 +1703,7 @@ public class DataSenderService extends Service {
 
     private JSONObject updateKnxAircon(int kind, int pos) {
         String strAircon = "1_2_3_4_5_6_7_8_9_10_11_12_13_14_15_16_17_18_19_20";
-        String [] astrRoomTitle = null;
+        String[] astrRoomTitle = null;
         String strRoomTitle = "";
         int roomCount = mKnxSystemAirconAPI.data.Device.info.InsideAirconCount;
         try {
@@ -1680,9 +1715,9 @@ public class DataSenderService extends Service {
             astrRoomTitle = wallpadStatusData.GetDevRoomNameList(define.ROOM_NAME_SYSTEMAIRCON);
             wallpadStatusData.closeDB();
             for (int i = 0; i < astrRoomTitle.length; i++) {
-                if(i==astrRoomTitle.length-1){
-                    strRoomTitle = strRoomTitle+astrRoomTitle[i];
-                }else {
+                if (i == astrRoomTitle.length - 1) {
+                    strRoomTitle = strRoomTitle + astrRoomTitle[i];
+                } else {
                     strRoomTitle = strRoomTitle + astrRoomTitle[i] + "_";
                 }
             }
@@ -1853,7 +1888,7 @@ public class DataSenderService extends Service {
             jsonObject.accumulate("device_count", nCookTopCnt);
             JSONArray dataArray = new JSONArray();
             if (kind == 0) {        //전체 응답
-                for (int i = 0; i < nCookTopCnt; i++) {
+                for (int i = 0; i < mCookTopData.Device[0].circuit.length; i++) {
                     // build jsonObject
                     JSONObject dataObject = new JSONObject();
                     dataObject.accumulate("hID", mCookTopData.Device[0].circuit[i].hID);
@@ -1877,24 +1912,18 @@ public class DataSenderService extends Service {
         try {
             if (menu == JSON.MENU.LIGHT) {
                 return updateLight(kind, position);
-            }
-            else if (menu == JSON.MENU.CONCENT) {
+            } else if (menu == JSON.MENU.CONCENT) {
                 return updateConcent(kind, position);
-            }
-            else if (menu == JSON.MENU.HEATING) {
+            } else if (menu == JSON.MENU.HEATING) {
                 return updateHeating(kind, position);
-            }
-            else if (menu == JSON.MENU.AIRCON) {
+            } else if (menu == JSON.MENU.AIRCON) {
                 return updateKnxAircon(kind, position);
                 //return updateAircon(kind, position);
-            }
-            else if (menu == JSON.MENU.VENTI) {
+            } else if (menu == JSON.MENU.VENTI) {
                 return updateVenti(kind, position);
-            }
-            else if (menu == JSON.MENU.GAS) {
+            } else if (menu == JSON.MENU.GAS) {
                 return updateGas(kind, position);
-            }
-            else if (menu == JSON.MENU.COOKTOP) {
+            } else if (menu == JSON.MENU.COOKTOP) {
                 return updateCookTop(kind, position);
             }
         } catch (Exception e) {
@@ -1962,7 +1991,7 @@ public class DataSenderService extends Service {
             int[] Curtaininfo = devSet.Get_CURTAIN_Info();
             String[] strDeviceSeqValue = devSet.GetSettingData("UI순서");
             devSet.closeDB();
-            if(strDeviceSeqValue!=null) {
+            if (strDeviceSeqValue != null) {
                 strLight = strDeviceSeqValue[1].substring((strDeviceSeqValue[1].indexOf("조명(") + 3), (strDeviceSeqValue[1].indexOf(")난방(")));
                 strHeating = strDeviceSeqValue[1].substring((strDeviceSeqValue[1].indexOf("난방(") + 3), (strDeviceSeqValue[1].indexOf(")에어컨(")));
                 strAircon = strDeviceSeqValue[1].substring((strDeviceSeqValue[1].indexOf("에어컨(") + 4), (strDeviceSeqValue[1].indexOf("))")));
@@ -1973,7 +2002,7 @@ public class DataSenderService extends Service {
 
             String[] devlist;
 
-            if(Gasinfo==1){
+            if (Gasinfo == 1) {
                 devlist = new String[]{"gas", "livinglight", "doorlock", "light", "ventil", "thermostat", "smartlight", "cooktop", "sysaircon"};
             } else {
                 devlist = new String[]{"livinglight", "doorlock", "light", "ventil", "thermostat", "smartlight", "sysaircon"};
@@ -2002,13 +2031,11 @@ public class DataSenderService extends Service {
                         if (mCooktopAPI != null) {
                             int nGas = 0;
                             int nOutlet = 0;
-                            for (int j = 0; j < mCooktopAPI.data.DeviceCnt; j++) {
-                                for (int k = 0; k < mCooktopAPI.data.DeviceCnt; k++) {
-                                    if (mCooktopAPI.data.Device[j].circuit[i].hType == DataClasses.CooktopCtrl.DEVICE_TYPE.GASVALVE)
-                                        nGas++;
-                                    else if (mCooktopAPI.data.Device[j].circuit[i].hType == DataClasses.CooktopCtrl.DEVICE_TYPE.OUTLET)
-                                        nOutlet++;
-                                }
+                            for (int k = 0; k < mCooktopAPI.data.Device[0].circuit.length; k++) {
+                                if (mCooktopAPI.data.Device[0].circuit[k].hType == DataClasses.CooktopCtrl.DEVICE_TYPE.GASVALVE)
+                                    nGas++;
+                                else if (mCooktopAPI.data.Device[0].circuit[k].hType == DataClasses.CooktopCtrl.DEVICE_TYPE.OUTLET)
+                                    nOutlet++;
                             }
                             strResult += "         <devinfo name=\"gas\" value=\"" + nGas + "\" order=\"1\" floor=\"" + index + "\"/>\r\n";
                             strResult += "         <devinfo name=\"cooktop\" value=\"" + nOutlet + "\" order=\"1\" floor=\"" + index + "\"/>\r\n";
@@ -2017,8 +2044,7 @@ public class DataSenderService extends Service {
                         strResult += "         <devinfo name=\"gas\" value=\"0\" order=\"1\" floor=\"" + index + "\"/>\r\n";
                         strResult += "         <devinfo name=\"cooktop\" value=\"0\" order=\"1\" floor=\"" + index + "\"/>\r\n";
                     }
-                }
-                else if (devlist[i].equals("doorlock")) {
+                } else if (devlist[i].equals("doorlock")) {
                     try {
                         if ((DoorLockInfo[0] == 1) && (DoorLockInfo[1] == WallpadDeviceSet.DOORLOCK_TYPE_NORMAL)) {
                             strResult += "         <devinfo name=\"doorlock\" value=\"1\" order=\"1\" floor=\"" + index + "\"/>\r\n";
@@ -2033,8 +2059,7 @@ public class DataSenderService extends Service {
                         LogUtil.errorLogInfo("", TAG, e);
                         strResult += "         <devinfo name=\"doorlock\" value=\"0\" order=\"1\" floor=\"" + index + "\"/>\r\n";
                     }
-                }
-                else if (devlist[i].equals("light")) {
+                } else if (devlist[i].equals("light")) {
                     try {
                         if (Version.getModelType() == Version.MODEL_TYPE.IHN_D101 || Version.getModelType() == Version.MODEL_TYPE.IHN_D101_I || Version.getModelType() == Version.MODEL_TYPE.IHN_D101_I_LX2
                                 || Version.getModelType() == Version.MODEL_TYPE.IHN_D101K || Version.getModelType() == Version.MODEL_TYPE.IHN_D101K_I
@@ -2049,8 +2074,7 @@ public class DataSenderService extends Service {
                         LogUtil.errorLogInfo("", TAG, e);
                         strResult += "         <devinfo name=\"light\" value=\"0\" order=\"1\" floor=\"" + index + "\"/>\r\n";
                     }
-                }
-                else if (devlist[i].equals("livinglight")) {
+                } else if (devlist[i].equals("livinglight")) {
                     try {
 
                         if (Version.getModelType() == Version.MODEL_TYPE.IHN_D101 || Version.getModelType() == Version.MODEL_TYPE.IHN_D101_I || Version.getModelType() == Version.MODEL_TYPE.IHN_D101_I_LX2
@@ -2067,8 +2091,7 @@ public class DataSenderService extends Service {
                         LogUtil.errorLogInfo("", TAG, e);
                         strResult += "         <devinfo name=\"livinglight\" value=\"0\" order=\"1\" floor=\"" + index + "\"/>\r\n";
                     }
-                }
-                else if (devlist[i].equals("ventil")) {
+                } else if (devlist[i].equals("ventil")) {
                     try {
                         if (Ventilinfo[0] == 0)
                             strResult += "    <devinfo name=\"ventil\" value=\"0\" order=\"1\" floor=\"" + index + "\"/>\r\n";
@@ -2082,8 +2105,7 @@ public class DataSenderService extends Service {
                         LogUtil.errorLogInfo("", TAG, e);
                         strResult += "         <devinfo name=\"ventil\" value=\"0\" order=\"1\" floor=\"" + index + "\"/>\r\n";
                     }
-                }
-                else if (devlist[i].equals("thermostat")) {
+                } else if (devlist[i].equals("thermostat")) {
                     try {
                         byte RoomCount = 0;
                         if (mHeatingV2API != null) {
@@ -2102,8 +2124,7 @@ public class DataSenderService extends Service {
                         LogUtil.errorLogInfo("", TAG, e);
                         strResult += "         <devinfo name=\"thermostat\" value=\"0\" order=\"" + strHeating + "\" floor=\"" + index + "\"/>\r\n";
                     }
-                }
-                else if (devlist[i].equals("curtain")) {
+                } else if (devlist[i].equals("curtain")) {
                     try {
                         if (Curtaininfo[0] == 0)
                             strResult += "         <devinfo name=\"curtain\" value=\"0\" order=\"1\" floor=\"" + index + "\"/>\r\n";
@@ -2117,8 +2138,7 @@ public class DataSenderService extends Service {
                         LogUtil.errorLogInfo("", TAG, e);
                         strResult += "         <devinfo name=\"curtain\" value=\"0\" order=\"1\" floor=\"" + index + "\"/>\r\n";
                     }
-                }
-                else if (devlist[i].equals("electric")) {
+                } else if (devlist[i].equals("electric")) {
                     try {
                         // 콘센트 처리
                         int BadConcentCount = 0;
@@ -2134,7 +2154,7 @@ public class DataSenderService extends Service {
                                 }
                             }
                             Log.d(TAG, "[yskim] iCMDProcDevList() electric : " + BadConcentCount);
-                            strResult += "         <devinfo name=\"electric\" value=\"" + BadConcentCount +  "\" floor=\"" + index + "\"/>\r\n";
+                            strResult += "         <devinfo name=\"electric\" value=\"" + BadConcentCount + "\" floor=\"" + index + "\"/>\r\n";
                         }
                     } catch (RuntimeException re) {
                         LogUtil.errorLogInfo("", TAG, re);
@@ -2144,8 +2164,7 @@ public class DataSenderService extends Service {
                         LogUtil.errorLogInfo("", TAG, e);
                         strResult += "         <devinfo name=\"electric\" value=\"0\" floor=\"" + index + "\"/>\r\n";
                     }
-                }
-                else if (devlist[i].equals("smartlight")) {
+                } else if (devlist[i].equals("smartlight")) {
                     // KNX 조명 처리
                     try {
                         if (mKnxAPI != null) {
@@ -2160,14 +2179,14 @@ public class DataSenderService extends Service {
                                 if (mKnxAPI.data.LivingRoom_EnergyMeter.Info.LightCount > 0)
                                     LivingLightCount = 1;
                             }
-                            int AllEMcount = LivingLightCount + mKnxAPI.data.MasterController.Info.Bad_EnergyMeterCount + mKnxAPI.data.MasterController.Info.Light_SwitchCount;;
+                            int AllEMcount = LivingLightCount + mKnxAPI.data.MasterController.Info.Bad_EnergyMeterCount + mKnxAPI.data.MasterController.Info.Light_SwitchCount;
+                            ;
                             strResult += "         <devinfo name=\"smartlight\" value=\"" + AllEMcount + "\" order=\"" + strLight + "\" floor=\"" + index + "\"/>\r\n";
                         }
                     } catch (Exception ek) {
                         strResult += "         <devinfo name=\"smartlight\" value=\"" + 0 + "\" order=\"" + strLight + "\" floor=\"" + index + "\"/>\r\n";
                     }
-                }
-                else if (devlist[i].equals("sysaircon")) {
+                } else if (devlist[i].equals("sysaircon")) {
                     // 에어컨 처리
                     KnxSystemAirconAPI airconAPI = mWallPadAPI.Get_KnxAirconController();
                     if (airconAPI != null) {
@@ -2318,7 +2337,8 @@ public class DataSenderService extends Service {
                 }
 
                 if (mCooktopAPI != null) {
-                    mCooktopAPI.Refresh(SystemAirconAPI.REFRESH_IDX.ALL, false);
+                    mCookTopControl = new CookTopControl(mCooktopAPI);
+                    mCooktopAPI.Refresh(Common.INDEX_ALL, false);
                     // 4. Data Copy
                     mCookTopData = mCooktopAPI.data;
                 }
@@ -2499,6 +2519,20 @@ public class DataSenderService extends Service {
         }
     }
 
+    public void checkChangedCookTop() {
+        try {
+            Log.i(TAG, "[checkChangedCookTop] ===== START =====");
+            if (mCooktopAPI != null) {
+                mCooktopAPI.Refresh(Common.INDEX_ALL, false);
+            } else {
+                mCooktopAPI = mWallPadAPI.Get_CookTopController();
+            }
+        } catch (Exception e) {
+            Log.e(TAG, "[Exception] checkChangedCookTop()");
+            e.printStackTrace();
+        }
+    }
+
     /**
      * 제어기 상태를 가져온다.
      *
@@ -2619,24 +2653,26 @@ public class DataSenderService extends Service {
                 } catch (Exception e) {
                     e.printStackTrace();
                 }
-            }
-            else if (strActionName.equals(BrID.BR_HEATING)) {
-                				Log.d(TAG, "*********************   BR DataSenderService BR_HEATING   ********************");
+            } else if (strActionName.equals(BrID.BR_COOKTOP)) {
+                Log.d(TAG, "*********************   BR DataSenderService BR_COOKTOP   ********************");
+                checkChangedCookTop();
+            } else if (strActionName.equals(BrID.BR_HEATING)) {
+                Log.d(TAG, "*********************   BR DataSenderService BR_HEATING   ********************");
                 checkChangedHeating();
             } else if (strActionName.equals(BrID.BR_AIRCON)) {
-                				Log.d(TAG, "*********************   BR DataSenderService BR_AIRCON   ********************");
+                Log.d(TAG, "*********************   BR DataSenderService BR_AIRCON   ********************");
                 checkChangedAircon();
             } else if (strActionName.equals(BrID.BR_SDB_EVENT)) {
-                				Log.d(TAG, "*********************   DataSenderService BR_SDB_EVENT   ********************");
+                Log.d(TAG, "*********************   DataSenderService BR_SDB_EVENT   ********************");
                 checkChangedSdb(false);
             } else if (strActionName.equals(BrID.BR_KNX_EVENT)) {
-                				Log.d(TAG, "*********************   DataSenderService BR_KNX_EVENT   ********************");
+                Log.d(TAG, "*********************   DataSenderService BR_KNX_EVENT   ********************");
                 deviceApiLoadLight();
             } else if (strActionName.equals(BrID.BR_SDB_LIVING_EVENT)) {
                 //				Log.d(TAG, "*********************   DataSenderService.BR_SDB_LIVING_EVENT   ******************** -> bDeviceInitComplete [" + bDeviceInitComplete + "]");
                 //checkChangedSdbLivingLight();
             } else if (strActionName.equals(BrID.BR_VENTIL)) {
-                				Log.d(TAG, "*********************   BR DataSenderService.BR_VENTIL   ********************");
+                Log.d(TAG, "*********************   BR DataSenderService.BR_VENTIL   ********************");
                 checkChangedVentilation();
             } else if (strActionName.equals(define.NOTIFY_ACNAME)) {
                 int kind = intent.getIntExtra(define.NOTIBR_KIND, 0);
@@ -2766,6 +2802,7 @@ public class DataSenderService extends Service {
                 //mIntentFilter.addAction(BrID.BR_ENERGY_METER);
             }
             mIntentFilter.addAction(BrID.BR_GAS);
+            mIntentFilter.addAction(BrID.BR_COOKTOP);
             mIntentFilter.addAction(BrID.BR_VENTIL);
             mIntentFilter.addAction(BrID.BR_HEATING);
             getApplicationContext().registerReceiver(mSendDataEventBR, mIntentFilter);
@@ -2802,6 +2839,7 @@ public class DataSenderService extends Service {
             }
 
             if (mGasAPI != null) mGasAPI.regChangedBR(BrID.BR_GAS);
+            if (mCooktopAPI != null) mCooktopAPI.regChangedBR(BrID.BR_COOKTOP);
             if (mVentiAPI != null) mVentiAPI.regChangedBR(BrID.BR_VENTIL);
             if (mHeatingV2API != null) mHeatingV2API.regChangedBR(BrID.BR_HEATING);
 

+ 72 - 0
WallPadMultiControlService/src/main/java/kr/co/icontrols/wallpadmulticontrolservice/control/CookTopControl.java

@@ -0,0 +1,72 @@
+package kr.co.icontrols.wallpadmulticontrolservice.control;
+
+import android.util.Log;
+
+import com.artncore.commons.define;
+import com.artncore.wallpadapi.CooktopAPI;
+import com.artncore.wallpadapi.KnxAPI;
+import com.util.LogUtil;
+
+import kr.co.icontrols.wallpadmulticontrolservice.Common;
+import kr.co.icontrols.wallpadmulticontrolservice.Common.JSON;
+
+public class CookTopControl {
+    String TAG = this.getClass().getSimpleName();
+    private CooktopAPI mCooktopAPI;
+
+    public CookTopControl(CooktopAPI mCooktopAPI) {
+        this.mCooktopAPI = mCooktopAPI;
+    }
+
+    private void DebugLogOutput(String s) {
+        if (Common.DEBUG_LOG_ON) Log.d(TAG, s);
+    }
+
+    public int AllDeviceClose()
+    {
+        int ret = JSON.ERROR.NotReady;
+
+        try {
+            // 1. API Load Check
+            if (mCooktopAPI == null) {
+                ret = JSON.ERROR.ApiNull;
+            } else {
+                ret = mCooktopAPI.setEntireCircuitClose((byte) 0);
+            }
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+            ret = JSON.ERROR.RuntimeException;
+        } catch (Exception e) {
+            LogUtil.errorLogInfo("", TAG, e);
+            ret = JSON.ERROR.Exception;
+        }
+        return ret;
+    }
+
+    /**
+     * 제어 (0x01 : 열림, 0x03 : 닫힘)
+     * @param RommIndex 서브인덱스
+     * @return 0성공, -1 API null, -2: 상태값 오류
+     */
+    public int ctrlDeviceUnitStatus(byte RommIndex)
+    {
+        int ret = JSON.ERROR.NotReady;
+
+        try {
+            // 1. API Load Check
+            if (mCooktopAPI == null) {
+                ret = JSON.ERROR.ApiNull;
+            } else {
+                ret = mCooktopAPI.setUnitCircuitClose((byte) 0, RommIndex);
+            }
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+            ret = JSON.ERROR.RuntimeException;
+        } catch (Exception e) {
+            LogUtil.errorLogInfo("", TAG, e);
+            ret = JSON.ERROR.Exception;
+        }
+        return ret;
+    }
+
+}