com.eurotech.framework.protocol.modbus
Class Crc16
java.lang.Object
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 |
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 ofbuffLen
- number of bytes in array to calculate againstcrcSeed
- starting seed for CRC calculation
- Returns:
- CRC16 as calculated for buff
Copyright © 2013. All Rights Reserved.