Exemple #1
0
        /// <summary>
        /// 开门并播报月租剩余天数
        /// </summary>
        /// <param name="param"></param>
        /// <returns></returns>
        public static byte[] OpenTheDoorAndVoice(OpenTheDoorParam param)
        {
            List <byte> bylist = new List <byte>();

            bylist.AddRange(LincensePlateToByte(param.LicensePlateNumber));
            bylist.Add((byte)(48 + param.LicensePlateColor));
            bylist.AddRange(Encoding.Default.GetBytes(string.Format("{0:yyMMddHHmmss}{1:X2}", param.Time, param.Day)));
            return(CombinatorialProtocol(2, 3, 67, param.DeviceAddress, 16, bylist.ToArray()));
        }
Exemple #2
0
        /// <summary>
        /// 有线端开门播报语言
        /// </summary>
        /// <param name="param"></param>
        /// <returns></returns>
        public static byte[] GetOpenDoor(OpenTheDoorParam param)
        {
            DealHandler dh = new DealHandler()
            {
                Head            = 2,
                End             = 3,
                DeviceAddress   = param.DeviceAddress,
                FunctionAddress = 67,
                Command         = 16
            };
            List <byte> bylist = new List <byte>();

            bylist.AddRange(GetLincensePlateToByte(param.licensePlateNumber));
            bylist.Add((byte)(48 + param.LicensePlateColor));
            bylist.AddRange(Encoding.Default.GetBytes(string.Format("{0:yyMMddHHmmss}{1:X2}", param.Time, param.Day)));
            return(dh.Integration(bylist.ToArray()));
        }