Exemplo n.º 1
0
 private byte getCheckDigit(List <byte> cmdCombined)
 {
     bool[] bits = BitConverterEx.GetBits(cmdCombined[0]);
     for (int j = 1; j < cmdCombined.Count; j++)
     {
         for (byte i = 0; i < 8; i++)
         {
             bits[i] ^= BitConverterEx.TestB(cmdCombined[j], i);
         }
     }
     return(BitConverterEx.ConvertToByte(bits));
 }