WindowsIoT.TouchSample/Communication/SerialComm.cs
/// <summary>
/// Provides a copy of all internal fields combined in one array
/// </summary>
/// <returns>Byte array with generated CRC16</returns>
Provides a copy of all internal fields combined in one array
Provides a copy of all internal fields combined in one array
public byte[] GetBuffer()
        {
            byte[] result = new byte[buffer.Length];
            lock (LockObj)
            {
                Array.Copy(buffer, result, buffer.Length - 2);
                BitConverter.GetBytes(CRC16(result)).CopyTo(result, result.Length - 2);
            }
            return result;
        }
public byte [ ] GetBuffer ( ) { byte [ ] result = new byte [ buffer . Length ] ; lock ( LockObj ) { Array . Copy ( buffer , result , buffer . Length - 2 ) ; BitConverter . GetBytes ( CRC16 ( result ) ) . CopyTo ( result , result . Length - 2 ) ; } return result ; }
Provides a copy of all internal fields combined in one array
Provides a copy of all internal fields combined in one array
Byte array with generated CRC16
Byte array with generated CRC16