/// <summary> /// 收费语音 /// </summary> /// <param name="param"></param> /// <returns></returns> public static byte[] ChargesVoice(VoiceParam param) { List <byte> bylist = new List <byte>(); bylist.AddRange(LincensePlateToByte(param.LicensePlateNumber)); bylist.Add((byte)param.LicensePlateColor); bylist.AddRange(Encoding.Default.GetBytes(string.Format("{0:X6}{1:X4}", param.Minute, (int)param.Money))); return(CombinatorialProtocol(2, 3, 67, param.DeviceAddress, 18, bylist.ToArray())); }
public static byte[] GetVoice(VoiceParam param) { DealHandler dh = new DealHandler() { Head = 2, End = 3, DeviceAddress = param.DeviceAddress, FunctionAddress = 67, Command = 18 }; List <byte> bylist = new List <byte>(); bylist.AddRange(GetLincensePlateToByte(param.licensePlateNumber)); bylist.Add((byte)param.LicensePlateColor); bylist.AddRange(Encoding.Default.GetBytes(string.Format("{0:X6}{1:X4}", param.Minute, (int)param.Money))); return(dh.Integration(bylist.ToArray())); }