DELL
2025-04-28 e6eb7fb0af366e370f125668d62e89eb0004f517
Device_Simulator_DTS_Tester/src/com/dev/electlock/data/ElectLock_State.java
@@ -20,6 +20,8 @@
//   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地址',
@@ -48,6 +50,8 @@
   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 = "";      //操作用户名
   
@@ -111,6 +115,20 @@
      }
      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;
   }
   
@@ -415,6 +433,13 @@
      }      
      err_count++;
   }
   public long[] getId_cards() {
      return id_cards;
   }
   @Override
   public String toString() {