ソースを参照

[WallPadMain]
1. 원격검침데이터 이전데이터도 처리하게 추가

[WallPadDevService]
1. 대외 수원 스위첸 현장 확인 결과 난방 길이가 방갯수에 따라 변경됨

jglee 3 年 前
コミット
4d7b61effd

+ 8 - 7
WallPadDevService/src/main/java/com/artncore/wallpaddevservice/driver/HeatingV1_Controller.java

@@ -1168,13 +1168,14 @@ public class HeatingV1_Controller extends DeviceManager
                 DeviceLog("[AllRoomStatus_ReplyParsing] Reply is null");
                 return null;
             }
-            if( (Reply.length != 8) && (Reply.length != 6) )
-            {
-                // 길이 체크
-                // 2013/05/13 - 현대건설 하니웰 제어기기 특징 응답이 8인데 6으로옴
-                Log.w(TAG, "[AllRoomStatus_ReplyParsing] Reply.length  fail ... " + Reply.length);
-                return null;
-            }
+            //대외향 난방 확인 결과 기기갯수에 따라 길이가 달라짐
+//            if( (Reply.length != 8) && (Reply.length != 6) )
+//            {
+//                // 길이 체크
+//                // 2013/05/13 - 현대건설 하니웰 제어기기 특징 응답이 8인데 6으로옴
+//                Log.w(TAG, "[AllRoomStatus_ReplyParsing] Reply.length  fail ... " + Reply.length);
+//                return null;
+//            }
 
             int index = 0;
             byte data = 0x00;

+ 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="2021.11.11.01">
+    android:versionName="2021.11.26.01">
 
     <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
     <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />

ファイルの差分が大きいため隠しています
+ 602 - 370
WallPadMain/src/main/java/kr/co/icontrols/wallpadmain/MainActivity.java


+ 90 - 30
WallPadMain/src/main/java/kr/co/icontrols/wallpadmain/imap/iMAPRemotemeter.java

@@ -3,6 +3,7 @@ package kr.co.icontrols.wallpadmain.imap;
 import android.content.Context;
 import android.util.Log;
 
+import com.artncore.WallPadDataMgr.WallpadDeviceSet;
 import com.artncore.WallPadDataMgr.WallpadStatusData;
 import com.artncore.WallPadDataMgr.wallpaddbmgr.AddressSet;
 //import com.artncore.wallpadapi.APIErrorCode;
