public void IsProtocolSample() { byte[] data = Tools.HexStrToByteArr("68 24 00 4A 14 00 00 00 00 0A 11 12 13 14 15 16 21 22 23 24 25 26 31 32 33 34 35 36 0A 01 00 00 01 01 F4 16", ' '); Result res = Frame1376_2Down.IsProtocol(data, 0, data.Length); Assert.AreEqual(true, res.Successful); res = Frame1376_2Up.IsProtocol(data, 0, data.Length); Assert.AreEqual(false, res.Successful); }
public void ExtractFrameSample() { byte[] data = Tools.HexStrToByteArr("FE FE FE FE 68 24 00 4A 14 00 00 00 00 0A 11 12 13 14 15 16 21 22 23 24 25 26 31 32 33 34 35 36 0A 01 00 00 01 01 F4 16 00 00 00", ' '); byte[] frameData = Frame1376_2Down.ExtractFrame(data); Assert.AreNotEqual(null, frameData); Assert.AreEqual(0x68, frameData[0]); frameData = Frame1376_2Up.ExtractFrame(data); Assert.AreEqual(null, frameData); }