com.eurotech.framework.protocol.modbus
Class Crc16

java.lang.Object
  extended by com.eurotech.framework.protocol.modbus.Crc16

public class Crc16
extends Object

Used to calculate the CRC-16 (cyclical redundancy check) for an array of bytes.


Method Summary
static int getCrc16(byte[] buff, int buffLen, int crcSeed)
          calculate the crc for the passed buffer
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getCrc16

public static int getCrc16(byte[] buff,
                           int buffLen,
                           int crcSeed)
calculate the crc for the passed buffer

Parameters:
buff - byte array to calculate CRC of
buffLen - number of bytes in array to calculate against
crcSeed - starting seed for CRC calculation
Returns:
CRC16 as calculated for buff


Copyright © 2013. All Rights Reserved.