@@ -115,6 +116,7 @@ public class iMAPRemotemeter extends WallPadiMAPClient{
     String NewsVersionFromServer = null;
 
 
+
     public iMAPRemotemeter(Context ctx)
     {
         super.setContext(ctx);
@@ -194,19 +196,42 @@ public class iMAPRemotemeter extends WallPadiMAPClient{
             support_ems_String = "no";
         }
 
-        retXML = XMLHeader +
-                "   <service type = \"request\" name= \"get_ems_metering\">\r\n"+
-                "      <guidemap distinguish=\""+isDistinguishYear_String+"\""
-                +" elect=\""+elect_String+"\""
-                +" gas=\""+gas_String+"\""
-                +" water=\""+water_String+"\""
-                +" hotwater=\""+hotwater_String+"\""
-                +" energy=\""+energy_String+"\""
-                +" carbon=\""+carbon_String+"\""
-                +" support_ems=\""+support_ems_String+"\">\r\n"+
-                "         <datelist year=\""+year+ "\" month=\""+month+"\" />\r\n"+
-                "      </guidemap>\r\n" +
-                "   </service>\r\n</imap>";
+        boolean isUseEMS = true;
+        WallpadDeviceSet wds = new WallpadDeviceSet(ctx);
+        isUseEMS = wds.GetEMSProtocolUse();
+        wds.closeDB();
+
+        if(isUseEMS)
+        {
+            retXML = XMLHeader +
+                    "   <service type = \"request\" name= \"get_ems_metering\">\r\n"+
+                    "      <guidemap distinguish=\""+isDistinguishYear_String+"\""
+                    +" elect=\""+elect_String+"\""
+                    +" gas=\""+gas_String+"\""
+                    +" water=\""+water_String+"\""
+                    +" hotwater=\""+hotwater_String+"\""
+                    +" energy=\""+energy_String+"\""
+                    +" carbon=\""+carbon_String+"\""
+                    +" support_ems=\""+support_ems_String+"\">\r\n"+
+                    "         <datelist year=\""+year+ "\" month=\""+month+"\" />\r\n"+
+                    "      </guidemap>\r\n" +
+                    "   </service>\r\n</imap>";
+        }
+        else
+        {
+            retXML = XMLHeader +
+                    "   <service type = \"request\" name= \"get_metering\">\r\n"+
+                    "      <guidemap distinguish=\""+isDistinguishYear_String+"\""
+                    +" elect=\""+elect_String+"\""
+                    +" gas=\""+gas_String+"\""
+                    +" water=\""+water_String+"\""
+                    +" hotwater=\""+hotwater_String+"\""
+                    +" energy=\""+energy_String+"\">\r\n"+
+                    "         <datelist year=\""+year+ "\" month=\""+month+"\" />\r\n"+
+                    "      </guidemap>\r\n" +
+                    "   </service>\r\n</imap>";
+        }
+
 
         return retXML;
     }
@@ -231,25 +256,60 @@ public class iMAPRemotemeter extends WallPadiMAPClient{
                     String name = GetAttributeVal(0, "name");
                     String type = GetAttributeVal(0, "type");
 
-                    if ((name!=null&& name.equalsIgnoreCase("get_ems_metering"))
-                            && (type!=null && type.equalsIgnoreCase("reply"))) {
-                        if (SetItem("guidemap") == 1) {
-                            if (isDistinguishYear_String!=null && isDistinguishYear_String.equalsIgnoreCase("year")) {
-                                String year = GetAttributeVal(0, "distinguish");
-                                if (year!=null&& year.equalsIgnoreCase(
-                                        "year")) {
-                                    if (SetItem("valuelist") > 0) {
-                                        Proc.ProcSuccess();
-                                        return;
+                    boolean isUseEMS = true;
+                    WallpadDeviceSet wds = new WallpadDeviceSet(ctx);
+                    isUseEMS = wds.GetEMSProtocolUse();
+                    wds.closeDB();
+
+                    if(isUseEMS)
+                    {
+                        if ((name!=null&& name.equalsIgnoreCase("get_ems_metering"))
+                                && (type!=null && type.equalsIgnoreCase("reply"))) {
+                            if (SetItem("guidemap") == 1) {
+                                if (isDistinguishYear_String!=null && isDistinguishYear_String.equalsIgnoreCase("year")) {
+                                    String year = GetAttributeVal(0, "distinguish");
+                                    if (year!=null&& year.equalsIgnoreCase(
+                                            "year")) {
+                                        if (SetItem("valuelist") > 0) {
+                                            Proc.ProcSuccess();
+                                            return;
+                                        }
+                                    }
+                                } else if (isDistinguishYear_String!=null&& isDistinguishYear_String.equalsIgnoreCase("month")) {
+                                    String month = GetAttributeVal(0, "distinguish");
+                                    if (month!=null && month.equalsIgnoreCase(
+                                            "month")) {
+                                        if (SetItem("valuelist") > 0) {
+                                            Proc.ProcSuccess();
+                                            return;
+                                        }
                                     }
                                 }
-                            } else if (isDistinguishYear_String!=null&& isDistinguishYear_String.equalsIgnoreCase("month")) {
-                                String month = GetAttributeVal(0, "distinguish");
-                                if (month!=null && month.equalsIgnoreCase(
-                                        "month")) {
-                                    if (SetItem("valuelist") > 0) {
-                                        Proc.ProcSuccess();
-                                        return;
+                            }
+                        }
+                    }
+                    else
+                    {
+                        if ((name!=null&& name.equalsIgnoreCase("get_metering"))
+                                && (type!=null && type.equalsIgnoreCase("reply"))) {
+                            if (SetItem("guidemap") == 1) {
+                                if (isDistinguishYear_String!=null && isDistinguishYear_String.equalsIgnoreCase("year")) {
+                                    String year = GetAttributeVal(0, "distinguish");
+                                    if (year!=null&& year.equalsIgnoreCase(
+                                            "year")) {
+                                        if (SetItem("valuelist") > 0) {
+                                            Proc.ProcSuccess();
+                                            return;
+                                        }
+                                    }
+                                } else if (isDistinguishYear_String!=null&& isDistinguishYear_String.equalsIgnoreCase("month")) {
+                                    String month = GetAttributeVal(0, "distinguish");
+                                    if (month!=null && month.equalsIgnoreCase(
+                                            "month")) {
+                                        if (SetItem("valuelist") > 0) {
+                                            Proc.ProcSuccess();
+                                            return;
+                                        }
                                     }
                                 }
                             }

この差分においてかなりの量のファイルが変更されているため、一部のファイルを表示していません