public ushort ReadUShort() { var result = RawMessage.Skip(Position) .Take(2) .ToLeUShort(); Position += 2; return(result); }
public uint ReadUInt() { var result = RawMessage.Skip(Position) .Take(4) .ToLeUInt(); Position += 4; return(result); }
public byte NextByte() { var result = (byte)0; if (Position < RawMessage.Count) { result = RawMessage.Skip(Position) .FirstOrDefault(); ++Position; } return(result); }
public IEnumerable <byte> GetRdata(ushort len) { return(RawMessage.Skip(Position).Take(len)); }