| | |
| | | // public static int Reg_Count_Real = 12; //寄存器数量
|
| | | public static int Reg_Count_Real = 14; //寄存器数量
|
| | |
|
| | | public static int Reg_Count_Card = 100; //读取已授权电池卡寄存器数量
|
| | | |
| | | private Date record_time = new Date(0); //'更新时间',
|
| | | private String gprs_sn; //'gprs模块SN码',
|
| | | private String client_ip; //'设备IP地址',
|
| | |
| | | private int last_unlock_id; //'上一次刷开开锁卡号[仅刷开开锁时有效]',
|
| | |
|
| | | private int[] mac_addr = new int[6]; //锁具蓝牙MAC地址
|
| | | |
| | | private long[] id_cards = new long[ElectLock_ComBase.Lock_MaxCardCount];
|
| | |
|
| | | private String ctl_uname = ""; //操作用户名
|
| | |
|
| | |
| | | }
|
| | | record_time = new Date();
|
| | | buffer.compact();
|
| | | return true;
|
| | | }
|
| | | |
| | | public boolean putCardByteBuffer(ByteBuffer buffer,int idx) {
|
| | | if(buffer.limit() < (Reg_Count_Card*2)) {
|
| | | System.out.println("实时信息返回长度错误" + buffer.limit());
|
| | | return false;
|
| | | }
|
| | | |
| | | buffer.order(ByteOrder.BIG_ENDIAN);
|
| | | buffer.position(0);
|
| | | for(int k = idx;k<(idx+50) && k < ElectLock_ComBase.Lock_MaxCardCount;k++) {
|
| | | id_cards[k] = (buffer.getInt()&0xFFFFFFFF);
|
| | | }
|
| | | return true;
|
| | | }
|
| | |
|
| | |
| | | }
|
| | | err_count++;
|
| | | }
|
| | | |
| | | |
| | |
|
| | | public long[] getId_cards() {
|
| | | return id_cards;
|
| | | }
|
| | |
|
| | |
|
| | | @Override
|
| | | public String toString() {
|