| | |
| | |
|
| | | // public static int Reg_Count_Real = 8; //寄存器数量
|
| | | // public static int Reg_Count_Real = 11; //寄存器数量
|
| | | public static int Reg_Count_Real = 12; //寄存器数量
|
| | | // public static int Reg_Count_Real = 12; //寄存器数量
|
| | | public static int Reg_Count_Real = 14; //寄存器数量
|
| | |
|
| | | private Date record_time = new Date(0); //'更新时间',
|
| | | private String gprs_sn; //'gprs模块SN码',
|
| | |
| | | private int id_card_set; //'授权ID卡号',
|
| | | private int lock_addr_set; //'设置设备地址[慎用]',
|
| | | private int workmodel; //工作模式【0-离线模式 1-在线模式】
|
| | | |
| | | private int bluetooth_st_state; //蓝牙开关:0-关闭蓝牙 1-开启蓝牙
|
| | | private int bluetooth_state; //蓝牙状态:0:蓝牙已关闭,1:蓝牙已开启
|
| | |
|
| | | private int lock_online; //锁具在线状态[0-离线 1-在线]
|
| | |
|
| | |
| | | }
|
| | | workmodel = ComBase.changeShortToInt(buffer.getShort());
|
| | |
|
| | | bluetooth_st_state = ComBase.changeShortToInt(buffer.getShort()); |
| | | bluetooth_state = ComBase.changeShortToInt(buffer.getShort()); |
| | | |
| | | System.out.println("工作模式:" + workmodel);
|
| | | // System.out.println("BlutoothMAC:" + getLockMacAddr());
|
| | |
|
| | |
| | | }
|
| | | }
|
| | |
|
| | | /**
|
| | | * 获取蓝牙开关状态
|
| | | * @return
|
| | | */
|
| | | public String getbluetooth_st_stateStr() {
|
| | | String str = "蓝牙未知开关状态";
|
| | | if(bluetooth_st_state == 0) {
|
| | | str = "关闭蓝牙";
|
| | | }else if(workmodel == 1){
|
| | | str = "开启蓝牙";
|
| | | }
|
| | | return str;
|
| | | }
|
| | | |
| | | /**
|
| | | * 获取蓝牙状态
|
| | | * @return
|
| | | */
|
| | | public String getbluetooth_stateStr() {
|
| | | String str = "蓝牙未知状态";
|
| | | if(bluetooth_state == 0) {
|
| | | str = "蓝牙已关闭";
|
| | | }else if(workmodel == 1){
|
| | | str = "蓝牙已开启";
|
| | | }
|
| | | return str;
|
| | | }
|
| | | |
| | | public String getLockState() {
|
| | | String str = "闭锁";
|
| | | if(lock_state == 1) {
|