Ejemplo n.º 1
0
        override protected void ProcessBuffer(byte[] buffer)
        {
            var tail = ASCIIEnc.GetBytes("@AL,5,3," + _offset + "\n");
            var pointsBufferLength = buffer.Length - (tail.Length + tail.Length + 2); // "@AL,CS,XX," + _offset + "\n" + "@AL,5,3," + _offset + "\n"

            if (!CompareLastN(buffer, tail, tail.Length) || pointsBufferLength % 16 != 0)
            {
                throw new RegSECommunicationError("Wrong data in LoadPointsCommand");
            }

            for (int offset = 0; offset < pointsBufferLength; offset += 16)
            {
                RegSETrackPoint point = RegSETrackPoint.FromByteArray(buffer, offset);
                _points.Add(point);
            }
        }
Ejemplo n.º 2
0
 override protected byte[] GetCommandBuffer()
 {
     return(ASCIIEnc.GetBytes("@AL,5,3," + _offset + "\r\n"));;
 }