Class Crc16

  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


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

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

Copyright © 2013. All Rights Reserved.