|
@@ -14,7 +14,10 @@ import com.artncore.WallPadDataMgr.WallpadSalesSampleData;
|
|
|
import com.artncore.WallPadDataMgr.WallpadStatusData;
|
|
|
import com.artncore.WallPadDataMgr.wallpaddbmgr;
|
|
|
import com.artncore.WallPadDataMgr.wallpaddbmgr.AddressSet;
|
|
|
+import com.artncore.commons.API_Menu;
|
|
|
import com.artncore.commons.define;
|
|
|
+import com.artncore.wallpadapi.DLockAPI;
|
|
|
+import com.artncore.wallpadapi.FP_DlockAPI;
|
|
|
import com.util.LogUtil;
|
|
|
|
|
|
import java.io.BufferedReader;
|
|
@@ -2023,6 +2026,7 @@ public final class Global {
|
|
|
public static boolean bEasyModeUse = false; // 간편모드 UX
|
|
|
public static boolean bPlayBellUse = false; // 방문객원격통화 사용시 호출음 설정
|
|
|
public static boolean bSmartIOTCamFlip = false; // 스마트현관카메라좌우반전 사용 유무
|
|
|
+ public static int[] doorType = null;// 도어락 타입 정보 가져오기
|
|
|
|
|
|
//** 서브기기 통화 볼륨 테이블
|
|
|
public static int BATHPHONE_CNT = 0; // 욕실폰 개수
|
|
@@ -2292,6 +2296,7 @@ public final class Global {
|
|
|
List<String[]> GuardList = mWallpadDeviceSet.GetGuardList(); // 경비실기 항목
|
|
|
boolean bEasyModeSupport = mWallpadDeviceSet.Get_EasyModeUX_Support();
|
|
|
ConfigValues.bSmartIOTCamFlip = mWallpadDeviceSet.Get_SmartIOTCamFlipUse(); // 스마트현관카메라좌우반전 사용 여부
|
|
|
+ ConfigValues.doorType = mWallpadDeviceSet.Get_DoorLock_Info();
|
|
|
mWallpadDeviceSet.closeDB();
|
|
|
|
|
|
WallpadStatusData mWallpadStatusData = new WallpadStatusData(mContext);
|
|
@@ -2372,8 +2377,9 @@ public final class Global {
|
|
|
ConfigValues.eDoorLockType = DOORLOCKTYPE.WIRELESS;
|
|
|
else if (astrDigitalDoorLock[1].contains(ConfigValueKeys.FINGERPRINT))
|
|
|
ConfigValues.eDoorLockType = DOORLOCKTYPE.FINGERPRINT;
|
|
|
- else if (astrDigitalDoorLock[1].contains(ConfigValueKeys.WIRED))
|
|
|
+ else if (astrDigitalDoorLock[1].contains(ConfigValueKeys.WIRED)) {
|
|
|
ConfigValues.eDoorLockType = DOORLOCKTYPE.WIRED;
|
|
|
+ }
|
|
|
} else {
|
|
|
ConfigValues.eDoorLockType = DOORLOCKTYPE.NOT_USE;
|
|
|
}
|
|
@@ -2780,7 +2786,7 @@ public final class Global {
|
|
|
try {
|
|
|
Log.i(TAG, "[ctrlFrontDoorOpen] eDoorLockType [" + ConfigValues.eDoorLockType + "]");
|
|
|
if (((MainActivity) mContext).mWallPadAPI != null && ((MainActivity) mContext).mWallPadAPI.Check_Connect()) {
|
|
|
- if (ConfigValues.eDoorLockType == DOORLOCKTYPE.WIRED || ConfigValues.eDoorLockType == DOORLOCKTYPE.WIRELESS) {
|
|
|
+ if (ConfigValues.eDoorLockType == DOORLOCKTYPE.WIRELESS) {
|
|
|
int nResult = ((MainActivity) mContext).mWallPadAPI.SetDoorLock_Open();
|
|
|
Log.i(TAG, "[ctrlFrontDoorOpen] nResult [" + nResult + "]");
|
|
|
if (0 <= nResult) {
|
|
@@ -2790,6 +2796,17 @@ public final class Global {
|
|
|
Log.w(TAG, "[ctrlFrontDoorOpen] Door open fail!!");
|
|
|
return false;
|
|
|
}
|
|
|
+ }
|
|
|
+ else if (ConfigValues.eDoorLockType == DOORLOCKTYPE.WIRED) {
|
|
|
+ int nResult = Device_DoorOpen();
|
|
|
+ Log.i(TAG, "[ctrlFrontDoorOpen] nResult [" + nResult + "]");
|
|
|
+ if (0 <= nResult) {
|
|
|
+ Log.i(TAG, "[ctrlFrontDoorOpen] Door open success!!");
|
|
|
+ return true;
|
|
|
+ } else {
|
|
|
+ Log.w(TAG, "[ctrlFrontDoorOpen] Door open fail!!");
|
|
|
+ return false;
|
|
|
+ }
|
|
|
} else if (ConfigValues.eDoorLockType == DOORLOCKTYPE.FINGERPRINT) {
|
|
|
if (((MainActivity) mContext).fpDlockAPI != null) {
|
|
|
int nResult = (((MainActivity) mContext).fpDlockAPI).SetDoorOpen();
|
|
@@ -2827,6 +2844,90 @@ public final class Global {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 유선 도어락 명령
|
|
|
+ *
|
|
|
+ * @return (int) - >=0 : 성공, <0 : 실패
|
|
|
+ */
|
|
|
+ private static int Device_DoorOpen() // dLockAPI는 현관카메라가 UKS가 아닌 경우에 사용.
|
|
|
+ {
|
|
|
+ //jglee - 2025.02.03 도어락 타입이 유선일 경우 처리 추가
|
|
|
+ if(ConfigValues.doorType == null) return -1;
|
|
|
+ try
|
|
|
+ {
|
|
|
+ DLockAPI dLockAPI = null; // 도어락 API
|
|
|
+ FP_DlockAPI fp_dlockAPI = null; // 지문인식 도어락 API
|
|
|
+
|
|
|
+ if(ConfigValues.doorType[1] == WallpadDeviceSet.DOORLOCK_TYPE_NORMAL)
|
|
|
+ {
|
|
|
+ if(dLockAPI == null)
|
|
|
+ {
|
|
|
+ Log.e(TAG, "[Device_DoorOpen] - dLockAPI unload !!!");
|
|
|
+ return -1;
|
|
|
+ }
|
|
|
+
|
|
|
+ try
|
|
|
+ {
|
|
|
+ int ret = dLockAPI.SetDoorOpen();
|
|
|
+ if(ret < 0)
|
|
|
+ {
|
|
|
+ Log.e(TAG, "[Device_DoorOpen] - SetDoorOpen (" + ret + ") ErrorCode = " + dLockAPI.ErrorCode.ErrStr());
|
|
|
+ return -2;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ catch (RuntimeException re) {
|
|
|
+ LogUtil.errorLogInfo("", TAG, re);
|
|
|
+ return -102;
|
|
|
+ }
|
|
|
+ catch (Exception e)
|
|
|
+ {
|
|
|
+ Log.e(TAG, "[Device_DoorOpen] - [Exception Error] doorLockAPI.Open()");
|
|
|
+ Log.e(TAG, "[Device_DoorOpen] - " + e.toString());
|
|
|
+ //e.printStackTrace();
|
|
|
+ LogUtil.errorLogInfo("", TAG, e);
|
|
|
+ return -102;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ else if(ConfigValues.doorType[1] == WallpadDeviceSet.DOORLOCK_TYPE_FINGERPRINT)
|
|
|
+ {
|
|
|
+ if(fp_dlockAPI == null)
|
|
|
+ {
|
|
|
+ Log.e(TAG, "[Device_DoorOpen] - fp_dlockAPI unload !!!");
|
|
|
+ return -1;
|
|
|
+ }
|
|
|
+
|
|
|
+ try
|
|
|
+ {
|
|
|
+ int ret = fp_dlockAPI.SetDoorOpen();
|
|
|
+ if(ret < 0)
|
|
|
+ {
|
|
|
+ Log.e(TAG, "[Device_DoorOpen] - SetDoorOpen (" + ret + ") ErrorCode = " + fp_dlockAPI.ErrorCode.ErrStr());
|
|
|
+ return -2;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ catch (RuntimeException re) {
|
|
|
+ LogUtil.errorLogInfo("", TAG, re);
|
|
|
+ return -102;
|
|
|
+ }
|
|
|
+ catch (Exception e)
|
|
|
+ {
|
|
|
+ Log.e(TAG, "[Device_DoorOpen] - [Exception Error] fp_dlockAPI.Open()");
|
|
|
+ Log.e(TAG, "[Device_DoorOpen] - " + e.toString());
|
|
|
+ //e.printStackTrace();
|
|
|
+ LogUtil.errorLogInfo("", TAG, e);
|
|
|
+ return -102;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ }catch (Exception e)
|
|
|
+ {
|
|
|
+ return -1;
|
|
|
+ }
|
|
|
+
|
|
|
+ return 0;
|
|
|
+ }
|
|
|
+
|
|
|
/**
|
|
|
* 무선 도어락 문열림<br>
|
|
|
* JNI 호출을 실행하는 함수<br>
|