Beispiel #1
0
 private void SetHeader(ref GateCommon db, byte key)
 {
     db.SFD   = 0x02;
     db.DA    = 0x02;
     db.SA    = 0x01;
     db.Len   = 0x04;
     db.group = 0x51;
     db.key   = key;
 }
Beispiel #2
0
 public void AutoOpenDoor()
 {
     GateCommon db = new GateCommon();
     SetHeader(ref db, 0x21);
     byte[] buffer = ObjectToArray(db);
     //进入指令(REntry)
     SendData(buffer);
     Thread.Sleep(200);
     SetHeader(ref db, 0x30);
     //移卡指令(CardRemoved)
     buffer = ObjectToArray(db);
     SendData(buffer);
 }
Beispiel #3
0
        public void AutoOpenDoor()
        {
            GateCommon db = new GateCommon();

            SetHeader(ref db, 0x21);
            byte[] buffer = ObjectToArray(db);
            //进入指令(REntry)
            SendData(buffer);
            Thread.Sleep(200);
            SetHeader(ref db, 0x30);
            //移卡指令(CardRemoved)
            buffer = ObjectToArray(db);
            SendData(buffer);
        }
Beispiel #4
0
 private void SetHeader(ref GateCommon db, byte key)
 {
     db.SFD = 0x02;
     db.DA = 0x02;
     db.SA = 0x01;
     db.Len = 0x04;
     db.group = 0x51;
     db.key = key;
 }