/// <summary> /// /// </summary> /// <param name="bs"></param> /// <param name="result"></param> /// <returns></returns> static public bool Parse(byte[] bs, out RainRequest result) { result = null; if (bs != null || bs.Length == 15) { if (bs[0] == 0x5b && bs[1] == 0x5b && bs[3] == 0x01 && bs[13] == 0x5d && bs[14] == 0x5d) { byte address = bs[2]; long ticks = BitConverter.ToInt64(bs, 5); DateTime dt = new DateTime(ticks); result = new RainRequest(address, dt); return(true); } } return(false); }
/// <summary> /// /// </summary> /// <param name="bs"></param> /// <param name="result"></param> /// <returns></returns> public static bool Parse(byte[] bs, out RainRequest result) { result = null; if (bs != null || bs.Length == 15) { if (bs[0] == 0x5b && bs[1] == 0x5b && bs[3] == 0x01 && bs[13] == 0x5d && bs[14] == 0x5d) { byte address = bs[2]; long ticks = BitConverter.ToInt64(bs, 5); DateTime dt = new DateTime(ticks); result = new RainRequest(address, dt); return true; } } return false; }