|
@@ -1,6464 +1,6499 @@
|
|
|
-package com.artncore.WallPadDataMgr;
|
|
|
-
|
|
|
-import android.content.ComponentName;
|
|
|
-import android.content.ContentValues;
|
|
|
-import android.content.Context;
|
|
|
-import android.content.Intent;
|
|
|
-import android.content.pm.PackageManager;
|
|
|
-import android.database.Cursor;
|
|
|
-import android.database.SQLException;
|
|
|
-import android.util.Log;
|
|
|
-
|
|
|
-import com.artncore.commons.APIErrorCode;
|
|
|
-import com.artncore.commons.define;
|
|
|
-import com.artncore.wallpadimap.WallPadiMAPNotifyAPI;
|
|
|
-import com.util.LogUtil;
|
|
|
-
|
|
|
-import java.io.File;
|
|
|
-import java.util.ArrayList;
|
|
|
-import java.util.Calendar;
|
|
|
-import java.util.GregorianCalendar;
|
|
|
-import java.util.List;
|
|
|
-
|
|
|
-
|
|
|
-public class WallpadStatusData extends wallpaddbmgr {
|
|
|
-
|
|
|
- public static final String TAG = "WallpadStatusData";
|
|
|
-
|
|
|
- public static final String ALARM_STATUS = "ALARM_STATUS";
|
|
|
- /** 평상시 */
|
|
|
- public static final int ALARM_NONE = 0;
|
|
|
- /** 알람발생 */
|
|
|
- public static final int ALARM_ARISE = 1;
|
|
|
- /** 알람정지 */
|
|
|
- public static final int ALARM_STOP = 2;
|
|
|
- /** 외출방범모드 */
|
|
|
- public static final int GUARD_OUT = 3;
|
|
|
- /** 재택방범 */
|
|
|
- public static final int GUARD_IN = 4;
|
|
|
- /** 외출방범모드 대기중 (설정진행중) */
|
|
|
- public static final int GUARD_OUT_WAIT = 5;
|
|
|
- /** 그냥 외출모드 - 대외향 스마트 스위치 연동 및 LH향 */
|
|
|
- public static final int OUT_MODE = 6;
|
|
|
- /** 취침방범 모드 - LH향 */
|
|
|
- public static final int GUARD_BED = 7;
|
|
|
- /** 그냥 취침모드 - LH향 */
|
|
|
- public static final int BED_MODE = 8;
|
|
|
-
|
|
|
- public static final String[] ALARMTEXT = {String.valueOf(ALARM_NONE),String.valueOf(ALARM_ARISE), String.valueOf(ALARM_STOP),String.valueOf(GUARD_OUT),String.valueOf(GUARD_IN),String.valueOf(GUARD_OUT_WAIT),String.valueOf(OUT_MODE),String.valueOf(GUARD_BED),String.valueOf(BED_MODE)};
|
|
|
-
|
|
|
- public static final String ALARM_TYPE ="ALARM_TYPE";
|
|
|
- public static final int ALARM_EMM = 1;
|
|
|
- public static final int ALARM_ALERT = 2;
|
|
|
- public static final int ALARM_INVADE = 3;
|
|
|
- public static final int ALARM_EVAC = 4;
|
|
|
- public static final int ALARM_HEATING_LEAK = 5;
|
|
|
- public static final String[] ALARMTYPETEXT = {String.valueOf(ALARM_NONE), String.valueOf(ALARM_EMM),String.valueOf(ALARM_ALERT),String.valueOf(ALARM_INVADE),String.valueOf(ALARM_EVAC),String.valueOf(ALARM_HEATING_LEAK)};
|
|
|
-
|
|
|
- public static final String MORNINGCALL_STATUS = "MCALL_STATUS";
|
|
|
- public static final int MORNINGCALL_OFF = 0;
|
|
|
- public static final int MORNINGCALL_ON = 1;
|
|
|
- public static final String[] MORNINGCALLTEXT = {String.valueOf(MORNINGCALL_OFF),String.valueOf(MORNINGCALL_ON)};
|
|
|
-
|
|
|
- public static final String MANAGER_PW = "MANAGER_PW";
|
|
|
- public static final String MANAGER_PW_DEFAULT = "55554444";
|
|
|
-
|
|
|
- public static final String USER_PW = "USER_PW";
|
|
|
- public static final String USER_PW_DEFAULT = "0000";
|
|
|
-
|
|
|
- public static final String WEB_CTR_PW = "WEB_CTR_PW";
|
|
|
- public static final String WEB_CTR_PW_DEFAULT = "000000";
|
|
|
-
|
|
|
- public static final String SUBMENU_TYPE = "SUBMENU_TYPE";
|
|
|
- public static final int SUBMENU_TYPE1 = 0;
|
|
|
- public static final int SUBMENU_TYPE2 = 1;
|
|
|
- public static final String[] SUBMENUTYPETEXT = {String.valueOf(SUBMENU_TYPE1),String.valueOf(SUBMENU_TYPE2)};
|
|
|
-
|
|
|
- public static final String PSTN_STATUS = "PSTN_STATUS";
|
|
|
- public static final int PSTN_NOINIT = 0;
|
|
|
- public static final int PSTN_INITSTART = 1;
|
|
|
- public static final int PSTN_INITCMD = 2;
|
|
|
- public static final int PSTN_INITDATA = 3;
|
|
|
- public static final int PSTN_INITCCODE = 4;
|
|
|
- public static final int PSTN_INITCIDSET = 5;
|
|
|
- public static final int PSTN_VMODESET = 6;
|
|
|
- public static final int PSTN_DTMFSET = 7;
|
|
|
- public static final int PSTN_VRA = 8;
|
|
|
- public static final int PSTN_VRN = 9;
|
|
|
- public static final int PSTN_INITOK = 10;
|
|
|
- public static final String[] PSTN_STATUSTEXT = {String.valueOf(PSTN_NOINIT),String.valueOf(PSTN_INITSTART), String.valueOf(PSTN_INITCMD), String.valueOf(PSTN_INITDATA), String.valueOf(PSTN_INITCCODE),String.valueOf(PSTN_INITCIDSET),String.valueOf(PSTN_VMODESET),String.valueOf(PSTN_DTMFSET),String.valueOf(PSTN_VRA),String.valueOf(PSTN_VRN),String.valueOf(PSTN_INITOK)};
|
|
|
-
|
|
|
- public static final String DEV_STATUS = "DEV_STATUS";
|
|
|
- public static final int DEV_NORMAL = 0;
|
|
|
- public static final int DEV_BSPUPDATE = 1;
|
|
|
- public static final int DEV_APPUPDATE = 2;
|
|
|
- public static final int DEV_INIT = 3;
|
|
|
- public static final String[] DEV_STATUSTEXT = {String.valueOf(DEV_NORMAL),String.valueOf(DEV_BSPUPDATE),String.valueOf(DEV_APPUPDATE),String.valueOf(DEV_INIT)};
|
|
|
-
|
|
|
- public static final String SERVER_IP = "SERVER_IP";
|
|
|
- public static final String SERVER_IP_DEFAULT = "10.0.1.1:10000";
|
|
|
-
|
|
|
- public static final String GW_IP = "GWIP";
|
|
|
- public static final String GW_IP_DEFAULT = "10.0.1.1";
|
|
|
-
|
|
|
- public static final String SUBNET = "SUBNET";
|
|
|
- public static final String SUBNET_DEFAULT = "255.255.0.0";
|
|
|
-
|
|
|
- public static final String MANAGEPC_IP = "MANAGEPC_IP";
|
|
|
- public static final String MANAGEPC_IP_DEFAULT = "10.0.1.10:10000";
|
|
|
-
|
|
|
- public static final String FTP_IP = "FTP_IP";
|
|
|
- public static final String FTP_IP_DEFAULT = "10.0.1.1";
|
|
|
-
|
|
|
- public static final String APP_VER = "APP_VER";
|
|
|
- public static final String APP_VER_DEFAULT = "2014.00.00.00";
|
|
|
-
|
|
|
- public static final String NOTICE_VER = "NOTICE_VER";
|
|
|
- public static final String NOTICE_VER_DEFAULT = "2014.00.00.00";
|
|
|
-
|
|
|
- public static final String WEATHER_VER = "WEATHER_VER";
|
|
|
- public static final String WEATHER_VER_DEFAULT = "2014.00.00.00";
|
|
|
-
|
|
|
- public static final String WEATHER_CODE = "WEATHER_CODE";
|
|
|
- public static final String CODE_DEFAULT = "1";
|
|
|
-
|
|
|
- public static final String SETTING_VER = "SETTING_VER";
|
|
|
- public static final String SETTING_VER_DEFAULT = "2014.00.00.00";
|
|
|
-
|
|
|
- public static final String SERVER_VERSION = "SERVER_VERSION";
|
|
|
- public static final String SERVER_VERSION_DEFAULT = "1.0";
|
|
|
-
|
|
|
- public static final String DEV_LIGHT_CNT = "LIGHT_CNT";
|
|
|
- public static final String LIGHTCNT_DEFAULT = "6";
|
|
|
-
|
|
|
- public static final String DEV_GAS_CNT = "GAS_CNT";
|
|
|
- public static final String GASCNT_DEFAULT = "0";
|
|
|
-
|
|
|
- public static final String DOORCALLTIMEOUT = "DOORCALLTIMEOUT";
|
|
|
- public static final String DOORCALLTIMEOUT_DEFAULT = "30";
|
|
|
-
|
|
|
- public static final String DOORCONNECTTIMEOUT = "DOORCONNECTTIMEOUT";
|
|
|
- public static final String DOORCONNECTTIMEOUT_DEFAULT = "60";
|
|
|
-
|
|
|
- public static final String DEV_HEATING_CNT = "HEATING_CNT";
|
|
|
- public static final String HEATINGCNT_DEFAULT = "0";
|
|
|
-
|
|
|
- public static final String HEARTBEAT_PERIOD = "HEARTBEAT_PERIOD";
|
|
|
- public static final String HEARTBEATPERIOD_DEFAULT = "30";
|
|
|
-
|
|
|
- public static final String LAST_HEARTBEAT = "LAST_HEARTBEAT";
|
|
|
- public static final String LAST_HEARTBEAT_DEFAULT = "2014.00.00.00.00.00";
|
|
|
-
|
|
|
- public static final String SET_SYSTEMTIME = "SET_SYSTEMTIME";
|
|
|
- public static final String SET_SYSTEMTIME_DEFAULT = "0";
|
|
|
-
|
|
|
- public static final String NEWS_CNT = "NEWS_CNT";
|
|
|
- public static final String NEWS_CNT_DEFAULT = "0";
|
|
|
-
|
|
|
- public static final String MAINBGTYPE = "MAINBGTYPE";
|
|
|
- public static final int MAINBG_DEFAULT = 0;
|
|
|
- public static final int MAINBG_USER = 1;
|
|
|
- public static final int MAINBG_WEATHER = 2;
|
|
|
- public static final String[] MAINBGTYPE_TEXT = {String.valueOf(MAINBG_DEFAULT),String.valueOf(MAINBG_USER),String.valueOf(MAINBG_WEATHER)};
|
|
|
-
|
|
|
- public static final String MAINBGSLIDSHOWTIME = "MAINBGSLIDSHOWTIME";
|
|
|
- public static final String MAINBGSLIDSHOWTIMEDEFAULT = "60";
|
|
|
-
|
|
|
- public static final String GUARD_ADDRESS = "GUARDADDR";
|
|
|
- public static final String LOBBY_ADDRESS = "LOBBYADDR";
|
|
|
-
|
|
|
- public static final String MORNINGCALL_TYPE = "MORNINGCALL_TYPE";
|
|
|
- public static final int MORNINGCALL_ONCE = 0; //한번만
|
|
|
- public static final int MORNINGCALL_WORKDAY = 1; //월~금
|
|
|
- public static final int MORNINGCALL_EWORKDAY = 2; //월~토
|
|
|
- public static final int MORNINGCALL_EVERYDAY = 3; //매일
|
|
|
- public static final String[] MORNINGCALLTYPETEXT = {String.valueOf(MORNINGCALL_ONCE),String.valueOf(MORNINGCALL_WORKDAY),String.valueOf(MORNINGCALL_EWORKDAY),String.valueOf(MORNINGCALL_EVERYDAY)};
|
|
|
-
|
|
|
- public static final String MORNINGCALL_BELLTYPE = "MORNINGCALL_BELLTYPE";
|
|
|
- public static final int MORNINGCALL_BELL_NONE = 0;
|
|
|
- public static final int MORNINGCALL_BELL1 = 1;
|
|
|
- public static final int MORNINGCALL_BELL2 = 2;
|
|
|
- public static final int MORNINGCALL_BELL3 = 3;
|
|
|
- public static final String[] MORNINGCALL_BELLTYPETEXT = {String.valueOf(MORNINGCALL_BELL_NONE),String.valueOf(MORNINGCALL_BELL1),String.valueOf(MORNINGCALL_BELL2),String.valueOf(MORNINGCALL_BELL3)};
|
|
|
-
|
|
|
- public static final String MORNINGCALL_RESERVE = "MORNINGCALL_RESERVE";
|
|
|
- public static final int MCALLR_LIGHT_ON = 1;
|
|
|
- public static final int MCALLR_VENTIL_ON = 2;
|
|
|
- public static final int MCALLR_CURTAIN_OPEN = 4;
|
|
|
- public static final int[] MCCommandList = {MCALLR_LIGHT_ON, MCALLR_VENTIL_ON, MCALLR_CURTAIN_OPEN};
|
|
|
- public static final String MORNINGCALL_RESERVE_DEFAULT = "0";
|
|
|
-
|
|
|
- public static final String ARSONOFF = "ARSONOFF";
|
|
|
- public static final int ARSON = 1;
|
|
|
- public static final int ARSOFF = 0;
|
|
|
- public static final String[] ARSONOFFTEXT = {String.valueOf(ARSOFF),String.valueOf(ARSON)};
|
|
|
-
|
|
|
- public static final int INDEX_CALL_DOORCAM_SOUND = 0;
|
|
|
- public static final int INDEX_CALL_LOBBY_SOUND = 1;
|
|
|
- public static final int INDEX_CALL_GUARD_SOUND = 2;
|
|
|
- public static final int INDEX_CALL_NEIGHBOR_SOUND = 3;
|
|
|
- public static final int INDEX_CALL_PSTN_SOUND = 4;
|
|
|
- public static final int INDEX_CALL_DOORCAM_BRIGHTNESS = 5;
|
|
|
- public static final int INDEX_CALL_DOORCAM_CONTRAST = 6;
|
|
|
-
|
|
|
- public static final String DEV_SMARTLIGHT_STATUS = "SMARTLIGHTSTATUS";
|
|
|
- public static final String SMARTLIGHT_STATUS_DEFAULT = "normal";
|
|
|
- public static final String DEV_SMARTLIGHT_DEVICE = "SMARTLIGHTDEVICE";
|
|
|
- public static final String SMARTLIGHT_DEVICE_DEFAULT = "null";
|
|
|
-
|
|
|
- public static final String DEV_KNXDEVICE_STATUS = "KNXDEVICEALARMSTATUS";
|
|
|
- public static final String KNXDEVICE_STATUS_DEFAULT = "normal";
|
|
|
- public static final String DEV_KNXDEVICE_CAUSE = "KNXDEVICEALARMCAUSE";
|
|
|
- public static final String KNXDEVICE_CAUSE_DEFAULT = "null";
|
|
|
-
|
|
|
- public boolean GetARSOnoff()
|
|
|
- {
|
|
|
- try
|
|
|
- {
|
|
|
- int ret = Integer.parseInt(GetWallPADData(ARSONOFF));
|
|
|
- return (ret==ARSON)?true:false;
|
|
|
- }
|
|
|
- catch (RuntimeException re) {
|
|
|
- LogUtil.errorLogInfo("", TAG, re);
|
|
|
- return false;
|
|
|
- }
|
|
|
- catch (Exception e)
|
|
|
- {
|
|
|
- //e.printStackTrace();
|
|
|
- LogUtil.errorLogInfo("", TAG, e);
|
|
|
- return false;
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- public void SetARSOnoff(boolean onoff)
|
|
|
- {
|
|
|
- UpdateWallPADData(ARSONOFF, ARSONOFFTEXT[onoff?ARSON:ARSOFF]);
|
|
|
- }
|
|
|
-
|
|
|
- public static final String CARARRIVALSND = "CARARRIVALSND";
|
|
|
- public static final int CARARRIVALON = 1;
|
|
|
- public static final int CARARRIVALOFF = 0;
|
|
|
- public static final String[] CARARRIVALSNDTEXT = {String.valueOf(CARARRIVALOFF),String.valueOf(CARARRIVALON)};
|
|
|
-
|
|
|
-
|
|
|
- // 대외향 485 스마트 스위치 연동 현장
|
|
|
- public static final String GUARD_RELEASE_PW_INPUT = "GUARD_RELEASE_PW_INPUT";
|
|
|
- // 외출 방범 설정
|
|
|
- public static final String GUARD_SENSOR_CHECK = "GUARD_SENSOR_CHECK";
|
|
|
- public static final String GUARD_BED_SENSOR_CHECK = "GUARD_BED_SENSOR_CHECK";
|
|
|
- public static final int ENALBLE = 1;
|
|
|
- public static final int DISABEL = 0;
|
|
|
-
|
|
|
- // 대외향 485 스마트 스위치 연동 현장의 경우 비밀번호 입력없이 즉시 취소가 가능한 기능이 있음
|
|
|
- // 방범 해제시 패스워드 사용여부 설정
|
|
|
- public boolean GetUseGuardReleasePW()
|
|
|
- {
|
|
|
- try {
|
|
|
-
|
|
|
- int ret = Integer.parseInt(GetWallPADData(GUARD_RELEASE_PW_INPUT));
|
|
|
- return (ret==ENALBLE)?true:false;
|
|
|
- }
|
|
|
- catch (RuntimeException re) {
|
|
|
- LogUtil.errorLogInfo("", TAG, re);
|
|
|
- return true;
|
|
|
- }
|
|
|
- catch (Exception e)
|
|
|
- {
|
|
|
- //e.printStackTrace();
|
|
|
- LogUtil.errorLogInfo("", TAG, e);
|
|
|
- // 기본값 사용
|
|
|
- return true;
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- public void SetUseGuardReleasePw( boolean Use )
|
|
|
- {
|
|
|
- try
|
|
|
- {
|
|
|
- if( Use == true )UpdateWallPADData(GUARD_RELEASE_PW_INPUT, String.valueOf(ENALBLE));
|
|
|
- else UpdateWallPADData(GUARD_RELEASE_PW_INPUT, String.valueOf(DISABEL));
|
|
|
- }
|
|
|
- catch (RuntimeException re) {
|
|
|
- LogUtil.errorLogInfo("", TAG, re);
|
|
|
- }
|
|
|
- catch (Exception e)
|
|
|
- {
|
|
|
- //e.printStackTrace();
|
|
|
- LogUtil.errorLogInfo("", TAG, e);
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- // 대외향 485 스마트 스위치 연동 현장의 경우 방범외출과 외출모드를 분리 처리함
|
|
|
- // LH향의 경우도 동일하게 방범외출과 외출모드를 분리 처리함
|
|
|
- // 센서 사용여부를 체크해서 외출모드로 처리할지 외출방범모드로 처리할지 구분하도록 한다.
|
|
|
- public boolean GetUseGuardSensorCheck()
|
|
|
- {
|
|
|
- try {
|
|
|
-
|
|
|
- int ret = Integer.parseInt(GetWallPADData(GUARD_SENSOR_CHECK));
|
|
|
- return (ret==ENALBLE)?true:false;
|
|
|
- }
|
|
|
- catch (RuntimeException re) {
|
|
|
- LogUtil.errorLogInfo("", TAG, re);
|
|
|
- return true;
|
|
|
- }
|
|
|
- catch (Exception e)
|
|
|
- {
|
|
|
- //e.printStackTrace();
|
|
|
- LogUtil.errorLogInfo("", TAG, e);
|
|
|
- // 기본값 사용
|
|
|
- return true;
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- public void SetUseGuardSensorCheck( boolean Use )
|
|
|
- {
|
|
|
- try
|
|
|
- {
|
|
|
- if( Use == true )UpdateWallPADData(GUARD_SENSOR_CHECK, String.valueOf(ENALBLE));
|
|
|
- else UpdateWallPADData(GUARD_SENSOR_CHECK, String.valueOf(DISABEL));
|
|
|
- }
|
|
|
- catch (RuntimeException re) {
|
|
|
- LogUtil.errorLogInfo("", TAG, re);
|
|
|
- }
|
|
|
- catch (Exception e)
|
|
|
- {
|
|
|
- //e.printStackTrace();
|
|
|
- LogUtil.errorLogInfo("", TAG, e);
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- public boolean GetCarArrivalSoundOnoff()
|
|
|
- {
|
|
|
- try {
|
|
|
-
|
|
|
- int ret = Integer.parseInt(GetWallPADData(CARARRIVALSND));
|
|
|
- return (ret==CARARRIVALON)?true:false;
|
|
|
- }
|
|
|
- catch (RuntimeException re) {
|
|
|
- LogUtil.errorLogInfo("", TAG, re);
|
|
|
- return false;
|
|
|
- }
|
|
|
- catch (Exception e)
|
|
|
- {
|
|
|
- //e.printStackTrace();
|
|
|
- LogUtil.errorLogInfo("", TAG, e);
|
|
|
- return false;
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- public void SetCarArrivalSoundOnoff(boolean onoff)
|
|
|
- {
|
|
|
- UpdateWallPADData(CARARRIVALSND, CARARRIVALSNDTEXT[onoff?CARARRIVALON:CARARRIVALOFF]);
|
|
|
- }
|
|
|
-
|
|
|
- public static final String ICMDONOFF = "ICMDONOFF";
|
|
|
- public static final int ICMDON = 1;
|
|
|
- public static final int ICMDOFF = 0;
|
|
|
- public static final String[] ICMDONOFFTEXT = {String.valueOf(ICMDOFF),String.valueOf(ICMDON)};
|
|
|
-
|
|
|
- public boolean GetiCMDOnoff()
|
|
|
- {
|
|
|
- try {
|
|
|
- int ret = Integer.parseInt(GetWallPADData(ICMDONOFF));
|
|
|
-
|
|
|
- return (ret==ICMDON)?true:false;
|
|
|
- }
|
|
|
- catch (RuntimeException re) {
|
|
|
- LogUtil.errorLogInfo("", TAG, re);
|
|
|
- return false;
|
|
|
- }
|
|
|
- catch (Exception e)
|
|
|
- {
|
|
|
- //e.printStackTrace();
|
|
|
- LogUtil.errorLogInfo("", TAG, e);
|
|
|
- return false;
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- public void SetiCMDOnoff(boolean onoff)
|
|
|
- {
|
|
|
- UpdateWallPADData(ICMDONOFF, ICMDONOFFTEXT[onoff?ICMDON:ICMDOFF]);
|
|
|
- }
|
|
|
-
|
|
|
- public static final String UPGRADESTATE = "UPGRADESTATE";
|
|
|
- public static final int UPGRADEON = 1;
|
|
|
- public static final int UPGRADEOFF = 0;
|
|
|
- public static final String[] UPGRADESTATETEXT = {String.valueOf(UPGRADEOFF),String.valueOf(UPGRADEON)};
|
|
|
- public static final String UPGRADESTATEDEFAULT = String.valueOf(UPGRADEOFF);
|
|
|
- public boolean GetUpgradeState()
|
|
|
- {
|
|
|
- try {
|
|
|
- int ret = Integer.parseInt(GetWallPADData(UPGRADESTATE));
|
|
|
-
|
|
|
- return (ret==UPGRADEON)?true:false;
|
|
|
- }
|
|
|
- catch (RuntimeException re) {
|
|
|
- LogUtil.errorLogInfo("", TAG, re);
|
|
|
- return false;
|
|
|
- }
|
|
|
- catch (Exception e)
|
|
|
- {
|
|
|
- //e.printStackTrace();
|
|
|
- LogUtil.errorLogInfo("", TAG, e);
|
|
|
- return false;
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- public void SetUpgradeState(boolean onoff)
|
|
|
- {
|
|
|
- UpdateWallPADData(UPGRADESTATE, UPGRADESTATETEXT[onoff?UPGRADEON:UPGRADEOFF]);
|
|
|
- }
|
|
|
-
|
|
|
- public static final String GUIDESND = "GUIDESND";
|
|
|
- public static final int GUIDESNDON = 1;
|
|
|
- public static final int GUIDESNDOFF = 0;
|
|
|
- public static final String[] GUIDESNDTEXT = {String.valueOf(GUIDESNDOFF),String.valueOf(GUIDESNDON)};
|
|
|
-
|
|
|
- public boolean GetGUIDESNDOnoff()
|
|
|
- {
|
|
|
- try {
|
|
|
- int ret = Integer.parseInt(GetWallPADData(GUIDESND));
|
|
|
-
|
|
|
- return (ret==GUIDESNDON)?true:false;
|
|
|
- }
|
|
|
- catch (RuntimeException re) {
|
|
|
- LogUtil.errorLogInfo("", TAG, re);
|
|
|
- return false;
|
|
|
- }
|
|
|
- catch (Exception e)
|
|
|
- {
|
|
|
- //e.printStackTrace();
|
|
|
- LogUtil.errorLogInfo("", TAG, e);
|
|
|
- return false;
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- public void SetGUIDESNDOnoff(boolean onoff)
|
|
|
- {
|
|
|
- UpdateWallPADData(GUIDESND, GUIDESNDTEXT[onoff?ICMDON:ICMDOFF]);
|
|
|
- }
|
|
|
-
|
|
|
- public static final String NOTICECNT = "NOTICECNT";
|
|
|
- public static final String NOTICECNTDEFAULT = String.valueOf(0);
|
|
|
-
|
|
|
- public int GetNoticeCNT()
|
|
|
- {
|
|
|
- try {
|
|
|
- int ret = Integer.parseInt(GetWallPADData(NOTICECNT));
|
|
|
- return ret;
|
|
|
- }
|
|
|
- catch (RuntimeException re) {
|
|
|
- LogUtil.errorLogInfo("", TAG, re);
|
|
|
- return -1;
|
|
|
- }
|
|
|
- catch (Exception e)
|
|
|
- {
|
|
|
- //e.printStackTrace();
|
|
|
- LogUtil.errorLogInfo("", TAG, e);
|
|
|
- return -1;
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- public void SetNoticeCNT(int cnt)
|
|
|
- {
|
|
|
- String data = String.valueOf(cnt);
|
|
|
- UpdateWallPADData(NOTICECNT, data);
|
|
|
- }
|
|
|
-
|
|
|
- public static final String MEMOCNT = "MEMOCNT";
|
|
|
- public static final String MEMOCNTDEFAULT = String.valueOf(0);
|
|
|
-
|
|
|
- public int GetMemoCNT()
|
|
|
- {
|
|
|
- try
|
|
|
- {
|
|
|
- int ret = Integer.parseInt(GetWallPADData(MEMOCNT));
|
|
|
- return ret;
|
|
|
- }
|
|
|
- catch (RuntimeException re) {
|
|
|
- LogUtil.errorLogInfo("", TAG, re);
|
|
|
- return 0;
|
|
|
- }
|
|
|
- catch (Exception e)
|
|
|
- {
|
|
|
- //e.printStackTrace();
|
|
|
- LogUtil.errorLogInfo("", TAG, e);
|
|
|
- return 0;
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- public void SetMemoCNT(int cnt)
|
|
|
- {
|
|
|
- String data = String.valueOf(cnt);
|
|
|
- UpdateWallPADData(MEMOCNT, data);
|
|
|
- }
|
|
|
-
|
|
|
- public static final String VISITORVIDEOCNT = "VISITORVIDEOCNT";
|
|
|
- public static final String VISITORVIDEOCNT_DEFAULT = String.valueOf(0);
|
|
|
-
|
|
|
- public int GetVisitorVideoCNT()
|
|
|
- {
|
|
|
- try
|
|
|
- {
|
|
|
- int ret = Integer.parseInt(GetWallPADData(VISITORVIDEOCNT));
|
|
|
- return ret;
|
|
|
- }
|
|
|
- catch (RuntimeException re) {
|
|
|
- LogUtil.errorLogInfo("", TAG, re);
|
|
|
- return 0;
|
|
|
- }
|
|
|
- catch (Exception e)
|
|
|
- {
|
|
|
- //e.printStackTrace();
|
|
|
- LogUtil.errorLogInfo("", TAG, e);
|
|
|
- return 0;
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- public void SetVisitorVideoCNT(int cnt)
|
|
|
- {
|
|
|
- String data = String.valueOf(cnt);
|
|
|
- UpdateWallPADData(VISITORVIDEOCNT, data);
|
|
|
- }
|
|
|
-
|
|
|
- public static final String ENERGYDATA = "ENERGYDATA";
|
|
|
- public static final String ENERGYDATADEFAULT = "NONE";
|
|
|
-
|
|
|
- public String GetEnergyData()
|
|
|
- {
|
|
|
- return GetWallPADData(ENERGYDATA);
|
|
|
- }
|
|
|
-
|
|
|
- public void SetEnergyData(String Edata)
|
|
|
- {
|
|
|
- UpdateWallPADData(ENERGYDATA, Edata);
|
|
|
- }
|
|
|
- public static final String LASTCHECKENERGY = "LASTCHECKENERGY";
|
|
|
- public static final String LASTCHECKENERGYDEFAULT = "00000000";
|
|
|
-
|
|
|
- public String GetEnergyCheckDate()
|
|
|
- {
|
|
|
- return GetWallPADData(LASTCHECKENERGY);
|
|
|
- }
|
|
|
-
|
|
|
- public void SetEnergyCheckDate(String Edata)
|
|
|
- {
|
|
|
- UpdateWallPADData(LASTCHECKENERGY, Edata);
|
|
|
- }
|
|
|
-
|
|
|
- public static final String ENERGYMONDATA = "ENERGYMONDATA";
|
|
|
- public static final String ENERGYMONDATADEFAULT = "NONE";
|
|
|
-
|
|
|
- public String GetEnergyMonData()
|
|
|
- {
|
|
|
- return GetWallPADData(ENERGYMONDATA);
|
|
|
- }
|
|
|
-
|
|
|
- public void SetEnergyMonData(String Edata)
|
|
|
- {
|
|
|
- UpdateWallPADData(ENERGYMONDATA, Edata);
|
|
|
- }
|
|
|
- public static final String LASTCHECKMONENERGY = "LASTCHECKMONENERGY";
|
|
|
- public static final String LASTCHECKMONENERGYDEFAULT = "00000000";
|
|
|
-
|
|
|
- public String GetEnergyCheckMonth()
|
|
|
- {
|
|
|
- return GetWallPADData(LASTCHECKMONENERGY);
|
|
|
- }
|
|
|
-
|
|
|
- public void SetEnergyCheckMonth(String Edata)
|
|
|
- {
|
|
|
- UpdateWallPADData(LASTCHECKMONENERGY, Edata);
|
|
|
- }
|
|
|
-
|
|
|
- public static final String ELEVATORSTATUS = "ELEVATORSTATUS";
|
|
|
- public static final String ELEVATORSTATUSDEFAULT = "0";
|
|
|
-
|
|
|
- public int GetElevatorStatus()
|
|
|
- {
|
|
|
- try {
|
|
|
- return Integer.parseInt(GetWallPADData(ELEVATORSTATUS));
|
|
|
- }
|
|
|
- catch (RuntimeException re) {
|
|
|
- LogUtil.errorLogInfo("", TAG, re);
|
|
|
- return 0;
|
|
|
- }
|
|
|
- catch (Exception e)
|
|
|
- {
|
|
|
- //e.printStackTrace();
|
|
|
- LogUtil.errorLogInfo("", TAG, e);
|
|
|
- return 0;
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- public void SetElevatorStatus(int Edata)
|
|
|
- {
|
|
|
- UpdateWallPADData(ELEVATORSTATUS, String.valueOf(Edata));
|
|
|
- }
|
|
|
-
|
|
|
- public static final String ELEVATORCALLUP = "ELEVATORCALLUP";
|
|
|
- public static final String ELEVATORCALLUPDEFAULT = "0";
|
|
|
-
|
|
|
- public void SetElevatorCallUpTime()
|
|
|
- {
|
|
|
- UpdateWallPADData(ELEVATORCALLUP, String.valueOf(System.currentTimeMillis()));
|
|
|
- }
|
|
|
-
|
|
|
- public void FreeElevatorCallUpTime()
|
|
|
- {
|
|
|
- UpdateWallPADData(ELEVATORCALLUP, ELEVATORCALLUPDEFAULT);
|
|
|
- }
|
|
|
-
|
|
|
- public long GetElevatorCallUpTime()
|
|
|
- {
|
|
|
- try {
|
|
|
- return Long.parseLong(GetWallPADData(ELEVATORCALLUP));
|
|
|
- }
|
|
|
- catch (RuntimeException re) {
|
|
|
- LogUtil.errorLogInfo("", TAG, re);
|
|
|
- return 0;
|
|
|
- }
|
|
|
- catch (Exception e)
|
|
|
- {
|
|
|
- //e.printStackTrace();
|
|
|
- LogUtil.errorLogInfo("", TAG, e);
|
|
|
- return 0;
|
|
|
- }
|
|
|
- }
|
|
|
- public static final String ELEVATORCALLDN = "ELEVATORCALLDN";
|
|
|
- public static final String ELEVATORCALLDNDEFAULT = "0";
|
|
|
-
|
|
|
- public void SetElevatorCallDnTime()
|
|
|
- {
|
|
|
- UpdateWallPADData(ELEVATORCALLDN, String.valueOf(System.currentTimeMillis()));
|
|
|
- }
|
|
|
-
|
|
|
- public void FreeElevatorCallDnTime()
|
|
|
- {
|
|
|
- UpdateWallPADData(ELEVATORCALLDN, ELEVATORCALLDNDEFAULT);
|
|
|
- }
|
|
|
-
|
|
|
- public long GetElevatorCallDnTime()
|
|
|
- {
|
|
|
- try {
|
|
|
- return Long.parseLong(GetWallPADData(ELEVATORCALLDN));
|
|
|
- }
|
|
|
- catch (RuntimeException re) {
|
|
|
- LogUtil.errorLogInfo("", TAG, re);
|
|
|
- return 0;
|
|
|
- }
|
|
|
- catch (Exception e)
|
|
|
- {
|
|
|
- //e.printStackTrace();
|
|
|
- LogUtil.errorLogInfo("", TAG, e);
|
|
|
- return 0;
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- public static final String POSTCNT = "POSTCNT";
|
|
|
- public static final String POSTCNTDEFAULT = "0";
|
|
|
-
|
|
|
- public void SetPostCNT(int cnt)
|
|
|
- {
|
|
|
- UpdateWallPADData(POSTCNT, String.valueOf(cnt));
|
|
|
- }
|
|
|
-
|
|
|
- public int GetPostCNT()
|
|
|
- {
|
|
|
- try {
|
|
|
- return Integer.parseInt(GetWallPADData(POSTCNT));
|
|
|
- }
|
|
|
- catch (RuntimeException re) {
|
|
|
- LogUtil.errorLogInfo("", TAG, re);
|
|
|
- return 0;
|
|
|
- }
|
|
|
- catch (Exception e)
|
|
|
- {
|
|
|
- //e.printStackTrace();
|
|
|
- LogUtil.errorLogInfo("", TAG, e);
|
|
|
- return 0;
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- public static final String PARCELCNT = "PARCELCNT";
|
|
|
- public static final String PARCELCNTDEFAULT = "0";
|
|
|
-
|
|
|
- public void SetParcelCNT(int cnt)
|
|
|
- {
|
|
|
- UpdateWallPADData(PARCELCNT, String.valueOf(cnt));
|
|
|
- }
|
|
|
-
|
|
|
- public int GetParcelCNT()
|
|
|
- {
|
|
|
- try {
|
|
|
- return Integer.parseInt(GetWallPADData(PARCELCNT));
|
|
|
- }
|
|
|
- catch (RuntimeException re) {
|
|
|
- LogUtil.errorLogInfo("", TAG, re);
|
|
|
- return 0;
|
|
|
- }
|
|
|
- catch (Exception e)
|
|
|
- {
|
|
|
- //e.printStackTrace();
|
|
|
- LogUtil.errorLogInfo("", TAG, e);
|
|
|
- return 0;
|
|
|
- }
|
|
|
- }
|
|
|
- public static final String RESETSCHEDULE = "RESETSCHEDULE";
|
|
|
- public static final int RESET_WEEK = 1000;
|
|
|
- public static final int RESET_MONTH = 1001;
|
|
|
- public static final int RESET_FREE = 1002;
|
|
|
- public static final String RESETSCHEDULEDEFAULT = "NONE;0;0";
|
|
|
-
|
|
|
- public String[] GetResetSchedule()
|
|
|
- {
|
|
|
- return GetWallPADData(RESETSCHEDULE).split(define.DEVCTR_CMD_SPLITER);
|
|
|
- }
|
|
|
-
|
|
|
- public boolean SetResetSchedule(int type, int date, int time)
|
|
|
- {
|
|
|
- if (type == RESET_WEEK && (date < 0 || date >6))
|
|
|
- return false;
|
|
|
- if (type == RESET_MONTH && (date <1 || 28 < date))
|
|
|
- return false;
|
|
|
- if ((type != RESET_FREE) && time < 0 || time >23) return false;
|
|
|
- String SetVal;
|
|
|
- if (type == RESET_FREE) SetVal = RESETSCHEDULEDEFAULT;
|
|
|
- else SetVal = type+define.DEVCTR_CMD_SPLITER+date+define.DEVCTR_CMD_SPLITER+time;
|
|
|
- UpdateWallPADData(RESETSCHEDULE,SetVal);
|
|
|
- return true;
|
|
|
- }
|
|
|
-
|
|
|
- public static final String SETSYSTEMUPDATE = "SETSYSTEMUPDATE";
|
|
|
- public static final String SETSYSTEMUPDATEDEFAULT = "NONE;0;0";
|
|
|
-
|
|
|
- public void SetSystemUpdate(String BSPfule, String APPFile)
|
|
|
- {
|
|
|
- String datafile;
|
|
|
- if (BSPfule== null && APPFile == null)
|
|
|
- {
|
|
|
- datafile = SETSYSTEMUPDATEDEFAULT;
|
|
|
- }
|
|
|
- else {
|
|
|
- datafile = "SET;";
|
|
|
- datafile+=(BSPfule==null)?"no":BSPfule;
|
|
|
- datafile+=";";
|
|
|
- datafile+=(APPFile==null)?"no":APPFile;
|
|
|
- }
|
|
|
- UpdateWallPADData(SETSYSTEMUPDATE,datafile);
|
|
|
- }
|
|
|
-
|
|
|
- public String[] GetSystemUpdateStatus()
|
|
|
- {
|
|
|
- return GetWallPADData(SETSYSTEMUPDATE).split(define.DEVCTR_CMD_SPLITER);
|
|
|
- }
|
|
|
-
|
|
|
- public static final String LASTTIMESYNC = "LASTTIMESYNC";
|
|
|
- public static final String LASTTIMESYNCDEFAULT = "0";
|
|
|
-
|
|
|
- public void SetLastTimeSyncDate(int date)
|
|
|
- {
|
|
|
- UpdateWallPADData(LASTTIMESYNC,String.valueOf(date));
|
|
|
- }
|
|
|
-
|
|
|
- public int GetLastTimeSyncDate()
|
|
|
- {
|
|
|
- try {
|
|
|
- return Integer.parseInt(GetWallPADData(LASTTIMESYNC));
|
|
|
- }
|
|
|
- catch (RuntimeException re) {
|
|
|
- LogUtil.errorLogInfo("", TAG, re);
|
|
|
- return 0;
|
|
|
- }
|
|
|
- catch (Exception e)
|
|
|
- {
|
|
|
- //e.printStackTrace();
|
|
|
- LogUtil.errorLogInfo("", TAG, e);
|
|
|
- return 0;
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- public static final String EMMLIGHTSTATUS = "EMMLIGHTSTATUS";
|
|
|
- public static final int EMMLIGHTON = 1;
|
|
|
- public static final int EMMLIGHTOFF = 0;
|
|
|
- public static final String EMMLIGHTSTATUSDEFAULT = String.valueOf(EMMLIGHTOFF);
|
|
|
-
|
|
|
-
|
|
|
- public void SetEmmLightStatus(boolean status)
|
|
|
- {
|
|
|
- UpdateWallPADData(EMMLIGHTSTATUS,String.valueOf(status?EMMLIGHTON:EMMLIGHTOFF));
|
|
|
- }
|
|
|
-
|
|
|
- public int GetEmmLightStatus()
|
|
|
- {
|
|
|
- try {
|
|
|
- return Integer.parseInt(GetWallPADData(EMMLIGHTSTATUS));
|
|
|
- }
|
|
|
- catch (RuntimeException re) {
|
|
|
- LogUtil.errorLogInfo("", TAG, re);
|
|
|
- return 0;
|
|
|
- }
|
|
|
- catch (Exception e)
|
|
|
- {
|
|
|
- //e.printStackTrace();
|
|
|
- LogUtil.errorLogInfo("", TAG, e);
|
|
|
- return 0;
|
|
|
- }
|
|
|
- }
|
|
|
- /////////////////////////////////////////////////////////////////////////////////////////////////////////
|
|
|
- ////////////////////////////////////// icontrols /////////////////////////////////////////////////////
|
|
|
- public static final String OUTMODE_WAITTIME = "OUTMODE_WAITTIME";
|
|
|
- public static final String OUTMODE_WAITTIME_DEFAULT = "30";
|
|
|
-
|
|
|
- public static final String COMEBACK_WAITTIME = "COMEBACK_WAITTIME";
|
|
|
- public static final String COMEBACK_WAITTIME_DEFAULT = "30";
|
|
|
-
|
|
|
- public static final String OUTMODE_LINK_DEVICE = "OUTMODE_LINKDEVICE";
|
|
|
- public static final String INMODE_LINK_DEVICE = "INMODE_LINKDEVICE";
|
|
|
-
|
|
|
- public static final String IN_BED_LINK_DEVICE = "IN_BED_LINK_DEVICE";
|
|
|
- public static final String OUT_BED_LINK_DEVICE = "OUT_BED_LINK_DEVICE";
|
|
|
-
|
|
|
- public static final String CALL_APK_STATUS = "CALL_APK_STATUS";
|
|
|
- public static final String GLOBALSCREEN_APK_RUN = "GLOBALSCREEN_APK_RUN";
|
|
|
- public static final String REMOTECALL_USER_POPUP_RUN = "REMOTECALL_USER_POPUP_RUN";
|
|
|
- public static final String CALL_STATUS = "CALL_STATUS";
|
|
|
-
|
|
|
- public static final String SOUND_OUTPUT_EVENT_ALARM = "EVENT_ALARM_SOUND";
|
|
|
- public static final String SOUND_OUTPUT_CAR_ALARM = "CAR_ALARM_SOUND";
|
|
|
- public static final String SOUND_OUTPUT_CALL_ALARM = "CALL_ALARM_SOUND";
|
|
|
- public static final String SOUND_OUTPUT_BAND_LOCATION = "BAND_LOCATION_ALARM_SOUND";
|
|
|
-
|
|
|
- /** 스마트키 감지시 알람 (사운드 및 토스트메시지) */
|
|
|
- public static final String SMARTKEY_DETECTION_ALARM = "SMARTKEY_DETECTION_ALARM";
|
|
|
-
|
|
|
- /** 환기 예약 ON/OFF */
|
|
|
- public static final String VEN_RESERVE_ONOFF = "VEN_RESERVE_ONOFF";
|
|
|
-
|
|
|
- public static final String LED_BUTTON_BRIGHTNESS_LEVEL = "LED_BUTTON_BRIGHTNESS_LEVEL"; //GLE 모델 LED 버튼 밝기 조절
|
|
|
- public static final String LED_BUTTON_BRIGHTNESS_LEVEL_DEFAULT = "2";
|
|
|
-
|
|
|
- public static final String MODE_LAMP_BR_LEVEL = "MODE_LAMP_BR_LEVEL";
|
|
|
- public static final String MODE_LAMP_BR_LEVEL_DEFAULT = "4";
|
|
|
-
|
|
|
- public static final String WALLPAD_MASTER_VOLUME = "WALLPAD_MASTER_VOLUME";
|
|
|
- public static final String WALLPAD_MASTER_VOLUME_DEFAULT ="8";
|
|
|
-
|
|
|
-
|
|
|
- public static final String BLACK_OUT_ENERGY = "BLACK_OUT_ENERGY"; // 정전 APU 감지시
|
|
|
-
|
|
|
- public static final String MAIN_SELECTED_SCREEN = "MAIN_SELECTED_SCREEN"; // 메인 스크린 3가지 ( 즐겨찾기 , 메인, 에너지관리 )
|
|
|
- public static final int MAIN_DEFAULT_SCREEN = 0;
|
|
|
- public static final int MAIN_BOOKMARK_SCREEN = 1;
|
|
|
- public static final int MAIN_ENERGY_SCREEN = 2;
|
|
|
-
|
|
|
- public static final String MOOD_LAMP_STATE = "MOOD_LAMP_STATE";
|
|
|
-
|
|
|
-
|
|
|
- public static final String ARS_CONTROL_DEVICE = "ARS_CONTROL_DEVICE";
|
|
|
- public static final String REMOTE_CONTROLS_DEVICE = "REMOTE_CONTROLS_DEVICE";
|
|
|
-
|
|
|
- //전자액자 시작
|
|
|
- List<String> AutoPicturefilesList = new ArrayList<String>();
|
|
|
-
|
|
|
- public static final String AUTOPICTURE_SET_INDEX = "AUTOPICTURE_SET_INDEX";
|
|
|
- public static final String AUTOPICTURE_SET_INDEX_DEFAULT = "0";
|
|
|
-
|
|
|
- public static final String AUTOPICTURE_START_TIME_HOUR_INDEX = "AUTOPICTURE_START_TIME_HOUR_INDEX";
|
|
|
- public static final String AUTOPICTURE_START_TIME_HOUR_INDEX_DEFAULT = "18";
|
|
|
-
|
|
|
- public static final String AUTOPICTURE_START_TIME_MIN_INDEX = "AUTOPICTURE_START_TIME_MIN_INDEX";
|
|
|
- public static final String AUTOPICTURE_START_TIME_MIN_INDEX_DEFAULT = "0";
|
|
|
-
|
|
|
- public static final String AUTOPICTURE_END_TIME_HOUR_INDEX = "AUTOPICTURE_END_TIME_HOUR_INDEX";
|
|
|
- public static final String AUTOPICTURE_END_TIME_HOUR_INDEX_DEFAULT = "22";
|
|
|
-
|
|
|
- public static final String AUTOPICTURE_END_TIME_MIN_INDEX = "AUTOPICTURE_END_TIME_MIN_INDEX";
|
|
|
- public static final String AUTOPICTURE_END_TIME_MIN_INDEX_DEFAULT = "0";
|
|
|
-
|
|
|
- public static final String AUTOPICTURE_SLIDE_INTERVAL_INDEX = "AUTOPICTURE_SLIDE_INTERVAL_INDEX";
|
|
|
- public static final String AUTOPICTURE_SLIDE_INTERVAL_INDEX_DEFAULT = "0";
|
|
|
-
|
|
|
- public static final String AUTOPICTURE_ANIMATION_INDEX = "AUTOPICTURE_ANIMATION_INDEX";
|
|
|
- public static final String AUTOPICTURE_ANIMATION_INDEX_DEFAULT = "0";
|
|
|
-
|
|
|
- //전자액자 끝
|
|
|
-
|
|
|
- /** 안심통화 **/
|
|
|
- public static final String RELIEFCALL_DEGREE = "RELIEFCALL_DEGREE";
|
|
|
- public static final String RELIEFCALL_DEGREE_DEFAULT_VALUE = "1:4:7:10";
|
|
|
-
|
|
|
- /** 방문객원격통화 **/
|
|
|
- public static final String REMOTECALL_REGISTRATION = "REMOTECALL_REGISTRATION";
|
|
|
- public static final String REMOTECALL_REGISTRATION_DEFAULT_VALUE = "false";
|
|
|
- public static final String REMOTECALL_USERCNT = "REMOTECALL_USERCNT";
|
|
|
- public static final String REMOTECALL_USERCNT_DEFAULT_VALUE = "0";
|
|
|
-
|
|
|
- /** 스마트현관카메라 거동수상자 녹화 설정 관련 **/
|
|
|
- public static final String SMARTIOT_RECORDING_STRANGER_ONOFF = "SMARTIOT_RECORDING_STRANGER_ONOFF";
|
|
|
- public static final String SMARTIOT_RECORDING_STRANGER_ONOFF_USE_DEFAULT = "false";
|
|
|
- public static final String SMARTIOT_TAKINGPIC_STRANGER_ONOFF = "SMARTIOT_TAKINGPIC_STRANGER_ONOFF";
|
|
|
- public static final String SMARTIOT_TAKINGPIC_STRANGER_ONOFF_USE_DEFAULT = "true";
|
|
|
- public static final String SMARTIOT_CAM_BRIGHTNESS = "SMARTIOT_CAM_BRIGHTNESS";
|
|
|
- public static final String SMARTIOT_CAM_BRIGHTNESS_VALUE_DEFAULT = "5";
|
|
|
- public static final String SMARTIOT_RECORD_TIME = "SMARTIOT_RECORD_TIME";
|
|
|
- public static final String SMARTIOT_RECORD_TIME_VALUE_DEFAULT = "30";
|
|
|
- public static final String SMARTIOT_SENSOR_SENSITIVITY = "SMARTIOT_SENSOR_SENSITIVITY";
|
|
|
- public static final String SMARTIOT_SENSOR_SENSITIVITY_VALUE_DEFAULT = "5";
|
|
|
- public static final String SMARTIOT_SENSOR_DURATION = "SMARTIOT_SENSOR_DURATION";
|
|
|
- public static final String SMARTIOT_SENSOR_DURATION_VALUE_DEFAULT = "30";
|
|
|
- public static final String SMARTIOT_SENSOR_PERIOD = "SMARTIOT_SENSOR_PERIOD";
|
|
|
- public static final String SMARTIOT_SENSOR_PERIOD_VALUE_DEFAULT = "15";
|
|
|
-
|
|
|
- // 간편모드UX 관련
|
|
|
- public static final String EASYMODE_UX_USE = "EASYMODE_UX_USE";
|
|
|
- public static final String EASYMODE_UX_USE_DEFAULT = "false";
|
|
|
- public static final String EASYMODE_UX_SUPPORT = "EASYMODE_UX_SUPPORT";
|
|
|
- public static final String EASYMODE_UX_USE_SUPPORT_DEFAULT = "false";
|
|
|
-
|
|
|
- //원격검침 정보 시작
|
|
|
- public static final String REMOTE_METERING_EMS_ENABLE = "REMOTE_METERING_EMS_ENABLE_DEFAULT";
|
|
|
- public static final String REMOTE_METERING_EMS_ENABLE_DEFAULT = "true"; //false면 EMS 사용안함, true이면 EMS 사용함
|
|
|
-
|
|
|
- public static final String REMOTE_METERING_NUMBER_OF_KIND = "REMOTE_METERING_NUMBER_OF_KIND_DEFAULT";
|
|
|
- public static final String REMOTE_METERING_NUMBER_OF_KIND_DEFAULT = "5";
|
|
|
-
|
|
|
- //원격검침 - 목표량 저장 시작
|
|
|
- public static final String REMOTE_METERING_TARGET_VALUE_ELECT = "REMOTE_METERING_TARGET_VALUE_ELECT_DEFAULT";
|
|
|
- public static final String REMOTE_METERING_TARGET_VALUE_ELECT_DEFAULT = "300";
|
|
|
-
|
|
|
- public static final String REMOTE_METERING_TARGET_VALUE_WATER = "REMOTE_METERING_TARGET_VALUE_WATER_DEFAULT";
|
|
|
- public static final String REMOTE_METERING_TARGET_VALUE_WATER_DEFAULT = "25";
|
|
|
-
|
|
|
- public static final String REMOTE_METERING_TARGET_VALUE_GAS = "REMOTE_METERING_TARGET_VALUE_GAS_DEFAULT";
|
|
|
- public static final String REMOTE_METERING_TARGET_VALUE_GAS_DEFAULT = "7";
|
|
|
-
|
|
|
- public static final String REMOTE_METERING_TARGET_VALUE_HOTWATER = "REMOTE_METERING_TARGET_VALUE_HOTWATER_DEFAULT";
|
|
|
- public static final String REMOTE_METERING_TARGET_VALUE_HOTWATER_DEFAULT = "4";
|
|
|
-
|
|
|
- public static final String REMOTE_METERING_TARGET_VALUE_HEATING = "REMOTE_METERING_TARGET_VALUE_HEATING_DEFAULT";
|
|
|
- public static final String REMOTE_METERING_TARGET_VALUE_HEATING_DEFAULT = "1.5";
|
|
|
-
|
|
|
- public static final String REMOTE_METERING_TARGET_VALUE_CARBON = "REMOTE_METERING_TARGET_VALUE_CARBON_DEFAULT";
|
|
|
- public static final String REMOTE_METERING_TARGET_VALUE_CARBON_DEFAULT = "0";
|
|
|
- //원격검침 - 목표량 저장 끝
|
|
|
-
|
|
|
- //원격검침 정보 끝
|
|
|
-
|
|
|
- //에너지관리서버의 검침일 설정 - 검침일 or 말일 두가지 중 하나 선택 가능
|
|
|
- public static final String REMOTE_METERING_BASE_DATE_LASTDAY_USE = "REMOTE_METERING_BASE_DATE_LASTDAY_USE_DEFAULT";
|
|
|
- public static final String REMOTE_METERING_BASE_DATE_LASTDAY_USE_DEFAULT = "false"; //false면 검침일 사용, true이면 말일 사용함
|
|
|
- //에너지관리서버 연동 시 목표량 대비 사용량 알림 여부
|
|
|
- public static final String REMOTE_METERING_ALARM_USE = "REMOTE_METERING_ALARM_USE_DEFAULT";
|
|
|
- public static final String REMOTE_METERING_ALARM_USE_DEFAULT = "false";
|
|
|
- //에너지관리서버 연동 - 사용량 알림 시간 설정
|
|
|
- public static final String REMOTE_METERING_ALARM_TIME = "REMOTE_METERING_ALARM_TIME";
|
|
|
- public static final String REMOTE_METERING_ALARM_TIME_DEFAULT = "12";
|
|
|
-
|
|
|
- /** 통화 음량 및 현관카메라 밝기/대비 **/
|
|
|
- //현관 통화 음량
|
|
|
- public static final String CALL_DOORCAM_SOUND_VALUE = "CALL_DOORCAM_SOUND_VALUE";
|
|
|
- public static final String CALL_DOORCAM_SOUND_VALUE_DEFAULT = "5";
|
|
|
-
|
|
|
- //로비 통화 음량
|
|
|
- public static final String CALL_LOBBY_SOUND_VALUE = "CALL_LOBBY_SOUND_VALUE";
|
|
|
- public static final String CALL_LOBBY_SOUND_VALUE_DEFAULT = "5";
|
|
|
-
|
|
|
- //경비 통화 음량
|
|
|
- public static final String CALL_GUARD_SOUND_VALUE = "CALL_GUARD_SOUND_VALUE";
|
|
|
- public static final String CALL_GUARD_SOUND_VALUE_DEFAULT = "5";
|
|
|
-
|
|
|
- //이웃 통화 음량
|
|
|
- public static final String CALL_NEIGHBOR_SOUND_VALUE = "CALL_NEIGHBOR_SOUND_VALUE";
|
|
|
- public static final String CALL_NEIGHBOR_SOUND_VALUE_DEFAULT = "5";
|
|
|
-
|
|
|
- //국선 통화 음량
|
|
|
- public static final String CALL_PSTN_SOUND_VALUE = "CALL_PSTN_SOUND_VALUE";
|
|
|
- public static final String CALL_PSTN_SOUND_VALUE_DEFAULT = "5";
|
|
|
-
|
|
|
- //현관 카메라 밝기(Brightness)
|
|
|
- public static final String CALL_DOORCAM_BRIGHTNESS_VALUE = "CALL_DOORCAM_BRIGHTNESS_VALUE";
|
|
|
- public static final String CALL_DOORCAM_BRIGHTNESS_VALUE_DEFAULT = "5";
|
|
|
-
|
|
|
- //현관 카메라 대비(Contrast)
|
|
|
- public static final String CALL_DOORCAM_CONTRAST_VALUE = "CALL_DOORCAM_CONTRAST_VALUE";
|
|
|
- public static final String CALL_DOORCAM_CONTRAST_VALUE_DEFAULT = "5";
|
|
|
-
|
|
|
- //엘리베이터 위젯 복구용
|
|
|
- public static final String ELEVATOR_WIDGET_RESTORE = "ELEVATOR_WIDGET_RESTORE";
|
|
|
- public static final String ELEVATOR_WIDGET_RESTORE_VALUE_DEFAULT = "false";
|
|
|
-
|
|
|
- //환기 욕실배기 기능 연동기능
|
|
|
- public static final String VENTI_BATHROOM = "VENTI_BATHROOM";
|
|
|
- public static final String VENTI_BATHROOM_VALUE_DEFAULT = "true";
|
|
|
-
|
|
|
- //거실 조명 그룹설정
|
|
|
- public static final String LIVING_LIGHT_GROUP = "LIVING_LIGHT_GROUP";
|
|
|
- public static final String LIVING_LIGHT_GROUP_VALUE_DEFAULT = "1:1:1";
|
|
|
-
|
|
|
- //현산향 게이트웨이 command
|
|
|
- public static final String DB_WALLPAD_IGW_COMMAND_COUNT = "DB_WALLPAD_REBOOTING_COUNT";
|
|
|
-
|
|
|
- //메인월패드 난방 방 개수
|
|
|
- public static final String DB_WALLPAD_HEATING_ROOM_NUM = "DB_WALLPAD_HEATING_ROOM_NUM";
|
|
|
-
|
|
|
- //근접 센서 민감도
|
|
|
- public static final String CLOSE_SENSOR_VALUE = "CLOSE_SENSOR_VALUE";
|
|
|
- public static final String CLOSE_SENSOR_VALUE_DEFAULT = "5";
|
|
|
-
|
|
|
- //현재 화면 번호
|
|
|
- public static final String CURRENT_SCREEN_ID_VALUE = "CURRENT_SCREEN_ID_VALUE";
|
|
|
- public static final String CURRENT_SCREEN_ID_VALUE_DEFAULT = "0";
|
|
|
-
|
|
|
- // 스마트분전반 현재/월누적 선택값 저장
|
|
|
- public static final String NOW_MONTH_SELECT = "NOW_MONTH_SELECT";
|
|
|
- public static final String NOW_MONTH_SELECT_DEFAULT = "NOW";
|
|
|
-
|
|
|
- // 실시간검침기 전력 - 누적전력사용량 저장
|
|
|
- public static final String REALTIMEMETER__ELEC_ACC = "REALTIMEMETER__ELEC_ACC";
|
|
|
-
|
|
|
- // 메인화면 GUI 선택
|
|
|
- public static final String MAIN_GUI_SELECT = "MAIN_GUI_SELECT";
|
|
|
- public static final String MAIN_GUI_SELECT_DEFAULT = "BASIC";
|
|
|
-
|
|
|
- // 거실조명 모드제어 설정값 (Preset)
|
|
|
- // "조명1전원:디밍:색온도/조명2전원:디밍:색온도 ~ 조명8전원:디밍:색온도"
|
|
|
- // 그룹제어시에는 조명1의 값만 사용한다. (조명전원 : on/off/none(don't care), 디밍/색온도 : 1 ~ 10, 미설정시 0)
|
|
|
- public static final String LIVINGLIGHT_PRESET_00 = "LIVINGLIGHT_PRESET_00";
|
|
|
- public static final String LIVINGLIGHT_PRESET_00_VALUE_DEFAULT = "none:0:0/none:0:0/none:0:0/none:0:0/none:0:0/none:0:0/none:0:0/none:0:0/none:0:0"; // "그룹전원:그룹디밍:그룹색온도/조명1전원:디밍:색온도/조명2전원:디밍:색온도 ~ 조명8전원:디밍:색온도"
|
|
|
- public static final String LIVINGLIGHT_PRESET_01 = "LIVINGLIGHT_PRESET_01";
|
|
|
- public static final String LIVINGLIGHT_PRESET_01_VALUE_DEFAULT = "none:0:0/none:0:0/none:0:0/none:0:0/none:0:0/none:0:0/none:0:0/none:0:0/none:0:0"; // "그룹전원:그룹디밍:그룹색온도/조명1전원:디밍:색온도/조명2전원:디밍:색온도 ~ 조명8전원:디밍:색온도"
|
|
|
- public static final String LIVINGLIGHT_PRESET_02 = "LIVINGLIGHT_PRESET_02";
|
|
|
- public static final String LIVINGLIGHT_PRESET_02_VALUE_DEFAULT = "none:0:0/none:0:0/none:0:0/none:0:0/none:0:0/none:0:0/none:0:0/none:0:0/none:0:0"; // "그룹전원:그룹디밍:그룹색온도/조명1전원:디밍:색온도/조명2전원:디밍:색온도 ~ 조명8전원:디밍:색온도"
|
|
|
- public static final String LIVINGLIGHT_PRESET_03 = "LIVINGLIGHT_PRESET_03";
|
|
|
- public static final String LIVINGLIGHT_PRESET_03_VALUE_DEFAULT = "none:0:0/none:0:0/none:0:0/none:0:0/none:0:0/none:0:0/none:0:0/none:0:0/none:0:0"; // "그룹전원:그룹디밍:그룹색온도/조명1전원:디밍:색온도/조명2전원:디밍:색온도 ~ 조명8전원:디밍:색온도"
|
|
|
- public static final String LIVINGLIGHT_PRESET_04 = "LIVINGLIGHT_PRESET_04";
|
|
|
- public static final String LIVINGLIGHT_PRESET_04_VALUE_DEFAULT = "none:0:0/none:0:0/none:0:0/none:0:0/none:0:0/none:0:0/none:0:0/none:0:0/none:0:0"; // "그룹전원:그룹디밍:그룹색온도/조명1전원:디밍:색온도/조명2전원:디밍:색온도 ~ 조명8전원:디밍:색온도"
|
|
|
- public static final String LIVINGLIGHT_PRESET_05 = "LIVINGLIGHT_PRESET_05";
|
|
|
- public static final String LIVINGLIGHT_PRESET_05_VALUE_DEFAULT = "none:0:0/none:0:0/none:0:0/none:0:0/none:0:0/none:0:0/none:0:0/none:0:0/none:0:0"; // "그룹전원:그룹디밍:그룹색온도/조명1전원:디밍:색온도/조명2전원:디밍:색온도 ~ 조명8전원:디밍:색온도"
|
|
|
- public static final String LIVINGLIGHT_PRESET_06 = "LIVINGLIGHT_PRESET_06";
|
|
|
- public static final String LIVINGLIGHT_PRESET_06_VALUE_DEFAULT = "none:0:0/none:0:0/none:0:0/none:0:0/none:0:0/none:0:0/none:0:0/none:0:0/none:0:0"; // "그룹전원:그룹디밍:그룹색온도/조명1전원:디밍:색온도/조명2전원:디밍:색온도 ~ 조명8전원:디밍:색온도"
|
|
|
- public static final String LIVINGLIGHT_PRESET_07 = "LIVINGLIGHT_PRESET_07";
|
|
|
- public static final String LIVINGLIGHT_PRESET_07_VALUE_DEFAULT = "none:0:0/none:0:0/none:0:0/none:0:0/none:0:0/none:0:0/none:0:0/none:0:0/none:0:0"; // "그룹전원:그룹디밍:그룹색온도/조명1전원:디밍:색온도/조명2전원:디밍:색온도 ~ 조명8전원:디밍:색온도"
|
|
|
- public static final String LIVINGLIGHT_PRESET_08 = "LIVINGLIGHT_PRESET_08";
|
|
|
- public static final String LIVINGLIGHT_PRESET_08_VALUE_DEFAULT = "none:0:0/none:0:0/none:0:0/none:0:0/none:0:0/none:0:0/none:0:0/none:0:0/none:0:0"; // "그룹전원:그룹디밍:그룹색온도/조명1전원:디밍:색온도/조명2전원:디밍:색온도 ~ 조명8전원:디밍:색온도"
|
|
|
-
|
|
|
- // 층간소음 팝업 발생
|
|
|
- public static final String INTERLAYER_NOISE_POPUP_USE = "INTERLAYER_NOISE_POPUP_USE";
|
|
|
- public static final String INTERLAYER_NOISE_POPUP_USE_DEFAULT = "false";
|
|
|
-
|
|
|
- // 층간소음 장비 상태
|
|
|
- public static final String INTERLAYER_NOISE_SENSOR_STATUS = "INTERLAYER_NOISE_SENSOR_STATUS";
|
|
|
- public static final String INTERLAYER_NOISE_SENSOR_STATUS_DEFAULT = "NORMAL";
|
|
|
-
|
|
|
- // 멀티스위치 콘센트 사용여부
|
|
|
- public static final String MULTISWITCH_CONCENT_USE = "MULTISWITCH_CONCENT_USE";
|
|
|
- public static final String MULTISWITCH_CONCENT_USE_DEFAULT = "false";
|
|
|
-
|
|
|
- // 웰컴조명 - 거실등,복도등,주방등 선택유무
|
|
|
- public static final String WELCOMELIGHT_SELECT_ITEMS = "WELCOMELIGHT_SELECT_ITEMS";
|
|
|
- public static final String WELCOMELIGHT_SELECT_ITEMS_DEFAULT = "0/0/0";
|
|
|
-
|
|
|
- // 재실센서 시나리오-기본모드1 사용여부
|
|
|
- public static final String INROOMDETECT_SCENARIO_NORMAL1 = "INROOMDETECT_SCENARIO_NORMAL1";
|
|
|
- public static final String INROOMDETECT_SCENARIO_NORMAL1_DEFAULT = "false";
|
|
|
-
|
|
|
- // 재실센서 시나리오-기본모드2 사용여부
|
|
|
- public static final String INROOMDETECT_SCENARIO_NORMAL2 = "INROOMDETECT_SCENARIO_NORMAL2";
|
|
|
- public static final String INROOMDETECT_SCENARIO_NORMAL2_DEFAULT = "false";
|
|
|
-
|
|
|
- // 재실센서 시나리오-사용자설정 사용여부
|
|
|
- public static final String INROOMDETECT_SCENARIO_USERSET = "INROOMDETECT_SCENARIO_USERSET";
|
|
|
- public static final String INROOMDETECT_SCENARIO_USERSET_DEFAULT = "false";
|
|
|
-
|
|
|
- // 재실센서 시나리오-전기레인지 안전모드 사용여부
|
|
|
- public static final String INROOMDETECT_SCENARIO_ELECRANGE_SAFE = "INROOMDETECT_SCENARIO_ELECRANGE_SAFE";
|
|
|
- public static final String INROOMDETECT_SCENARIO_ELECRANGE_SAFE_DEFAULT = "false";
|
|
|
-
|
|
|
- // 재실센서 시나리오-기본모드1 설정
|
|
|
- public static final String INROOMDETECT_SCENARIO_NORMAL1_INFO = "INROOMDETECT_SCENARIO_NORMAL1_INFO";
|
|
|
- public static final String INROOMDETECT_SCENARIO_NORMAL1_INFO_DEFAULT = "KIND-NORMAL1/START-AM:09:30/END-PM:10:00/DATE-1:2:3:4:5:6:7/" +
|
|
|
- "LOC-LIV;KIT;TBL;MROOM;BED1;BED2/TIME1-60/ACT1-DIM:30/TIME2-20/ACT2-STAT:OFF";
|
|
|
-
|
|
|
- // 재실센서 시나리오-기본모드2 설정
|
|
|
- public static final String INROOMDETECT_SCENARIO_NORMAL2_INFO = "INROOMDETECT_SCENARIO_NORMAL2_INFO";
|
|
|
- public static final String INROOMDETECT_SCENARIO_NORMAL2_INFO_DEFAULT = "KIND-NORMAL2/START-PM:09:30/END-AM:06:30/DATE-1:2:3:4:5:6:7/" +
|
|
|
- "LOC-TBL/TIME1-0/ACT1-STAT:ON;DIM:10/TIME2-10/ACT2-STAT:OFF";
|
|
|
-
|
|
|
- // 재실센서 시나리오-사용자모드 설정
|
|
|
- public static final String INROOMDETECT_SCENARIO_USERSET_INFO = "INROOMDETECT_SCENARIO_USERSET_INFO";
|
|
|
- public static final String INROOMDETECT_SCENARIO_USERSET_INFO_DEFAULT = "KIND-USERSET/START-AM:09:30/END-PM:10:00/DATE-1:2:3:4:5:6:7/" +
|
|
|
- "LOC-LIV;KIT;TBL;MROOM;BED1;BED2/TIME1-60/ACT1-DIM:30/TIME2-20/ACT2-STAT:OFF";
|
|
|
-
|
|
|
- // 재실센서 시나리오-전기레인지 안전모드 설정
|
|
|
- public static final String INROOMDETECT_SCENARIO_ELECRANGE_SAFE_INFO = "INROOMDETECT_SCENARIO_ELECRANGE_SAFE_INFO";
|
|
|
- public static final String INROOMDETECT_SCENARIO_ELECRANGE_SAFE_INFO_DEFAULT = "KIND-ELECRANGE_SAFE/START-PM:06:30/END-AM:06:30/DATE-1:2:3:4:5:6:7/" +
|
|
|
- "LOC-ELECRANGE/TIME1-20/ACT1-POPUP/TIME2-20/ACT2-ALARM";
|
|
|
-
|
|
|
- public static final String CAMERA_ENCODING_ERROR = "CAMERA_ENCODING_ERROR";
|
|
|
- public static final String CAMERA_ENCODING_ERROR_DEFAULT = "false";
|
|
|
-
|
|
|
- // 통화기능 설정
|
|
|
- public static final String CALLFUNCTION_FRONT_USE = "CALLFUNCTION_FRONT_USE";
|
|
|
- public static final String CALLFUNCTION_FRONT_USE_DEFAULT = "true";
|
|
|
- public static final String CALLFUNCTION_LOBBY_USE = "CALLFUNCTION_LOBBY_USE";
|
|
|
- public static final String CALLFUNCTION_LOBBY_USE_DEFAULT = "true";
|
|
|
- public static final String CALLFUNCTION_GUARD_USE = "CALLFUNCTION_GUARD_USE";
|
|
|
- public static final String CALLFUNCTION_GUARD_USE_DEFAULT = "true";
|
|
|
- public static final String CALLFUNCTION_RESIDENCE_USE = "CALLFUNCTION_RESIDENCE_USE";
|
|
|
- public static final String CALLFUNCTION_RESIDENCE_USE_DEFAULT = "true";
|
|
|
- public static final String CALLFUNCTION_PSTN_USE = "CALLFUNCTION_PSTN_USE";
|
|
|
- public static final String CALLFUNCTION_PSTN_USE_DEFAULT = "true";
|
|
|
- public static final String CALLFUNCTION_CALLHISTORY_USE = "CALLFUNCTION_CALLHISTORY_USE";
|
|
|
- public static final String CALLFUNCTION_CALLHISTORY_USE_DEFAULT = "true";
|
|
|
- public static final String CALLFUNCTION_VISITORPIC_USE = "CALLFUNCTION_VISITORPIC_USE";
|
|
|
- public static final String CALLFUNCTION_VISITORPIC_USE_DEFAULT = "true";
|
|
|
-
|
|
|
- //////////////////////////////////////icontrols End/////////////////////////////////////////////////////
|
|
|
- /////////////////////////////////////////////////////////////////////////////////////////////////////////
|
|
|
- public static final String DEVICE_ROOM = "DEVICE_ROOM";
|
|
|
- public static final String DEVICE_ROOM_LIGHT = "DEVICE_ROOM_LIGHT";
|
|
|
- public static final String DEVICE_ROOM_DEFAULT = "1:3:4:5:6:7"; //GetEachRoomNameInfo == false 일 시
|
|
|
- public static final String DEVICE_ROOM_DEFAULT_LIGHT = "1:15:3:4:5:6"; //GetEachRoomNameInfo == true 일 시 조명&콘센트 방 명칭
|
|
|
-
|
|
|
-
|
|
|
- public static final String[] RoomTitle = {"거실","안방","방1","방2","방3","방4","방5","방6","방7","방8","작은방","작은방1","작은방2","서재","주방","큰방","공부방","알파룸",
|
|
|
- "할아버지","할머니","아버지","어머니","아들","큰아들","작은아들","딸","큰딸","작은딸","막내","침실1","침실2","침실3","침실4","침실5","침실6"};
|
|
|
-
|
|
|
- /**
|
|
|
- *
|
|
|
- * @return
|
|
|
- */
|
|
|
- public String [] GetDevRoomName()
|
|
|
- {
|
|
|
- try
|
|
|
- {
|
|
|
- String ret = GetWallPADData(DEVICE_ROOM);
|
|
|
- String[] getidx = ret.split(define.DEVCTR_DATA_SPLITER);
|
|
|
-
|
|
|
- for (int i = 0; i<getidx.length; i++)
|
|
|
- getidx[i] = RoomTitle[Integer.parseInt(getidx[i])-1];
|
|
|
-
|
|
|
- return getidx;
|
|
|
- }
|
|
|
- catch (RuntimeException re) {
|
|
|
- LogUtil.errorLogInfo("", TAG, re);
|
|
|
- return null;
|
|
|
- }
|
|
|
- catch (Exception e)
|
|
|
- {
|
|
|
- //e.printStackTrace();
|
|
|
- LogUtil.errorLogInfo("", TAG, e);
|
|
|
- return null;
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- /**
|
|
|
- * 난방 조명 방명칭 설정 값을 가져온다
|
|
|
- * @param DeviceType = "light"이면 조명 설정정보 가져오고, "heating"이면 난방 설정정보 가져옴
|
|
|
- * @return String [] 해당 방 명칭 String 배열
|
|
|
- */
|
|
|
- public String [] GetDevRoomName(String DeviceType)
|
|
|
- {
|
|
|
- try
|
|
|
- {
|
|
|
- WallpadDeviceSet wallpadDeviceSet = new WallpadDeviceSet(CTX);
|
|
|
- boolean UseEachRoomName = wallpadDeviceSet.GetEachRoomNameInfo();
|
|
|
- wallpadDeviceSet.closeDB();
|
|
|
-
|
|
|
- String[] getidx = null;
|
|
|
- String ret;
|
|
|
-
|
|
|
- ret = GetWallPADData(DEVICE_ROOM);
|
|
|
- getidx = ret.split(define.DEVCTR_DATA_SPLITER);
|
|
|
-
|
|
|
- for (int i = 0; i<getidx.length; i++)
|
|
|
- getidx[i] = RoomTitle[Integer.parseInt(getidx[i])-1];
|
|
|
-
|
|
|
- if(UseEachRoomName == false)
|
|
|
- {
|
|
|
- return getidx;
|
|
|
- }
|
|
|
- else
|
|
|
- {
|
|
|
- if(DeviceType.equalsIgnoreCase("light") == true)
|
|
|
- {
|
|
|
- ret = GetWallPADData(DEVICE_ROOM_LIGHT);
|
|
|
- getidx = ret.split(define.DEVCTR_DATA_SPLITER);
|
|
|
-
|
|
|
- for (int i = 0; i<getidx.length; i++)
|
|
|
- getidx[i] = RoomTitle[Integer.parseInt(getidx[i])-1];
|
|
|
- }
|
|
|
- else if(DeviceType.equalsIgnoreCase("heating") == true)
|
|
|
- {
|
|
|
- return getidx;
|
|
|
- }
|
|
|
- }
|
|
|
- return getidx;
|
|
|
- }
|
|
|
- catch (RuntimeException re) {
|
|
|
- LogUtil.errorLogInfo("", TAG, re);
|
|
|
- return null;
|
|
|
- }
|
|
|
- catch (Exception e)
|
|
|
- {
|
|
|
- //e.printStackTrace();
|
|
|
- LogUtil.errorLogInfo("", TAG, e);
|
|
|
- return null;
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- public int[] GetDevRoomIdx()
|
|
|
- {
|
|
|
- try
|
|
|
- {
|
|
|
- String ret = GetWallPADData(DEVICE_ROOM);
|
|
|
- String[] getidx = ret.split(define.DEVCTR_DATA_SPLITER);
|
|
|
- int[] retdata = new int[getidx.length];
|
|
|
- for (int i = 0; i<getidx.length; i++)
|
|
|
- retdata[i] = Integer.parseInt(getidx[i]);
|
|
|
- return retdata;
|
|
|
- }
|
|
|
- catch (RuntimeException re) {
|
|
|
- LogUtil.errorLogInfo("", TAG, re);
|
|
|
- return null;
|
|
|
- }
|
|
|
- catch (Exception e)
|
|
|
- {
|
|
|
- //e.printStackTrace();
|
|
|
- LogUtil.errorLogInfo("", TAG, e);
|
|
|
- return null;
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- /**
|
|
|
- * 난방 조명 방명칭 설정 index값을 가져온다
|
|
|
- * @param DeviceType = "light"이면 조명 설정정보 가져오고, "heating"이면 난방 설정정보 가져옴
|
|
|
- * @return int [] 해당 방 명칭 int 배열
|
|
|
- */
|
|
|
- public int[] GetDevRoomIdx(String DeviceType)
|
|
|
- {
|
|
|
- try
|
|
|
- {
|
|
|
- WallpadDeviceSet wallpadDeviceSet = new WallpadDeviceSet(CTX);
|
|
|
- boolean UseEachRoomName = wallpadDeviceSet.GetEachRoomNameInfo();
|
|
|
- wallpadDeviceSet.closeDB();
|
|
|
-
|
|
|
- String ret = GetWallPADData(DEVICE_ROOM);
|
|
|
- String[] getidx = ret.split(define.DEVCTR_DATA_SPLITER);
|
|
|
- int[] retdata = new int[getidx.length];
|
|
|
- for (int i = 0; i<getidx.length; i++)
|
|
|
- retdata[i] = Integer.parseInt(getidx[i]);
|
|
|
-
|
|
|
- if(UseEachRoomName == false)
|
|
|
- {
|
|
|
- return retdata;
|
|
|
- }
|
|
|
- else
|
|
|
- {
|
|
|
- if(DeviceType.equalsIgnoreCase("light") == true)
|
|
|
- {
|
|
|
- ret = GetWallPADData(DEVICE_ROOM_LIGHT);
|
|
|
- getidx = ret.split(define.DEVCTR_DATA_SPLITER);
|
|
|
- retdata = new int[getidx.length];
|
|
|
- for (int i = 0; i<getidx.length; i++)
|
|
|
- retdata[i] = Integer.parseInt(getidx[i]);
|
|
|
- }
|
|
|
- else if(DeviceType.equalsIgnoreCase("heating") == true)
|
|
|
- {
|
|
|
- return retdata;
|
|
|
- }
|
|
|
- }
|
|
|
- return retdata;
|
|
|
- }
|
|
|
- catch (RuntimeException re) {
|
|
|
- LogUtil.errorLogInfo("", TAG, re);
|
|
|
- return null;
|
|
|
- }
|
|
|
- catch (Exception e)
|
|
|
- {
|
|
|
- //e.printStackTrace();
|
|
|
- LogUtil.errorLogInfo("", TAG, e);
|
|
|
- return null;
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- public int SetDevRoomIdx(int[] set)
|
|
|
- {
|
|
|
- try{
|
|
|
- String indata=String.valueOf(set[0]);
|
|
|
- for(int i =1; i<set.length;i++)
|
|
|
- indata+=(":"+set[i]);
|
|
|
- return (UpdateWallPADData(DEVICE_ROOM, indata))?0:-1;
|
|
|
- }
|
|
|
- catch (RuntimeException re) {
|
|
|
- LogUtil.errorLogInfo("", TAG, re);
|
|
|
- return APIErrorCode.EXCEPTION;
|
|
|
- }
|
|
|
- catch (Exception e)
|
|
|
- {
|
|
|
- //e.printStackTrace();
|
|
|
- LogUtil.errorLogInfo("", TAG, e);
|
|
|
- return APIErrorCode.EXCEPTION;
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- /**
|
|
|
- * 난방 조명 방명칭 설정한다
|
|
|
- * @param DeviceType = "light"이면 조명 설정하고, "heating"이면 난방 설정함
|
|
|
- * @return int 0보다 작으면 실패
|
|
|
- */
|
|
|
- public int SetDevRoomIdx(int[] set, String DeviceType)
|
|
|
- {
|
|
|
- try
|
|
|
- {
|
|
|
- WallpadDeviceSet wallpadDeviceSet = new WallpadDeviceSet(CTX);
|
|
|
- boolean UseEachRoomName = wallpadDeviceSet.GetEachRoomNameInfo();
|
|
|
- wallpadDeviceSet.closeDB();
|
|
|
-
|
|
|
- String indata = String.valueOf(set[0]);
|
|
|
- for (int i = 1; i < set.length; i++)
|
|
|
- indata += (":" + set[i]);
|
|
|
-
|
|
|
- if(UseEachRoomName == false)
|
|
|
- {
|
|
|
- return (UpdateWallPADData(DEVICE_ROOM, indata)) ? 0 : -1;
|
|
|
- }
|
|
|
- else
|
|
|
- {
|
|
|
- if(DeviceType.equalsIgnoreCase("light") == true)
|
|
|
- {
|
|
|
- return (UpdateWallPADData(DEVICE_ROOM_LIGHT, indata)) ? 0 : -1;
|
|
|
- }
|
|
|
- else if(DeviceType.equalsIgnoreCase("heating") == true)
|
|
|
- {
|
|
|
- return (UpdateWallPADData(DEVICE_ROOM, indata)) ? 0 : -1;
|
|
|
- }
|
|
|
- }
|
|
|
- return -1;
|
|
|
-
|
|
|
- }
|
|
|
- catch (RuntimeException re) {
|
|
|
- LogUtil.errorLogInfo("", TAG, re);
|
|
|
- return APIErrorCode.EXCEPTION;
|
|
|
- }
|
|
|
- catch (Exception e)
|
|
|
- {
|
|
|
- //e.printStackTrace();
|
|
|
- LogUtil.errorLogInfo("", TAG, e);
|
|
|
- return APIErrorCode.EXCEPTION;
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- public WallpadStatusData(Context ctx) {
|
|
|
- super(ctx);
|
|
|
- }
|
|
|
-
|
|
|
-
|
|
|
- public void SetAlarmStatus(int status)
|
|
|
- {
|
|
|
- int alarmfree;
|
|
|
- if (status > ALARMTEXT.length-1 || status < 0 ) return;
|
|
|
- alarmfree = GetAlarmStatus();
|
|
|
- UpdateWallPADData(ALARM_STATUS, ALARMTEXT[status]);
|
|
|
-
|
|
|
- if(alarmfree != status)
|
|
|
- {
|
|
|
- // 상태가 변경되었다면 상태 변경 BR을 송신한다.
|
|
|
- Intent notiIntent = new Intent();
|
|
|
- notiIntent.setAction(define.NOTIFY_ACNAME);
|
|
|
- notiIntent.putExtra(define.NOTIBR_KIND, define.NOTIFY_ALARM_CHANGE);
|
|
|
- CTX.sendBroadcast(notiIntent);
|
|
|
- }
|
|
|
-
|
|
|
- if (status == ALARM_NONE ||status == GUARD_IN || status == GUARD_OUT)
|
|
|
- {
|
|
|
- String modeStr = null;
|
|
|
- if (status == ALARM_NONE)
|
|
|
- {
|
|
|
- modeStr = "normal";
|
|
|
- if (alarmfree==ALARM_STOP || alarmfree == ALARM_ARISE)
|
|
|
- {
|
|
|
- Intent notiIntent = new Intent();
|
|
|
- notiIntent.setAction(define.NOTIFY_ACNAME);
|
|
|
- notiIntent.putExtra(define.NOTIBR_KIND, define.NOTIFY_ALARMFREED);
|
|
|
- CTX.sendBroadcast(notiIntent);
|
|
|
- }
|
|
|
- }
|
|
|
- else if (status == GUARD_IN)
|
|
|
- modeStr = "occupied";
|
|
|
- else
|
|
|
- {
|
|
|
- modeStr = "unoccupied";
|
|
|
- Intent notiIntent = new Intent();
|
|
|
- notiIntent.setAction(define.NOTIFY_ACNAME);
|
|
|
- notiIntent.putExtra(define.NOTIBR_KIND, define.NOTIFY_OUTGOINGSETTED);
|
|
|
- CTX.sendBroadcast(notiIntent);
|
|
|
- }
|
|
|
-
|
|
|
- if( alarmfree == GUARD_OUT_WAIT && status == ALARM_NONE )
|
|
|
- {
|
|
|
- // 단지서버로 메세지를 보내지 않도록 한다.
|
|
|
- }
|
|
|
- else
|
|
|
- {
|
|
|
- WallPadiMAPNotifyAPI notif = new WallPadiMAPNotifyAPI(CTX);
|
|
|
- notif.ModeChanged(modeStr);
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- public int GetAlarmStatus()
|
|
|
- {
|
|
|
- try
|
|
|
- {
|
|
|
- String ret = GetWallPADData(ALARM_STATUS);
|
|
|
- return Integer.parseInt(ret);
|
|
|
- }
|
|
|
- catch (RuntimeException re) {
|
|
|
- LogUtil.errorLogInfo("", TAG, re);
|
|
|
- return 0;
|
|
|
- }
|
|
|
- catch (Exception e)
|
|
|
- {
|
|
|
- //e.printStackTrace();
|
|
|
- LogUtil.errorLogInfo("", TAG, e);
|
|
|
- return 0;
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- public void SetAlarmType(int type)
|
|
|
- {
|
|
|
- try {
|
|
|
- if (type > ALARMTYPETEXT.length-1 || type < 0 ) return;
|
|
|
- UpdateWallPADData(ALARM_TYPE, ALARMTYPETEXT[type]);
|
|
|
- }
|
|
|
- catch (RuntimeException re) {
|
|
|
- LogUtil.errorLogInfo("", TAG, re);
|
|
|
- }
|
|
|
- catch (Exception e)
|
|
|
- {
|
|
|
- //e.printStackTrace();
|
|
|
- LogUtil.errorLogInfo("", TAG, e);
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- public int GetAlarmType()
|
|
|
- {
|
|
|
- try {
|
|
|
- String ret = GetWallPADData(ALARM_TYPE);
|
|
|
- return Integer.parseInt(ret);
|
|
|
- }
|
|
|
- catch (RuntimeException re) {
|
|
|
- LogUtil.errorLogInfo("", TAG, re);
|
|
|
- return 0;
|
|
|
- }
|
|
|
- catch (Exception e)
|
|
|
- {
|
|
|
- //e.printStackTrace();
|
|
|
- LogUtil.errorLogInfo("", TAG, e);
|
|
|
- return 0;
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- public void SetMorningCall(int set, int hour, int min)
|
|
|
- {
|
|
|
- if (set > MORNINGCALLTEXT.length-1 || set < 0 ) return;
|
|
|
- String mcallStr = MORNINGCALLTEXT[set]+":"+hour+":"+min;
|
|
|
- UpdateWallPADData(MORNINGCALL_STATUS, mcallStr);
|
|
|
- }
|
|
|
-
|
|
|
- public int GetMorningCallStatus()
|
|
|
- {
|
|
|
- try {
|
|
|
- String ret = GetWallPADData(MORNINGCALL_STATUS);
|
|
|
- String retarr[] = ret.split(":");
|
|
|
- MorningHour = Integer.parseInt(retarr[1]);
|
|
|
- MorningMin = Integer.parseInt(retarr[2]);
|
|
|
- return Integer.parseInt(retarr[0]);
|
|
|
- }
|
|
|
- catch (RuntimeException re) {
|
|
|
- LogUtil.errorLogInfo("", TAG, re);
|
|
|
- return -1;
|
|
|
- }
|
|
|
- catch (Exception e)
|
|
|
- {
|
|
|
- //e.printStackTrace();
|
|
|
- LogUtil.errorLogInfo("", TAG, e);
|
|
|
- return -1;
|
|
|
- }
|
|
|
- }
|
|
|
- public int MorningHour = 0;
|
|
|
- public int MorningMin = 0;
|
|
|
-
|
|
|
- public void SetManagerPW(String pw)
|
|
|
- {
|
|
|
- UpdateWallPADData(MANAGER_PW, pw);
|
|
|
- }
|
|
|
-
|
|
|
- public String GetManagerPW()
|
|
|
- {
|
|
|
- String ret = GetWallPADData(MANAGER_PW);
|
|
|
- return ret;
|
|
|
- }
|
|
|
-
|
|
|
-
|
|
|
- public void SetUserPW(String pw)
|
|
|
- {
|
|
|
- UpdateWallPADData(USER_PW, pw);
|
|
|
- }
|
|
|
-
|
|
|
- public String GetUserPW()
|
|
|
- {
|
|
|
- String ret = GetWallPADData(USER_PW);
|
|
|
- return ret;
|
|
|
- }
|
|
|
-
|
|
|
- public void SetWebCtrPW(String pw)
|
|
|
- {
|
|
|
- UpdateWallPADData(WEB_CTR_PW, pw);
|
|
|
- }
|
|
|
-
|
|
|
- public String GetWebCtrPW()
|
|
|
- {
|
|
|
- String ret = GetWallPADData(WEB_CTR_PW);
|
|
|
- return ret;
|
|
|
- }
|
|
|
-
|
|
|
-
|
|
|
- public void SetPSTNStatus(int status)
|
|
|
- {
|
|
|
- if (status > PSTN_STATUSTEXT.length-1 || status < 0 ) return;
|
|
|
- UpdateWallPADData(PSTN_STATUS, PSTN_STATUSTEXT[status]);
|
|
|
- }
|
|
|
-
|
|
|
- public int GetPSTNStatus()
|
|
|
- {
|
|
|
- try {
|
|
|
- String ret = GetWallPADData(PSTN_STATUS);
|
|
|
- return Integer.parseInt(ret);
|
|
|
- }
|
|
|
- catch (RuntimeException re) {
|
|
|
- LogUtil.errorLogInfo("", TAG, re);
|
|
|
- return 0;
|
|
|
- }
|
|
|
- catch (Exception e)
|
|
|
- {
|
|
|
- //e.printStackTrace();
|
|
|
- LogUtil.errorLogInfo("", TAG, e);
|
|
|
- return 0;
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- public void SetDevStatus(int status, String data)
|
|
|
- {
|
|
|
- String ipdata = DEV_STATUSTEXT[status]+":"+data;
|
|
|
- UpdateWallPADData(DEV_STATUS, ipdata);
|
|
|
- }
|
|
|
-
|
|
|
- public String GetDevStatus()
|
|
|
- {
|
|
|
- String ret = GetWallPADData(DEV_STATUS);
|
|
|
- return ret;
|
|
|
- }
|
|
|
-
|
|
|
- public void SetServerIP(String svrIP, int port)
|
|
|
- {
|
|
|
- String ipdata = String.format("%s:%d", svrIP, port);
|
|
|
- UpdateWallPADData(SERVER_IP, ipdata);
|
|
|
- }
|
|
|
-
|
|
|
- public String GetServerIP()
|
|
|
- {
|
|
|
- String ret = GetWallPADData(SERVER_IP);
|
|
|
- String[] retdata = ret.split(":");
|
|
|
- return retdata[0];
|
|
|
- }
|
|
|
-
|
|
|
- public int GetServerPort()
|
|
|
- {
|
|
|
- try {
|
|
|
- String ret = GetWallPADData(SERVER_IP);
|
|
|
- String[] retdata = ret.split(":");
|
|
|
- return Integer.parseInt(retdata[1]);
|
|
|
- }
|
|
|
- catch (RuntimeException re) {
|
|
|
- LogUtil.errorLogInfo("", TAG, re);
|
|
|
- return 0;
|
|
|
- }
|
|
|
- catch (Exception e)
|
|
|
- {
|
|
|
- //e.printStackTrace();
|
|
|
- LogUtil.errorLogInfo("", TAG, e);
|
|
|
- return 0;
|
|
|
- }
|
|
|
-
|
|
|
- }
|
|
|
- public void SetManagePC(String svrIP, int port)
|
|
|
- {
|
|
|
- String ipdata = String.format("%s:%d", svrIP, port);
|
|
|
- UpdateWallPADData(MANAGEPC_IP, ipdata);
|
|
|
- }
|
|
|
-
|
|
|
- public String GetManagePCIP()
|
|
|
- {
|
|
|
- String ret;
|
|
|
- //단지서버 1.0/2.0 구분하여 처리 (2.0일시는 단지서버로 보내도록 수정)
|
|
|
- WallpadDeviceSet wallpadDeviceSet = new WallpadDeviceSet(CTX);
|
|
|
- boolean bNewDanjiServer = wallpadDeviceSet.GetNewDanjiServer();
|
|
|
- wallpadDeviceSet.closeDB();
|
|
|
-
|
|
|
- if(bNewDanjiServer == false)
|
|
|
- {
|
|
|
- ret = GetWallPADData(MANAGEPC_IP);
|
|
|
- }
|
|
|
- else
|
|
|
- {
|
|
|
- ret = GetWallPADData(SERVER_IP);
|
|
|
- }
|
|
|
-
|
|
|
- String[] retdata = ret.split(":");
|
|
|
- return retdata[0];
|
|
|
-
|
|
|
- }
|
|
|
-
|
|
|
- public int GetManagePCPort()
|
|
|
- {
|
|
|
- try {
|
|
|
- String ret = GetWallPADData(MANAGEPC_IP);
|
|
|
- String[] retdata = ret.split(":");
|
|
|
- return Integer.parseInt(retdata[1]);
|
|
|
- }
|
|
|
- catch (RuntimeException re) {
|
|
|
- LogUtil.errorLogInfo("", TAG, re);
|
|
|
- return 0;
|
|
|
- }
|
|
|
- catch (Exception e)
|
|
|
- {
|
|
|
- //e.printStackTrace();
|
|
|
- LogUtil.errorLogInfo("", TAG, e);
|
|
|
- return 0;
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- public void SetFTPIP(String svrIP)
|
|
|
- {
|
|
|
- UpdateWallPADData(FTP_IP, svrIP);
|
|
|
- }
|
|
|
-
|
|
|
- public String GetFTPIP()
|
|
|
- {
|
|
|
- String ret = GetWallPADData(FTP_IP);
|
|
|
- return ret;
|
|
|
- }
|
|
|
-
|
|
|
- public void SetGatewayIP(String IPaddr)
|
|
|
- {
|
|
|
- UpdateWallPADData(GW_IP, IPaddr);
|
|
|
- }
|
|
|
-
|
|
|
- public String GetGatewayIP()
|
|
|
- {
|
|
|
- String ret = GetWallPADData(GW_IP);
|
|
|
-
|
|
|
- return ret;
|
|
|
- }
|
|
|
-
|
|
|
- public void SetSubnetmask(String IPaddr)
|
|
|
- {
|
|
|
- UpdateWallPADData(SUBNET, IPaddr);
|
|
|
- }
|
|
|
-
|
|
|
- public String GetSubnetmask()
|
|
|
- {
|
|
|
- String ret = GetWallPADData(SUBNET);
|
|
|
-
|
|
|
- return ret;
|
|
|
- }
|
|
|
-
|
|
|
- public void SetAppVer(String Ver)
|
|
|
- {
|
|
|
- UpdateWallPADData(APP_VER, Ver);
|
|
|
- }
|
|
|
-
|
|
|
- public String GetAPPVer()
|
|
|
- {
|
|
|
- String ret = GetWallPADData(APP_VER);
|
|
|
- return ret;
|
|
|
- }
|
|
|
-
|
|
|
- public void SetNoticeVer(String Ver)
|
|
|
- {
|
|
|
- UpdateWallPADData(NOTICE_VER, Ver);
|
|
|
- }
|
|
|
-
|
|
|
- public String GetNoticeVer()
|
|
|
- {
|
|
|
- String ret = GetWallPADData(NOTICE_VER);
|
|
|
- if(ret.length() < NOTICE_VER_DEFAULT.length())
|
|
|
- {
|
|
|
- return NOTICE_VER_DEFAULT;
|
|
|
- }
|
|
|
- return ret;
|
|
|
- }
|
|
|
-
|
|
|
- public void SetWeatherVer(String Ver)
|
|
|
- {
|
|
|
- UpdateWallPADData(WEATHER_VER, Ver);
|
|
|
- }
|
|
|
-
|
|
|
- public String GetWeatherVer()
|
|
|
- {
|
|
|
- String ret = GetWallPADData(WEATHER_VER);
|
|
|
- return ret;
|
|
|
- }
|
|
|
-
|
|
|
- public String[] GetCurWeatherData()
|
|
|
- {
|
|
|
- String[] ret = GetWallPADData(WEATHER_VER).split(define.DEVCTR_DATA_SPLITER);
|
|
|
- return ret;
|
|
|
- }
|
|
|
-
|
|
|
- public void SetCurWeatherCode(String code)
|
|
|
- {
|
|
|
- try {
|
|
|
- UpdateWallPADData(WEATHER_CODE, code);
|
|
|
- }
|
|
|
- catch (RuntimeException re) {
|
|
|
- LogUtil.errorLogInfo("", TAG, re);
|
|
|
- }
|
|
|
- catch (Exception e) {
|
|
|
- Log.e(TAG , "[Exception] SetCurWeatherCode input fail ");
|
|
|
- //e.printStackTrace();
|
|
|
- LogUtil.errorLogInfo("", TAG, e);
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- public String GetCurWeatherCode()
|
|
|
- {
|
|
|
- try {
|
|
|
- String ret = GetWallPADData(WEATHER_CODE);
|
|
|
- return ret;
|
|
|
- }
|
|
|
- catch (RuntimeException re) {
|
|
|
- LogUtil.errorLogInfo("", TAG, re);
|
|
|
- return CODE_DEFAULT;
|
|
|
- }
|
|
|
- catch (Exception e)
|
|
|
- {
|
|
|
- Log.e(TAG , "[Exception] GetCurWeatherCode fail ");
|
|
|
- //e.printStackTrace();
|
|
|
- LogUtil.errorLogInfo("", TAG, e);
|
|
|
- return CODE_DEFAULT;
|
|
|
- }
|
|
|
- }
|
|
|
- public void SetSettingVer(String Ver)
|
|
|
- {
|
|
|
- UpdateWallPADData(SETTING_VER, Ver);
|
|
|
- }
|
|
|
-
|
|
|
- public String GetSettingVer()
|
|
|
- {
|
|
|
- String ret = GetWallPADData(SETTING_VER);
|
|
|
- return ret;
|
|
|
- }
|
|
|
-
|
|
|
- public void SetServerVer(String Ver)
|
|
|
- {
|
|
|
- UpdateWallPADData(SERVER_VERSION, Ver);
|
|
|
- }
|
|
|
-
|
|
|
- public String GetServerVer()
|
|
|
- {
|
|
|
- String ret = GetWallPADData(SERVER_VERSION);
|
|
|
- return ret;
|
|
|
- }
|
|
|
-
|
|
|
- public void SetLightCNT(int CNT)
|
|
|
- {
|
|
|
- UpdateWallPADData(DEV_LIGHT_CNT, String.valueOf(CNT));
|
|
|
- }
|
|
|
-
|
|
|
- public int GetLightCNT()
|
|
|
- {
|
|
|
- try {
|
|
|
- String ret = GetWallPADData(DEV_LIGHT_CNT);
|
|
|
- return Integer.parseInt(ret);
|
|
|
- }
|
|
|
- catch (RuntimeException re) {
|
|
|
- LogUtil.errorLogInfo("", TAG, re);
|
|
|
- return 0;
|
|
|
- }
|
|
|
- catch (Exception e)
|
|
|
- {
|
|
|
- //e.printStackTrace();
|
|
|
- LogUtil.errorLogInfo("", TAG, e);
|
|
|
- return 0;
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- public void SetGasCNT(int CNT)
|
|
|
- {
|
|
|
- UpdateWallPADData(DEV_GAS_CNT, String.valueOf(CNT));
|
|
|
- }
|
|
|
-
|
|
|
- public int GetGasCNT()
|
|
|
- {
|
|
|
- try {
|
|
|
- String ret = GetWallPADData(DEV_GAS_CNT);
|
|
|
- return Integer.parseInt(ret);
|
|
|
- }
|
|
|
- catch (RuntimeException re) {
|
|
|
- LogUtil.errorLogInfo("", TAG, re);
|
|
|
- return 0;
|
|
|
- }
|
|
|
- catch (Exception e)
|
|
|
- {
|
|
|
- //e.printStackTrace();
|
|
|
- LogUtil.errorLogInfo("", TAG, e);
|
|
|
- return 0;
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- public void SetHeatingCNT(int CNT)
|
|
|
- {
|
|
|
- UpdateWallPADData(DEV_HEATING_CNT, String.valueOf(CNT));
|
|
|
- }
|
|
|
-
|
|
|
- public int GetHeatingCNT()
|
|
|
- {
|
|
|
- try {
|
|
|
- String ret = GetWallPADData(DEV_HEATING_CNT);
|
|
|
- return Integer.parseInt(ret);
|
|
|
- }
|
|
|
- catch (RuntimeException re) {
|
|
|
- LogUtil.errorLogInfo("", TAG, re);
|
|
|
- return 0;
|
|
|
- }
|
|
|
- catch (Exception e)
|
|
|
- {
|
|
|
- //e.printStackTrace();
|
|
|
- LogUtil.errorLogInfo("", TAG, e);
|
|
|
- return 0;
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- public void SetHeartbeatPeriod(int period)
|
|
|
- {
|
|
|
- UpdateWallPADData(HEARTBEAT_PERIOD, String.valueOf(period));
|
|
|
- }
|
|
|
-
|
|
|
- public int GetHeartbeatPeriod()
|
|
|
- {
|
|
|
- try {
|
|
|
- String ret = GetWallPADData(HEARTBEAT_PERIOD);
|
|
|
- return Integer.parseInt(ret);
|
|
|
- }
|
|
|
- catch (RuntimeException re) {
|
|
|
- LogUtil.errorLogInfo("", TAG, re);
|
|
|
- return 0;
|
|
|
- }
|
|
|
- catch (Exception e)
|
|
|
- {
|
|
|
- //e.printStackTrace();
|
|
|
- LogUtil.errorLogInfo("", TAG, e);
|
|
|
- return 0;
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- public void SetLastHeartbeat(String timedata)
|
|
|
- {
|
|
|
- UpdateWallPADData(LAST_HEARTBEAT, timedata);
|
|
|
- }
|
|
|
-
|
|
|
- public String GetLastHeartbeat()
|
|
|
- {
|
|
|
- String ret = GetWallPADData(LAST_HEARTBEAT);
|
|
|
- return ret;
|
|
|
- }
|
|
|
-
|
|
|
- public static final String LAST_STATUSBEAT = "LAST_STATUSBEAT";
|
|
|
- public static final String LAST_STATUSBEAT_DEFAULT = "0000.00.00.00.00.00";
|
|
|
-
|
|
|
- public void SetLastStatusbeat(String timedata)
|
|
|
- {
|
|
|
- UpdateWallPADData(LAST_STATUSBEAT, timedata);
|
|
|
- }
|
|
|
-
|
|
|
- public String GetLastStatusbeat()
|
|
|
- {
|
|
|
- String ret = GetWallPADData(LAST_STATUSBEAT);
|
|
|
- return ret;
|
|
|
- }
|
|
|
-
|
|
|
- public void SetNewsCnt(String cnt)
|
|
|
- {
|
|
|
- UpdateWallPADData(NEWS_CNT, cnt);
|
|
|
- }
|
|
|
-
|
|
|
- public String GetNewsCnt()
|
|
|
- {
|
|
|
- String ret = GetWallPADData(NEWS_CNT);
|
|
|
- return ret;
|
|
|
- }
|
|
|
-
|
|
|
- public void SetMainBG(int bgtype, String locate)
|
|
|
- {
|
|
|
- String setdata = MAINBGTYPE_TEXT[bgtype]+":"+locate;
|
|
|
- UpdateWallPADData(MAINBGTYPE, setdata );
|
|
|
- }
|
|
|
-
|
|
|
- public int GetMainBGType()
|
|
|
- {
|
|
|
- try {
|
|
|
- String ret = GetWallPADData(MAINBGTYPE);
|
|
|
- String[] bgtype = ret.split(":");
|
|
|
- return Integer.parseInt(bgtype[0]);
|
|
|
- }
|
|
|
- catch (RuntimeException re) {
|
|
|
- LogUtil.errorLogInfo("", TAG, re);
|
|
|
- return 0;
|
|
|
- }
|
|
|
- catch (Exception e)
|
|
|
- {
|
|
|
- //e.printStackTrace();
|
|
|
- LogUtil.errorLogInfo("", TAG, e);
|
|
|
- return 0;
|
|
|
- }
|
|
|
- }
|
|
|
- public String GetMainBGLocate()
|
|
|
- {
|
|
|
- String ret = GetWallPADData(MAINBGTYPE);
|
|
|
- String[] bgtype = ret.split(":");
|
|
|
- return bgtype[1];
|
|
|
- }
|
|
|
-
|
|
|
- /////////////////////////////////////////////////////////////////////////////////////////////////
|
|
|
- /////////////////////////////////////////// icontrols //////////////////////////////////////////
|
|
|
- public void SetOutModeWaitTime( int nSecond )
|
|
|
- {
|
|
|
- try
|
|
|
- {
|
|
|
-
|
|
|
- UpdateWallPADData(OUTMODE_WAITTIME, String.valueOf(nSecond));
|
|
|
- }
|
|
|
- catch (RuntimeException re) {
|
|
|
- LogUtil.errorLogInfo("", TAG, re);
|
|
|
- }
|
|
|
- catch (Exception e )
|
|
|
- {
|
|
|
- //e.printStackTrace();
|
|
|
- LogUtil.errorLogInfo("", TAG, e);
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- public int GetOutModeWaitTime()
|
|
|
- {
|
|
|
- try
|
|
|
- {
|
|
|
- String ret = GetWallPADData(OUTMODE_WAITTIME);
|
|
|
-
|
|
|
- return Integer.parseInt(ret);
|
|
|
- }
|
|
|
- catch (RuntimeException re) {
|
|
|
- LogUtil.errorLogInfo("", TAG, re);
|
|
|
- return 0;
|
|
|
- }
|
|
|
- catch (Exception e )
|
|
|
- {
|
|
|
- //e.printStackTrace();
|
|
|
- LogUtil.errorLogInfo("", TAG, e);
|
|
|
- return 0;
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- public void SetComeBackWaitTime(int nSecond)
|
|
|
- {
|
|
|
- try
|
|
|
- {
|
|
|
-
|
|
|
- UpdateWallPADData(COMEBACK_WAITTIME, String.valueOf(nSecond));
|
|
|
- }
|
|
|
- catch (RuntimeException re) {
|
|
|
- LogUtil.errorLogInfo("", TAG, re);
|
|
|
- }
|
|
|
- catch (Exception e )
|
|
|
- {
|
|
|
- //e.printStackTrace();
|
|
|
- LogUtil.errorLogInfo("", TAG, e);
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- public int GetComeBackWaitTime()
|
|
|
- {
|
|
|
- try
|
|
|
- {
|
|
|
- String ret = GetWallPADData(COMEBACK_WAITTIME);
|
|
|
-
|
|
|
- return Integer.parseInt(ret);
|
|
|
- }
|
|
|
- catch (RuntimeException re) {
|
|
|
- LogUtil.errorLogInfo("", TAG, re);
|
|
|
- return 0;
|
|
|
- }
|
|
|
- catch (Exception e )
|
|
|
- {
|
|
|
- //e.printStackTrace();
|
|
|
- LogUtil.errorLogInfo("", TAG, e);
|
|
|
- return 0;
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- public void SetOutModeLinkDevice( String DeviceList )
|
|
|
- {
|
|
|
- try
|
|
|
- {
|
|
|
-
|
|
|
- UpdateWallPADData(OUTMODE_LINK_DEVICE, DeviceList );
|
|
|
- }
|
|
|
- catch (RuntimeException re) {
|
|
|
- LogUtil.errorLogInfo("", TAG, re);
|
|
|
- }
|
|
|
- catch (Exception e )
|
|
|
- {
|
|
|
- //e.printStackTrace();
|
|
|
- LogUtil.errorLogInfo("", TAG, e);
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- public String GetOutModeLinkDevice()
|
|
|
- {
|
|
|
- try
|
|
|
- {
|
|
|
- String ret = GetWallPADData(OUTMODE_LINK_DEVICE);
|
|
|
-
|
|
|
- return ret;
|
|
|
- }
|
|
|
- catch (RuntimeException re) {
|
|
|
- LogUtil.errorLogInfo("", TAG, re);
|
|
|
- return "";
|
|
|
- }
|
|
|
- catch (Exception e )
|
|
|
- {
|
|
|
- //e.printStackTrace();
|
|
|
- LogUtil.errorLogInfo("", TAG, e);
|
|
|
- return "";
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- public void SetComeBackLinkDevice( String DeviceList )
|
|
|
- {
|
|
|
- try
|
|
|
- {
|
|
|
-
|
|
|
- UpdateWallPADData(INMODE_LINK_DEVICE, DeviceList );
|
|
|
- }
|
|
|
- catch (RuntimeException re) {
|
|
|
- LogUtil.errorLogInfo("", TAG, re);
|
|
|
- }
|
|
|
- catch (Exception e )
|
|
|
- {
|
|
|
- //e.printStackTrace();
|
|
|
- LogUtil.errorLogInfo("", TAG, e);
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- public String GetComeBackLinkDevice()
|
|
|
- {
|
|
|
- try
|
|
|
- {
|
|
|
- String ret = GetWallPADData(INMODE_LINK_DEVICE);
|
|
|
-
|
|
|
- return ret;
|
|
|
- }
|
|
|
- catch (RuntimeException re) {
|
|
|
- LogUtil.errorLogInfo("", TAG, re);
|
|
|
- return "";
|
|
|
- }
|
|
|
- catch (Exception e )
|
|
|
- {
|
|
|
- LogUtil.errorLogInfo("", TAG, e);//e.printStackTrace();
|
|
|
- return "";
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- public void SetInBedLinkDevice( String DeviceList )
|
|
|
- {
|
|
|
- try
|
|
|
- {
|
|
|
-
|
|
|
- UpdateWallPADData(IN_BED_LINK_DEVICE, DeviceList );
|
|
|
- }
|
|
|
- catch (RuntimeException re) {
|
|
|
- LogUtil.errorLogInfo("", TAG, re);
|
|
|
- }
|
|
|
- catch (Exception e )
|
|
|
- {
|
|
|
- LogUtil.errorLogInfo("", TAG, e);//e.printStackTrace();
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- public String GetInBedLinkDevice()
|
|
|
- {
|
|
|
- try
|
|
|
- {
|
|
|
- String ret = GetWallPADData(IN_BED_LINK_DEVICE);
|
|
|
-
|
|
|
- return ret;
|
|
|
- }
|
|
|
- catch (RuntimeException re) {
|
|
|
- LogUtil.errorLogInfo("", TAG, re);
|
|
|
- return "";
|
|
|
- }
|
|
|
- catch (Exception e )
|
|
|
- {
|
|
|
- LogUtil.errorLogInfo("", TAG, e);//e.printStackTrace();
|
|
|
- return "";
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- public void SetOutBedLinkDevice( String DeviceList )
|
|
|
- {
|
|
|
- try
|
|
|
- {
|
|
|
-
|
|
|
- UpdateWallPADData(OUT_BED_LINK_DEVICE, DeviceList );
|
|
|
- }
|
|
|
- catch (RuntimeException re) {
|
|
|
- LogUtil.errorLogInfo("", TAG, re);
|
|
|
- }
|
|
|
- catch (Exception e )
|
|
|
- {
|
|
|
- LogUtil.errorLogInfo("", TAG, e);//e.printStackTrace();
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- public String GetOutBedLinkDevice()
|
|
|
- {
|
|
|
- try
|
|
|
- {
|
|
|
- String ret = GetWallPADData(OUT_BED_LINK_DEVICE);
|
|
|
-
|
|
|
- return ret;
|
|
|
- }
|
|
|
- catch (RuntimeException re) {
|
|
|
- LogUtil.errorLogInfo("", TAG, re);
|
|
|
- return "";
|
|
|
- }
|
|
|
- catch (Exception e )
|
|
|
- {
|
|
|
- LogUtil.errorLogInfo("", TAG, e);//e.printStackTrace();
|
|
|
- return "";
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- public void SetCallAPKStatus( boolean Running )
|
|
|
- {
|
|
|
- try
|
|
|
- {
|
|
|
- if( Running == true )
|
|
|
- UpdateWallPADData(CALL_APK_STATUS, "1" );
|
|
|
- else
|
|
|
- UpdateWallPADData(CALL_APK_STATUS, "0" );
|
|
|
-
|
|
|
- }
|
|
|
- catch (RuntimeException re) {
|
|
|
- LogUtil.errorLogInfo("", TAG, re);
|
|
|
- }
|
|
|
- catch (Exception e )
|
|
|
- {
|
|
|
- LogUtil.errorLogInfo("", TAG, e);//e.printStackTrace();
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- public boolean GetCallAPKStatusRunning()
|
|
|
- {
|
|
|
- try
|
|
|
- {
|
|
|
- String ret = GetWallPADData(CALL_APK_STATUS);
|
|
|
- if( ret.equals("1"))
|
|
|
- return true;
|
|
|
- else
|
|
|
- return false;
|
|
|
- }
|
|
|
- catch (RuntimeException re) {
|
|
|
- LogUtil.errorLogInfo("", TAG, re);
|
|
|
- return false;
|
|
|
- }
|
|
|
- catch (Exception e )
|
|
|
- {
|
|
|
- LogUtil.errorLogInfo("", TAG, e);//e.printStackTrace();
|
|
|
- return false;
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- public void SetCallStatus(boolean bTalking)
|
|
|
- {
|
|
|
- try
|
|
|
- {
|
|
|
- if (bTalking)
|
|
|
- UpdateWallPADData(CALL_STATUS, "1" );
|
|
|
- else
|
|
|
- UpdateWallPADData(CALL_STATUS, "0" );
|
|
|
-
|
|
|
- }
|
|
|
- catch (RuntimeException re) {
|
|
|
- LogUtil.errorLogInfo("", TAG, re);
|
|
|
- }
|
|
|
- catch (Exception e )
|
|
|
- {
|
|
|
- LogUtil.errorLogInfo("", TAG, e);//e.printStackTrace();
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- public boolean GetCallStatus()
|
|
|
- {
|
|
|
- try
|
|
|
- {
|
|
|
- String ret = GetWallPADData(CALL_STATUS);
|
|
|
- if (ret.equals("1"))
|
|
|
- return true;
|
|
|
- else
|
|
|
- return false;
|
|
|
- }
|
|
|
- catch (RuntimeException re) {
|
|
|
- LogUtil.errorLogInfo("", TAG, re);
|
|
|
- return false;
|
|
|
- }
|
|
|
- catch (Exception e)
|
|
|
- {
|
|
|
- LogUtil.errorLogInfo("", TAG, e);//e.printStackTrace();
|
|
|
- return false;
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- public boolean setRemoteCallUserPopupRun(boolean bRun) {
|
|
|
- try {
|
|
|
- if (bRun) {
|
|
|
- return UpdateWallPADData(REMOTECALL_USER_POPUP_RUN, "1" );
|
|
|
- }
|
|
|
- else {
|
|
|
- return UpdateWallPADData(REMOTECALL_USER_POPUP_RUN, "0" );
|
|
|
- }
|
|
|
- } catch (RuntimeException re) {
|
|
|
- LogUtil.errorLogInfo("", TAG, re);
|
|
|
- return false;
|
|
|
- }
|
|
|
- catch (Exception e) {
|
|
|
- Log.e(TAG, "[Exception] setRemoteCallUserPopupRun(boolean bRun)");
|
|
|
- LogUtil.errorLogInfo("", TAG, e);//e.printStackTrace();
|
|
|
- return false;
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- public boolean getRemoteCallUserPopupRun() {
|
|
|
- try {
|
|
|
- String strResult = GetWallPADData(REMOTECALL_USER_POPUP_RUN);
|
|
|
- if (strResult.equals("1")) return true;
|
|
|
- else return false;
|
|
|
- } catch (RuntimeException re) {
|
|
|
- LogUtil.errorLogInfo("", TAG, re);
|
|
|
- return false;
|
|
|
- }
|
|
|
- catch (Exception e) {
|
|
|
- LogUtil.errorLogInfo("", TAG, e);//e.printStackTrace();
|
|
|
- return false;
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- public boolean setGlobalScreenAPKRun(boolean bRun) {
|
|
|
- try {
|
|
|
- if (bRun) {
|
|
|
- return UpdateWallPADData(GLOBALSCREEN_APK_RUN, "1" );
|
|
|
- }
|
|
|
- else {
|
|
|
- return UpdateWallPADData(GLOBALSCREEN_APK_RUN, "0" );
|
|
|
- }
|
|
|
- } catch (RuntimeException re) {
|
|
|
- LogUtil.errorLogInfo("", TAG, re);
|
|
|
- return false;
|
|
|
- }
|
|
|
- catch (Exception e) {
|
|
|
- Log.e(TAG, "[Exception] setGlobalScreenAPKStatusRun(boolean bRun)");
|
|
|
- LogUtil.errorLogInfo("", TAG, e);//e.printStackTrace();
|
|
|
- return false;
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- public boolean getGlobalScreenAPKRun() {
|
|
|
- try {
|
|
|
- String strResult = GetWallPADData(GLOBALSCREEN_APK_RUN);
|
|
|
- if (strResult.equals("1")) return true;
|
|
|
- else return false;
|
|
|
- } catch (RuntimeException re) {
|
|
|
- LogUtil.errorLogInfo("", TAG, re);
|
|
|
- return false;
|
|
|
- }
|
|
|
- catch (Exception e) {
|
|
|
- LogUtil.errorLogInfo("", TAG, e);//e.printStackTrace();
|
|
|
- return false;
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- public void SetModeLampBrLevel( int nLevel )
|
|
|
- {
|
|
|
- try
|
|
|
- {
|
|
|
- if( nLevel >= 0 && nLevel <=4 )
|
|
|
- {
|
|
|
- UpdateWallPADData(MODE_LAMP_BR_LEVEL, String.valueOf(nLevel) );
|
|
|
- }
|
|
|
- else
|
|
|
- {
|
|
|
- Log.d(TAG , "SetModeLampBrLevel input fail ");
|
|
|
- }
|
|
|
- }
|
|
|
- catch (RuntimeException re) {
|
|
|
- LogUtil.errorLogInfo("", TAG, re);
|
|
|
- }
|
|
|
- catch (Exception e )
|
|
|
- {
|
|
|
- LogUtil.errorLogInfo("", TAG, e);//e.printStackTrace();
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- public int GetModeLampBrLevel()
|
|
|
- {
|
|
|
- try
|
|
|
- {
|
|
|
- String ret = GetWallPADData(MODE_LAMP_BR_LEVEL);
|
|
|
- return Integer.parseInt(ret);
|
|
|
- }
|
|
|
- catch (RuntimeException re) {
|
|
|
- LogUtil.errorLogInfo("", TAG, re);
|
|
|
- return 0;
|
|
|
- }
|
|
|
- catch (Exception e )
|
|
|
- {
|
|
|
- LogUtil.errorLogInfo("", TAG, e);//e.printStackTrace();
|
|
|
- return 0;
|
|
|
- }
|
|
|
-
|
|
|
- }
|
|
|
-
|
|
|
- public void SetWallPadMasterVolume( int nLevel )
|
|
|
- {
|
|
|
- try
|
|
|
- {
|
|
|
- UpdateWallPADData(WALLPAD_MASTER_VOLUME, String.valueOf(nLevel) );
|
|
|
- }
|
|
|
- catch (RuntimeException re) {
|
|
|
- LogUtil.errorLogInfo("", TAG, re);
|
|
|
- }
|
|
|
- catch (Exception e )
|
|
|
- {
|
|
|
- LogUtil.errorLogInfo("", TAG, e);//e.printStackTrace();
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- public int GetWallPadMasterVolume( )
|
|
|
- {
|
|
|
- try
|
|
|
- {
|
|
|
- String ret = GetWallPADData(WALLPAD_MASTER_VOLUME);
|
|
|
- return Integer.parseInt(ret);
|
|
|
- }
|
|
|
- catch (RuntimeException re) {
|
|
|
- LogUtil.errorLogInfo("", TAG, re);
|
|
|
- return 0;
|
|
|
- }
|
|
|
- catch (Exception e )
|
|
|
- {
|
|
|
- LogUtil.errorLogInfo("", TAG, e);//e.printStackTrace();
|
|
|
- return 0;
|
|
|
- }
|
|
|
-
|
|
|
- }
|
|
|
-
|
|
|
- public void SetSoundOutputOfEventAlarm( boolean OutSount )
|
|
|
- {
|
|
|
- try
|
|
|
- {
|
|
|
-
|
|
|
- UpdateWallPADData(SOUND_OUTPUT_EVENT_ALARM, String.valueOf(OutSount) );
|
|
|
- }
|
|
|
- catch (RuntimeException re) {
|
|
|
- LogUtil.errorLogInfo("", TAG, re);
|
|
|
- }
|
|
|
- catch (Exception e )
|
|
|
- {
|
|
|
- LogUtil.errorLogInfo("", TAG, e);//e.printStackTrace();
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- public boolean GetSoundOutputOfEventAlarm()
|
|
|
- {
|
|
|
- try
|
|
|
- {
|
|
|
- String ret = GetWallPADData(SOUND_OUTPUT_EVENT_ALARM);
|
|
|
-
|
|
|
- if( ret.compareTo(String.valueOf(true)) == 0 )
|
|
|
- {
|
|
|
- return true;
|
|
|
- }
|
|
|
- else
|
|
|
- {
|
|
|
- return false;
|
|
|
- }
|
|
|
- }
|
|
|
- catch (RuntimeException re) {
|
|
|
- LogUtil.errorLogInfo("", TAG, re);
|
|
|
- return true;
|
|
|
- }
|
|
|
- catch (Exception e )
|
|
|
- {
|
|
|
- LogUtil.errorLogInfo("", TAG, e);//e.printStackTrace();
|
|
|
- return true;
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- public void Set_MultiSwitch_Concent_Use( boolean value)
|
|
|
- {
|
|
|
- try
|
|
|
- {
|
|
|
- UpdateWallPADData(MULTISWITCH_CONCENT_USE, String.valueOf(value) );
|
|
|
- }
|
|
|
- catch (RuntimeException re) {
|
|
|
- LogUtil.errorLogInfo("", TAG, re);
|
|
|
- }
|
|
|
- catch (Exception e )
|
|
|
- {
|
|
|
- LogUtil.errorLogInfo("", TAG, e);//e.printStackTrace();
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- public boolean Get_MultiSwitch_Concent_Use()
|
|
|
- {
|
|
|
- try
|
|
|
- {
|
|
|
- String ret = GetWallPADData(MULTISWITCH_CONCENT_USE);
|
|
|
-
|
|
|
- if( ret.compareTo(String.valueOf(true)) == 0 )
|
|
|
- {
|
|
|
- return true;
|
|
|
- }
|
|
|
- else
|
|
|
- {
|
|
|
- return false;
|
|
|
- }
|
|
|
- }
|
|
|
- catch (RuntimeException re) {
|
|
|
- LogUtil.errorLogInfo("", TAG, re);
|
|
|
- return false;
|
|
|
- }
|
|
|
- catch (Exception e )
|
|
|
- {
|
|
|
- LogUtil.errorLogInfo("", TAG, e);//e.printStackTrace();
|
|
|
- return false;
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- /**
|
|
|
- * 웰컴조명 선택된 조명 설정한다.<br>
|
|
|
- * 거실등/복도등/주방등 순으로 설정
|
|
|
- * @param value
|
|
|
- */
|
|
|
- public void Set_WelcomeLight_Selected( String value)
|
|
|
- {
|
|
|
- try
|
|
|
- {
|
|
|
- String[] split = value.split("/");
|
|
|
- if(split.length != 3)
|
|
|
- {
|
|
|
- Log.e(TAG, "[Set_WelcomeLight_Selected] - LEN ERROR !!!");
|
|
|
- return;
|
|
|
- }
|
|
|
-
|
|
|
- for(int i = 0; i < split.length; i++)
|
|
|
- {
|
|
|
- int ival = Integer.parseInt(split[i]);
|
|
|
- if(ival < 0 || ival > 1)
|
|
|
- {
|
|
|
- Log.e(TAG, "[Set_WelcomeLight_Selected] - WRONG DATA SAVED !!!");
|
|
|
- return;
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- UpdateWallPADData(WELCOMELIGHT_SELECT_ITEMS, value );
|
|
|
- }
|
|
|
- catch (RuntimeException re) {
|
|
|
- LogUtil.errorLogInfo("", TAG, re);
|
|
|
- }
|
|
|
- catch (Exception e )
|
|
|
- {
|
|
|
- LogUtil.errorLogInfo("", TAG, e);//e.printStackTrace();
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- /**
|
|
|
- * 웰컴조명 선택된 조명을 가져온다.<br>
|
|
|
- * 거실등/복도등/주방등 순으로 저장되어 있음<br>
|
|
|
- * 저장된 값의 형식이 틀린 경우 모두 사용안함 반환 : 0/0/0
|
|
|
- */
|
|
|
- public String Get_WelcomeLight_Selected()
|
|
|
- {
|
|
|
- try
|
|
|
- {
|
|
|
- String ret = GetWallPADData(WELCOMELIGHT_SELECT_ITEMS);
|
|
|
- String[] split = ret.split("/");
|
|
|
- if(split.length != 3)
|
|
|
- {
|
|
|
- Log.e(TAG, "[Get_WelcomeLight_Selected] - LEN ERROR !!!");
|
|
|
- return "0/0/0";
|
|
|
- }
|
|
|
-
|
|
|
- for(int i = 0; i < split.length; i++)
|
|
|
- {
|
|
|
- int ival = Integer.parseInt(split[i]);
|
|
|
- if(ival < 0 || ival > 1)
|
|
|
- {
|
|
|
- Log.e(TAG, "[Get_WelcomeLight_Selected] - WRONG DATA SAVED !!!");
|
|
|
- return "0/0/0";
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- return ret;
|
|
|
- }
|
|
|
- catch (RuntimeException re) {
|
|
|
- LogUtil.errorLogInfo("", TAG, re);
|
|
|
- return "0/0/0";
|
|
|
- }
|
|
|
- catch (Exception e )
|
|
|
- {
|
|
|
- LogUtil.errorLogInfo("", TAG, e);//e.printStackTrace();
|
|
|
- return "0/0/0";
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- public void SetCloseSensorValue( int value)
|
|
|
- {
|
|
|
- try
|
|
|
- {
|
|
|
- UpdateWallPADData(CLOSE_SENSOR_VALUE, String.valueOf(value) );
|
|
|
- }
|
|
|
- catch (RuntimeException re) {
|
|
|
- LogUtil.errorLogInfo("", TAG, re);
|
|
|
- }
|
|
|
- catch (Exception e )
|
|
|
- {
|
|
|
- LogUtil.errorLogInfo("", TAG, e);//e.printStackTrace();
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- public int GetCloseSensorValue()
|
|
|
- {
|
|
|
- try
|
|
|
- {
|
|
|
- String ret = GetWallPADData(CLOSE_SENSOR_VALUE);
|
|
|
- return Integer.parseInt(ret);
|
|
|
- }
|
|
|
- catch (RuntimeException re) {
|
|
|
- LogUtil.errorLogInfo("", TAG, re);
|
|
|
- return 15; // DB 값 접근 에러 발생시, 민감도 최대로 설정
|
|
|
- }
|
|
|
- catch (Exception e )
|
|
|
- {
|
|
|
- LogUtil.errorLogInfo("", TAG, e);//e.printStackTrace();
|
|
|
- return 15; // DB 값 접근 에러 발생시, 민감도 최대로 설정
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- public void Set_InterlayerSensor_Status( String value)
|
|
|
- {
|
|
|
- try
|
|
|
- {
|
|
|
- UpdateWallPADData(INTERLAYER_NOISE_SENSOR_STATUS, value );
|
|
|
- }
|
|
|
- catch (RuntimeException re) {
|
|
|
- LogUtil.errorLogInfo("", TAG, re);
|
|
|
- }
|
|
|
- catch (Exception e )
|
|
|
- {
|
|
|
- LogUtil.errorLogInfo("", TAG, e);//e.printStackTrace();
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- public String Get_InterlayerSensor_Status()
|
|
|
- {
|
|
|
- try
|
|
|
- {
|
|
|
- String ret = GetWallPADData(INTERLAYER_NOISE_SENSOR_STATUS);
|
|
|
- return ret;
|
|
|
- }
|
|
|
- catch (RuntimeException re) {
|
|
|
- LogUtil.errorLogInfo("", TAG, re);
|
|
|
- return "EXCEPTION";
|
|
|
- }
|
|
|
- catch (Exception e )
|
|
|
- {
|
|
|
- LogUtil.errorLogInfo("", TAG, e);//e.printStackTrace();
|
|
|
- return "EXCEPTION";
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- public void SetCurrentScreenIDValue( int value)
|
|
|
- {
|
|
|
- try
|
|
|
- {
|
|
|
- UpdateWallPADData(CURRENT_SCREEN_ID_VALUE, String.valueOf(value) );
|
|
|
- }
|
|
|
- catch (RuntimeException re) {
|
|
|
- LogUtil.errorLogInfo("", TAG, re);
|
|
|
- }
|
|
|
- catch (Exception e )
|
|
|
- {
|
|
|
- LogUtil.errorLogInfo("", TAG, e);//e.printStackTrace();
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- public String GetNowMonthSelect()
|
|
|
- {
|
|
|
- try
|
|
|
- {
|
|
|
- String ret = GetWallPADData(NOW_MONTH_SELECT);
|
|
|
- return ret;
|
|
|
- }
|
|
|
- catch (RuntimeException re) {
|
|
|
- LogUtil.errorLogInfo("", TAG, re);
|
|
|
- return "NOW";
|
|
|
- }
|
|
|
- catch (Exception e )
|
|
|
- {
|
|
|
- LogUtil.errorLogInfo("", TAG, e);//e.printStackTrace();
|
|
|
- Log.w(TAG, "[GetNowMonthSelect] Exception - Default");
|
|
|
- return "NOW";
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- public void SetNowMonthSelect( String value)
|
|
|
- {
|
|
|
- try
|
|
|
- {
|
|
|
- UpdateWallPADData(NOW_MONTH_SELECT, value );
|
|
|
- }
|
|
|
- catch (RuntimeException re) {
|
|
|
- LogUtil.errorLogInfo("", TAG, re);
|
|
|
- }
|
|
|
- catch (Exception e )
|
|
|
- {
|
|
|
- LogUtil.errorLogInfo("", TAG, e);//e.printStackTrace();
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- /**
|
|
|
- * 저장된 실시간검침기 전력 누적사용량을 가져온다.
|
|
|
- *
|
|
|
- * @return - (double) 전력 누적사용량
|
|
|
- */
|
|
|
- public double Get_RealTimeMeter_ElecAcc()
|
|
|
- {
|
|
|
- try
|
|
|
- {
|
|
|
- String ret = GetWallPADData(REALTIMEMETER__ELEC_ACC);
|
|
|
- return Double.parseDouble(ret);
|
|
|
- }
|
|
|
- catch (RuntimeException re) {
|
|
|
- LogUtil.errorLogInfo("", TAG, re);
|
|
|
- return 0;
|
|
|
- }
|
|
|
- catch (Exception e )
|
|
|
- {
|
|
|
- Log.e(TAG, "[Get_RealTimeMeter_ElecAcc] Exception - Default");
|
|
|
- LogUtil.errorLogInfo("", TAG, e);//e.printStackTrace();
|
|
|
- return 0;
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- /**
|
|
|
- * 실시간검침기 전력 누적사용량을 저장한다.
|
|
|
- *
|
|
|
- * @param value - (double) 저장할 값
|
|
|
- *
|
|
|
- * @return (boolean) 저장성공여부 true:성공 , false:실패
|
|
|
- */
|
|
|
- public boolean Set_RealTimeMeter_ElecAcc(double value)
|
|
|
- {
|
|
|
- try
|
|
|
- {
|
|
|
- return UpdateWallPADData(REALTIMEMETER__ELEC_ACC, String.format("%.2f", value));
|
|
|
- }
|
|
|
- catch (RuntimeException re) {
|
|
|
- LogUtil.errorLogInfo("", TAG, re);
|
|
|
- }
|
|
|
- catch (Exception e )
|
|
|
- {
|
|
|
- Log.e(TAG, "[Set_RealTimeMeter_ElecAcc] Exception - Default");
|
|
|
- LogUtil.errorLogInfo("", TAG, e);//e.printStackTrace();
|
|
|
- }
|
|
|
- return false;
|
|
|
- }
|
|
|
-
|
|
|
- public int GetCurrentScreenIDValue()
|
|
|
- {
|
|
|
- try
|
|
|
- {
|
|
|
- String ret = GetWallPADData(CURRENT_SCREEN_ID_VALUE);
|
|
|
- return Integer.parseInt(ret);
|
|
|
- }
|
|
|
- catch (RuntimeException re) {
|
|
|
- LogUtil.errorLogInfo("", TAG, re);
|
|
|
- return 0;
|
|
|
- }
|
|
|
- catch (Exception e )
|
|
|
- {
|
|
|
- LogUtil.errorLogInfo("", TAG, e);//e.printStackTrace();
|
|
|
- return 0;
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
- /**
|
|
|
- * @description
|
|
|
- // GLE 모델 LED 버튼 밝기 값 저장
|
|
|
- * 0 ~2 사이값만 입력 하도록 한다.
|
|
|
- */
|
|
|
- public void SetLEDButtonBrightnessLevel( int level )
|
|
|
- {
|
|
|
- try
|
|
|
- {
|
|
|
- if( level >=0 && level <= 2 )
|
|
|
- {
|
|
|
- UpdateWallPADData(LED_BUTTON_BRIGHTNESS_LEVEL, String.valueOf(level) );
|
|
|
- }
|
|
|
- else
|
|
|
- {
|
|
|
- Log.d(TAG , "SetLEDButtonBrightnessLevel input fail ");
|
|
|
- }
|
|
|
- }
|
|
|
- catch (RuntimeException re) {
|
|
|
- LogUtil.errorLogInfo("", TAG, re);
|
|
|
- }
|
|
|
- catch (Exception e )
|
|
|
- {
|
|
|
- LogUtil.errorLogInfo("", TAG, e);//e.printStackTrace();
|
|
|
- }
|
|
|
- }
|
|
|
- /**
|
|
|
- * @description
|
|
|
- * GEL 모델 LED 버튼 밝기 값 리턴
|
|
|
- * 리턴값은 0~2 의값만 리턴된다.
|
|
|
- */
|
|
|
- public int GetLEDButtonBrightnessLevel()
|
|
|
- {
|
|
|
- try
|
|
|
- {
|
|
|
- String ret = GetWallPADData(LED_BUTTON_BRIGHTNESS_LEVEL);
|
|
|
- return Integer.parseInt(ret);
|
|
|
- }
|
|
|
- catch (RuntimeException re) {
|
|
|
- LogUtil.errorLogInfo("", TAG, re);
|
|
|
- return 0;
|
|
|
- }
|
|
|
- catch (Exception e )
|
|
|
- {
|
|
|
- LogUtil.errorLogInfo("", TAG, e);//e.printStackTrace();
|
|
|
- return 0;
|
|
|
- }
|
|
|
- }
|
|
|
- /**
|
|
|
- * @description
|
|
|
- * APU 감지시 정전 상태 저장.... 정전이면 true, 복전이면 false 입력하도록 한다.
|
|
|
- */
|
|
|
- public void SetBlackOutEnergy( boolean Off )
|
|
|
- {
|
|
|
- try
|
|
|
- {
|
|
|
- UpdateWallPADData(BLACK_OUT_ENERGY, String.valueOf(Off) );
|
|
|
- }
|
|
|
- catch (RuntimeException re) {
|
|
|
- LogUtil.errorLogInfo("", TAG, re);
|
|
|
- }
|
|
|
- catch (Exception e )
|
|
|
- {
|
|
|
- LogUtil.errorLogInfo("", TAG, e);//e.printStackTrace();
|
|
|
- }
|
|
|
- }
|
|
|
- /**
|
|
|
- * @description
|
|
|
- * 정전 상태 리턴... true 정전... false 이면 복전 값을 리턴한다.
|
|
|
- */
|
|
|
- public boolean GetCurrentBlackOutEnergy()
|
|
|
- {
|
|
|
- try
|
|
|
- {
|
|
|
- String ret = GetWallPADData(BLACK_OUT_ENERGY);
|
|
|
-
|
|
|
- if( ret.compareTo(String.valueOf(true)) == 0 )
|
|
|
- {
|
|
|
- return true;
|
|
|
- }
|
|
|
- else
|
|
|
- {
|
|
|
- return false;
|
|
|
- }
|
|
|
- }
|
|
|
- catch (RuntimeException re) {
|
|
|
- LogUtil.errorLogInfo("", TAG, re);
|
|
|
- return false;
|
|
|
- }
|
|
|
- catch (Exception e )
|
|
|
- {
|
|
|
- LogUtil.errorLogInfo("", TAG, e);//e.printStackTrace();
|
|
|
- return false;
|
|
|
- }
|
|
|
- }
|
|
|
- /**
|
|
|
- * @description
|
|
|
- // 마지막으로 실행된 메인 스크린 화면을 아이디를 저장하거나...
|
|
|
- // 사용자가 고정시켜둔 메인스크린 화면을 저장하도록 한다.
|
|
|
- */
|
|
|
- public void SetSelectedMainScreen( int id )
|
|
|
- {
|
|
|
- try
|
|
|
- {
|
|
|
- if( id == MAIN_DEFAULT_SCREEN || id == MAIN_BOOKMARK_SCREEN || id == MAIN_ENERGY_SCREEN )
|
|
|
- {
|
|
|
- UpdateWallPADData(MAIN_SELECTED_SCREEN , String.valueOf(id) );
|
|
|
- }
|
|
|
- else
|
|
|
- {
|
|
|
- Log.d(TAG , "SetSelectedMainScreen input Fail ");
|
|
|
- }
|
|
|
- }
|
|
|
- catch (RuntimeException re) {
|
|
|
- LogUtil.errorLogInfo("", TAG, re);
|
|
|
- }
|
|
|
- catch (Exception e )
|
|
|
- {
|
|
|
- LogUtil.errorLogInfo("", TAG, e);//e.printStackTrace();
|
|
|
- }
|
|
|
- }
|
|
|
- /**
|
|
|
- * @description
|
|
|
- * 마지막으로 실행된 메인 스크린 화면을 아이디를 리턴 하거나
|
|
|
- * 사용자가 고정시켜둔 메인스크린 화면을 id를 리턴하도록 한다.
|
|
|
- */
|
|
|
- public int GetSelectedMainScreen()
|
|
|
- {
|
|
|
- try
|
|
|
- {
|
|
|
- String ret = GetWallPADData(MAIN_SELECTED_SCREEN);
|
|
|
- return Integer.parseInt(ret);
|
|
|
- }
|
|
|
- catch (RuntimeException re) {
|
|
|
- LogUtil.errorLogInfo("", TAG, re);
|
|
|
- return 0;
|
|
|
- }
|
|
|
- catch (Exception e )
|
|
|
- {
|
|
|
- LogUtil.errorLogInfo("", TAG, e);//e.printStackTrace();
|
|
|
- return 0;
|
|
|
- }
|
|
|
- }
|
|
|
- /**
|
|
|
- * @description
|
|
|
- * 무드등 램프 상태 ( 월패드 전원 재인가시 사용하기 위해 )
|
|
|
- * input Param
|
|
|
- * true 이면 On
|
|
|
- * false 이면 Off
|
|
|
- */
|
|
|
- public void SetMoodLampState( boolean On )
|
|
|
- {
|
|
|
- try
|
|
|
- {
|
|
|
-
|
|
|
- UpdateWallPADData(MOOD_LAMP_STATE, String.valueOf(On) );
|
|
|
- }
|
|
|
- catch (RuntimeException re) {
|
|
|
- LogUtil.errorLogInfo("", TAG, re);
|
|
|
- }
|
|
|
- catch (Exception e )
|
|
|
- {
|
|
|
- LogUtil.errorLogInfo("", TAG, e);//e.printStackTrace();
|
|
|
- }
|
|
|
- }
|
|
|
- /**
|
|
|
- * @description
|
|
|
- * 무드등 램프 상태 리턴 ( 월패드 전원 재인가시 사용하기 위해 )
|
|
|
- * return Param
|
|
|
- * true 이면 On
|
|
|
- * false 이면 Off
|
|
|
- */
|
|
|
- public boolean GetMoodLampState()
|
|
|
- {
|
|
|
- try
|
|
|
- {
|
|
|
- String ret = GetWallPADData(MOOD_LAMP_STATE);
|
|
|
-
|
|
|
- if( ret.compareTo(String.valueOf(true)) == 0 )
|
|
|
- {
|
|
|
- return true;
|
|
|
- }
|
|
|
- else
|
|
|
- {
|
|
|
- return false;
|
|
|
- }
|
|
|
- }
|
|
|
- catch (RuntimeException re) {
|
|
|
- LogUtil.errorLogInfo("", TAG, re);
|
|
|
- return false;
|
|
|
- }
|
|
|
- catch (Exception e )
|
|
|
- {
|
|
|
- LogUtil.errorLogInfo("", TAG, e);//e.printStackTrace();
|
|
|
- return false;
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
- public void SetCarSoundOfEventAlarm( boolean OutSount )
|
|
|
- {
|
|
|
- try
|
|
|
- {
|
|
|
-
|
|
|
- UpdateWallPADData(SOUND_OUTPUT_CAR_ALARM, String.valueOf(OutSount) );
|
|
|
- }
|
|
|
- catch (RuntimeException re) {
|
|
|
- LogUtil.errorLogInfo("", TAG, re);
|
|
|
- }
|
|
|
- catch (Exception e )
|
|
|
- {
|
|
|
- LogUtil.errorLogInfo("", TAG, e);//e.printStackTrace();
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- public boolean GetCarSoundOfEventAlarm()
|
|
|
- {
|
|
|
- try
|
|
|
- {
|
|
|
- String ret = GetWallPADData(SOUND_OUTPUT_CAR_ALARM);
|
|
|
-
|
|
|
- if( ret.compareTo(String.valueOf(true)) == 0 )
|
|
|
- {
|
|
|
- return true;
|
|
|
- }
|
|
|
- else
|
|
|
- {
|
|
|
- return false;
|
|
|
- }
|
|
|
- }
|
|
|
- catch (RuntimeException re) {
|
|
|
- LogUtil.errorLogInfo("", TAG, re);
|
|
|
- return true;
|
|
|
- }
|
|
|
- catch (Exception e )
|
|
|
- {
|
|
|
- LogUtil.errorLogInfo("", TAG, e);//e.printStackTrace();
|
|
|
- return true;
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- public void SetCallSoundOfEventAlarm( boolean OutSound )
|
|
|
- {
|
|
|
- try
|
|
|
- {
|
|
|
-
|
|
|
- UpdateWallPADData(SOUND_OUTPUT_CALL_ALARM, String.valueOf(OutSound) );
|
|
|
- }
|
|
|
- catch (RuntimeException re) {
|
|
|
- LogUtil.errorLogInfo("", TAG, re);
|
|
|
- }
|
|
|
- catch (Exception e )
|
|
|
- {
|
|
|
- LogUtil.errorLogInfo("", TAG, e);//e.printStackTrace();
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- public boolean GetCallSoundOfEventAlarm()
|
|
|
- {
|
|
|
- try
|
|
|
- {
|
|
|
- String ret = GetWallPADData(SOUND_OUTPUT_CALL_ALARM);
|
|
|
-
|
|
|
- if( ret.compareTo(String.valueOf(true)) == 0 )
|
|
|
- {
|
|
|
- return true;
|
|
|
- }
|
|
|
- else
|
|
|
- {
|
|
|
- return false;
|
|
|
- }
|
|
|
- }
|
|
|
- catch (RuntimeException re) {
|
|
|
- LogUtil.errorLogInfo("", TAG, re);
|
|
|
- return true;
|
|
|
- }
|
|
|
- catch (Exception e )
|
|
|
- {
|
|
|
- LogUtil.errorLogInfo("", TAG, e);//e.printStackTrace();
|
|
|
- return true;
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- public void SetBandLocationEventAlarm( boolean OutSount )
|
|
|
- {
|
|
|
- try
|
|
|
- {
|
|
|
-
|
|
|
- UpdateWallPADData(SOUND_OUTPUT_BAND_LOCATION, String.valueOf(OutSount) );
|
|
|
- }
|
|
|
- catch (RuntimeException re) {
|
|
|
- LogUtil.errorLogInfo("", TAG, re);
|
|
|
- }
|
|
|
- catch (Exception e )
|
|
|
- {
|
|
|
- LogUtil.errorLogInfo("", TAG, e);//e.printStackTrace();
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- public boolean GetBandLocationEventAlarm()
|
|
|
- {
|
|
|
- try
|
|
|
- {
|
|
|
- String ret = GetWallPADData(SOUND_OUTPUT_BAND_LOCATION);
|
|
|
-
|
|
|
- if( ret.compareTo(String.valueOf(true)) == 0 )
|
|
|
- {
|
|
|
- return true;
|
|
|
- }
|
|
|
- else
|
|
|
- {
|
|
|
- return false;
|
|
|
- }
|
|
|
- }
|
|
|
- catch (RuntimeException re) {
|
|
|
- LogUtil.errorLogInfo("", TAG, re);
|
|
|
- return true;
|
|
|
- }
|
|
|
- catch (Exception e )
|
|
|
- {
|
|
|
- LogUtil.errorLogInfo("", TAG, e);//e.printStackTrace();
|
|
|
- return true;
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- public void SetNoisePopupUse( boolean OutSount )
|
|
|
- {
|
|
|
- try
|
|
|
- {
|
|
|
- UpdateWallPADData(INTERLAYER_NOISE_POPUP_USE, String.valueOf(OutSount) );
|
|
|
- }
|
|
|
- catch (RuntimeException re) {
|
|
|
- LogUtil.errorLogInfo("", TAG, re);
|
|
|
- }
|
|
|
- catch (Exception e )
|
|
|
- {
|
|
|
- LogUtil.errorLogInfo("", TAG, e);//e.printStackTrace();
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- public boolean GetNoisePopupUse()
|
|
|
- {
|
|
|
- try
|
|
|
- {
|
|
|
- String ret = GetWallPADData(INTERLAYER_NOISE_POPUP_USE);
|
|
|
-
|
|
|
- if( ret.compareTo(String.valueOf(true)) == 0 )
|
|
|
- {
|
|
|
- return true;
|
|
|
- }
|
|
|
- else
|
|
|
- {
|
|
|
- return false;
|
|
|
- }
|
|
|
- }
|
|
|
- catch (RuntimeException re) {
|
|
|
- LogUtil.errorLogInfo("", TAG, re);
|
|
|
- return false;
|
|
|
- }
|
|
|
- catch (Exception e )
|
|
|
- {
|
|
|
- LogUtil.errorLogInfo("", TAG, e);//e.printStackTrace();
|
|
|
- return false;
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- /**
|
|
|
- * 스마트 재실센서 기본모드1 사용설정 <br>
|
|
|
- * 기본모드1 (조명 에너지 절약)
|
|
|
- *
|
|
|
- * @param mode - (boolean) 설정할 값 (true:ON , false:OFF)
|
|
|
- */
|
|
|
- public void Set_InRoomDetect_Scenario_Normal1( boolean mode )
|
|
|
- {
|
|
|
- try
|
|
|
- {
|
|
|
- UpdateWallPADData(INROOMDETECT_SCENARIO_NORMAL1, String.valueOf(mode) );
|
|
|
- }
|
|
|
- catch (RuntimeException re) {
|
|
|
- LogUtil.errorLogInfo("", TAG, re);
|
|
|
- }
|
|
|
- catch (Exception e )
|
|
|
- {
|
|
|
- LogUtil.errorLogInfo("", TAG, e);//e.printStackTrace();
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- /**
|
|
|
- * 스마트 재실센서 기본모드1 사용여부 확인 <br>
|
|
|
- * 기본모드1 (조명 에너지 절약)
|
|
|
- *
|
|
|
- */
|
|
|
- public boolean Get_InRoomDetect_Scenario_Normal1()
|
|
|
- {
|
|
|
- try
|
|
|
- {
|
|
|
- String ret = GetWallPADData(INROOMDETECT_SCENARIO_NORMAL1);
|
|
|
-
|
|
|
- if (ret.compareTo(String.valueOf(true)) == 0) { return true; }
|
|
|
- else { return false; }
|
|
|
- }
|
|
|
- catch (RuntimeException re) {
|
|
|
- LogUtil.errorLogInfo("", TAG, re);
|
|
|
- return false;
|
|
|
- }
|
|
|
- catch (Exception e)
|
|
|
- {
|
|
|
- LogUtil.errorLogInfo("", TAG, e);//e.printStackTrace();
|
|
|
- return false;
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- /**
|
|
|
- * 스마트 재실센서 기본모드2 사용설정 <br>
|
|
|
- * 기본모드2 (야간 식탁등 켜짐)
|
|
|
- *
|
|
|
- * @param mode - (boolean) 설정할 값 (true:ON , false:OFF)
|
|
|
- */
|
|
|
- public void Set_InRoomDetect_Scenario_Normal2( boolean mode )
|
|
|
- {
|
|
|
- try
|
|
|
- {
|
|
|
- UpdateWallPADData(INROOMDETECT_SCENARIO_NORMAL2, String.valueOf(mode) );
|
|
|
- }
|
|
|
- catch (RuntimeException re) {
|
|
|
- LogUtil.errorLogInfo("", TAG, re);
|
|
|
- }
|
|
|
- catch (Exception e )
|
|
|
- {
|
|
|
- LogUtil.errorLogInfo("", TAG, e);//e.printStackTrace();
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- /**
|
|
|
- * 스마트 재실센서 기본모드2 사용여부 확인 <br>
|
|
|
- * 기본모드2 (야간 식탁등 켜짐)
|
|
|
- *
|
|
|
- */
|
|
|
- public boolean Get_InRoomDetect_Scenario_Normal2()
|
|
|
- {
|
|
|
- try
|
|
|
- {
|
|
|
- String ret = GetWallPADData(INROOMDETECT_SCENARIO_NORMAL2);
|
|
|
-
|
|
|
- if (ret.compareTo(String.valueOf(true)) == 0) { return true; }
|
|
|
- else { return false; }
|
|
|
- }
|
|
|
- catch (RuntimeException re) {
|
|
|
- LogUtil.errorLogInfo("", TAG, re);
|
|
|
- return false;
|
|
|
- }
|
|
|
- catch (Exception e)
|
|
|
- {
|
|
|
- LogUtil.errorLogInfo("", TAG, e);//e.printStackTrace();
|
|
|
- return false;
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- /**
|
|
|
- * 스마트 재실센서 사용자조명절전 사용설정 <br>
|
|
|
- *
|
|
|
- * @param mode - (boolean) 설정할 값 (true:ON , false:OFF)
|
|
|
- */
|
|
|
- public void Set_InRoomDetect_Scenario_Userset( boolean mode )
|
|
|
- {
|
|
|
- try
|
|
|
- {
|
|
|
- UpdateWallPADData(INROOMDETECT_SCENARIO_USERSET, String.valueOf(mode) );
|
|
|
- }
|
|
|
- catch (RuntimeException re) {
|
|
|
- LogUtil.errorLogInfo("", TAG, re);
|
|
|
- }
|
|
|
- catch (Exception e )
|
|
|
- {
|
|
|
- LogUtil.errorLogInfo("", TAG, e);//e.printStackTrace();
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- /**
|
|
|
- * 스마트 재실센서 사용자조명절전 사용여부 확인 <br>
|
|
|
- *
|
|
|
- */
|
|
|
- public boolean Get_InRoomDetect_Scenario_Userset()
|
|
|
- {
|
|
|
- try
|
|
|
- {
|
|
|
- String ret = GetWallPADData(INROOMDETECT_SCENARIO_USERSET);
|
|
|
-
|
|
|
- if (ret.compareTo(String.valueOf(true)) == 0) { return true; }
|
|
|
- else { return false; }
|
|
|
- }
|
|
|
- catch (RuntimeException re) {
|
|
|
- LogUtil.errorLogInfo("", TAG, re);
|
|
|
- return false;
|
|
|
- }
|
|
|
- catch (Exception e)
|
|
|
- {
|
|
|
- LogUtil.errorLogInfo("", TAG, e);//e.printStackTrace();
|
|
|
- return false;
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- /**
|
|
|
- * 스마트 재실센서 전기레인지 안전모드 사용설정 <br>
|
|
|
- *
|
|
|
- * @param mode - (boolean) 설정할 값 (true:ON , false:OFF)
|
|
|
- */
|
|
|
- public void Set_InRoomDetect_Scenario_ElecRangeSafe( boolean mode )
|
|
|
- {
|
|
|
- try
|
|
|
- {
|
|
|
- UpdateWallPADData(INROOMDETECT_SCENARIO_ELECRANGE_SAFE, String.valueOf(mode) );
|
|
|
- }
|
|
|
- catch (RuntimeException re) {
|
|
|
- LogUtil.errorLogInfo("", TAG, re);
|
|
|
- }
|
|
|
- catch (Exception e )
|
|
|
- {
|
|
|
- LogUtil.errorLogInfo("", TAG, e);//e.printStackTrace();
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- /**
|
|
|
- * 스마트 재실센서 전기레인지 안전모드 사용여부 확인 <br>
|
|
|
- *
|
|
|
- */
|
|
|
- public boolean Get_InRoomDetect_Scenario_ElecRangeSafe()
|
|
|
- {
|
|
|
- try
|
|
|
- {
|
|
|
- String ret = GetWallPADData(INROOMDETECT_SCENARIO_ELECRANGE_SAFE);
|
|
|
-
|
|
|
- if (ret.compareTo(String.valueOf(true)) == 0) { return true; }
|
|
|
- else { return false; }
|
|
|
- }
|
|
|
- catch (RuntimeException re) {
|
|
|
- LogUtil.errorLogInfo("", TAG, re);
|
|
|
- return false;
|
|
|
- }
|
|
|
- catch (Exception e)
|
|
|
- {
|
|
|
- LogUtil.errorLogInfo("", TAG, e);//e.printStackTrace();
|
|
|
- return false;
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
-
|
|
|
- /**
|
|
|
- * 스마트 재실센서 시나리오 공통 설정 <br>
|
|
|
- *
|
|
|
- * @param kindStr - (String) 설정할 시나리오 모드
|
|
|
- * @param startTimeStr - (String) 설정할 시작 시간
|
|
|
- * @param endTimeStr - (String) 설정할 종료 시간
|
|
|
- * @param dateStr - (String) 설정할 요일 모음
|
|
|
- * @param locStr - (String) 설정할 제어위치 모음
|
|
|
- * @param actTime1Str - (String) 설정할 시나리오 동작시간1
|
|
|
- * @param act1Str - (String) 설정할 동작1
|
|
|
- * @param actTime2Str - (String) 설정할 시나리오 동작시간2
|
|
|
- * @param act2Str - (String) 설정할 동작2
|
|
|
- *
|
|
|
- */
|
|
|
- public void Set_InRoomDetect_Scenario_Modes( String kindStr, String startTimeStr, String endTimeStr, String dateStr, String locStr,
|
|
|
- String actTime1Str, String act1Str, String actTime2Str, String act2Str )
|
|
|
- {
|
|
|
- /*
|
|
|
- KIND-NORMAL1/START-AM:09:30/END-PM:10:00/DATE-1:2:3:4:5:6:7/
|
|
|
- LOC-LIV;KIT;TBL;MROOM;BED1;BED2/TIME1-60/ACT1-DIM:30/TIME2-20/ACT2-STAT:OFF
|
|
|
- */
|
|
|
- String saveStr = "";
|
|
|
- String saveMode = "";
|
|
|
- try
|
|
|
- {
|
|
|
- String kind = "";
|
|
|
- String start = "";
|
|
|
- String end = "";
|
|
|
- String date = "";
|
|
|
- String loc = "";
|
|
|
- String acttime1 = "";
|
|
|
- String act1 = "";
|
|
|
- String acttime2 = "";
|
|
|
- String act2 = "";
|
|
|
-
|
|
|
- // 1. KIND - KIND-NORMAL1
|
|
|
- if(kindStr.equals("NORMAL1") || kindStr.equals("NORMAL2") || kindStr.equals("USERSET") || kindStr.equals("ELECRANGE_SAFE"))
|
|
|
- {
|
|
|
- kind += "KIND-" + kindStr;
|
|
|
-
|
|
|
- if(kindStr.equals("NORMAL1")) saveMode = INROOMDETECT_SCENARIO_NORMAL1_INFO;
|
|
|
- else if(kindStr.equals("NORMAL2")) saveMode = INROOMDETECT_SCENARIO_NORMAL2_INFO;
|
|
|
- else if(kindStr.equals("USERSET")) saveMode = INROOMDETECT_SCENARIO_USERSET_INFO;
|
|
|
- else if(kindStr.equals("ELECRANGE_SAFE")) saveMode = INROOMDETECT_SCENARIO_ELECRANGE_SAFE_INFO;
|
|
|
- }
|
|
|
- else
|
|
|
- {
|
|
|
- Log.w(TAG, "[Set_InRoomDetect_Scenario_Modes] - Kind Error : " + kindStr);
|
|
|
- return;
|
|
|
- }
|
|
|
-
|
|
|
- // 2. Start Time - START-AM:09:30
|
|
|
- String[] startArr = startTimeStr.split(":");
|
|
|
- if(startArr.length == 3)
|
|
|
- {
|
|
|
- if(startArr[0].equals("AM") || startArr[0].equals("PM"))
|
|
|
- { }
|
|
|
- else
|
|
|
- {
|
|
|
- Log.w(TAG, "[Set_InRoomDetect_Scenario_Modes] - startTimeStr ampm : " + startTimeStr);
|
|
|
- return;
|
|
|
- }
|
|
|
-
|
|
|
- if(Integer.parseInt(startArr[1]) >= 0 && Integer.parseInt(startArr[1]) <= 23)
|
|
|
- { }
|
|
|
- else
|
|
|
- {
|
|
|
- Log.w(TAG, "[Set_InRoomDetect_Scenario_Modes] - startTimeStr hour : " + startTimeStr);
|
|
|
- return;
|
|
|
- }
|
|
|
-
|
|
|
- if(Integer.parseInt(startArr[2]) >= 0 && Integer.parseInt(startArr[2]) <= 59)
|
|
|
- { }
|
|
|
- else
|
|
|
- {
|
|
|
- Log.w(TAG, "[Set_InRoomDetect_Scenario_Modes] - startTimeStr min : " + startTimeStr);
|
|
|
- return;
|
|
|
- }
|
|
|
-
|
|
|
- start += "START-" + startTimeStr;
|
|
|
- }
|
|
|
- else
|
|
|
- {
|
|
|
- Log.w(TAG, "[Set_InRoomDetect_Scenario_Modes] - startTimeStr Error : " + startTimeStr);
|
|
|
- return;
|
|
|
- }
|
|
|
-
|
|
|
- // 3. End Time - END-PM:10:00
|
|
|
- String[] endtimeArr = endTimeStr.split(":");
|
|
|
- if(endtimeArr.length == 3)
|
|
|
- {
|
|
|
- if(endtimeArr[0].equals("AM") || endtimeArr[0].equals("PM"))
|
|
|
- { }
|
|
|
- else
|
|
|
- {
|
|
|
- Log.w(TAG, "[Set_InRoomDetect_Scenario_Modes] - endTimeStr ampm : " + endTimeStr);
|
|
|
- return;
|
|
|
- }
|
|
|
-
|
|
|
- if(Integer.parseInt(endtimeArr[1]) >= 0 && Integer.parseInt(endtimeArr[1]) <= 23)
|
|
|
- { }
|
|
|
- else
|
|
|
- {
|
|
|
- Log.w(TAG, "[Set_InRoomDetect_Scenario_Modes] - endTimeStr hour : " + endTimeStr);
|
|
|
- return;
|
|
|
- }
|
|
|
-
|
|
|
- if(Integer.parseInt(endtimeArr[2]) >= 0 && Integer.parseInt(endtimeArr[2]) <= 59)
|
|
|
- { }
|
|
|
- else
|
|
|
- {
|
|
|
- Log.w(TAG, "[Set_InRoomDetect_Scenario_Modes] - endTimeStr min : " + endTimeStr);
|
|
|
- return;
|
|
|
- }
|
|
|
-
|
|
|
- end += "END-" + endTimeStr;
|
|
|
- }
|
|
|
- else
|
|
|
- {
|
|
|
- Log.w(TAG, "[Set_InRoomDetect_Scenario_Modes] - endTimeStr Error : " + endTimeStr);
|
|
|
- return;
|
|
|
- }
|
|
|
-
|
|
|
- // 4. Date - DATE-1:2:3:4:5:6:7
|
|
|
- String[] dates = dateStr.split(":");
|
|
|
- for(int i = 0; i < dates.length; i++)
|
|
|
- {
|
|
|
- if(Integer.parseInt(dates[i]) >= 1 && Integer.parseInt(dates[i]) <= 7)
|
|
|
- { }
|
|
|
- else
|
|
|
- {
|
|
|
- Log.w(TAG, "[Set_InRoomDetect_Scenario_Modes] - dateStr Range Error : " + i + " / " + dateStr);
|
|
|
- return;
|
|
|
- }
|
|
|
- }
|
|
|
- date += "DATE-" + dateStr;
|
|
|
-
|
|
|
- // 5. Loc - LOC-LIV;KIT;TBL;MROOM;BED1;BED2
|
|
|
- String[] locs = locStr.split(";");
|
|
|
- for(int i = 0; i < locs.length; i++)
|
|
|
- {
|
|
|
- if(locs[i].equals("LIV") || locs[i].equals("KIT") || locs[i].equals("TBL") || locs[i].equals("MROOM") ||
|
|
|
- locs[i].equals("MROOM") || locs[i].equals("BED1") || locs[i].equals("BED2")|| locs[i].equals("ELECRANGE") )
|
|
|
- { }
|
|
|
- else
|
|
|
- {
|
|
|
- Log.w(TAG, "[Set_InRoomDetect_Scenario_Modes] - locStr Range Error : " + i + " / " + locs[i] + " / " + locStr);
|
|
|
- return;
|
|
|
- }
|
|
|
- }
|
|
|
- loc += "LOC-" + locStr;
|
|
|
-
|
|
|
- // 6. ActTime1 - TIME1-60
|
|
|
- if(Integer.parseInt(actTime1Str) >= 0 && Integer.parseInt(actTime1Str) <= 360)
|
|
|
- { }
|
|
|
- else
|
|
|
- {
|
|
|
- Log.w(TAG, "[Set_InRoomDetect_Scenario_Modes] - actTime1Str Range Error : " + actTime1Str);
|
|
|
- return;
|
|
|
- }
|
|
|
- acttime1 += "TIME1-" + actTime1Str;
|
|
|
-
|
|
|
- // 7. Act1 - ACT1-DIM:30
|
|
|
- String[] act1s = act1Str.split(";");
|
|
|
- for(int j = 0; j < act1s.length; j++)
|
|
|
- {
|
|
|
- String[] firsts = act1s[j].split(":");
|
|
|
- if(firsts.length == 2)
|
|
|
- {
|
|
|
- if(firsts[0].equals("DIM") )
|
|
|
- {
|
|
|
- if(Integer.parseInt(firsts[1]) >= 10 && Integer.parseInt(firsts[1]) <= 100)
|
|
|
- { }
|
|
|
- else
|
|
|
- {
|
|
|
- Log.w(TAG, "[Set_InRoomDetect_Scenario_Modes] - act1s DIM Error : " + j + " / " + act1s);
|
|
|
- return;
|
|
|
- }
|
|
|
- }
|
|
|
- else if(firsts[0].equals("STAT") )
|
|
|
- {
|
|
|
- if(firsts[1].equals("ON") || firsts[1].equals("OFF"))
|
|
|
- { }
|
|
|
- else
|
|
|
- {
|
|
|
- Log.w(TAG, "[Set_InRoomDetect_Scenario_Modes] - act1s STAT Error : " + act1s);
|
|
|
- return;
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
- act1 += "ACT1-" + act1Str;
|
|
|
-
|
|
|
- // 8. ActTime2 - TIME2-60
|
|
|
- if(Integer.parseInt(actTime2Str) >= 0 && Integer.parseInt(actTime2Str) <= 360)
|
|
|
- { }
|
|
|
- else
|
|
|
- {
|
|
|
- Log.w(TAG, "[Set_InRoomDetect_Scenario_Modes] - actTime2Str Range Error : " + actTime2Str);
|
|
|
- return;
|
|
|
- }
|
|
|
- acttime2 += "TIME2-" + actTime2Str;
|
|
|
-
|
|
|
- // 9. Act2 - ACT2-STAT:OFF
|
|
|
- String[] act2s = act1Str.split(";");
|
|
|
- for(int j = 0; j < act2s.length; j++)
|
|
|
- {
|
|
|
- String[] firsts = act2s[j].split(":");
|
|
|
- if(firsts.length == 2)
|
|
|
- {
|
|
|
- if(firsts[0].equals("DIM") )
|
|
|
- {
|
|
|
- if(Integer.parseInt(firsts[1]) >= 10 && Integer.parseInt(firsts[1]) <= 100)
|
|
|
- { }
|
|
|
- else
|
|
|
- {
|
|
|
- Log.w(TAG, "[Set_InRoomDetect_Scenario_Modes] - act1s DIM Error : " + act2s);
|
|
|
- return;
|
|
|
- }
|
|
|
- }
|
|
|
- else if(firsts[0].equals("STAT") )
|
|
|
- {
|
|
|
- if(firsts[1].equals("ON") || firsts[1].equals("OFF"))
|
|
|
- { }
|
|
|
- else
|
|
|
- {
|
|
|
- Log.w(TAG, "[Set_InRoomDetect_Scenario_Modes] - act1s STAT Error : " + act2s);
|
|
|
- return;
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
- act2 += "ACT2-" + act2Str;
|
|
|
-
|
|
|
-
|
|
|
- saveStr += kind + "/" + start + "/" + end + "/" + date + "/" + loc + "/" + acttime1 + "/" + act1 + "/" + acttime2 + "/" + act2;
|
|
|
- Log.d(TAG, "[Set_InRoomDetect_Scenario_Modes] - save : " + saveStr);
|
|
|
-
|
|
|
- UpdateWallPADData(saveMode, saveStr);
|
|
|
-
|
|
|
- }
|
|
|
- catch (RuntimeException re) {
|
|
|
- LogUtil.errorLogInfo("", TAG, re);
|
|
|
- }
|
|
|
- catch (Exception ee)
|
|
|
- {
|
|
|
- Log.w(TAG, "[Set_InRoomDetect_Scenario_Modes] - Exception !!!");
|
|
|
- LogUtil.errorLogInfo("", TAG, ee);//ee.printStackTrace();
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
-
|
|
|
- /**
|
|
|
- * 스마트 재실센서 기본모드1 사용설정 <br>
|
|
|
- *
|
|
|
- * @param modeStr - (String) 설정할 값
|
|
|
- */
|
|
|
- public void Set_InRoomDetect_Scenario_Mode_Normal1( String modeStr )
|
|
|
- {
|
|
|
- try
|
|
|
- {
|
|
|
- String[] infos = modeStr.split("/");
|
|
|
-
|
|
|
- if(infos.length != 9) return;
|
|
|
-
|
|
|
- //String kind, startRunTime, endRunTime, date, loc, nonDetectTime1, act1, nonDetectTime2, act2;
|
|
|
- boolean error = false;
|
|
|
-
|
|
|
- for(int i = 0; i < infos.length; i++)
|
|
|
- {
|
|
|
- String[] data = infos[i].split("-");
|
|
|
- if(data.length != 2)
|
|
|
- {
|
|
|
- Log.w(TAG, "[Set_InRoomDetect_Scenario_Mode_Normal1] each data LEN ERROR !!! : " + infos[i]);
|
|
|
- error = true;
|
|
|
- break;
|
|
|
- }
|
|
|
- String type = data[0];
|
|
|
- String info = data[1];
|
|
|
-
|
|
|
- if(type.equals("KIND"))
|
|
|
- {
|
|
|
- if( !info.equals("NORMAL1") && !info.equals("NORMAL2") && !info.equals("USERSET") && !info.equals("ELECRANGE_SAFE") )
|
|
|
- {
|
|
|
- Log.w(TAG, "[Set_InRoomDetect_Scenario_Mode_Normal1] - KIND Err : " + info);
|
|
|
- return;
|
|
|
- }
|
|
|
- }
|
|
|
- else if(type.equals("START")) { }
|
|
|
- else if(type.equals("END")) { }
|
|
|
- else if(type.equals("DATE")) { }
|
|
|
- else if(type.equals("LOC")) { }
|
|
|
- else if(type.equals("TIME1")) { }
|
|
|
- else if(type.equals("TIME2")) { }
|
|
|
- else if(type.equals("ACT1")) { }
|
|
|
- else if(type.equals("ACT2")) { }
|
|
|
- else
|
|
|
- {
|
|
|
- Log.w(TAG, "[Set_InRoomDetect_Scenario_Mode_Normal1] type ERROR !!! : " + infos[i]);
|
|
|
- error = true;
|
|
|
- break;
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- if(!error)
|
|
|
- {
|
|
|
- UpdateWallPADData(INROOMDETECT_SCENARIO_NORMAL1_INFO, modeStr);
|
|
|
- }
|
|
|
- }
|
|
|
- catch (RuntimeException re) {
|
|
|
- LogUtil.errorLogInfo("", TAG, re);
|
|
|
- }
|
|
|
- catch (Exception e )
|
|
|
- {
|
|
|
- LogUtil.errorLogInfo("", TAG, e);//e.printStackTrace();
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- /**
|
|
|
- * 스마트 재실센서 기본모드1 사용여부 확인 <br>
|
|
|
- *
|
|
|
- */
|
|
|
- public String Get_InRoomDetect_Scenario_Mode_Normal1()
|
|
|
- {
|
|
|
- try
|
|
|
- {
|
|
|
- String ret = GetWallPADData(INROOMDETECT_SCENARIO_NORMAL1_INFO);
|
|
|
-
|
|
|
- //if (ret.compareTo(String.valueOf(true)) == 0) { return true; }
|
|
|
- //else { return false; }
|
|
|
-
|
|
|
- return ret;
|
|
|
- }
|
|
|
- catch (RuntimeException re) {
|
|
|
- LogUtil.errorLogInfo("", TAG, re);
|
|
|
- return "";
|
|
|
- }
|
|
|
- catch (Exception e)
|
|
|
- {
|
|
|
- LogUtil.errorLogInfo("", TAG, e);//e.printStackTrace();
|
|
|
- return "";
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- /**
|
|
|
- * 스마트 재실센서 기본모드2 사용설정 <br>
|
|
|
- *
|
|
|
- * @param modeStr - (String) 설정할 값
|
|
|
- */
|
|
|
- public void Set_InRoomDetect_Scenario_Mode_Normal2( String modeStr )
|
|
|
- {
|
|
|
- try
|
|
|
- {
|
|
|
- String[] infos = modeStr.split("/");
|
|
|
-
|
|
|
- if(infos.length != 9) return;
|
|
|
-
|
|
|
- //String kind, startRunTime, endRunTime, date, loc, nonDetectTime1, act1, nonDetectTime2, act2;
|
|
|
- boolean error = false;
|
|
|
-
|
|
|
- for(int i = 0; i < infos.length; i++)
|
|
|
- {
|
|
|
- String[] data = infos[i].split("-");
|
|
|
- if(data.length != 2)
|
|
|
- {
|
|
|
- Log.w(TAG, "[Set_InRoomDetect_Scenario_Mode_Normal1] each data LEN ERROR !!! : " + infos[i]);
|
|
|
- error = true;
|
|
|
- break;
|
|
|
- }
|
|
|
- String type = data[0];
|
|
|
- String info = data[1];
|
|
|
-
|
|
|
- if(type.equals("KIND"))
|
|
|
- {
|
|
|
- if( !info.equals("NORMAL1") && !info.equals("NORMAL2") && !info.equals("USERSET") && !info.equals("ELECRANGE_SAFE") )
|
|
|
- {
|
|
|
- Log.w(TAG, "[Set_InRoomDetect_Scenario_Mode_Normal1] - KIND Err : " + info);
|
|
|
- return;
|
|
|
- }
|
|
|
- }
|
|
|
- else if(type.equals("START")) { }
|
|
|
- else if(type.equals("END")) { }
|
|
|
- else if(type.equals("DATE")) { }
|
|
|
- else if(type.equals("LOC")) { }
|
|
|
- else if(type.equals("TIME1")) { }
|
|
|
- else if(type.equals("TIME2")) { }
|
|
|
- else if(type.equals("ACT1")) { }
|
|
|
- else if(type.equals("ACT2")) { }
|
|
|
- else
|
|
|
- {
|
|
|
- Log.w(TAG, "[Set_InRoomDetect_Scenario_Mode_Normal1] type ERROR !!! : " + infos[i]);
|
|
|
- error = true;
|
|
|
- break;
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- if(!error)
|
|
|
- {
|
|
|
- UpdateWallPADData(INROOMDETECT_SCENARIO_NORMAL2_INFO, modeStr);
|
|
|
- }
|
|
|
- }
|
|
|
- catch (RuntimeException re) {
|
|
|
- LogUtil.errorLogInfo("", TAG, re);
|
|
|
- }
|
|
|
- catch (Exception e )
|
|
|
- {
|
|
|
- LogUtil.errorLogInfo("", TAG, e);//e.printStackTrace();
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- /**
|
|
|
- * 스마트 재실센서 기본모드2 사용여부 확인 <br>
|
|
|
- *
|
|
|
- */
|
|
|
- public String Get_InRoomDetect_Scenario_Mode_Normal2()
|
|
|
- {
|
|
|
- try
|
|
|
- {
|
|
|
- String ret = GetWallPADData(INROOMDETECT_SCENARIO_NORMAL2_INFO);
|
|
|
-
|
|
|
- //if (ret.compareTo(String.valueOf(true)) == 0) { return true; }
|
|
|
- //else { return false; }
|
|
|
-
|
|
|
- return ret;
|
|
|
- }
|
|
|
- catch (RuntimeException re) {
|
|
|
- LogUtil.errorLogInfo("", TAG, re);
|
|
|
- return "";
|
|
|
- }
|
|
|
- catch (Exception e)
|
|
|
- {
|
|
|
- LogUtil.errorLogInfo("", TAG, e);//e.printStackTrace();
|
|
|
- return "";
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- /**
|
|
|
- * 스마트 재실센서 사용자설정모드 사용설정 <br>
|
|
|
- *
|
|
|
- * @param modeStr - (String) 설정할 값
|
|
|
- */
|
|
|
- public void Set_InRoomDetect_Scenario_Mode_Userset( String modeStr )
|
|
|
- {
|
|
|
- try
|
|
|
- {
|
|
|
- String[] infos = modeStr.split("/");
|
|
|
-
|
|
|
- if(infos.length != 9) return;
|
|
|
-
|
|
|
- //String kind, startRunTime, endRunTime, date, loc, nonDetectTime1, act1, nonDetectTime2, act2;
|
|
|
- boolean error = false;
|
|
|
-
|
|
|
- for(int i = 0; i < infos.length; i++)
|
|
|
- {
|
|
|
- String[] data = infos[i].split("-");
|
|
|
- if(data.length != 2)
|
|
|
- {
|
|
|
- Log.w(TAG, "[Set_InRoomDetect_Scenario_Mode_Normal1] each data LEN ERROR !!! : " + infos[i]);
|
|
|
- error = true;
|
|
|
- break;
|
|
|
- }
|
|
|
- String type = data[0];
|
|
|
- String info = data[1];
|
|
|
-
|
|
|
- if(type.equals("KIND"))
|
|
|
- {
|
|
|
- if( !info.equals("NORMAL1") && !info.equals("NORMAL2") && !info.equals("USERSET") && !info.equals("ELECRANGE_SAFE") )
|
|
|
- {
|
|
|
- Log.w(TAG, "[Set_InRoomDetect_Scenario_Mode_Normal1] - KIND Err : " + info);
|
|
|
- return;
|
|
|
- }
|
|
|
- }
|
|
|
- else if(type.equals("START")) { }
|
|
|
- else if(type.equals("END")) { }
|
|
|
- else if(type.equals("DATE")) { }
|
|
|
- else if(type.equals("LOC")) { }
|
|
|
- else if(type.equals("TIME1")) { }
|
|
|
- else if(type.equals("TIME2")) { }
|
|
|
- else if(type.equals("ACT1")) { }
|
|
|
- else if(type.equals("ACT2")) { }
|
|
|
- else
|
|
|
- {
|
|
|
- Log.w(TAG, "[Set_InRoomDetect_Scenario_Mode_Normal1] type ERROR !!! : " + infos[i]);
|
|
|
- error = true;
|
|
|
- break;
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- if(!error)
|
|
|
- {
|
|
|
- UpdateWallPADData(INROOMDETECT_SCENARIO_USERSET_INFO, modeStr);
|
|
|
- }
|
|
|
- }
|
|
|
- catch (RuntimeException re) {
|
|
|
- LogUtil.errorLogInfo("", TAG, re);
|
|
|
- }
|
|
|
- catch (Exception e )
|
|
|
- {
|
|
|
- LogUtil.errorLogInfo("", TAG, e);//e.printStackTrace();
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- /**
|
|
|
- * 스마트 재실센서 사용자설정모드 사용여부 확인 <br>
|
|
|
- *
|
|
|
- */
|
|
|
- public String Get_InRoomDetect_Scenario_Mode_Userset()
|
|
|
- {
|
|
|
- try
|
|
|
- {
|
|
|
- String ret = GetWallPADData(INROOMDETECT_SCENARIO_USERSET_INFO);
|
|
|
-
|
|
|
- //if (ret.compareTo(String.valueOf(true)) == 0) { return true; }
|
|
|
- //else { return false; }
|
|
|
-
|
|
|
- return ret;
|
|
|
- }
|
|
|
- catch (RuntimeException re) {
|
|
|
- LogUtil.errorLogInfo("", TAG, re);
|
|
|
- return "";
|
|
|
- }
|
|
|
- catch (Exception e)
|
|
|
- {
|
|
|
- LogUtil.errorLogInfo("", TAG, e);//e.printStackTrace();
|
|
|
- return "";
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- /**
|
|
|
- * 스마트 재실센서 전기레인지 안전모드 사용설정 <br>
|
|
|
- *
|
|
|
- * @param modeStr - (String) 설정할 값
|
|
|
- */
|
|
|
- public void Set_InRoomDetect_Scenario_Mode_ElecRangeSafe( String modeStr )
|
|
|
- {
|
|
|
- try
|
|
|
- {
|
|
|
- String[] infos = modeStr.split("/");
|
|
|
-
|
|
|
- if(infos.length != 9) return;
|
|
|
-
|
|
|
- //String kind, startRunTime, endRunTime, date, loc, nonDetectTime1, act1, nonDetectTime2, act2;
|
|
|
- boolean error = false;
|
|
|
-
|
|
|
- for(int i = 0; i < infos.length; i++)
|
|
|
- {
|
|
|
- String[] data = infos[i].split("-");
|
|
|
- if(data.length != 2)
|
|
|
- {
|
|
|
- Log.w(TAG, "[Set_InRoomDetect_Scenario_Mode_Normal1] each data LEN ERROR !!! : " + infos[i]);
|
|
|
- error = true;
|
|
|
- break;
|
|
|
- }
|
|
|
- String type = data[0];
|
|
|
- String info = data[1];
|
|
|
-
|
|
|
- if(type.equals("KIND"))
|
|
|
- {
|
|
|
- if( !info.equals("NORMAL1") && !info.equals("NORMAL2") && !info.equals("USERSET") && !info.equals("ELECRANGE_SAFE") )
|
|
|
- {
|
|
|
- Log.w(TAG, "[Set_InRoomDetect_Scenario_Mode_Normal1] - KIND Err : " + info);
|
|
|
- return;
|
|
|
- }
|
|
|
- }
|
|
|
- else if(type.equals("START")) { }
|
|
|
- else if(type.equals("END")) { }
|
|
|
- else if(type.equals("DATE")) { }
|
|
|
- else if(type.equals("LOC")) { }
|
|
|
- else if(type.equals("TIME1")) { }
|
|
|
- else if(type.equals("TIME2")) { }
|
|
|
- else if(type.equals("ACT1")) { }
|
|
|
- else if(type.equals("ACT2")) { }
|
|
|
- else
|
|
|
- {
|
|
|
- Log.w(TAG, "[Set_InRoomDetect_Scenario_Mode_Normal1] type ERROR !!! : " + infos[i]);
|
|
|
- error = true;
|
|
|
- break;
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- if(!error)
|
|
|
- {
|
|
|
- UpdateWallPADData(INROOMDETECT_SCENARIO_ELECRANGE_SAFE_INFO, modeStr);
|
|
|
- }
|
|
|
- }
|
|
|
- catch (RuntimeException re) {
|
|
|
- LogUtil.errorLogInfo("", TAG, re);
|
|
|
- }
|
|
|
- catch (Exception e )
|
|
|
- {
|
|
|
- LogUtil.errorLogInfo("", TAG, e);//e.printStackTrace();
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- /**
|
|
|
- * 스마트 재실센서 전기레인지 안전모드 사용여부 확인 <br>
|
|
|
- *
|
|
|
- */
|
|
|
- public String Get_InRoomDetect_Scenario_Mode_ElecRangeSafe()
|
|
|
- {
|
|
|
- try
|
|
|
- {
|
|
|
- String ret = GetWallPADData(INROOMDETECT_SCENARIO_ELECRANGE_SAFE_INFO);
|
|
|
-
|
|
|
- //if (ret.compareTo(String.valueOf(true)) == 0) { return true; }
|
|
|
- //else { return false; }
|
|
|
-
|
|
|
- return ret;
|
|
|
- }
|
|
|
- catch (RuntimeException re) {
|
|
|
- LogUtil.errorLogInfo("", TAG, re);
|
|
|
- return "";
|
|
|
- }
|
|
|
- catch (Exception e)
|
|
|
- {
|
|
|
- LogUtil.errorLogInfo("", TAG, e);//e.printStackTrace();
|
|
|
- return "";
|
|
|
- }
|
|
|
- }
|
|
|
- /**
|
|
|
- * 스마트키 감지시 알람 여부 설정
|
|
|
- *
|
|
|
- * @param bSet - (boolean) 설정할 값 (true:ON , false:OFF)
|
|
|
- */
|
|
|
- public void SetSmartKeyDetectionAlarm(boolean bSet)
|
|
|
- {
|
|
|
- try
|
|
|
- {
|
|
|
- UpdateWallPADData(SMARTKEY_DETECTION_ALARM, String.valueOf(bSet));
|
|
|
- }
|
|
|
- catch (RuntimeException re) {
|
|
|
- LogUtil.errorLogInfo("", TAG, re);
|
|
|
- }
|
|
|
- catch (Exception e)
|
|
|
- {
|
|
|
- Log.e(TAG, "[SetSmartKeyDetectionAlarm] Exception Error");
|
|
|
- LogUtil.errorLogInfo("", TAG, e);//e.printStackTrace();
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- /**
|
|
|
- * 스마트키 감지시 알람 여부 읽기
|
|
|
- *
|
|
|
- * @return (boolean) 설정값 (true:ON , false:OFF)
|
|
|
- */
|
|
|
- public boolean GetSmartKeyDetectionAlarm()
|
|
|
- {
|
|
|
- try
|
|
|
- {
|
|
|
- String ret = GetWallPADData(SMARTKEY_DETECTION_ALARM);
|
|
|
-
|
|
|
- if(ret.compareTo(String.valueOf(true)) == 0)
|
|
|
- {
|
|
|
- return true;
|
|
|
- }
|
|
|
- else
|
|
|
- {
|
|
|
- return false;
|
|
|
- }
|
|
|
- }
|
|
|
- catch (RuntimeException re) {
|
|
|
- LogUtil.errorLogInfo("", TAG, re);
|
|
|
- return false;
|
|
|
- }
|
|
|
- catch (Exception e )
|
|
|
- {
|
|
|
- Log.e(TAG, "[GetSmartKeyDetectionAlarm] Exception Error");
|
|
|
- LogUtil.errorLogInfo("", TAG, e);//e.printStackTrace();
|
|
|
- return false;
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- /**
|
|
|
- * 환기 예약 ON/OFF 여부 설정
|
|
|
- *
|
|
|
- * @param bSet - (boolean) 설정할 값 (true:ON , false:OFF)
|
|
|
- */
|
|
|
- public void SetVentiReserveOnOff(boolean bSet)
|
|
|
- {
|
|
|
- try
|
|
|
- {
|
|
|
- UpdateWallPADData(VEN_RESERVE_ONOFF, String.valueOf(bSet));
|
|
|
- }
|
|
|
- catch (RuntimeException re) {
|
|
|
- LogUtil.errorLogInfo("", TAG, re);
|
|
|
- }
|
|
|
- catch (Exception e)
|
|
|
- {
|
|
|
- Log.e(TAG, "[VEN_RESERVE_ONOFF] Exception Error");
|
|
|
- LogUtil.errorLogInfo("", TAG, e);//e.printStackTrace();
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- /**
|
|
|
- * 환기 예약 ON/OFF 여부 읽기
|
|
|
- *
|
|
|
- * @return (boolean) 설정값 (true:ON , false:OFF)
|
|
|
- */
|
|
|
- public boolean GetVentiReserveOnOff()
|
|
|
- {
|
|
|
- try
|
|
|
- {
|
|
|
- String ret = GetWallPADData(VEN_RESERVE_ONOFF);
|
|
|
- if(ret.compareTo(String.valueOf(true)) == 0) return true;
|
|
|
- else return false;
|
|
|
- }
|
|
|
- catch (RuntimeException re) {
|
|
|
- LogUtil.errorLogInfo("", TAG, re);
|
|
|
- return false;
|
|
|
- }
|
|
|
- catch (Exception e )
|
|
|
- {
|
|
|
- Log.e(TAG, "[GetVentiReserveOnOff] Exception Error");
|
|
|
- LogUtil.errorLogInfo("", TAG, e);//e.printStackTrace();
|
|
|
- return false;
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- public void SetArsControl( boolean OutSount )
|
|
|
- {
|
|
|
- try
|
|
|
- {
|
|
|
-
|
|
|
- UpdateWallPADData(ARS_CONTROL_DEVICE, String.valueOf(OutSount) );
|
|
|
- }
|
|
|
- catch (RuntimeException re) {
|
|
|
- LogUtil.errorLogInfo("", TAG, re);
|
|
|
- }
|
|
|
- catch (Exception e )
|
|
|
- {
|
|
|
- LogUtil.errorLogInfo("", TAG, e);//e.printStackTrace();
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- public boolean GetArsControl()
|
|
|
- {
|
|
|
- try
|
|
|
- {
|
|
|
- String ret = GetWallPADData(ARS_CONTROL_DEVICE);
|
|
|
-
|
|
|
- if( ret.compareTo(String.valueOf(true)) == 0 )
|
|
|
- {
|
|
|
- return true;
|
|
|
- }
|
|
|
- else
|
|
|
- {
|
|
|
- return false;
|
|
|
- }
|
|
|
- }
|
|
|
- catch (RuntimeException re) {
|
|
|
- LogUtil.errorLogInfo("", TAG, re);
|
|
|
- return true;
|
|
|
- }
|
|
|
- catch (Exception e )
|
|
|
- {
|
|
|
- LogUtil.errorLogInfo("", TAG, e);//e.printStackTrace();
|
|
|
- return true;
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- public void SetRemoteControl( boolean OutSount )
|
|
|
- {
|
|
|
- try
|
|
|
- {
|
|
|
-
|
|
|
- UpdateWallPADData(REMOTE_CONTROLS_DEVICE, String.valueOf(OutSount) );
|
|
|
- }
|
|
|
- catch (RuntimeException re) {
|
|
|
- LogUtil.errorLogInfo("", TAG, re);
|
|
|
- }
|
|
|
- catch (Exception e )
|
|
|
- {
|
|
|
- LogUtil.errorLogInfo("", TAG, e);//e.printStackTrace();
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- public boolean GetRemoteControl()
|
|
|
- {
|
|
|
- try
|
|
|
- {
|
|
|
- String ret = GetWallPADData(REMOTE_CONTROLS_DEVICE);
|
|
|
-
|
|
|
- if( ret.compareTo(String.valueOf(true)) == 0 )
|
|
|
- {
|
|
|
- return true;
|
|
|
- }
|
|
|
- else
|
|
|
- {
|
|
|
- return false;
|
|
|
- }
|
|
|
- }
|
|
|
- catch (RuntimeException re) {
|
|
|
- LogUtil.errorLogInfo("", TAG, re);
|
|
|
- return true;
|
|
|
- }
|
|
|
- catch (Exception e )
|
|
|
- {
|
|
|
- LogUtil.errorLogInfo("", TAG, e);//e.printStackTrace();
|
|
|
- return true;
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- /**
|
|
|
- * 거실조명 모드제어 설정 (전체)
|
|
|
- *
|
|
|
- * @param value 설정값 (9개 설정값의 배열, "그룹전원:그룹디밍:그룹색온도/조명1전원:디밍:색온도/조명2전원:디밍:색온도 ~ 조명8전원:디밍:색온도")
|
|
|
- * 조명전원 : on/off/none(don't care), 디밍/색온도 : 1 ~ 10 (미설정시 0)
|
|
|
- * 예) "off:10:1/off:10:1/off:10:1/off:10:1/off:10:1/off:10:1/off:10:1/off:10:1/off:10:1" : 그룹제어와 1~8번조명이 모두 꺼짐이며, 디밍은 10, 색온도는 1로 설정
|
|
|
- */
|
|
|
- public boolean setLivinglightModeCtrlEntireValue(String[] value) {
|
|
|
- try {
|
|
|
- if (value.length != 9) return false;
|
|
|
-
|
|
|
- String strPresetID = LIVINGLIGHT_PRESET_00;
|
|
|
- for (int i = 0; i < value.length; i++) {
|
|
|
- switch (i) {
|
|
|
- case 0: strPresetID = LIVINGLIGHT_PRESET_00; break;
|
|
|
- case 1: strPresetID = LIVINGLIGHT_PRESET_01; break;
|
|
|
- case 2: strPresetID = LIVINGLIGHT_PRESET_02; break;
|
|
|
- case 3: strPresetID = LIVINGLIGHT_PRESET_03; break;
|
|
|
- case 4: strPresetID = LIVINGLIGHT_PRESET_04; break;
|
|
|
- case 5: strPresetID = LIVINGLIGHT_PRESET_05; break;
|
|
|
- case 6: strPresetID = LIVINGLIGHT_PRESET_06; break;
|
|
|
- case 7: strPresetID = LIVINGLIGHT_PRESET_07; break;
|
|
|
- case 8: strPresetID = LIVINGLIGHT_PRESET_08; break;
|
|
|
- default: strPresetID = LIVINGLIGHT_PRESET_00; break;
|
|
|
- }
|
|
|
- if (!UpdateWallPADData(strPresetID, value[i])) return false;
|
|
|
- }
|
|
|
- return true;
|
|
|
- } catch (RuntimeException re) {
|
|
|
- LogUtil.errorLogInfo("", TAG, re);
|
|
|
- return false;
|
|
|
- }
|
|
|
- catch (Exception e ) {
|
|
|
- Log.e(TAG, "[Exception] setLivinglightModeCtrlEntireValue(String[] value)");
|
|
|
- LogUtil.errorLogInfo("", TAG, e);//e.printStackTrace();
|
|
|
- return false;
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- /**
|
|
|
- * 거실조명 모드제어 설정 (모드별)
|
|
|
- *
|
|
|
- * @param value 설정값 ("그룹전원:그룹디밍:그룹색온도/조명1전원:디밍:색온도/조명2전원:디밍:색온도 ~ 조명8전원:디밍:색온도")
|
|
|
- * 조명전원 : on/off/none(don't care), 디밍/색온도 : 1 ~ 10 (미설정시 0)
|
|
|
- * 예) "off:10:1/off:10:1/off:10:1/off:10:1/off:10:1/off:10:1/off:10:1/off:10:1/off:10:1" : 그룹제어와 1~8번조명이 모두 꺼짐이며, 디밍은 10, 색온도는 1로 설정
|
|
|
- */
|
|
|
- public boolean setLivinglightModeCtrlValues(int presetid, String value) {
|
|
|
- try {
|
|
|
- String strPresetID = LIVINGLIGHT_PRESET_00;
|
|
|
- switch (presetid) {
|
|
|
- case 0: strPresetID = LIVINGLIGHT_PRESET_00; break;
|
|
|
- case 1: strPresetID = LIVINGLIGHT_PRESET_01; break;
|
|
|
- case 2: strPresetID = LIVINGLIGHT_PRESET_02; break;
|
|
|
- case 3: strPresetID = LIVINGLIGHT_PRESET_03; break;
|
|
|
- case 4: strPresetID = LIVINGLIGHT_PRESET_04; break;
|
|
|
- case 5: strPresetID = LIVINGLIGHT_PRESET_05; break;
|
|
|
- case 6: strPresetID = LIVINGLIGHT_PRESET_06; break;
|
|
|
- case 7: strPresetID = LIVINGLIGHT_PRESET_07; break;
|
|
|
- case 8: strPresetID = LIVINGLIGHT_PRESET_08; break;
|
|
|
- default: return false;
|
|
|
- }
|
|
|
-
|
|
|
- return UpdateWallPADData(strPresetID, value);
|
|
|
-
|
|
|
- } catch (RuntimeException re) {
|
|
|
- LogUtil.errorLogInfo("", TAG, re);
|
|
|
- return false;
|
|
|
- }
|
|
|
- catch (Exception e ) {
|
|
|
- Log.e(TAG, "[Exception] setLivinglightModeCtrlValues(int presetid, String value)");
|
|
|
- LogUtil.errorLogInfo("", TAG, e);//e.printStackTrace();
|
|
|
- return false;
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- /**
|
|
|
- * 거실조명 모드제어 설정 (조명별)
|
|
|
- *
|
|
|
- * @param presetid 설정값 ID (0 ~ 8)
|
|
|
- * lightid 조명 ID (0 ~ 8)
|
|
|
- * power 전원 (on/off/none(don't care))
|
|
|
- * dim 밝기 (1 ~ 10, 미설정시 0)
|
|
|
- * color 색온도 (1 ~ 10, 미설정시 0)
|
|
|
- */
|
|
|
- public boolean setLivinglightModeCtrlUnitValues(int presetid, int lightid, String power, int dim, int color) {
|
|
|
- try {
|
|
|
- if (presetid < 0 && 8 < presetid) {
|
|
|
- Log.w(TAG, "[setLivinglightModeCtrlUnitValues] out of range!! presetid [" + presetid + "]");
|
|
|
- return false;
|
|
|
- }
|
|
|
-
|
|
|
- if (lightid < 0 && 8 < lightid) {
|
|
|
- Log.w(TAG, "[setLivinglightModeCtrlUnitValues] out of range!! lightid [" + lightid + "]");
|
|
|
- return false;
|
|
|
- }
|
|
|
-
|
|
|
- if (!(power.equalsIgnoreCase("on") || power.equalsIgnoreCase("off") || power.equalsIgnoreCase("none"))) {
|
|
|
- Log.w(TAG, "[setLivinglightModeCtrlUnitValues] out of range!! power [" + power + "]");
|
|
|
- return false;
|
|
|
- }
|
|
|
-
|
|
|
- if (dim < 0 && 10 < dim) {
|
|
|
- Log.w(TAG, "[setLivinglightModeCtrlUnitValues] out of range!! dim [" + dim + "]");
|
|
|
- return false;
|
|
|
- }
|
|
|
-
|
|
|
- if (color < 0 && 10 < color) {
|
|
|
- Log.w(TAG, "[setLivinglightModeCtrlUnitValues] out of range!! color [" + color + "]");
|
|
|
- return false;
|
|
|
- }
|
|
|
-
|
|
|
- String strResult = getLivinglightModeCtrlValues(presetid);
|
|
|
- String[] strParse = strResult.split("/");
|
|
|
- strParse[lightid] = power + ":" + dim + ":" + color;
|
|
|
-
|
|
|
- String strValues = null;
|
|
|
-
|
|
|
- for (int i = 0; i < strParse.length; i++) {
|
|
|
- if (i == 0) strValues = strParse[i];
|
|
|
- else strValues += "/" + strParse[i];
|
|
|
- }
|
|
|
-
|
|
|
- boolean bRet = setLivinglightModeCtrlValues(presetid, strValues);
|
|
|
- if(bRet)
|
|
|
- {
|
|
|
- // 거실 조명 모드 변경 알림
|
|
|
- Intent notiIntent = new Intent();
|
|
|
- notiIntent.setAction(define.NOTIFY_ACNAME);
|
|
|
- notiIntent.putExtra(define.NOTIBR_KIND, define.NOTIFY_DB__LIVING_LIGHT_MODE);
|
|
|
- CTX.sendBroadcast(notiIntent);
|
|
|
- }
|
|
|
- return bRet;
|
|
|
- } catch (RuntimeException re) {
|
|
|
- LogUtil.errorLogInfo("", TAG, re);
|
|
|
- return false;
|
|
|
- }
|
|
|
- catch (Exception e ) {
|
|
|
- Log.e(TAG, "[Exception] setLivinglightModeCtrlUnitValues(int presetid, int lightid, String power, int dim, int color)");
|
|
|
- LogUtil.errorLogInfo("", TAG, e);//e.printStackTrace();
|
|
|
- return false;
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- /**
|
|
|
- * 거실조명 모드제어 설정값 읽기
|
|
|
- *
|
|
|
- * @return (String[]) 설정값 (9개 설정값의 배열, "그룹전원:그룹디밍:그룹색온도/조명1전원:디밍:색온도/조명2전원:디밍:색온도 ~ 조명8전원:디밍:색온도")
|
|
|
- * 조명전원 : on/off/none(don't care), 디밍/색온도 : 1 ~ 10 (미설정시 0)
|
|
|
- * 예) "off:10:1/off:10:1/off:10:1/off:10:1/off:10:1/off:10:1/off:10:1/off:10:1/off:10:1" : 그룹제어와 1~8번조명이 모두 꺼짐이며, 디밍은 10, 색온도는 1로 설정
|
|
|
- */
|
|
|
- public String[] getLivinglightModeCtrlEntireValue() {
|
|
|
- try {
|
|
|
- String strPresetID = LIVINGLIGHT_PRESET_00;
|
|
|
- String[] astrResult = new String[9];
|
|
|
- for (int i = 0; i < 9; i++) {
|
|
|
- switch (i) {
|
|
|
- case 0: strPresetID = LIVINGLIGHT_PRESET_00; break;
|
|
|
- case 1: strPresetID = LIVINGLIGHT_PRESET_01; break;
|
|
|
- case 2: strPresetID = LIVINGLIGHT_PRESET_02; break;
|
|
|
- case 3: strPresetID = LIVINGLIGHT_PRESET_03; break;
|
|
|
- case 4: strPresetID = LIVINGLIGHT_PRESET_04; break;
|
|
|
- case 5: strPresetID = LIVINGLIGHT_PRESET_05; break;
|
|
|
- case 6: strPresetID = LIVINGLIGHT_PRESET_06; break;
|
|
|
- case 7: strPresetID = LIVINGLIGHT_PRESET_07; break;
|
|
|
- case 8: strPresetID = LIVINGLIGHT_PRESET_08; break;
|
|
|
- default: strPresetID = LIVINGLIGHT_PRESET_00; break;
|
|
|
- }
|
|
|
- astrResult[i] = GetWallPADData(strPresetID);
|
|
|
- }
|
|
|
- return astrResult;
|
|
|
- } catch (RuntimeException re) {
|
|
|
- LogUtil.errorLogInfo("", TAG, re);
|
|
|
- return null;
|
|
|
- }
|
|
|
- catch (Exception e) {
|
|
|
- LogUtil.errorLogInfo("", TAG, e);//e.printStackTrace();
|
|
|
- Log.w(TAG, "[Exception] getLivinglightModeCtrlEntireValue()");
|
|
|
- return null;
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- /**
|
|
|
- * 거실조명 모드제어 설정값 읽기
|
|
|
- *
|
|
|
- * @return (String) 설정값 ("그룹전원:그룹디밍:그룹색온도/조명1전원:디밍:색온도/조명2전원:디밍:색온도 ~ 조명8전원:디밍:색온도")
|
|
|
- * 조명전원 : on/off/none(don't care), 디밍/색온도 : 1 ~ 10 (미설정시 0)
|
|
|
- * 예) "off:10:1/off:10:1/off:10:1/off:10:1/off:10:1/off:10:1/off:10:1/off:10:1/off:10:1" : 그룹제어와 1~8번조명이 모두 꺼짐이며, 디밍은 10, 색온도는 1로 설정
|
|
|
- */
|
|
|
- public String getLivinglightModeCtrlValues(int presetid) {
|
|
|
- try {
|
|
|
- String strPresetID = LIVINGLIGHT_PRESET_00;
|
|
|
- switch (presetid) {
|
|
|
- case 0: strPresetID = LIVINGLIGHT_PRESET_00; break;
|
|
|
- case 1: strPresetID = LIVINGLIGHT_PRESET_01; break;
|
|
|
- case 2: strPresetID = LIVINGLIGHT_PRESET_02; break;
|
|
|
- case 3: strPresetID = LIVINGLIGHT_PRESET_03; break;
|
|
|
- case 4: strPresetID = LIVINGLIGHT_PRESET_04; break;
|
|
|
- case 5: strPresetID = LIVINGLIGHT_PRESET_05; break;
|
|
|
- case 6: strPresetID = LIVINGLIGHT_PRESET_06; break;
|
|
|
- case 7: strPresetID = LIVINGLIGHT_PRESET_07; break;
|
|
|
- case 8: strPresetID = LIVINGLIGHT_PRESET_08; break;
|
|
|
- default: strPresetID = LIVINGLIGHT_PRESET_00; break;
|
|
|
- }
|
|
|
-
|
|
|
- String strResult = GetWallPADData(strPresetID);
|
|
|
- return strResult;
|
|
|
- } catch (RuntimeException re) {
|
|
|
- LogUtil.errorLogInfo("", TAG, re);
|
|
|
- return null;
|
|
|
- }
|
|
|
- catch (Exception e) {
|
|
|
- LogUtil.errorLogInfo("", TAG, e);//e.printStackTrace();
|
|
|
- Log.w(TAG, "[Exception] getLivinglightModeCtrlValues(int presetid)");
|
|
|
- return null;
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- /**
|
|
|
- * 거실조명 모드제어 설정값 읽기
|
|
|
- *
|
|
|
- * @param presetid 설정값 ID (0 ~ 8) : 0은 그룹제어시 사용
|
|
|
- * lightid 조명 ID (0 ~ 8) : 0은 그룹제어시 사용
|
|
|
- *
|
|
|
- * @return (String) 설정값 ("전원:디밍:색온도")
|
|
|
- * 조명전원 : on/off/none(don't care), 디밍/색온도 : 1 ~ 10 (미설정시 0)
|
|
|
- * 예) "off:10:1"
|
|
|
- */
|
|
|
- public String getLivinglightModeCtrlUnitValues(int presetid, int lightid) {
|
|
|
- try {
|
|
|
- String strValues = getLivinglightModeCtrlValues(presetid);
|
|
|
- String[] strParse = strValues.split("/");
|
|
|
- String strResult = strParse[lightid];
|
|
|
-
|
|
|
- return strResult;
|
|
|
- } catch (RuntimeException re) {
|
|
|
- LogUtil.errorLogInfo("", TAG, re);
|
|
|
- return null;
|
|
|
- }
|
|
|
- catch (Exception e) {
|
|
|
- LogUtil.errorLogInfo("", TAG, e);//e.printStackTrace();
|
|
|
- Log.w(TAG, "[Exception] getLivinglightModeCtrlUnitValues(int presetid, int lightid)");
|
|
|
- return null;
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- public static class LightConfig {
|
|
|
- public String Power;
|
|
|
- public byte Dim;
|
|
|
- public byte Color;
|
|
|
- }
|
|
|
-
|
|
|
- /**
|
|
|
- * 거실조명 모드제어 설정값 읽기
|
|
|
- *
|
|
|
- * @param presetid 설정값 ID (0 ~ 8) : 0은 그룹제어시 사용
|
|
|
- *
|
|
|
- * @return (LightConfig) 설정값 ("전원:디밍:색온도")
|
|
|
- */
|
|
|
- public LightConfig getLivinglightModeEntireCtrlUnitValues(int presetid) {
|
|
|
- try {
|
|
|
- String strValues = getLivinglightModeCtrlValues(presetid);
|
|
|
- String[] strParse_01 = strValues.split("/");
|
|
|
- String[] strParse_02 = strParse_01[0].split(":");
|
|
|
- LightConfig lightconfig = new LightConfig();
|
|
|
- lightconfig.Power = strParse_02[0];
|
|
|
- lightconfig.Dim = Byte.parseByte(strParse_02[1]);
|
|
|
- lightconfig.Color = Byte.parseByte(strParse_02[2]);
|
|
|
- Log.i(TAG, "[getLivinglightModeEntireCtrlUnitValues] presetid [" + presetid + "], lightconfig.Power [" + lightconfig.Power + "], lightconfig.Dim [" + lightconfig.Dim + "], lightconfig.Color [" + lightconfig.Color + "]");
|
|
|
- return lightconfig;
|
|
|
- } catch (RuntimeException re) {
|
|
|
- LogUtil.errorLogInfo("", TAG, re);
|
|
|
- return null;
|
|
|
- }
|
|
|
- catch (Exception e) {
|
|
|
- LogUtil.errorLogInfo("", TAG, e);//e.printStackTrace();
|
|
|
- Log.w(TAG, "[Exception] getLivinglightModeEntireCtrlUnitValues(int presetid)");
|
|
|
- return null;
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- ////////////////////////////////////////////////////////////////////////////////////////////////
|
|
|
-
|
|
|
- public static class PhoneAddr
|
|
|
- {
|
|
|
- public String Name;
|
|
|
- public String IP;
|
|
|
- }
|
|
|
-
|
|
|
- List<PhoneAddr> GuardList = new ArrayList<PhoneAddr>();
|
|
|
- List<PhoneAddr> LobbyList = new ArrayList<PhoneAddr>();
|
|
|
-
|
|
|
- public void AddGuardAddress(String name, String IPaddress)
|
|
|
- {
|
|
|
- String indata = GUARD_ADDRESS+"||"+IPaddress;
|
|
|
- insertWallPADDB(name, indata);
|
|
|
- }
|
|
|
-
|
|
|
- public List<PhoneAddr> GetGuardAddress()
|
|
|
- {
|
|
|
- GuardList.clear();
|
|
|
-
|
|
|
- String query = "select id, data from "+DeviceDataTBL+" where data LIKE('"+GUARD_ADDRESS+"::%');";
|
|
|
- Cursor cursor = wdb.rawQuery(query, null);
|
|
|
- String GetData="";
|
|
|
- String[] splitdata;
|
|
|
- PhoneAddr phoneaddr = new PhoneAddr();
|
|
|
- while (cursor.moveToNext())
|
|
|
- {
|
|
|
- GetData = cursor.getString(0);
|
|
|
- splitdata = GetData.split("::");
|
|
|
- phoneaddr.Name = splitdata[0];
|
|
|
- phoneaddr.IP = splitdata[1];
|
|
|
-
|
|
|
- GuardList.add(phoneaddr);
|
|
|
- }
|
|
|
-
|
|
|
- cursor.close();
|
|
|
-
|
|
|
- return GuardList;
|
|
|
- }
|
|
|
-
|
|
|
- public void DeleteGuardAddress(String name)
|
|
|
- {
|
|
|
- String sqlst = "delete from " + DeviceDataTBL + "where id='"+name+"' AND data LIKE('"+GUARD_ADDRESS+"::%');";
|
|
|
-
|
|
|
- try {
|
|
|
- wdb.execSQL(sqlst);
|
|
|
- } catch (SQLException e)
|
|
|
- {
|
|
|
- LogUtil.errorLogInfo("", TAG, e);//e.printStackTrace();
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- public void AddLobbyAddress(String name, String IPaddress)
|
|
|
- {
|
|
|
- String indata = LOBBY_ADDRESS+"::"+IPaddress;
|
|
|
- insertWallPADDB(name, indata);
|
|
|
- }
|
|
|
-
|
|
|
- public List<PhoneAddr> GetLobbyAddress()
|
|
|
- {
|
|
|
- LobbyList.clear();
|
|
|
-
|
|
|
- String query = "select id, data from "+DeviceDataTBL+" where data LIKE('"+LOBBY_ADDRESS+"::%');";
|
|
|
- Cursor cursor = wdb.rawQuery(query, null);
|
|
|
- String GetData="";
|
|
|
- String[] splitdata;
|
|
|
- PhoneAddr phoneaddr = new PhoneAddr();
|
|
|
- while (cursor.moveToNext())
|
|
|
- {
|
|
|
- GetData = cursor.getString(0);
|
|
|
- splitdata = GetData.split("::");
|
|
|
- phoneaddr.Name = splitdata[0];
|
|
|
- phoneaddr.IP = splitdata[1];
|
|
|
-
|
|
|
- LobbyList.add(phoneaddr);
|
|
|
- }
|
|
|
-
|
|
|
- cursor.close();
|
|
|
-
|
|
|
- return LobbyList;
|
|
|
- }
|
|
|
-
|
|
|
- public void DeleteLobbyAddress(String name)
|
|
|
- {
|
|
|
- String sqlst = "delete from " + DeviceDataTBL + "where id='"+name+"' AND data LIKE('"+LOBBY_ADDRESS+"::%');";
|
|
|
-
|
|
|
- try {
|
|
|
- wdb.execSQL(sqlst);
|
|
|
- } catch (SQLException e)
|
|
|
- {
|
|
|
- LogUtil.errorLogInfo("", TAG, e);//e.printStackTrace();
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- public void setSystemTime(int year, int mon, int day, int hour, int min, int sec)
|
|
|
- {
|
|
|
- Calendar c = new GregorianCalendar();
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
- c.set(Calendar.YEAR, year);
|
|
|
- c.set(Calendar.MONTH, mon-1);
|
|
|
- c.set(Calendar.DAY_OF_MONTH, day);
|
|
|
- c.set(Calendar.HOUR_OF_DAY, hour);
|
|
|
- c.set(Calendar.MINUTE, min);
|
|
|
- c.set(Calendar.SECOND, sec);
|
|
|
- long when = c.getTimeInMillis();
|
|
|
- Calendar now = new GregorianCalendar();
|
|
|
- long nowT = when - now.getTimeInMillis();
|
|
|
- UpdateWallPADData(SET_SYSTEMTIME, String.valueOf(nowT));
|
|
|
- Intent intent = new Intent();
|
|
|
- intent.setAction("SYSTEMTIMESET");
|
|
|
- intent.putExtra("DATE", String.format("%d&&%d&&%d", year, mon-1, day));
|
|
|
- intent.putExtra("TIME", String.format("%d&&%d&&%d", hour, min, sec));
|
|
|
- CTX.sendBroadcast(intent);
|
|
|
- }
|
|
|
- public Long GetSystemTime()
|
|
|
- {
|
|
|
- try {
|
|
|
- String ret = GetWallPADData(SET_SYSTEMTIME);
|
|
|
- return Long.parseLong(ret);
|
|
|
- }
|
|
|
- catch (RuntimeException re) {
|
|
|
- LogUtil.errorLogInfo("", TAG, re);
|
|
|
- return (long)0;
|
|
|
- }
|
|
|
- catch (Exception e)
|
|
|
- {
|
|
|
- LogUtil.errorLogInfo("", TAG, e);//e.printStackTrace();
|
|
|
- return (long)0;
|
|
|
- }
|
|
|
- }
|
|
|
- public void SetDoorCallTimeout(int timeout)
|
|
|
- {
|
|
|
- UpdateWallPADData(DOORCALLTIMEOUT, String.valueOf(timeout));
|
|
|
- }
|
|
|
-
|
|
|
- public int GetDoorCallTimeout()
|
|
|
- {
|
|
|
- try {
|
|
|
- String ret = GetWallPADData(DOORCALLTIMEOUT);
|
|
|
- return Integer.parseInt(ret);
|
|
|
- }
|
|
|
- catch (RuntimeException re) {
|
|
|
- LogUtil.errorLogInfo("", TAG, re);
|
|
|
- return 0;
|
|
|
- }
|
|
|
- catch (Exception e)
|
|
|
- {
|
|
|
- LogUtil.errorLogInfo("", TAG, e);//e.printStackTrace();
|
|
|
- return 0;
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- public void SetDoorConnectTimeout(int timeout)
|
|
|
- {
|
|
|
- UpdateWallPADData(DOORCONNECTTIMEOUT, String.valueOf(timeout));
|
|
|
- }
|
|
|
-
|
|
|
- public int GetDoorConnectTimeout()
|
|
|
- {
|
|
|
- try {
|
|
|
- String ret = GetWallPADData(DOORCONNECTTIMEOUT);
|
|
|
- return Integer.parseInt(ret);
|
|
|
- }
|
|
|
- catch (RuntimeException re) {
|
|
|
- LogUtil.errorLogInfo("", TAG, re);
|
|
|
- return 0;
|
|
|
- }
|
|
|
- catch (Exception e)
|
|
|
- {
|
|
|
- LogUtil.errorLogInfo("", TAG, e);//e.printStackTrace();
|
|
|
- return 0;
|
|
|
- }
|
|
|
- }
|
|
|
- public void SetMorningCallPeriod(int type)
|
|
|
- {
|
|
|
- UpdateWallPADData(MORNINGCALL_TYPE, MORNINGCALLTYPETEXT[type]);
|
|
|
- }
|
|
|
-
|
|
|
- public int GetMorningCallPeriod()
|
|
|
- {
|
|
|
- try {
|
|
|
- String ret = GetWallPADData(MORNINGCALL_TYPE);
|
|
|
- return Integer.parseInt(ret);
|
|
|
- }
|
|
|
- catch (RuntimeException re) {
|
|
|
- LogUtil.errorLogInfo("", TAG, re);
|
|
|
- return 0;
|
|
|
- }
|
|
|
- catch (Exception e)
|
|
|
- {
|
|
|
- LogUtil.errorLogInfo("", TAG, e);//e.printStackTrace();
|
|
|
- return 0;
|
|
|
- }
|
|
|
- }
|
|
|
- public void SetMorningCallBell(int type)
|
|
|
- {
|
|
|
- UpdateWallPADData(MORNINGCALL_BELLTYPE, MORNINGCALL_BELLTYPETEXT[type]);
|
|
|
- }
|
|
|
-
|
|
|
- public int GetMorningCallBell()
|
|
|
- {
|
|
|
- String ret = GetWallPADData(MORNINGCALL_BELLTYPE);
|
|
|
- return Integer.parseInt(ret);
|
|
|
- }
|
|
|
-
|
|
|
- public void AddMorningCallReserve(int type)
|
|
|
- {
|
|
|
- try {
|
|
|
- int reservedata = Integer.parseInt(GetWallPADData(MORNINGCALL_RESERVE));
|
|
|
- reservedata|=type;
|
|
|
- UpdateWallPADData(MORNINGCALL_RESERVE, String.valueOf(reservedata));
|
|
|
- }
|
|
|
- catch (RuntimeException re) {
|
|
|
- LogUtil.errorLogInfo("", TAG, re);
|
|
|
- }
|
|
|
- catch (Exception e)
|
|
|
- {
|
|
|
- LogUtil.errorLogInfo("", TAG, e);//e.printStackTrace();
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- public void DeleteMorningCallReserve(int type)
|
|
|
- {
|
|
|
- try {
|
|
|
- int reservedata = Integer.parseInt(GetWallPADData(MORNINGCALL_RESERVE));
|
|
|
- reservedata^=type;
|
|
|
- UpdateWallPADData(MORNINGCALL_RESERVE, String.valueOf(reservedata));
|
|
|
- }
|
|
|
- catch (RuntimeException re) {
|
|
|
- LogUtil.errorLogInfo("", TAG, re);
|
|
|
- }
|
|
|
- catch (Exception e)
|
|
|
- {
|
|
|
- LogUtil.errorLogInfo("", TAG, e);//e.printStackTrace();
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- public int[] GetMorningCallReserve()
|
|
|
- {
|
|
|
- try
|
|
|
- {
|
|
|
- String REserveData = GetWallPADData(MORNINGCALL_RESERVE);
|
|
|
- if (REserveData == null ) return null;
|
|
|
- int reservedata = Integer.parseInt(REserveData);
|
|
|
- List<Integer> resultList = new ArrayList<Integer>();
|
|
|
- for(int i = 0; i< MCCommandList.length;i++)
|
|
|
- {
|
|
|
- if ((reservedata&MCCommandList[i]) > 0)
|
|
|
- resultList.add(MCCommandList[i]);
|
|
|
- }
|
|
|
- int[] result = new int[resultList.size()];
|
|
|
- int i = 0;
|
|
|
- for (Integer element : resultList) {
|
|
|
- result[i++] = element;
|
|
|
- }
|
|
|
- return result;
|
|
|
- }
|
|
|
- catch (RuntimeException re) {
|
|
|
- LogUtil.errorLogInfo("", TAG, re);
|
|
|
- return null;
|
|
|
- }
|
|
|
- catch (Exception e)
|
|
|
- {
|
|
|
- LogUtil.errorLogInfo("", TAG, e);//e.printStackTrace();
|
|
|
- return null;
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- /**
|
|
|
- * @description
|
|
|
- * 전자액자 설정정보 저장
|
|
|
- */
|
|
|
- public void SetAutoPictureData(int mAutoPictureSetIdx, int mStartTimeHourIdx, int mStartTimeMinIdx, int mEndTimeHourIdx
|
|
|
- , int mEndTimeMinIdx, int mSlideIntervalIdx, int mAnimationIdx)
|
|
|
- {
|
|
|
- UpdateWallPADData(AUTOPICTURE_SET_INDEX, Integer.toString(mAutoPictureSetIdx));
|
|
|
- UpdateWallPADData(AUTOPICTURE_START_TIME_HOUR_INDEX, Integer.toString(mStartTimeHourIdx));
|
|
|
- UpdateWallPADData(AUTOPICTURE_START_TIME_MIN_INDEX, Integer.toString(mStartTimeMinIdx)) ;
|
|
|
- UpdateWallPADData(AUTOPICTURE_END_TIME_HOUR_INDEX, Integer.toString(mEndTimeHourIdx));
|
|
|
- UpdateWallPADData(AUTOPICTURE_END_TIME_MIN_INDEX, Integer.toString(mEndTimeMinIdx));
|
|
|
- UpdateWallPADData(AUTOPICTURE_SLIDE_INTERVAL_INDEX, Integer.toString(mSlideIntervalIdx));
|
|
|
- UpdateWallPADData(AUTOPICTURE_ANIMATION_INDEX, Integer.toString(mAnimationIdx));
|
|
|
- }
|
|
|
-
|
|
|
- /**
|
|
|
- * @description
|
|
|
- * 전자액자 설정정보 가져오기
|
|
|
- * @return int[] data[0]-> AUTOPICTURE_SET_INDEX<br>
|
|
|
- * int[] data[1]-> AUTOPICTURE_START_TIME_HOUR_INDEX<br>
|
|
|
- * int[] data[2]-> AUTOPICTURE_START_TIME_MIN_INDEX<br>
|
|
|
- * int[] data[3]-> AUTOPICTURE_END_TIME_HOUR_INDEX<br>
|
|
|
- * int[] data[4]-> AUTOPICTURE_END_TIME_MIN_INDEX<br>
|
|
|
- * int[] data[5]-> AUTOPICTURE_SLIDE_INTERVAL_INDEX<br>
|
|
|
- * int[] data[6]-> AUTOPICTURE_ANIMATION_INDEX<br>
|
|
|
- */
|
|
|
- public int[] GetAutoPictureData()
|
|
|
- {
|
|
|
- int[] result = new int[7];
|
|
|
- String ret = null;
|
|
|
-
|
|
|
- for(int i = 0; i<result.length; i++)
|
|
|
- {
|
|
|
- try
|
|
|
- {
|
|
|
- if(i == 0)
|
|
|
- {
|
|
|
- ret = GetWallPADData(AUTOPICTURE_SET_INDEX);
|
|
|
-
|
|
|
- }
|
|
|
- else if(i == 1)
|
|
|
- {
|
|
|
- ret = GetWallPADData(AUTOPICTURE_START_TIME_HOUR_INDEX);
|
|
|
-
|
|
|
- }
|
|
|
- else if(i == 2)
|
|
|
- {
|
|
|
- ret = GetWallPADData(AUTOPICTURE_START_TIME_MIN_INDEX);
|
|
|
-
|
|
|
- }
|
|
|
- else if(i == 3)
|
|
|
- {
|
|
|
- ret = GetWallPADData(AUTOPICTURE_END_TIME_HOUR_INDEX);
|
|
|
-
|
|
|
- }
|
|
|
- else if(i == 4)
|
|
|
- {
|
|
|
- ret = GetWallPADData(AUTOPICTURE_END_TIME_MIN_INDEX);
|
|
|
-
|
|
|
- }
|
|
|
- else if(i == 5)
|
|
|
- {
|
|
|
- ret = GetWallPADData(AUTOPICTURE_SLIDE_INTERVAL_INDEX);
|
|
|
-
|
|
|
- }
|
|
|
- else if(i == 6)
|
|
|
- {
|
|
|
- ret = GetWallPADData(AUTOPICTURE_ANIMATION_INDEX);
|
|
|
-
|
|
|
- }
|
|
|
-
|
|
|
- result[i] = Integer.parseInt(ret);
|
|
|
- }
|
|
|
- catch (RuntimeException re) {
|
|
|
- LogUtil.errorLogInfo("", TAG, re);
|
|
|
- }
|
|
|
- catch (Exception e)
|
|
|
- {
|
|
|
- LogUtil.errorLogInfo("", TAG, e);
|
|
|
- }
|
|
|
- }
|
|
|
- return result;
|
|
|
- }
|
|
|
-
|
|
|
- /**
|
|
|
- * @description
|
|
|
- * 전자액자 APP 실행 여부를 DB정보와 비교하여 알려주는 함수
|
|
|
- * @return boolean형 true 인 경우에만 StartAutoPictureAPP() 호출<br>
|
|
|
- * @param
|
|
|
- * NowCal Calendar형 현재 시간 입력
|
|
|
- */
|
|
|
- public boolean DecideAutoPictureAppStartOrNot(Calendar NowCal)
|
|
|
- {
|
|
|
-
|
|
|
- int DBLoadResult[] = new int [7];
|
|
|
- DBLoadResult = GetAutoPictureData();
|
|
|
-
|
|
|
- //실행시간과 종료시간이 같으면 종료!
|
|
|
- if((DBLoadResult[1] == DBLoadResult[3]) && (DBLoadResult[2] == DBLoadResult[4]))
|
|
|
- {
|
|
|
-
|
|
|
- return false;
|
|
|
- }
|
|
|
-
|
|
|
- Calendar TempCal = Calendar.getInstance();
|
|
|
- TempCal.set(Calendar.HOUR_OF_DAY, DBLoadResult[1]);
|
|
|
- TempCal.set(Calendar.MINUTE, (DBLoadResult[2]*10));
|
|
|
-
|
|
|
- Calendar EndCal = Calendar.getInstance();
|
|
|
- EndCal.set(Calendar.HOUR_OF_DAY, DBLoadResult[3]);
|
|
|
- EndCal.set(Calendar.MINUTE, (DBLoadResult[4]*10));
|
|
|
-
|
|
|
- int intNowTime = (NowCal.get(Calendar.HOUR_OF_DAY) * 60) + NowCal.get(Calendar.MINUTE);
|
|
|
- int intEndTime = (EndCal.get(Calendar.HOUR_OF_DAY) * 60) + EndCal.get(Calendar.MINUTE);
|
|
|
-
|
|
|
- /*
|
|
|
- Log.w("Jar", "[DB] --------[intNowTime] " + intNowTime);
|
|
|
- Log.w("Jar", "[DB] --------[intEndTime] " + intEndTime);
|
|
|
-
|
|
|
- Log.w("Jar", "[DB] --------[Input START Time] YEAR " + NowCal.get(Calendar.YEAR));
|
|
|
- Log.w("Jar", "[DB] --------[Input START Time] MONTH " + (NowCal.get(Calendar.MONTH)+1));
|
|
|
- Log.w("Jar", "[DB] --------[Input START Time] DAY " + NowCal.get(Calendar.DAY_OF_MONTH));
|
|
|
- Log.w("Jar", "[DB] --------[Input START Time] DAY_OF_WEEK " + NowCal.get(Calendar.DAY_OF_WEEK));
|
|
|
- Log.w("Jar", "[DB] --------[Input START Time] HOUR_OF_DAY " + NowCal.get(Calendar.HOUR_OF_DAY));
|
|
|
- Log.w("Jar", "[DB] --------[Input START Time] MINUTE " + NowCal.get(Calendar.MINUTE));
|
|
|
-
|
|
|
-
|
|
|
- Log.w("Jar", "[DB] --------[Set Time] YEAR " + TempCal.get(Calendar.YEAR));
|
|
|
- Log.w("Jar", "[DB] --------[Set Time] MONTH " + (TempCal.get(Calendar.MONTH)+1));
|
|
|
- Log.w("Jar", "[DB] --------[Set Time] DAY " + TempCal.get(Calendar.DAY_OF_MONTH));
|
|
|
- Log.w("Jar", "[DB] --------[Set Time] DAY_OF_WEEK " + TempCal.get(Calendar.DAY_OF_WEEK));
|
|
|
- Log.w("Jar", "[DB] --------[Set Time] HOUR_OF_DAY " + TempCal.get(Calendar.HOUR_OF_DAY));
|
|
|
- Log.w("Jar", "[DB] --------[Set Time] MINUTE " + TempCal.get(Calendar.MINUTE));
|
|
|
-
|
|
|
- Log.w("Jar", "[DB] --------[DBLoadResult[0]] :" +DBLoadResult[0]);
|
|
|
- Log.w("Jar", "[DB] --------[NowCal.DAY_OF_WEEK] :" +NowCal.get(Calendar.DAY_OF_WEEK));
|
|
|
- */
|
|
|
-
|
|
|
- boolean result= false;
|
|
|
- switch(DBLoadResult[0])
|
|
|
- {
|
|
|
- case 0: //사용안함
|
|
|
- result = false;
|
|
|
- break;
|
|
|
-
|
|
|
- /*
|
|
|
- SUNDAY 0
|
|
|
- MONDAY 1
|
|
|
- TUESDAY 2
|
|
|
- WEDNESDAY 3
|
|
|
- THURSDAY 4
|
|
|
- FRIDAY 5
|
|
|
- SATURDAY 6
|
|
|
- */
|
|
|
-
|
|
|
- case 1: //월~금
|
|
|
- if((NowCal.get(Calendar.DAY_OF_WEEK) >= 2) && (NowCal.get(Calendar.DAY_OF_WEEK) <= 6))
|
|
|
- {
|
|
|
- result = true;
|
|
|
- }
|
|
|
- break;
|
|
|
-
|
|
|
- case 2: //월~토
|
|
|
- if((NowCal.get(Calendar.DAY_OF_WEEK) >= 2) && (NowCal.get(Calendar.DAY_OF_WEEK) <= 7))
|
|
|
- {
|
|
|
- result = true;
|
|
|
- }
|
|
|
- break;
|
|
|
-
|
|
|
- case 3: //토~일
|
|
|
- if((NowCal.get(Calendar.DAY_OF_WEEK) == 7) || (NowCal.get(Calendar.DAY_OF_WEEK) == 1))
|
|
|
- {
|
|
|
- result = true;
|
|
|
- }
|
|
|
- break;
|
|
|
-
|
|
|
- case 4: //매일
|
|
|
- if((NowCal.get(Calendar.DAY_OF_WEEK) >= 1) && (NowCal.get(Calendar.DAY_OF_WEEK) <= 7))
|
|
|
- {
|
|
|
- result = true;
|
|
|
- }
|
|
|
- break;
|
|
|
-
|
|
|
- default:
|
|
|
- break;
|
|
|
- }
|
|
|
- if(result == true)
|
|
|
- {
|
|
|
-
|
|
|
- //시간비교
|
|
|
-
|
|
|
- if(NowCal.get(Calendar.HOUR_OF_DAY) >= TempCal.get(Calendar.HOUR_OF_DAY))
|
|
|
- {
|
|
|
- if(NowCal.get(Calendar.HOUR_OF_DAY) > TempCal.get(Calendar.HOUR_OF_DAY))
|
|
|
- {
|
|
|
- if(intNowTime < intEndTime)
|
|
|
- {
|
|
|
- result = true;
|
|
|
- }
|
|
|
- else
|
|
|
- {
|
|
|
- result = false;
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- if(NowCal.get(Calendar.HOUR_OF_DAY) == TempCal.get(Calendar.HOUR_OF_DAY))
|
|
|
- {
|
|
|
- if(NowCal.get(Calendar.MINUTE) >= TempCal.get(Calendar.MINUTE))
|
|
|
- {
|
|
|
- if(intNowTime < intEndTime)
|
|
|
- {
|
|
|
- result = true;
|
|
|
- }
|
|
|
- else
|
|
|
- {
|
|
|
- result = false;
|
|
|
- }
|
|
|
- }
|
|
|
- else
|
|
|
- {
|
|
|
- result = false;
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
- else
|
|
|
- {
|
|
|
- result = false;
|
|
|
- }
|
|
|
- }
|
|
|
- return result;
|
|
|
- }
|
|
|
-
|
|
|
- /**
|
|
|
- * @description
|
|
|
- * 전자액자 APP 종료 여부를 DB정보와 비교하여 알려주는 함수<br>
|
|
|
- * 호출 하기 전에 최상위 Activity에 AutoPicture가 실행되고 있는지 먼저 확인 후, 호출해야 함.
|
|
|
- * @return boolean형 true 인 경우에만 EndAutoPictureAPP() 호출<br>
|
|
|
- * @param
|
|
|
- * NowCal Calendar형 현재 시간 입력
|
|
|
- */
|
|
|
- public boolean DecideAutoPictureAppEndOrNot(Calendar NowCal)
|
|
|
- {
|
|
|
-
|
|
|
- int DBLoadResult[] = new int [7];
|
|
|
- DBLoadResult = GetAutoPictureData();
|
|
|
-
|
|
|
- Calendar TempCal = Calendar.getInstance();
|
|
|
- TempCal.set(Calendar.HOUR_OF_DAY, DBLoadResult[3]);
|
|
|
- TempCal.set(Calendar.MINUTE, (DBLoadResult[4]*10));
|
|
|
-
|
|
|
- /*
|
|
|
- Log.w("Jar", "[DB] --------[Input START Time] YEAR " + NowCal.get(Calendar.YEAR));
|
|
|
- Log.w("Jar", "[DB] --------[Input START Time] MONTH " + (NowCal.get(Calendar.MONTH)+1));
|
|
|
- Log.w("Jar", "[DB] --------[Input START Time] DAY " + NowCal.get(Calendar.DAY_OF_MONTH));
|
|
|
- Log.w("Jar", "[DB] --------[Input START Time] DAY_OF_WEEK " + NowCal.get(Calendar.DAY_OF_WEEK));
|
|
|
- Log.w("Jar", "[DB] --------[Input START Time] HOUR_OF_DAY " + NowCal.get(Calendar.HOUR_OF_DAY));
|
|
|
- Log.w("Jar", "[DB] --------[Input START Time] MINUTE " + NowCal.get(Calendar.MINUTE));
|
|
|
-
|
|
|
- Log.w("Jar", "[DB] --------[Set Time] YEAR " + TempCal.get(Calendar.YEAR));
|
|
|
- Log.w("Jar", "[DB] --------[Set Time] MONTH " + (TempCal.get(Calendar.MONTH)+1));
|
|
|
- Log.w("Jar", "[DB] --------[Set Time] DAY " + TempCal.get(Calendar.DAY_OF_MONTH));
|
|
|
- Log.w("Jar", "[DB] --------[Set Time] DAY_OF_WEEK " + TempCal.get(Calendar.DAY_OF_WEEK));
|
|
|
- Log.w("Jar", "[DB] --------[Set Time] HOUR_OF_DAY " + TempCal.get(Calendar.HOUR_OF_DAY));
|
|
|
- Log.w("Jar", "[DB] --------[Set Time] MINUTE " + TempCal.get(Calendar.MINUTE));
|
|
|
-
|
|
|
- Log.w("Jar", "[DB] --------[DBLoadResult[0]] :" +DBLoadResult[0]);
|
|
|
- Log.w("Jar", "[DB] --------[NowCal.DAY_OF_WEEK] :" +NowCal.get(Calendar.DAY_OF_WEEK));
|
|
|
- */
|
|
|
-
|
|
|
- boolean result= false;
|
|
|
- switch(DBLoadResult[0])
|
|
|
- {
|
|
|
- case 0: //사용안함
|
|
|
- result = false;
|
|
|
- break;
|
|
|
-
|
|
|
- /*
|
|
|
- SUNDAY 0
|
|
|
- MONDAY 1
|
|
|
- TUESDAY 2
|
|
|
- WEDNESDAY 3
|
|
|
- THURSDAY 4
|
|
|
- FRIDAY 5
|
|
|
- SATURDAY 6
|
|
|
- */
|
|
|
-
|
|
|
- case 1: //월~금
|
|
|
- if((NowCal.get(Calendar.DAY_OF_WEEK) >= 2) && (NowCal.get(Calendar.DAY_OF_WEEK) <= 6))
|
|
|
- {
|
|
|
- result = true;
|
|
|
- }
|
|
|
- break;
|
|
|
-
|
|
|
- case 2: //월~토
|
|
|
- if((NowCal.get(Calendar.DAY_OF_WEEK) >= 2) && (NowCal.get(Calendar.DAY_OF_WEEK) <= 7))
|
|
|
- {
|
|
|
- result = true;
|
|
|
- }
|
|
|
- break;
|
|
|
-
|
|
|
- case 3: //토~일
|
|
|
- if((NowCal.get(Calendar.DAY_OF_WEEK) == 7) || (NowCal.get(Calendar.DAY_OF_WEEK) == 1))
|
|
|
- {
|
|
|
- result = true;
|
|
|
- }
|
|
|
- break;
|
|
|
-
|
|
|
- case 4: //매일
|
|
|
- if((NowCal.get(Calendar.DAY_OF_WEEK) >= 1) && (NowCal.get(Calendar.DAY_OF_WEEK) <= 7))
|
|
|
- {
|
|
|
- result = true;
|
|
|
- }
|
|
|
- break;
|
|
|
-
|
|
|
- default:
|
|
|
- break;
|
|
|
- }
|
|
|
- if(result == true)
|
|
|
- {
|
|
|
-
|
|
|
- //시간비교
|
|
|
-
|
|
|
- if(NowCal.get(Calendar.HOUR_OF_DAY) >= TempCal.get(Calendar.HOUR_OF_DAY))
|
|
|
- {
|
|
|
- if(NowCal.get(Calendar.HOUR_OF_DAY) > TempCal.get(Calendar.HOUR_OF_DAY))
|
|
|
- {
|
|
|
- result = true;
|
|
|
- }
|
|
|
-
|
|
|
- if(NowCal.get(Calendar.HOUR_OF_DAY) == TempCal.get(Calendar.HOUR_OF_DAY))
|
|
|
- {
|
|
|
- if(NowCal.get(Calendar.MINUTE) > TempCal.get(Calendar.MINUTE))
|
|
|
- {
|
|
|
- result = true;
|
|
|
- }
|
|
|
- else
|
|
|
- {
|
|
|
- result = false;
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
- else
|
|
|
- {
|
|
|
- result = false;
|
|
|
- }
|
|
|
- }
|
|
|
- return result;
|
|
|
- }
|
|
|
-
|
|
|
-
|
|
|
- /**
|
|
|
- * @description
|
|
|
- * 전자액자 APP 시작. (호출하면 즉시 시작됨).<br>
|
|
|
- * 사진 전환 간격, 애니메이션 효과 인덱스 입력은 함수 내에서 처리.
|
|
|
- */
|
|
|
- public boolean StartAutoPictureAPP()
|
|
|
- {
|
|
|
- int DBLoadResult[] = new int [7];
|
|
|
- int IntervalTimeSec = 5;
|
|
|
- DBLoadResult = GetAutoPictureData();
|
|
|
- switch (DBLoadResult[5]) // mSlideIntervalIdx
|
|
|
- {
|
|
|
- case 0: //5초
|
|
|
- IntervalTimeSec = 5;
|
|
|
- break;
|
|
|
- case 1: //10초
|
|
|
- IntervalTimeSec = 10;
|
|
|
- break;
|
|
|
- case 2: //30초
|
|
|
- IntervalTimeSec = 30;
|
|
|
- break;
|
|
|
- case 3: //1분
|
|
|
- IntervalTimeSec = 60;
|
|
|
- break;
|
|
|
- case 4: //30분
|
|
|
- IntervalTimeSec = 60 * 30;
|
|
|
- break;
|
|
|
- case 5: //60분
|
|
|
- IntervalTimeSec = 60 * 60;
|
|
|
- break;
|
|
|
- default:
|
|
|
- IntervalTimeSec = 5;
|
|
|
- break;
|
|
|
- }
|
|
|
- //전자액자App 설치유무 확인!
|
|
|
- PackageManager pm = CTX.getPackageManager();
|
|
|
- try {
|
|
|
- pm.getApplicationInfo("kr.co.icontrols.autopicture", PackageManager.GET_META_DATA);
|
|
|
- }
|
|
|
- catch (RuntimeException re) {
|
|
|
- LogUtil.errorLogInfo("", TAG, re);
|
|
|
- return false;
|
|
|
- }
|
|
|
- catch (Exception e) {
|
|
|
-
|
|
|
- return false;
|
|
|
- }
|
|
|
-
|
|
|
- //사진 파일이 하나도 없으면 APP 실행시키지 않음!
|
|
|
- File dirInternal = new File(define.ALBUM_PICTURE_LOCATION);
|
|
|
- File dirUsb = new File("/storage/usb0");
|
|
|
- try{
|
|
|
- printfiles(dirInternal);
|
|
|
- printfiles(dirUsb);
|
|
|
- }
|
|
|
- catch (RuntimeException re) {
|
|
|
- LogUtil.errorLogInfo("", TAG, re);
|
|
|
- return false;
|
|
|
- }
|
|
|
- catch (Exception e)
|
|
|
- {
|
|
|
-
|
|
|
- return false;
|
|
|
- }
|
|
|
- //사진 파일이 하나도 없으면 APP 실행시키지 않음!
|
|
|
- if(AutoPicturefilesList.size() == 0)
|
|
|
- {
|
|
|
-
|
|
|
- return false;
|
|
|
- }
|
|
|
-
|
|
|
- AutoPicturefilesList.clear();
|
|
|
-
|
|
|
- //전자액자 App 시작!!
|
|
|
- Intent intent = new Intent(Intent.ACTION_MAIN);
|
|
|
- intent.setComponent(new ComponentName("kr.co.icontrols.autopicture", "kr.co.icontrols.autopicture.MainActivity"));
|
|
|
- intent.putExtra("IMAGE_NEXTSHOW_TIME_UNIT_SEC", IntervalTimeSec);
|
|
|
- intent.putExtra("IMAGE_NEXTSHOW_ANIMATION", DBLoadResult[6]+1);
|
|
|
- intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
|
|
|
- CTX.startActivity(intent);
|
|
|
-
|
|
|
- return true;
|
|
|
- }
|
|
|
-
|
|
|
- /**
|
|
|
- * @description
|
|
|
- * USB에 있는 이미지 파일의 목록을 생성하는 함수<br>
|
|
|
- * 재귀함수로써 모든 폴더를 탐색한다.<br>
|
|
|
- * USB와 Storage/Bestin/DownloadPicture 내에 있는 파일의 확장자를 검사<br>
|
|
|
- * 파일 포맷 : jpg, JPG, jpeg, JPEG, png, PNG, bmp, BMP 지원
|
|
|
- */
|
|
|
- public void printfiles(File file)
|
|
|
- {
|
|
|
- File[] list = file.listFiles();
|
|
|
-
|
|
|
- //Log.d(TAG, "The full PATH to the sdcard location is:" +file.getPath());
|
|
|
- if(list == null)
|
|
|
- {
|
|
|
-
|
|
|
- return;
|
|
|
- }
|
|
|
- for (int i = 0; i < list.length; i++)
|
|
|
- {
|
|
|
- File temp_file = new File(file.getAbsolutePath(),list[i].getName());
|
|
|
- if (temp_file.isDirectory() && temp_file.listFiles() != null)
|
|
|
- {
|
|
|
- //Log.d(TAG, "PATH folder" +temp_file.getAbsolutePath());
|
|
|
- //I am inside The Directory... Searching:) So i am calling printfiles(File file) function to print the files in the directory
|
|
|
- printfiles(temp_file);
|
|
|
- }
|
|
|
- else
|
|
|
- {
|
|
|
- String filename = temp_file.getName();
|
|
|
- boolean isAccept = false;
|
|
|
-
|
|
|
- if(filename.toLowerCase().endsWith(".jpg") == true)
|
|
|
- {
|
|
|
- isAccept = true;
|
|
|
- }
|
|
|
- else if(filename.toLowerCase().endsWith(".jpeg") == true)
|
|
|
- {
|
|
|
- isAccept = true;
|
|
|
- }
|
|
|
- else if(filename.toLowerCase().endsWith(".png") == true)
|
|
|
- {
|
|
|
- isAccept = true;
|
|
|
- }
|
|
|
- else if(filename.toLowerCase().endsWith(".bmp") == true)
|
|
|
- {
|
|
|
- isAccept = true;
|
|
|
- }
|
|
|
- else
|
|
|
- {
|
|
|
- isAccept = false;
|
|
|
- }
|
|
|
-
|
|
|
- if(isAccept == true)
|
|
|
- {
|
|
|
- AutoPicturefilesList.add(temp_file.getAbsolutePath());
|
|
|
-
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
-
|
|
|
- /**
|
|
|
- * @description
|
|
|
- * 전자액자 APP 강제 종료.
|
|
|
- */
|
|
|
- public void EndAutoPictureAPP()
|
|
|
- {
|
|
|
-
|
|
|
-
|
|
|
- Intent intent = new Intent();
|
|
|
- intent.setAction("kr.co.icontrols.autopicture.BR_APP_FINISH");
|
|
|
- CTX.sendBroadcast(intent);
|
|
|
- }
|
|
|
-
|
|
|
- /**
|
|
|
- * @description
|
|
|
- * 원격검침 정보 저장
|
|
|
- * @param
|
|
|
- * isEMSEnable false면 EMS 사용안함, true면 EMS 사용함
|
|
|
- * @param
|
|
|
- * NumberOfKind 3이면 3종, 5이면 5종, 6이면 6종.(3 or 5 or 6만 입력 가능)
|
|
|
- */
|
|
|
- public boolean SetRemoteMeteringData(boolean isEMSEnable, int NumberOfKind)
|
|
|
- {
|
|
|
- String str = String.valueOf(isEMSEnable);
|
|
|
- boolean result = false;
|
|
|
- if((str.equalsIgnoreCase("true") == true) || (str.equalsIgnoreCase("false") == true))
|
|
|
- {
|
|
|
- if((NumberOfKind == 3) || (NumberOfKind == 5) || (NumberOfKind == 6))
|
|
|
- {
|
|
|
- UpdateWallPADData(REMOTE_METERING_EMS_ENABLE, str);
|
|
|
- UpdateWallPADData(REMOTE_METERING_NUMBER_OF_KIND, Integer.toString(NumberOfKind));
|
|
|
- result = true;
|
|
|
- }
|
|
|
- }
|
|
|
- return result;
|
|
|
- }
|
|
|
-
|
|
|
- /**
|
|
|
- * @description
|
|
|
- * 원격검침 EMS 사용여부 가져오기
|
|
|
- * @return boolean형 true면 EMS 사용함, false면 EMS 사용하지 않음
|
|
|
- */
|
|
|
- public boolean GetRemoteMeteringIsEMSEnable()
|
|
|
- {
|
|
|
- String ret = null;
|
|
|
- boolean ReturnValue = false;
|
|
|
- ret = GetWallPADData(REMOTE_METERING_EMS_ENABLE);
|
|
|
-
|
|
|
-
|
|
|
- if(ret.equals("true") == true)
|
|
|
- {
|
|
|
- ReturnValue = true;
|
|
|
- }
|
|
|
- else if(ret.equals("false") == true)
|
|
|
- {
|
|
|
- ReturnValue = false;
|
|
|
- }
|
|
|
- return ReturnValue;
|
|
|
- }
|
|
|
-
|
|
|
- /**
|
|
|
- * @description
|
|
|
- * 원격검침 몇종인지 정보 가져오는 함수.
|
|
|
- * @return 3 or 5 or 6(3종 or 5종 or 6종)
|
|
|
- */
|
|
|
- public int GetRemoteMeteringNumberOfKind()
|
|
|
- {
|
|
|
- String ret = null;
|
|
|
- ret = GetWallPADData(REMOTE_METERING_NUMBER_OF_KIND);
|
|
|
-
|
|
|
-
|
|
|
- if((ret.equals("3") == true) || (ret.equals("5") == true) || (ret.equals("6") == true))
|
|
|
- {
|
|
|
- return Integer.parseInt(ret);
|
|
|
- }
|
|
|
- else
|
|
|
- {
|
|
|
-
|
|
|
- return 3;
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- /**
|
|
|
- * @description
|
|
|
- * 원격검침 목표량 에너지 별로 가져오는 함수
|
|
|
- * @return string형 사용자가 설정한 에너지 목표값. 만약 잘못된 input값일 경우 999999999 리턴
|
|
|
- * @param Index 0~5범위(0:전기, 1:수도, 2:가스, 3:온수, 4:난방, 5:탄소)
|
|
|
- */
|
|
|
- public String GetRemoteMeteringTargetValue(int Index)
|
|
|
- {
|
|
|
- String ret = null;
|
|
|
-
|
|
|
-
|
|
|
- if((Index < 0) || (Index > 5))
|
|
|
- {
|
|
|
- return "999999999";
|
|
|
- }
|
|
|
-
|
|
|
- switch(Index)
|
|
|
- {
|
|
|
- case 0:
|
|
|
- ret = GetWallPADData(REMOTE_METERING_TARGET_VALUE_ELECT);
|
|
|
- break;
|
|
|
- case 1:
|
|
|
- ret = GetWallPADData(REMOTE_METERING_TARGET_VALUE_WATER);
|
|
|
- break;
|
|
|
- case 2:
|
|
|
- ret = GetWallPADData(REMOTE_METERING_TARGET_VALUE_GAS);
|
|
|
- break;
|
|
|
- case 3:
|
|
|
- ret = GetWallPADData(REMOTE_METERING_TARGET_VALUE_HOTWATER);
|
|
|
- break;
|
|
|
- case 4:
|
|
|
- ret = GetWallPADData(REMOTE_METERING_TARGET_VALUE_HEATING);
|
|
|
- break;
|
|
|
- case 5:
|
|
|
- ret = GetWallPADData(REMOTE_METERING_TARGET_VALUE_CARBON);
|
|
|
- break;
|
|
|
- default:
|
|
|
- ret = "0";
|
|
|
- break;
|
|
|
- }
|
|
|
-
|
|
|
- //return Integer.parseInt(ret);
|
|
|
- return ret;
|
|
|
- }
|
|
|
-
|
|
|
-
|
|
|
- /**
|
|
|
- * @description
|
|
|
- * 원격검침 목표량 에너지 별로 설정하는 함수 *
|
|
|
- * @return boolean true or false
|
|
|
- * @param Index 0~5범위(0:전기, 1:수도, 2:가스, 3:온수, 4:난방, 5:탄소)
|
|
|
- * @param Value 에너지 목표량 값
|
|
|
- */
|
|
|
- public boolean SetRemoteMeteringTargetValue(int Index, String Value)
|
|
|
- {
|
|
|
- boolean ret = false;
|
|
|
-
|
|
|
-
|
|
|
- if((Index < 0) || (Index > 5))
|
|
|
- {
|
|
|
- return false;
|
|
|
- }
|
|
|
-
|
|
|
- switch(Index)
|
|
|
- {
|
|
|
- case 0:
|
|
|
- ret = UpdateWallPADData(REMOTE_METERING_TARGET_VALUE_ELECT, Value);
|
|
|
- break;
|
|
|
- case 1:
|
|
|
- ret = UpdateWallPADData(REMOTE_METERING_TARGET_VALUE_WATER, Value);
|
|
|
- break;
|
|
|
- case 2:
|
|
|
- ret = UpdateWallPADData(REMOTE_METERING_TARGET_VALUE_GAS, Value);
|
|
|
- break;
|
|
|
- case 3:
|
|
|
- ret = UpdateWallPADData(REMOTE_METERING_TARGET_VALUE_HOTWATER, Value);
|
|
|
- break;
|
|
|
- case 4:
|
|
|
- ret = UpdateWallPADData(REMOTE_METERING_TARGET_VALUE_HEATING, Value);
|
|
|
- break;
|
|
|
- case 5:
|
|
|
- ret = UpdateWallPADData(REMOTE_METERING_TARGET_VALUE_CARBON, Value);
|
|
|
- break;
|
|
|
- default:
|
|
|
- return ret;
|
|
|
- }
|
|
|
-
|
|
|
- return ret;
|
|
|
- }
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
- /**
|
|
|
- * @description
|
|
|
- * 에너지관리서버의 검침일 설정 - 검침일 또는 말일 두가지 중에 하나 선택 가능 *
|
|
|
- * @return boolean true(말일 사용) or false(검침일 사용)
|
|
|
- */
|
|
|
- public boolean GetRemoteMetering_BaseDateType()
|
|
|
- {
|
|
|
- boolean ret = false;
|
|
|
- String tempString = GetWallPADData(REMOTE_METERING_BASE_DATE_LASTDAY_USE);
|
|
|
- if(tempString.equalsIgnoreCase("false") == true)
|
|
|
- {
|
|
|
- ret = false;
|
|
|
- }
|
|
|
- else if(tempString.equalsIgnoreCase("true") == true)
|
|
|
- {
|
|
|
- ret = true;
|
|
|
- }
|
|
|
- else
|
|
|
- {
|
|
|
- ret = false;
|
|
|
- }
|
|
|
- return ret;
|
|
|
- }
|
|
|
-
|
|
|
- /**
|
|
|
- * @description
|
|
|
- * 에너지관리서버의 검침일 설정 - 검침일 또는 말일 두가지 중에 하나 선택 가능 *
|
|
|
- * @return boolean true(정상 저장) or false(저장 실패)
|
|
|
- * @param input boolean true(말일 사용) or false(검침일 사용)
|
|
|
- */
|
|
|
- public boolean SetRemoteMetering_BaseDateType(boolean input)
|
|
|
- {
|
|
|
- boolean ret = false;
|
|
|
-
|
|
|
- if(input == true)
|
|
|
- {
|
|
|
- ret = UpdateWallPADData(REMOTE_METERING_BASE_DATE_LASTDAY_USE, "true");
|
|
|
- }
|
|
|
- else
|
|
|
- {
|
|
|
- ret = UpdateWallPADData(REMOTE_METERING_BASE_DATE_LASTDAY_USE, "false");
|
|
|
- }
|
|
|
- return ret;
|
|
|
- }
|
|
|
-
|
|
|
- /**
|
|
|
- * @description
|
|
|
- * 에너지관리서버 연동 시 목표량대비 알림 사용 여부
|
|
|
- * @return boolean true(사용) or false(사용안함)
|
|
|
- */
|
|
|
- public boolean GetRemoteMetering_Alarm()
|
|
|
- {
|
|
|
- boolean ret = false;
|
|
|
- String tempString = GetWallPADData(REMOTE_METERING_ALARM_USE);
|
|
|
- if(tempString.equalsIgnoreCase("false") == true)
|
|
|
- {
|
|
|
- ret = false;
|
|
|
- }
|
|
|
- else if(tempString.equalsIgnoreCase("true") == true)
|
|
|
- {
|
|
|
- ret = true;
|
|
|
- }
|
|
|
- else
|
|
|
- {
|
|
|
- ret = false;
|
|
|
- }
|
|
|
- return ret;
|
|
|
- }
|
|
|
-
|
|
|
- /**
|
|
|
- * @description
|
|
|
- * 에너지관리서버 연동 시 목표량대비 알림 사용 여부
|
|
|
- * @return boolean true(정상 저장) or false(저장 실패)
|
|
|
- * @param input boolean true(사용) or false(사용안함)
|
|
|
- */
|
|
|
- public boolean SetRemoteMetering_Alarm(boolean input)
|
|
|
- {
|
|
|
- boolean ret = false;
|
|
|
-
|
|
|
- if(input == true)
|
|
|
- {
|
|
|
- ret = UpdateWallPADData(REMOTE_METERING_ALARM_USE, "true");
|
|
|
- }
|
|
|
- else
|
|
|
- {
|
|
|
- ret = UpdateWallPADData(REMOTE_METERING_ALARM_USE, "false");
|
|
|
- }
|
|
|
- return ret;
|
|
|
- }
|
|
|
-
|
|
|
- /**
|
|
|
- * @description
|
|
|
- * 에너지관리서버 연동 시 목표량대비 알림 시간 설정 가져오기
|
|
|
- * @return int Time (가져오기 실패 시 기본 값 삽입 후, 12시 리턴)
|
|
|
- */
|
|
|
- public int GetRemoteMetering_AlarmTime()
|
|
|
- {
|
|
|
- int retTime = 12;
|
|
|
- String tempString = GetWallPADData(REMOTE_METERING_ALARM_TIME);
|
|
|
-
|
|
|
- if(tempString == null)
|
|
|
- {
|
|
|
- Log.d(TAG, "insertWallPADDB(WallpadStatusData.REMOTE_METERING_ALARM_TIME, default");
|
|
|
- insertWallPADDB(WallpadStatusData.REMOTE_METERING_ALARM_TIME, WallpadStatusData.REMOTE_METERING_ALARM_TIME_DEFAULT);
|
|
|
- }
|
|
|
-
|
|
|
- try
|
|
|
- {
|
|
|
- retTime = Integer.parseInt(tempString);
|
|
|
- }
|
|
|
- catch (RuntimeException re) {
|
|
|
- LogUtil.errorLogInfo("", TAG, re);
|
|
|
- return 12;
|
|
|
- }
|
|
|
- catch (Exception e)
|
|
|
- {
|
|
|
- LogUtil.errorLogInfo("", TAG, e);//e.printStackTrace();
|
|
|
- return 12;
|
|
|
- }
|
|
|
-
|
|
|
- return retTime;
|
|
|
- }
|
|
|
-
|
|
|
- /**
|
|
|
- * @description
|
|
|
- * 에너지관리서버 연동 시 목표량대비 알림 시간 설정
|
|
|
- * @return boolean true(정상 저장) or false(저장 실패)
|
|
|
- * @param inputTime integer
|
|
|
- */
|
|
|
- public boolean SetRemoteMetering_AlarmTime(int inputTime)
|
|
|
- {
|
|
|
- boolean ret = false;
|
|
|
- String tempString = "12";
|
|
|
-
|
|
|
- try
|
|
|
- {
|
|
|
- tempString = String.valueOf(inputTime);
|
|
|
- ret = UpdateWallPADData(REMOTE_METERING_ALARM_TIME, tempString);
|
|
|
- }
|
|
|
- catch (RuntimeException re) {
|
|
|
- LogUtil.errorLogInfo("", TAG, re);
|
|
|
- ret = UpdateWallPADData(REMOTE_METERING_ALARM_TIME, REMOTE_METERING_ALARM_TIME_DEFAULT);
|
|
|
- }
|
|
|
- catch (Exception e)
|
|
|
- {
|
|
|
- LogUtil.errorLogInfo("", TAG, e);//e.printStackTrace();
|
|
|
- ret = UpdateWallPADData(REMOTE_METERING_ALARM_TIME, REMOTE_METERING_ALARM_TIME_DEFAULT);
|
|
|
- }
|
|
|
-
|
|
|
- return ret;
|
|
|
- }
|
|
|
-
|
|
|
- /**
|
|
|
- * @description
|
|
|
- * 통화 음량 및 카메라 밝기/대비 설정값 가져오기
|
|
|
- * @return int형 사용자가 설정한 통화 음량값 및 카메라 밝기/대비값. 만약 잘못된 input값일 경우 -999 리턴
|
|
|
- * @param Index 0~6범위(0:현관, 1:로비, 2:경비, 3:이웃, 4:국선, 5:현관카메라 밝기, 6:현관카메라 대비)<br>
|
|
|
- * public static final int INDEX_CALL_DOORCAM_SOUND = 0;<br>
|
|
|
- public static final int INDEX_CALL_LOBBY_SOUND = 1;<br>
|
|
|
- public static final int INDEX_CALL_GUARD_SOUND = 2;<br>
|
|
|
- public static final int INDEX_CALL_NEIGHBOR_SOUND = 3;<br>
|
|
|
- public static final int INDEX_CALL_PSTN_SOUND = 4;<br>
|
|
|
- public static final int INDEX_CALL_DOORCAM_BRIGHTNESS = 5;<br>
|
|
|
- public static final int INDEX_CALL_DOORCAM_CONTRAST = 6;<br>
|
|
|
- */
|
|
|
- public int GetCallSound_DoorCamValue(int Index)
|
|
|
- {
|
|
|
- String ret = null;
|
|
|
- int returnValue = -999;
|
|
|
-
|
|
|
- if ((Index < INDEX_CALL_DOORCAM_SOUND) || (Index > INDEX_CALL_DOORCAM_CONTRAST))
|
|
|
- {
|
|
|
- Log.w(TAG, "[DB] GetCallSound_DoorCamValue: Input Value is Wrong: " + Index);
|
|
|
- return returnValue;
|
|
|
- }
|
|
|
-
|
|
|
- switch (Index)
|
|
|
- {
|
|
|
- case 0:
|
|
|
- ret = GetWallPADData(CALL_DOORCAM_SOUND_VALUE);
|
|
|
- break;
|
|
|
- case 1:
|
|
|
- ret = GetWallPADData(CALL_LOBBY_SOUND_VALUE);
|
|
|
- break;
|
|
|
- case 2:
|
|
|
- ret = GetWallPADData(CALL_GUARD_SOUND_VALUE);
|
|
|
- break;
|
|
|
- case 3:
|
|
|
- ret = GetWallPADData(CALL_NEIGHBOR_SOUND_VALUE);
|
|
|
- break;
|
|
|
- case 4:
|
|
|
- ret = GetWallPADData(CALL_PSTN_SOUND_VALUE);
|
|
|
- break;
|
|
|
- case 5:
|
|
|
- ret = GetWallPADData(CALL_DOORCAM_BRIGHTNESS_VALUE);
|
|
|
- break;
|
|
|
- case 6:
|
|
|
- ret = GetWallPADData(CALL_DOORCAM_CONTRAST_VALUE);
|
|
|
- break;
|
|
|
- default:
|
|
|
- Log.w(TAG, "[DB] GetCallSound_DoorCamValue: Input Value is Wrong: " + Index);
|
|
|
- return returnValue;
|
|
|
- }
|
|
|
-
|
|
|
- try
|
|
|
- {
|
|
|
- returnValue = Integer.parseInt(ret);
|
|
|
- }
|
|
|
- catch (RuntimeException re) {
|
|
|
- LogUtil.errorLogInfo("", TAG, re);
|
|
|
- return returnValue;
|
|
|
- }
|
|
|
- catch (Exception e)
|
|
|
- {
|
|
|
- Log.w(TAG, "[DB] GetCallSound_DoorCamValue: ParseInt Error");
|
|
|
- LogUtil.errorLogInfo("", TAG, e);//e.printStackTrace();
|
|
|
- return returnValue;
|
|
|
- }
|
|
|
-
|
|
|
- return returnValue;
|
|
|
- }
|
|
|
- /**
|
|
|
- * @description
|
|
|
- * 통화 음량 및 카메라 밝기/대비 설정값 설정하기
|
|
|
- * @param Index 0~6범위(0:현관, 1:로비, 2:경비, 3:이웃, 4:국선, 5:현관카메라 밝기, 6:현관카메라 대비)<br>
|
|
|
- * public static final int INDEX_CALL_DOORCAM_SOUND = 0;<br>
|
|
|
- public static final int INDEX_CALL_LOBBY_SOUND = 1;<br>
|
|
|
- public static final int INDEX_CALL_GUARD_SOUND = 2;<br>
|
|
|
- public static final int INDEX_CALL_NEIGHBOR_SOUND = 3;<br>
|
|
|
- public static final int INDEX_CALL_PSTN_SOUND = 4;<br>
|
|
|
- public static final int INDEX_CALL_DOORCAM_BRIGHTNESS = 5;<br>
|
|
|
- public static final int INDEX_CALL_DOORCAM_CONTRAST = 6;<br>
|
|
|
- * @param InputValue 설정값 0~10 범위
|
|
|
- * @return true(설정 성공) or false(설정 실패)
|
|
|
- */
|
|
|
- public boolean SetCallSound_DoorCamValue(int Index, int InputValue)
|
|
|
- {
|
|
|
- boolean ret = false;
|
|
|
- String TempValue = null;
|
|
|
-
|
|
|
- if ((Index < INDEX_CALL_DOORCAM_SOUND) || (Index > INDEX_CALL_DOORCAM_CONTRAST))
|
|
|
- {
|
|
|
- Log.w(TAG, "[DB] SetCallSound_DoorCamValue: Input Index is Wrong: " + Index);
|
|
|
- return ret;
|
|
|
- }
|
|
|
- if ((InputValue < 0) || (InputValue > 10))
|
|
|
- {
|
|
|
- Log.w(TAG, "[DB] SetCallSound_DoorCamValue: InputValue is Wrong: " + InputValue);
|
|
|
- return ret;
|
|
|
- }
|
|
|
-
|
|
|
- try
|
|
|
- {
|
|
|
- TempValue = String.valueOf(InputValue);
|
|
|
- }
|
|
|
- catch (RuntimeException re) {
|
|
|
- LogUtil.errorLogInfo("", TAG, re);
|
|
|
- return ret;
|
|
|
- }
|
|
|
- catch (Exception e)
|
|
|
- {
|
|
|
- Log.w(TAG, "[DB] SetCallSound_DoorCamValue: Parse Int to String Error");
|
|
|
- LogUtil.errorLogInfo("", TAG, e);//e.printStackTrace();
|
|
|
- return ret;
|
|
|
- }
|
|
|
-
|
|
|
- switch(Index)
|
|
|
- {
|
|
|
- case 0:
|
|
|
- ret = UpdateWallPADData(CALL_DOORCAM_SOUND_VALUE, TempValue);
|
|
|
- break;
|
|
|
- case 1:
|
|
|
- ret = UpdateWallPADData(CALL_LOBBY_SOUND_VALUE, TempValue);
|
|
|
- break;
|
|
|
- case 2:
|
|
|
- ret = UpdateWallPADData(CALL_GUARD_SOUND_VALUE, TempValue);
|
|
|
- break;
|
|
|
- case 3:
|
|
|
- ret = UpdateWallPADData(CALL_NEIGHBOR_SOUND_VALUE, TempValue);
|
|
|
- break;
|
|
|
- case 4:
|
|
|
- ret = UpdateWallPADData(CALL_PSTN_SOUND_VALUE, TempValue);
|
|
|
- break;
|
|
|
- case 5:
|
|
|
- ret = UpdateWallPADData(CALL_DOORCAM_BRIGHTNESS_VALUE, TempValue);
|
|
|
- break;
|
|
|
- case 6:
|
|
|
- ret = UpdateWallPADData(CALL_DOORCAM_CONTRAST_VALUE, TempValue);
|
|
|
- break;
|
|
|
- default:
|
|
|
- Log.w(TAG, "[DB] SetCallSound_DoorCamValue: Input Index is Wrong: " + Index);
|
|
|
- return ret;
|
|
|
- }
|
|
|
-
|
|
|
- return ret;
|
|
|
- }
|
|
|
-
|
|
|
- /****/
|
|
|
- /**
|
|
|
- * @description
|
|
|
- * 엘리베이터 위젯 복구 기능 사용여부 가져옴 (1번 사용하였으면 무조건 true로 설정됨)
|
|
|
- * @return boolean true(이미 사용하였으몰 실행하면 안됨) or false(사용하지 않았으므로 복구기능 사용해도 됨)
|
|
|
- */
|
|
|
- public boolean GetElevator_Widget_Restore()
|
|
|
- {
|
|
|
- boolean ret = true;
|
|
|
- String tempString = GetWallPADData(ELEVATOR_WIDGET_RESTORE);
|
|
|
- if(tempString.equalsIgnoreCase("false") == true)
|
|
|
- {
|
|
|
- ret = false;
|
|
|
- }
|
|
|
- else if(tempString.equalsIgnoreCase("true") == true)
|
|
|
- {
|
|
|
- ret = true;
|
|
|
- }
|
|
|
- else
|
|
|
- {
|
|
|
- ret = true;
|
|
|
- }
|
|
|
- return ret;
|
|
|
- }
|
|
|
-
|
|
|
- /****/
|
|
|
- /**
|
|
|
- * @description
|
|
|
- * 엘리베이터 위젯 복구 기능 사용여부 설정함 (true로 설정 가능)
|
|
|
- * @input boolean true(1번 설정 사용함)
|
|
|
- * @return boolean 성공여부(true면 성공 false면 실패)
|
|
|
- */
|
|
|
- public boolean SetElevator_Widget_Restore(boolean input)
|
|
|
- {
|
|
|
- boolean result = true;
|
|
|
- if(input == true)
|
|
|
- {
|
|
|
- result = UpdateWallPADData(ELEVATOR_WIDGET_RESTORE, "true");
|
|
|
- }
|
|
|
- return result;
|
|
|
- }
|
|
|
-
|
|
|
-
|
|
|
- public void SetSubMenuType(int type)
|
|
|
- {
|
|
|
- if (RangeCheck(SUBMENUTYPETEXT, type)==false) return;
|
|
|
- UpdateWallPADData(SUBMENU_TYPE, SUBMENUTYPETEXT[type]);
|
|
|
- }
|
|
|
-
|
|
|
- public int GetSubMenuType()
|
|
|
- {
|
|
|
- try {
|
|
|
- String ret = GetWallPADData(SUBMENU_TYPE);
|
|
|
- return Integer.parseInt(ret);
|
|
|
- }
|
|
|
- catch (RuntimeException re) {
|
|
|
- LogUtil.errorLogInfo("", TAG, re);
|
|
|
- return 0;
|
|
|
- }
|
|
|
- catch (Exception e)
|
|
|
- {
|
|
|
- LogUtil.errorLogInfo("", TAG, e);//e.printStackTrace();
|
|
|
- return 0;
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- private boolean RangeCheck(String[] data, int idx)
|
|
|
- {
|
|
|
- if (idx < 0 || idx >= data.length)
|
|
|
- return false;
|
|
|
-
|
|
|
- return true;
|
|
|
- }
|
|
|
-
|
|
|
- public void SetMainBGSlidShowTime(int timeout)
|
|
|
- {
|
|
|
- UpdateWallPADData(MAINBGSLIDSHOWTIME, String.valueOf(timeout));
|
|
|
- }
|
|
|
-
|
|
|
- public int GetMainBGSlidShowTime()
|
|
|
- {
|
|
|
- try {
|
|
|
- String ret = GetWallPADData(MAINBGSLIDSHOWTIME);
|
|
|
- return Integer.parseInt(ret);
|
|
|
- }
|
|
|
- catch (RuntimeException re) {
|
|
|
- LogUtil.errorLogInfo("", TAG, re);
|
|
|
- return 0;
|
|
|
- }
|
|
|
- catch (Exception e)
|
|
|
- {
|
|
|
- LogUtil.errorLogInfo("", TAG, e);//e.printStackTrace();
|
|
|
- return 0;
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- public static class WeatherItem
|
|
|
- {
|
|
|
- public int seqnum;
|
|
|
- public String date;
|
|
|
- public String state;
|
|
|
- public String code;
|
|
|
- public String low;
|
|
|
- public String high;
|
|
|
- public String am;
|
|
|
- public String pm;
|
|
|
- }
|
|
|
-
|
|
|
- public class WeatherTable
|
|
|
- {
|
|
|
- List<WeatherItem> WeatherData = new ArrayList<WeatherItem>();
|
|
|
- public WeatherTable()
|
|
|
- {
|
|
|
- if (!CheckTableExist(MainWeatherTBL))
|
|
|
- CreateTable(CreateMainWeatherDB);
|
|
|
- }
|
|
|
- public void InitWeatherTable()
|
|
|
- {
|
|
|
- if (!CheckTableExist(MainWeatherTBL))
|
|
|
- CreateTable(CreateMainWeatherDB);
|
|
|
- else
|
|
|
- DeleteTableInst(MainWeatherTBL);
|
|
|
- WeatherData.clear();
|
|
|
- }
|
|
|
- public void AddWeatherData(String date, String state , String code, String low, String high, String am, String pm)
|
|
|
- {
|
|
|
- ContentValues values = new ContentValues();
|
|
|
-
|
|
|
- values.put("date", date);
|
|
|
- values.put("state", state);
|
|
|
- values.put("code", code);
|
|
|
- values.put("low", low);
|
|
|
- values.put("high", high);
|
|
|
- values.put("am", am);
|
|
|
- values.put("pm", pm);
|
|
|
- wdb.insert(MainWeatherTBL, null, values);
|
|
|
- }
|
|
|
-
|
|
|
- public List<WeatherItem> GetWeatherList()
|
|
|
- {
|
|
|
- if (WeatherData == null || WeatherData.size() == 0)
|
|
|
- return GetWeatherData();
|
|
|
-
|
|
|
- return WeatherData;
|
|
|
- }
|
|
|
-
|
|
|
- public List<WeatherItem> GetWeatherData()
|
|
|
- {
|
|
|
- Cursor cursor = wdb.rawQuery("select date, state, code, low, high, am, pm from "+MainWeatherTBL+" order by seqnum asc;", null);
|
|
|
-
|
|
|
- while (cursor.moveToNext())
|
|
|
- {
|
|
|
- WeatherItem item = new WeatherItem();
|
|
|
- item.date = cursor.getString(0);
|
|
|
- item.state = cursor.getString(1);
|
|
|
- item.code = cursor.getString(2);
|
|
|
- item.low = cursor.getString(3);
|
|
|
- item.high = cursor.getString(4);
|
|
|
- item.am = cursor.getString(5);
|
|
|
- item.pm = cursor.getString(6);
|
|
|
- if(WeatherData!=null)
|
|
|
- WeatherData.add(item);
|
|
|
- }
|
|
|
- cursor.close();
|
|
|
- return WeatherData;
|
|
|
- }
|
|
|
- }
|
|
|
- WeatherTable WeatherCtr;
|
|
|
- public WeatherTable GetWeatherTableController()
|
|
|
- {
|
|
|
- if (WeatherCtr == null)
|
|
|
- WeatherCtr = new WeatherTable();
|
|
|
- return WeatherCtr;
|
|
|
- }
|
|
|
-
|
|
|
- public static class WidgetItem
|
|
|
- {
|
|
|
- public int seqnum;
|
|
|
- public int idx; // 0~ 14
|
|
|
- public int widgetID; // Main Source ID.java WidgetID
|
|
|
- }
|
|
|
-
|
|
|
- public class WidgetTable
|
|
|
- {
|
|
|
- List<WidgetItem> WidgetData = new ArrayList<WidgetItem>();
|
|
|
- public WidgetTable()
|
|
|
- {
|
|
|
- if (!CheckTableExist(WidgetTBL))
|
|
|
- {
|
|
|
- CreateTable(CreateWidgetDB);
|
|
|
- }
|
|
|
- }
|
|
|
- public boolean AddWidgetData(int idx, int widgetId )
|
|
|
- {
|
|
|
- try
|
|
|
- {
|
|
|
- ContentValues values = new ContentValues();
|
|
|
- values.put("id", idx );
|
|
|
- values.put("widgetid", widgetId);
|
|
|
- wdb.insert(WidgetTBL, null, values);
|
|
|
- return true;
|
|
|
- } catch (SQLException e)
|
|
|
- {
|
|
|
- LogUtil.errorLogInfo("", TAG, e);//e.printStackTrace();
|
|
|
- return false;
|
|
|
- }
|
|
|
- }
|
|
|
- public boolean DeleteWidgetData( int id )
|
|
|
- {
|
|
|
- String sqlst = "delete from " + WidgetTBL + " where id= " + String.valueOf(id) + ";";
|
|
|
- try {
|
|
|
- wdb.execSQL(sqlst);
|
|
|
- return true;
|
|
|
- } catch (SQLException e)
|
|
|
- {
|
|
|
- LogUtil.errorLogInfo("", TAG, e);//e.printStackTrace();
|
|
|
- return false;
|
|
|
- }
|
|
|
- }
|
|
|
- public boolean DeleteWidgetDataID( int widgetid )
|
|
|
- {
|
|
|
- String sqlst = "delete from " + WidgetTBL + " where widgetid= " + String.valueOf(widgetid) + ";";
|
|
|
- try {
|
|
|
- wdb.execSQL(sqlst);
|
|
|
- return true;
|
|
|
- } catch (SQLException e)
|
|
|
- {
|
|
|
- LogUtil.errorLogInfo("", TAG, e);//e.printStackTrace();
|
|
|
- return false;
|
|
|
- }
|
|
|
- }
|
|
|
- public List<WidgetItem> GetWidgetData()
|
|
|
- {
|
|
|
- try
|
|
|
- {
|
|
|
- Cursor cursor = wdb.rawQuery("select id, widgetid from "+WidgetTBL+" order by seqnum asc;", null);
|
|
|
- WidgetData.clear();
|
|
|
- while (cursor.moveToNext())
|
|
|
- {
|
|
|
- WidgetItem item = new WidgetItem();
|
|
|
- item.idx = cursor.getInt(0);
|
|
|
- item.widgetID = cursor.getInt(1);
|
|
|
- WidgetData.add(item);
|
|
|
- }
|
|
|
- cursor.close();
|
|
|
- }
|
|
|
- catch (RuntimeException re) {
|
|
|
- LogUtil.errorLogInfo("", TAG, re);
|
|
|
- return null;
|
|
|
- }
|
|
|
- catch (Exception e)
|
|
|
- {
|
|
|
- LogUtil.errorLogInfo("", TAG, e);//e.printStackTrace();
|
|
|
- return null;
|
|
|
- }
|
|
|
- return WidgetData;
|
|
|
-
|
|
|
- }
|
|
|
-
|
|
|
- }
|
|
|
-
|
|
|
- WidgetTable WidgetCtr;
|
|
|
- public WidgetTable GetWidgetTableController()
|
|
|
- {
|
|
|
- if (WidgetCtr == null)
|
|
|
- WidgetCtr = new WidgetTable();
|
|
|
- return WidgetCtr;
|
|
|
- }
|
|
|
-
|
|
|
- public int GetWallPadRebootingCount() {
|
|
|
- String strRet = GetWallPADData(DB_WALLPAD_IGW_COMMAND_COUNT);
|
|
|
- if (strRet == null) {
|
|
|
- Log.d(TAG, "[GetWallPadRebootingCount] strRet is null !!");
|
|
|
- insertWallPADDB(DB_WALLPAD_IGW_COMMAND_COUNT, "0");
|
|
|
- return 0;
|
|
|
- }
|
|
|
-
|
|
|
- int ret = 0;
|
|
|
- try {
|
|
|
- ret = Integer.parseInt(strRet);
|
|
|
- } catch (RuntimeException re) {
|
|
|
- LogUtil.errorLogInfo("", TAG, re);
|
|
|
- }
|
|
|
- catch (Exception e) {
|
|
|
- Log.e(TAG, "[Exception] GetWallPadRebootingCount");
|
|
|
- LogUtil.errorLogInfo("", TAG, e);//e.printStackTrace();
|
|
|
- }
|
|
|
- return ret;
|
|
|
- }
|
|
|
-
|
|
|
- public void SetWallPadRebootingCount(int count) {
|
|
|
- boolean bRet = UpdateWallPADData(DB_WALLPAD_IGW_COMMAND_COUNT, String.valueOf(count));
|
|
|
- if (bRet == false) {
|
|
|
- Log.d(TAG, "[SetWallPadRebootingCount] UpdateWallPADData false !!");
|
|
|
- insertWallPADDB(DB_WALLPAD_IGW_COMMAND_COUNT, "0");
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- /**
|
|
|
- * 스마트 분전반 비상 상태 설정하기
|
|
|
- * @param normal - true면 정상, false면 비정상
|
|
|
- * @return boolean - true면 정상, false면 오류
|
|
|
- * **/
|
|
|
- public boolean SetSmartLightAlarm(boolean normal)
|
|
|
- {
|
|
|
- boolean bRet;
|
|
|
- if(normal)
|
|
|
- {
|
|
|
- bRet = UpdateWallPADData(DEV_SMARTLIGHT_STATUS, "normal");
|
|
|
- }
|
|
|
- else
|
|
|
- {
|
|
|
- bRet = UpdateWallPADData(DEV_SMARTLIGHT_STATUS, "alarm");
|
|
|
- }
|
|
|
- return bRet;
|
|
|
- }
|
|
|
-
|
|
|
- /**
|
|
|
- * 스마트 분전반 비상 상태 가져오기
|
|
|
- * @return "normal"이면 정상, "alarm"이면 비상상태
|
|
|
- * **/
|
|
|
- public String GetSmartLightAlarm()
|
|
|
- {
|
|
|
- try {
|
|
|
- String ret = GetWallPADData(DEV_SMARTLIGHT_STATUS);
|
|
|
- return ret;
|
|
|
- }
|
|
|
- catch (RuntimeException re) {
|
|
|
- LogUtil.errorLogInfo("", TAG, re);
|
|
|
- return null;
|
|
|
- }
|
|
|
- catch (Exception e)
|
|
|
- {
|
|
|
- LogUtil.errorLogInfo("", TAG, e);//e.printStackTrace();
|
|
|
- return null;
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- /**
|
|
|
- * 스마트 분전반 비상 상태 설정하기
|
|
|
- * @param Device - Device정보
|
|
|
- * **/
|
|
|
- public boolean SetSmartLightAlarmDevice(String Device)
|
|
|
- {
|
|
|
- return UpdateWallPADData(DEV_SMARTLIGHT_DEVICE, Device);
|
|
|
- }
|
|
|
-
|
|
|
- /**
|
|
|
- * 스마트 분전반 비상 디바이스 정보 가져오기
|
|
|
- * @return null/led_converter/em/led_light/power_controller/concent/dc_apu/energy_controller
|
|
|
- * **/
|
|
|
- public String GetSmartLightAlarmDevice()
|
|
|
- {
|
|
|
- try {
|
|
|
- String ret = GetWallPADData(DEV_SMARTLIGHT_DEVICE);
|
|
|
- return ret;
|
|
|
- }
|
|
|
- catch (RuntimeException re) {
|
|
|
- LogUtil.errorLogInfo("", TAG, re);
|
|
|
- return null;
|
|
|
- }
|
|
|
- catch (Exception e)
|
|
|
- {
|
|
|
- LogUtil.errorLogInfo("", TAG, e);//e.printStackTrace();
|
|
|
- return null;
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- public boolean SetKNXAlarmStatus(boolean normal) {
|
|
|
- boolean bRet;
|
|
|
- if (normal) {
|
|
|
- bRet = UpdateWallPADData(DEV_KNXDEVICE_STATUS, "normal");
|
|
|
- } else {
|
|
|
- bRet = UpdateWallPADData(DEV_KNXDEVICE_STATUS, "alarm");
|
|
|
- }
|
|
|
- return bRet;
|
|
|
- }
|
|
|
-
|
|
|
- public String GetKNXAlarmStatus(int devIndex) {
|
|
|
- try {
|
|
|
- String ret = GetWallPADData(DEV_KNXDEVICE_STATUS);
|
|
|
- return ret;
|
|
|
- } catch (RuntimeException re) {
|
|
|
- LogUtil.errorLogInfo("", TAG, re);
|
|
|
- return null;
|
|
|
- }
|
|
|
- catch (Exception e) {
|
|
|
- LogUtil.errorLogInfo("", TAG, e);//e.printStackTrace();
|
|
|
- return null;
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- public boolean SetKNXAlarmCause(String cause) {
|
|
|
- return UpdateWallPADData(DEV_KNXDEVICE_CAUSE, cause);
|
|
|
- }
|
|
|
-
|
|
|
- public String GetKNXAlarmCause(int devIndex) {
|
|
|
- try {
|
|
|
- String ret = GetWallPADData(DEV_KNXDEVICE_CAUSE);
|
|
|
- return ret;
|
|
|
- } catch (RuntimeException re) {
|
|
|
- LogUtil.errorLogInfo("", TAG, re);
|
|
|
- return null;
|
|
|
- }
|
|
|
- catch (Exception e) {
|
|
|
- LogUtil.errorLogInfo("", TAG, e);//e.printStackTrace();
|
|
|
- return null;
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- /**
|
|
|
- * 메인월패드 난방 방 개수 가져오기
|
|
|
- * @return
|
|
|
- */
|
|
|
- public int GetHeatingRoomNum() {
|
|
|
- String strRet = GetWallPADData(DB_WALLPAD_HEATING_ROOM_NUM);
|
|
|
- if (strRet == null) {
|
|
|
- Log.d(TAG, "[GetHeatingRoomNum] strRet is null !!");
|
|
|
- insertWallPADDB(DB_WALLPAD_HEATING_ROOM_NUM, "0");
|
|
|
- return 0;
|
|
|
- }
|
|
|
-
|
|
|
- int ret = 0;
|
|
|
- try {
|
|
|
- ret = Integer.parseInt(strRet);
|
|
|
- } catch (RuntimeException re) {
|
|
|
- LogUtil.errorLogInfo("", TAG, re);
|
|
|
- }
|
|
|
- catch (Exception e) {
|
|
|
- Log.e(TAG, "[Exception] GetHeatingRoomNum()");
|
|
|
- LogUtil.errorLogInfo("", TAG, e);//e.printStackTrace();
|
|
|
- }
|
|
|
- return ret;
|
|
|
- }
|
|
|
-
|
|
|
- /**
|
|
|
- * 난방 방개수 설정하기
|
|
|
- * @param nValue
|
|
|
- */
|
|
|
- public void setHeatingRoomNum(int nValue) {
|
|
|
- boolean bRet = UpdateWallPADData(DB_WALLPAD_HEATING_ROOM_NUM, String.valueOf(nValue));
|
|
|
- if (bRet == false) {
|
|
|
- Log.d(TAG, "[setHeatingRoomNum] UpdateWallPADData false !!");
|
|
|
- insertWallPADDB(DB_WALLPAD_HEATING_ROOM_NUM, "0");
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- /**
|
|
|
- * 스마트현관카메라 거동수상자 녹화 설정 여부 읽기
|
|
|
- *
|
|
|
- * @return (boolean) 설정값 (true: 녹화 ON , false:녹화 OFF)
|
|
|
- */
|
|
|
- public boolean GetStrangerRecordingOnOff()
|
|
|
- {
|
|
|
- try
|
|
|
- {
|
|
|
- String strRet = GetWallPADData(SMARTIOT_RECORDING_STRANGER_ONOFF);
|
|
|
- Log.d(TAG, "[GetStrangerRecordingOnOff] strRet [" + strRet + "]");
|
|
|
- if (strRet == null) {
|
|
|
- Log.d(TAG, "[GetStrangerRecordingOnOff] strRet is null !!");
|
|
|
- insertWallPADDB(SMARTIOT_RECORDING_STRANGER_ONOFF, SMARTIOT_RECORDING_STRANGER_ONOFF_USE_DEFAULT);
|
|
|
- }
|
|
|
-
|
|
|
- try {
|
|
|
- if (Boolean.parseBoolean(strRet)) {
|
|
|
- return true;
|
|
|
- } else {
|
|
|
- return false;
|
|
|
- }
|
|
|
- } catch (RuntimeException re) {
|
|
|
- LogUtil.errorLogInfo("", TAG, re);
|
|
|
- }
|
|
|
- catch (Exception e) {
|
|
|
- Log.e(TAG, "[Exception] GetStrangerRecordingOnOff()");
|
|
|
- LogUtil.errorLogInfo("", TAG, e);//e.printStackTrace();
|
|
|
- }
|
|
|
- return true;
|
|
|
-
|
|
|
- }
|
|
|
- catch (RuntimeException re) {
|
|
|
- LogUtil.errorLogInfo("", TAG, re);
|
|
|
- return false;
|
|
|
- }
|
|
|
- catch (Exception e )
|
|
|
- {
|
|
|
- Log.e(TAG, "[GetStrangerRecordingOnOff] Exception Error");
|
|
|
- LogUtil.errorLogInfo("", TAG, e);//e.printStackTrace();
|
|
|
- return false;
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- /**
|
|
|
- * 스마트현관카메라 거동수상자 사진촬영 설정
|
|
|
- *
|
|
|
- * @param bSet - (boolean) 설정할 값 (true: 촬영 ON , false: 촬영 OFF)
|
|
|
- */
|
|
|
- public void SetStrangerTakePicOnOff(boolean bSet)
|
|
|
- {
|
|
|
- try
|
|
|
- {
|
|
|
- UpdateWallPADData(SMARTIOT_TAKINGPIC_STRANGER_ONOFF, String.valueOf(bSet));
|
|
|
- }
|
|
|
- catch (RuntimeException re) {
|
|
|
- LogUtil.errorLogInfo("", TAG, re);
|
|
|
- }
|
|
|
- catch (Exception e)
|
|
|
- {
|
|
|
- Log.e(TAG, "[StrangerTakePicOnOff] Exception Error");
|
|
|
- LogUtil.errorLogInfo("", TAG, e);//e.printStackTrace();
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- /**
|
|
|
- * 스마트현관카메라 거동수상자 녹화 설정 여부 읽기
|
|
|
- *
|
|
|
- * @return (boolean) 설정값 (true: 녹화 ON , false:녹화 OFF)
|
|
|
- */
|
|
|
- public boolean GetStrangerTakePicOnOff()
|
|
|
- {
|
|
|
- try
|
|
|
- {
|
|
|
- String strRet = GetWallPADData(SMARTIOT_TAKINGPIC_STRANGER_ONOFF);
|
|
|
- Log.d(TAG, "[GetStrangerTakePicOnOff] strRet [" + strRet + "]");
|
|
|
- if (strRet == null) {
|
|
|
- Log.d(TAG, "[GetStrangerTakePicOnOff] strRet is null !!");
|
|
|
- insertWallPADDB(SMARTIOT_TAKINGPIC_STRANGER_ONOFF, SMARTIOT_TAKINGPIC_STRANGER_ONOFF_USE_DEFAULT);
|
|
|
- }
|
|
|
-
|
|
|
- try {
|
|
|
- if (Boolean.parseBoolean(strRet)) {
|
|
|
- return true;
|
|
|
- } else {
|
|
|
- return false;
|
|
|
- }
|
|
|
- } catch (RuntimeException re) {
|
|
|
- LogUtil.errorLogInfo("", TAG, re);
|
|
|
- }
|
|
|
- catch (Exception e) {
|
|
|
- Log.e(TAG, "[Exception] GetStrangerTakePicOnOff()");
|
|
|
- LogUtil.errorLogInfo("", TAG, e);//e.printStackTrace();
|
|
|
- }
|
|
|
- return true;
|
|
|
-
|
|
|
- }
|
|
|
- catch (RuntimeException re) {
|
|
|
- LogUtil.errorLogInfo("", TAG, re);
|
|
|
- return false;
|
|
|
- }
|
|
|
- catch (Exception e )
|
|
|
- {
|
|
|
- Log.e(TAG, "[GetStrangerTakePicOnOff] Exception Error");
|
|
|
- LogUtil.errorLogInfo("", TAG, e);//e.printStackTrace();
|
|
|
- return false;
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- /**
|
|
|
- * 스마트현관카메라 거동수상자 녹화 설정
|
|
|
- *
|
|
|
- * @param bSet - (boolean) 설정할 값 (true: 녹화 ON , false: 녹화 OFF)
|
|
|
- */
|
|
|
- public void SetStrangerRecordingOnOff(boolean bSet)
|
|
|
- {
|
|
|
- try
|
|
|
- {
|
|
|
- UpdateWallPADData(SMARTIOT_RECORDING_STRANGER_ONOFF, String.valueOf(bSet));
|
|
|
- }
|
|
|
- catch (RuntimeException re) {
|
|
|
- LogUtil.errorLogInfo("", TAG, re);
|
|
|
- }
|
|
|
- catch (Exception e)
|
|
|
- {
|
|
|
- Log.e(TAG, "[SetStrangerRecordingOnOff] Exception Error");
|
|
|
- LogUtil.errorLogInfo("", TAG, e);//e.printStackTrace();
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- /**
|
|
|
- * @description
|
|
|
- * 스마트현관카메라 거동수상자 녹화 영상 밝기 설정값 가져오기
|
|
|
- * @return int형 사용자가 설정한 영상 밝기값
|
|
|
- */
|
|
|
- public int GetSmartDoorCamBrightness() {
|
|
|
- String strRet = GetWallPADData(SMARTIOT_CAM_BRIGHTNESS);
|
|
|
- if (strRet == null) {
|
|
|
- Log.d(TAG, "[GetSmartDoorCamBrightness] strRet is null !!");
|
|
|
- insertWallPADDB(SMARTIOT_CAM_BRIGHTNESS, SMARTIOT_CAM_BRIGHTNESS_VALUE_DEFAULT);
|
|
|
- }
|
|
|
-
|
|
|
- int ret = 0;
|
|
|
- try {
|
|
|
- ret = Integer.parseInt(strRet);
|
|
|
- } catch (RuntimeException re) {
|
|
|
- LogUtil.errorLogInfo("", TAG, re);
|
|
|
- }
|
|
|
- catch (Exception e) {
|
|
|
- Log.e(TAG, "[Exception] GetSmartDoorCamBrightness()");
|
|
|
- LogUtil.errorLogInfo("", TAG, e);//e.printStackTrace();
|
|
|
- }
|
|
|
- return ret;
|
|
|
- }
|
|
|
-
|
|
|
- public void SetSmartDoorCamBrightness(int brightness)
|
|
|
- {
|
|
|
- UpdateWallPADData(SMARTIOT_CAM_BRIGHTNESS, String.valueOf(brightness));
|
|
|
- }
|
|
|
-
|
|
|
- /**
|
|
|
- * @description
|
|
|
- * 스마트현관카메라 거동수상자 영상 녹화 시간 설정값 가져오기
|
|
|
- * @return int형 사용자가 설정한 영상 녹화 시간(초 단위)
|
|
|
- */
|
|
|
- public int GetSmartDoorCamRecordTime() {
|
|
|
- String strRet = GetWallPADData(SMARTIOT_RECORD_TIME);
|
|
|
- if (strRet == null) {
|
|
|
- Log.d(TAG, "[GetSmartDoorCamRecordTime] strRet is null !!");
|
|
|
- insertWallPADDB(SMARTIOT_RECORD_TIME, SMARTIOT_RECORD_TIME_VALUE_DEFAULT);
|
|
|
- }
|
|
|
-
|
|
|
- int ret = 0;
|
|
|
- try {
|
|
|
- ret = Integer.parseInt(strRet);
|
|
|
- } catch (RuntimeException re) {
|
|
|
- LogUtil.errorLogInfo("", TAG, re);
|
|
|
- }
|
|
|
- catch (Exception e) {
|
|
|
- Log.e(TAG, "[Exception] GetSmartDoorCamRecordTime()");
|
|
|
- LogUtil.errorLogInfo("", TAG, e);//e.printStackTrace();
|
|
|
- }
|
|
|
- return ret;
|
|
|
- }
|
|
|
-
|
|
|
- public void SetSmartDoorCamRecordTime(int time)
|
|
|
- {
|
|
|
- UpdateWallPADData(SMARTIOT_RECORD_TIME, String.valueOf(time));
|
|
|
- }
|
|
|
-
|
|
|
- /**
|
|
|
- * @description
|
|
|
- * 스마트현관카메라 센서 민감도 설정값 가져오기
|
|
|
- * @return int형 사용자가 설정한 센서 민감도
|
|
|
- */
|
|
|
- public int GetSmartDoorCamSensorSensitivity() {
|
|
|
- String strRet = GetWallPADData(SMARTIOT_SENSOR_SENSITIVITY);
|
|
|
- if (strRet == null) {
|
|
|
- Log.d(TAG, "[GetSmartDoorCamSensorSensitivity] strRet is null !!");
|
|
|
- insertWallPADDB(SMARTIOT_SENSOR_SENSITIVITY, SMARTIOT_SENSOR_SENSITIVITY_VALUE_DEFAULT);
|
|
|
- }
|
|
|
-
|
|
|
- int ret = 0;
|
|
|
- try {
|
|
|
- ret = Integer.parseInt(strRet);
|
|
|
- } catch (RuntimeException re) {
|
|
|
- LogUtil.errorLogInfo("", TAG, re);
|
|
|
- }
|
|
|
- catch (Exception e) {
|
|
|
- Log.e(TAG, "[Exception] GetSmartDoorCamSensorSensitivity()");
|
|
|
- LogUtil.errorLogInfo("", TAG, e);//e.printStackTrace();
|
|
|
- }
|
|
|
- return ret;
|
|
|
- }
|
|
|
-
|
|
|
- public void SetSmartDoorSensorSensitivity(int sensitivity) {
|
|
|
- UpdateWallPADData(SMARTIOT_SENSOR_SENSITIVITY, String.valueOf(sensitivity));
|
|
|
- }
|
|
|
-
|
|
|
- /**
|
|
|
- * @description
|
|
|
- * 스마트현관카메라 사진촬영 주기설정값 가져오기
|
|
|
- * @return int형 사용자가 설정한 사진촬영 주기
|
|
|
- */
|
|
|
- public int GetSmartDoorCamSensorPeriod() {
|
|
|
- String strRet = GetWallPADData(SMARTIOT_SENSOR_PERIOD);
|
|
|
- if (strRet == null) {
|
|
|
- Log.d(TAG, "[GetSmartDoorCamSensorPeriod] strRet is null !!");
|
|
|
- insertWallPADDB(SMARTIOT_SENSOR_PERIOD, SMARTIOT_SENSOR_PERIOD_VALUE_DEFAULT);
|
|
|
- }
|
|
|
-
|
|
|
- int ret = 0;
|
|
|
- try {
|
|
|
- ret = Integer.parseInt(strRet);
|
|
|
- } catch (RuntimeException re) {
|
|
|
- LogUtil.errorLogInfo("", TAG, re);
|
|
|
- }
|
|
|
- catch (Exception e) {
|
|
|
- Log.e(TAG, "[Exception] GetSmartDoorCamSensorPeriod()");
|
|
|
- LogUtil.errorLogInfo("", TAG, e);//e.printStackTrace();
|
|
|
- }
|
|
|
- return ret;
|
|
|
- }
|
|
|
-
|
|
|
- public void SetSmartDoorSensorPeriod(int period) {
|
|
|
- UpdateWallPADData(SMARTIOT_SENSOR_PERIOD, String.valueOf(period));
|
|
|
- }
|
|
|
-
|
|
|
- /**
|
|
|
- * @description
|
|
|
- * 스마트현관카메라 센서 감도 유지시간 설정값 가져오기
|
|
|
- * @return int형 사용자가 설정한 센서 감도 유지시간
|
|
|
- */
|
|
|
- public int GetSmartDoorCamSensorDuration() {
|
|
|
- String strRet = GetWallPADData(SMARTIOT_SENSOR_DURATION);
|
|
|
- if (strRet == null) {
|
|
|
- Log.d(TAG, "[GetSmartDoorCamSensorDuration] strRet is null !!");
|
|
|
- insertWallPADDB(SMARTIOT_SENSOR_DURATION, SMARTIOT_SENSOR_DURATION_VALUE_DEFAULT);
|
|
|
- }
|
|
|
-
|
|
|
- int ret = 0;
|
|
|
- try {
|
|
|
- ret = Integer.parseInt(strRet);
|
|
|
- } catch (RuntimeException re) {
|
|
|
- LogUtil.errorLogInfo("", TAG, re);
|
|
|
- }
|
|
|
- catch (Exception e) {
|
|
|
- Log.e(TAG, "[Exception] GetSmartDoorCamSensorDuration()");
|
|
|
- LogUtil.errorLogInfo("", TAG, e);//e.printStackTrace();
|
|
|
- }
|
|
|
- return ret;
|
|
|
- }
|
|
|
-
|
|
|
- public void SetSmartDoorSensorDuration(int duration) {
|
|
|
- UpdateWallPADData(SMARTIOT_SENSOR_DURATION, String.valueOf(duration));
|
|
|
- }
|
|
|
-
|
|
|
- public String GetReliefCallDegree() {
|
|
|
- String strRet = GetWallPADData(RELIEFCALL_DEGREE);
|
|
|
- if (strRet == null) {
|
|
|
- Log.d(TAG, "[GetReliefCallDegree] strRet is null !!");
|
|
|
- this.insertWallPADDB(RELIEFCALL_DEGREE, RELIEFCALL_DEGREE_DEFAULT_VALUE);
|
|
|
- }
|
|
|
-
|
|
|
- String ret = "";
|
|
|
- try {
|
|
|
- ret = strRet;
|
|
|
- } catch (RuntimeException re) {
|
|
|
- LogUtil.errorLogInfo("", TAG, re);
|
|
|
- }
|
|
|
- catch (Exception e) {
|
|
|
- Log.e(TAG, "[Exception] GetReliefCallDegree()");
|
|
|
- LogUtil.errorLogInfo("", TAG, e);//e.printStackTrace();
|
|
|
- }
|
|
|
- return ret;
|
|
|
- }
|
|
|
-
|
|
|
- public void SetReliefCallDegree(String degree)
|
|
|
- {
|
|
|
- UpdateWallPADData(RELIEFCALL_DEGREE, degree);
|
|
|
- }
|
|
|
-
|
|
|
- public boolean GetRemoteCallRegistration() {
|
|
|
- String strRet = GetWallPADData(REMOTECALL_REGISTRATION);
|
|
|
- if (strRet == null) {
|
|
|
- Log.d(TAG, "[GetRemoteCallRegistration] strRet is null !!");
|
|
|
- this.insertWallPADDB(REMOTECALL_REGISTRATION, REMOTECALL_REGISTRATION_DEFAULT_VALUE);
|
|
|
- }
|
|
|
-
|
|
|
- boolean ret = false;
|
|
|
- try {
|
|
|
- ret = Boolean.valueOf(strRet).booleanValue();
|
|
|
- } catch (RuntimeException re) {
|
|
|
- LogUtil.errorLogInfo("", TAG, re);
|
|
|
- }
|
|
|
- catch (Exception e) {
|
|
|
- Log.e(TAG, "[Exception] GetRemoteCallRegistration()");
|
|
|
- LogUtil.errorLogInfo("", TAG, e);//e.printStackTrace();
|
|
|
- }
|
|
|
- return ret;
|
|
|
- }
|
|
|
-
|
|
|
- public void SetRemoteCallRegistration(boolean bRegister)
|
|
|
- {
|
|
|
- UpdateWallPADData(REMOTECALL_REGISTRATION, String.valueOf(bRegister));
|
|
|
- }
|
|
|
-
|
|
|
- public int GetRemoteCallUserCnt() {
|
|
|
- String strRet = GetWallPADData(REMOTECALL_USERCNT);
|
|
|
- if (strRet == null) {
|
|
|
- Log.d(TAG, "[GetRemoteCallUserCnt] strRet is null !!");
|
|
|
- this.insertWallPADDB(REMOTECALL_USERCNT, REMOTECALL_USERCNT_DEFAULT_VALUE);
|
|
|
- }
|
|
|
-
|
|
|
- int ret = 0;
|
|
|
- try {
|
|
|
- ret = Integer.parseInt(strRet);
|
|
|
- } catch (RuntimeException re) {
|
|
|
- LogUtil.errorLogInfo("", TAG, re);
|
|
|
- }
|
|
|
- catch (Exception e) {
|
|
|
- Log.e(TAG, "[Exception] GetRemoteCallUserCnt()");
|
|
|
- LogUtil.errorLogInfo("", TAG, e);//e.printStackTrace();
|
|
|
- }
|
|
|
- return ret;
|
|
|
- }
|
|
|
-
|
|
|
- public void SetRemoteCallUserCnt(int cnt)
|
|
|
- {
|
|
|
- UpdateWallPADData(REMOTECALL_USERCNT, String.valueOf(cnt));
|
|
|
- }
|
|
|
-
|
|
|
- /**
|
|
|
- * 간편모드UX 설정 여부
|
|
|
- *
|
|
|
- * @return (boolean) 설정값 (true: 설정 ON , false: 설정 OFF)
|
|
|
- */
|
|
|
- public boolean GetEasyModeUxUse()
|
|
|
- {
|
|
|
- try {
|
|
|
- String strRet = GetWallPADData(EASYMODE_UX_USE);
|
|
|
- Log.d(TAG, "[GetEasyModeUxUse] strRet [" + strRet + "]");
|
|
|
- if (strRet == null) {
|
|
|
- Log.d(TAG, "[GetEasyModeUxUse] strRet is null !!");
|
|
|
- insertWallPADDB(EASYMODE_UX_USE, EASYMODE_UX_USE_DEFAULT);
|
|
|
- }
|
|
|
-
|
|
|
- if (Boolean.parseBoolean(strRet)) {
|
|
|
- return true;
|
|
|
- }
|
|
|
- } catch (RuntimeException re) {
|
|
|
- LogUtil.errorLogInfo("", TAG, re);
|
|
|
- }
|
|
|
- catch (Exception e) {
|
|
|
- Log.e(TAG, "[GetEasyModeUxUse] Exception Error");
|
|
|
- LogUtil.errorLogInfo("", TAG, e);//e.printStackTrace();
|
|
|
- }
|
|
|
- return false;
|
|
|
- }
|
|
|
-
|
|
|
- /**
|
|
|
- * 간편모드UX 설정 (사용자용)
|
|
|
- *
|
|
|
- * @param bUse - (boolean) 설정할 값 (true: 설정 ON , false: 설정 OFF)
|
|
|
- */
|
|
|
- public void SetEasyModeUxUse(boolean bUse) {
|
|
|
- try {
|
|
|
- UpdateWallPADData(EASYMODE_UX_USE, String.valueOf(bUse));
|
|
|
- } catch (RuntimeException re) {
|
|
|
- LogUtil.errorLogInfo("", TAG, re);
|
|
|
- }
|
|
|
- catch (Exception e) {
|
|
|
- Log.e(TAG, "[SetEasyModeUxUse] Exception Error");
|
|
|
- LogUtil.errorLogInfo("", TAG, e);//e.printStackTrace();
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- /**
|
|
|
- * @description
|
|
|
- * 카메라 인코딩 에러 설정
|
|
|
- * @return 인코딩 에러일 경우 true
|
|
|
- */
|
|
|
- public boolean GetCameraEncodingError() {
|
|
|
- String strRet = GetWallPADData(CAMERA_ENCODING_ERROR);
|
|
|
- if (strRet == null) {
|
|
|
- Log.d(TAG, "[GetCameraEncodingError] strRet is null !!");
|
|
|
- insertWallPADDB(CAMERA_ENCODING_ERROR, CAMERA_ENCODING_ERROR_DEFAULT);
|
|
|
- }
|
|
|
-
|
|
|
- boolean result = false;
|
|
|
- try {
|
|
|
- result = Boolean.valueOf(strRet);
|
|
|
- } catch (RuntimeException re) {
|
|
|
- LogUtil.errorLogInfo("", TAG, re);
|
|
|
- }
|
|
|
- catch (Exception e) {
|
|
|
- Log.e(TAG, "[Exception] GetCameraEncodingError()");
|
|
|
- LogUtil.errorLogInfo("", TAG, e);//e.printStackTrace();
|
|
|
- }
|
|
|
- return result;
|
|
|
- }
|
|
|
-
|
|
|
- public void SetCameraEncodingError(boolean bError)
|
|
|
- {
|
|
|
- UpdateWallPADData(CAMERA_ENCODING_ERROR, String.valueOf(bError));
|
|
|
- }
|
|
|
-}
|
|
|
+package com.artncore.WallPadDataMgr;
|
|
|
+
|
|
|
+import android.content.ComponentName;
|
|
|
+import android.content.ContentValues;
|
|
|
+import android.content.Context;
|
|
|
+import android.content.Intent;
|
|
|
+import android.content.pm.PackageManager;
|
|
|
+import android.database.Cursor;
|
|
|
+import android.database.SQLException;
|
|
|
+import android.util.Log;
|
|
|
+
|
|
|
+import com.artncore.commons.APIErrorCode;
|
|
|
+import com.artncore.commons.define;
|
|
|
+import com.artncore.wallpadimap.WallPadiMAPNotifyAPI;
|
|
|
+import com.util.LogUtil;
|
|
|
+
|
|
|
+import java.io.File;
|
|
|
+import java.util.ArrayList;
|
|
|
+import java.util.Calendar;
|
|
|
+import java.util.GregorianCalendar;
|
|
|
+import java.util.List;
|
|
|
+
|
|
|
+
|
|
|
+public class WallpadStatusData extends wallpaddbmgr {
|
|
|
+
|
|
|
+ public static final String TAG = "WallpadStatusData";
|
|
|
+
|
|
|
+ public static final String ALARM_STATUS = "ALARM_STATUS";
|
|
|
+ /** 평상시 */
|
|
|
+ public static final int ALARM_NONE = 0;
|
|
|
+ /** 알람발생 */
|
|
|
+ public static final int ALARM_ARISE = 1;
|
|
|
+ /** 알람정지 */
|
|
|
+ public static final int ALARM_STOP = 2;
|
|
|
+ /** 외출방범모드 */
|
|
|
+ public static final int GUARD_OUT = 3;
|
|
|
+ /** 재택방범 */
|
|
|
+ public static final int GUARD_IN = 4;
|
|
|
+ /** 외출방범모드 대기중 (설정진행중) */
|
|
|
+ public static final int GUARD_OUT_WAIT = 5;
|
|
|
+ /** 그냥 외출모드 - 대외향 스마트 스위치 연동 및 LH향 */
|
|
|
+ public static final int OUT_MODE = 6;
|
|
|
+ /** 취침방범 모드 - LH향 */
|
|
|
+ public static final int GUARD_BED = 7;
|
|
|
+ /** 그냥 취침모드 - LH향 */
|
|
|
+ public static final int BED_MODE = 8;
|
|
|
+
|
|
|
+ public static final String[] ALARMTEXT = {String.valueOf(ALARM_NONE),String.valueOf(ALARM_ARISE), String.valueOf(ALARM_STOP),String.valueOf(GUARD_OUT),String.valueOf(GUARD_IN),String.valueOf(GUARD_OUT_WAIT),String.valueOf(OUT_MODE),String.valueOf(GUARD_BED),String.valueOf(BED_MODE)};
|
|
|
+
|
|
|
+ public static final String ALARM_TYPE ="ALARM_TYPE";
|
|
|
+ public static final int ALARM_EMM = 1;
|
|
|
+ public static final int ALARM_ALERT = 2;
|
|
|
+ public static final int ALARM_INVADE = 3;
|
|
|
+ public static final int ALARM_EVAC = 4;
|
|
|
+ public static final int ALARM_HEATING_LEAK = 5;
|
|
|
+ public static final String[] ALARMTYPETEXT = {String.valueOf(ALARM_NONE), String.valueOf(ALARM_EMM),String.valueOf(ALARM_ALERT),String.valueOf(ALARM_INVADE),String.valueOf(ALARM_EVAC),String.valueOf(ALARM_HEATING_LEAK)};
|
|
|
+
|
|
|
+ public static final String MORNINGCALL_STATUS = "MCALL_STATUS";
|
|
|
+ public static final int MORNINGCALL_OFF = 0;
|
|
|
+ public static final int MORNINGCALL_ON = 1;
|
|
|
+ public static final String[] MORNINGCALLTEXT = {String.valueOf(MORNINGCALL_OFF),String.valueOf(MORNINGCALL_ON)};
|
|
|
+
|
|
|
+ public static final String MANAGER_PW = "MANAGER_PW";
|
|
|
+ public static final String MANAGER_PW_DEFAULT = "55554444";
|
|
|
+
|
|
|
+ public static final String USER_PW = "USER_PW";
|
|
|
+ public static final String USER_PW_DEFAULT = "0000";
|
|
|
+
|
|
|
+ public static final String WEB_CTR_PW = "WEB_CTR_PW";
|
|
|
+ public static final String WEB_CTR_PW_DEFAULT = "000000";
|
|
|
+
|
|
|
+ public static final String SUBMENU_TYPE = "SUBMENU_TYPE";
|
|
|
+ public static final int SUBMENU_TYPE1 = 0;
|
|
|
+ public static final int SUBMENU_TYPE2 = 1;
|
|
|
+ public static final String[] SUBMENUTYPETEXT = {String.valueOf(SUBMENU_TYPE1),String.valueOf(SUBMENU_TYPE2)};
|
|
|
+
|
|
|
+ public static final String PSTN_STATUS = "PSTN_STATUS";
|
|
|
+ public static final int PSTN_NOINIT = 0;
|
|
|
+ public static final int PSTN_INITSTART = 1;
|
|
|
+ public static final int PSTN_INITCMD = 2;
|
|
|
+ public static final int PSTN_INITDATA = 3;
|
|
|
+ public static final int PSTN_INITCCODE = 4;
|
|
|
+ public static final int PSTN_INITCIDSET = 5;
|
|
|
+ public static final int PSTN_VMODESET = 6;
|
|
|
+ public static final int PSTN_DTMFSET = 7;
|
|
|
+ public static final int PSTN_VRA = 8;
|
|
|
+ public static final int PSTN_VRN = 9;
|
|
|
+ public static final int PSTN_INITOK = 10;
|
|
|
+ public static final String[] PSTN_STATUSTEXT = {String.valueOf(PSTN_NOINIT),String.valueOf(PSTN_INITSTART), String.valueOf(PSTN_INITCMD), String.valueOf(PSTN_INITDATA), String.valueOf(PSTN_INITCCODE),String.valueOf(PSTN_INITCIDSET),String.valueOf(PSTN_VMODESET),String.valueOf(PSTN_DTMFSET),String.valueOf(PSTN_VRA),String.valueOf(PSTN_VRN),String.valueOf(PSTN_INITOK)};
|
|
|
+
|
|
|
+ public static final String DEV_STATUS = "DEV_STATUS";
|
|
|
+ public static final int DEV_NORMAL = 0;
|
|
|
+ public static final int DEV_BSPUPDATE = 1;
|
|
|
+ public static final int DEV_APPUPDATE = 2;
|
|
|
+ public static final int DEV_INIT = 3;
|
|
|
+ public static final String[] DEV_STATUSTEXT = {String.valueOf(DEV_NORMAL),String.valueOf(DEV_BSPUPDATE),String.valueOf(DEV_APPUPDATE),String.valueOf(DEV_INIT)};
|
|
|
+
|
|
|
+ public static final String SERVER_IP = "SERVER_IP";
|
|
|
+ public static final String SERVER_IP_DEFAULT = "10.0.1.1:10000";
|
|
|
+
|
|
|
+ public static final String GW_IP = "GWIP";
|
|
|
+ public static final String GW_IP_DEFAULT = "10.0.1.1";
|
|
|
+
|
|
|
+ public static final String SUBNET = "SUBNET";
|
|
|
+ public static final String SUBNET_DEFAULT = "255.255.0.0";
|
|
|
+
|
|
|
+ public static final String MANAGEPC_IP = "MANAGEPC_IP";
|
|
|
+ public static final String MANAGEPC_IP_DEFAULT = "10.0.1.10:10000";
|
|
|
+
|
|
|
+ public static final String FTP_IP = "FTP_IP";
|
|
|
+ public static final String FTP_IP_DEFAULT = "10.0.1.1";
|
|
|
+
|
|
|
+ public static final String APP_VER = "APP_VER";
|
|
|
+ public static final String APP_VER_DEFAULT = "2014.00.00.00";
|
|
|
+
|
|
|
+ public static final String NOTICE_VER = "NOTICE_VER";
|
|
|
+ public static final String NOTICE_VER_DEFAULT = "2014.00.00.00";
|
|
|
+
|
|
|
+ public static final String WEATHER_VER = "WEATHER_VER";
|
|
|
+ public static final String WEATHER_VER_DEFAULT = "2014.00.00.00";
|
|
|
+
|
|
|
+ public static final String WEATHER_CODE = "WEATHER_CODE";
|
|
|
+ public static final String CODE_DEFAULT = "1";
|
|
|
+
|
|
|
+ public static final String SETTING_VER = "SETTING_VER";
|
|
|
+ public static final String SETTING_VER_DEFAULT = "2014.00.00.00";
|
|
|
+
|
|
|
+ public static final String SERVER_VERSION = "SERVER_VERSION";
|
|
|
+ public static final String SERVER_VERSION_DEFAULT = "1.0";
|
|
|
+
|
|
|
+ public static final String DEV_LIGHT_CNT = "LIGHT_CNT";
|
|
|
+ public static final String LIGHTCNT_DEFAULT = "6";
|
|
|
+
|
|
|
+ public static final String DEV_GAS_CNT = "GAS_CNT";
|
|
|
+ public static final String GASCNT_DEFAULT = "0";
|
|
|
+
|
|
|
+ public static final String DOORCALLTIMEOUT = "DOORCALLTIMEOUT";
|
|
|
+ public static final String DOORCALLTIMEOUT_DEFAULT = "30";
|
|
|
+
|
|
|
+ public static final String DOORCONNECTTIMEOUT = "DOORCONNECTTIMEOUT";
|
|
|
+ public static final String DOORCONNECTTIMEOUT_DEFAULT = "60";
|
|
|
+
|
|
|
+ public static final String DEV_HEATING_CNT = "HEATING_CNT";
|
|
|
+ public static final String HEATINGCNT_DEFAULT = "0";
|
|
|
+
|
|
|
+ public static final String HEARTBEAT_PERIOD = "HEARTBEAT_PERIOD";
|
|
|
+ public static final String HEARTBEATPERIOD_DEFAULT = "30";
|
|
|
+
|
|
|
+ public static final String LAST_HEARTBEAT = "LAST_HEARTBEAT";
|
|
|
+ public static final String LAST_HEARTBEAT_DEFAULT = "2014.00.00.00.00.00";
|
|
|
+
|
|
|
+ public static final String SET_SYSTEMTIME = "SET_SYSTEMTIME";
|
|
|
+ public static final String SET_SYSTEMTIME_DEFAULT = "0";
|
|
|
+
|
|
|
+ public static final String NEWS_CNT = "NEWS_CNT";
|
|
|
+ public static final String NEWS_CNT_DEFAULT = "0";
|
|
|
+
|
|
|
+ public static final String MAINBGTYPE = "MAINBGTYPE";
|
|
|
+ public static final int MAINBG_DEFAULT = 0;
|
|
|
+ public static final int MAINBG_USER = 1;
|
|
|
+ public static final int MAINBG_WEATHER = 2;
|
|
|
+ public static final String[] MAINBGTYPE_TEXT = {String.valueOf(MAINBG_DEFAULT),String.valueOf(MAINBG_USER),String.valueOf(MAINBG_WEATHER)};
|
|
|
+
|
|
|
+ public static final String MAINBGSLIDSHOWTIME = "MAINBGSLIDSHOWTIME";
|
|
|
+ public static final String MAINBGSLIDSHOWTIMEDEFAULT = "60";
|
|
|
+
|
|
|
+ public static final String GUARD_ADDRESS = "GUARDADDR";
|
|
|
+ public static final String LOBBY_ADDRESS = "LOBBYADDR";
|
|
|
+
|
|
|
+ public static final String MORNINGCALL_TYPE = "MORNINGCALL_TYPE";
|
|
|
+ public static final int MORNINGCALL_ONCE = 0; //한번만
|
|
|
+ public static final int MORNINGCALL_WORKDAY = 1; //월~금
|
|
|
+ public static final int MORNINGCALL_EWORKDAY = 2; //월~토
|
|
|
+ public static final int MORNINGCALL_EVERYDAY = 3; //매일
|
|
|
+ public static final String[] MORNINGCALLTYPETEXT = {String.valueOf(MORNINGCALL_ONCE),String.valueOf(MORNINGCALL_WORKDAY),String.valueOf(MORNINGCALL_EWORKDAY),String.valueOf(MORNINGCALL_EVERYDAY)};
|
|
|
+
|
|
|
+ public static final String MORNINGCALL_BELLTYPE = "MORNINGCALL_BELLTYPE";
|
|
|
+ public static final int MORNINGCALL_BELL_NONE = 0;
|
|
|
+ public static final int MORNINGCALL_BELL1 = 1;
|
|
|
+ public static final int MORNINGCALL_BELL2 = 2;
|
|
|
+ public static final int MORNINGCALL_BELL3 = 3;
|
|
|
+ public static final String[] MORNINGCALL_BELLTYPETEXT = {String.valueOf(MORNINGCALL_BELL_NONE),String.valueOf(MORNINGCALL_BELL1),String.valueOf(MORNINGCALL_BELL2),String.valueOf(MORNINGCALL_BELL3)};
|
|
|
+
|
|
|
+ public static final String MORNINGCALL_RESERVE = "MORNINGCALL_RESERVE";
|
|
|
+ public static final int MCALLR_LIGHT_ON = 1;
|
|
|
+ public static final int MCALLR_VENTIL_ON = 2;
|
|
|
+ public static final int MCALLR_CURTAIN_OPEN = 4;
|
|
|
+ public static final int[] MCCommandList = {MCALLR_LIGHT_ON, MCALLR_VENTIL_ON, MCALLR_CURTAIN_OPEN};
|
|
|
+ public static final String MORNINGCALL_RESERVE_DEFAULT = "0";
|
|
|
+
|
|
|
+ public static final String ARSONOFF = "ARSONOFF";
|
|
|
+ public static final int ARSON = 1;
|
|
|
+ public static final int ARSOFF = 0;
|
|
|
+ public static final String[] ARSONOFFTEXT = {String.valueOf(ARSOFF),String.valueOf(ARSON)};
|
|
|
+
|
|
|
+ public static final int INDEX_CALL_DOORCAM_SOUND = 0;
|
|
|
+ public static final int INDEX_CALL_LOBBY_SOUND = 1;
|
|
|
+ public static final int INDEX_CALL_GUARD_SOUND = 2;
|
|
|
+ public static final int INDEX_CALL_NEIGHBOR_SOUND = 3;
|
|
|
+ public static final int INDEX_CALL_PSTN_SOUND = 4;
|
|
|
+ public static final int INDEX_CALL_DOORCAM_BRIGHTNESS = 5;
|
|
|
+ public static final int INDEX_CALL_DOORCAM_CONTRAST = 6;
|
|
|
+
|
|
|
+ public static final String DEV_SMARTLIGHT_STATUS = "SMARTLIGHTSTATUS";
|
|
|
+ public static final String SMARTLIGHT_STATUS_DEFAULT = "normal";
|
|
|
+ public static final String DEV_SMARTLIGHT_DEVICE = "SMARTLIGHTDEVICE";
|
|
|
+ public static final String SMARTLIGHT_DEVICE_DEFAULT = "null";
|
|
|
+
|
|
|
+ public static final String DEV_KNXDEVICE_STATUS = "KNXDEVICEALARMSTATUS";
|
|
|
+ public static final String KNXDEVICE_STATUS_DEFAULT = "normal";
|
|
|
+ public static final String DEV_KNXDEVICE_CAUSE = "KNXDEVICEALARMCAUSE";
|
|
|
+ public static final String KNXDEVICE_CAUSE_DEFAULT = "null";
|
|
|
+
|
|
|
+ public boolean GetARSOnoff()
|
|
|
+ {
|
|
|
+ try
|
|
|
+ {
|
|
|
+ int ret = Integer.parseInt(GetWallPADData(ARSONOFF));
|
|
|
+ return (ret==ARSON)?true:false;
|
|
|
+ }
|
|
|
+ catch (RuntimeException re) {
|
|
|
+ LogUtil.errorLogInfo("", TAG, re);
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ catch (Exception e)
|
|
|
+ {
|
|
|
+ //e.printStackTrace();
|
|
|
+ LogUtil.errorLogInfo("", TAG, e);
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ public void SetARSOnoff(boolean onoff)
|
|
|
+ {
|
|
|
+ UpdateWallPADData(ARSONOFF, ARSONOFFTEXT[onoff?ARSON:ARSOFF]);
|
|
|
+ }
|
|
|
+
|
|
|
+ public static final String CARARRIVALSND = "CARARRIVALSND";
|
|
|
+ public static final int CARARRIVALON = 1;
|
|
|
+ public static final int CARARRIVALOFF = 0;
|
|
|
+ public static final String[] CARARRIVALSNDTEXT = {String.valueOf(CARARRIVALOFF),String.valueOf(CARARRIVALON)};
|
|
|
+
|
|
|
+
|
|
|
+ // 대외향 485 스마트 스위치 연동 현장
|
|
|
+ public static final String GUARD_RELEASE_PW_INPUT = "GUARD_RELEASE_PW_INPUT";
|
|
|
+ // 외출 방범 설정
|
|
|
+ public static final String GUARD_SENSOR_CHECK = "GUARD_SENSOR_CHECK";
|
|
|
+ public static final String GUARD_BED_SENSOR_CHECK = "GUARD_BED_SENSOR_CHECK";
|
|
|
+ public static final int ENALBLE = 1;
|
|
|
+ public static final int DISABEL = 0;
|
|
|
+
|
|
|
+ // 대외향 485 스마트 스위치 연동 현장의 경우 비밀번호 입력없이 즉시 취소가 가능한 기능이 있음
|
|
|
+ // 방범 해제시 패스워드 사용여부 설정
|
|
|
+ public boolean GetUseGuardReleasePW()
|
|
|
+ {
|
|
|
+ try {
|
|
|
+
|
|
|
+ int ret = Integer.parseInt(GetWallPADData(GUARD_RELEASE_PW_INPUT));
|
|
|
+ return (ret==ENALBLE)?true:false;
|
|
|
+ }
|
|
|
+ catch (RuntimeException re) {
|
|
|
+ LogUtil.errorLogInfo("", TAG, re);
|
|
|
+ return true;
|
|
|
+ }
|
|
|
+ catch (Exception e)
|
|
|
+ {
|
|
|
+ //e.printStackTrace();
|
|
|
+ LogUtil.errorLogInfo("", TAG, e);
|
|
|
+ // 기본값 사용
|
|
|
+ return true;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ public void SetUseGuardReleasePw( boolean Use )
|
|
|
+ {
|
|
|
+ try
|
|
|
+ {
|
|
|
+ if( Use == true )UpdateWallPADData(GUARD_RELEASE_PW_INPUT, String.valueOf(ENALBLE));
|
|
|
+ else UpdateWallPADData(GUARD_RELEASE_PW_INPUT, String.valueOf(DISABEL));
|
|
|
+ }
|
|
|
+ catch (RuntimeException re) {
|
|
|
+ LogUtil.errorLogInfo("", TAG, re);
|
|
|
+ }
|
|
|
+ catch (Exception e)
|
|
|
+ {
|
|
|
+ //e.printStackTrace();
|
|
|
+ LogUtil.errorLogInfo("", TAG, e);
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ // 대외향 485 스마트 스위치 연동 현장의 경우 방범외출과 외출모드를 분리 처리함
|
|
|
+ // LH향의 경우도 동일하게 방범외출과 외출모드를 분리 처리함
|
|
|
+ // 센서 사용여부를 체크해서 외출모드로 처리할지 외출방범모드로 처리할지 구분하도록 한다.
|
|
|
+ public boolean GetUseGuardSensorCheck()
|
|
|
+ {
|
|
|
+ try {
|
|
|
+
|
|
|
+ int ret = Integer.parseInt(GetWallPADData(GUARD_SENSOR_CHECK));
|
|
|
+ return (ret==ENALBLE)?true:false;
|
|
|
+ }
|
|
|
+ catch (RuntimeException re) {
|
|
|
+ LogUtil.errorLogInfo("", TAG, re);
|
|
|
+ return true;
|
|
|
+ }
|
|
|
+ catch (Exception e)
|
|
|
+ {
|
|
|
+ //e.printStackTrace();
|
|
|
+ LogUtil.errorLogInfo("", TAG, e);
|
|
|
+ // 기본값 사용
|
|
|
+ return true;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ public void SetUseGuardSensorCheck( boolean Use )
|
|
|
+ {
|
|
|
+ try
|
|
|
+ {
|
|
|
+ if( Use == true )UpdateWallPADData(GUARD_SENSOR_CHECK, String.valueOf(ENALBLE));
|
|
|
+ else UpdateWallPADData(GUARD_SENSOR_CHECK, String.valueOf(DISABEL));
|
|
|
+ }
|
|
|
+ catch (RuntimeException re) {
|
|
|
+ LogUtil.errorLogInfo("", TAG, re);
|
|
|
+ }
|
|
|
+ catch (Exception e)
|
|
|
+ {
|
|
|
+ //e.printStackTrace();
|
|
|
+ LogUtil.errorLogInfo("", TAG, e);
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ public boolean GetCarArrivalSoundOnoff()
|
|
|
+ {
|
|
|
+ try {
|
|
|
+
|
|
|
+ int ret = Integer.parseInt(GetWallPADData(CARARRIVALSND));
|
|
|
+ return (ret==CARARRIVALON)?true:false;
|
|
|
+ }
|
|
|
+ catch (RuntimeException re) {
|
|
|
+ LogUtil.errorLogInfo("", TAG, re);
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ catch (Exception e)
|
|
|
+ {
|
|
|
+ //e.printStackTrace();
|
|
|
+ LogUtil.errorLogInfo("", TAG, e);
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ public void SetCarArrivalSoundOnoff(boolean onoff)
|
|
|
+ {
|
|
|
+ UpdateWallPADData(CARARRIVALSND, CARARRIVALSNDTEXT[onoff?CARARRIVALON:CARARRIVALOFF]);
|
|
|
+ }
|
|
|
+
|
|
|
+ public static final String ICMDONOFF = "ICMDONOFF";
|
|
|
+ public static final int ICMDON = 1;
|
|
|
+ public static final int ICMDOFF = 0;
|
|
|
+ public static final String[] ICMDONOFFTEXT = {String.valueOf(ICMDOFF),String.valueOf(ICMDON)};
|
|
|
+
|
|
|
+ public boolean GetiCMDOnoff()
|
|
|
+ {
|
|
|
+ try {
|
|
|
+ int ret = Integer.parseInt(GetWallPADData(ICMDONOFF));
|
|
|
+
|
|
|
+ return (ret==ICMDON)?true:false;
|
|
|
+ }
|
|
|
+ catch (RuntimeException re) {
|
|
|
+ LogUtil.errorLogInfo("", TAG, re);
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ catch (Exception e)
|
|
|
+ {
|
|
|
+ //e.printStackTrace();
|
|
|
+ LogUtil.errorLogInfo("", TAG, e);
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ public void SetiCMDOnoff(boolean onoff)
|
|
|
+ {
|
|
|
+ UpdateWallPADData(ICMDONOFF, ICMDONOFFTEXT[onoff?ICMDON:ICMDOFF]);
|
|
|
+ }
|
|
|
+
|
|
|
+ public static final String UPGRADESTATE = "UPGRADESTATE";
|
|
|
+ public static final int UPGRADEON = 1;
|
|
|
+ public static final int UPGRADEOFF = 0;
|
|
|
+ public static final String[] UPGRADESTATETEXT = {String.valueOf(UPGRADEOFF),String.valueOf(UPGRADEON)};
|
|
|
+ public static final String UPGRADESTATEDEFAULT = String.valueOf(UPGRADEOFF);
|
|
|
+ public boolean GetUpgradeState()
|
|
|
+ {
|
|
|
+ try {
|
|
|
+ int ret = Integer.parseInt(GetWallPADData(UPGRADESTATE));
|
|
|
+
|
|
|
+ return (ret==UPGRADEON)?true:false;
|
|
|
+ }
|
|
|
+ catch (RuntimeException re) {
|
|
|
+ LogUtil.errorLogInfo("", TAG, re);
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ catch (Exception e)
|
|
|
+ {
|
|
|
+ //e.printStackTrace();
|
|
|
+ LogUtil.errorLogInfo("", TAG, e);
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ public void SetUpgradeState(boolean onoff)
|
|
|
+ {
|
|
|
+ UpdateWallPADData(UPGRADESTATE, UPGRADESTATETEXT[onoff?UPGRADEON:UPGRADEOFF]);
|
|
|
+ }
|
|
|
+
|
|
|
+ public static final String GUIDESND = "GUIDESND";
|
|
|
+ public static final int GUIDESNDON = 1;
|
|
|
+ public static final int GUIDESNDOFF = 0;
|
|
|
+ public static final String[] GUIDESNDTEXT = {String.valueOf(GUIDESNDOFF),String.valueOf(GUIDESNDON)};
|
|
|
+
|
|
|
+ public boolean GetGUIDESNDOnoff()
|
|
|
+ {
|
|
|
+ try {
|
|
|
+ int ret = Integer.parseInt(GetWallPADData(GUIDESND));
|
|
|
+
|
|
|
+ return (ret==GUIDESNDON)?true:false;
|
|
|
+ }
|
|
|
+ catch (RuntimeException re) {
|
|
|
+ LogUtil.errorLogInfo("", TAG, re);
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ catch (Exception e)
|
|
|
+ {
|
|
|
+ //e.printStackTrace();
|
|
|
+ LogUtil.errorLogInfo("", TAG, e);
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ public void SetGUIDESNDOnoff(boolean onoff)
|
|
|
+ {
|
|
|
+ UpdateWallPADData(GUIDESND, GUIDESNDTEXT[onoff?ICMDON:ICMDOFF]);
|
|
|
+ }
|
|
|
+
|
|
|
+ public static final String NOTICECNT = "NOTICECNT";
|
|
|
+ public static final String NOTICECNTDEFAULT = String.valueOf(0);
|
|
|
+
|
|
|
+ public int GetNoticeCNT()
|
|
|
+ {
|
|
|
+ try {
|
|
|
+ int ret = Integer.parseInt(GetWallPADData(NOTICECNT));
|
|
|
+ return ret;
|
|
|
+ }
|
|
|
+ catch (RuntimeException re) {
|
|
|
+ LogUtil.errorLogInfo("", TAG, re);
|
|
|
+ return -1;
|
|
|
+ }
|
|
|
+ catch (Exception e)
|
|
|
+ {
|
|
|
+ //e.printStackTrace();
|
|
|
+ LogUtil.errorLogInfo("", TAG, e);
|
|
|
+ return -1;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ public void SetNoticeCNT(int cnt)
|
|
|
+ {
|
|
|
+ String data = String.valueOf(cnt);
|
|
|
+ UpdateWallPADData(NOTICECNT, data);
|
|
|
+ }
|
|
|
+
|
|
|
+ public static final String MEMOCNT = "MEMOCNT";
|
|
|
+ public static final String MEMOCNTDEFAULT = String.valueOf(0);
|
|
|
+
|
|
|
+ public int GetMemoCNT()
|
|
|
+ {
|
|
|
+ try
|
|
|
+ {
|
|
|
+ int ret = Integer.parseInt(GetWallPADData(MEMOCNT));
|
|
|
+ return ret;
|
|
|
+ }
|
|
|
+ catch (RuntimeException re) {
|
|
|
+ LogUtil.errorLogInfo("", TAG, re);
|
|
|
+ return 0;
|
|
|
+ }
|
|
|
+ catch (Exception e)
|
|
|
+ {
|
|
|
+ //e.printStackTrace();
|
|
|
+ LogUtil.errorLogInfo("", TAG, e);
|
|
|
+ return 0;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ public void SetMemoCNT(int cnt)
|
|
|
+ {
|
|
|
+ String data = String.valueOf(cnt);
|
|
|
+ UpdateWallPADData(MEMOCNT, data);
|
|
|
+ }
|
|
|
+
|
|
|
+ public static final String VISITORVIDEOCNT = "VISITORVIDEOCNT";
|
|
|
+ public static final String VISITORVIDEOCNT_DEFAULT = String.valueOf(0);
|
|
|
+
|
|
|
+ public int GetVisitorVideoCNT()
|
|
|
+ {
|
|
|
+ try
|
|
|
+ {
|
|
|
+ int ret = Integer.parseInt(GetWallPADData(VISITORVIDEOCNT));
|
|
|
+ return ret;
|
|
|
+ }
|
|
|
+ catch (RuntimeException re) {
|
|
|
+ LogUtil.errorLogInfo("", TAG, re);
|
|
|
+ return 0;
|
|
|
+ }
|
|
|
+ catch (Exception e)
|
|
|
+ {
|
|
|
+ //e.printStackTrace();
|
|
|
+ LogUtil.errorLogInfo("", TAG, e);
|
|
|
+ return 0;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ public void SetVisitorVideoCNT(int cnt)
|
|
|
+ {
|
|
|
+ String data = String.valueOf(cnt);
|
|
|
+ UpdateWallPADData(VISITORVIDEOCNT, data);
|
|
|
+ }
|
|
|
+
|
|
|
+ public static final String ENERGYDATA = "ENERGYDATA";
|
|
|
+ public static final String ENERGYDATADEFAULT = "NONE";
|
|
|
+
|
|
|
+ public String GetEnergyData()
|
|
|
+ {
|
|
|
+ return GetWallPADData(ENERGYDATA);
|
|
|
+ }
|
|
|
+
|
|
|
+ public void SetEnergyData(String Edata)
|
|
|
+ {
|
|
|
+ UpdateWallPADData(ENERGYDATA, Edata);
|
|
|
+ }
|
|
|
+ public static final String LASTCHECKENERGY = "LASTCHECKENERGY";
|
|
|
+ public static final String LASTCHECKENERGYDEFAULT = "00000000";
|
|
|
+
|
|
|
+ public String GetEnergyCheckDate()
|
|
|
+ {
|
|
|
+ return GetWallPADData(LASTCHECKENERGY);
|
|
|
+ }
|
|
|
+
|
|
|
+ public void SetEnergyCheckDate(String Edata)
|
|
|
+ {
|
|
|
+ UpdateWallPADData(LASTCHECKENERGY, Edata);
|
|
|
+ }
|
|
|
+
|
|
|
+ public static final String ENERGYMONDATA = "ENERGYMONDATA";
|
|
|
+ public static final String ENERGYMONDATADEFAULT = "NONE";
|
|
|
+
|
|
|
+ public String GetEnergyMonData()
|
|
|
+ {
|
|
|
+ return GetWallPADData(ENERGYMONDATA);
|
|
|
+ }
|
|
|
+
|
|
|
+ public void SetEnergyMonData(String Edata)
|
|
|
+ {
|
|
|
+ UpdateWallPADData(ENERGYMONDATA, Edata);
|
|
|
+ }
|
|
|
+ public static final String LASTCHECKMONENERGY = "LASTCHECKMONENERGY";
|
|
|
+ public static final String LASTCHECKMONENERGYDEFAULT = "00000000";
|
|
|
+
|
|
|
+ public String GetEnergyCheckMonth()
|
|
|
+ {
|
|
|
+ return GetWallPADData(LASTCHECKMONENERGY);
|
|
|
+ }
|
|
|
+
|
|
|
+ public void SetEnergyCheckMonth(String Edata)
|
|
|
+ {
|
|
|
+ UpdateWallPADData(LASTCHECKMONENERGY, Edata);
|
|
|
+ }
|
|
|
+
|
|
|
+ public static final String ELEVATORSTATUS = "ELEVATORSTATUS";
|
|
|
+ public static final String ELEVATORSTATUSDEFAULT = "0";
|
|
|
+
|
|
|
+ public int GetElevatorStatus()
|
|
|
+ {
|
|
|
+ try {
|
|
|
+ return Integer.parseInt(GetWallPADData(ELEVATORSTATUS));
|
|
|
+ }
|
|
|
+ catch (RuntimeException re) {
|
|
|
+ LogUtil.errorLogInfo("", TAG, re);
|
|
|
+ return 0;
|
|
|
+ }
|
|
|
+ catch (Exception e)
|
|
|
+ {
|
|
|
+ //e.printStackTrace();
|
|
|
+ LogUtil.errorLogInfo("", TAG, e);
|
|
|
+ return 0;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ public void SetElevatorStatus(int Edata)
|
|
|
+ {
|
|
|
+ UpdateWallPADData(ELEVATORSTATUS, String.valueOf(Edata));
|
|
|
+ }
|
|
|
+
|
|
|
+ public static final String ELEVATORCALLUP = "ELEVATORCALLUP";
|
|
|
+ public static final String ELEVATORCALLUPDEFAULT = "0";
|
|
|
+
|
|
|
+ public void SetElevatorCallUpTime()
|
|
|
+ {
|
|
|
+ UpdateWallPADData(ELEVATORCALLUP, String.valueOf(System.currentTimeMillis()));
|
|
|
+ }
|
|
|
+
|
|
|
+ public void FreeElevatorCallUpTime()
|
|
|
+ {
|
|
|
+ UpdateWallPADData(ELEVATORCALLUP, ELEVATORCALLUPDEFAULT);
|
|
|
+ }
|
|
|
+
|
|
|
+ public long GetElevatorCallUpTime()
|
|
|
+ {
|
|
|
+ try {
|
|
|
+ return Long.parseLong(GetWallPADData(ELEVATORCALLUP));
|
|
|
+ }
|
|
|
+ catch (RuntimeException re) {
|
|
|
+ LogUtil.errorLogInfo("", TAG, re);
|
|
|
+ return 0;
|
|
|
+ }
|
|
|
+ catch (Exception e)
|
|
|
+ {
|
|
|
+ //e.printStackTrace();
|
|
|
+ LogUtil.errorLogInfo("", TAG, e);
|
|
|
+ return 0;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ public static final String ELEVATORCALLDN = "ELEVATORCALLDN";
|
|
|
+ public static final String ELEVATORCALLDNDEFAULT = "0";
|
|
|
+
|
|
|
+ public void SetElevatorCallDnTime()
|
|
|
+ {
|
|
|
+ UpdateWallPADData(ELEVATORCALLDN, String.valueOf(System.currentTimeMillis()));
|
|
|
+ }
|
|
|
+
|
|
|
+ public void FreeElevatorCallDnTime()
|
|
|
+ {
|
|
|
+ UpdateWallPADData(ELEVATORCALLDN, ELEVATORCALLDNDEFAULT);
|
|
|
+ }
|
|
|
+
|
|
|
+ public long GetElevatorCallDnTime()
|
|
|
+ {
|
|
|
+ try {
|
|
|
+ return Long.parseLong(GetWallPADData(ELEVATORCALLDN));
|
|
|
+ }
|
|
|
+ catch (RuntimeException re) {
|
|
|
+ LogUtil.errorLogInfo("", TAG, re);
|
|
|
+ return 0;
|
|
|
+ }
|
|
|
+ catch (Exception e)
|
|
|
+ {
|
|
|
+ //e.printStackTrace();
|
|
|
+ LogUtil.errorLogInfo("", TAG, e);
|
|
|
+ return 0;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ public static final String POSTCNT = "POSTCNT";
|
|
|
+ public static final String POSTCNTDEFAULT = "0";
|
|
|
+
|
|
|
+ public void SetPostCNT(int cnt)
|
|
|
+ {
|
|
|
+ UpdateWallPADData(POSTCNT, String.valueOf(cnt));
|
|
|
+ }
|
|
|
+
|
|
|
+ public int GetPostCNT()
|
|
|
+ {
|
|
|
+ try {
|
|
|
+ return Integer.parseInt(GetWallPADData(POSTCNT));
|
|
|
+ }
|
|
|
+ catch (RuntimeException re) {
|
|
|
+ LogUtil.errorLogInfo("", TAG, re);
|
|
|
+ return 0;
|
|
|
+ }
|
|
|
+ catch (Exception e)
|
|
|
+ {
|
|
|
+ //e.printStackTrace();
|
|
|
+ LogUtil.errorLogInfo("", TAG, e);
|
|
|
+ return 0;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ public static final String PARCELCNT = "PARCELCNT";
|
|
|
+ public static final String PARCELCNTDEFAULT = "0";
|
|
|
+
|
|
|
+ public void SetParcelCNT(int cnt)
|
|
|
+ {
|
|
|
+ UpdateWallPADData(PARCELCNT, String.valueOf(cnt));
|
|
|
+ }
|
|
|
+
|
|
|
+ public int GetParcelCNT()
|
|
|
+ {
|
|
|
+ try {
|
|
|
+ return Integer.parseInt(GetWallPADData(PARCELCNT));
|
|
|
+ }
|
|
|
+ catch (RuntimeException re) {
|
|
|
+ LogUtil.errorLogInfo("", TAG, re);
|
|
|
+ return 0;
|
|
|
+ }
|
|
|
+ catch (Exception e)
|
|
|
+ {
|
|
|
+ //e.printStackTrace();
|
|
|
+ LogUtil.errorLogInfo("", TAG, e);
|
|
|
+ return 0;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ public static final String RESETSCHEDULE = "RESETSCHEDULE";
|
|
|
+ public static final int RESET_WEEK = 1000;
|
|
|
+ public static final int RESET_MONTH = 1001;
|
|
|
+ public static final int RESET_FREE = 1002;
|
|
|
+ public static final String RESETSCHEDULEDEFAULT = "NONE;0;0";
|
|
|
+
|
|
|
+ public String[] GetResetSchedule()
|
|
|
+ {
|
|
|
+ return GetWallPADData(RESETSCHEDULE).split(define.DEVCTR_CMD_SPLITER);
|
|
|
+ }
|
|
|
+
|
|
|
+ public boolean SetResetSchedule(int type, int date, int time)
|
|
|
+ {
|
|
|
+ if (type == RESET_WEEK && (date < 0 || date >6))
|
|
|
+ return false;
|
|
|
+ if (type == RESET_MONTH && (date <1 || 28 < date))
|
|
|
+ return false;
|
|
|
+ if ((type != RESET_FREE) && time < 0 || time >23) return false;
|
|
|
+ String SetVal;
|
|
|
+ if (type == RESET_FREE) SetVal = RESETSCHEDULEDEFAULT;
|
|
|
+ else SetVal = type+define.DEVCTR_CMD_SPLITER+date+define.DEVCTR_CMD_SPLITER+time;
|
|
|
+ UpdateWallPADData(RESETSCHEDULE,SetVal);
|
|
|
+ return true;
|
|
|
+ }
|
|
|
+
|
|
|
+ public static final String SETSYSTEMUPDATE = "SETSYSTEMUPDATE";
|
|
|
+ public static final String SETSYSTEMUPDATEDEFAULT = "NONE;0;0";
|
|
|
+
|
|
|
+ public void SetSystemUpdate(String BSPfule, String APPFile)
|
|
|
+ {
|
|
|
+ String datafile;
|
|
|
+ if (BSPfule== null && APPFile == null)
|
|
|
+ {
|
|
|
+ datafile = SETSYSTEMUPDATEDEFAULT;
|
|
|
+ }
|
|
|
+ else {
|
|
|
+ datafile = "SET;";
|
|
|
+ datafile+=(BSPfule==null)?"no":BSPfule;
|
|
|
+ datafile+=";";
|
|
|
+ datafile+=(APPFile==null)?"no":APPFile;
|
|
|
+ }
|
|
|
+ UpdateWallPADData(SETSYSTEMUPDATE,datafile);
|
|
|
+ }
|
|
|
+
|
|
|
+ public String[] GetSystemUpdateStatus()
|
|
|
+ {
|
|
|
+ return GetWallPADData(SETSYSTEMUPDATE).split(define.DEVCTR_CMD_SPLITER);
|
|
|
+ }
|
|
|
+
|
|
|
+ public static final String LASTTIMESYNC = "LASTTIMESYNC";
|
|
|
+ public static final String LASTTIMESYNCDEFAULT = "0";
|
|
|
+
|
|
|
+ public void SetLastTimeSyncDate(int date)
|
|
|
+ {
|
|
|
+ UpdateWallPADData(LASTTIMESYNC,String.valueOf(date));
|
|
|
+ }
|
|
|
+
|
|
|
+ public int GetLastTimeSyncDate()
|
|
|
+ {
|
|
|
+ try {
|
|
|
+ return Integer.parseInt(GetWallPADData(LASTTIMESYNC));
|
|
|
+ }
|
|
|
+ catch (RuntimeException re) {
|
|
|
+ LogUtil.errorLogInfo("", TAG, re);
|
|
|
+ return 0;
|
|
|
+ }
|
|
|
+ catch (Exception e)
|
|
|
+ {
|
|
|
+ //e.printStackTrace();
|
|
|
+ LogUtil.errorLogInfo("", TAG, e);
|
|
|
+ return 0;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ public static final String EMMLIGHTSTATUS = "EMMLIGHTSTATUS";
|
|
|
+ public static final int EMMLIGHTON = 1;
|
|
|
+ public static final int EMMLIGHTOFF = 0;
|
|
|
+ public static final String EMMLIGHTSTATUSDEFAULT = String.valueOf(EMMLIGHTOFF);
|
|
|
+
|
|
|
+
|
|
|
+ public void SetEmmLightStatus(boolean status)
|
|
|
+ {
|
|
|
+ UpdateWallPADData(EMMLIGHTSTATUS,String.valueOf(status?EMMLIGHTON:EMMLIGHTOFF));
|
|
|
+ }
|
|
|
+
|
|
|
+ public int GetEmmLightStatus()
|
|
|
+ {
|
|
|
+ try {
|
|
|
+ return Integer.parseInt(GetWallPADData(EMMLIGHTSTATUS));
|
|
|
+ }
|
|
|
+ catch (RuntimeException re) {
|
|
|
+ LogUtil.errorLogInfo("", TAG, re);
|
|
|
+ return 0;
|
|
|
+ }
|
|
|
+ catch (Exception e)
|
|
|
+ {
|
|
|
+ //e.printStackTrace();
|
|
|
+ LogUtil.errorLogInfo("", TAG, e);
|
|
|
+ return 0;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ /////////////////////////////////////////////////////////////////////////////////////////////////////////
|
|
|
+ ////////////////////////////////////// icontrols /////////////////////////////////////////////////////
|
|
|
+ public static final String OUTMODE_WAITTIME = "OUTMODE_WAITTIME";
|
|
|
+ public static final String OUTMODE_WAITTIME_DEFAULT = "30";
|
|
|
+
|
|
|
+ public static final String COMEBACK_WAITTIME = "COMEBACK_WAITTIME";
|
|
|
+ public static final String COMEBACK_WAITTIME_DEFAULT = "30";
|
|
|
+
|
|
|
+ public static final String OUTMODE_LINK_DEVICE = "OUTMODE_LINKDEVICE";
|
|
|
+ public static final String INMODE_LINK_DEVICE = "INMODE_LINKDEVICE";
|
|
|
+
|
|
|
+ public static final String IN_BED_LINK_DEVICE = "IN_BED_LINK_DEVICE";
|
|
|
+ public static final String OUT_BED_LINK_DEVICE = "OUT_BED_LINK_DEVICE";
|
|
|
+
|
|
|
+ public static final String CALL_APK_STATUS = "CALL_APK_STATUS";
|
|
|
+ public static final String GLOBALSCREEN_APK_RUN = "GLOBALSCREEN_APK_RUN";
|
|
|
+ public static final String REMOTECALL_USER_POPUP_RUN = "REMOTECALL_USER_POPUP_RUN";
|
|
|
+ public static final String CALL_STATUS = "CALL_STATUS";
|
|
|
+
|
|
|
+ public static final String SOUND_OUTPUT_EVENT_ALARM = "EVENT_ALARM_SOUND";
|
|
|
+ public static final String SOUND_OUTPUT_CAR_ALARM = "CAR_ALARM_SOUND";
|
|
|
+ public static final String SOUND_OUTPUT_CALL_ALARM = "CALL_ALARM_SOUND";
|
|
|
+ public static final String SOUND_OUTPUT_BAND_LOCATION = "BAND_LOCATION_ALARM_SOUND";
|
|
|
+
|
|
|
+ /** 스마트키 감지시 알람 (사운드 및 토스트메시지) */
|
|
|
+ public static final String SMARTKEY_DETECTION_ALARM = "SMARTKEY_DETECTION_ALARM";
|
|
|
+
|
|
|
+ /** 환기 예약 ON/OFF */
|
|
|
+ public static final String VEN_RESERVE_ONOFF = "VEN_RESERVE_ONOFF";
|
|
|
+
|
|
|
+ public static final String LED_BUTTON_BRIGHTNESS_LEVEL = "LED_BUTTON_BRIGHTNESS_LEVEL"; //GLE 모델 LED 버튼 밝기 조절
|
|
|
+ public static final String LED_BUTTON_BRIGHTNESS_LEVEL_DEFAULT = "2";
|
|
|
+
|
|
|
+ public static final String MODE_LAMP_BR_LEVEL = "MODE_LAMP_BR_LEVEL";
|
|
|
+ public static final String MODE_LAMP_BR_LEVEL_DEFAULT = "4";
|
|
|
+
|
|
|
+ public static final String WALLPAD_MASTER_VOLUME = "WALLPAD_MASTER_VOLUME";
|
|
|
+ public static final String WALLPAD_MASTER_VOLUME_DEFAULT ="8";
|
|
|
+
|
|
|
+
|
|
|
+ public static final String BLACK_OUT_ENERGY = "BLACK_OUT_ENERGY"; // 정전 APU 감지시
|
|
|
+
|
|
|
+ public static final String MAIN_SELECTED_SCREEN = "MAIN_SELECTED_SCREEN"; // 메인 스크린 3가지 ( 즐겨찾기 , 메인, 에너지관리 )
|
|
|
+ public static final int MAIN_DEFAULT_SCREEN = 0;
|
|
|
+ public static final int MAIN_BOOKMARK_SCREEN = 1;
|
|
|
+ public static final int MAIN_ENERGY_SCREEN = 2;
|
|
|
+
|
|
|
+ public static final String MOOD_LAMP_STATE = "MOOD_LAMP_STATE";
|
|
|
+
|
|
|
+
|
|
|
+ public static final String ARS_CONTROL_DEVICE = "ARS_CONTROL_DEVICE";
|
|
|
+ public static final String REMOTE_CONTROLS_DEVICE = "REMOTE_CONTROLS_DEVICE";
|
|
|
+
|
|
|
+ //전자액자 시작
|
|
|
+ List<String> AutoPicturefilesList = new ArrayList<String>();
|
|
|
+
|
|
|
+ public static final String AUTOPICTURE_SET_INDEX = "AUTOPICTURE_SET_INDEX";
|
|
|
+ public static final String AUTOPICTURE_SET_INDEX_DEFAULT = "0";
|
|
|
+
|
|
|
+ public static final String AUTOPICTURE_START_TIME_HOUR_INDEX = "AUTOPICTURE_START_TIME_HOUR_INDEX";
|
|
|
+ public static final String AUTOPICTURE_START_TIME_HOUR_INDEX_DEFAULT = "18";
|
|
|
+
|
|
|
+ public static final String AUTOPICTURE_START_TIME_MIN_INDEX = "AUTOPICTURE_START_TIME_MIN_INDEX";
|
|
|
+ public static final String AUTOPICTURE_START_TIME_MIN_INDEX_DEFAULT = "0";
|
|
|
+
|
|
|
+ public static final String AUTOPICTURE_END_TIME_HOUR_INDEX = "AUTOPICTURE_END_TIME_HOUR_INDEX";
|
|
|
+ public static final String AUTOPICTURE_END_TIME_HOUR_INDEX_DEFAULT = "22";
|
|
|
+
|
|
|
+ public static final String AUTOPICTURE_END_TIME_MIN_INDEX = "AUTOPICTURE_END_TIME_MIN_INDEX";
|
|
|
+ public static final String AUTOPICTURE_END_TIME_MIN_INDEX_DEFAULT = "0";
|
|
|
+
|
|
|
+ public static final String AUTOPICTURE_SLIDE_INTERVAL_INDEX = "AUTOPICTURE_SLIDE_INTERVAL_INDEX";
|
|
|
+ public static final String AUTOPICTURE_SLIDE_INTERVAL_INDEX_DEFAULT = "0";
|
|
|
+
|
|
|
+ public static final String AUTOPICTURE_ANIMATION_INDEX = "AUTOPICTURE_ANIMATION_INDEX";
|
|
|
+ public static final String AUTOPICTURE_ANIMATION_INDEX_DEFAULT = "0";
|
|
|
+
|
|
|
+ //전자액자 끝
|
|
|
+
|
|
|
+ /** 안심통화 **/
|
|
|
+ public static final String RELIEFCALL_DEGREE = "RELIEFCALL_DEGREE";
|
|
|
+ public static final String RELIEFCALL_DEGREE_DEFAULT_VALUE = "1:4:7:10";
|
|
|
+
|
|
|
+ /** 방문객원격통화 **/
|
|
|
+ public static final String REMOTECALL_REGISTRATION = "REMOTECALL_REGISTRATION";
|
|
|
+ public static final String REMOTECALL_REGISTRATION_DEFAULT_VALUE = "false";
|
|
|
+ public static final String REMOTECALL_USERCNT = "REMOTECALL_USERCNT";
|
|
|
+ public static final String REMOTECALL_USERCNT_DEFAULT_VALUE = "0";
|
|
|
+
|
|
|
+ /** 스마트현관카메라 거동수상자 녹화 설정 관련 **/
|
|
|
+ public static final String SMARTIOT_RECORDING_STRANGER_ONOFF = "SMARTIOT_RECORDING_STRANGER_ONOFF";
|
|
|
+ public static final String SMARTIOT_RECORDING_STRANGER_ONOFF_USE_DEFAULT = "false";
|
|
|
+ public static final String SMARTIOT_TAKINGPIC_STRANGER_ONOFF = "SMARTIOT_TAKINGPIC_STRANGER_ONOFF";
|
|
|
+ public static final String SMARTIOT_TAKINGPIC_STRANGER_ONOFF_USE_DEFAULT = "true";
|
|
|
+ public static final String SMARTIOT_CAM_BRIGHTNESS = "SMARTIOT_CAM_BRIGHTNESS";
|
|
|
+ public static final String SMARTIOT_CAM_BRIGHTNESS_VALUE_DEFAULT = "5";
|
|
|
+ public static final String SMARTIOT_RECORD_TIME = "SMARTIOT_RECORD_TIME";
|
|
|
+ public static final String SMARTIOT_RECORD_TIME_VALUE_DEFAULT = "30";
|
|
|
+ public static final String SMARTIOT_SENSOR_SENSITIVITY = "SMARTIOT_SENSOR_SENSITIVITY";
|
|
|
+ public static final String SMARTIOT_SENSOR_SENSITIVITY_VALUE_DEFAULT = "5";
|
|
|
+ public static final String SMARTIOT_SENSOR_DURATION = "SMARTIOT_SENSOR_DURATION";
|
|
|
+ public static final String SMARTIOT_SENSOR_DURATION_VALUE_DEFAULT = "30";
|
|
|
+ public static final String SMARTIOT_SENSOR_PERIOD = "SMARTIOT_SENSOR_PERIOD";
|
|
|
+ public static final String SMARTIOT_SENSOR_PERIOD_VALUE_DEFAULT = "15";
|
|
|
+
|
|
|
+ // 간편모드UX 관련
|
|
|
+ public static final String EASYMODE_UX_USE = "EASYMODE_UX_USE";
|
|
|
+ public static final String EASYMODE_UX_USE_DEFAULT = "false";
|
|
|
+ public static final String EASYMODE_UX_SUPPORT = "EASYMODE_UX_SUPPORT";
|
|
|
+ public static final String EASYMODE_UX_USE_SUPPORT_DEFAULT = "false";
|
|
|
+
|
|
|
+ //원격검침 정보 시작
|
|
|
+ public static final String REMOTE_METERING_EMS_ENABLE = "REMOTE_METERING_EMS_ENABLE_DEFAULT";
|
|
|
+ public static final String REMOTE_METERING_EMS_ENABLE_DEFAULT = "true"; //false면 EMS 사용안함, true이면 EMS 사용함
|
|
|
+
|
|
|
+ public static final String REMOTE_METERING_NUMBER_OF_KIND = "REMOTE_METERING_NUMBER_OF_KIND_DEFAULT";
|
|
|
+ public static final String REMOTE_METERING_NUMBER_OF_KIND_DEFAULT = "5";
|
|
|
+
|
|
|
+ //원격검침 - 목표량 저장 시작
|
|
|
+ public static final String REMOTE_METERING_TARGET_VALUE_ELECT = "REMOTE_METERING_TARGET_VALUE_ELECT_DEFAULT";
|
|
|
+ public static final String REMOTE_METERING_TARGET_VALUE_ELECT_DEFAULT = "300";
|
|
|
+
|
|
|
+ public static final String REMOTE_METERING_TARGET_VALUE_WATER = "REMOTE_METERING_TARGET_VALUE_WATER_DEFAULT";
|
|
|
+ public static final String REMOTE_METERING_TARGET_VALUE_WATER_DEFAULT = "25";
|
|
|
+
|
|
|
+ public static final String REMOTE_METERING_TARGET_VALUE_GAS = "REMOTE_METERING_TARGET_VALUE_GAS_DEFAULT";
|
|
|
+ public static final String REMOTE_METERING_TARGET_VALUE_GAS_DEFAULT = "7";
|
|
|
+
|
|
|
+ public static final String REMOTE_METERING_TARGET_VALUE_HOTWATER = "REMOTE_METERING_TARGET_VALUE_HOTWATER_DEFAULT";
|
|
|
+ public static final String REMOTE_METERING_TARGET_VALUE_HOTWATER_DEFAULT = "4";
|
|
|
+
|
|
|
+ public static final String REMOTE_METERING_TARGET_VALUE_HEATING = "REMOTE_METERING_TARGET_VALUE_HEATING_DEFAULT";
|
|
|
+ public static final String REMOTE_METERING_TARGET_VALUE_HEATING_DEFAULT = "1.5";
|
|
|
+
|
|
|
+ public static final String REMOTE_METERING_TARGET_VALUE_CARBON = "REMOTE_METERING_TARGET_VALUE_CARBON_DEFAULT";
|
|
|
+ public static final String REMOTE_METERING_TARGET_VALUE_CARBON_DEFAULT = "0";
|
|
|
+ //원격검침 - 목표량 저장 끝
|
|
|
+
|
|
|
+ //원격검침 정보 끝
|
|
|
+
|
|
|
+ //에너지관리서버의 검침일 설정 - 검침일 or 말일 두가지 중 하나 선택 가능
|
|
|
+ public static final String REMOTE_METERING_BASE_DATE_LASTDAY_USE = "REMOTE_METERING_BASE_DATE_LASTDAY_USE_DEFAULT";
|
|
|
+ public static final String REMOTE_METERING_BASE_DATE_LASTDAY_USE_DEFAULT = "false"; //false면 검침일 사용, true이면 말일 사용함
|
|
|
+ //에너지관리서버 연동 시 목표량 대비 사용량 알림 여부
|
|
|
+ public static final String REMOTE_METERING_ALARM_USE = "REMOTE_METERING_ALARM_USE_DEFAULT";
|
|
|
+ public static final String REMOTE_METERING_ALARM_USE_DEFAULT = "false";
|
|
|
+ //에너지관리서버 연동 - 사용량 알림 시간 설정
|
|
|
+ public static final String REMOTE_METERING_ALARM_TIME = "REMOTE_METERING_ALARM_TIME";
|
|
|
+ public static final String REMOTE_METERING_ALARM_TIME_DEFAULT = "12";
|
|
|
+
|
|
|
+ /** 통화 음량 및 현관카메라 밝기/대비 **/
|
|
|
+ //현관 통화 음량
|
|
|
+ public static final String CALL_DOORCAM_SOUND_VALUE = "CALL_DOORCAM_SOUND_VALUE";
|
|
|
+ public static final String CALL_DOORCAM_SOUND_VALUE_DEFAULT = "5";
|
|
|
+
|
|
|
+ //로비 통화 음량
|
|
|
+ public static final String CALL_LOBBY_SOUND_VALUE = "CALL_LOBBY_SOUND_VALUE";
|
|
|
+ public static final String CALL_LOBBY_SOUND_VALUE_DEFAULT = "5";
|
|
|
+
|
|
|
+ //경비 통화 음량
|
|
|
+ public static final String CALL_GUARD_SOUND_VALUE = "CALL_GUARD_SOUND_VALUE";
|
|
|
+ public static final String CALL_GUARD_SOUND_VALUE_DEFAULT = "5";
|
|
|
+
|
|
|
+ //이웃 통화 음량
|
|
|
+ public static final String CALL_NEIGHBOR_SOUND_VALUE = "CALL_NEIGHBOR_SOUND_VALUE";
|
|
|
+ public static final String CALL_NEIGHBOR_SOUND_VALUE_DEFAULT = "5";
|
|
|
+
|
|
|
+ //국선 통화 음량
|
|
|
+ public static final String CALL_PSTN_SOUND_VALUE = "CALL_PSTN_SOUND_VALUE";
|
|
|
+ public static final String CALL_PSTN_SOUND_VALUE_DEFAULT = "5";
|
|
|
+
|
|
|
+ //현관 카메라 밝기(Brightness)
|
|
|
+ public static final String CALL_DOORCAM_BRIGHTNESS_VALUE = "CALL_DOORCAM_BRIGHTNESS_VALUE";
|
|
|
+ public static final String CALL_DOORCAM_BRIGHTNESS_VALUE_DEFAULT = "5";
|
|
|
+
|
|
|
+ //현관 카메라 대비(Contrast)
|
|
|
+ public static final String CALL_DOORCAM_CONTRAST_VALUE = "CALL_DOORCAM_CONTRAST_VALUE";
|
|
|
+ public static final String CALL_DOORCAM_CONTRAST_VALUE_DEFAULT = "5";
|
|
|
+
|
|
|
+ //엘리베이터 위젯 복구용
|
|
|
+ public static final String ELEVATOR_WIDGET_RESTORE = "ELEVATOR_WIDGET_RESTORE";
|
|
|
+ public static final String ELEVATOR_WIDGET_RESTORE_VALUE_DEFAULT = "false";
|
|
|
+
|
|
|
+ //환기 욕실배기 기능 연동기능
|
|
|
+ public static final String VENTI_BATHROOM = "VENTI_BATHROOM";
|
|
|
+ public static final String VENTI_BATHROOM_VALUE_DEFAULT = "true";
|
|
|
+
|
|
|
+ //거실 조명 그룹설정
|
|
|
+ public static final String LIVING_LIGHT_GROUP = "LIVING_LIGHT_GROUP";
|
|
|
+ public static final String LIVING_LIGHT_GROUP_VALUE_DEFAULT = "1:1:1";
|
|
|
+
|
|
|
+ //현산향 게이트웨이 command
|
|
|
+ public static final String DB_WALLPAD_IGW_COMMAND_COUNT = "DB_WALLPAD_REBOOTING_COUNT";
|
|
|
+
|
|
|
+ //메인월패드 난방 방 개수
|
|
|
+ public static final String DB_WALLPAD_HEATING_ROOM_NUM = "DB_WALLPAD_HEATING_ROOM_NUM";
|
|
|
+
|
|
|
+ //근접 센서 민감도
|
|
|
+ public static final String CLOSE_SENSOR_VALUE = "CLOSE_SENSOR_VALUE";
|
|
|
+ public static final String CLOSE_SENSOR_VALUE_DEFAULT = "5";
|
|
|
+
|
|
|
+ //현재 화면 번호
|
|
|
+ public static final String CURRENT_SCREEN_ID_VALUE = "CURRENT_SCREEN_ID_VALUE";
|
|
|
+ public static final String CURRENT_SCREEN_ID_VALUE_DEFAULT = "0";
|
|
|
+
|
|
|
+ // 스마트분전반 현재/월누적 선택값 저장
|
|
|
+ public static final String NOW_MONTH_SELECT = "NOW_MONTH_SELECT";
|
|
|
+ public static final String NOW_MONTH_SELECT_DEFAULT = "NOW";
|
|
|
+
|
|
|
+ // 실시간검침기 전력 - 누적전력사용량 저장
|
|
|
+ public static final String REALTIMEMETER__ELEC_ACC = "REALTIMEMETER__ELEC_ACC";
|
|
|
+
|
|
|
+ // 메인화면 GUI 선택
|
|
|
+ public static final String MAIN_GUI_SELECT = "MAIN_GUI_SELECT";
|
|
|
+ public static final String MAIN_GUI_SELECT_DEFAULT = "BASIC";
|
|
|
+
|
|
|
+ // 거실조명 모드제어 설정값 (Preset)
|
|
|
+ // "조명1전원:디밍:색온도/조명2전원:디밍:색온도 ~ 조명8전원:디밍:색온도"
|
|
|
+ // 그룹제어시에는 조명1의 값만 사용한다. (조명전원 : on/off/none(don't care), 디밍/색온도 : 1 ~ 10, 미설정시 0)
|
|
|
+ public static final String LIVINGLIGHT_PRESET_00 = "LIVINGLIGHT_PRESET_00";
|
|
|
+ public static final String LIVINGLIGHT_PRESET_00_VALUE_DEFAULT = "none:0:0/none:0:0/none:0:0/none:0:0/none:0:0/none:0:0/none:0:0/none:0:0/none:0:0"; // "그룹전원:그룹디밍:그룹색온도/조명1전원:디밍:색온도/조명2전원:디밍:색온도 ~ 조명8전원:디밍:색온도"
|
|
|
+ public static final String LIVINGLIGHT_PRESET_01 = "LIVINGLIGHT_PRESET_01";
|
|
|
+ public static final String LIVINGLIGHT_PRESET_01_VALUE_DEFAULT = "none:0:0/none:0:0/none:0:0/none:0:0/none:0:0/none:0:0/none:0:0/none:0:0/none:0:0"; // "그룹전원:그룹디밍:그룹색온도/조명1전원:디밍:색온도/조명2전원:디밍:색온도 ~ 조명8전원:디밍:색온도"
|
|
|
+ public static final String LIVINGLIGHT_PRESET_02 = "LIVINGLIGHT_PRESET_02";
|
|
|
+ public static final String LIVINGLIGHT_PRESET_02_VALUE_DEFAULT = "none:0:0/none:0:0/none:0:0/none:0:0/none:0:0/none:0:0/none:0:0/none:0:0/none:0:0"; // "그룹전원:그룹디밍:그룹색온도/조명1전원:디밍:색온도/조명2전원:디밍:색온도 ~ 조명8전원:디밍:색온도"
|
|
|
+ public static final String LIVINGLIGHT_PRESET_03 = "LIVINGLIGHT_PRESET_03";
|
|
|
+ public static final String LIVINGLIGHT_PRESET_03_VALUE_DEFAULT = "none:0:0/none:0:0/none:0:0/none:0:0/none:0:0/none:0:0/none:0:0/none:0:0/none:0:0"; // "그룹전원:그룹디밍:그룹색온도/조명1전원:디밍:색온도/조명2전원:디밍:색온도 ~ 조명8전원:디밍:색온도"
|
|
|
+ public static final String LIVINGLIGHT_PRESET_04 = "LIVINGLIGHT_PRESET_04";
|
|
|
+ public static final String LIVINGLIGHT_PRESET_04_VALUE_DEFAULT = "none:0:0/none:0:0/none:0:0/none:0:0/none:0:0/none:0:0/none:0:0/none:0:0/none:0:0"; // "그룹전원:그룹디밍:그룹색온도/조명1전원:디밍:색온도/조명2전원:디밍:색온도 ~ 조명8전원:디밍:색온도"
|
|
|
+ public static final String LIVINGLIGHT_PRESET_05 = "LIVINGLIGHT_PRESET_05";
|
|
|
+ public static final String LIVINGLIGHT_PRESET_05_VALUE_DEFAULT = "none:0:0/none:0:0/none:0:0/none:0:0/none:0:0/none:0:0/none:0:0/none:0:0/none:0:0"; // "그룹전원:그룹디밍:그룹색온도/조명1전원:디밍:색온도/조명2전원:디밍:색온도 ~ 조명8전원:디밍:색온도"
|
|
|
+ public static final String LIVINGLIGHT_PRESET_06 = "LIVINGLIGHT_PRESET_06";
|
|
|
+ public static final String LIVINGLIGHT_PRESET_06_VALUE_DEFAULT = "none:0:0/none:0:0/none:0:0/none:0:0/none:0:0/none:0:0/none:0:0/none:0:0/none:0:0"; // "그룹전원:그룹디밍:그룹색온도/조명1전원:디밍:색온도/조명2전원:디밍:색온도 ~ 조명8전원:디밍:색온도"
|
|
|
+ public static final String LIVINGLIGHT_PRESET_07 = "LIVINGLIGHT_PRESET_07";
|
|
|
+ public static final String LIVINGLIGHT_PRESET_07_VALUE_DEFAULT = "none:0:0/none:0:0/none:0:0/none:0:0/none:0:0/none:0:0/none:0:0/none:0:0/none:0:0"; // "그룹전원:그룹디밍:그룹색온도/조명1전원:디밍:색온도/조명2전원:디밍:색온도 ~ 조명8전원:디밍:색온도"
|
|
|
+ public static final String LIVINGLIGHT_PRESET_08 = "LIVINGLIGHT_PRESET_08";
|
|
|
+ public static final String LIVINGLIGHT_PRESET_08_VALUE_DEFAULT = "none:0:0/none:0:0/none:0:0/none:0:0/none:0:0/none:0:0/none:0:0/none:0:0/none:0:0"; // "그룹전원:그룹디밍:그룹색온도/조명1전원:디밍:색온도/조명2전원:디밍:색온도 ~ 조명8전원:디밍:색온도"
|
|
|
+
|
|
|
+ // 층간소음 팝업 발생
|
|
|
+ public static final String INTERLAYER_NOISE_POPUP_USE = "INTERLAYER_NOISE_POPUP_USE";
|
|
|
+ public static final String INTERLAYER_NOISE_POPUP_USE_DEFAULT = "false";
|
|
|
+
|
|
|
+ // 층간소음 장비 상태
|
|
|
+ public static final String INTERLAYER_NOISE_SENSOR_STATUS = "INTERLAYER_NOISE_SENSOR_STATUS";
|
|
|
+ public static final String INTERLAYER_NOISE_SENSOR_STATUS_DEFAULT = "NORMAL";
|
|
|
+
|
|
|
+ // 멀티스위치 콘센트 사용여부
|
|
|
+ public static final String MULTISWITCH_CONCENT_USE = "MULTISWITCH_CONCENT_USE";
|
|
|
+ public static final String MULTISWITCH_CONCENT_USE_DEFAULT = "false";
|
|
|
+
|
|
|
+ // 웰컴조명 - 거실등,복도등,주방등 선택유무
|
|
|
+ public static final String WELCOMELIGHT_SELECT_ITEMS = "WELCOMELIGHT_SELECT_ITEMS";
|
|
|
+ public static final String WELCOMELIGHT_SELECT_ITEMS_DEFAULT = "0/0/0";
|
|
|
+
|
|
|
+ // 재실센서 시나리오-기본모드1 사용여부
|
|
|
+ public static final String INROOMDETECT_SCENARIO_NORMAL1 = "INROOMDETECT_SCENARIO_NORMAL1";
|
|
|
+ public static final String INROOMDETECT_SCENARIO_NORMAL1_DEFAULT = "false";
|
|
|
+
|
|
|
+ // 재실센서 시나리오-기본모드2 사용여부
|
|
|
+ public static final String INROOMDETECT_SCENARIO_NORMAL2 = "INROOMDETECT_SCENARIO_NORMAL2";
|
|
|
+ public static final String INROOMDETECT_SCENARIO_NORMAL2_DEFAULT = "false";
|
|
|
+
|
|
|
+ // 재실센서 시나리오-사용자설정 사용여부
|
|
|
+ public static final String INROOMDETECT_SCENARIO_USERSET = "INROOMDETECT_SCENARIO_USERSET";
|
|
|
+ public static final String INROOMDETECT_SCENARIO_USERSET_DEFAULT = "false";
|
|
|
+
|
|
|
+ // 재실센서 시나리오-전기레인지 안전모드 사용여부
|
|
|
+ public static final String INROOMDETECT_SCENARIO_ELECRANGE_SAFE = "INROOMDETECT_SCENARIO_ELECRANGE_SAFE";
|
|
|
+ public static final String INROOMDETECT_SCENARIO_ELECRANGE_SAFE_DEFAULT = "false";
|
|
|
+
|
|
|
+ // 재실센서 시나리오-기본모드1 설정
|
|
|
+ public static final String INROOMDETECT_SCENARIO_NORMAL1_INFO = "INROOMDETECT_SCENARIO_NORMAL1_INFO";
|
|
|
+ public static final String INROOMDETECT_SCENARIO_NORMAL1_INFO_DEFAULT = "KIND-NORMAL1/START-AM:09:30/END-PM:10:00/DATE-1:2:3:4:5:6:7/" +
|
|
|
+ "LOC-LIV;KIT;TBL;MROOM;BED1;BED2/TIME1-60/ACT1-DIM:30/TIME2-20/ACT2-STAT:OFF";
|
|
|
+
|
|
|
+ // 재실센서 시나리오-기본모드2 설정
|
|
|
+ public static final String INROOMDETECT_SCENARIO_NORMAL2_INFO = "INROOMDETECT_SCENARIO_NORMAL2_INFO";
|
|
|
+ public static final String INROOMDETECT_SCENARIO_NORMAL2_INFO_DEFAULT = "KIND-NORMAL2/START-PM:09:30/END-AM:06:30/DATE-1:2:3:4:5:6:7/" +
|
|
|
+ "LOC-TBL/TIME1-0/ACT1-STAT:ON;DIM:10/TIME2-10/ACT2-STAT:OFF";
|
|
|
+
|
|
|
+ // 재실센서 시나리오-사용자모드 설정
|
|
|
+ public static final String INROOMDETECT_SCENARIO_USERSET_INFO = "INROOMDETECT_SCENARIO_USERSET_INFO";
|
|
|
+ public static final String INROOMDETECT_SCENARIO_USERSET_INFO_DEFAULT = "KIND-USERSET/START-AM:09:30/END-PM:10:00/DATE-1:2:3:4:5:6:7/" +
|
|
|
+ "LOC-LIV;KIT;TBL;MROOM;BED1;BED2/TIME1-60/ACT1-DIM:30/TIME2-20/ACT2-STAT:OFF";
|
|
|
+
|
|
|
+ // 재실센서 시나리오-전기레인지 안전모드 설정
|
|
|
+ public static final String INROOMDETECT_SCENARIO_ELECRANGE_SAFE_INFO = "INROOMDETECT_SCENARIO_ELECRANGE_SAFE_INFO";
|
|
|
+ public static final String INROOMDETECT_SCENARIO_ELECRANGE_SAFE_INFO_DEFAULT = "KIND-ELECRANGE_SAFE/START-PM:06:30/END-AM:06:30/DATE-1:2:3:4:5:6:7/" +
|
|
|
+ "LOC-ELECRANGE/TIME1-20/ACT1-POPUP/TIME2-20/ACT2-ALARM";
|
|
|
+
|
|
|
+ public static final String CAMERA_ENCODING_ERROR = "CAMERA_ENCODING_ERROR";
|
|
|
+ public static final String CAMERA_ENCODING_ERROR_DEFAULT = "false";
|
|
|
+
|
|
|
+ // 통화기능 설정
|
|
|
+ public static final String CALLFUNCTION_FRONT_USE = "CALLFUNCTION_FRONT_USE";
|
|
|
+ public static final String CALLFUNCTION_FRONT_USE_DEFAULT = "true";
|
|
|
+ public static final String CALLFUNCTION_LOBBY_USE = "CALLFUNCTION_LOBBY_USE";
|
|
|
+ public static final String CALLFUNCTION_LOBBY_USE_DEFAULT = "true";
|
|
|
+ public static final String CALLFUNCTION_GUARD_USE = "CALLFUNCTION_GUARD_USE";
|
|
|
+ public static final String CALLFUNCTION_GUARD_USE_DEFAULT = "true";
|
|
|
+ public static final String CALLFUNCTION_RESIDENCE_USE = "CALLFUNCTION_RESIDENCE_USE";
|
|
|
+ public static final String CALLFUNCTION_RESIDENCE_USE_DEFAULT = "true";
|
|
|
+ public static final String CALLFUNCTION_PSTN_USE = "CALLFUNCTION_PSTN_USE";
|
|
|
+ public static final String CALLFUNCTION_PSTN_USE_DEFAULT = "true";
|
|
|
+ public static final String CALLFUNCTION_CALLHISTORY_USE = "CALLFUNCTION_CALLHISTORY_USE";
|
|
|
+ public static final String CALLFUNCTION_CALLHISTORY_USE_DEFAULT = "true";
|
|
|
+ public static final String CALLFUNCTION_VISITORPIC_USE = "CALLFUNCTION_VISITORPIC_USE";
|
|
|
+ public static final String CALLFUNCTION_VISITORPIC_USE_DEFAULT = "true";
|
|
|
+
|
|
|
+ //////////////////////////////////////icontrols End/////////////////////////////////////////////////////
|
|
|
+ /////////////////////////////////////////////////////////////////////////////////////////////////////////
|
|
|
+ public static final String DEVICE_ROOM = "DEVICE_ROOM";
|
|
|
+ public static final String DEVICE_ROOM_LIGHT = "DEVICE_ROOM_LIGHT";
|
|
|
+ public static final String DEVICE_ROOM_DEFAULT = "1:3:4:5:6:7"; //GetEachRoomNameInfo == false 일 시
|
|
|
+ public static final String DEVICE_ROOM_DEFAULT_LIGHT = "1:15:3:4:5:6"; //GetEachRoomNameInfo == true 일 시 조명&콘센트 방 명칭
|
|
|
+
|
|
|
+
|
|
|
+ public static final String[] RoomTitle = {"거실","안방","방1","방2","방3","방4","방5","방6","방7","방8","작은방","작은방1","작은방2","서재","주방","큰방","공부방","알파룸",
|
|
|
+ "할아버지","할머니","아버지","어머니","아들","큰아들","작은아들","딸","큰딸","작은딸","막내","침실1","침실2","침실3","침실4","침실5","침실6"};
|
|
|
+
|
|
|
+ /**
|
|
|
+ *
|
|
|
+ * @return
|
|
|
+ */
|
|
|
+ public String [] GetDevRoomName()
|
|
|
+ {
|
|
|
+ try
|
|
|
+ {
|
|
|
+ String ret = GetWallPADData(DEVICE_ROOM);
|
|
|
+ String[] getidx = ret.split(define.DEVCTR_DATA_SPLITER);
|
|
|
+
|
|
|
+ for (int i = 0; i<getidx.length; i++)
|
|
|
+ getidx[i] = RoomTitle[Integer.parseInt(getidx[i])-1];
|
|
|
+
|
|
|
+ return getidx;
|
|
|
+ }
|
|
|
+ catch (RuntimeException re) {
|
|
|
+ LogUtil.errorLogInfo("", TAG, re);
|
|
|
+ return null;
|
|
|
+ }
|
|
|
+ catch (Exception e)
|
|
|
+ {
|
|
|
+ //e.printStackTrace();
|
|
|
+ LogUtil.errorLogInfo("", TAG, e);
|
|
|
+ return null;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 난방 조명 방명칭 설정 값을 가져온다
|
|
|
+ * @param DeviceType = "light"이면 조명 설정정보 가져오고, "heating"이면 난방 설정정보 가져옴
|
|
|
+ * @return String [] 해당 방 명칭 String 배열
|
|
|
+ */
|
|
|
+ public String [] GetDevRoomName(String DeviceType)
|
|
|
+ {
|
|
|
+ try
|
|
|
+ {
|
|
|
+ WallpadDeviceSet wallpadDeviceSet = new WallpadDeviceSet(CTX);
|
|
|
+ boolean UseEachRoomName = wallpadDeviceSet.GetEachRoomNameInfo();
|
|
|
+ wallpadDeviceSet.closeDB();
|
|
|
+
|
|
|
+ String[] getidx = null;
|
|
|
+ String ret;
|
|
|
+
|
|
|
+ ret = GetWallPADData(DEVICE_ROOM);
|
|
|
+ getidx = ret.split(define.DEVCTR_DATA_SPLITER);
|
|
|
+
|
|
|
+ for (int i = 0; i<getidx.length; i++)
|
|
|
+ getidx[i] = RoomTitle[Integer.parseInt(getidx[i])-1];
|
|
|
+
|
|
|
+ if(UseEachRoomName == false)
|
|
|
+ {
|
|
|
+ return getidx;
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ if(DeviceType.equalsIgnoreCase("light") == true)
|
|
|
+ {
|
|
|
+ ret = GetWallPADData(DEVICE_ROOM_LIGHT);
|
|
|
+ getidx = ret.split(define.DEVCTR_DATA_SPLITER);
|
|
|
+
|
|
|
+ for (int i = 0; i<getidx.length; i++)
|
|
|
+ getidx[i] = RoomTitle[Integer.parseInt(getidx[i])-1];
|
|
|
+ }
|
|
|
+ else if(DeviceType.equalsIgnoreCase("heating") == true)
|
|
|
+ {
|
|
|
+ return getidx;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ return getidx;
|
|
|
+ }
|
|
|
+ catch (RuntimeException re) {
|
|
|
+ LogUtil.errorLogInfo("", TAG, re);
|
|
|
+ return null;
|
|
|
+ }
|
|
|
+ catch (Exception e)
|
|
|
+ {
|
|
|
+ //e.printStackTrace();
|
|
|
+ LogUtil.errorLogInfo("", TAG, e);
|
|
|
+ return null;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ public int[] GetDevRoomIdx()
|
|
|
+ {
|
|
|
+ try
|
|
|
+ {
|
|
|
+ String ret = GetWallPADData(DEVICE_ROOM);
|
|
|
+ String[] getidx = ret.split(define.DEVCTR_DATA_SPLITER);
|
|
|
+ int[] retdata = new int[getidx.length];
|
|
|
+ for (int i = 0; i<getidx.length; i++)
|
|
|
+ retdata[i] = Integer.parseInt(getidx[i]);
|
|
|
+ return retdata;
|
|
|
+ }
|
|
|
+ catch (RuntimeException re) {
|
|
|
+ LogUtil.errorLogInfo("", TAG, re);
|
|
|
+ return null;
|
|
|
+ }
|
|
|
+ catch (Exception e)
|
|
|
+ {
|
|
|
+ //e.printStackTrace();
|
|
|
+ LogUtil.errorLogInfo("", TAG, e);
|
|
|
+ return null;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 난방 조명 방명칭 설정 index값을 가져온다
|
|
|
+ * @param DeviceType = "light"이면 조명 설정정보 가져오고, "heating"이면 난방 설정정보 가져옴
|
|
|
+ * @return int [] 해당 방 명칭 int 배열
|
|
|
+ */
|
|
|
+ public int[] GetDevRoomIdx(String DeviceType)
|
|
|
+ {
|
|
|
+ try
|
|
|
+ {
|
|
|
+ WallpadDeviceSet wallpadDeviceSet = new WallpadDeviceSet(CTX);
|
|
|
+ boolean UseEachRoomName = wallpadDeviceSet.GetEachRoomNameInfo();
|
|
|
+ wallpadDeviceSet.closeDB();
|
|
|
+
|
|
|
+ String ret = GetWallPADData(DEVICE_ROOM);
|
|
|
+ String[] getidx = ret.split(define.DEVCTR_DATA_SPLITER);
|
|
|
+ int[] retdata = new int[getidx.length];
|
|
|
+ for (int i = 0; i<getidx.length; i++)
|
|
|
+ retdata[i] = Integer.parseInt(getidx[i]);
|
|
|
+
|
|
|
+ if(UseEachRoomName == false)
|
|
|
+ {
|
|
|
+ return retdata;
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ if(DeviceType.equalsIgnoreCase("light") == true)
|
|
|
+ {
|
|
|
+ ret = GetWallPADData(DEVICE_ROOM_LIGHT);
|
|
|
+ getidx = ret.split(define.DEVCTR_DATA_SPLITER);
|
|
|
+ retdata = new int[getidx.length];
|
|
|
+ for (int i = 0; i<getidx.length; i++)
|
|
|
+ retdata[i] = Integer.parseInt(getidx[i]);
|
|
|
+ }
|
|
|
+ else if(DeviceType.equalsIgnoreCase("heating") == true)
|
|
|
+ {
|
|
|
+ return retdata;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ return retdata;
|
|
|
+ }
|
|
|
+ catch (RuntimeException re) {
|
|
|
+ LogUtil.errorLogInfo("", TAG, re);
|
|
|
+ return null;
|
|
|
+ }
|
|
|
+ catch (Exception e)
|
|
|
+ {
|
|
|
+ //e.printStackTrace();
|
|
|
+ LogUtil.errorLogInfo("", TAG, e);
|
|
|
+ return null;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ public int SetDevRoomIdx(int[] set)
|
|
|
+ {
|
|
|
+ try{
|
|
|
+ String indata=String.valueOf(set[0]);
|
|
|
+ for(int i =1; i<set.length;i++)
|
|
|
+ indata+=(":"+set[i]);
|
|
|
+ return (UpdateWallPADData(DEVICE_ROOM, indata))?0:-1;
|
|
|
+ }
|
|
|
+ catch (RuntimeException re) {
|
|
|
+ LogUtil.errorLogInfo("", TAG, re);
|
|
|
+ return APIErrorCode.EXCEPTION;
|
|
|
+ }
|
|
|
+ catch (Exception e)
|
|
|
+ {
|
|
|
+ //e.printStackTrace();
|
|
|
+ LogUtil.errorLogInfo("", TAG, e);
|
|
|
+ return APIErrorCode.EXCEPTION;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 난방 조명 방명칭 설정한다
|
|
|
+ * @param DeviceType = "light"이면 조명 설정하고, "heating"이면 난방 설정함
|
|
|
+ * @return int 0보다 작으면 실패
|
|
|
+ */
|
|
|
+ public int SetDevRoomIdx(int[] set, String DeviceType)
|
|
|
+ {
|
|
|
+ try
|
|
|
+ {
|
|
|
+ WallpadDeviceSet wallpadDeviceSet = new WallpadDeviceSet(CTX);
|
|
|
+ boolean UseEachRoomName = wallpadDeviceSet.GetEachRoomNameInfo();
|
|
|
+ wallpadDeviceSet.closeDB();
|
|
|
+
|
|
|
+ String indata = String.valueOf(set[0]);
|
|
|
+ for (int i = 1; i < set.length; i++)
|
|
|
+ indata += (":" + set[i]);
|
|
|
+
|
|
|
+ if(UseEachRoomName == false)
|
|
|
+ {
|
|
|
+ return (UpdateWallPADData(DEVICE_ROOM, indata)) ? 0 : -1;
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ if(DeviceType.equalsIgnoreCase("light") == true)
|
|
|
+ {
|
|
|
+ return (UpdateWallPADData(DEVICE_ROOM_LIGHT, indata)) ? 0 : -1;
|
|
|
+ }
|
|
|
+ else if(DeviceType.equalsIgnoreCase("heating") == true)
|
|
|
+ {
|
|
|
+ return (UpdateWallPADData(DEVICE_ROOM, indata)) ? 0 : -1;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ return -1;
|
|
|
+
|
|
|
+ }
|
|
|
+ catch (RuntimeException re) {
|
|
|
+ LogUtil.errorLogInfo("", TAG, re);
|
|
|
+ return APIErrorCode.EXCEPTION;
|
|
|
+ }
|
|
|
+ catch (Exception e)
|
|
|
+ {
|
|
|
+ //e.printStackTrace();
|
|
|
+ LogUtil.errorLogInfo("", TAG, e);
|
|
|
+ return APIErrorCode.EXCEPTION;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ public WallpadStatusData(Context ctx) {
|
|
|
+ super(ctx);
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ public void SetAlarmStatus(int status)
|
|
|
+ {
|
|
|
+ int alarmfree;
|
|
|
+ if (status > ALARMTEXT.length-1 || status < 0 ) return;
|
|
|
+ alarmfree = GetAlarmStatus();
|
|
|
+ UpdateWallPADData(ALARM_STATUS, ALARMTEXT[status]);
|
|
|
+
|
|
|
+ if(alarmfree != status)
|
|
|
+ {
|
|
|
+ // 상태가 변경되었다면 상태 변경 BR을 송신한다.
|
|
|
+ Intent notiIntent = new Intent();
|
|
|
+ notiIntent.setAction(define.NOTIFY_ACNAME);
|
|
|
+ notiIntent.putExtra(define.NOTIBR_KIND, define.NOTIFY_ALARM_CHANGE);
|
|
|
+ CTX.sendBroadcast(notiIntent);
|
|
|
+ }
|
|
|
+
|
|
|
+ if (status == ALARM_NONE ||status == GUARD_IN || status == GUARD_OUT)
|
|
|
+ {
|
|
|
+ String modeStr = null;
|
|
|
+ if (status == ALARM_NONE)
|
|
|
+ {
|
|
|
+ modeStr = "normal";
|
|
|
+ if (alarmfree==ALARM_STOP || alarmfree == ALARM_ARISE)
|
|
|
+ {
|
|
|
+ Intent notiIntent = new Intent();
|
|
|
+ notiIntent.setAction(define.NOTIFY_ACNAME);
|
|
|
+ notiIntent.putExtra(define.NOTIBR_KIND, define.NOTIFY_ALARMFREED);
|
|
|
+ CTX.sendBroadcast(notiIntent);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ else if (status == GUARD_IN)
|
|
|
+ modeStr = "occupied";
|
|
|
+ else
|
|
|
+ {
|
|
|
+ modeStr = "unoccupied";
|
|
|
+ Intent notiIntent = new Intent();
|
|
|
+ notiIntent.setAction(define.NOTIFY_ACNAME);
|
|
|
+ notiIntent.putExtra(define.NOTIBR_KIND, define.NOTIFY_OUTGOINGSETTED);
|
|
|
+ CTX.sendBroadcast(notiIntent);
|
|
|
+ }
|
|
|
+
|
|
|
+ if( alarmfree == GUARD_OUT_WAIT && status == ALARM_NONE )
|
|
|
+ {
|
|
|
+ // 단지서버로 메세지를 보내지 않도록 한다.
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ WallPadiMAPNotifyAPI notif = new WallPadiMAPNotifyAPI(CTX);
|
|
|
+ notif.ModeChanged(modeStr);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ public int GetAlarmStatus()
|
|
|
+ {
|
|
|
+ try
|
|
|
+ {
|
|
|
+ String ret = GetWallPADData(ALARM_STATUS);
|
|
|
+ return Integer.parseInt(ret);
|
|
|
+ }
|
|
|
+ catch (RuntimeException re) {
|
|
|
+ LogUtil.errorLogInfo("", TAG, re);
|
|
|
+ return 0;
|
|
|
+ }
|
|
|
+ catch (Exception e)
|
|
|
+ {
|
|
|
+ //e.printStackTrace();
|
|
|
+ LogUtil.errorLogInfo("", TAG, e);
|
|
|
+ return 0;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ public void SetAlarmType(int type)
|
|
|
+ {
|
|
|
+ try {
|
|
|
+ if (type > ALARMTYPETEXT.length-1 || type < 0 ) return;
|
|
|
+ UpdateWallPADData(ALARM_TYPE, ALARMTYPETEXT[type]);
|
|
|
+ }
|
|
|
+ catch (RuntimeException re) {
|
|
|
+ LogUtil.errorLogInfo("", TAG, re);
|
|
|
+ }
|
|
|
+ catch (Exception e)
|
|
|
+ {
|
|
|
+ //e.printStackTrace();
|
|
|
+ LogUtil.errorLogInfo("", TAG, e);
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ public int GetAlarmType()
|
|
|
+ {
|
|
|
+ try {
|
|
|
+ String ret = GetWallPADData(ALARM_TYPE);
|
|
|
+ return Integer.parseInt(ret);
|
|
|
+ }
|
|
|
+ catch (RuntimeException re) {
|
|
|
+ LogUtil.errorLogInfo("", TAG, re);
|
|
|
+ return 0;
|
|
|
+ }
|
|
|
+ catch (Exception e)
|
|
|
+ {
|
|
|
+ //e.printStackTrace();
|
|
|
+ LogUtil.errorLogInfo("", TAG, e);
|
|
|
+ return 0;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ public void SetMorningCall(int set, int hour, int min)
|
|
|
+ {
|
|
|
+ if (set > MORNINGCALLTEXT.length-1 || set < 0 ) return;
|
|
|
+ String mcallStr = MORNINGCALLTEXT[set]+":"+hour+":"+min;
|
|
|
+ UpdateWallPADData(MORNINGCALL_STATUS, mcallStr);
|
|
|
+ }
|
|
|
+
|
|
|
+ public int GetMorningCallStatus()
|
|
|
+ {
|
|
|
+ try {
|
|
|
+ String ret = GetWallPADData(MORNINGCALL_STATUS);
|
|
|
+ String retarr[] = ret.split(":");
|
|
|
+ MorningHour = Integer.parseInt(retarr[1]);
|
|
|
+ MorningMin = Integer.parseInt(retarr[2]);
|
|
|
+ return Integer.parseInt(retarr[0]);
|
|
|
+ }
|
|
|
+ catch (RuntimeException re) {
|
|
|
+ LogUtil.errorLogInfo("", TAG, re);
|
|
|
+ return -1;
|
|
|
+ }
|
|
|
+ catch (Exception e)
|
|
|
+ {
|
|
|
+ //e.printStackTrace();
|
|
|
+ LogUtil.errorLogInfo("", TAG, e);
|
|
|
+ return -1;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ public int MorningHour = 0;
|
|
|
+ public int MorningMin = 0;
|
|
|
+
|
|
|
+ public void SetManagerPW(String pw)
|
|
|
+ {
|
|
|
+ UpdateWallPADData(MANAGER_PW, pw);
|
|
|
+ }
|
|
|
+
|
|
|
+ public String GetManagerPW()
|
|
|
+ {
|
|
|
+ String ret = GetWallPADData(MANAGER_PW);
|
|
|
+ return ret;
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ public void SetUserPW(String pw)
|
|
|
+ {
|
|
|
+ UpdateWallPADData(USER_PW, pw);
|
|
|
+ }
|
|
|
+
|
|
|
+ public String GetUserPW()
|
|
|
+ {
|
|
|
+ String ret = GetWallPADData(USER_PW);
|
|
|
+ return ret;
|
|
|
+ }
|
|
|
+
|
|
|
+ public void SetWebCtrPW(String pw)
|
|
|
+ {
|
|
|
+ UpdateWallPADData(WEB_CTR_PW, pw);
|
|
|
+ }
|
|
|
+
|
|
|
+ public String GetWebCtrPW()
|
|
|
+ {
|
|
|
+ String ret = GetWallPADData(WEB_CTR_PW);
|
|
|
+ return ret;
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ public void SetPSTNStatus(int status)
|
|
|
+ {
|
|
|
+ if (status > PSTN_STATUSTEXT.length-1 || status < 0 ) return;
|
|
|
+ UpdateWallPADData(PSTN_STATUS, PSTN_STATUSTEXT[status]);
|
|
|
+ }
|
|
|
+
|
|
|
+ public int GetPSTNStatus()
|
|
|
+ {
|
|
|
+ try {
|
|
|
+ String ret = GetWallPADData(PSTN_STATUS);
|
|
|
+ return Integer.parseInt(ret);
|
|
|
+ }
|
|
|
+ catch (RuntimeException re) {
|
|
|
+ LogUtil.errorLogInfo("", TAG, re);
|
|
|
+ return 0;
|
|
|
+ }
|
|
|
+ catch (Exception e)
|
|
|
+ {
|
|
|
+ //e.printStackTrace();
|
|
|
+ LogUtil.errorLogInfo("", TAG, e);
|
|
|
+ return 0;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ public void SetDevStatus(int status, String data)
|
|
|
+ {
|
|
|
+ String ipdata = DEV_STATUSTEXT[status]+":"+data;
|
|
|
+ UpdateWallPADData(DEV_STATUS, ipdata);
|
|
|
+ }
|
|
|
+
|
|
|
+ public String GetDevStatus()
|
|
|
+ {
|
|
|
+ String ret = GetWallPADData(DEV_STATUS);
|
|
|
+ return ret;
|
|
|
+ }
|
|
|
+
|
|
|
+ public void SetServerIP(String svrIP, int port)
|
|
|
+ {
|
|
|
+ String ipdata = String.format("%s:%d", svrIP, port);
|
|
|
+ UpdateWallPADData(SERVER_IP, ipdata);
|
|
|
+ }
|
|
|
+
|
|
|
+ public String GetServerIP()
|
|
|
+ {
|
|
|
+ String ret = GetWallPADData(SERVER_IP);
|
|
|
+ String[] retdata = ret.split(":");
|
|
|
+ return retdata[0];
|
|
|
+ }
|
|
|
+
|
|
|
+ public int GetServerPort()
|
|
|
+ {
|
|
|
+ try {
|
|
|
+ String ret = GetWallPADData(SERVER_IP);
|
|
|
+ String[] retdata = ret.split(":");
|
|
|
+ return Integer.parseInt(retdata[1]);
|
|
|
+ }
|
|
|
+ catch (RuntimeException re) {
|
|
|
+ LogUtil.errorLogInfo("", TAG, re);
|
|
|
+ return 0;
|
|
|
+ }
|
|
|
+ catch (Exception e)
|
|
|
+ {
|
|
|
+ //e.printStackTrace();
|
|
|
+ LogUtil.errorLogInfo("", TAG, e);
|
|
|
+ return 0;
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
+ public void SetManagePC(String svrIP, int port)
|
|
|
+ {
|
|
|
+ String ipdata = String.format("%s:%d", svrIP, port);
|
|
|
+ UpdateWallPADData(MANAGEPC_IP, ipdata);
|
|
|
+ }
|
|
|
+
|
|
|
+ public String GetManagePCIP()
|
|
|
+ {
|
|
|
+ String ret;
|
|
|
+ //단지서버 1.0/2.0 구분하여 처리 (2.0일시는 단지서버로 보내도록 수정)
|
|
|
+ WallpadDeviceSet wallpadDeviceSet = new WallpadDeviceSet(CTX);
|
|
|
+ boolean bNewDanjiServer = wallpadDeviceSet.GetNewDanjiServer();
|
|
|
+ wallpadDeviceSet.closeDB();
|
|
|
+
|
|
|
+ if(bNewDanjiServer == false)
|
|
|
+ {
|
|
|
+ ret = GetWallPADData(MANAGEPC_IP);
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ ret = GetWallPADData(SERVER_IP);
|
|
|
+ }
|
|
|
+
|
|
|
+ String[] retdata = ret.split(":");
|
|
|
+ return retdata[0];
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+ public int GetManagePCPort()
|
|
|
+ {
|
|
|
+ try {
|
|
|
+ String ret = GetWallPADData(MANAGEPC_IP);
|
|
|
+ String[] retdata = ret.split(":");
|
|
|
+ return Integer.parseInt(retdata[1]);
|
|
|
+ }
|
|
|
+ catch (RuntimeException re) {
|
|
|
+ LogUtil.errorLogInfo("", TAG, re);
|
|
|
+ return 0;
|
|
|
+ }
|
|
|
+ catch (Exception e)
|
|
|
+ {
|
|
|
+ //e.printStackTrace();
|
|
|
+ LogUtil.errorLogInfo("", TAG, e);
|
|
|
+ return 0;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ public void SetFTPIP(String svrIP)
|
|
|
+ {
|
|
|
+ UpdateWallPADData(FTP_IP, svrIP);
|
|
|
+ }
|
|
|
+
|
|
|
+ public String GetFTPIP()
|
|
|
+ {
|
|
|
+ String ret = GetWallPADData(FTP_IP);
|
|
|
+ return ret;
|
|
|
+ }
|
|
|
+
|
|
|
+ public void SetGatewayIP(String IPaddr)
|
|
|
+ {
|
|
|
+ UpdateWallPADData(GW_IP, IPaddr);
|
|
|
+ }
|
|
|
+
|
|
|
+ public String GetGatewayIP()
|
|
|
+ {
|
|
|
+ String ret = GetWallPADData(GW_IP);
|
|
|
+
|
|
|
+ return ret;
|
|
|
+ }
|
|
|
+
|
|
|
+ public void SetSubnetmask(String IPaddr)
|
|
|
+ {
|
|
|
+ UpdateWallPADData(SUBNET, IPaddr);
|
|
|
+ }
|
|
|
+
|
|
|
+ public String GetSubnetmask()
|
|
|
+ {
|
|
|
+ String ret = GetWallPADData(SUBNET);
|
|
|
+
|
|
|
+ return ret;
|
|
|
+ }
|
|
|
+
|
|
|
+ public void SetAppVer(String Ver)
|
|
|
+ {
|
|
|
+ UpdateWallPADData(APP_VER, Ver);
|
|
|
+ }
|
|
|
+
|
|
|
+ public String GetAPPVer()
|
|
|
+ {
|
|
|
+ String ret = GetWallPADData(APP_VER);
|
|
|
+ return ret;
|
|
|
+ }
|
|
|
+
|
|
|
+ public void SetNoticeVer(String Ver)
|
|
|
+ {
|
|
|
+ UpdateWallPADData(NOTICE_VER, Ver);
|
|
|
+ }
|
|
|
+
|
|
|
+ public String GetNoticeVer()
|
|
|
+ {
|
|
|
+ String ret = GetWallPADData(NOTICE_VER);
|
|
|
+ if(ret.length() < NOTICE_VER_DEFAULT.length())
|
|
|
+ {
|
|
|
+ return NOTICE_VER_DEFAULT;
|
|
|
+ }
|
|
|
+ return ret;
|
|
|
+ }
|
|
|
+
|
|
|
+ public void SetWeatherVer(String Ver)
|
|
|
+ {
|
|
|
+ UpdateWallPADData(WEATHER_VER, Ver);
|
|
|
+ }
|
|
|
+
|
|
|
+ public String GetWeatherVer()
|
|
|
+ {
|
|
|
+ String ret = GetWallPADData(WEATHER_VER);
|
|
|
+ return ret;
|
|
|
+ }
|
|
|
+
|
|
|
+ public String[] GetCurWeatherData()
|
|
|
+ {
|
|
|
+ String[] ret = GetWallPADData(WEATHER_VER).split(define.DEVCTR_DATA_SPLITER);
|
|
|
+ return ret;
|
|
|
+ }
|
|
|
+
|
|
|
+ public void SetCurWeatherCode(String code)
|
|
|
+ {
|
|
|
+ try {
|
|
|
+ UpdateWallPADData(WEATHER_CODE, code);
|
|
|
+ }
|
|
|
+ catch (RuntimeException re) {
|
|
|
+ LogUtil.errorLogInfo("", TAG, re);
|
|
|
+ }
|
|
|
+ catch (Exception e) {
|
|
|
+ Log.e(TAG , "[Exception] SetCurWeatherCode input fail ");
|
|
|
+ //e.printStackTrace();
|
|
|
+ LogUtil.errorLogInfo("", TAG, e);
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ public String GetCurWeatherCode()
|
|
|
+ {
|
|
|
+ try {
|
|
|
+ String ret = GetWallPADData(WEATHER_CODE);
|
|
|
+ return ret;
|
|
|
+ }
|
|
|
+ catch (RuntimeException re) {
|
|
|
+ LogUtil.errorLogInfo("", TAG, re);
|
|
|
+ return CODE_DEFAULT;
|
|
|
+ }
|
|
|
+ catch (Exception e)
|
|
|
+ {
|
|
|
+ Log.e(TAG , "[Exception] GetCurWeatherCode fail ");
|
|
|
+ //e.printStackTrace();
|
|
|
+ LogUtil.errorLogInfo("", TAG, e);
|
|
|
+ return CODE_DEFAULT;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ public void SetSettingVer(String Ver)
|
|
|
+ {
|
|
|
+ UpdateWallPADData(SETTING_VER, Ver);
|
|
|
+ }
|
|
|
+
|
|
|
+ public String GetSettingVer()
|
|
|
+ {
|
|
|
+ String ret = GetWallPADData(SETTING_VER);
|
|
|
+ return ret;
|
|
|
+ }
|
|
|
+
|
|
|
+ public void SetServerVer(String Ver)
|
|
|
+ {
|
|
|
+ UpdateWallPADData(SERVER_VERSION, Ver);
|
|
|
+ }
|
|
|
+
|
|
|
+ public String GetServerVer()
|
|
|
+ {
|
|
|
+ String ret = GetWallPADData(SERVER_VERSION);
|
|
|
+ return ret;
|
|
|
+ }
|
|
|
+
|
|
|
+ public void SetLightCNT(int CNT)
|
|
|
+ {
|
|
|
+ UpdateWallPADData(DEV_LIGHT_CNT, String.valueOf(CNT));
|
|
|
+ }
|
|
|
+
|
|
|
+ public int GetLightCNT()
|
|
|
+ {
|
|
|
+ try {
|
|
|
+ String ret = GetWallPADData(DEV_LIGHT_CNT);
|
|
|
+ return Integer.parseInt(ret);
|
|
|
+ }
|
|
|
+ catch (RuntimeException re) {
|
|
|
+ LogUtil.errorLogInfo("", TAG, re);
|
|
|
+ return 0;
|
|
|
+ }
|
|
|
+ catch (Exception e)
|
|
|
+ {
|
|
|
+ //e.printStackTrace();
|
|
|
+ LogUtil.errorLogInfo("", TAG, e);
|
|
|
+ return 0;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ public void SetGasCNT(int CNT)
|
|
|
+ {
|
|
|
+ UpdateWallPADData(DEV_GAS_CNT, String.valueOf(CNT));
|
|
|
+ }
|
|
|
+
|
|
|
+ public int GetGasCNT()
|
|
|
+ {
|
|
|
+ try {
|
|
|
+ String ret = GetWallPADData(DEV_GAS_CNT);
|
|
|
+ return Integer.parseInt(ret);
|
|
|
+ }
|
|
|
+ catch (RuntimeException re) {
|
|
|
+ LogUtil.errorLogInfo("", TAG, re);
|
|
|
+ return 0;
|
|
|
+ }
|
|
|
+ catch (Exception e)
|
|
|
+ {
|
|
|
+ //e.printStackTrace();
|
|
|
+ LogUtil.errorLogInfo("", TAG, e);
|
|
|
+ return 0;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ public void SetHeatingCNT(int CNT)
|
|
|
+ {
|
|
|
+ UpdateWallPADData(DEV_HEATING_CNT, String.valueOf(CNT));
|
|
|
+ }
|
|
|
+
|
|
|
+ public int GetHeatingCNT()
|
|
|
+ {
|
|
|
+ try {
|
|
|
+ String ret = GetWallPADData(DEV_HEATING_CNT);
|
|
|
+ return Integer.parseInt(ret);
|
|
|
+ }
|
|
|
+ catch (RuntimeException re) {
|
|
|
+ LogUtil.errorLogInfo("", TAG, re);
|
|
|
+ return 0;
|
|
|
+ }
|
|
|
+ catch (Exception e)
|
|
|
+ {
|
|
|
+ //e.printStackTrace();
|
|
|
+ LogUtil.errorLogInfo("", TAG, e);
|
|
|
+ return 0;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ public void SetHeartbeatPeriod(int period)
|
|
|
+ {
|
|
|
+ UpdateWallPADData(HEARTBEAT_PERIOD, String.valueOf(period));
|
|
|
+ }
|
|
|
+
|
|
|
+ public int GetHeartbeatPeriod()
|
|
|
+ {
|
|
|
+ try {
|
|
|
+ String ret = GetWallPADData(HEARTBEAT_PERIOD);
|
|
|
+ return Integer.parseInt(ret);
|
|
|
+ }
|
|
|
+ catch (RuntimeException re) {
|
|
|
+ LogUtil.errorLogInfo("", TAG, re);
|
|
|
+ return 0;
|
|
|
+ }
|
|
|
+ catch (Exception e)
|
|
|
+ {
|
|
|
+ //e.printStackTrace();
|
|
|
+ LogUtil.errorLogInfo("", TAG, e);
|
|
|
+ return 0;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ public void SetLastHeartbeat(String timedata)
|
|
|
+ {
|
|
|
+ UpdateWallPADData(LAST_HEARTBEAT, timedata);
|
|
|
+ }
|
|
|
+
|
|
|
+ public String GetLastHeartbeat()
|
|
|
+ {
|
|
|
+ String ret = GetWallPADData(LAST_HEARTBEAT);
|
|
|
+ return ret;
|
|
|
+ }
|
|
|
+
|
|
|
+ public static final String LAST_STATUSBEAT = "LAST_STATUSBEAT";
|
|
|
+ public static final String LAST_STATUSBEAT_DEFAULT = "0000.00.00.00.00.00";
|
|
|
+
|
|
|
+ public void SetLastStatusbeat(String timedata)
|
|
|
+ {
|
|
|
+ UpdateWallPADData(LAST_STATUSBEAT, timedata);
|
|
|
+ }
|
|
|
+
|
|
|
+ public String GetLastStatusbeat()
|
|
|
+ {
|
|
|
+ String ret = GetWallPADData(LAST_STATUSBEAT);
|
|
|
+ return ret;
|
|
|
+ }
|
|
|
+
|
|
|
+ public void SetNewsCnt(String cnt)
|
|
|
+ {
|
|
|
+ UpdateWallPADData(NEWS_CNT, cnt);
|
|
|
+ }
|
|
|
+
|
|
|
+ public String GetNewsCnt()
|
|
|
+ {
|
|
|
+ String ret = GetWallPADData(NEWS_CNT);
|
|
|
+ return ret;
|
|
|
+ }
|
|
|
+
|
|
|
+ public void SetMainBG(int bgtype, String locate)
|
|
|
+ {
|
|
|
+ String setdata = MAINBGTYPE_TEXT[bgtype]+":"+locate;
|
|
|
+ UpdateWallPADData(MAINBGTYPE, setdata );
|
|
|
+ }
|
|
|
+
|
|
|
+ public int GetMainBGType()
|
|
|
+ {
|
|
|
+ try {
|
|
|
+ String ret = GetWallPADData(MAINBGTYPE);
|
|
|
+ String[] bgtype = ret.split(":");
|
|
|
+ return Integer.parseInt(bgtype[0]);
|
|
|
+ }
|
|
|
+ catch (RuntimeException re) {
|
|
|
+ LogUtil.errorLogInfo("", TAG, re);
|
|
|
+ return 0;
|
|
|
+ }
|
|
|
+ catch (Exception e)
|
|
|
+ {
|
|
|
+ //e.printStackTrace();
|
|
|
+ LogUtil.errorLogInfo("", TAG, e);
|
|
|
+ return 0;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ public String GetMainBGLocate()
|
|
|
+ {
|
|
|
+ String ret = GetWallPADData(MAINBGTYPE);
|
|
|
+ String[] bgtype = ret.split(":");
|
|
|
+ return bgtype[1];
|
|
|
+ }
|
|
|
+
|
|
|
+ /////////////////////////////////////////////////////////////////////////////////////////////////
|
|
|
+ /////////////////////////////////////////// icontrols //////////////////////////////////////////
|
|
|
+ public void SetOutModeWaitTime( int nSecond )
|
|
|
+ {
|
|
|
+ try
|
|
|
+ {
|
|
|
+
|
|
|
+ UpdateWallPADData(OUTMODE_WAITTIME, String.valueOf(nSecond));
|
|
|
+ }
|
|
|
+ catch (RuntimeException re) {
|
|
|
+ LogUtil.errorLogInfo("", TAG, re);
|
|
|
+ }
|
|
|
+ catch (Exception e )
|
|
|
+ {
|
|
|
+ //e.printStackTrace();
|
|
|
+ LogUtil.errorLogInfo("", TAG, e);
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ public int GetOutModeWaitTime()
|
|
|
+ {
|
|
|
+ try
|
|
|
+ {
|
|
|
+ String ret = GetWallPADData(OUTMODE_WAITTIME);
|
|
|
+
|
|
|
+ return Integer.parseInt(ret);
|
|
|
+ }
|
|
|
+ catch (RuntimeException re) {
|
|
|
+ LogUtil.errorLogInfo("", TAG, re);
|
|
|
+ return 0;
|
|
|
+ }
|
|
|
+ catch (Exception e )
|
|
|
+ {
|
|
|
+ //e.printStackTrace();
|
|
|
+ LogUtil.errorLogInfo("", TAG, e);
|
|
|
+ return 0;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ public void SetComeBackWaitTime(int nSecond)
|
|
|
+ {
|
|
|
+ try
|
|
|
+ {
|
|
|
+
|
|
|
+ UpdateWallPADData(COMEBACK_WAITTIME, String.valueOf(nSecond));
|
|
|
+ }
|
|
|
+ catch (RuntimeException re) {
|
|
|
+ LogUtil.errorLogInfo("", TAG, re);
|
|
|
+ }
|
|
|
+ catch (Exception e )
|
|
|
+ {
|
|
|
+ //e.printStackTrace();
|
|
|
+ LogUtil.errorLogInfo("", TAG, e);
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ public int GetComeBackWaitTime()
|
|
|
+ {
|
|
|
+ try
|
|
|
+ {
|
|
|
+ String ret = GetWallPADData(COMEBACK_WAITTIME);
|
|
|
+
|
|
|
+ return Integer.parseInt(ret);
|
|
|
+ }
|
|
|
+ catch (RuntimeException re) {
|
|
|
+ LogUtil.errorLogInfo("", TAG, re);
|
|
|
+ return 0;
|
|
|
+ }
|
|
|
+ catch (Exception e )
|
|
|
+ {
|
|
|
+ //e.printStackTrace();
|
|
|
+ LogUtil.errorLogInfo("", TAG, e);
|
|
|
+ return 0;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ public void SetOutModeLinkDevice( String DeviceList )
|
|
|
+ {
|
|
|
+ try
|
|
|
+ {
|
|
|
+
|
|
|
+ UpdateWallPADData(OUTMODE_LINK_DEVICE, DeviceList );
|
|
|
+ }
|
|
|
+ catch (RuntimeException re) {
|
|
|
+ LogUtil.errorLogInfo("", TAG, re);
|
|
|
+ }
|
|
|
+ catch (Exception e )
|
|
|
+ {
|
|
|
+ //e.printStackTrace();
|
|
|
+ LogUtil.errorLogInfo("", TAG, e);
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ public String GetOutModeLinkDevice()
|
|
|
+ {
|
|
|
+ try
|
|
|
+ {
|
|
|
+ String ret = GetWallPADData(OUTMODE_LINK_DEVICE);
|
|
|
+
|
|
|
+ return ret;
|
|
|
+ }
|
|
|
+ catch (RuntimeException re) {
|
|
|
+ LogUtil.errorLogInfo("", TAG, re);
|
|
|
+ return "";
|
|
|
+ }
|
|
|
+ catch (Exception e )
|
|
|
+ {
|
|
|
+ //e.printStackTrace();
|
|
|
+ LogUtil.errorLogInfo("", TAG, e);
|
|
|
+ return "";
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ public void SetComeBackLinkDevice( String DeviceList )
|
|
|
+ {
|
|
|
+ try
|
|
|
+ {
|
|
|
+
|
|
|
+ UpdateWallPADData(INMODE_LINK_DEVICE, DeviceList );
|
|
|
+ }
|
|
|
+ catch (RuntimeException re) {
|
|
|
+ LogUtil.errorLogInfo("", TAG, re);
|
|
|
+ }
|
|
|
+ catch (Exception e )
|
|
|
+ {
|
|
|
+ //e.printStackTrace();
|
|
|
+ LogUtil.errorLogInfo("", TAG, e);
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ public String GetComeBackLinkDevice()
|
|
|
+ {
|
|
|
+ try
|
|
|
+ {
|
|
|
+ String ret = GetWallPADData(INMODE_LINK_DEVICE);
|
|
|
+
|
|
|
+ return ret;
|
|
|
+ }
|
|
|
+ catch (RuntimeException re) {
|
|
|
+ LogUtil.errorLogInfo("", TAG, re);
|
|
|
+ return "";
|
|
|
+ }
|
|
|
+ catch (Exception e )
|
|
|
+ {
|
|
|
+ LogUtil.errorLogInfo("", TAG, e);//e.printStackTrace();
|
|
|
+ return "";
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ public void SetInBedLinkDevice( String DeviceList )
|
|
|
+ {
|
|
|
+ try
|
|
|
+ {
|
|
|
+
|
|
|
+ UpdateWallPADData(IN_BED_LINK_DEVICE, DeviceList );
|
|
|
+ }
|
|
|
+ catch (RuntimeException re) {
|
|
|
+ LogUtil.errorLogInfo("", TAG, re);
|
|
|
+ }
|
|
|
+ catch (Exception e )
|
|
|
+ {
|
|
|
+ LogUtil.errorLogInfo("", TAG, e);//e.printStackTrace();
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ public String GetInBedLinkDevice()
|
|
|
+ {
|
|
|
+ try
|
|
|
+ {
|
|
|
+ String ret = GetWallPADData(IN_BED_LINK_DEVICE);
|
|
|
+
|
|
|
+ return ret;
|
|
|
+ }
|
|
|
+ catch (RuntimeException re) {
|
|
|
+ LogUtil.errorLogInfo("", TAG, re);
|
|
|
+ return "";
|
|
|
+ }
|
|
|
+ catch (Exception e )
|
|
|
+ {
|
|
|
+ LogUtil.errorLogInfo("", TAG, e);//e.printStackTrace();
|
|
|
+ return "";
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ public void SetOutBedLinkDevice( String DeviceList )
|
|
|
+ {
|
|
|
+ try
|
|
|
+ {
|
|
|
+
|
|
|
+ UpdateWallPADData(OUT_BED_LINK_DEVICE, DeviceList );
|
|
|
+ }
|
|
|
+ catch (RuntimeException re) {
|
|
|
+ LogUtil.errorLogInfo("", TAG, re);
|
|
|
+ }
|
|
|
+ catch (Exception e )
|
|
|
+ {
|
|
|
+ LogUtil.errorLogInfo("", TAG, e);//e.printStackTrace();
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ public String GetOutBedLinkDevice()
|
|
|
+ {
|
|
|
+ try
|
|
|
+ {
|
|
|
+ String ret = GetWallPADData(OUT_BED_LINK_DEVICE);
|
|
|
+
|
|
|
+ return ret;
|
|
|
+ }
|
|
|
+ catch (RuntimeException re) {
|
|
|
+ LogUtil.errorLogInfo("", TAG, re);
|
|
|
+ return "";
|
|
|
+ }
|
|
|
+ catch (Exception e )
|
|
|
+ {
|
|
|
+ LogUtil.errorLogInfo("", TAG, e);//e.printStackTrace();
|
|
|
+ return "";
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ public void SetCallAPKStatus( boolean Running )
|
|
|
+ {
|
|
|
+ try
|
|
|
+ {
|
|
|
+ if( Running == true )
|
|
|
+ UpdateWallPADData(CALL_APK_STATUS, "1" );
|
|
|
+ else
|
|
|
+ UpdateWallPADData(CALL_APK_STATUS, "0" );
|
|
|
+
|
|
|
+ }
|
|
|
+ catch (RuntimeException re) {
|
|
|
+ LogUtil.errorLogInfo("", TAG, re);
|
|
|
+ }
|
|
|
+ catch (Exception e )
|
|
|
+ {
|
|
|
+ LogUtil.errorLogInfo("", TAG, e);//e.printStackTrace();
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ public boolean GetCallAPKStatusRunning()
|
|
|
+ {
|
|
|
+ try
|
|
|
+ {
|
|
|
+ String ret = GetWallPADData(CALL_APK_STATUS);
|
|
|
+ if( ret.equals("1"))
|
|
|
+ return true;
|
|
|
+ else
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ catch (RuntimeException re) {
|
|
|
+ LogUtil.errorLogInfo("", TAG, re);
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ catch (Exception e )
|
|
|
+ {
|
|
|
+ LogUtil.errorLogInfo("", TAG, e);//e.printStackTrace();
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ public void SetCallStatus(boolean bTalking)
|
|
|
+ {
|
|
|
+ try
|
|
|
+ {
|
|
|
+ if (bTalking)
|
|
|
+ UpdateWallPADData(CALL_STATUS, "1" );
|
|
|
+ else
|
|
|
+ UpdateWallPADData(CALL_STATUS, "0" );
|
|
|
+
|
|
|
+ }
|
|
|
+ catch (RuntimeException re) {
|
|
|
+ LogUtil.errorLogInfo("", TAG, re);
|
|
|
+ }
|
|
|
+ catch (Exception e )
|
|
|
+ {
|
|
|
+ LogUtil.errorLogInfo("", TAG, e);//e.printStackTrace();
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ public boolean GetCallStatus()
|
|
|
+ {
|
|
|
+ try
|
|
|
+ {
|
|
|
+ String ret = GetWallPADData(CALL_STATUS);
|
|
|
+ if (ret.equals("1"))
|
|
|
+ return true;
|
|
|
+ else
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ catch (RuntimeException re) {
|
|
|
+ LogUtil.errorLogInfo("", TAG, re);
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ catch (Exception e)
|
|
|
+ {
|
|
|
+ LogUtil.errorLogInfo("", TAG, e);//e.printStackTrace();
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ public boolean setRemoteCallUserPopupRun(boolean bRun) {
|
|
|
+ try {
|
|
|
+ if (bRun) {
|
|
|
+ return UpdateWallPADData(REMOTECALL_USER_POPUP_RUN, "1" );
|
|
|
+ }
|
|
|
+ else {
|
|
|
+ return UpdateWallPADData(REMOTECALL_USER_POPUP_RUN, "0" );
|
|
|
+ }
|
|
|
+ } catch (RuntimeException re) {
|
|
|
+ LogUtil.errorLogInfo("", TAG, re);
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ catch (Exception e) {
|
|
|
+ Log.e(TAG, "[Exception] setRemoteCallUserPopupRun(boolean bRun)");
|
|
|
+ LogUtil.errorLogInfo("", TAG, e);//e.printStackTrace();
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ public boolean getRemoteCallUserPopupRun() {
|
|
|
+ try {
|
|
|
+ String strResult = GetWallPADData(REMOTECALL_USER_POPUP_RUN);
|
|
|
+ if (strResult.equals("1")) return true;
|
|
|
+ else return false;
|
|
|
+ } catch (RuntimeException re) {
|
|
|
+ LogUtil.errorLogInfo("", TAG, re);
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ catch (Exception e) {
|
|
|
+ LogUtil.errorLogInfo("", TAG, e);//e.printStackTrace();
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ public boolean setGlobalScreenAPKRun(boolean bRun) {
|
|
|
+ try {
|
|
|
+ if (bRun) {
|
|
|
+ return UpdateWallPADData(GLOBALSCREEN_APK_RUN, "1" );
|
|
|
+ }
|
|
|
+ else {
|
|
|
+ return UpdateWallPADData(GLOBALSCREEN_APK_RUN, "0" );
|
|
|
+ }
|
|
|
+ } catch (RuntimeException re) {
|
|
|
+ LogUtil.errorLogInfo("", TAG, re);
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ catch (Exception e) {
|
|
|
+ Log.e(TAG, "[Exception] setGlobalScreenAPKStatusRun(boolean bRun)");
|
|
|
+ LogUtil.errorLogInfo("", TAG, e);//e.printStackTrace();
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ public boolean getGlobalScreenAPKRun() {
|
|
|
+ try {
|
|
|
+ String strResult = GetWallPADData(GLOBALSCREEN_APK_RUN);
|
|
|
+ if (strResult.equals("1")) return true;
|
|
|
+ else return false;
|
|
|
+ } catch (RuntimeException re) {
|
|
|
+ LogUtil.errorLogInfo("", TAG, re);
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ catch (Exception e) {
|
|
|
+ LogUtil.errorLogInfo("", TAG, e);//e.printStackTrace();
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ public void SetModeLampBrLevel( int nLevel )
|
|
|
+ {
|
|
|
+ try
|
|
|
+ {
|
|
|
+ if( nLevel >= 0 && nLevel <=4 )
|
|
|
+ {
|
|
|
+ UpdateWallPADData(MODE_LAMP_BR_LEVEL, String.valueOf(nLevel) );
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ Log.d(TAG , "SetModeLampBrLevel input fail ");
|
|
|
+ }
|
|
|
+ }
|
|
|
+ catch (RuntimeException re) {
|
|
|
+ LogUtil.errorLogInfo("", TAG, re);
|
|
|
+ }
|
|
|
+ catch (Exception e )
|
|
|
+ {
|
|
|
+ LogUtil.errorLogInfo("", TAG, e);//e.printStackTrace();
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ public int GetModeLampBrLevel()
|
|
|
+ {
|
|
|
+ try
|
|
|
+ {
|
|
|
+ String ret = GetWallPADData(MODE_LAMP_BR_LEVEL);
|
|
|
+ return Integer.parseInt(ret);
|
|
|
+ }
|
|
|
+ catch (RuntimeException re) {
|
|
|
+ LogUtil.errorLogInfo("", TAG, re);
|
|
|
+ return 0;
|
|
|
+ }
|
|
|
+ catch (Exception e )
|
|
|
+ {
|
|
|
+ LogUtil.errorLogInfo("", TAG, e);//e.printStackTrace();
|
|
|
+ return 0;
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+ public void SetWallPadMasterVolume( int nLevel )
|
|
|
+ {
|
|
|
+ try
|
|
|
+ {
|
|
|
+ UpdateWallPADData(WALLPAD_MASTER_VOLUME, String.valueOf(nLevel) );
|
|
|
+ }
|
|
|
+ catch (RuntimeException re) {
|
|
|
+ LogUtil.errorLogInfo("", TAG, re);
|
|
|
+ }
|
|
|
+ catch (Exception e )
|
|
|
+ {
|
|
|
+ LogUtil.errorLogInfo("", TAG, e);//e.printStackTrace();
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ public int GetWallPadMasterVolume( )
|
|
|
+ {
|
|
|
+ try
|
|
|
+ {
|
|
|
+ String ret = GetWallPADData(WALLPAD_MASTER_VOLUME);
|
|
|
+ return Integer.parseInt(ret);
|
|
|
+ }
|
|
|
+ catch (RuntimeException re) {
|
|
|
+ LogUtil.errorLogInfo("", TAG, re);
|
|
|
+ return 0;
|
|
|
+ }
|
|
|
+ catch (Exception e )
|
|
|
+ {
|
|
|
+ LogUtil.errorLogInfo("", TAG, e);//e.printStackTrace();
|
|
|
+ return 0;
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+ public void SetSoundOutputOfEventAlarm( boolean OutSount )
|
|
|
+ {
|
|
|
+ try
|
|
|
+ {
|
|
|
+
|
|
|
+ UpdateWallPADData(SOUND_OUTPUT_EVENT_ALARM, String.valueOf(OutSount) );
|
|
|
+ }
|
|
|
+ catch (RuntimeException re) {
|
|
|
+ LogUtil.errorLogInfo("", TAG, re);
|
|
|
+ }
|
|
|
+ catch (Exception e )
|
|
|
+ {
|
|
|
+ LogUtil.errorLogInfo("", TAG, e);//e.printStackTrace();
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ public boolean GetSoundOutputOfEventAlarm()
|
|
|
+ {
|
|
|
+ try
|
|
|
+ {
|
|
|
+ String ret = GetWallPADData(SOUND_OUTPUT_EVENT_ALARM);
|
|
|
+
|
|
|
+ if( ret.compareTo(String.valueOf(true)) == 0 )
|
|
|
+ {
|
|
|
+ return true;
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ catch (RuntimeException re) {
|
|
|
+ LogUtil.errorLogInfo("", TAG, re);
|
|
|
+ return true;
|
|
|
+ }
|
|
|
+ catch (Exception e )
|
|
|
+ {
|
|
|
+ LogUtil.errorLogInfo("", TAG, e);//e.printStackTrace();
|
|
|
+ return true;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ public void Set_MultiSwitch_Concent_Use( boolean value)
|
|
|
+ {
|
|
|
+ try
|
|
|
+ {
|
|
|
+ UpdateWallPADData(MULTISWITCH_CONCENT_USE, String.valueOf(value) );
|
|
|
+ }
|
|
|
+ catch (RuntimeException re) {
|
|
|
+ LogUtil.errorLogInfo("", TAG, re);
|
|
|
+ }
|
|
|
+ catch (Exception e )
|
|
|
+ {
|
|
|
+ LogUtil.errorLogInfo("", TAG, e);//e.printStackTrace();
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ public boolean Get_MultiSwitch_Concent_Use()
|
|
|
+ {
|
|
|
+ try
|
|
|
+ {
|
|
|
+ String ret = GetWallPADData(MULTISWITCH_CONCENT_USE);
|
|
|
+
|
|
|
+ if( ret.compareTo(String.valueOf(true)) == 0 )
|
|
|
+ {
|
|
|
+ return true;
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ catch (RuntimeException re) {
|
|
|
+ LogUtil.errorLogInfo("", TAG, re);
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ catch (Exception e )
|
|
|
+ {
|
|
|
+ LogUtil.errorLogInfo("", TAG, e);//e.printStackTrace();
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 웰컴조명 선택된 조명 설정한다.<br>
|
|
|
+ * 거실등/복도등/주방등 순으로 설정
|
|
|
+ * @param value
|
|
|
+ */
|
|
|
+ public void Set_WelcomeLight_Selected( String value)
|
|
|
+ {
|
|
|
+ try
|
|
|
+ {
|
|
|
+ String[] split = value.split("/");
|
|
|
+ if(split.length != 3)
|
|
|
+ {
|
|
|
+ Log.e(TAG, "[Set_WelcomeLight_Selected] - LEN ERROR !!!");
|
|
|
+ return;
|
|
|
+ }
|
|
|
+
|
|
|
+ for(int i = 0; i < split.length; i++)
|
|
|
+ {
|
|
|
+ int ival = Integer.parseInt(split[i]);
|
|
|
+ if(ival < 0 || ival > 1)
|
|
|
+ {
|
|
|
+ Log.e(TAG, "[Set_WelcomeLight_Selected] - WRONG DATA SAVED !!!");
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ UpdateWallPADData(WELCOMELIGHT_SELECT_ITEMS, value );
|
|
|
+ }
|
|
|
+ catch (RuntimeException re) {
|
|
|
+ LogUtil.errorLogInfo("", TAG, re);
|
|
|
+ }
|
|
|
+ catch (Exception e )
|
|
|
+ {
|
|
|
+ LogUtil.errorLogInfo("", TAG, e);//e.printStackTrace();
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 웰컴조명 선택된 조명을 가져온다.<br>
|
|
|
+ * 거실등/복도등/주방등 순으로 저장되어 있음<br>
|
|
|
+ * 저장된 값의 형식이 틀린 경우 모두 사용안함 반환 : 0/0/0
|
|
|
+ */
|
|
|
+ public String Get_WelcomeLight_Selected()
|
|
|
+ {
|
|
|
+ try
|
|
|
+ {
|
|
|
+ String ret = GetWallPADData(WELCOMELIGHT_SELECT_ITEMS);
|
|
|
+ String[] split = ret.split("/");
|
|
|
+ if(split.length != 3)
|
|
|
+ {
|
|
|
+ Log.e(TAG, "[Get_WelcomeLight_Selected] - LEN ERROR !!!");
|
|
|
+ return "0/0/0";
|
|
|
+ }
|
|
|
+
|
|
|
+ for(int i = 0; i < split.length; i++)
|
|
|
+ {
|
|
|
+ int ival = Integer.parseInt(split[i]);
|
|
|
+ if(ival < 0 || ival > 1)
|
|
|
+ {
|
|
|
+ Log.e(TAG, "[Get_WelcomeLight_Selected] - WRONG DATA SAVED !!!");
|
|
|
+ return "0/0/0";
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ return ret;
|
|
|
+ }
|
|
|
+ catch (RuntimeException re) {
|
|
|
+ LogUtil.errorLogInfo("", TAG, re);
|
|
|
+ return "0/0/0";
|
|
|
+ }
|
|
|
+ catch (Exception e )
|
|
|
+ {
|
|
|
+ LogUtil.errorLogInfo("", TAG, e);//e.printStackTrace();
|
|
|
+ return "0/0/0";
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ public void SetCloseSensorValue( int value)
|
|
|
+ {
|
|
|
+ try
|
|
|
+ {
|
|
|
+ UpdateWallPADData(CLOSE_SENSOR_VALUE, String.valueOf(value) );
|
|
|
+ }
|
|
|
+ catch (RuntimeException re) {
|
|
|
+ LogUtil.errorLogInfo("", TAG, re);
|
|
|
+ }
|
|
|
+ catch (Exception e )
|
|
|
+ {
|
|
|
+ LogUtil.errorLogInfo("", TAG, e);//e.printStackTrace();
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ public int GetCloseSensorValue()
|
|
|
+ {
|
|
|
+ try
|
|
|
+ {
|
|
|
+ String ret = GetWallPADData(CLOSE_SENSOR_VALUE);
|
|
|
+ return Integer.parseInt(ret);
|
|
|
+ }
|
|
|
+ catch (RuntimeException re) {
|
|
|
+ LogUtil.errorLogInfo("", TAG, re);
|
|
|
+ return 15; // DB 값 접근 에러 발생시, 민감도 최대로 설정
|
|
|
+ }
|
|
|
+ catch (Exception e )
|
|
|
+ {
|
|
|
+ LogUtil.errorLogInfo("", TAG, e);//e.printStackTrace();
|
|
|
+ return 15; // DB 값 접근 에러 발생시, 민감도 최대로 설정
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ public void Set_InterlayerSensor_Status( String value)
|
|
|
+ {
|
|
|
+ try
|
|
|
+ {
|
|
|
+ UpdateWallPADData(INTERLAYER_NOISE_SENSOR_STATUS, value );
|
|
|
+ }
|
|
|
+ catch (RuntimeException re) {
|
|
|
+ LogUtil.errorLogInfo("", TAG, re);
|
|
|
+ }
|
|
|
+ catch (Exception e )
|
|
|
+ {
|
|
|
+ LogUtil.errorLogInfo("", TAG, e);//e.printStackTrace();
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ public String Get_InterlayerSensor_Status()
|
|
|
+ {
|
|
|
+ try
|
|
|
+ {
|
|
|
+ String ret = GetWallPADData(INTERLAYER_NOISE_SENSOR_STATUS);
|
|
|
+ return ret;
|
|
|
+ }
|
|
|
+ catch (RuntimeException re) {
|
|
|
+ LogUtil.errorLogInfo("", TAG, re);
|
|
|
+ return "EXCEPTION";
|
|
|
+ }
|
|
|
+ catch (Exception e )
|
|
|
+ {
|
|
|
+ LogUtil.errorLogInfo("", TAG, e);//e.printStackTrace();
|
|
|
+ return "EXCEPTION";
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ public void SetCurrentScreenIDValue( int value)
|
|
|
+ {
|
|
|
+ try
|
|
|
+ {
|
|
|
+ UpdateWallPADData(CURRENT_SCREEN_ID_VALUE, String.valueOf(value) );
|
|
|
+ }
|
|
|
+ catch (RuntimeException re) {
|
|
|
+ LogUtil.errorLogInfo("", TAG, re);
|
|
|
+ }
|
|
|
+ catch (Exception e )
|
|
|
+ {
|
|
|
+ LogUtil.errorLogInfo("", TAG, e);//e.printStackTrace();
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ public String GetNowMonthSelect()
|
|
|
+ {
|
|
|
+ try
|
|
|
+ {
|
|
|
+ String ret = GetWallPADData(NOW_MONTH_SELECT);
|
|
|
+ return ret;
|
|
|
+ }
|
|
|
+ catch (RuntimeException re) {
|
|
|
+ LogUtil.errorLogInfo("", TAG, re);
|
|
|
+ return "NOW";
|
|
|
+ }
|
|
|
+ catch (Exception e )
|
|
|
+ {
|
|
|
+ LogUtil.errorLogInfo("", TAG, e);//e.printStackTrace();
|
|
|
+ Log.w(TAG, "[GetNowMonthSelect] Exception - Default");
|
|
|
+ return "NOW";
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ public void SetNowMonthSelect( String value)
|
|
|
+ {
|
|
|
+ try
|
|
|
+ {
|
|
|
+ UpdateWallPADData(NOW_MONTH_SELECT, value );
|
|
|
+ }
|
|
|
+ catch (RuntimeException re) {
|
|
|
+ LogUtil.errorLogInfo("", TAG, re);
|
|
|
+ }
|
|
|
+ catch (Exception e )
|
|
|
+ {
|
|
|
+ LogUtil.errorLogInfo("", TAG, e);//e.printStackTrace();
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 저장된 실시간검침기 전력 누적사용량을 가져온다.
|
|
|
+ *
|
|
|
+ * @return - (double) 전력 누적사용량
|
|
|
+ */
|
|
|
+ public double Get_RealTimeMeter_ElecAcc()
|
|
|
+ {
|
|
|
+ try
|
|
|
+ {
|
|
|
+ String ret = GetWallPADData(REALTIMEMETER__ELEC_ACC);
|
|
|
+ return Double.parseDouble(ret);
|
|
|
+ }
|
|
|
+ catch (RuntimeException re) {
|
|
|
+ LogUtil.errorLogInfo("", TAG, re);
|
|
|
+ return 0;
|
|
|
+ }
|
|
|
+ catch (Exception e )
|
|
|
+ {
|
|
|
+ Log.e(TAG, "[Get_RealTimeMeter_ElecAcc] Exception - Default");
|
|
|
+ LogUtil.errorLogInfo("", TAG, e);//e.printStackTrace();
|
|
|
+ return 0;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 실시간검침기 전력 누적사용량을 저장한다.
|
|
|
+ *
|
|
|
+ * @param value - (double) 저장할 값
|
|
|
+ *
|
|
|
+ * @return (boolean) 저장성공여부 true:성공 , false:실패
|
|
|
+ */
|
|
|
+ public boolean Set_RealTimeMeter_ElecAcc(double value)
|
|
|
+ {
|
|
|
+ try
|
|
|
+ {
|
|
|
+ return UpdateWallPADData(REALTIMEMETER__ELEC_ACC, String.format("%.2f", value));
|
|
|
+ }
|
|
|
+ catch (RuntimeException re) {
|
|
|
+ LogUtil.errorLogInfo("", TAG, re);
|
|
|
+ }
|
|
|
+ catch (Exception e )
|
|
|
+ {
|
|
|
+ Log.e(TAG, "[Set_RealTimeMeter_ElecAcc] Exception - Default");
|
|
|
+ LogUtil.errorLogInfo("", TAG, e);//e.printStackTrace();
|
|
|
+ }
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+
|
|
|
+ public int GetCurrentScreenIDValue()
|
|
|
+ {
|
|
|
+ try
|
|
|
+ {
|
|
|
+ String ret = GetWallPADData(CURRENT_SCREEN_ID_VALUE);
|
|
|
+ return Integer.parseInt(ret);
|
|
|
+ }
|
|
|
+ catch (RuntimeException re) {
|
|
|
+ LogUtil.errorLogInfo("", TAG, re);
|
|
|
+ return 0;
|
|
|
+ }
|
|
|
+ catch (Exception e )
|
|
|
+ {
|
|
|
+ LogUtil.errorLogInfo("", TAG, e);//e.printStackTrace();
|
|
|
+ return 0;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ /**
|
|
|
+ * @description
|
|
|
+ // GLE 모델 LED 버튼 밝기 값 저장
|
|
|
+ * 0 ~2 사이값만 입력 하도록 한다.
|
|
|
+ */
|
|
|
+ public void SetLEDButtonBrightnessLevel( int level )
|
|
|
+ {
|
|
|
+ try
|
|
|
+ {
|
|
|
+ if( level >=0 && level <= 2 )
|
|
|
+ {
|
|
|
+ UpdateWallPADData(LED_BUTTON_BRIGHTNESS_LEVEL, String.valueOf(level) );
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ Log.d(TAG , "SetLEDButtonBrightnessLevel input fail ");
|
|
|
+ }
|
|
|
+ }
|
|
|
+ catch (RuntimeException re) {
|
|
|
+ LogUtil.errorLogInfo("", TAG, re);
|
|
|
+ }
|
|
|
+ catch (Exception e )
|
|
|
+ {
|
|
|
+ LogUtil.errorLogInfo("", TAG, e);//e.printStackTrace();
|
|
|
+ }
|
|
|
+ }
|
|
|
+ /**
|
|
|
+ * @description
|
|
|
+ * GEL 모델 LED 버튼 밝기 값 리턴
|
|
|
+ * 리턴값은 0~2 의값만 리턴된다.
|
|
|
+ */
|
|
|
+ public int GetLEDButtonBrightnessLevel()
|
|
|
+ {
|
|
|
+ try
|
|
|
+ {
|
|
|
+ String ret = GetWallPADData(LED_BUTTON_BRIGHTNESS_LEVEL);
|
|
|
+ return Integer.parseInt(ret);
|
|
|
+ }
|
|
|
+ catch (RuntimeException re) {
|
|
|
+ LogUtil.errorLogInfo("", TAG, re);
|
|
|
+ return 0;
|
|
|
+ }
|
|
|
+ catch (Exception e )
|
|
|
+ {
|
|
|
+ LogUtil.errorLogInfo("", TAG, e);//e.printStackTrace();
|
|
|
+ return 0;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ /**
|
|
|
+ * @description
|
|
|
+ * APU 감지시 정전 상태 저장.... 정전이면 true, 복전이면 false 입력하도록 한다.
|
|
|
+ */
|
|
|
+ public void SetBlackOutEnergy( boolean Off )
|
|
|
+ {
|
|
|
+ try
|
|
|
+ {
|
|
|
+ UpdateWallPADData(BLACK_OUT_ENERGY, String.valueOf(Off) );
|
|
|
+ }
|
|
|
+ catch (RuntimeException re) {
|
|
|
+ LogUtil.errorLogInfo("", TAG, re);
|
|
|
+ }
|
|
|
+ catch (Exception e )
|
|
|
+ {
|
|
|
+ LogUtil.errorLogInfo("", TAG, e);//e.printStackTrace();
|
|
|
+ }
|
|
|
+ }
|
|
|
+ /**
|
|
|
+ * @description
|
|
|
+ * 정전 상태 리턴... true 정전... false 이면 복전 값을 리턴한다.
|
|
|
+ */
|
|
|
+ public boolean GetCurrentBlackOutEnergy()
|
|
|
+ {
|
|
|
+ try
|
|
|
+ {
|
|
|
+ String ret = GetWallPADData(BLACK_OUT_ENERGY);
|
|
|
+
|
|
|
+ if( ret.compareTo(String.valueOf(true)) == 0 )
|
|
|
+ {
|
|
|
+ return true;
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ catch (RuntimeException re) {
|
|
|
+ LogUtil.errorLogInfo("", TAG, re);
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ catch (Exception e )
|
|
|
+ {
|
|
|
+ LogUtil.errorLogInfo("", TAG, e);//e.printStackTrace();
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ /**
|
|
|
+ * @description
|
|
|
+ // 마지막으로 실행된 메인 스크린 화면을 아이디를 저장하거나...
|
|
|
+ // 사용자가 고정시켜둔 메인스크린 화면을 저장하도록 한다.
|
|
|
+ */
|
|
|
+ public void SetSelectedMainScreen( int id )
|
|
|
+ {
|
|
|
+ try
|
|
|
+ {
|
|
|
+ if( id == MAIN_DEFAULT_SCREEN || id == MAIN_BOOKMARK_SCREEN || id == MAIN_ENERGY_SCREEN )
|
|
|
+ {
|
|
|
+ UpdateWallPADData(MAIN_SELECTED_SCREEN , String.valueOf(id) );
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ Log.d(TAG , "SetSelectedMainScreen input Fail ");
|
|
|
+ }
|
|
|
+ }
|
|
|
+ catch (RuntimeException re) {
|
|
|
+ LogUtil.errorLogInfo("", TAG, re);
|
|
|
+ }
|
|
|
+ catch (Exception e )
|
|
|
+ {
|
|
|
+ LogUtil.errorLogInfo("", TAG, e);//e.printStackTrace();
|
|
|
+ }
|
|
|
+ }
|
|
|
+ /**
|
|
|
+ * @description
|
|
|
+ * 마지막으로 실행된 메인 스크린 화면을 아이디를 리턴 하거나
|
|
|
+ * 사용자가 고정시켜둔 메인스크린 화면을 id를 리턴하도록 한다.
|
|
|
+ */
|
|
|
+ public int GetSelectedMainScreen()
|
|
|
+ {
|
|
|
+ try
|
|
|
+ {
|
|
|
+ String ret = GetWallPADData(MAIN_SELECTED_SCREEN);
|
|
|
+ return Integer.parseInt(ret);
|
|
|
+ }
|
|
|
+ catch (RuntimeException re) {
|
|
|
+ LogUtil.errorLogInfo("", TAG, re);
|
|
|
+ return 0;
|
|
|
+ }
|
|
|
+ catch (Exception e )
|
|
|
+ {
|
|
|
+ LogUtil.errorLogInfo("", TAG, e);//e.printStackTrace();
|
|
|
+ return 0;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ /**
|
|
|
+ * @description
|
|
|
+ * 무드등 램프 상태 ( 월패드 전원 재인가시 사용하기 위해 )
|
|
|
+ * input Param
|
|
|
+ * true 이면 On
|
|
|
+ * false 이면 Off
|
|
|
+ */
|
|
|
+ public void SetMoodLampState( boolean On )
|
|
|
+ {
|
|
|
+ try
|
|
|
+ {
|
|
|
+
|
|
|
+ UpdateWallPADData(MOOD_LAMP_STATE, String.valueOf(On) );
|
|
|
+ }
|
|
|
+ catch (RuntimeException re) {
|
|
|
+ LogUtil.errorLogInfo("", TAG, re);
|
|
|
+ }
|
|
|
+ catch (Exception e )
|
|
|
+ {
|
|
|
+ LogUtil.errorLogInfo("", TAG, e);//e.printStackTrace();
|
|
|
+ }
|
|
|
+ }
|
|
|
+ /**
|
|
|
+ * @description
|
|
|
+ * 무드등 램프 상태 리턴 ( 월패드 전원 재인가시 사용하기 위해 )
|
|
|
+ * return Param
|
|
|
+ * true 이면 On
|
|
|
+ * false 이면 Off
|
|
|
+ */
|
|
|
+ public boolean GetMoodLampState()
|
|
|
+ {
|
|
|
+ try
|
|
|
+ {
|
|
|
+ String ret = GetWallPADData(MOOD_LAMP_STATE);
|
|
|
+
|
|
|
+ if( ret.compareTo(String.valueOf(true)) == 0 )
|
|
|
+ {
|
|
|
+ return true;
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ catch (RuntimeException re) {
|
|
|
+ LogUtil.errorLogInfo("", TAG, re);
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ catch (Exception e )
|
|
|
+ {
|
|
|
+ LogUtil.errorLogInfo("", TAG, e);//e.printStackTrace();
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ public void SetCarSoundOfEventAlarm( boolean OutSount )
|
|
|
+ {
|
|
|
+ try
|
|
|
+ {
|
|
|
+
|
|
|
+ UpdateWallPADData(SOUND_OUTPUT_CAR_ALARM, String.valueOf(OutSount) );
|
|
|
+ }
|
|
|
+ catch (RuntimeException re) {
|
|
|
+ LogUtil.errorLogInfo("", TAG, re);
|
|
|
+ }
|
|
|
+ catch (Exception e )
|
|
|
+ {
|
|
|
+ LogUtil.errorLogInfo("", TAG, e);//e.printStackTrace();
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ public boolean GetCarSoundOfEventAlarm()
|
|
|
+ {
|
|
|
+ try
|
|
|
+ {
|
|
|
+ String ret = GetWallPADData(SOUND_OUTPUT_CAR_ALARM);
|
|
|
+
|
|
|
+ if( ret.compareTo(String.valueOf(true)) == 0 )
|
|
|
+ {
|
|
|
+ return true;
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ catch (RuntimeException re) {
|
|
|
+ LogUtil.errorLogInfo("", TAG, re);
|
|
|
+ return true;
|
|
|
+ }
|
|
|
+ catch (Exception e )
|
|
|
+ {
|
|
|
+ LogUtil.errorLogInfo("", TAG, e);//e.printStackTrace();
|
|
|
+ return true;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ public void SetCallSoundOfEventAlarm( boolean OutSound )
|
|
|
+ {
|
|
|
+ try
|
|
|
+ {
|
|
|
+
|
|
|
+ UpdateWallPADData(SOUND_OUTPUT_CALL_ALARM, String.valueOf(OutSound) );
|
|
|
+ }
|
|
|
+ catch (RuntimeException re) {
|
|
|
+ LogUtil.errorLogInfo("", TAG, re);
|
|
|
+ }
|
|
|
+ catch (Exception e )
|
|
|
+ {
|
|
|
+ LogUtil.errorLogInfo("", TAG, e);//e.printStackTrace();
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ public boolean GetCallSoundOfEventAlarm()
|
|
|
+ {
|
|
|
+ try
|
|
|
+ {
|
|
|
+ String ret = GetWallPADData(SOUND_OUTPUT_CALL_ALARM);
|
|
|
+
|
|
|
+ if( ret.compareTo(String.valueOf(true)) == 0 )
|
|
|
+ {
|
|
|
+ return true;
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ catch (RuntimeException re) {
|
|
|
+ LogUtil.errorLogInfo("", TAG, re);
|
|
|
+ return true;
|
|
|
+ }
|
|
|
+ catch (Exception e )
|
|
|
+ {
|
|
|
+ LogUtil.errorLogInfo("", TAG, e);//e.printStackTrace();
|
|
|
+ return true;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ public void SetBandLocationEventAlarm( boolean OutSount )
|
|
|
+ {
|
|
|
+ try
|
|
|
+ {
|
|
|
+
|
|
|
+ UpdateWallPADData(SOUND_OUTPUT_BAND_LOCATION, String.valueOf(OutSount) );
|
|
|
+ }
|
|
|
+ catch (RuntimeException re) {
|
|
|
+ LogUtil.errorLogInfo("", TAG, re);
|
|
|
+ }
|
|
|
+ catch (Exception e )
|
|
|
+ {
|
|
|
+ LogUtil.errorLogInfo("", TAG, e);//e.printStackTrace();
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ public boolean GetBandLocationEventAlarm()
|
|
|
+ {
|
|
|
+ try
|
|
|
+ {
|
|
|
+ String ret = GetWallPADData(SOUND_OUTPUT_BAND_LOCATION);
|
|
|
+
|
|
|
+ if( ret.compareTo(String.valueOf(true)) == 0 )
|
|
|
+ {
|
|
|
+ return true;
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ catch (RuntimeException re) {
|
|
|
+ LogUtil.errorLogInfo("", TAG, re);
|
|
|
+ return true;
|
|
|
+ }
|
|
|
+ catch (Exception e )
|
|
|
+ {
|
|
|
+ LogUtil.errorLogInfo("", TAG, e);//e.printStackTrace();
|
|
|
+ return true;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ public void SetNoisePopupUse( boolean OutSount )
|
|
|
+ {
|
|
|
+ try
|
|
|
+ {
|
|
|
+ UpdateWallPADData(INTERLAYER_NOISE_POPUP_USE, String.valueOf(OutSount) );
|
|
|
+ }
|
|
|
+ catch (RuntimeException re) {
|
|
|
+ LogUtil.errorLogInfo("", TAG, re);
|
|
|
+ }
|
|
|
+ catch (Exception e )
|
|
|
+ {
|
|
|
+ LogUtil.errorLogInfo("", TAG, e);//e.printStackTrace();
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ public boolean GetNoisePopupUse()
|
|
|
+ {
|
|
|
+ try
|
|
|
+ {
|
|
|
+ String ret = GetWallPADData(INTERLAYER_NOISE_POPUP_USE);
|
|
|
+
|
|
|
+ if( ret.compareTo(String.valueOf(true)) == 0 )
|
|
|
+ {
|
|
|
+ return true;
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ catch (RuntimeException re) {
|
|
|
+ LogUtil.errorLogInfo("", TAG, re);
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ catch (Exception e )
|
|
|
+ {
|
|
|
+ LogUtil.errorLogInfo("", TAG, e);//e.printStackTrace();
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 스마트 재실센서 기본모드1 사용설정 <br>
|
|
|
+ * 기본모드1 (조명 에너지 절약)
|
|
|
+ *
|
|
|
+ * @param mode - (boolean) 설정할 값 (true:ON , false:OFF)
|
|
|
+ */
|
|
|
+ public void Set_InRoomDetect_Scenario_Normal1( boolean mode )
|
|
|
+ {
|
|
|
+ try
|
|
|
+ {
|
|
|
+ UpdateWallPADData(INROOMDETECT_SCENARIO_NORMAL1, String.valueOf(mode) );
|
|
|
+ }
|
|
|
+ catch (RuntimeException re) {
|
|
|
+ LogUtil.errorLogInfo("", TAG, re);
|
|
|
+ }
|
|
|
+ catch (Exception e )
|
|
|
+ {
|
|
|
+ LogUtil.errorLogInfo("", TAG, e);//e.printStackTrace();
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 스마트 재실센서 기본모드1 사용여부 확인 <br>
|
|
|
+ * 기본모드1 (조명 에너지 절약)
|
|
|
+ *
|
|
|
+ */
|
|
|
+ public boolean Get_InRoomDetect_Scenario_Normal1()
|
|
|
+ {
|
|
|
+ try
|
|
|
+ {
|
|
|
+ String ret = GetWallPADData(INROOMDETECT_SCENARIO_NORMAL1);
|
|
|
+
|
|
|
+ if (ret.compareTo(String.valueOf(true)) == 0) { return true; }
|
|
|
+ else { return false; }
|
|
|
+ }
|
|
|
+ catch (RuntimeException re) {
|
|
|
+ LogUtil.errorLogInfo("", TAG, re);
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ catch (Exception e)
|
|
|
+ {
|
|
|
+ LogUtil.errorLogInfo("", TAG, e);//e.printStackTrace();
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 스마트 재실센서 기본모드2 사용설정 <br>
|
|
|
+ * 기본모드2 (야간 식탁등 켜짐)
|
|
|
+ *
|
|
|
+ * @param mode - (boolean) 설정할 값 (true:ON , false:OFF)
|
|
|
+ */
|
|
|
+ public void Set_InRoomDetect_Scenario_Normal2( boolean mode )
|
|
|
+ {
|
|
|
+ try
|
|
|
+ {
|
|
|
+ UpdateWallPADData(INROOMDETECT_SCENARIO_NORMAL2, String.valueOf(mode) );
|
|
|
+ }
|
|
|
+ catch (RuntimeException re) {
|
|
|
+ LogUtil.errorLogInfo("", TAG, re);
|
|
|
+ }
|
|
|
+ catch (Exception e )
|
|
|
+ {
|
|
|
+ LogUtil.errorLogInfo("", TAG, e);//e.printStackTrace();
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 스마트 재실센서 기본모드2 사용여부 확인 <br>
|
|
|
+ * 기본모드2 (야간 식탁등 켜짐)
|
|
|
+ *
|
|
|
+ */
|
|
|
+ public boolean Get_InRoomDetect_Scenario_Normal2()
|
|
|
+ {
|
|
|
+ try
|
|
|
+ {
|
|
|
+ String ret = GetWallPADData(INROOMDETECT_SCENARIO_NORMAL2);
|
|
|
+
|
|
|
+ if (ret.compareTo(String.valueOf(true)) == 0) { return true; }
|
|
|
+ else { return false; }
|
|
|
+ }
|
|
|
+ catch (RuntimeException re) {
|
|
|
+ LogUtil.errorLogInfo("", TAG, re);
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ catch (Exception e)
|
|
|
+ {
|
|
|
+ LogUtil.errorLogInfo("", TAG, e);//e.printStackTrace();
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 스마트 재실센서 사용자조명절전 사용설정 <br>
|
|
|
+ *
|
|
|
+ * @param mode - (boolean) 설정할 값 (true:ON , false:OFF)
|
|
|
+ */
|
|
|
+ public void Set_InRoomDetect_Scenario_Userset( boolean mode )
|
|
|
+ {
|
|
|
+ try
|
|
|
+ {
|
|
|
+ UpdateWallPADData(INROOMDETECT_SCENARIO_USERSET, String.valueOf(mode) );
|
|
|
+ }
|
|
|
+ catch (RuntimeException re) {
|
|
|
+ LogUtil.errorLogInfo("", TAG, re);
|
|
|
+ }
|
|
|
+ catch (Exception e )
|
|
|
+ {
|
|
|
+ LogUtil.errorLogInfo("", TAG, e);//e.printStackTrace();
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 스마트 재실센서 사용자조명절전 사용여부 확인 <br>
|
|
|
+ *
|
|
|
+ */
|
|
|
+ public boolean Get_InRoomDetect_Scenario_Userset()
|
|
|
+ {
|
|
|
+ try
|
|
|
+ {
|
|
|
+ String ret = GetWallPADData(INROOMDETECT_SCENARIO_USERSET);
|
|
|
+
|
|
|
+ if (ret.compareTo(String.valueOf(true)) == 0) { return true; }
|
|
|
+ else { return false; }
|
|
|
+ }
|
|
|
+ catch (RuntimeException re) {
|
|
|
+ LogUtil.errorLogInfo("", TAG, re);
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ catch (Exception e)
|
|
|
+ {
|
|
|
+ LogUtil.errorLogInfo("", TAG, e);//e.printStackTrace();
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 스마트 재실센서 전기레인지 안전모드 사용설정 <br>
|
|
|
+ *
|
|
|
+ * @param mode - (boolean) 설정할 값 (true:ON , false:OFF)
|
|
|
+ */
|
|
|
+ public void Set_InRoomDetect_Scenario_ElecRangeSafe( boolean mode )
|
|
|
+ {
|
|
|
+ try
|
|
|
+ {
|
|
|
+ UpdateWallPADData(INROOMDETECT_SCENARIO_ELECRANGE_SAFE, String.valueOf(mode) );
|
|
|
+ }
|
|
|
+ catch (RuntimeException re) {
|
|
|
+ LogUtil.errorLogInfo("", TAG, re);
|
|
|
+ }
|
|
|
+ catch (Exception e )
|
|
|
+ {
|
|
|
+ LogUtil.errorLogInfo("", TAG, e);//e.printStackTrace();
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 스마트 재실센서 전기레인지 안전모드 사용여부 확인 <br>
|
|
|
+ *
|
|
|
+ */
|
|
|
+ public boolean Get_InRoomDetect_Scenario_ElecRangeSafe()
|
|
|
+ {
|
|
|
+ try
|
|
|
+ {
|
|
|
+ String ret = GetWallPADData(INROOMDETECT_SCENARIO_ELECRANGE_SAFE);
|
|
|
+
|
|
|
+ if (ret.compareTo(String.valueOf(true)) == 0) { return true; }
|
|
|
+ else { return false; }
|
|
|
+ }
|
|
|
+ catch (RuntimeException re) {
|
|
|
+ LogUtil.errorLogInfo("", TAG, re);
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ catch (Exception e)
|
|
|
+ {
|
|
|
+ LogUtil.errorLogInfo("", TAG, e);//e.printStackTrace();
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 스마트 재실센서 시나리오 공통 설정 <br>
|
|
|
+ *
|
|
|
+ * @param kindStr - (String) 설정할 시나리오 모드
|
|
|
+ * @param startTimeStr - (String) 설정할 시작 시간
|
|
|
+ * @param endTimeStr - (String) 설정할 종료 시간
|
|
|
+ * @param dateStr - (String) 설정할 요일 모음
|
|
|
+ * @param locStr - (String) 설정할 제어위치 모음
|
|
|
+ * @param actTime1Str - (String) 설정할 시나리오 동작시간1
|
|
|
+ * @param act1Str - (String) 설정할 동작1
|
|
|
+ * @param actTime2Str - (String) 설정할 시나리오 동작시간2
|
|
|
+ * @param act2Str - (String) 설정할 동작2
|
|
|
+ *
|
|
|
+ */
|
|
|
+ public void Set_InRoomDetect_Scenario_Modes( String kindStr, String startTimeStr, String endTimeStr, String dateStr, String locStr,
|
|
|
+ String actTime1Str, String act1Str, String actTime2Str, String act2Str )
|
|
|
+ {
|
|
|
+ /*
|
|
|
+ KIND-NORMAL1/START-AM:09:30/END-PM:10:00/DATE-1:2:3:4:5:6:7/
|
|
|
+ LOC-LIV;KIT;TBL;MROOM;BED1;BED2/TIME1-60/ACT1-DIM:30/TIME2-20/ACT2-STAT:OFF
|
|
|
+ */
|
|
|
+ String saveStr = "";
|
|
|
+ String saveMode = "";
|
|
|
+ try
|
|
|
+ {
|
|
|
+ String kind = "";
|
|
|
+ String start = "";
|
|
|
+ String end = "";
|
|
|
+ String date = "";
|
|
|
+ String loc = "";
|
|
|
+ String acttime1 = "";
|
|
|
+ String act1 = "";
|
|
|
+ String acttime2 = "";
|
|
|
+ String act2 = "";
|
|
|
+
|
|
|
+ // 1. KIND - KIND-NORMAL1
|
|
|
+ if(kindStr.equals("NORMAL1") || kindStr.equals("NORMAL2") || kindStr.equals("USERSET") || kindStr.equals("ELECRANGE_SAFE"))
|
|
|
+ {
|
|
|
+ kind += "KIND-" + kindStr;
|
|
|
+
|
|
|
+ if(kindStr.equals("NORMAL1")) saveMode = INROOMDETECT_SCENARIO_NORMAL1_INFO;
|
|
|
+ else if(kindStr.equals("NORMAL2")) saveMode = INROOMDETECT_SCENARIO_NORMAL2_INFO;
|
|
|
+ else if(kindStr.equals("USERSET")) saveMode = INROOMDETECT_SCENARIO_USERSET_INFO;
|
|
|
+ else if(kindStr.equals("ELECRANGE_SAFE")) saveMode = INROOMDETECT_SCENARIO_ELECRANGE_SAFE_INFO;
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ Log.w(TAG, "[Set_InRoomDetect_Scenario_Modes] - Kind Error : " + kindStr);
|
|
|
+ return;
|
|
|
+ }
|
|
|
+
|
|
|
+ // 2. Start Time - START-AM:09:30
|
|
|
+ String[] startArr = startTimeStr.split(":");
|
|
|
+ if(startArr.length == 3)
|
|
|
+ {
|
|
|
+ if(startArr[0].equals("AM") || startArr[0].equals("PM"))
|
|
|
+ { }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ Log.w(TAG, "[Set_InRoomDetect_Scenario_Modes] - startTimeStr ampm : " + startTimeStr);
|
|
|
+ return;
|
|
|
+ }
|
|
|
+
|
|
|
+ if(Integer.parseInt(startArr[1]) >= 0 && Integer.parseInt(startArr[1]) <= 23)
|
|
|
+ { }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ Log.w(TAG, "[Set_InRoomDetect_Scenario_Modes] - startTimeStr hour : " + startTimeStr);
|
|
|
+ return;
|
|
|
+ }
|
|
|
+
|
|
|
+ if(Integer.parseInt(startArr[2]) >= 0 && Integer.parseInt(startArr[2]) <= 59)
|
|
|
+ { }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ Log.w(TAG, "[Set_InRoomDetect_Scenario_Modes] - startTimeStr min : " + startTimeStr);
|
|
|
+ return;
|
|
|
+ }
|
|
|
+
|
|
|
+ start += "START-" + startTimeStr;
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ Log.w(TAG, "[Set_InRoomDetect_Scenario_Modes] - startTimeStr Error : " + startTimeStr);
|
|
|
+ return;
|
|
|
+ }
|
|
|
+
|
|
|
+ // 3. End Time - END-PM:10:00
|
|
|
+ String[] endtimeArr = endTimeStr.split(":");
|
|
|
+ if(endtimeArr.length == 3)
|
|
|
+ {
|
|
|
+ if(endtimeArr[0].equals("AM") || endtimeArr[0].equals("PM"))
|
|
|
+ { }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ Log.w(TAG, "[Set_InRoomDetect_Scenario_Modes] - endTimeStr ampm : " + endTimeStr);
|
|
|
+ return;
|
|
|
+ }
|
|
|
+
|
|
|
+ if(Integer.parseInt(endtimeArr[1]) >= 0 && Integer.parseInt(endtimeArr[1]) <= 23)
|
|
|
+ { }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ Log.w(TAG, "[Set_InRoomDetect_Scenario_Modes] - endTimeStr hour : " + endTimeStr);
|
|
|
+ return;
|
|
|
+ }
|
|
|
+
|
|
|
+ if(Integer.parseInt(endtimeArr[2]) >= 0 && Integer.parseInt(endtimeArr[2]) <= 59)
|
|
|
+ { }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ Log.w(TAG, "[Set_InRoomDetect_Scenario_Modes] - endTimeStr min : " + endTimeStr);
|
|
|
+ return;
|
|
|
+ }
|
|
|
+
|
|
|
+ end += "END-" + endTimeStr;
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ Log.w(TAG, "[Set_InRoomDetect_Scenario_Modes] - endTimeStr Error : " + endTimeStr);
|
|
|
+ return;
|
|
|
+ }
|
|
|
+
|
|
|
+ // 4. Date - DATE-1:2:3:4:5:6:7
|
|
|
+ String[] dates = dateStr.split(":");
|
|
|
+ for(int i = 0; i < dates.length; i++)
|
|
|
+ {
|
|
|
+ if(Integer.parseInt(dates[i]) >= 1 && Integer.parseInt(dates[i]) <= 7)
|
|
|
+ { }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ Log.w(TAG, "[Set_InRoomDetect_Scenario_Modes] - dateStr Range Error : " + i + " / " + dateStr);
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ date += "DATE-" + dateStr;
|
|
|
+
|
|
|
+ // 5. Loc - LOC-LIV;KIT;TBL;MROOM;BED1;BED2
|
|
|
+ String[] locs = locStr.split(";");
|
|
|
+ for(int i = 0; i < locs.length; i++)
|
|
|
+ {
|
|
|
+ if(locs[i].equals("LIV") || locs[i].equals("KIT") || locs[i].equals("TBL") || locs[i].equals("MROOM") ||
|
|
|
+ locs[i].equals("MROOM") || locs[i].equals("BED1") || locs[i].equals("BED2")|| locs[i].equals("ELECRANGE") )
|
|
|
+ { }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ Log.w(TAG, "[Set_InRoomDetect_Scenario_Modes] - locStr Range Error : " + i + " / " + locs[i] + " / " + locStr);
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ loc += "LOC-" + locStr;
|
|
|
+
|
|
|
+ // 6. ActTime1 - TIME1-60
|
|
|
+ if(Integer.parseInt(actTime1Str) >= 0 && Integer.parseInt(actTime1Str) <= 360)
|
|
|
+ { }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ Log.w(TAG, "[Set_InRoomDetect_Scenario_Modes] - actTime1Str Range Error : " + actTime1Str);
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ acttime1 += "TIME1-" + actTime1Str;
|
|
|
+
|
|
|
+ // 7. Act1 - ACT1-DIM:30
|
|
|
+ String[] act1s = act1Str.split(";");
|
|
|
+ for(int j = 0; j < act1s.length; j++)
|
|
|
+ {
|
|
|
+ String[] firsts = act1s[j].split(":");
|
|
|
+ if(firsts.length == 2)
|
|
|
+ {
|
|
|
+ if(firsts[0].equals("DIM") )
|
|
|
+ {
|
|
|
+ if(Integer.parseInt(firsts[1]) >= 10 && Integer.parseInt(firsts[1]) <= 100)
|
|
|
+ { }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ Log.w(TAG, "[Set_InRoomDetect_Scenario_Modes] - act1s DIM Error : " + j + " / " + act1s);
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ else if(firsts[0].equals("STAT") )
|
|
|
+ {
|
|
|
+ if(firsts[1].equals("ON") || firsts[1].equals("OFF"))
|
|
|
+ { }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ Log.w(TAG, "[Set_InRoomDetect_Scenario_Modes] - act1s STAT Error : " + act1s);
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ act1 += "ACT1-" + act1Str;
|
|
|
+
|
|
|
+ // 8. ActTime2 - TIME2-60
|
|
|
+ if(Integer.parseInt(actTime2Str) >= 0 && Integer.parseInt(actTime2Str) <= 360)
|
|
|
+ { }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ Log.w(TAG, "[Set_InRoomDetect_Scenario_Modes] - actTime2Str Range Error : " + actTime2Str);
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ acttime2 += "TIME2-" + actTime2Str;
|
|
|
+
|
|
|
+ // 9. Act2 - ACT2-STAT:OFF
|
|
|
+ String[] act2s = act1Str.split(";");
|
|
|
+ for(int j = 0; j < act2s.length; j++)
|
|
|
+ {
|
|
|
+ String[] firsts = act2s[j].split(":");
|
|
|
+ if(firsts.length == 2)
|
|
|
+ {
|
|
|
+ if(firsts[0].equals("DIM") )
|
|
|
+ {
|
|
|
+ if(Integer.parseInt(firsts[1]) >= 10 && Integer.parseInt(firsts[1]) <= 100)
|
|
|
+ { }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ Log.w(TAG, "[Set_InRoomDetect_Scenario_Modes] - act1s DIM Error : " + act2s);
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ else if(firsts[0].equals("STAT") )
|
|
|
+ {
|
|
|
+ if(firsts[1].equals("ON") || firsts[1].equals("OFF"))
|
|
|
+ { }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ Log.w(TAG, "[Set_InRoomDetect_Scenario_Modes] - act1s STAT Error : " + act2s);
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ act2 += "ACT2-" + act2Str;
|
|
|
+
|
|
|
+
|
|
|
+ saveStr += kind + "/" + start + "/" + end + "/" + date + "/" + loc + "/" + acttime1 + "/" + act1 + "/" + acttime2 + "/" + act2;
|
|
|
+ Log.d(TAG, "[Set_InRoomDetect_Scenario_Modes] - save : " + saveStr);
|
|
|
+
|
|
|
+ UpdateWallPADData(saveMode, saveStr);
|
|
|
+
|
|
|
+ }
|
|
|
+ catch (RuntimeException re) {
|
|
|
+ LogUtil.errorLogInfo("", TAG, re);
|
|
|
+ }
|
|
|
+ catch (Exception ee)
|
|
|
+ {
|
|
|
+ Log.w(TAG, "[Set_InRoomDetect_Scenario_Modes] - Exception !!!");
|
|
|
+ LogUtil.errorLogInfo("", TAG, ee);//ee.printStackTrace();
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 스마트 재실센서 기본모드1 사용설정 <br>
|
|
|
+ *
|
|
|
+ * @param modeStr - (String) 설정할 값
|
|
|
+ */
|
|
|
+ public void Set_InRoomDetect_Scenario_Mode_Normal1( String modeStr )
|
|
|
+ {
|
|
|
+ try
|
|
|
+ {
|
|
|
+ String[] infos = modeStr.split("/");
|
|
|
+
|
|
|
+ if(infos.length != 9) return;
|
|
|
+
|
|
|
+ //String kind, startRunTime, endRunTime, date, loc, nonDetectTime1, act1, nonDetectTime2, act2;
|
|
|
+ boolean error = false;
|
|
|
+
|
|
|
+ for(int i = 0; i < infos.length; i++)
|
|
|
+ {
|
|
|
+ String[] data = infos[i].split("-");
|
|
|
+ if(data.length != 2)
|
|
|
+ {
|
|
|
+ Log.w(TAG, "[Set_InRoomDetect_Scenario_Mode_Normal1] each data LEN ERROR !!! : " + infos[i]);
|
|
|
+ error = true;
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ String type = data[0];
|
|
|
+ String info = data[1];
|
|
|
+
|
|
|
+ if(type.equals("KIND"))
|
|
|
+ {
|
|
|
+ if( !info.equals("NORMAL1") && !info.equals("NORMAL2") && !info.equals("USERSET") && !info.equals("ELECRANGE_SAFE") )
|
|
|
+ {
|
|
|
+ Log.w(TAG, "[Set_InRoomDetect_Scenario_Mode_Normal1] - KIND Err : " + info);
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ else if(type.equals("START")) { }
|
|
|
+ else if(type.equals("END")) { }
|
|
|
+ else if(type.equals("DATE")) { }
|
|
|
+ else if(type.equals("LOC")) { }
|
|
|
+ else if(type.equals("TIME1")) { }
|
|
|
+ else if(type.equals("TIME2")) { }
|
|
|
+ else if(type.equals("ACT1")) { }
|
|
|
+ else if(type.equals("ACT2")) { }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ Log.w(TAG, "[Set_InRoomDetect_Scenario_Mode_Normal1] type ERROR !!! : " + infos[i]);
|
|
|
+ error = true;
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ if(!error)
|
|
|
+ {
|
|
|
+ UpdateWallPADData(INROOMDETECT_SCENARIO_NORMAL1_INFO, modeStr);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ catch (RuntimeException re) {
|
|
|
+ LogUtil.errorLogInfo("", TAG, re);
|
|
|
+ }
|
|
|
+ catch (Exception e )
|
|
|
+ {
|
|
|
+ LogUtil.errorLogInfo("", TAG, e);//e.printStackTrace();
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 스마트 재실센서 기본모드1 사용여부 확인 <br>
|
|
|
+ *
|
|
|
+ */
|
|
|
+ public String Get_InRoomDetect_Scenario_Mode_Normal1()
|
|
|
+ {
|
|
|
+ try
|
|
|
+ {
|
|
|
+ String ret = GetWallPADData(INROOMDETECT_SCENARIO_NORMAL1_INFO);
|
|
|
+
|
|
|
+ //if (ret.compareTo(String.valueOf(true)) == 0) { return true; }
|
|
|
+ //else { return false; }
|
|
|
+
|
|
|
+ return ret;
|
|
|
+ }
|
|
|
+ catch (RuntimeException re) {
|
|
|
+ LogUtil.errorLogInfo("", TAG, re);
|
|
|
+ return "";
|
|
|
+ }
|
|
|
+ catch (Exception e)
|
|
|
+ {
|
|
|
+ LogUtil.errorLogInfo("", TAG, e);//e.printStackTrace();
|
|
|
+ return "";
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 스마트 재실센서 기본모드2 사용설정 <br>
|
|
|
+ *
|
|
|
+ * @param modeStr - (String) 설정할 값
|
|
|
+ */
|
|
|
+ public void Set_InRoomDetect_Scenario_Mode_Normal2( String modeStr )
|
|
|
+ {
|
|
|
+ try
|
|
|
+ {
|
|
|
+ String[] infos = modeStr.split("/");
|
|
|
+
|
|
|
+ if(infos.length != 9) return;
|
|
|
+
|
|
|
+ //String kind, startRunTime, endRunTime, date, loc, nonDetectTime1, act1, nonDetectTime2, act2;
|
|
|
+ boolean error = false;
|
|
|
+
|
|
|
+ for(int i = 0; i < infos.length; i++)
|
|
|
+ {
|
|
|
+ String[] data = infos[i].split("-");
|
|
|
+ if(data.length != 2)
|
|
|
+ {
|
|
|
+ Log.w(TAG, "[Set_InRoomDetect_Scenario_Mode_Normal1] each data LEN ERROR !!! : " + infos[i]);
|
|
|
+ error = true;
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ String type = data[0];
|
|
|
+ String info = data[1];
|
|
|
+
|
|
|
+ if(type.equals("KIND"))
|
|
|
+ {
|
|
|
+ if( !info.equals("NORMAL1") && !info.equals("NORMAL2") && !info.equals("USERSET") && !info.equals("ELECRANGE_SAFE") )
|
|
|
+ {
|
|
|
+ Log.w(TAG, "[Set_InRoomDetect_Scenario_Mode_Normal1] - KIND Err : " + info);
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ else if(type.equals("START")) { }
|
|
|
+ else if(type.equals("END")) { }
|
|
|
+ else if(type.equals("DATE")) { }
|
|
|
+ else if(type.equals("LOC")) { }
|
|
|
+ else if(type.equals("TIME1")) { }
|
|
|
+ else if(type.equals("TIME2")) { }
|
|
|
+ else if(type.equals("ACT1")) { }
|
|
|
+ else if(type.equals("ACT2")) { }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ Log.w(TAG, "[Set_InRoomDetect_Scenario_Mode_Normal1] type ERROR !!! : " + infos[i]);
|
|
|
+ error = true;
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ if(!error)
|
|
|
+ {
|
|
|
+ UpdateWallPADData(INROOMDETECT_SCENARIO_NORMAL2_INFO, modeStr);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ catch (RuntimeException re) {
|
|
|
+ LogUtil.errorLogInfo("", TAG, re);
|
|
|
+ }
|
|
|
+ catch (Exception e )
|
|
|
+ {
|
|
|
+ LogUtil.errorLogInfo("", TAG, e);//e.printStackTrace();
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 스마트 재실센서 기본모드2 사용여부 확인 <br>
|
|
|
+ *
|
|
|
+ */
|
|
|
+ public String Get_InRoomDetect_Scenario_Mode_Normal2()
|
|
|
+ {
|
|
|
+ try
|
|
|
+ {
|
|
|
+ String ret = GetWallPADData(INROOMDETECT_SCENARIO_NORMAL2_INFO);
|
|
|
+
|
|
|
+ //if (ret.compareTo(String.valueOf(true)) == 0) { return true; }
|
|
|
+ //else { return false; }
|
|
|
+
|
|
|
+ return ret;
|
|
|
+ }
|
|
|
+ catch (RuntimeException re) {
|
|
|
+ LogUtil.errorLogInfo("", TAG, re);
|
|
|
+ return "";
|
|
|
+ }
|
|
|
+ catch (Exception e)
|
|
|
+ {
|
|
|
+ LogUtil.errorLogInfo("", TAG, e);//e.printStackTrace();
|
|
|
+ return "";
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 스마트 재실센서 사용자설정모드 사용설정 <br>
|
|
|
+ *
|
|
|
+ * @param modeStr - (String) 설정할 값
|
|
|
+ */
|
|
|
+ public void Set_InRoomDetect_Scenario_Mode_Userset( String modeStr )
|
|
|
+ {
|
|
|
+ try
|
|
|
+ {
|
|
|
+ String[] infos = modeStr.split("/");
|
|
|
+
|
|
|
+ if(infos.length != 9) return;
|
|
|
+
|
|
|
+ //String kind, startRunTime, endRunTime, date, loc, nonDetectTime1, act1, nonDetectTime2, act2;
|
|
|
+ boolean error = false;
|
|
|
+
|
|
|
+ for(int i = 0; i < infos.length; i++)
|
|
|
+ {
|
|
|
+ String[] data = infos[i].split("-");
|
|
|
+ if(data.length != 2)
|
|
|
+ {
|
|
|
+ Log.w(TAG, "[Set_InRoomDetect_Scenario_Mode_Normal1] each data LEN ERROR !!! : " + infos[i]);
|
|
|
+ error = true;
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ String type = data[0];
|
|
|
+ String info = data[1];
|
|
|
+
|
|
|
+ if(type.equals("KIND"))
|
|
|
+ {
|
|
|
+ if( !info.equals("NORMAL1") && !info.equals("NORMAL2") && !info.equals("USERSET") && !info.equals("ELECRANGE_SAFE") )
|
|
|
+ {
|
|
|
+ Log.w(TAG, "[Set_InRoomDetect_Scenario_Mode_Normal1] - KIND Err : " + info);
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ else if(type.equals("START")) { }
|
|
|
+ else if(type.equals("END")) { }
|
|
|
+ else if(type.equals("DATE")) { }
|
|
|
+ else if(type.equals("LOC")) { }
|
|
|
+ else if(type.equals("TIME1")) { }
|
|
|
+ else if(type.equals("TIME2")) { }
|
|
|
+ else if(type.equals("ACT1")) { }
|
|
|
+ else if(type.equals("ACT2")) { }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ Log.w(TAG, "[Set_InRoomDetect_Scenario_Mode_Normal1] type ERROR !!! : " + infos[i]);
|
|
|
+ error = true;
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ if(!error)
|
|
|
+ {
|
|
|
+ UpdateWallPADData(INROOMDETECT_SCENARIO_USERSET_INFO, modeStr);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ catch (RuntimeException re) {
|
|
|
+ LogUtil.errorLogInfo("", TAG, re);
|
|
|
+ }
|
|
|
+ catch (Exception e )
|
|
|
+ {
|
|
|
+ LogUtil.errorLogInfo("", TAG, e);//e.printStackTrace();
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 스마트 재실센서 사용자설정모드 사용여부 확인 <br>
|
|
|
+ *
|
|
|
+ */
|
|
|
+ public String Get_InRoomDetect_Scenario_Mode_Userset()
|
|
|
+ {
|
|
|
+ try
|
|
|
+ {
|
|
|
+ String ret = GetWallPADData(INROOMDETECT_SCENARIO_USERSET_INFO);
|
|
|
+
|
|
|
+ //if (ret.compareTo(String.valueOf(true)) == 0) { return true; }
|
|
|
+ //else { return false; }
|
|
|
+
|
|
|
+ return ret;
|
|
|
+ }
|
|
|
+ catch (RuntimeException re) {
|
|
|
+ LogUtil.errorLogInfo("", TAG, re);
|
|
|
+ return "";
|
|
|
+ }
|
|
|
+ catch (Exception e)
|
|
|
+ {
|
|
|
+ LogUtil.errorLogInfo("", TAG, e);//e.printStackTrace();
|
|
|
+ return "";
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 스마트 재실센서 전기레인지 안전모드 사용설정 <br>
|
|
|
+ *
|
|
|
+ * @param modeStr - (String) 설정할 값
|
|
|
+ */
|
|
|
+ public void Set_InRoomDetect_Scenario_Mode_ElecRangeSafe( String modeStr )
|
|
|
+ {
|
|
|
+ try
|
|
|
+ {
|
|
|
+ String[] infos = modeStr.split("/");
|
|
|
+
|
|
|
+ if(infos.length != 9) return;
|
|
|
+
|
|
|
+ //String kind, startRunTime, endRunTime, date, loc, nonDetectTime1, act1, nonDetectTime2, act2;
|
|
|
+ boolean error = false;
|
|
|
+
|
|
|
+ for(int i = 0; i < infos.length; i++)
|
|
|
+ {
|
|
|
+ String[] data = infos[i].split("-");
|
|
|
+ if(data.length != 2)
|
|
|
+ {
|
|
|
+ Log.w(TAG, "[Set_InRoomDetect_Scenario_Mode_Normal1] each data LEN ERROR !!! : " + infos[i]);
|
|
|
+ error = true;
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ String type = data[0];
|
|
|
+ String info = data[1];
|
|
|
+
|
|
|
+ if(type.equals("KIND"))
|
|
|
+ {
|
|
|
+ if( !info.equals("NORMAL1") && !info.equals("NORMAL2") && !info.equals("USERSET") && !info.equals("ELECRANGE_SAFE") )
|
|
|
+ {
|
|
|
+ Log.w(TAG, "[Set_InRoomDetect_Scenario_Mode_Normal1] - KIND Err : " + info);
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ else if(type.equals("START")) { }
|
|
|
+ else if(type.equals("END")) { }
|
|
|
+ else if(type.equals("DATE")) { }
|
|
|
+ else if(type.equals("LOC")) { }
|
|
|
+ else if(type.equals("TIME1")) { }
|
|
|
+ else if(type.equals("TIME2")) { }
|
|
|
+ else if(type.equals("ACT1")) { }
|
|
|
+ else if(type.equals("ACT2")) { }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ Log.w(TAG, "[Set_InRoomDetect_Scenario_Mode_Normal1] type ERROR !!! : " + infos[i]);
|
|
|
+ error = true;
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ if(!error)
|
|
|
+ {
|
|
|
+ UpdateWallPADData(INROOMDETECT_SCENARIO_ELECRANGE_SAFE_INFO, modeStr);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ catch (RuntimeException re) {
|
|
|
+ LogUtil.errorLogInfo("", TAG, re);
|
|
|
+ }
|
|
|
+ catch (Exception e )
|
|
|
+ {
|
|
|
+ LogUtil.errorLogInfo("", TAG, e);//e.printStackTrace();
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 스마트 재실센서 전기레인지 안전모드 사용여부 확인 <br>
|
|
|
+ *
|
|
|
+ */
|
|
|
+ public String Get_InRoomDetect_Scenario_Mode_ElecRangeSafe()
|
|
|
+ {
|
|
|
+ try
|
|
|
+ {
|
|
|
+ String ret = GetWallPADData(INROOMDETECT_SCENARIO_ELECRANGE_SAFE_INFO);
|
|
|
+
|
|
|
+ //if (ret.compareTo(String.valueOf(true)) == 0) { return true; }
|
|
|
+ //else { return false; }
|
|
|
+
|
|
|
+ return ret;
|
|
|
+ }
|
|
|
+ catch (RuntimeException re) {
|
|
|
+ LogUtil.errorLogInfo("", TAG, re);
|
|
|
+ return "";
|
|
|
+ }
|
|
|
+ catch (Exception e)
|
|
|
+ {
|
|
|
+ LogUtil.errorLogInfo("", TAG, e);//e.printStackTrace();
|
|
|
+ return "";
|
|
|
+ }
|
|
|
+ }
|
|
|
+ /**
|
|
|
+ * 스마트키 감지시 알람 여부 설정
|
|
|
+ *
|
|
|
+ * @param bSet - (boolean) 설정할 값 (true:ON , false:OFF)
|
|
|
+ */
|
|
|
+ public void SetSmartKeyDetectionAlarm(boolean bSet)
|
|
|
+ {
|
|
|
+ try
|
|
|
+ {
|
|
|
+ UpdateWallPADData(SMARTKEY_DETECTION_ALARM, String.valueOf(bSet));
|
|
|
+ }
|
|
|
+ catch (RuntimeException re) {
|
|
|
+ LogUtil.errorLogInfo("", TAG, re);
|
|
|
+ }
|
|
|
+ catch (Exception e)
|
|
|
+ {
|
|
|
+ Log.e(TAG, "[SetSmartKeyDetectionAlarm] Exception Error");
|
|
|
+ LogUtil.errorLogInfo("", TAG, e);//e.printStackTrace();
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 스마트키 감지시 알람 여부 읽기
|
|
|
+ *
|
|
|
+ * @return (boolean) 설정값 (true:ON , false:OFF)
|
|
|
+ */
|
|
|
+ public boolean GetSmartKeyDetectionAlarm()
|
|
|
+ {
|
|
|
+ try
|
|
|
+ {
|
|
|
+ String ret = GetWallPADData(SMARTKEY_DETECTION_ALARM);
|
|
|
+
|
|
|
+ if(ret.compareTo(String.valueOf(true)) == 0)
|
|
|
+ {
|
|
|
+ return true;
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ catch (RuntimeException re) {
|
|
|
+ LogUtil.errorLogInfo("", TAG, re);
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ catch (Exception e )
|
|
|
+ {
|
|
|
+ Log.e(TAG, "[GetSmartKeyDetectionAlarm] Exception Error");
|
|
|
+ LogUtil.errorLogInfo("", TAG, e);//e.printStackTrace();
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 환기 예약 ON/OFF 여부 설정
|
|
|
+ *
|
|
|
+ * @param bSet - (boolean) 설정할 값 (true:ON , false:OFF)
|
|
|
+ */
|
|
|
+ public void SetVentiReserveOnOff(boolean bSet)
|
|
|
+ {
|
|
|
+ try
|
|
|
+ {
|
|
|
+ UpdateWallPADData(VEN_RESERVE_ONOFF, String.valueOf(bSet));
|
|
|
+ }
|
|
|
+ catch (RuntimeException re) {
|
|
|
+ LogUtil.errorLogInfo("", TAG, re);
|
|
|
+ }
|
|
|
+ catch (Exception e)
|
|
|
+ {
|
|
|
+ Log.e(TAG, "[VEN_RESERVE_ONOFF] Exception Error");
|
|
|
+ LogUtil.errorLogInfo("", TAG, e);//e.printStackTrace();
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 환기 예약 ON/OFF 여부 읽기
|
|
|
+ *
|
|
|
+ * @return (boolean) 설정값 (true:ON , false:OFF)
|
|
|
+ */
|
|
|
+ public boolean GetVentiReserveOnOff()
|
|
|
+ {
|
|
|
+ try
|
|
|
+ {
|
|
|
+ String ret = GetWallPADData(VEN_RESERVE_ONOFF);
|
|
|
+ if(ret.compareTo(String.valueOf(true)) == 0) return true;
|
|
|
+ else return false;
|
|
|
+ }
|
|
|
+ catch (RuntimeException re) {
|
|
|
+ LogUtil.errorLogInfo("", TAG, re);
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ catch (Exception e )
|
|
|
+ {
|
|
|
+ Log.e(TAG, "[GetVentiReserveOnOff] Exception Error");
|
|
|
+ LogUtil.errorLogInfo("", TAG, e);//e.printStackTrace();
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ public void SetArsControl( boolean OutSount )
|
|
|
+ {
|
|
|
+ try
|
|
|
+ {
|
|
|
+
|
|
|
+ UpdateWallPADData(ARS_CONTROL_DEVICE, String.valueOf(OutSount) );
|
|
|
+ }
|
|
|
+ catch (RuntimeException re) {
|
|
|
+ LogUtil.errorLogInfo("", TAG, re);
|
|
|
+ }
|
|
|
+ catch (Exception e )
|
|
|
+ {
|
|
|
+ LogUtil.errorLogInfo("", TAG, e);//e.printStackTrace();
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ public boolean GetArsControl()
|
|
|
+ {
|
|
|
+ try
|
|
|
+ {
|
|
|
+ String ret = GetWallPADData(ARS_CONTROL_DEVICE);
|
|
|
+
|
|
|
+ if( ret.compareTo(String.valueOf(true)) == 0 )
|
|
|
+ {
|
|
|
+ return true;
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ catch (RuntimeException re) {
|
|
|
+ LogUtil.errorLogInfo("", TAG, re);
|
|
|
+ return true;
|
|
|
+ }
|
|
|
+ catch (Exception e )
|
|
|
+ {
|
|
|
+ LogUtil.errorLogInfo("", TAG, e);//e.printStackTrace();
|
|
|
+ return true;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ public void SetRemoteControl( boolean OutSount )
|
|
|
+ {
|
|
|
+ try
|
|
|
+ {
|
|
|
+
|
|
|
+ UpdateWallPADData(REMOTE_CONTROLS_DEVICE, String.valueOf(OutSount) );
|
|
|
+ }
|
|
|
+ catch (RuntimeException re) {
|
|
|
+ LogUtil.errorLogInfo("", TAG, re);
|
|
|
+ }
|
|
|
+ catch (Exception e )
|
|
|
+ {
|
|
|
+ LogUtil.errorLogInfo("", TAG, e);//e.printStackTrace();
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ public boolean GetRemoteControl()
|
|
|
+ {
|
|
|
+ try
|
|
|
+ {
|
|
|
+ String ret = GetWallPADData(REMOTE_CONTROLS_DEVICE);
|
|
|
+
|
|
|
+ if( ret.compareTo(String.valueOf(true)) == 0 )
|
|
|
+ {
|
|
|
+ return true;
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ catch (RuntimeException re) {
|
|
|
+ LogUtil.errorLogInfo("", TAG, re);
|
|
|
+ return true;
|
|
|
+ }
|
|
|
+ catch (Exception e )
|
|
|
+ {
|
|
|
+ LogUtil.errorLogInfo("", TAG, e);//e.printStackTrace();
|
|
|
+ return true;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 거실조명 모드제어 설정 (전체)
|
|
|
+ *
|
|
|
+ * @param value 설정값 (9개 설정값의 배열, "그룹전원:그룹디밍:그룹색온도/조명1전원:디밍:색온도/조명2전원:디밍:색온도 ~ 조명8전원:디밍:색온도")
|
|
|
+ * 조명전원 : on/off/none(don't care), 디밍/색온도 : 1 ~ 10 (미설정시 0)
|
|
|
+ * 예) "off:10:1/off:10:1/off:10:1/off:10:1/off:10:1/off:10:1/off:10:1/off:10:1/off:10:1" : 그룹제어와 1~8번조명이 모두 꺼짐이며, 디밍은 10, 색온도는 1로 설정
|
|
|
+ */
|
|
|
+ public boolean setLivinglightModeCtrlEntireValue(String[] value) {
|
|
|
+ try {
|
|
|
+ if (value.length != 9) return false;
|
|
|
+
|
|
|
+ String strPresetID = LIVINGLIGHT_PRESET_00;
|
|
|
+ for (int i = 0; i < value.length; i++) {
|
|
|
+ switch (i) {
|
|
|
+ case 0: strPresetID = LIVINGLIGHT_PRESET_00; break;
|
|
|
+ case 1: strPresetID = LIVINGLIGHT_PRESET_01; break;
|
|
|
+ case 2: strPresetID = LIVINGLIGHT_PRESET_02; break;
|
|
|
+ case 3: strPresetID = LIVINGLIGHT_PRESET_03; break;
|
|
|
+ case 4: strPresetID = LIVINGLIGHT_PRESET_04; break;
|
|
|
+ case 5: strPresetID = LIVINGLIGHT_PRESET_05; break;
|
|
|
+ case 6: strPresetID = LIVINGLIGHT_PRESET_06; break;
|
|
|
+ case 7: strPresetID = LIVINGLIGHT_PRESET_07; break;
|
|
|
+ case 8: strPresetID = LIVINGLIGHT_PRESET_08; break;
|
|
|
+ default: strPresetID = LIVINGLIGHT_PRESET_00; break;
|
|
|
+ }
|
|
|
+ if (!UpdateWallPADData(strPresetID, value[i])) return false;
|
|
|
+ }
|
|
|
+ return true;
|
|
|
+ } catch (RuntimeException re) {
|
|
|
+ LogUtil.errorLogInfo("", TAG, re);
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ catch (Exception e ) {
|
|
|
+ Log.e(TAG, "[Exception] setLivinglightModeCtrlEntireValue(String[] value)");
|
|
|
+ LogUtil.errorLogInfo("", TAG, e);//e.printStackTrace();
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 거실조명 모드제어 설정 (모드별)
|
|
|
+ *
|
|
|
+ * @param value 설정값 ("그룹전원:그룹디밍:그룹색온도/조명1전원:디밍:색온도/조명2전원:디밍:색온도 ~ 조명8전원:디밍:색온도")
|
|
|
+ * 조명전원 : on/off/none(don't care), 디밍/색온도 : 1 ~ 10 (미설정시 0)
|
|
|
+ * 예) "off:10:1/off:10:1/off:10:1/off:10:1/off:10:1/off:10:1/off:10:1/off:10:1/off:10:1" : 그룹제어와 1~8번조명이 모두 꺼짐이며, 디밍은 10, 색온도는 1로 설정
|
|
|
+ */
|
|
|
+ public boolean setLivinglightModeCtrlValues(int presetid, String value) {
|
|
|
+ try {
|
|
|
+ String strPresetID = LIVINGLIGHT_PRESET_00;
|
|
|
+ switch (presetid) {
|
|
|
+ case 0: strPresetID = LIVINGLIGHT_PRESET_00; break;
|
|
|
+ case 1: strPresetID = LIVINGLIGHT_PRESET_01; break;
|
|
|
+ case 2: strPresetID = LIVINGLIGHT_PRESET_02; break;
|
|
|
+ case 3: strPresetID = LIVINGLIGHT_PRESET_03; break;
|
|
|
+ case 4: strPresetID = LIVINGLIGHT_PRESET_04; break;
|
|
|
+ case 5: strPresetID = LIVINGLIGHT_PRESET_05; break;
|
|
|
+ case 6: strPresetID = LIVINGLIGHT_PRESET_06; break;
|
|
|
+ case 7: strPresetID = LIVINGLIGHT_PRESET_07; break;
|
|
|
+ case 8: strPresetID = LIVINGLIGHT_PRESET_08; break;
|
|
|
+ default: return false;
|
|
|
+ }
|
|
|
+
|
|
|
+ return UpdateWallPADData(strPresetID, value);
|
|
|
+
|
|
|
+ } catch (RuntimeException re) {
|
|
|
+ LogUtil.errorLogInfo("", TAG, re);
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ catch (Exception e ) {
|
|
|
+ Log.e(TAG, "[Exception] setLivinglightModeCtrlValues(int presetid, String value)");
|
|
|
+ LogUtil.errorLogInfo("", TAG, e);//e.printStackTrace();
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 거실조명 모드제어 설정 (조명별)
|
|
|
+ *
|
|
|
+ * @param presetid 설정값 ID (0 ~ 8)
|
|
|
+ * lightid 조명 ID (0 ~ 8)
|
|
|
+ * power 전원 (on/off/none(don't care))
|
|
|
+ * dim 밝기 (1 ~ 10, 미설정시 0)
|
|
|
+ * color 색온도 (1 ~ 10, 미설정시 0)
|
|
|
+ */
|
|
|
+ public boolean setLivinglightModeCtrlUnitValues(int presetid, int lightid, String power, int dim, int color) {
|
|
|
+ try {
|
|
|
+ if (presetid < 0 && 8 < presetid) {
|
|
|
+ Log.w(TAG, "[setLivinglightModeCtrlUnitValues] out of range!! presetid [" + presetid + "]");
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+
|
|
|
+ if (lightid < 0 && 8 < lightid) {
|
|
|
+ Log.w(TAG, "[setLivinglightModeCtrlUnitValues] out of range!! lightid [" + lightid + "]");
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+
|
|
|
+ if (!(power.equalsIgnoreCase("on") || power.equalsIgnoreCase("off") || power.equalsIgnoreCase("none"))) {
|
|
|
+ Log.w(TAG, "[setLivinglightModeCtrlUnitValues] out of range!! power [" + power + "]");
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+
|
|
|
+ if (dim < 0 && 10 < dim) {
|
|
|
+ Log.w(TAG, "[setLivinglightModeCtrlUnitValues] out of range!! dim [" + dim + "]");
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+
|
|
|
+ if (color < 0 && 10 < color) {
|
|
|
+ Log.w(TAG, "[setLivinglightModeCtrlUnitValues] out of range!! color [" + color + "]");
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+
|
|
|
+ String strResult = getLivinglightModeCtrlValues(presetid);
|
|
|
+ String[] strParse = strResult.split("/");
|
|
|
+ strParse[lightid] = power + ":" + dim + ":" + color;
|
|
|
+
|
|
|
+ String strValues = null;
|
|
|
+
|
|
|
+ for (int i = 0; i < strParse.length; i++) {
|
|
|
+ if (i == 0) strValues = strParse[i];
|
|
|
+ else strValues += "/" + strParse[i];
|
|
|
+ }
|
|
|
+
|
|
|
+ boolean bRet = setLivinglightModeCtrlValues(presetid, strValues);
|
|
|
+ if(bRet)
|
|
|
+ {
|
|
|
+ // 거실 조명 모드 변경 알림
|
|
|
+ Intent notiIntent = new Intent();
|
|
|
+ notiIntent.setAction(define.NOTIFY_ACNAME);
|
|
|
+ notiIntent.putExtra(define.NOTIBR_KIND, define.NOTIFY_DB__LIVING_LIGHT_MODE);
|
|
|
+ CTX.sendBroadcast(notiIntent);
|
|
|
+ }
|
|
|
+ return bRet;
|
|
|
+ } catch (RuntimeException re) {
|
|
|
+ LogUtil.errorLogInfo("", TAG, re);
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ catch (Exception e ) {
|
|
|
+ Log.e(TAG, "[Exception] setLivinglightModeCtrlUnitValues(int presetid, int lightid, String power, int dim, int color)");
|
|
|
+ LogUtil.errorLogInfo("", TAG, e);//e.printStackTrace();
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 거실조명 모드제어 설정값 읽기
|
|
|
+ *
|
|
|
+ * @return (String[]) 설정값 (9개 설정값의 배열, "그룹전원:그룹디밍:그룹색온도/조명1전원:디밍:색온도/조명2전원:디밍:색온도 ~ 조명8전원:디밍:색온도")
|
|
|
+ * 조명전원 : on/off/none(don't care), 디밍/색온도 : 1 ~ 10 (미설정시 0)
|
|
|
+ * 예) "off:10:1/off:10:1/off:10:1/off:10:1/off:10:1/off:10:1/off:10:1/off:10:1/off:10:1" : 그룹제어와 1~8번조명이 모두 꺼짐이며, 디밍은 10, 색온도는 1로 설정
|
|
|
+ */
|
|
|
+ public String[] getLivinglightModeCtrlEntireValue() {
|
|
|
+ try {
|
|
|
+ String strPresetID = LIVINGLIGHT_PRESET_00;
|
|
|
+ String[] astrResult = new String[9];
|
|
|
+ for (int i = 0; i < 9; i++) {
|
|
|
+ switch (i) {
|
|
|
+ case 0: strPresetID = LIVINGLIGHT_PRESET_00; break;
|
|
|
+ case 1: strPresetID = LIVINGLIGHT_PRESET_01; break;
|
|
|
+ case 2: strPresetID = LIVINGLIGHT_PRESET_02; break;
|
|
|
+ case 3: strPresetID = LIVINGLIGHT_PRESET_03; break;
|
|
|
+ case 4: strPresetID = LIVINGLIGHT_PRESET_04; break;
|
|
|
+ case 5: strPresetID = LIVINGLIGHT_PRESET_05; break;
|
|
|
+ case 6: strPresetID = LIVINGLIGHT_PRESET_06; break;
|
|
|
+ case 7: strPresetID = LIVINGLIGHT_PRESET_07; break;
|
|
|
+ case 8: strPresetID = LIVINGLIGHT_PRESET_08; break;
|
|
|
+ default: strPresetID = LIVINGLIGHT_PRESET_00; break;
|
|
|
+ }
|
|
|
+ astrResult[i] = GetWallPADData(strPresetID);
|
|
|
+ }
|
|
|
+ return astrResult;
|
|
|
+ } catch (RuntimeException re) {
|
|
|
+ LogUtil.errorLogInfo("", TAG, re);
|
|
|
+ return null;
|
|
|
+ }
|
|
|
+ catch (Exception e) {
|
|
|
+ LogUtil.errorLogInfo("", TAG, e);//e.printStackTrace();
|
|
|
+ Log.w(TAG, "[Exception] getLivinglightModeCtrlEntireValue()");
|
|
|
+ return null;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 거실조명 모드제어 설정값 읽기
|
|
|
+ *
|
|
|
+ * @return (String) 설정값 ("그룹전원:그룹디밍:그룹색온도/조명1전원:디밍:색온도/조명2전원:디밍:색온도 ~ 조명8전원:디밍:색온도")
|
|
|
+ * 조명전원 : on/off/none(don't care), 디밍/색온도 : 1 ~ 10 (미설정시 0)
|
|
|
+ * 예) "off:10:1/off:10:1/off:10:1/off:10:1/off:10:1/off:10:1/off:10:1/off:10:1/off:10:1" : 그룹제어와 1~8번조명이 모두 꺼짐이며, 디밍은 10, 색온도는 1로 설정
|
|
|
+ */
|
|
|
+ public String getLivinglightModeCtrlValues(int presetid) {
|
|
|
+ try {
|
|
|
+ String strPresetID = LIVINGLIGHT_PRESET_00;
|
|
|
+ switch (presetid) {
|
|
|
+ case 0: strPresetID = LIVINGLIGHT_PRESET_00; break;
|
|
|
+ case 1: strPresetID = LIVINGLIGHT_PRESET_01; break;
|
|
|
+ case 2: strPresetID = LIVINGLIGHT_PRESET_02; break;
|
|
|
+ case 3: strPresetID = LIVINGLIGHT_PRESET_03; break;
|
|
|
+ case 4: strPresetID = LIVINGLIGHT_PRESET_04; break;
|
|
|
+ case 5: strPresetID = LIVINGLIGHT_PRESET_05; break;
|
|
|
+ case 6: strPresetID = LIVINGLIGHT_PRESET_06; break;
|
|
|
+ case 7: strPresetID = LIVINGLIGHT_PRESET_07; break;
|
|
|
+ case 8: strPresetID = LIVINGLIGHT_PRESET_08; break;
|
|
|
+ default: strPresetID = LIVINGLIGHT_PRESET_00; break;
|
|
|
+ }
|
|
|
+
|
|
|
+ String strResult = GetWallPADData(strPresetID);
|
|
|
+ return strResult;
|
|
|
+ } catch (RuntimeException re) {
|
|
|
+ LogUtil.errorLogInfo("", TAG, re);
|
|
|
+ return null;
|
|
|
+ }
|
|
|
+ catch (Exception e) {
|
|
|
+ LogUtil.errorLogInfo("", TAG, e);//e.printStackTrace();
|
|
|
+ Log.w(TAG, "[Exception] getLivinglightModeCtrlValues(int presetid)");
|
|
|
+ return null;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 거실조명 모드제어 설정값 읽기
|
|
|
+ *
|
|
|
+ * @param presetid 설정값 ID (0 ~ 8) : 0은 그룹제어시 사용
|
|
|
+ * lightid 조명 ID (0 ~ 8) : 0은 그룹제어시 사용
|
|
|
+ *
|
|
|
+ * @return (String) 설정값 ("전원:디밍:색온도")
|
|
|
+ * 조명전원 : on/off/none(don't care), 디밍/색온도 : 1 ~ 10 (미설정시 0)
|
|
|
+ * 예) "off:10:1"
|
|
|
+ */
|
|
|
+ public String getLivinglightModeCtrlUnitValues(int presetid, int lightid) {
|
|
|
+ try {
|
|
|
+ String strValues = getLivinglightModeCtrlValues(presetid);
|
|
|
+ String[] strParse = strValues.split("/");
|
|
|
+ String strResult = strParse[lightid];
|
|
|
+
|
|
|
+ return strResult;
|
|
|
+ } catch (RuntimeException re) {
|
|
|
+ LogUtil.errorLogInfo("", TAG, re);
|
|
|
+ return null;
|
|
|
+ }
|
|
|
+ catch (Exception e) {
|
|
|
+ LogUtil.errorLogInfo("", TAG, e);//e.printStackTrace();
|
|
|
+ Log.w(TAG, "[Exception] getLivinglightModeCtrlUnitValues(int presetid, int lightid)");
|
|
|
+ return null;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ public static class LightConfig {
|
|
|
+ public String Power;
|
|
|
+ public byte Dim;
|
|
|
+ public byte Color;
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 거실조명 모드제어 설정값 읽기
|
|
|
+ *
|
|
|
+ * @param presetid 설정값 ID (0 ~ 8) : 0은 그룹제어시 사용
|
|
|
+ *
|
|
|
+ * @return (LightConfig) 설정값 ("전원:디밍:색온도")
|
|
|
+ */
|
|
|
+ public LightConfig getLivinglightModeEntireCtrlUnitValues(int presetid) {
|
|
|
+ try {
|
|
|
+ String strValues = getLivinglightModeCtrlValues(presetid);
|
|
|
+ String[] strParse_01 = strValues.split("/");
|
|
|
+ String[] strParse_02 = strParse_01[0].split(":");
|
|
|
+ LightConfig lightconfig = new LightConfig();
|
|
|
+ lightconfig.Power = strParse_02[0];
|
|
|
+ lightconfig.Dim = Byte.parseByte(strParse_02[1]);
|
|
|
+ lightconfig.Color = Byte.parseByte(strParse_02[2]);
|
|
|
+ Log.i(TAG, "[getLivinglightModeEntireCtrlUnitValues] presetid [" + presetid + "], lightconfig.Power [" + lightconfig.Power + "], lightconfig.Dim [" + lightconfig.Dim + "], lightconfig.Color [" + lightconfig.Color + "]");
|
|
|
+ return lightconfig;
|
|
|
+ } catch (RuntimeException re) {
|
|
|
+ LogUtil.errorLogInfo("", TAG, re);
|
|
|
+ return null;
|
|
|
+ }
|
|
|
+ catch (Exception e) {
|
|
|
+ LogUtil.errorLogInfo("", TAG, e);//e.printStackTrace();
|
|
|
+ Log.w(TAG, "[Exception] getLivinglightModeEntireCtrlUnitValues(int presetid)");
|
|
|
+ return null;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ ////////////////////////////////////////////////////////////////////////////////////////////////
|
|
|
+
|
|
|
+ public static class PhoneAddr
|
|
|
+ {
|
|
|
+ public String Name;
|
|
|
+ public String IP;
|
|
|
+ }
|
|
|
+
|
|
|
+ List<PhoneAddr> GuardList = new ArrayList<PhoneAddr>();
|
|
|
+ List<PhoneAddr> LobbyList = new ArrayList<PhoneAddr>();
|
|
|
+
|
|
|
+ public void AddGuardAddress(String name, String IPaddress)
|
|
|
+ {
|
|
|
+ String indata = GUARD_ADDRESS+"||"+IPaddress;
|
|
|
+ insertWallPADDB(name, indata);
|
|
|
+ }
|
|
|
+
|
|
|
+ public List<PhoneAddr> GetGuardAddress()
|
|
|
+ {
|
|
|
+ GuardList.clear();
|
|
|
+
|
|
|
+ String query = "select id, data from "+DeviceDataTBL+" where data LIKE('"+GUARD_ADDRESS+"::%');";
|
|
|
+ Cursor cursor = wdb.rawQuery(query, null);
|
|
|
+ String GetData="";
|
|
|
+ String[] splitdata;
|
|
|
+ PhoneAddr phoneaddr = new PhoneAddr();
|
|
|
+ while (cursor.moveToNext())
|
|
|
+ {
|
|
|
+ GetData = cursor.getString(0);
|
|
|
+ splitdata = GetData.split("::");
|
|
|
+ phoneaddr.Name = splitdata[0];
|
|
|
+ phoneaddr.IP = splitdata[1];
|
|
|
+
|
|
|
+ GuardList.add(phoneaddr);
|
|
|
+ }
|
|
|
+
|
|
|
+ cursor.close();
|
|
|
+
|
|
|
+ return GuardList;
|
|
|
+ }
|
|
|
+
|
|
|
+ public void DeleteGuardAddress(String name)
|
|
|
+ {
|
|
|
+ String sqlst = "delete from " + DeviceDataTBL + "where id='"+name+"' AND data LIKE('"+GUARD_ADDRESS+"::%');";
|
|
|
+
|
|
|
+ try {
|
|
|
+ wdb.execSQL(sqlst);
|
|
|
+ } catch (SQLException e)
|
|
|
+ {
|
|
|
+ LogUtil.errorLogInfo("", TAG, e);//e.printStackTrace();
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ public void AddLobbyAddress(String name, String IPaddress)
|
|
|
+ {
|
|
|
+ String indata = LOBBY_ADDRESS+"::"+IPaddress;
|
|
|
+ insertWallPADDB(name, indata);
|
|
|
+ }
|
|
|
+
|
|
|
+ public List<PhoneAddr> GetLobbyAddress()
|
|
|
+ {
|
|
|
+ LobbyList.clear();
|
|
|
+
|
|
|
+ String query = "select id, data from "+DeviceDataTBL+" where data LIKE('"+LOBBY_ADDRESS+"::%');";
|
|
|
+ Cursor cursor = wdb.rawQuery(query, null);
|
|
|
+ String GetData="";
|
|
|
+ String[] splitdata;
|
|
|
+ PhoneAddr phoneaddr = new PhoneAddr();
|
|
|
+ while (cursor.moveToNext())
|
|
|
+ {
|
|
|
+ GetData = cursor.getString(0);
|
|
|
+ splitdata = GetData.split("::");
|
|
|
+ phoneaddr.Name = splitdata[0];
|
|
|
+ phoneaddr.IP = splitdata[1];
|
|
|
+
|
|
|
+ LobbyList.add(phoneaddr);
|
|
|
+ }
|
|
|
+
|
|
|
+ cursor.close();
|
|
|
+
|
|
|
+ return LobbyList;
|
|
|
+ }
|
|
|
+
|
|
|
+ public void DeleteLobbyAddress(String name)
|
|
|
+ {
|
|
|
+ String sqlst = "delete from " + DeviceDataTBL + "where id='"+name+"' AND data LIKE('"+LOBBY_ADDRESS+"::%');";
|
|
|
+
|
|
|
+ try {
|
|
|
+ wdb.execSQL(sqlst);
|
|
|
+ } catch (SQLException e)
|
|
|
+ {
|
|
|
+ LogUtil.errorLogInfo("", TAG, e);//e.printStackTrace();
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ public void setSystemTime(int year, int mon, int day, int hour, int min, int sec)
|
|
|
+ {
|
|
|
+ Calendar c = new GregorianCalendar();
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ c.set(Calendar.YEAR, year);
|
|
|
+ c.set(Calendar.MONTH, mon-1);
|
|
|
+ c.set(Calendar.DAY_OF_MONTH, day);
|
|
|
+ c.set(Calendar.HOUR_OF_DAY, hour);
|
|
|
+ c.set(Calendar.MINUTE, min);
|
|
|
+ c.set(Calendar.SECOND, sec);
|
|
|
+ long when = c.getTimeInMillis();
|
|
|
+ Calendar now = new GregorianCalendar();
|
|
|
+ long nowT = when - now.getTimeInMillis();
|
|
|
+ UpdateWallPADData(SET_SYSTEMTIME, String.valueOf(nowT));
|
|
|
+ Intent intent = new Intent();
|
|
|
+ intent.setAction("SYSTEMTIMESET");
|
|
|
+ intent.putExtra("DATE", String.format("%d&&%d&&%d", year, mon-1, day));
|
|
|
+ intent.putExtra("TIME", String.format("%d&&%d&&%d", hour, min, sec));
|
|
|
+ CTX.sendBroadcast(intent);
|
|
|
+ }
|
|
|
+ public Long GetSystemTime()
|
|
|
+ {
|
|
|
+ try {
|
|
|
+ String ret = GetWallPADData(SET_SYSTEMTIME);
|
|
|
+ return Long.parseLong(ret);
|
|
|
+ }
|
|
|
+ catch (RuntimeException re) {
|
|
|
+ LogUtil.errorLogInfo("", TAG, re);
|
|
|
+ return (long)0;
|
|
|
+ }
|
|
|
+ catch (Exception e)
|
|
|
+ {
|
|
|
+ LogUtil.errorLogInfo("", TAG, e);//e.printStackTrace();
|
|
|
+ return (long)0;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ public void SetDoorCallTimeout(int timeout)
|
|
|
+ {
|
|
|
+ UpdateWallPADData(DOORCALLTIMEOUT, String.valueOf(timeout));
|
|
|
+ }
|
|
|
+
|
|
|
+ public int GetDoorCallTimeout()
|
|
|
+ {
|
|
|
+ try {
|
|
|
+ String ret = GetWallPADData(DOORCALLTIMEOUT);
|
|
|
+ return Integer.parseInt(ret);
|
|
|
+ }
|
|
|
+ catch (RuntimeException re) {
|
|
|
+ LogUtil.errorLogInfo("", TAG, re);
|
|
|
+ return 0;
|
|
|
+ }
|
|
|
+ catch (Exception e)
|
|
|
+ {
|
|
|
+ LogUtil.errorLogInfo("", TAG, e);//e.printStackTrace();
|
|
|
+ return 0;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ public void SetDoorConnectTimeout(int timeout)
|
|
|
+ {
|
|
|
+ UpdateWallPADData(DOORCONNECTTIMEOUT, String.valueOf(timeout));
|
|
|
+ }
|
|
|
+
|
|
|
+ public int GetDoorConnectTimeout()
|
|
|
+ {
|
|
|
+ try {
|
|
|
+ String ret = GetWallPADData(DOORCONNECTTIMEOUT);
|
|
|
+ return Integer.parseInt(ret);
|
|
|
+ }
|
|
|
+ catch (RuntimeException re) {
|
|
|
+ LogUtil.errorLogInfo("", TAG, re);
|
|
|
+ return 0;
|
|
|
+ }
|
|
|
+ catch (Exception e)
|
|
|
+ {
|
|
|
+ LogUtil.errorLogInfo("", TAG, e);//e.printStackTrace();
|
|
|
+ return 0;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ public void SetMorningCallPeriod(int type)
|
|
|
+ {
|
|
|
+ UpdateWallPADData(MORNINGCALL_TYPE, MORNINGCALLTYPETEXT[type]);
|
|
|
+ }
|
|
|
+
|
|
|
+ public int GetMorningCallPeriod()
|
|
|
+ {
|
|
|
+ try {
|
|
|
+ String ret = GetWallPADData(MORNINGCALL_TYPE);
|
|
|
+ return Integer.parseInt(ret);
|
|
|
+ }
|
|
|
+ catch (RuntimeException re) {
|
|
|
+ LogUtil.errorLogInfo("", TAG, re);
|
|
|
+ return 0;
|
|
|
+ }
|
|
|
+ catch (Exception e)
|
|
|
+ {
|
|
|
+ LogUtil.errorLogInfo("", TAG, e);//e.printStackTrace();
|
|
|
+ return 0;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ public void SetMorningCallBell(int type)
|
|
|
+ {
|
|
|
+ UpdateWallPADData(MORNINGCALL_BELLTYPE, MORNINGCALL_BELLTYPETEXT[type]);
|
|
|
+ }
|
|
|
+
|
|
|
+ public int GetMorningCallBell()
|
|
|
+ {
|
|
|
+ String ret = GetWallPADData(MORNINGCALL_BELLTYPE);
|
|
|
+ return Integer.parseInt(ret);
|
|
|
+ }
|
|
|
+
|
|
|
+ public void AddMorningCallReserve(int type)
|
|
|
+ {
|
|
|
+ try {
|
|
|
+ int reservedata = Integer.parseInt(GetWallPADData(MORNINGCALL_RESERVE));
|
|
|
+ reservedata|=type;
|
|
|
+ UpdateWallPADData(MORNINGCALL_RESERVE, String.valueOf(reservedata));
|
|
|
+ }
|
|
|
+ catch (RuntimeException re) {
|
|
|
+ LogUtil.errorLogInfo("", TAG, re);
|
|
|
+ }
|
|
|
+ catch (Exception e)
|
|
|
+ {
|
|
|
+ LogUtil.errorLogInfo("", TAG, e);//e.printStackTrace();
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ public void DeleteMorningCallReserve(int type)
|
|
|
+ {
|
|
|
+ try {
|
|
|
+ int reservedata = Integer.parseInt(GetWallPADData(MORNINGCALL_RESERVE));
|
|
|
+ reservedata^=type;
|
|
|
+ UpdateWallPADData(MORNINGCALL_RESERVE, String.valueOf(reservedata));
|
|
|
+ }
|
|
|
+ catch (RuntimeException re) {
|
|
|
+ LogUtil.errorLogInfo("", TAG, re);
|
|
|
+ }
|
|
|
+ catch (Exception e)
|
|
|
+ {
|
|
|
+ LogUtil.errorLogInfo("", TAG, e);//e.printStackTrace();
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ public int[] GetMorningCallReserve()
|
|
|
+ {
|
|
|
+ try
|
|
|
+ {
|
|
|
+ String REserveData = GetWallPADData(MORNINGCALL_RESERVE);
|
|
|
+ if (REserveData == null ) return null;
|
|
|
+ int reservedata = Integer.parseInt(REserveData);
|
|
|
+ List<Integer> resultList = new ArrayList<Integer>();
|
|
|
+ for(int i = 0; i< MCCommandList.length;i++)
|
|
|
+ {
|
|
|
+ if ((reservedata&MCCommandList[i]) > 0)
|
|
|
+ resultList.add(MCCommandList[i]);
|
|
|
+ }
|
|
|
+ int[] result = new int[resultList.size()];
|
|
|
+ int i = 0;
|
|
|
+ for (Integer element : resultList) {
|
|
|
+ result[i++] = element;
|
|
|
+ }
|
|
|
+ return result;
|
|
|
+ }
|
|
|
+ catch (RuntimeException re) {
|
|
|
+ LogUtil.errorLogInfo("", TAG, re);
|
|
|
+ return null;
|
|
|
+ }
|
|
|
+ catch (Exception e)
|
|
|
+ {
|
|
|
+ LogUtil.errorLogInfo("", TAG, e);//e.printStackTrace();
|
|
|
+ return null;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * @description
|
|
|
+ * 전자액자 설정정보 저장
|
|
|
+ */
|
|
|
+ public void SetAutoPictureData(int mAutoPictureSetIdx, int mStartTimeHourIdx, int mStartTimeMinIdx, int mEndTimeHourIdx
|
|
|
+ , int mEndTimeMinIdx, int mSlideIntervalIdx, int mAnimationIdx)
|
|
|
+ {
|
|
|
+ UpdateWallPADData(AUTOPICTURE_SET_INDEX, Integer.toString(mAutoPictureSetIdx));
|
|
|
+ UpdateWallPADData(AUTOPICTURE_START_TIME_HOUR_INDEX, Integer.toString(mStartTimeHourIdx));
|
|
|
+ UpdateWallPADData(AUTOPICTURE_START_TIME_MIN_INDEX, Integer.toString(mStartTimeMinIdx)) ;
|
|
|
+ UpdateWallPADData(AUTOPICTURE_END_TIME_HOUR_INDEX, Integer.toString(mEndTimeHourIdx));
|
|
|
+ UpdateWallPADData(AUTOPICTURE_END_TIME_MIN_INDEX, Integer.toString(mEndTimeMinIdx));
|
|
|
+ UpdateWallPADData(AUTOPICTURE_SLIDE_INTERVAL_INDEX, Integer.toString(mSlideIntervalIdx));
|
|
|
+ UpdateWallPADData(AUTOPICTURE_ANIMATION_INDEX, Integer.toString(mAnimationIdx));
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * @description
|
|
|
+ * 전자액자 설정정보 가져오기
|
|
|
+ * @return int[] data[0]-> AUTOPICTURE_SET_INDEX<br>
|
|
|
+ * int[] data[1]-> AUTOPICTURE_START_TIME_HOUR_INDEX<br>
|
|
|
+ * int[] data[2]-> AUTOPICTURE_START_TIME_MIN_INDEX<br>
|
|
|
+ * int[] data[3]-> AUTOPICTURE_END_TIME_HOUR_INDEX<br>
|
|
|
+ * int[] data[4]-> AUTOPICTURE_END_TIME_MIN_INDEX<br>
|
|
|
+ * int[] data[5]-> AUTOPICTURE_SLIDE_INTERVAL_INDEX<br>
|
|
|
+ * int[] data[6]-> AUTOPICTURE_ANIMATION_INDEX<br>
|
|
|
+ */
|
|
|
+ public int[] GetAutoPictureData()
|
|
|
+ {
|
|
|
+ int[] result = new int[7];
|
|
|
+ String ret = null;
|
|
|
+
|
|
|
+ for(int i = 0; i<result.length; i++)
|
|
|
+ {
|
|
|
+ try
|
|
|
+ {
|
|
|
+ if(i == 0)
|
|
|
+ {
|
|
|
+ ret = GetWallPADData(AUTOPICTURE_SET_INDEX);
|
|
|
+
|
|
|
+ }
|
|
|
+ else if(i == 1)
|
|
|
+ {
|
|
|
+ ret = GetWallPADData(AUTOPICTURE_START_TIME_HOUR_INDEX);
|
|
|
+
|
|
|
+ }
|
|
|
+ else if(i == 2)
|
|
|
+ {
|
|
|
+ ret = GetWallPADData(AUTOPICTURE_START_TIME_MIN_INDEX);
|
|
|
+
|
|
|
+ }
|
|
|
+ else if(i == 3)
|
|
|
+ {
|
|
|
+ ret = GetWallPADData(AUTOPICTURE_END_TIME_HOUR_INDEX);
|
|
|
+
|
|
|
+ }
|
|
|
+ else if(i == 4)
|
|
|
+ {
|
|
|
+ ret = GetWallPADData(AUTOPICTURE_END_TIME_MIN_INDEX);
|
|
|
+
|
|
|
+ }
|
|
|
+ else if(i == 5)
|
|
|
+ {
|
|
|
+ ret = GetWallPADData(AUTOPICTURE_SLIDE_INTERVAL_INDEX);
|
|
|
+
|
|
|
+ }
|
|
|
+ else if(i == 6)
|
|
|
+ {
|
|
|
+ ret = GetWallPADData(AUTOPICTURE_ANIMATION_INDEX);
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+ result[i] = Integer.parseInt(ret);
|
|
|
+ }
|
|
|
+ catch (RuntimeException re) {
|
|
|
+ LogUtil.errorLogInfo("", TAG, re);
|
|
|
+ }
|
|
|
+ catch (Exception e)
|
|
|
+ {
|
|
|
+ LogUtil.errorLogInfo("", TAG, e);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ return result;
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * @description
|
|
|
+ * 전자액자 APP 실행 여부를 DB정보와 비교하여 알려주는 함수
|
|
|
+ * @return boolean형 true 인 경우에만 StartAutoPictureAPP() 호출<br>
|
|
|
+ * @param
|
|
|
+ * NowCal Calendar형 현재 시간 입력
|
|
|
+ */
|
|
|
+ public boolean DecideAutoPictureAppStartOrNot(Calendar NowCal)
|
|
|
+ {
|
|
|
+
|
|
|
+ int DBLoadResult[] = new int [7];
|
|
|
+ DBLoadResult = GetAutoPictureData();
|
|
|
+
|
|
|
+ //실행시간과 종료시간이 같으면 종료!
|
|
|
+ if((DBLoadResult[1] == DBLoadResult[3]) && (DBLoadResult[2] == DBLoadResult[4]))
|
|
|
+ {
|
|
|
+
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+
|
|
|
+ Calendar TempCal = Calendar.getInstance();
|
|
|
+ TempCal.set(Calendar.HOUR_OF_DAY, DBLoadResult[1]);
|
|
|
+ TempCal.set(Calendar.MINUTE, (DBLoadResult[2]*10));
|
|
|
+
|
|
|
+ Calendar EndCal = Calendar.getInstance();
|
|
|
+ EndCal.set(Calendar.HOUR_OF_DAY, DBLoadResult[3]);
|
|
|
+ EndCal.set(Calendar.MINUTE, (DBLoadResult[4]*10));
|
|
|
+
|
|
|
+ int intNowTime = (NowCal.get(Calendar.HOUR_OF_DAY) * 60) + NowCal.get(Calendar.MINUTE);
|
|
|
+ int intEndTime = (EndCal.get(Calendar.HOUR_OF_DAY) * 60) + EndCal.get(Calendar.MINUTE);
|
|
|
+
|
|
|
+ /*
|
|
|
+ Log.w("Jar", "[DB] --------[intNowTime] " + intNowTime);
|
|
|
+ Log.w("Jar", "[DB] --------[intEndTime] " + intEndTime);
|
|
|
+
|
|
|
+ Log.w("Jar", "[DB] --------[Input START Time] YEAR " + NowCal.get(Calendar.YEAR));
|
|
|
+ Log.w("Jar", "[DB] --------[Input START Time] MONTH " + (NowCal.get(Calendar.MONTH)+1));
|
|
|
+ Log.w("Jar", "[DB] --------[Input START Time] DAY " + NowCal.get(Calendar.DAY_OF_MONTH));
|
|
|
+ Log.w("Jar", "[DB] --------[Input START Time] DAY_OF_WEEK " + NowCal.get(Calendar.DAY_OF_WEEK));
|
|
|
+ Log.w("Jar", "[DB] --------[Input START Time] HOUR_OF_DAY " + NowCal.get(Calendar.HOUR_OF_DAY));
|
|
|
+ Log.w("Jar", "[DB] --------[Input START Time] MINUTE " + NowCal.get(Calendar.MINUTE));
|
|
|
+
|
|
|
+
|
|
|
+ Log.w("Jar", "[DB] --------[Set Time] YEAR " + TempCal.get(Calendar.YEAR));
|
|
|
+ Log.w("Jar", "[DB] --------[Set Time] MONTH " + (TempCal.get(Calendar.MONTH)+1));
|
|
|
+ Log.w("Jar", "[DB] --------[Set Time] DAY " + TempCal.get(Calendar.DAY_OF_MONTH));
|
|
|
+ Log.w("Jar", "[DB] --------[Set Time] DAY_OF_WEEK " + TempCal.get(Calendar.DAY_OF_WEEK));
|
|
|
+ Log.w("Jar", "[DB] --------[Set Time] HOUR_OF_DAY " + TempCal.get(Calendar.HOUR_OF_DAY));
|
|
|
+ Log.w("Jar", "[DB] --------[Set Time] MINUTE " + TempCal.get(Calendar.MINUTE));
|
|
|
+
|
|
|
+ Log.w("Jar", "[DB] --------[DBLoadResult[0]] :" +DBLoadResult[0]);
|
|
|
+ Log.w("Jar", "[DB] --------[NowCal.DAY_OF_WEEK] :" +NowCal.get(Calendar.DAY_OF_WEEK));
|
|
|
+ */
|
|
|
+
|
|
|
+ boolean result= false;
|
|
|
+ switch(DBLoadResult[0])
|
|
|
+ {
|
|
|
+ case 0: //사용안함
|
|
|
+ result = false;
|
|
|
+ break;
|
|
|
+
|
|
|
+ /*
|
|
|
+ SUNDAY 0
|
|
|
+ MONDAY 1
|
|
|
+ TUESDAY 2
|
|
|
+ WEDNESDAY 3
|
|
|
+ THURSDAY 4
|
|
|
+ FRIDAY 5
|
|
|
+ SATURDAY 6
|
|
|
+ */
|
|
|
+
|
|
|
+ case 1: //월~금
|
|
|
+ if((NowCal.get(Calendar.DAY_OF_WEEK) >= 2) && (NowCal.get(Calendar.DAY_OF_WEEK) <= 6))
|
|
|
+ {
|
|
|
+ result = true;
|
|
|
+ }
|
|
|
+ break;
|
|
|
+
|
|
|
+ case 2: //월~토
|
|
|
+ if((NowCal.get(Calendar.DAY_OF_WEEK) >= 2) && (NowCal.get(Calendar.DAY_OF_WEEK) <= 7))
|
|
|
+ {
|
|
|
+ result = true;
|
|
|
+ }
|
|
|
+ break;
|
|
|
+
|
|
|
+ case 3: //토~일
|
|
|
+ if((NowCal.get(Calendar.DAY_OF_WEEK) == 7) || (NowCal.get(Calendar.DAY_OF_WEEK) == 1))
|
|
|
+ {
|
|
|
+ result = true;
|
|
|
+ }
|
|
|
+ break;
|
|
|
+
|
|
|
+ case 4: //매일
|
|
|
+ if((NowCal.get(Calendar.DAY_OF_WEEK) >= 1) && (NowCal.get(Calendar.DAY_OF_WEEK) <= 7))
|
|
|
+ {
|
|
|
+ result = true;
|
|
|
+ }
|
|
|
+ break;
|
|
|
+
|
|
|
+ default:
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ if(result == true)
|
|
|
+ {
|
|
|
+
|
|
|
+ //시간비교
|
|
|
+
|
|
|
+ if(NowCal.get(Calendar.HOUR_OF_DAY) >= TempCal.get(Calendar.HOUR_OF_DAY))
|
|
|
+ {
|
|
|
+ if(NowCal.get(Calendar.HOUR_OF_DAY) > TempCal.get(Calendar.HOUR_OF_DAY))
|
|
|
+ {
|
|
|
+ if(intNowTime < intEndTime)
|
|
|
+ {
|
|
|
+ result = true;
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ result = false;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ if(NowCal.get(Calendar.HOUR_OF_DAY) == TempCal.get(Calendar.HOUR_OF_DAY))
|
|
|
+ {
|
|
|
+ if(NowCal.get(Calendar.MINUTE) >= TempCal.get(Calendar.MINUTE))
|
|
|
+ {
|
|
|
+ if(intNowTime < intEndTime)
|
|
|
+ {
|
|
|
+ result = true;
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ result = false;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ result = false;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ result = false;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ return result;
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * @description
|
|
|
+ * 전자액자 APP 종료 여부를 DB정보와 비교하여 알려주는 함수<br>
|
|
|
+ * 호출 하기 전에 최상위 Activity에 AutoPicture가 실행되고 있는지 먼저 확인 후, 호출해야 함.
|
|
|
+ * @return boolean형 true 인 경우에만 EndAutoPictureAPP() 호출<br>
|
|
|
+ * @param
|
|
|
+ * NowCal Calendar형 현재 시간 입력
|
|
|
+ */
|
|
|
+ public boolean DecideAutoPictureAppEndOrNot(Calendar NowCal)
|
|
|
+ {
|
|
|
+
|
|
|
+ int DBLoadResult[] = new int [7];
|
|
|
+ DBLoadResult = GetAutoPictureData();
|
|
|
+
|
|
|
+ Calendar TempCal = Calendar.getInstance();
|
|
|
+ TempCal.set(Calendar.HOUR_OF_DAY, DBLoadResult[3]);
|
|
|
+ TempCal.set(Calendar.MINUTE, (DBLoadResult[4]*10));
|
|
|
+
|
|
|
+ /*
|
|
|
+ Log.w("Jar", "[DB] --------[Input START Time] YEAR " + NowCal.get(Calendar.YEAR));
|
|
|
+ Log.w("Jar", "[DB] --------[Input START Time] MONTH " + (NowCal.get(Calendar.MONTH)+1));
|
|
|
+ Log.w("Jar", "[DB] --------[Input START Time] DAY " + NowCal.get(Calendar.DAY_OF_MONTH));
|
|
|
+ Log.w("Jar", "[DB] --------[Input START Time] DAY_OF_WEEK " + NowCal.get(Calendar.DAY_OF_WEEK));
|
|
|
+ Log.w("Jar", "[DB] --------[Input START Time] HOUR_OF_DAY " + NowCal.get(Calendar.HOUR_OF_DAY));
|
|
|
+ Log.w("Jar", "[DB] --------[Input START Time] MINUTE " + NowCal.get(Calendar.MINUTE));
|
|
|
+
|
|
|
+ Log.w("Jar", "[DB] --------[Set Time] YEAR " + TempCal.get(Calendar.YEAR));
|
|
|
+ Log.w("Jar", "[DB] --------[Set Time] MONTH " + (TempCal.get(Calendar.MONTH)+1));
|
|
|
+ Log.w("Jar", "[DB] --------[Set Time] DAY " + TempCal.get(Calendar.DAY_OF_MONTH));
|
|
|
+ Log.w("Jar", "[DB] --------[Set Time] DAY_OF_WEEK " + TempCal.get(Calendar.DAY_OF_WEEK));
|
|
|
+ Log.w("Jar", "[DB] --------[Set Time] HOUR_OF_DAY " + TempCal.get(Calendar.HOUR_OF_DAY));
|
|
|
+ Log.w("Jar", "[DB] --------[Set Time] MINUTE " + TempCal.get(Calendar.MINUTE));
|
|
|
+
|
|
|
+ Log.w("Jar", "[DB] --------[DBLoadResult[0]] :" +DBLoadResult[0]);
|
|
|
+ Log.w("Jar", "[DB] --------[NowCal.DAY_OF_WEEK] :" +NowCal.get(Calendar.DAY_OF_WEEK));
|
|
|
+ */
|
|
|
+
|
|
|
+ boolean result= false;
|
|
|
+ switch(DBLoadResult[0])
|
|
|
+ {
|
|
|
+ case 0: //사용안함
|
|
|
+ result = false;
|
|
|
+ break;
|
|
|
+
|
|
|
+ /*
|
|
|
+ SUNDAY 0
|
|
|
+ MONDAY 1
|
|
|
+ TUESDAY 2
|
|
|
+ WEDNESDAY 3
|
|
|
+ THURSDAY 4
|
|
|
+ FRIDAY 5
|
|
|
+ SATURDAY 6
|
|
|
+ */
|
|
|
+
|
|
|
+ case 1: //월~금
|
|
|
+ if((NowCal.get(Calendar.DAY_OF_WEEK) >= 2) && (NowCal.get(Calendar.DAY_OF_WEEK) <= 6))
|
|
|
+ {
|
|
|
+ result = true;
|
|
|
+ }
|
|
|
+ break;
|
|
|
+
|
|
|
+ case 2: //월~토
|
|
|
+ if((NowCal.get(Calendar.DAY_OF_WEEK) >= 2) && (NowCal.get(Calendar.DAY_OF_WEEK) <= 7))
|
|
|
+ {
|
|
|
+ result = true;
|
|
|
+ }
|
|
|
+ break;
|
|
|
+
|
|
|
+ case 3: //토~일
|
|
|
+ if((NowCal.get(Calendar.DAY_OF_WEEK) == 7) || (NowCal.get(Calendar.DAY_OF_WEEK) == 1))
|
|
|
+ {
|
|
|
+ result = true;
|
|
|
+ }
|
|
|
+ break;
|
|
|
+
|
|
|
+ case 4: //매일
|
|
|
+ if((NowCal.get(Calendar.DAY_OF_WEEK) >= 1) && (NowCal.get(Calendar.DAY_OF_WEEK) <= 7))
|
|
|
+ {
|
|
|
+ result = true;
|
|
|
+ }
|
|
|
+ break;
|
|
|
+
|
|
|
+ default:
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ if(result == true)
|
|
|
+ {
|
|
|
+
|
|
|
+ //시간비교
|
|
|
+
|
|
|
+ if(NowCal.get(Calendar.HOUR_OF_DAY) >= TempCal.get(Calendar.HOUR_OF_DAY))
|
|
|
+ {
|
|
|
+ if(NowCal.get(Calendar.HOUR_OF_DAY) > TempCal.get(Calendar.HOUR_OF_DAY))
|
|
|
+ {
|
|
|
+ result = true;
|
|
|
+ }
|
|
|
+
|
|
|
+ if(NowCal.get(Calendar.HOUR_OF_DAY) == TempCal.get(Calendar.HOUR_OF_DAY))
|
|
|
+ {
|
|
|
+ if(NowCal.get(Calendar.MINUTE) > TempCal.get(Calendar.MINUTE))
|
|
|
+ {
|
|
|
+ result = true;
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ result = false;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ result = false;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ return result;
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ /**
|
|
|
+ * @description
|
|
|
+ * 전자액자 APP 시작. (호출하면 즉시 시작됨).<br>
|
|
|
+ * 사진 전환 간격, 애니메이션 효과 인덱스 입력은 함수 내에서 처리.
|
|
|
+ */
|
|
|
+ public boolean StartAutoPictureAPP()
|
|
|
+ {
|
|
|
+ int DBLoadResult[] = new int [7];
|
|
|
+ int IntervalTimeSec = 5;
|
|
|
+ DBLoadResult = GetAutoPictureData();
|
|
|
+ switch (DBLoadResult[5]) // mSlideIntervalIdx
|
|
|
+ {
|
|
|
+ case 0: //5초
|
|
|
+ IntervalTimeSec = 5;
|
|
|
+ break;
|
|
|
+ case 1: //10초
|
|
|
+ IntervalTimeSec = 10;
|
|
|
+ break;
|
|
|
+ case 2: //30초
|
|
|
+ IntervalTimeSec = 30;
|
|
|
+ break;
|
|
|
+ case 3: //1분
|
|
|
+ IntervalTimeSec = 60;
|
|
|
+ break;
|
|
|
+ case 4: //30분
|
|
|
+ IntervalTimeSec = 60 * 30;
|
|
|
+ break;
|
|
|
+ case 5: //60분
|
|
|
+ IntervalTimeSec = 60 * 60;
|
|
|
+ break;
|
|
|
+ default:
|
|
|
+ IntervalTimeSec = 5;
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ //전자액자App 설치유무 확인!
|
|
|
+ PackageManager pm = CTX.getPackageManager();
|
|
|
+ try {
|
|
|
+ pm.getApplicationInfo("kr.co.icontrols.autopicture", PackageManager.GET_META_DATA);
|
|
|
+ }
|
|
|
+ catch (RuntimeException re) {
|
|
|
+ LogUtil.errorLogInfo("", TAG, re);
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ catch (Exception e) {
|
|
|
+
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+
|
|
|
+ //사진 파일이 하나도 없으면 APP 실행시키지 않음!
|
|
|
+ File dirInternal = new File(define.ALBUM_PICTURE_LOCATION);
|
|
|
+ File dirUsb = new File("/storage/usb0");
|
|
|
+ try{
|
|
|
+ printfiles(dirInternal);
|
|
|
+ printfiles(dirUsb);
|
|
|
+ }
|
|
|
+ catch (RuntimeException re) {
|
|
|
+ LogUtil.errorLogInfo("", TAG, re);
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ catch (Exception e)
|
|
|
+ {
|
|
|
+
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ //사진 파일이 하나도 없으면 APP 실행시키지 않음!
|
|
|
+ if(AutoPicturefilesList.size() == 0)
|
|
|
+ {
|
|
|
+
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+
|
|
|
+ AutoPicturefilesList.clear();
|
|
|
+
|
|
|
+ //전자액자 App 시작!!
|
|
|
+ Intent intent = new Intent(Intent.ACTION_MAIN);
|
|
|
+ intent.setComponent(new ComponentName("kr.co.icontrols.autopicture", "kr.co.icontrols.autopicture.MainActivity"));
|
|
|
+ intent.putExtra("IMAGE_NEXTSHOW_TIME_UNIT_SEC", IntervalTimeSec);
|
|
|
+ intent.putExtra("IMAGE_NEXTSHOW_ANIMATION", DBLoadResult[6]+1);
|
|
|
+ intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
|
|
|
+ CTX.startActivity(intent);
|
|
|
+
|
|
|
+ return true;
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * @description
|
|
|
+ * USB에 있는 이미지 파일의 목록을 생성하는 함수<br>
|
|
|
+ * 재귀함수로써 모든 폴더를 탐색한다.<br>
|
|
|
+ * USB와 Storage/Bestin/DownloadPicture 내에 있는 파일의 확장자를 검사<br>
|
|
|
+ * 파일 포맷 : jpg, JPG, jpeg, JPEG, png, PNG, bmp, BMP 지원
|
|
|
+ */
|
|
|
+ public void printfiles(File file)
|
|
|
+ {
|
|
|
+ File[] list = file.listFiles();
|
|
|
+
|
|
|
+ //Log.d(TAG, "The full PATH to the sdcard location is:" +file.getPath());
|
|
|
+ if(list == null)
|
|
|
+ {
|
|
|
+
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ for (int i = 0; i < list.length; i++)
|
|
|
+ {
|
|
|
+ File temp_file = new File(file.getAbsolutePath(),list[i].getName());
|
|
|
+ if (temp_file.isDirectory() && temp_file.listFiles() != null)
|
|
|
+ {
|
|
|
+ //Log.d(TAG, "PATH folder" +temp_file.getAbsolutePath());
|
|
|
+ //I am inside The Directory... Searching:) So i am calling printfiles(File file) function to print the files in the directory
|
|
|
+ printfiles(temp_file);
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ String filename = temp_file.getName();
|
|
|
+ boolean isAccept = false;
|
|
|
+
|
|
|
+ if(filename.toLowerCase().endsWith(".jpg") == true)
|
|
|
+ {
|
|
|
+ isAccept = true;
|
|
|
+ }
|
|
|
+ else if(filename.toLowerCase().endsWith(".jpeg") == true)
|
|
|
+ {
|
|
|
+ isAccept = true;
|
|
|
+ }
|
|
|
+ else if(filename.toLowerCase().endsWith(".png") == true)
|
|
|
+ {
|
|
|
+ isAccept = true;
|
|
|
+ }
|
|
|
+ else if(filename.toLowerCase().endsWith(".bmp") == true)
|
|
|
+ {
|
|
|
+ isAccept = true;
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ isAccept = false;
|
|
|
+ }
|
|
|
+
|
|
|
+ if(isAccept == true)
|
|
|
+ {
|
|
|
+ AutoPicturefilesList.add(temp_file.getAbsolutePath());
|
|
|
+
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ /**
|
|
|
+ * @description
|
|
|
+ * 전자액자 APP 강제 종료.
|
|
|
+ */
|
|
|
+ public void EndAutoPictureAPP()
|
|
|
+ {
|
|
|
+
|
|
|
+
|
|
|
+ Intent intent = new Intent();
|
|
|
+ intent.setAction("kr.co.icontrols.autopicture.BR_APP_FINISH");
|
|
|
+ CTX.sendBroadcast(intent);
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * @description
|
|
|
+ * 원격검침 정보 저장
|
|
|
+ * @param
|
|
|
+ * isEMSEnable false면 EMS 사용안함, true면 EMS 사용함
|
|
|
+ * @param
|
|
|
+ * NumberOfKind 3이면 3종, 5이면 5종, 6이면 6종.(3 or 5 or 6만 입력 가능)
|
|
|
+ */
|
|
|
+ public boolean SetRemoteMeteringData(boolean isEMSEnable, int NumberOfKind)
|
|
|
+ {
|
|
|
+ String str = String.valueOf(isEMSEnable);
|
|
|
+ boolean result = false;
|
|
|
+ if((str.equalsIgnoreCase("true") == true) || (str.equalsIgnoreCase("false") == true))
|
|
|
+ {
|
|
|
+ if((NumberOfKind == 3) || (NumberOfKind == 5) || (NumberOfKind == 6))
|
|
|
+ {
|
|
|
+ UpdateWallPADData(REMOTE_METERING_EMS_ENABLE, str);
|
|
|
+ UpdateWallPADData(REMOTE_METERING_NUMBER_OF_KIND, Integer.toString(NumberOfKind));
|
|
|
+ result = true;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ return result;
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * @description
|
|
|
+ * 원격검침 EMS 사용여부 가져오기
|
|
|
+ * @return boolean형 true면 EMS 사용함, false면 EMS 사용하지 않음
|
|
|
+ */
|
|
|
+ public boolean GetRemoteMeteringIsEMSEnable()
|
|
|
+ {
|
|
|
+ String ret = null;
|
|
|
+ boolean ReturnValue = false;
|
|
|
+ ret = GetWallPADData(REMOTE_METERING_EMS_ENABLE);
|
|
|
+
|
|
|
+
|
|
|
+ if(ret.equals("true") == true)
|
|
|
+ {
|
|
|
+ ReturnValue = true;
|
|
|
+ }
|
|
|
+ else if(ret.equals("false") == true)
|
|
|
+ {
|
|
|
+ ReturnValue = false;
|
|
|
+ }
|
|
|
+ return ReturnValue;
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * @description
|
|
|
+ * 원격검침 몇종인지 정보 가져오는 함수.
|
|
|
+ * @return 3 or 5 or 6(3종 or 5종 or 6종)
|
|
|
+ */
|
|
|
+ public int GetRemoteMeteringNumberOfKind()
|
|
|
+ {
|
|
|
+ String ret = null;
|
|
|
+ ret = GetWallPADData(REMOTE_METERING_NUMBER_OF_KIND);
|
|
|
+
|
|
|
+
|
|
|
+ if((ret.equals("3") == true) || (ret.equals("5") == true) || (ret.equals("6") == true))
|
|
|
+ {
|
|
|
+ return Integer.parseInt(ret);
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+
|
|
|
+ return 3;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * @description
|
|
|
+ * 원격검침 목표량 에너지 별로 가져오는 함수
|
|
|
+ * @return string형 사용자가 설정한 에너지 목표값. 만약 잘못된 input값일 경우 999999999 리턴
|
|
|
+ * @param Index 0~5범위(0:전기, 1:수도, 2:가스, 3:온수, 4:난방, 5:탄소)
|
|
|
+ */
|
|
|
+ public String GetRemoteMeteringTargetValue(int Index)
|
|
|
+ {
|
|
|
+ String ret = null;
|
|
|
+
|
|
|
+
|
|
|
+ if((Index < 0) || (Index > 5))
|
|
|
+ {
|
|
|
+ return "999999999";
|
|
|
+ }
|
|
|
+
|
|
|
+ switch(Index)
|
|
|
+ {
|
|
|
+ case 0:
|
|
|
+ ret = GetWallPADData(REMOTE_METERING_TARGET_VALUE_ELECT);
|
|
|
+ break;
|
|
|
+ case 1:
|
|
|
+ ret = GetWallPADData(REMOTE_METERING_TARGET_VALUE_WATER);
|
|
|
+ break;
|
|
|
+ case 2:
|
|
|
+ ret = GetWallPADData(REMOTE_METERING_TARGET_VALUE_GAS);
|
|
|
+ break;
|
|
|
+ case 3:
|
|
|
+ ret = GetWallPADData(REMOTE_METERING_TARGET_VALUE_HOTWATER);
|
|
|
+ break;
|
|
|
+ case 4:
|
|
|
+ ret = GetWallPADData(REMOTE_METERING_TARGET_VALUE_HEATING);
|
|
|
+ break;
|
|
|
+ case 5:
|
|
|
+ ret = GetWallPADData(REMOTE_METERING_TARGET_VALUE_CARBON);
|
|
|
+ break;
|
|
|
+ default:
|
|
|
+ ret = "0";
|
|
|
+ break;
|
|
|
+ }
|
|
|
+
|
|
|
+ //return Integer.parseInt(ret);
|
|
|
+ return ret;
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ /**
|
|
|
+ * @description
|
|
|
+ * 원격검침 목표량 에너지 별로 설정하는 함수 *
|
|
|
+ * @return boolean true or false
|
|
|
+ * @param Index 0~5범위(0:전기, 1:수도, 2:가스, 3:온수, 4:난방, 5:탄소)
|
|
|
+ * @param Value 에너지 목표량 값
|
|
|
+ */
|
|
|
+ public boolean SetRemoteMeteringTargetValue(int Index, String Value)
|
|
|
+ {
|
|
|
+ boolean ret = false;
|
|
|
+
|
|
|
+
|
|
|
+ if((Index < 0) || (Index > 5))
|
|
|
+ {
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+
|
|
|
+ switch(Index)
|
|
|
+ {
|
|
|
+ case 0:
|
|
|
+ ret = UpdateWallPADData(REMOTE_METERING_TARGET_VALUE_ELECT, Value);
|
|
|
+ break;
|
|
|
+ case 1:
|
|
|
+ ret = UpdateWallPADData(REMOTE_METERING_TARGET_VALUE_WATER, Value);
|
|
|
+ break;
|
|
|
+ case 2:
|
|
|
+ ret = UpdateWallPADData(REMOTE_METERING_TARGET_VALUE_GAS, Value);
|
|
|
+ break;
|
|
|
+ case 3:
|
|
|
+ ret = UpdateWallPADData(REMOTE_METERING_TARGET_VALUE_HOTWATER, Value);
|
|
|
+ break;
|
|
|
+ case 4:
|
|
|
+ ret = UpdateWallPADData(REMOTE_METERING_TARGET_VALUE_HEATING, Value);
|
|
|
+ break;
|
|
|
+ case 5:
|
|
|
+ ret = UpdateWallPADData(REMOTE_METERING_TARGET_VALUE_CARBON, Value);
|
|
|
+ break;
|
|
|
+ default:
|
|
|
+ return ret;
|
|
|
+ }
|
|
|
+
|
|
|
+ return ret;
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ /**
|
|
|
+ * @description
|
|
|
+ * 에너지관리서버의 검침일 설정 - 검침일 또는 말일 두가지 중에 하나 선택 가능 *
|
|
|
+ * @return boolean true(말일 사용) or false(검침일 사용)
|
|
|
+ */
|
|
|
+ public boolean GetRemoteMetering_BaseDateType()
|
|
|
+ {
|
|
|
+ boolean ret = false;
|
|
|
+ String tempString = GetWallPADData(REMOTE_METERING_BASE_DATE_LASTDAY_USE);
|
|
|
+ if(tempString.equalsIgnoreCase("false") == true)
|
|
|
+ {
|
|
|
+ ret = false;
|
|
|
+ }
|
|
|
+ else if(tempString.equalsIgnoreCase("true") == true)
|
|
|
+ {
|
|
|
+ ret = true;
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ ret = false;
|
|
|
+ }
|
|
|
+ return ret;
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * @description
|
|
|
+ * 에너지관리서버의 검침일 설정 - 검침일 또는 말일 두가지 중에 하나 선택 가능 *
|
|
|
+ * @return boolean true(정상 저장) or false(저장 실패)
|
|
|
+ * @param input boolean true(말일 사용) or false(검침일 사용)
|
|
|
+ */
|
|
|
+ public boolean SetRemoteMetering_BaseDateType(boolean input)
|
|
|
+ {
|
|
|
+ boolean ret = false;
|
|
|
+
|
|
|
+ if(input == true)
|
|
|
+ {
|
|
|
+ ret = UpdateWallPADData(REMOTE_METERING_BASE_DATE_LASTDAY_USE, "true");
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ ret = UpdateWallPADData(REMOTE_METERING_BASE_DATE_LASTDAY_USE, "false");
|
|
|
+ }
|
|
|
+ return ret;
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * @description
|
|
|
+ * 에너지관리서버 연동 시 목표량대비 알림 사용 여부
|
|
|
+ * @return boolean true(사용) or false(사용안함)
|
|
|
+ */
|
|
|
+ public boolean GetRemoteMetering_Alarm()
|
|
|
+ {
|
|
|
+ boolean ret = false;
|
|
|
+ String tempString = GetWallPADData(REMOTE_METERING_ALARM_USE);
|
|
|
+ if(tempString.equalsIgnoreCase("false") == true)
|
|
|
+ {
|
|
|
+ ret = false;
|
|
|
+ }
|
|
|
+ else if(tempString.equalsIgnoreCase("true") == true)
|
|
|
+ {
|
|
|
+ ret = true;
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ ret = false;
|
|
|
+ }
|
|
|
+ return ret;
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * @description
|
|
|
+ * 에너지관리서버 연동 시 목표량대비 알림 사용 여부
|
|
|
+ * @return boolean true(정상 저장) or false(저장 실패)
|
|
|
+ * @param input boolean true(사용) or false(사용안함)
|
|
|
+ */
|
|
|
+ public boolean SetRemoteMetering_Alarm(boolean input)
|
|
|
+ {
|
|
|
+ boolean ret = false;
|
|
|
+
|
|
|
+ if(input == true)
|
|
|
+ {
|
|
|
+ ret = UpdateWallPADData(REMOTE_METERING_ALARM_USE, "true");
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ ret = UpdateWallPADData(REMOTE_METERING_ALARM_USE, "false");
|
|
|
+ }
|
|
|
+ return ret;
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * @description
|
|
|
+ * 에너지관리서버 연동 시 목표량대비 알림 시간 설정 가져오기
|
|
|
+ * @return int Time (가져오기 실패 시 기본 값 삽입 후, 12시 리턴)
|
|
|
+ */
|
|
|
+ public int GetRemoteMetering_AlarmTime()
|
|
|
+ {
|
|
|
+ int retTime = 12;
|
|
|
+ String tempString = GetWallPADData(REMOTE_METERING_ALARM_TIME);
|
|
|
+
|
|
|
+ if(tempString == null)
|
|
|
+ {
|
|
|
+ Log.d(TAG, "insertWallPADDB(WallpadStatusData.REMOTE_METERING_ALARM_TIME, default");
|
|
|
+ insertWallPADDB(WallpadStatusData.REMOTE_METERING_ALARM_TIME, WallpadStatusData.REMOTE_METERING_ALARM_TIME_DEFAULT);
|
|
|
+ }
|
|
|
+
|
|
|
+ try
|
|
|
+ {
|
|
|
+ retTime = Integer.parseInt(tempString);
|
|
|
+ }
|
|
|
+ catch (RuntimeException re) {
|
|
|
+ LogUtil.errorLogInfo("", TAG, re);
|
|
|
+ return 12;
|
|
|
+ }
|
|
|
+ catch (Exception e)
|
|
|
+ {
|
|
|
+ LogUtil.errorLogInfo("", TAG, e);//e.printStackTrace();
|
|
|
+ return 12;
|
|
|
+ }
|
|
|
+
|
|
|
+ return retTime;
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * @description
|
|
|
+ * 에너지관리서버 연동 시 목표량대비 알림 시간 설정
|
|
|
+ * @return boolean true(정상 저장) or false(저장 실패)
|
|
|
+ * @param inputTime integer
|
|
|
+ */
|
|
|
+ public boolean SetRemoteMetering_AlarmTime(int inputTime)
|
|
|
+ {
|
|
|
+ boolean ret = false;
|
|
|
+ String tempString = "12";
|
|
|
+
|
|
|
+ try
|
|
|
+ {
|
|
|
+ tempString = String.valueOf(inputTime);
|
|
|
+ ret = UpdateWallPADData(REMOTE_METERING_ALARM_TIME, tempString);
|
|
|
+ }
|
|
|
+ catch (RuntimeException re) {
|
|
|
+ LogUtil.errorLogInfo("", TAG, re);
|
|
|
+ ret = UpdateWallPADData(REMOTE_METERING_ALARM_TIME, REMOTE_METERING_ALARM_TIME_DEFAULT);
|
|
|
+ }
|
|
|
+ catch (Exception e)
|
|
|
+ {
|
|
|
+ LogUtil.errorLogInfo("", TAG, e);//e.printStackTrace();
|
|
|
+ ret = UpdateWallPADData(REMOTE_METERING_ALARM_TIME, REMOTE_METERING_ALARM_TIME_DEFAULT);
|
|
|
+ }
|
|
|
+
|
|
|
+ return ret;
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * @description
|
|
|
+ * 통화 음량 및 카메라 밝기/대비 설정값 가져오기
|
|
|
+ * @return int형 사용자가 설정한 통화 음량값 및 카메라 밝기/대비값. 만약 잘못된 input값일 경우 -999 리턴
|
|
|
+ * @param Index 0~6범위(0:현관, 1:로비, 2:경비, 3:이웃, 4:국선, 5:현관카메라 밝기, 6:현관카메라 대비)<br>
|
|
|
+ * public static final int INDEX_CALL_DOORCAM_SOUND = 0;<br>
|
|
|
+ public static final int INDEX_CALL_LOBBY_SOUND = 1;<br>
|
|
|
+ public static final int INDEX_CALL_GUARD_SOUND = 2;<br>
|
|
|
+ public static final int INDEX_CALL_NEIGHBOR_SOUND = 3;<br>
|
|
|
+ public static final int INDEX_CALL_PSTN_SOUND = 4;<br>
|
|
|
+ public static final int INDEX_CALL_DOORCAM_BRIGHTNESS = 5;<br>
|
|
|
+ public static final int INDEX_CALL_DOORCAM_CONTRAST = 6;<br>
|
|
|
+ */
|
|
|
+ public int GetCallSound_DoorCamValue(int Index)
|
|
|
+ {
|
|
|
+ String ret = null;
|
|
|
+ int returnValue = -999;
|
|
|
+
|
|
|
+ if ((Index < INDEX_CALL_DOORCAM_SOUND) || (Index > INDEX_CALL_DOORCAM_CONTRAST))
|
|
|
+ {
|
|
|
+ Log.w(TAG, "[DB] GetCallSound_DoorCamValue: Input Value is Wrong: " + Index);
|
|
|
+ return returnValue;
|
|
|
+ }
|
|
|
+
|
|
|
+ switch (Index)
|
|
|
+ {
|
|
|
+ case 0:
|
|
|
+ ret = GetWallPADData(CALL_DOORCAM_SOUND_VALUE);
|
|
|
+ break;
|
|
|
+ case 1:
|
|
|
+ ret = GetWallPADData(CALL_LOBBY_SOUND_VALUE);
|
|
|
+ break;
|
|
|
+ case 2:
|
|
|
+ ret = GetWallPADData(CALL_GUARD_SOUND_VALUE);
|
|
|
+ break;
|
|
|
+ case 3:
|
|
|
+ ret = GetWallPADData(CALL_NEIGHBOR_SOUND_VALUE);
|
|
|
+ break;
|
|
|
+ case 4:
|
|
|
+ ret = GetWallPADData(CALL_PSTN_SOUND_VALUE);
|
|
|
+ break;
|
|
|
+ case 5:
|
|
|
+ ret = GetWallPADData(CALL_DOORCAM_BRIGHTNESS_VALUE);
|
|
|
+ break;
|
|
|
+ case 6:
|
|
|
+ ret = GetWallPADData(CALL_DOORCAM_CONTRAST_VALUE);
|
|
|
+ break;
|
|
|
+ default:
|
|
|
+ Log.w(TAG, "[DB] GetCallSound_DoorCamValue: Input Value is Wrong: " + Index);
|
|
|
+ return returnValue;
|
|
|
+ }
|
|
|
+
|
|
|
+ try
|
|
|
+ {
|
|
|
+ returnValue = Integer.parseInt(ret);
|
|
|
+ }
|
|
|
+ catch (RuntimeException re) {
|
|
|
+ LogUtil.errorLogInfo("", TAG, re);
|
|
|
+ return returnValue;
|
|
|
+ }
|
|
|
+ catch (Exception e)
|
|
|
+ {
|
|
|
+ Log.w(TAG, "[DB] GetCallSound_DoorCamValue: ParseInt Error");
|
|
|
+ LogUtil.errorLogInfo("", TAG, e);//e.printStackTrace();
|
|
|
+ return returnValue;
|
|
|
+ }
|
|
|
+
|
|
|
+ return returnValue;
|
|
|
+ }
|
|
|
+ /**
|
|
|
+ * @description
|
|
|
+ * 통화 음량 및 카메라 밝기/대비 설정값 설정하기
|
|
|
+ * @param Index 0~6범위(0:현관, 1:로비, 2:경비, 3:이웃, 4:국선, 5:현관카메라 밝기, 6:현관카메라 대비)<br>
|
|
|
+ * public static final int INDEX_CALL_DOORCAM_SOUND = 0;<br>
|
|
|
+ public static final int INDEX_CALL_LOBBY_SOUND = 1;<br>
|
|
|
+ public static final int INDEX_CALL_GUARD_SOUND = 2;<br>
|
|
|
+ public static final int INDEX_CALL_NEIGHBOR_SOUND = 3;<br>
|
|
|
+ public static final int INDEX_CALL_PSTN_SOUND = 4;<br>
|
|
|
+ public static final int INDEX_CALL_DOORCAM_BRIGHTNESS = 5;<br>
|
|
|
+ public static final int INDEX_CALL_DOORCAM_CONTRAST = 6;<br>
|
|
|
+ * @param InputValue 설정값 0~10 범위
|
|
|
+ * @return true(설정 성공) or false(설정 실패)
|
|
|
+ */
|
|
|
+ public boolean SetCallSound_DoorCamValue(int Index, int InputValue)
|
|
|
+ {
|
|
|
+ boolean ret = false;
|
|
|
+ String TempValue = null;
|
|
|
+
|
|
|
+ if ((Index < INDEX_CALL_DOORCAM_SOUND) || (Index > INDEX_CALL_DOORCAM_CONTRAST))
|
|
|
+ {
|
|
|
+ Log.w(TAG, "[DB] SetCallSound_DoorCamValue: Input Index is Wrong: " + Index);
|
|
|
+ return ret;
|
|
|
+ }
|
|
|
+ if ((InputValue < 0) || (InputValue > 10))
|
|
|
+ {
|
|
|
+ Log.w(TAG, "[DB] SetCallSound_DoorCamValue: InputValue is Wrong: " + InputValue);
|
|
|
+ return ret;
|
|
|
+ }
|
|
|
+
|
|
|
+ try
|
|
|
+ {
|
|
|
+ TempValue = String.valueOf(InputValue);
|
|
|
+ }
|
|
|
+ catch (RuntimeException re) {
|
|
|
+ LogUtil.errorLogInfo("", TAG, re);
|
|
|
+ return ret;
|
|
|
+ }
|
|
|
+ catch (Exception e)
|
|
|
+ {
|
|
|
+ Log.w(TAG, "[DB] SetCallSound_DoorCamValue: Parse Int to String Error");
|
|
|
+ LogUtil.errorLogInfo("", TAG, e);//e.printStackTrace();
|
|
|
+ return ret;
|
|
|
+ }
|
|
|
+
|
|
|
+ switch(Index)
|
|
|
+ {
|
|
|
+ case 0:
|
|
|
+ ret = UpdateWallPADData(CALL_DOORCAM_SOUND_VALUE, TempValue);
|
|
|
+ break;
|
|
|
+ case 1:
|
|
|
+ ret = UpdateWallPADData(CALL_LOBBY_SOUND_VALUE, TempValue);
|
|
|
+ break;
|
|
|
+ case 2:
|
|
|
+ ret = UpdateWallPADData(CALL_GUARD_SOUND_VALUE, TempValue);
|
|
|
+ break;
|
|
|
+ case 3:
|
|
|
+ ret = UpdateWallPADData(CALL_NEIGHBOR_SOUND_VALUE, TempValue);
|
|
|
+ break;
|
|
|
+ case 4:
|
|
|
+ ret = UpdateWallPADData(CALL_PSTN_SOUND_VALUE, TempValue);
|
|
|
+ break;
|
|
|
+ case 5:
|
|
|
+ ret = UpdateWallPADData(CALL_DOORCAM_BRIGHTNESS_VALUE, TempValue);
|
|
|
+ break;
|
|
|
+ case 6:
|
|
|
+ ret = UpdateWallPADData(CALL_DOORCAM_CONTRAST_VALUE, TempValue);
|
|
|
+ break;
|
|
|
+ default:
|
|
|
+ Log.w(TAG, "[DB] SetCallSound_DoorCamValue: Input Index is Wrong: " + Index);
|
|
|
+ return ret;
|
|
|
+ }
|
|
|
+
|
|
|
+ return ret;
|
|
|
+ }
|
|
|
+
|
|
|
+ /****/
|
|
|
+ /**
|
|
|
+ * @description
|
|
|
+ * 엘리베이터 위젯 복구 기능 사용여부 가져옴 (1번 사용하였으면 무조건 true로 설정됨)
|
|
|
+ * @return boolean true(이미 사용하였으몰 실행하면 안됨) or false(사용하지 않았으므로 복구기능 사용해도 됨)
|
|
|
+ */
|
|
|
+ public boolean GetElevator_Widget_Restore()
|
|
|
+ {
|
|
|
+ boolean ret = true;
|
|
|
+ String tempString = GetWallPADData(ELEVATOR_WIDGET_RESTORE);
|
|
|
+ if(tempString.equalsIgnoreCase("false") == true)
|
|
|
+ {
|
|
|
+ ret = false;
|
|
|
+ }
|
|
|
+ else if(tempString.equalsIgnoreCase("true") == true)
|
|
|
+ {
|
|
|
+ ret = true;
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ ret = true;
|
|
|
+ }
|
|
|
+ return ret;
|
|
|
+ }
|
|
|
+
|
|
|
+ /****/
|
|
|
+ /**
|
|
|
+ * @description
|
|
|
+ * 엘리베이터 위젯 복구 기능 사용여부 설정함 (true로 설정 가능)
|
|
|
+ * @input boolean true(1번 설정 사용함)
|
|
|
+ * @return boolean 성공여부(true면 성공 false면 실패)
|
|
|
+ */
|
|
|
+ public boolean SetElevator_Widget_Restore(boolean input)
|
|
|
+ {
|
|
|
+ boolean result = true;
|
|
|
+ if(input == true)
|
|
|
+ {
|
|
|
+ result = UpdateWallPADData(ELEVATOR_WIDGET_RESTORE, "true");
|
|
|
+ }
|
|
|
+ return result;
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ public void SetSubMenuType(int type)
|
|
|
+ {
|
|
|
+ if (RangeCheck(SUBMENUTYPETEXT, type)==false) return;
|
|
|
+ UpdateWallPADData(SUBMENU_TYPE, SUBMENUTYPETEXT[type]);
|
|
|
+ }
|
|
|
+
|
|
|
+ public int GetSubMenuType()
|
|
|
+ {
|
|
|
+ try {
|
|
|
+ String ret = GetWallPADData(SUBMENU_TYPE);
|
|
|
+ return Integer.parseInt(ret);
|
|
|
+ }
|
|
|
+ catch (RuntimeException re) {
|
|
|
+ LogUtil.errorLogInfo("", TAG, re);
|
|
|
+ return 0;
|
|
|
+ }
|
|
|
+ catch (Exception e)
|
|
|
+ {
|
|
|
+ LogUtil.errorLogInfo("", TAG, e);//e.printStackTrace();
|
|
|
+ return 0;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ private boolean RangeCheck(String[] data, int idx)
|
|
|
+ {
|
|
|
+ if (idx < 0 || idx >= data.length)
|
|
|
+ return false;
|
|
|
+
|
|
|
+ return true;
|
|
|
+ }
|
|
|
+
|
|
|
+ public void SetMainBGSlidShowTime(int timeout)
|
|
|
+ {
|
|
|
+ UpdateWallPADData(MAINBGSLIDSHOWTIME, String.valueOf(timeout));
|
|
|
+ }
|
|
|
+
|
|
|
+ public int GetMainBGSlidShowTime()
|
|
|
+ {
|
|
|
+ try {
|
|
|
+ String ret = GetWallPADData(MAINBGSLIDSHOWTIME);
|
|
|
+ return Integer.parseInt(ret);
|
|
|
+ }
|
|
|
+ catch (RuntimeException re) {
|
|
|
+ LogUtil.errorLogInfo("", TAG, re);
|
|
|
+ return 0;
|
|
|
+ }
|
|
|
+ catch (Exception e)
|
|
|
+ {
|
|
|
+ LogUtil.errorLogInfo("", TAG, e);//e.printStackTrace();
|
|
|
+ return 0;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ public static class WeatherItem
|
|
|
+ {
|
|
|
+ public int seqnum;
|
|
|
+ public String date;
|
|
|
+ public String state;
|
|
|
+ public String code;
|
|
|
+ public String low;
|
|
|
+ public String high;
|
|
|
+ public String am;
|
|
|
+ public String pm;
|
|
|
+ }
|
|
|
+
|
|
|
+ public class WeatherTable
|
|
|
+ {
|
|
|
+ List<WeatherItem> WeatherData = new ArrayList<WeatherItem>();
|
|
|
+ public WeatherTable()
|
|
|
+ {
|
|
|
+ if (!CheckTableExist(MainWeatherTBL))
|
|
|
+ CreateTable(CreateMainWeatherDB);
|
|
|
+ }
|
|
|
+ public void InitWeatherTable()
|
|
|
+ {
|
|
|
+ if (!CheckTableExist(MainWeatherTBL))
|
|
|
+ CreateTable(CreateMainWeatherDB);
|
|
|
+ else
|
|
|
+ DeleteTableInst(MainWeatherTBL);
|
|
|
+ WeatherData.clear();
|
|
|
+ }
|
|
|
+ public void AddWeatherData(String date, String state , String code, String low, String high, String am, String pm)
|
|
|
+ {
|
|
|
+ ContentValues values = new ContentValues();
|
|
|
+
|
|
|
+ values.put("date", date);
|
|
|
+ values.put("state", state);
|
|
|
+ values.put("code", code);
|
|
|
+ values.put("low", low);
|
|
|
+ values.put("high", high);
|
|
|
+ values.put("am", am);
|
|
|
+ values.put("pm", pm);
|
|
|
+ wdb.insert(MainWeatherTBL, null, values);
|
|
|
+ }
|
|
|
+
|
|
|
+ public List<WeatherItem> GetWeatherList()
|
|
|
+ {
|
|
|
+ if (WeatherData == null || WeatherData.size() == 0)
|
|
|
+ return GetWeatherData();
|
|
|
+
|
|
|
+ return WeatherData;
|
|
|
+ }
|
|
|
+
|
|
|
+ public List<WeatherItem> GetWeatherData()
|
|
|
+ {
|
|
|
+ Cursor cursor = wdb.rawQuery("select date, state, code, low, high, am, pm from "+MainWeatherTBL+" order by seqnum asc;", null);
|
|
|
+
|
|
|
+ while (cursor.moveToNext())
|
|
|
+ {
|
|
|
+ WeatherItem item = new WeatherItem();
|
|
|
+ item.date = cursor.getString(0);
|
|
|
+ item.state = cursor.getString(1);
|
|
|
+ item.code = cursor.getString(2);
|
|
|
+ item.low = cursor.getString(3);
|
|
|
+ item.high = cursor.getString(4);
|
|
|
+ item.am = cursor.getString(5);
|
|
|
+ item.pm = cursor.getString(6);
|
|
|
+ if(WeatherData!=null)
|
|
|
+ WeatherData.add(item);
|
|
|
+ }
|
|
|
+ cursor.close();
|
|
|
+ return WeatherData;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ WeatherTable WeatherCtr;
|
|
|
+ public WeatherTable GetWeatherTableController()
|
|
|
+ {
|
|
|
+ if (WeatherCtr == null)
|
|
|
+ WeatherCtr = new WeatherTable();
|
|
|
+ return WeatherCtr;
|
|
|
+ }
|
|
|
+
|
|
|
+ public static class WidgetItem
|
|
|
+ {
|
|
|
+ public int seqnum;
|
|
|
+ public int idx; // 0~ 14
|
|
|
+ public int widgetID; // Main Source ID.java WidgetID
|
|
|
+ }
|
|
|
+
|
|
|
+ public class WidgetTable
|
|
|
+ {
|
|
|
+ List<WidgetItem> WidgetData = new ArrayList<WidgetItem>();
|
|
|
+ public WidgetTable()
|
|
|
+ {
|
|
|
+ if (!CheckTableExist(WidgetTBL))
|
|
|
+ {
|
|
|
+ CreateTable(CreateWidgetDB);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ public boolean AddWidgetData(int idx, int widgetId )
|
|
|
+ {
|
|
|
+ try
|
|
|
+ {
|
|
|
+ ContentValues values = new ContentValues();
|
|
|
+ values.put("id", idx );
|
|
|
+ values.put("widgetid", widgetId);
|
|
|
+ wdb.insert(WidgetTBL, null, values);
|
|
|
+ return true;
|
|
|
+ } catch (SQLException e)
|
|
|
+ {
|
|
|
+ LogUtil.errorLogInfo("", TAG, e);//e.printStackTrace();
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ public boolean DeleteWidgetData( int id )
|
|
|
+ {
|
|
|
+ String sqlst = "delete from " + WidgetTBL + " where id= " + String.valueOf(id) + ";";
|
|
|
+ try {
|
|
|
+ wdb.execSQL(sqlst);
|
|
|
+ return true;
|
|
|
+ } catch (SQLException e)
|
|
|
+ {
|
|
|
+ LogUtil.errorLogInfo("", TAG, e);//e.printStackTrace();
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ public boolean DeleteWidgetDataID( int widgetid )
|
|
|
+ {
|
|
|
+ String sqlst = "delete from " + WidgetTBL + " where widgetid= " + String.valueOf(widgetid) + ";";
|
|
|
+ try {
|
|
|
+ wdb.execSQL(sqlst);
|
|
|
+ return true;
|
|
|
+ } catch (SQLException e)
|
|
|
+ {
|
|
|
+ LogUtil.errorLogInfo("", TAG, e);//e.printStackTrace();
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ public List<WidgetItem> GetWidgetData()
|
|
|
+ {
|
|
|
+ try
|
|
|
+ {
|
|
|
+ Cursor cursor = wdb.rawQuery("select id, widgetid from "+WidgetTBL+" order by seqnum asc;", null);
|
|
|
+ WidgetData.clear();
|
|
|
+ while (cursor.moveToNext())
|
|
|
+ {
|
|
|
+ WidgetItem item = new WidgetItem();
|
|
|
+ item.idx = cursor.getInt(0);
|
|
|
+ item.widgetID = cursor.getInt(1);
|
|
|
+ WidgetData.add(item);
|
|
|
+ }
|
|
|
+ cursor.close();
|
|
|
+ }
|
|
|
+ catch (RuntimeException re) {
|
|
|
+ LogUtil.errorLogInfo("", TAG, re);
|
|
|
+ return null;
|
|
|
+ }
|
|
|
+ catch (Exception e)
|
|
|
+ {
|
|
|
+ LogUtil.errorLogInfo("", TAG, e);//e.printStackTrace();
|
|
|
+ return null;
|
|
|
+ }
|
|
|
+ return WidgetData;
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+ WidgetTable WidgetCtr;
|
|
|
+ public WidgetTable GetWidgetTableController()
|
|
|
+ {
|
|
|
+ if (WidgetCtr == null)
|
|
|
+ WidgetCtr = new WidgetTable();
|
|
|
+ return WidgetCtr;
|
|
|
+ }
|
|
|
+
|
|
|
+ public int GetWallPadRebootingCount() {
|
|
|
+ String strRet = GetWallPADData(DB_WALLPAD_IGW_COMMAND_COUNT);
|
|
|
+ if (strRet == null) {
|
|
|
+ Log.d(TAG, "[GetWallPadRebootingCount] strRet is null !!");
|
|
|
+ insertWallPADDB(DB_WALLPAD_IGW_COMMAND_COUNT, "0");
|
|
|
+ return 0;
|
|
|
+ }
|
|
|
+
|
|
|
+ int ret = 0;
|
|
|
+ try {
|
|
|
+ ret = Integer.parseInt(strRet);
|
|
|
+ } catch (RuntimeException re) {
|
|
|
+ LogUtil.errorLogInfo("", TAG, re);
|
|
|
+ }
|
|
|
+ catch (Exception e) {
|
|
|
+ Log.e(TAG, "[Exception] GetWallPadRebootingCount");
|
|
|
+ LogUtil.errorLogInfo("", TAG, e);//e.printStackTrace();
|
|
|
+ }
|
|
|
+ return ret;
|
|
|
+ }
|
|
|
+
|
|
|
+ public void SetWallPadRebootingCount(int count) {
|
|
|
+ boolean bRet = UpdateWallPADData(DB_WALLPAD_IGW_COMMAND_COUNT, String.valueOf(count));
|
|
|
+ if (bRet == false) {
|
|
|
+ Log.d(TAG, "[SetWallPadRebootingCount] UpdateWallPADData false !!");
|
|
|
+ insertWallPADDB(DB_WALLPAD_IGW_COMMAND_COUNT, "0");
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 스마트 분전반 비상 상태 설정하기
|
|
|
+ * @param normal - true면 정상, false면 비정상
|
|
|
+ * @return boolean - true면 정상, false면 오류
|
|
|
+ * **/
|
|
|
+ public boolean SetSmartLightAlarm(boolean normal)
|
|
|
+ {
|
|
|
+ boolean bRet;
|
|
|
+ if(normal)
|
|
|
+ {
|
|
|
+ bRet = UpdateWallPADData(DEV_SMARTLIGHT_STATUS, "normal");
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ bRet = UpdateWallPADData(DEV_SMARTLIGHT_STATUS, "alarm");
|
|
|
+ }
|
|
|
+ return bRet;
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 스마트 분전반 비상 상태 가져오기
|
|
|
+ * @return "normal"이면 정상, "alarm"이면 비상상태
|
|
|
+ * **/
|
|
|
+ public String GetSmartLightAlarm()
|
|
|
+ {
|
|
|
+ try {
|
|
|
+ String ret = GetWallPADData(DEV_SMARTLIGHT_STATUS);
|
|
|
+ return ret;
|
|
|
+ }
|
|
|
+ catch (RuntimeException re) {
|
|
|
+ LogUtil.errorLogInfo("", TAG, re);
|
|
|
+ return null;
|
|
|
+ }
|
|
|
+ catch (Exception e)
|
|
|
+ {
|
|
|
+ LogUtil.errorLogInfo("", TAG, e);//e.printStackTrace();
|
|
|
+ return null;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 스마트 분전반 비상 상태 설정하기
|
|
|
+ * @param Device - Device정보
|
|
|
+ * **/
|
|
|
+ public boolean SetSmartLightAlarmDevice(String Device)
|
|
|
+ {
|
|
|
+ return UpdateWallPADData(DEV_SMARTLIGHT_DEVICE, Device);
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 스마트 분전반 비상 디바이스 정보 가져오기
|
|
|
+ * @return null/led_converter/em/led_light/power_controller/concent/dc_apu/energy_controller
|
|
|
+ * **/
|
|
|
+ public String GetSmartLightAlarmDevice()
|
|
|
+ {
|
|
|
+ try {
|
|
|
+ String ret = GetWallPADData(DEV_SMARTLIGHT_DEVICE);
|
|
|
+ return ret;
|
|
|
+ }
|
|
|
+ catch (RuntimeException re) {
|
|
|
+ LogUtil.errorLogInfo("", TAG, re);
|
|
|
+ return null;
|
|
|
+ }
|
|
|
+ catch (Exception e)
|
|
|
+ {
|
|
|
+ LogUtil.errorLogInfo("", TAG, e);//e.printStackTrace();
|
|
|
+ return null;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ public boolean SetKNXAlarmStatus(boolean normal) {
|
|
|
+ boolean bRet;
|
|
|
+ if (normal) {
|
|
|
+ bRet = UpdateWallPADData(DEV_KNXDEVICE_STATUS, "normal");
|
|
|
+ } else {
|
|
|
+ bRet = UpdateWallPADData(DEV_KNXDEVICE_STATUS, "alarm");
|
|
|
+ }
|
|
|
+ return bRet;
|
|
|
+ }
|
|
|
+
|
|
|
+ public String GetKNXAlarmStatus(int devIndex) {
|
|
|
+ try {
|
|
|
+ String ret = GetWallPADData(DEV_KNXDEVICE_STATUS);
|
|
|
+ return ret;
|
|
|
+ } catch (RuntimeException re) {
|
|
|
+ LogUtil.errorLogInfo("", TAG, re);
|
|
|
+ return null;
|
|
|
+ }
|
|
|
+ catch (Exception e) {
|
|
|
+ LogUtil.errorLogInfo("", TAG, e);//e.printStackTrace();
|
|
|
+ return null;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ public boolean SetKNXAlarmCause(String cause) {
|
|
|
+ return UpdateWallPADData(DEV_KNXDEVICE_CAUSE, cause);
|
|
|
+ }
|
|
|
+
|
|
|
+ public String GetKNXAlarmCause(int devIndex) {
|
|
|
+ try {
|
|
|
+ String ret = GetWallPADData(DEV_KNXDEVICE_CAUSE);
|
|
|
+ return ret;
|
|
|
+ } catch (RuntimeException re) {
|
|
|
+ LogUtil.errorLogInfo("", TAG, re);
|
|
|
+ return null;
|
|
|
+ }
|
|
|
+ catch (Exception e) {
|
|
|
+ LogUtil.errorLogInfo("", TAG, e);//e.printStackTrace();
|
|
|
+ return null;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 메인월패드 난방 방 개수 가져오기
|
|
|
+ * @return
|
|
|
+ */
|
|
|
+ public int GetHeatingRoomNum() {
|
|
|
+ String strRet = GetWallPADData(DB_WALLPAD_HEATING_ROOM_NUM);
|
|
|
+ if (strRet == null) {
|
|
|
+ Log.d(TAG, "[GetHeatingRoomNum] strRet is null !!");
|
|
|
+ insertWallPADDB(DB_WALLPAD_HEATING_ROOM_NUM, "0");
|
|
|
+ return 0;
|
|
|
+ }
|
|
|
+
|
|
|
+ int ret = 0;
|
|
|
+ try {
|
|
|
+ ret = Integer.parseInt(strRet);
|
|
|
+ } catch (RuntimeException re) {
|
|
|
+ LogUtil.errorLogInfo("", TAG, re);
|
|
|
+ }
|
|
|
+ catch (Exception e) {
|
|
|
+ Log.e(TAG, "[Exception] GetHeatingRoomNum()");
|
|
|
+ LogUtil.errorLogInfo("", TAG, e);//e.printStackTrace();
|
|
|
+ }
|
|
|
+ return ret;
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 난방 방개수 설정하기
|
|
|
+ * @param nValue
|
|
|
+ */
|
|
|
+ public void setHeatingRoomNum(int nValue) {
|
|
|
+ boolean bRet = UpdateWallPADData(DB_WALLPAD_HEATING_ROOM_NUM, String.valueOf(nValue));
|
|
|
+ if (bRet == false) {
|
|
|
+ Log.d(TAG, "[setHeatingRoomNum] UpdateWallPADData false !!");
|
|
|
+ insertWallPADDB(DB_WALLPAD_HEATING_ROOM_NUM, "0");
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 스마트현관카메라 거동수상자 녹화 설정 여부 읽기
|
|
|
+ *
|
|
|
+ * @return (boolean) 설정값 (true: 녹화 ON , false:녹화 OFF)
|
|
|
+ */
|
|
|
+ public boolean GetStrangerRecordingOnOff()
|
|
|
+ {
|
|
|
+ try
|
|
|
+ {
|
|
|
+ String strRet = GetWallPADData(SMARTIOT_RECORDING_STRANGER_ONOFF);
|
|
|
+ Log.d(TAG, "[GetStrangerRecordingOnOff] strRet [" + strRet + "]");
|
|
|
+ if (strRet == null) {
|
|
|
+ Log.d(TAG, "[GetStrangerRecordingOnOff] strRet is null !!");
|
|
|
+ insertWallPADDB(SMARTIOT_RECORDING_STRANGER_ONOFF, SMARTIOT_RECORDING_STRANGER_ONOFF_USE_DEFAULT);
|
|
|
+ }
|
|
|
+
|
|
|
+ try {
|
|
|
+ if (Boolean.parseBoolean(strRet)) {
|
|
|
+ return true;
|
|
|
+ } else {
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ } catch (RuntimeException re) {
|
|
|
+ LogUtil.errorLogInfo("", TAG, re);
|
|
|
+ }
|
|
|
+ catch (Exception e) {
|
|
|
+ Log.e(TAG, "[Exception] GetStrangerRecordingOnOff()");
|
|
|
+ LogUtil.errorLogInfo("", TAG, e);//e.printStackTrace();
|
|
|
+ }
|
|
|
+ return true;
|
|
|
+
|
|
|
+ }
|
|
|
+ catch (RuntimeException re) {
|
|
|
+ LogUtil.errorLogInfo("", TAG, re);
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ catch (Exception e )
|
|
|
+ {
|
|
|
+ Log.e(TAG, "[GetStrangerRecordingOnOff] Exception Error");
|
|
|
+ LogUtil.errorLogInfo("", TAG, e);//e.printStackTrace();
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 스마트현관카메라 거동수상자 사진촬영 설정
|
|
|
+ *
|
|
|
+ * @param bSet - (boolean) 설정할 값 (true: 촬영 ON , false: 촬영 OFF)
|
|
|
+ */
|
|
|
+ public void SetStrangerTakePicOnOff(boolean bSet)
|
|
|
+ {
|
|
|
+ try
|
|
|
+ {
|
|
|
+ UpdateWallPADData(SMARTIOT_TAKINGPIC_STRANGER_ONOFF, String.valueOf(bSet));
|
|
|
+ }
|
|
|
+ catch (RuntimeException re) {
|
|
|
+ LogUtil.errorLogInfo("", TAG, re);
|
|
|
+ }
|
|
|
+ catch (Exception e)
|
|
|
+ {
|
|
|
+ Log.e(TAG, "[StrangerTakePicOnOff] Exception Error");
|
|
|
+ LogUtil.errorLogInfo("", TAG, e);//e.printStackTrace();
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 스마트현관카메라 거동수상자 녹화 설정 여부 읽기
|
|
|
+ *
|
|
|
+ * @return (boolean) 설정값 (true: 녹화 ON , false:녹화 OFF)
|
|
|
+ */
|
|
|
+ public boolean GetStrangerTakePicOnOff()
|
|
|
+ {
|
|
|
+ try
|
|
|
+ {
|
|
|
+ String strRet = GetWallPADData(SMARTIOT_TAKINGPIC_STRANGER_ONOFF);
|
|
|
+ Log.d(TAG, "[GetStrangerTakePicOnOff] strRet [" + strRet + "]");
|
|
|
+ if (strRet == null) {
|
|
|
+ Log.d(TAG, "[GetStrangerTakePicOnOff] strRet is null !!");
|
|
|
+ insertWallPADDB(SMARTIOT_TAKINGPIC_STRANGER_ONOFF, SMARTIOT_TAKINGPIC_STRANGER_ONOFF_USE_DEFAULT);
|
|
|
+ }
|
|
|
+
|
|
|
+ try {
|
|
|
+ if (Boolean.parseBoolean(strRet)) {
|
|
|
+ return true;
|
|
|
+ } else {
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ } catch (RuntimeException re) {
|
|
|
+ LogUtil.errorLogInfo("", TAG, re);
|
|
|
+ }
|
|
|
+ catch (Exception e) {
|
|
|
+ Log.e(TAG, "[Exception] GetStrangerTakePicOnOff()");
|
|
|
+ LogUtil.errorLogInfo("", TAG, e);//e.printStackTrace();
|
|
|
+ }
|
|
|
+ return true;
|
|
|
+
|
|
|
+ }
|
|
|
+ catch (RuntimeException re) {
|
|
|
+ LogUtil.errorLogInfo("", TAG, re);
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ catch (Exception e )
|
|
|
+ {
|
|
|
+ Log.e(TAG, "[GetStrangerTakePicOnOff] Exception Error");
|
|
|
+ LogUtil.errorLogInfo("", TAG, e);//e.printStackTrace();
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 스마트현관카메라 거동수상자 녹화 설정
|
|
|
+ *
|
|
|
+ * @param bSet - (boolean) 설정할 값 (true: 녹화 ON , false: 녹화 OFF)
|
|
|
+ */
|
|
|
+ public void SetStrangerRecordingOnOff(boolean bSet)
|
|
|
+ {
|
|
|
+ try
|
|
|
+ {
|
|
|
+ UpdateWallPADData(SMARTIOT_RECORDING_STRANGER_ONOFF, String.valueOf(bSet));
|
|
|
+ }
|
|
|
+ catch (RuntimeException re) {
|
|
|
+ LogUtil.errorLogInfo("", TAG, re);
|
|
|
+ }
|
|
|
+ catch (Exception e)
|
|
|
+ {
|
|
|
+ Log.e(TAG, "[SetStrangerRecordingOnOff] Exception Error");
|
|
|
+ LogUtil.errorLogInfo("", TAG, e);//e.printStackTrace();
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * @description
|
|
|
+ * 스마트현관카메라 거동수상자 녹화 영상 밝기 설정값 가져오기
|
|
|
+ * @return int형 사용자가 설정한 영상 밝기값
|
|
|
+ */
|
|
|
+ public int GetSmartDoorCamBrightness() {
|
|
|
+ String strRet = GetWallPADData(SMARTIOT_CAM_BRIGHTNESS);
|
|
|
+ if (strRet == null) {
|
|
|
+ Log.d(TAG, "[GetSmartDoorCamBrightness] strRet is null !!");
|
|
|
+ insertWallPADDB(SMARTIOT_CAM_BRIGHTNESS, SMARTIOT_CAM_BRIGHTNESS_VALUE_DEFAULT);
|
|
|
+ }
|
|
|
+
|
|
|
+ int ret = 0;
|
|
|
+ try {
|
|
|
+ ret = Integer.parseInt(strRet);
|
|
|
+ } catch (RuntimeException re) {
|
|
|
+ LogUtil.errorLogInfo("", TAG, re);
|
|
|
+ }
|
|
|
+ catch (Exception e) {
|
|
|
+ Log.e(TAG, "[Exception] GetSmartDoorCamBrightness()");
|
|
|
+ LogUtil.errorLogInfo("", TAG, e);//e.printStackTrace();
|
|
|
+ }
|
|
|
+ return ret;
|
|
|
+ }
|
|
|
+
|
|
|
+ public void SetSmartDoorCamBrightness(int brightness)
|
|
|
+ {
|
|
|
+ UpdateWallPADData(SMARTIOT_CAM_BRIGHTNESS, String.valueOf(brightness));
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * @description
|
|
|
+ * 스마트현관카메라 거동수상자 영상 녹화 시간 설정값 가져오기
|
|
|
+ * @return int형 사용자가 설정한 영상 녹화 시간(초 단위)
|
|
|
+ */
|
|
|
+ public int GetSmartDoorCamRecordTime() {
|
|
|
+ String strRet = GetWallPADData(SMARTIOT_RECORD_TIME);
|
|
|
+ if (strRet == null) {
|
|
|
+ Log.d(TAG, "[GetSmartDoorCamRecordTime] strRet is null !!");
|
|
|
+ insertWallPADDB(SMARTIOT_RECORD_TIME, SMARTIOT_RECORD_TIME_VALUE_DEFAULT);
|
|
|
+ }
|
|
|
+
|
|
|
+ int ret = 0;
|
|
|
+ try {
|
|
|
+ ret = Integer.parseInt(strRet);
|
|
|
+ } catch (RuntimeException re) {
|
|
|
+ LogUtil.errorLogInfo("", TAG, re);
|
|
|
+ }
|
|
|
+ catch (Exception e) {
|
|
|
+ Log.e(TAG, "[Exception] GetSmartDoorCamRecordTime()");
|
|
|
+ LogUtil.errorLogInfo("", TAG, e);//e.printStackTrace();
|
|
|
+ }
|
|
|
+ return ret;
|
|
|
+ }
|
|
|
+
|
|
|
+ public void SetSmartDoorCamRecordTime(int time)
|
|
|
+ {
|
|
|
+ UpdateWallPADData(SMARTIOT_RECORD_TIME, String.valueOf(time));
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * @description
|
|
|
+ * 스마트현관카메라 센서 민감도 설정값 가져오기
|
|
|
+ * @return int형 사용자가 설정한 센서 민감도
|
|
|
+ */
|
|
|
+ public int GetSmartDoorCamSensorSensitivity() {
|
|
|
+ String strRet = GetWallPADData(SMARTIOT_SENSOR_SENSITIVITY);
|
|
|
+ if (strRet == null) {
|
|
|
+ Log.d(TAG, "[GetSmartDoorCamSensorSensitivity] strRet is null !!");
|
|
|
+ insertWallPADDB(SMARTIOT_SENSOR_SENSITIVITY, SMARTIOT_SENSOR_SENSITIVITY_VALUE_DEFAULT);
|
|
|
+ }
|
|
|
+
|
|
|
+ int ret = 0;
|
|
|
+ try {
|
|
|
+ ret = Integer.parseInt(strRet);
|
|
|
+ } catch (RuntimeException re) {
|
|
|
+ LogUtil.errorLogInfo("", TAG, re);
|
|
|
+ }
|
|
|
+ catch (Exception e) {
|
|
|
+ Log.e(TAG, "[Exception] GetSmartDoorCamSensorSensitivity()");
|
|
|
+ LogUtil.errorLogInfo("", TAG, e);//e.printStackTrace();
|
|
|
+ }
|
|
|
+ return ret;
|
|
|
+ }
|
|
|
+
|
|
|
+ public void SetSmartDoorSensorSensitivity(int sensitivity) {
|
|
|
+ UpdateWallPADData(SMARTIOT_SENSOR_SENSITIVITY, String.valueOf(sensitivity));
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * @description
|
|
|
+ * 스마트현관카메라 사진촬영 주기설정값 가져오기
|
|
|
+ * @return int형 사용자가 설정한 사진촬영 주기
|
|
|
+ */
|
|
|
+ public int GetSmartDoorCamSensorPeriod() {
|
|
|
+ String strRet = GetWallPADData(SMARTIOT_SENSOR_PERIOD);
|
|
|
+ if (strRet == null) {
|
|
|
+ Log.d(TAG, "[GetSmartDoorCamSensorPeriod] strRet is null !!");
|
|
|
+ insertWallPADDB(SMARTIOT_SENSOR_PERIOD, SMARTIOT_SENSOR_PERIOD_VALUE_DEFAULT);
|
|
|
+ }
|
|
|
+
|
|
|
+ int ret = 0;
|
|
|
+ try {
|
|
|
+ ret = Integer.parseInt(strRet);
|
|
|
+ } catch (RuntimeException re) {
|
|
|
+ LogUtil.errorLogInfo("", TAG, re);
|
|
|
+ }
|
|
|
+ catch (Exception e) {
|
|
|
+ Log.e(TAG, "[Exception] GetSmartDoorCamSensorPeriod()");
|
|
|
+ LogUtil.errorLogInfo("", TAG, e);//e.printStackTrace();
|
|
|
+ }
|
|
|
+ return ret;
|
|
|
+ }
|
|
|
+
|
|
|
+ public void SetSmartDoorSensorPeriod(int period) {
|
|
|
+ UpdateWallPADData(SMARTIOT_SENSOR_PERIOD, String.valueOf(period));
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * @description
|
|
|
+ * 스마트현관카메라 센서 감도 유지시간 설정값 가져오기
|
|
|
+ * @return int형 사용자가 설정한 센서 감도 유지시간
|
|
|
+ */
|
|
|
+ public int GetSmartDoorCamSensorDuration() {
|
|
|
+ String strRet = GetWallPADData(SMARTIOT_SENSOR_DURATION);
|
|
|
+ if (strRet == null) {
|
|
|
+ Log.d(TAG, "[GetSmartDoorCamSensorDuration] strRet is null !!");
|
|
|
+ insertWallPADDB(SMARTIOT_SENSOR_DURATION, SMARTIOT_SENSOR_DURATION_VALUE_DEFAULT);
|
|
|
+ }
|
|
|
+
|
|
|
+ int ret = 0;
|
|
|
+ try {
|
|
|
+ ret = Integer.parseInt(strRet);
|
|
|
+ } catch (RuntimeException re) {
|
|
|
+ LogUtil.errorLogInfo("", TAG, re);
|
|
|
+ }
|
|
|
+ catch (Exception e) {
|
|
|
+ Log.e(TAG, "[Exception] GetSmartDoorCamSensorDuration()");
|
|
|
+ LogUtil.errorLogInfo("", TAG, e);//e.printStackTrace();
|
|
|
+ }
|
|
|
+ return ret;
|
|
|
+ }
|
|
|
+
|
|
|
+ public void SetSmartDoorSensorDuration(int duration) {
|
|
|
+ UpdateWallPADData(SMARTIOT_SENSOR_DURATION, String.valueOf(duration));
|
|
|
+ }
|
|
|
+
|
|
|
+ public String GetReliefCallDegree() {
|
|
|
+ String strRet = GetWallPADData(RELIEFCALL_DEGREE);
|
|
|
+ if (strRet == null) {
|
|
|
+ Log.d(TAG, "[GetReliefCallDegree] strRet is null !!");
|
|
|
+ this.insertWallPADDB(RELIEFCALL_DEGREE, RELIEFCALL_DEGREE_DEFAULT_VALUE);
|
|
|
+ }
|
|
|
+
|
|
|
+ String ret = "";
|
|
|
+ try {
|
|
|
+ ret = strRet;
|
|
|
+ } catch (RuntimeException re) {
|
|
|
+ LogUtil.errorLogInfo("", TAG, re);
|
|
|
+ }
|
|
|
+ catch (Exception e) {
|
|
|
+ Log.e(TAG, "[Exception] GetReliefCallDegree()");
|
|
|
+ LogUtil.errorLogInfo("", TAG, e);//e.printStackTrace();
|
|
|
+ }
|
|
|
+ return ret;
|
|
|
+ }
|
|
|
+
|
|
|
+ public void SetReliefCallDegree(String degree)
|
|
|
+ {
|
|
|
+ UpdateWallPADData(RELIEFCALL_DEGREE, degree);
|
|
|
+ }
|
|
|
+
|
|
|
+ public boolean GetRemoteCallRegistration() {
|
|
|
+ String strRet = GetWallPADData(REMOTECALL_REGISTRATION);
|
|
|
+ if (strRet == null) {
|
|
|
+ Log.d(TAG, "[GetRemoteCallRegistration] strRet is null !!");
|
|
|
+ this.insertWallPADDB(REMOTECALL_REGISTRATION, REMOTECALL_REGISTRATION_DEFAULT_VALUE);
|
|
|
+ }
|
|
|
+
|
|
|
+ boolean ret = false;
|
|
|
+ try {
|
|
|
+ ret = Boolean.valueOf(strRet).booleanValue();
|
|
|
+ } catch (RuntimeException re) {
|
|
|
+ LogUtil.errorLogInfo("", TAG, re);
|
|
|
+ }
|
|
|
+ catch (Exception e) {
|
|
|
+ Log.e(TAG, "[Exception] GetRemoteCallRegistration()");
|
|
|
+ LogUtil.errorLogInfo("", TAG, e);//e.printStackTrace();
|
|
|
+ }
|
|
|
+ return ret;
|
|
|
+ }
|
|
|
+
|
|
|
+ public void SetRemoteCallRegistration(boolean bRegister)
|
|
|
+ {
|
|
|
+ UpdateWallPADData(REMOTECALL_REGISTRATION, String.valueOf(bRegister));
|
|
|
+ }
|
|
|
+
|
|
|
+ public int GetRemoteCallUserCnt() {
|
|
|
+ String strRet = GetWallPADData(REMOTECALL_USERCNT);
|
|
|
+ if (strRet == null) {
|
|
|
+ Log.d(TAG, "[GetRemoteCallUserCnt] strRet is null !!");
|
|
|
+ this.insertWallPADDB(REMOTECALL_USERCNT, REMOTECALL_USERCNT_DEFAULT_VALUE);
|
|
|
+ }
|
|
|
+
|
|
|
+ int ret = 0;
|
|
|
+ try {
|
|
|
+ ret = Integer.parseInt(strRet);
|
|
|
+ } catch (RuntimeException re) {
|
|
|
+ LogUtil.errorLogInfo("", TAG, re);
|
|
|
+ }
|
|
|
+ catch (Exception e) {
|
|
|
+ Log.e(TAG, "[Exception] GetRemoteCallUserCnt()");
|
|
|
+ LogUtil.errorLogInfo("", TAG, e);//e.printStackTrace();
|
|
|
+ }
|
|
|
+ return ret;
|
|
|
+ }
|
|
|
+
|
|
|
+ public void SetRemoteCallUserCnt(int cnt)
|
|
|
+ {
|
|
|
+ UpdateWallPADData(REMOTECALL_USERCNT, String.valueOf(cnt));
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 간편모드UX 설정 여부
|
|
|
+ *
|
|
|
+ * @return (boolean) 설정값 (true: 설정 ON , false: 설정 OFF)
|
|
|
+ */
|
|
|
+ public boolean GetEasyModeUxUse()
|
|
|
+ {
|
|
|
+ try {
|
|
|
+ String strRet = GetWallPADData(EASYMODE_UX_USE);
|
|
|
+ Log.d(TAG, "[GetEasyModeUxUse] strRet [" + strRet + "]");
|
|
|
+ if (strRet == null) {
|
|
|
+ Log.d(TAG, "[GetEasyModeUxUse] strRet is null !!");
|
|
|
+ insertWallPADDB(EASYMODE_UX_USE, EASYMODE_UX_USE_DEFAULT);
|
|
|
+ }
|
|
|
+
|
|
|
+ if (Boolean.parseBoolean(strRet)) {
|
|
|
+ return true;
|
|
|
+ }
|
|
|
+ } catch (RuntimeException re) {
|
|
|
+ LogUtil.errorLogInfo("", TAG, re);
|
|
|
+ }
|
|
|
+ catch (Exception e) {
|
|
|
+ Log.e(TAG, "[GetEasyModeUxUse] Exception Error");
|
|
|
+ LogUtil.errorLogInfo("", TAG, e);//e.printStackTrace();
|
|
|
+ }
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 간편모드UX 설정 (사용자용)
|
|
|
+ *
|
|
|
+ * @param bUse - (boolean) 설정할 값 (true: 설정 ON , false: 설정 OFF)
|
|
|
+ */
|
|
|
+ public void SetEasyModeUxUse(boolean bUse) {
|
|
|
+ try {
|
|
|
+ UpdateWallPADData(EASYMODE_UX_USE, String.valueOf(bUse));
|
|
|
+ } catch (RuntimeException re) {
|
|
|
+ LogUtil.errorLogInfo("", TAG, re);
|
|
|
+ }
|
|
|
+ catch (Exception e) {
|
|
|
+ Log.e(TAG, "[SetEasyModeUxUse] Exception Error");
|
|
|
+ LogUtil.errorLogInfo("", TAG, e);//e.printStackTrace();
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * @description
|
|
|
+ * 카메라 인코딩 에러 설정
|
|
|
+ * @return 인코딩 에러일 경우 true
|
|
|
+ */
|
|
|
+ public boolean GetCameraEncodingError() {
|
|
|
+ String strRet = GetWallPADData(CAMERA_ENCODING_ERROR);
|
|
|
+ if (strRet == null) {
|
|
|
+ Log.d(TAG, "[GetCameraEncodingError] strRet is null !!");
|
|
|
+ insertWallPADDB(CAMERA_ENCODING_ERROR, CAMERA_ENCODING_ERROR_DEFAULT);
|
|
|
+ }
|
|
|
+
|
|
|
+ boolean result = false;
|
|
|
+ try {
|
|
|
+ result = Boolean.valueOf(strRet);
|
|
|
+ } catch (RuntimeException re) {
|
|
|
+ LogUtil.errorLogInfo("", TAG, re);
|
|
|
+ }
|
|
|
+ catch (Exception e) {
|
|
|
+ Log.e(TAG, "[Exception] GetCameraEncodingError()");
|
|
|
+ LogUtil.errorLogInfo("", TAG, e);//e.printStackTrace();
|
|
|
+ }
|
|
|
+ return result;
|
|
|
+ }
|
|
|
+
|
|
|
+ public void SetCameraEncodingError(boolean bError)
|
|
|
+ {
|
|
|
+ UpdateWallPADData(CAMERA_ENCODING_ERROR, String.valueOf(bError));
|
|
|
+ }
|
|
|
+
|
|
|
+ public boolean GetMetroUXEditDefaultSet() {
|
|
|
+ try {
|
|
|
+ String strUse = this.GetWallPADData("METRO_UX_EDIT_DEFAULT_SET");
|
|
|
+ Log.d("WallpadStatusData", "[GetMetroUXEditDefaultSet] strUse [" + strUse + "]");
|
|
|
+ if (strUse == null) {
|
|
|
+ return true;
|
|
|
+ } else {
|
|
|
+ int ret = Integer.parseInt(strUse);
|
|
|
+ return ret == 1;
|
|
|
+ }
|
|
|
+ } catch (RuntimeException var3) {
|
|
|
+ LogUtil.errorLogInfo("", "WallpadStatusData", var3);
|
|
|
+ return true;
|
|
|
+ } catch (Exception var4) {
|
|
|
+ LogUtil.errorLogInfo("", "WallpadStatusData", var4);
|
|
|
+ return true;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ public void SetMetroUXEditDefaultSet(boolean Use) {
|
|
|
+ try {
|
|
|
+ Log.d("WallpadStatusData", "[SetMetroUXEditDefaultSet] Use [" + Use + "]");
|
|
|
+ if (Use) {
|
|
|
+ this.UpdateWallPADData("METRO_UX_EDIT_DEFAULT_SET", String.valueOf(1));
|
|
|
+ } else {
|
|
|
+ this.UpdateWallPADData("METRO_UX_EDIT_DEFAULT_SET", String.valueOf(0));
|
|
|
+ }
|
|
|
+ } catch (RuntimeException var3) {
|
|
|
+ LogUtil.errorLogInfo("", "WallpadStatusData", var3);
|
|
|
+ } catch (Exception var4) {
|
|
|
+ LogUtil.errorLogInfo("", "WallpadStatusData", var4);
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
+}
|