/* */ package com.dowse.devicesdk; /* */ /* */ import android.content.Context; /* */ import android.content.IntentFilter; /* */ import android.net.ConnectivityManager; /* */ import android.net.ConnectivityManager.NetworkCallback; /* */ import android.net.Network; /* */ import android.net.NetworkRequest.Builder; /* */ import android.os.PowerManager; /* */ import android.os.SystemClock; /* */ import android.util.Log; /* */ import java.lang.reflect.Method; /* */ /* */ public final class DsDeviceSdk /* */ { /* */ private final DsCameraSwitch cameraSwitch; /* */ private final DsDeviceNativeLib nativeLib; /* */ private final Ds4GNativeLib p4gnativelib; /* */ private SMSReceiver receiver; /* */ public static final int WIFI = 0; /* */ public static final int SIM1 = 1; /* */ public static final int SIM2 = 2; /* */ /* */ public static DsDeviceSdk getInstance() /* */ { /* 26 */ return DsDeviceSdkHolder.instance; /* */ } /* */ /* */ private DsDeviceSdk() /* */ { /* 39 */ this.cameraSwitch = new DsCameraSwitch(); /* 40 */ this.p4gnativelib = new Ds4GNativeLib(); /* 41 */ this.nativeLib = new DsDeviceNativeLib(); /* */ } /* */ /* */ public void init() /* */ { /* 48 */ this.nativeLib.ds_sdk_mcu_init(); /* 49 */ this.nativeLib.ds_sdk_4g_init(); /* 50 */ this.nativeLib.ds_sdk_485_init(); /* 51 */ this.nativeLib.ds_sdk_nrsec_init(); /* 52 */ this.nativeLib.ds_sdk_bat_init(); /* */ } /* */ /* */ public void release() /* */ { /* 59 */ this.nativeLib.ds_sdk_mcu_uninit(); /* 60 */ this.nativeLib.ds_sdk_4g_uninit(); /* 61 */ this.nativeLib.ds_sdk_485_uninit(); /* 62 */ this.nativeLib.ds_sdk_nrsec_uninit(); /* 63 */ this.nativeLib.ds_sdk_bat_uninit(); /* */ } /* */ /* */ public int mcuInit() /* */ { /* 72 */ return this.nativeLib.ds_sdk_mcu_init(); /* */ } /* */ /* */ public int mcuUnInit() /* */ { /* 81 */ return this.nativeLib.ds_sdk_mcu_uninit(); /* */ } /* */ /* */ public int mcuOpen() /* */ { /* 90 */ return this.nativeLib.ds_sdk_mcu_open(); /* */ } /* */ /* */ public int mcuClose() /* */ { /* 99 */ return this.nativeLib.ds_sdk_mcu_close(); /* */ } /* */ /* */ public String mcuGetVersion() /* */ { /* 108 */ return this.nativeLib.ds_sdk_mcu_get_version(); /* */ } /* */ /* */ public int mcuGetSolarVolt() /* */ { /* 117 */ return this.nativeLib.ds_sdk_mcu_get_solar_volt(); /* */ } /* */ /* */ public int mcuGetBatVolt() /* */ { /* 127 */ return this.nativeLib.ds_sdk_mcu_get_bat_volt(); /* */ } /* */ /* */ public int mcuGetWorkCurrent() /* */ { /* 137 */ return this.nativeLib.ds_sdk_mcu_get_work_current(); /* */ } /* */ /* */ public int mcuGetChargeStatus() /* */ { /* 146 */ return this.nativeLib.ds_sdk_mcu_get_charge_status(); /* */ } /* */ /* */ public int mcuGetChargeCurrent() /* */ { /* 156 */ return this.nativeLib.ds_sdk_mcu_get_charge_current(); /* */ } /* */ /* */ public int mcuGetBatTemp() /* */ { /* 166 */ return this.nativeLib.ds_sdk_mcu_get_bat_temp(); /* */ } /* */ /* */ public int mcuHeartbeat() /* */ { /* 176 */ return this.nativeLib.ds_sdk_mcu_heartbeat(); /* */ } /* */ /* */ public int mcuGetBatCapacity() /* */ { /* 185 */ return this.nativeLib.ds_sdk_mcu_get_bat_capacity(); /* */ } /* */ /* */ public McuDevParam mcuGetDevParam() /* */ { /* 195 */ return this.nativeLib.ds_sdk_mcu_get_param(); /* */ } /* */ /* */ public int mcuSetDevParam(McuDevParam param) /* */ { /* 205 */ return this.nativeLib.ds_sdk_mcu_set_param(param); /* */ } /* */ /* */ public int mcuGetBoardTemp() /* */ { /* 214 */ return this.nativeLib.ds_sdk_mcu_get_board_temp(); /* */ } /* */ /* */ public boolean mcuSetBatHiVolt(int volt) /* */ { /* 224 */ return this.nativeLib.ds_sdk_mcu_set_bat_hi_volt(volt) == 0; /* */ } /* */ /* */ public int mcuGetBatHiVolt() /* */ { /* 233 */ return this.nativeLib.ds_sdk_mcu_get_bat_hi_volt(); /* */ } /* */ /* */ public boolean mcuSetBatLowVolt(int volt) /* */ { /* 243 */ return this.nativeLib.ds_sdk_mcu_set_bat_low_volt(volt) == 0; /* */ } /* */ /* */ public int mcuGetBatLowVolt() /* */ { /* 252 */ return this.nativeLib.ds_sdk_mcu_get_bat_low_volt(); /* */ } /* */ /* */ public void mcuLowPowerEnter() /* */ { /* */ try /* */ { /* 260 */ int ret = this.nativeLib.ds_sdk_mcu_power_off_4g(); /* 261 */ Log.d("~", "ds_sdk_mcu_power_off_4g=" + ret); /* 262 */ ret = this.nativeLib.ds_sdk_mcu_power_off_eth(); /* 263 */ Log.d("~", "ds_sdk_mcu_power_off_eth=" + ret); /* 264 */ ret = this.nativeLib.ds_sdk_mcu_power_off_485(); /* 265 */ Log.d("~", "ds_sdk_mcu_power_off_485=" + ret); /* 266 */ ret = this.nativeLib.ds_sdk_mcu_power_off_cpr(); /* 267 */ Log.d("~", "ds_sdk_mcu_power_off_cpr=" + ret); /* 268 */ Thread.sleep(100L); /* 269 */ ret = this.nativeLib.ds_sdk_mcu_power_off_5v(); /* 270 */ Log.d("~", "ds_sdk_mcu_power_off_5v=" + ret); /* */ } catch (InterruptedException e) { /* 272 */ e.printStackTrace(); /* */ } /* */ } /* */ /* */ public void mcuLowPowerExit() /* */ { /* */ try /* */ { /* 281 */ int ret = this.nativeLib.ds_sdk_mcu_power_on_4g(); /* 282 */ Log.d("~", "ds_sdk_mcu_power_on_4g=" + ret); /* 283 */ ret = this.nativeLib.ds_sdk_mcu_power_on_eth(); /* 284 */ Log.d("~", "ds_sdk_mcu_power_on_eth=" + ret); /* 285 */ ret = this.nativeLib.ds_sdk_mcu_power_on_485(); /* 286 */ Log.d("~", "ds_sdk_mcu_power_on_485=" + ret); /* 287 */ ret = this.nativeLib.ds_sdk_mcu_power_on_cpr(); /* 288 */ Log.d("~", "ds_sdk_mcu_power_on_cpr=" + ret); /* 289 */ Thread.sleep(100L); /* 290 */ ret = this.nativeLib.ds_sdk_mcu_power_on_5v(); /* 291 */ Log.d("~", "ds_sdk_mcu_power_on_5v=" + ret); /* */ } catch (InterruptedException e) { /* 293 */ e.printStackTrace(); /* */ } /* */ } /* */ /* */ public void goToSleep(Context context) /* */ { /* 303 */ PowerManager powerManager = (PowerManager)context.getApplicationContext().getSystemService("power"); /* */ try { /* 305 */ powerManager.getClass().getMethod("goToSleep", new Class[] { Long.TYPE }).invoke(powerManager, new Object[] { Long.valueOf(SystemClock.uptimeMillis()) }); /* */ } catch (java.lang.reflect.InvocationTargetException e) { /* 307 */ e.printStackTrace(); /* */ } /* */ } /* */ /* */ public boolean mcuPowerOn4G() /* */ { /* 317 */ return this.nativeLib.ds_sdk_mcu_power_on_4g() == 0; /* */ } /* */ /* */ public boolean mcuPowerOff4G() /* */ { /* 326 */ return this.nativeLib.ds_sdk_mcu_power_off_4g() == 0; /* */ } /* */ /* */ public boolean mcuPowerOn5V() /* */ { /* 335 */ return this.nativeLib.ds_sdk_mcu_power_on_5v() == 0; /* */ } /* */ /* */ public boolean mcuPowerOff5V() /* */ { /* 344 */ return this.nativeLib.ds_sdk_mcu_power_off_5v() == 0; /* */ } /* */ /* */ public boolean mcuPowerOnEth() /* */ { /* 353 */ return this.nativeLib.ds_sdk_mcu_power_on_eth() == 0; /* */ } /* */ /* */ public boolean mcuPowerOffEth() /* */ { /* 362 */ return this.nativeLib.ds_sdk_mcu_power_off_eth() == 0; /* */ } /* */ /* */ public boolean mcuPowerOn485() /* */ { /* 371 */ return this.nativeLib.ds_sdk_mcu_power_on_485() == 0; /* */ } /* */ /* */ public boolean mcuPowerOff485() /* */ { /* 380 */ return this.nativeLib.ds_sdk_mcu_power_off_485() == 0; /* */ } /* */ /* */ public boolean mcuPowerOnCPR() /* */ { /* 389 */ return this.nativeLib.ds_sdk_mcu_power_on_cpr() == 0; /* */ } /* */ /* */ public boolean mcuPowerOffCPR() /* */ { /* 398 */ return this.nativeLib.ds_sdk_mcu_power_off_cpr() == 0; /* */ } /* */ /* */ public McuDevInfo mcuGetDevInfo() /* */ { /* 407 */ return this.nativeLib.ds_sdk_mcu_get_devinfo(); /* */ } /* */ /* */ public boolean mcuShutdown(int delay) /* */ { /* 417 */ return this.nativeLib.ds_sdk_mcu_shutdown_delay(delay) == 0; /* */ } /* */ /* */ public boolean mcuReboot(int delay) /* */ { /* 427 */ return this.nativeLib.ds_sdk_mcu_reboot_delay(delay) == 0; /* */ } /* */ /* */ public int mcuUpdate(String file) /* */ { /* 437 */ return this.nativeLib.ds_sdk_mcu_update(file); /* */ } /* */ /* */ public BmsInfo mcuGetBMSInfo() /* */ { /* 446 */ return this.nativeLib.ds_sdk_bms_get_info(); /* */ } /* */ /* */ public McuDevTimeParam getScheduleOnOffTime() /* */ { /* 456 */ return this.nativeLib.ds_sdk_mcu_get_dev_time_ctrl(); /* */ } /* */ /* */ public int syncTime(long timestamp) /* */ { /* 466 */ return this.nativeLib.ds_sdk_mcu_rtc_sync(timestamp / 1000L + 28800L); /* */ } /* */ /* */ public int setScheduleOnOffTime(McuDevTimeParam param) /* */ { /* 476 */ return this.nativeLib.ds_sdk_mcu_set_dev_time_ctrl(param); /* */ } /* */ /* */ public int p4gInit() /* */ { /* 485 */ return this.nativeLib.ds_sdk_4g_init(); /* */ } /* */ /* */ public int p4gUnInit() /* */ { /* 494 */ return this.nativeLib.ds_sdk_4g_uninit(); /* */ } /* */ /* */ public int p4gOpen() /* */ { /* 503 */ return this.nativeLib.ds_sdk_4g_open(); /* */ } /* */ /* */ public int p4gClose() /* */ { /* 512 */ return this.nativeLib.ds_sdk_4g_close(); /* */ } /* */ /* */ public Const.SIM_STATUS p4gGetSIMStatus() /* */ { /* 521 */ int status = this.nativeLib.ds_sdk_4g_get_sim_status(); /* 522 */ if (status < 0) { /* 523 */ status = 2; /* */ } /* 525 */ return Const.SIM_STATUS.values()[status]; /* */ } /* */ /* */ public String p4gGetICCID() /* */ { /* 534 */ return this.nativeLib.ds_sdk_4g_get_iccid(); /* */ } /* */ /* */ public int p4gGetSignal() /* */ { /* 543 */ return this.nativeLib.ds_sdk_4g_get_signal(); /* */ } /* */ /* */ public Const.NET_REG_STATUS p4gGetNetRegStatus() /* */ { /* 552 */ int status = this.nativeLib.ds_sdk_4g_get_net_reg_status(); /* 553 */ if (status < 0) { /* 554 */ status = 0; /* */ } /* 556 */ return Const.NET_REG_STATUS.values()[status]; /* */ } /* */ /* */ public Const.NET_CONN_STATUS p4gGetNetStatus() /* */ { /* 565 */ int status = this.nativeLib.ds_sdk_4g_get_net_status(); /* 566 */ if (status < 0) { /* 567 */ status = 0; /* */ } /* 569 */ return Const.NET_CONN_STATUS.values()[status]; /* */ } /* */ /* */ public SimRegInfo p4gGetSimRegInfo() /* */ { /* 578 */ return this.nativeLib.ds_sdk_4g_get_sim_reg_info(); /* */ } /* */ /* */ public String p4gGetIMEI() /* */ { /* 587 */ return this.nativeLib.ds_sdk_4g_get_imei(); /* */ } /* */ /* */ public String p4gGetApn() /* */ { /* 596 */ return this.nativeLib.ds_sdk_4g_get_apn(); /* */ } /* */ /* */ public ApnInfo p4gGetApn2() /* */ { /* 605 */ return this.nativeLib.ds_sdk_4g_get_apn_2(); /* */ } /* */ /* */ public int p4gSetApn(String apn) /* */ { /* 615 */ return this.nativeLib.ds_sdk_4g_set_apn(apn); /* */ } /* */ /* */ public int p4gSetApn(String apn, String username, String password, int auth_type) /* */ { /* 628 */ return this.nativeLib.ds_sdk_4g_set_apn_2(apn, username, password, auth_type); /* */ } /* */ /* */ public int p4gSetNetEnable(boolean enable) /* */ { /* 638 */ return this.nativeLib.ds_sdk_4g_set_enable(enable ? 1 : 0); /* */ } /* */ /* */ public String p4gGetIP() /* */ { /* 647 */ return this.nativeLib.ds_sdk_4g_get_ip(); /* */ } /* */ /* */ public int p4gSendSMS(String phone, String msg) /* */ { /* 658 */ return this.nativeLib.ds_sdk_4g_send_sms(phone, msg); /* */ } /* */ /* */ public DataTraffic p4gGetFlowTraffic() /* */ { /* 671 */ return this.nativeLib.ds_sdk_4g_get_flow_static(); /* */ } /* */ /* */ public void registerSMSReceiver(Context context, ISMSReceiver ismsReceiver) /* */ { /* 682 */ IntentFilter filter = new IntentFilter(); /* 683 */ filter.addAction(SMSReceiver.ACTION); /* 684 */ this.receiver = new SMSReceiver(ismsReceiver); /* 685 */ context.getApplicationContext().registerReceiver(this.receiver, filter); /* */ } /* */ /* */ public void unregisterSMSReceiver(Context context) /* */ { /* 694 */ context.getApplicationContext().unregisterReceiver(this.receiver); /* */ } /* */ /* */ public void configNetwork(ConnectivityManager connectivityManager, int netType, INetworkCallback callback) /* */ { /* 718 */ NetworkRequest.Builder builder = new NetworkRequest.Builder(); /* 719 */ builder.addCapability(12); /* 720 */ if (netType == 2) /* 721 */ builder.addTransportType(0); /* 722 */ else if (netType == 1) /* 723 */ builder.addTransportType(3); /* 724 */ else if (netType == 0) { /* 725 */ builder.addTransportType(1); /* */ } /* 727 */ connectivityManager.requestNetwork(builder.build(), new ConnectivityManager.NetworkCallback(connectivityManager, callback) /* */ { /* */ public void onAvailable(Network network) { /* 730 */ super.onAvailable(network); /* 731 */ this.val$connectivityManager.bindProcessToNetwork(network); /* 732 */ this.val$connectivityManager.unregisterNetworkCallback(this); /* 733 */ this.val$callback.onAvailable(network); /* */ } /* */ }); /* */ } /* */ /* */ public int rs485Init() /* */ { /* 744 */ return this.nativeLib.ds_sdk_485_init(); /* */ } /* */ /* */ public int rs485UnInit() /* */ { /* 753 */ return this.nativeLib.ds_sdk_485_uninit(); /* */ } /* */ /* */ public int rs485Open(int baudRate) /* */ { /* 763 */ return this.nativeLib.ds_sdk_485_open(baudRate); /* */ } /* */ /* */ public int rs485Close() /* */ { /* 772 */ return this.nativeLib.ds_sdk_485_close(); /* */ } /* */ /* */ public byte[] rs485ReadBuf(byte[] inBuf, int overtime, int perOverTime, int waitTime) /* */ { /* 784 */ return this.nativeLib.ds_sdk_485_read_data(inBuf, inBuf.length, overtime, perOverTime, waitTime); /* */ } /* */ /* */ public int rs485GetRV1126PowerStatusForPtz() /* */ { /* 793 */ return this.nativeLib.ds_sdk_485_get_rv1126_power_status(); /* */ } /* */ /* */ public boolean rs485SetRV1126PowerStatusForPtz(int status) /* */ { /* 803 */ return this.nativeLib.ds_sdk_485_set_rv1126_power(status) == 0; /* */ } /* */ /* */ public int rs485GetDevicePowerStatusForPtz() /* */ { /* 812 */ return this.nativeLib.ds_sdk_485_get_hat_power_status(); /* */ } /* */ /* */ public boolean rs485SetDevicePowerStatusForPtz(int status) /* */ { /* 822 */ return this.nativeLib.ds_sdk_485_set_hat_power(status) == 0; /* */ } /* */ /* */ public boolean rs485SetSelfCheckForPtz(int status) /* */ { /* 832 */ return this.nativeLib.ds_sdk_485_set_selfcheck_ptz(status) == 0; /* */ } /* */ /* */ public int batInit() /* */ { /* 841 */ return this.nativeLib.ds_sdk_bat_init(); /* */ } /* */ /* */ public int batUnInit() /* */ { /* 850 */ return this.nativeLib.ds_sdk_bat_uninit(); /* */ } /* */ /* */ public int batOpen(int baudrate) /* */ { /* 860 */ return this.nativeLib.ds_sdk_bat_open(baudrate); /* */ } /* */ /* */ public int batClose() /* */ { /* 869 */ return this.nativeLib.ds_sdk_bat_close(); /* */ } /* */ /* */ public byte[] batReadBuf(byte[] inBuf, int overtime, int perOverTime) /* */ { /* 881 */ return this.nativeLib.ds_sdk_bat_read_data(inBuf, inBuf.length, overtime, perOverTime); /* */ } /* */ /* */ public int tracerBpGetArrayVolt() /* */ { /* 890 */ return this.nativeLib.ds_sdk_tracerbp_get_array_volt(); /* */ } /* */ /* */ public int tracerBpGetArrayCurrent() /* */ { /* 899 */ return this.nativeLib.ds_sdk_tracerbp_get_array_current(); /* */ } /* */ /* */ public int tracerBpGetBatVolt() /* */ { /* 908 */ return this.nativeLib.ds_sdk_tracerbp_get_bat_volt(); /* */ } /* */ /* */ public int tracerBpGetChargeStatus() /* */ { /* 917 */ return this.nativeLib.ds_sdk_tracerbp_get_charge_status(); /* */ } /* */ /* */ public int tracerBpGetBatCurrent() /* */ { /* 926 */ return this.nativeLib.ds_sdk_tracerbp_get_bat_current(); /* */ } /* */ /* */ public int tracerBpGetBatTemp() /* */ { /* 935 */ return this.nativeLib.ds_sdk_tracerbp_get_bat_temp(); /* */ } /* */ /* */ public int tracerBpGetBatCapacity() /* */ { /* 944 */ return this.nativeLib.ds_sdk_tracerbp_get_bat_capacity(); /* */ } /* */ /* */ public int nrsecInit() /* */ { /* 953 */ return this.nativeLib.ds_sdk_nrsec_init(); /* */ } /* */ /* */ public int nrsecUninit() /* */ { /* 962 */ return this.nativeLib.ds_sdk_nrsec_uninit(); /* */ } /* */ /* */ public int nrsecOpen() /* */ { /* 971 */ return this.nativeLib.ds_sdk_nrsec_open(); /* */ } /* */ /* */ public int nrsecClose() /* */ { /* 980 */ return this.nativeLib.ds_sdk_nrsec_close(); /* */ } /* */ /* */ public String nrsecGetVersion() /* */ { /* 989 */ return this.nativeLib.ds_sdk_nrsec_get_version(); /* */ } /* */ /* */ public byte[] nrsecGetRandomNum(int num) /* */ { /* 999 */ return this.nativeLib.ds_sdk_nrsec_get_random_num(num); /* */ } /* */ /* */ public byte[] nrsecGetSafelyCertificate(byte[] in, int len) /* */ { /* 1010 */ return this.nativeLib.ds_sdk_nrsec_get_safely_certificate(in, len); /* */ } /* */ /* */ public int nrsecSM1ImportKey(byte[] key) /* */ { /* 1020 */ return this.nativeLib.ds_sdk_nrsec_sm1_import_key(key); /* */ } /* */ /* */ public int nrsecSM1ImportIV(byte[] iv) /* */ { /* 1030 */ return this.nativeLib.ds_sdk_nrsec_sm1_import_iv(iv); /* */ } /* */ /* */ public byte[] nrsecSM1Enc(byte[] in, int len) /* */ { /* 1041 */ return this.nativeLib.ds_sdk_nrsec_sm1_enc(in, len); /* */ } /* */ /* */ public byte[] nrsecSM1Dec(byte[] in, int len) /* */ { /* 1052 */ return this.nativeLib.ds_sdk_nrsec_sm1_dec(in, len); /* */ } /* */ /* */ public int nrsecSM2GenKeypair(int p2) /* */ { /* 1062 */ return this.nativeLib.ds_sdk_nrsec_sm2_gen_keypair(p2); /* */ } /* */ /* */ public byte[] nrsecSM2ExpPubKey(int p2) /* */ { /* 1072 */ return this.nativeLib.ds_sdk_nrsec_sm2_exp_pubKey(p2); /* */ } /* */ /* */ public byte[] nrsecSM2ExpPriKey(int p2) /* */ { /* 1082 */ return this.nativeLib.ds_sdk_nrsec_sm2_exp_priKey(p2); /* */ } /* */ /* */ public int nrsecSM2ImportPubKey(byte[] in, int p2) /* */ { /* 1093 */ return this.nativeLib.ds_sdk_nrsec_sm2_import_pubKey(in, p2); /* */ } /* */ /* */ public int nrsecSM2ImportPriKey(byte[] in, int p2) /* */ { /* 1104 */ return this.nativeLib.ds_sdk_nrsec_sm2_import_priKey(in, p2); /* */ } /* */ /* */ public byte[] nrsecSM3Hash(byte[] in, int inl) /* */ { /* 1115 */ return this.nativeLib.ds_sdk_nrsec_sm3_hash(in, inl); /* */ } /* */ /* */ public byte[] nrsecSM3(byte[] in, int inl, byte[] pubkey, byte[] pucID, int idl) /* */ { /* 1129 */ return this.nativeLib.ds_sdk_nrsec_sm3(in, inl, pubkey, pucID, idl); /* */ } /* */ /* */ public byte[] nrsecSM2Signature(byte[] in, int len, int p2) /* */ { /* 1141 */ return this.nativeLib.ds_sdk_nrsec_sm2_signature(in, len, p2); /* */ } /* */ /* */ public int nrsecSM2Attestation(byte[] in, int len, int p2) /* */ { /* 1153 */ return this.nativeLib.ds_sdk_nrsec_sm2_attestation(in, len, p2); /* */ } /* */ /* */ public byte[] nrsecSM2Enc(byte[] in, int len, int p2) /* */ { /* 1165 */ return this.nativeLib.ds_sdk_nrsec_sm2_enc(in, len, p2); /* */ } /* */ /* */ public byte[] nrsecSM2Dec(byte[] in, int len, int p2) /* */ { /* 1177 */ return this.nativeLib.ds_sdk_nrsec_sm2_dec(in, len, p2); /* */ } /* */ /* */ public byte[] nrsecGenSM2CertReq(byte[] in, int p1, int p2, int p3) /* */ { /* 1190 */ return this.nativeLib.ds_sdk_nrsec_gen_sm2_cert_req(in, p1, p2, p3); /* */ } /* */ /* */ public boolean switchCamera(int cameraId, int index) /* */ { /* 1201 */ return this.cameraSwitch.native_switchCamera(cameraId, index); /* */ } /* */ /* */ public int getCameraIndex(int cameraId) /* */ { /* 1211 */ return this.cameraSwitch.native_getCameraIndex(cameraId); /* */ } /* */ /* */ public int getLightSensitiveVolt() /* */ { /* 1222 */ return this.nativeLib.getADCVolt(2); /* */ } /* */ /* */ public int setAFStop(int nCh) /* */ { /* 1232 */ return this.nativeLib.ds_sdk_mcu_af_stop(nCh); /* */ } /* */ /* */ public int setAFZoomWide(int nCh) /* */ { /* 1241 */ return this.nativeLib.ds_sdk_mcu_af_zoomwide(nCh); /* */ } /* */ /* */ public int setAFZoomTele(int nCh) /* */ { /* 1250 */ return this.nativeLib.ds_sdk_mcu_af_zoomtele(nCh); /* */ } /* */ /* */ public int setAFFocusNear(int nCh) /* */ { /* 1259 */ return this.nativeLib.ds_sdk_mcu_af_focusnear(nCh); /* */ } /* */ /* */ public int setAFFocusFar(int nCh) /* */ { /* 1268 */ return this.nativeLib.ds_sdk_mcu_af_focusfar(nCh); /* */ } /* */ /* */ public int setAFLensReset(int nCh) /* */ { /* 1276 */ return this.nativeLib.ds_sdk_mcu_af_lens_reset(nCh); /* */ } /* */ /* */ public int setAFFocusMode(int nCh, int mode) /* */ { /* 1288 */ return this.nativeLib.ds_sdk_mcu_af_set_focus_mode(nCh, mode); /* */ } /* */ /* */ public String getAFLensVersion(int nCh) /* */ { /* 1297 */ return this.nativeLib.ds_sdk_mcu_af_getlensversion(nCh); /* */ } /* */ /* */ public boolean mcuPowerOnHEAT1() /* */ { /* 1306 */ return this.nativeLib.ds_sdk_mcu_power_on_heat1() == 0; /* */ } /* */ /* */ public boolean mcuPowerOffHEAT1() /* */ { /* 1315 */ return this.nativeLib.ds_sdk_mcu_power_off_heat1() == 0; /* */ } /* */ /* */ public boolean mcuPowerOnHEAT2() /* */ { /* 1323 */ return this.nativeLib.ds_sdk_mcu_power_on_heat2() == 0; /* */ } /* */ /* */ public boolean mcuPowerOffHEAT2() /* */ { /* 1332 */ return this.nativeLib.ds_sdk_mcu_power_off_heat2() == 0; /* */ } /* */ /* */ public boolean mcuPowerOnHEAT3() /* */ { /* 1340 */ return this.nativeLib.ds_sdk_mcu_power_on_heat3() == 0; /* */ } /* */ /* */ public boolean mcuPowerOffHEAT3() /* */ { /* 1349 */ return this.nativeLib.ds_sdk_mcu_power_off_heat3() == 0; /* */ } /* */ /* */ public boolean mcuPowerOnExtraCamera() /* */ { /* 1358 */ return this.nativeLib.ds_sdk_mcu_power_on_heat3() == 0; /* */ } /* */ /* */ public boolean mcuPowerOffExtraCamera() /* */ { /* 1367 */ return this.nativeLib.ds_sdk_mcu_power_off_heat3() == 0; /* */ } /* */ /* */ public boolean mcuPowerOnSoundAndLightAlarm() /* */ { /* 1376 */ return this.nativeLib.ds_sdk_mcu_power_on_485() == 0; /* */ } /* */ /* */ public boolean mcuPowerOffSoundAndLightAlarm() /* */ { /* 1385 */ return this.nativeLib.ds_sdk_mcu_power_off_485() == 0; /* */ } /* */ /* */ public int mcuIsConfigPlug4g() /* */ { /* 1393 */ return this.p4gnativelib.is_config_plug_4g(); /* */ } /* */ /* */ static /* */ { /* 1215 */ System.loadLibrary("devicesdk"); /* */ } /* */ /* */ private static class DsDeviceSdkHolder /* */ { /* 30 */ public static final DsDeviceSdk instance = new DsDeviceSdk(null); /* */ } /* */ } /* Location: C:\Users\JingJing\Desktop\i1aar\dsdevicesdk1.3\classes.jar * Qualified Name: com.dowse.devicesdk.DsDeviceSdk * JD-Core Version: 0.6.0 */