Пример #1
0
        public bool SetDoorControlStyle(Controller controller, int doorNum, DoorControlStyle ctrlStyle, int delaySecond = 3)
        {
            WGPacket packet = new WGPacket(0x80);

            packet.SetDevSn(controller.sn);
            packet.SetDoorNum(doorNum);
            packet.SetCtrlStyle(ctrlStyle, delaySecond);
            DoSend(packet, controller.ip, controller.port);
            List <WGPacket> packets = WGRecievePacketAddClose(1);

            if (packets.Count == 1)
            {
                return(packets[0].data[0] > 0);
            }
            return(false);
        }