public class SoftLRC extends Object
| 构造器和说明 |
|---|
SoftLRC() |
| 限定符和类型 | 方法和说明 |
|---|---|
static int |
CalculateAcc(byte[] buffer,
int headCount,
int lastCount)
根据传入的原始字节数组,计算和校验信息,可以指定起始的偏移地址和尾部的字节数量信息
Calculate and check the information according to the incoming original byte array, you can specify the starting offset address and the number of bytes at the end |
static boolean |
CalculateAccAndCheck(byte[] buffer,
int headCount,
int lastCount)
计算数据的和校验,并且和当前已经存在的和校验信息进行匹配,返回是否匹配成功
Calculate the sum check of the data, and match it with the existing sum check information, and return whether the match is successful |
static void |
CalculateAccAndFill(byte[] buffer,
int headCount,
int lastCount)
计算数据的和校验,并且输入和校验的值信息
Calculate the sum check of the data, and enter the value information of the sum check |
static boolean |
CheckLRC(byte[] value)
检查数据是否符合LRC的验证
Check data for compliance with LRC validation |
static byte[] |
LRC(byte[] value)
获取对应的数据的LRC校验码
Class for LRC validation that provides a standard validation method |
public static byte[] LRC(byte[] value)
value - 需要校验的数据,不包含LRC字节public static boolean CheckLRC(byte[] value)
value - 等待校验的数据,是否正确public static int CalculateAcc(byte[] buffer,
int headCount,
int lastCount)
buffer - 原始字节数组信息headCount - 起始的偏移地址信息lastCount - 尾部的字节数量信息public static void CalculateAccAndFill(byte[] buffer,
int headCount,
int lastCount)
buffer - 原始字节数组信息headCount - 起始的偏移地址信息lastCount - 尾部的字节数量信息public static boolean CalculateAccAndCheck(byte[] buffer,
int headCount,
int lastCount)
buffer - 原始字节数组信息headCount - 起始的偏移地址信息lastCount - 尾部的字节数量信息Copyright © 2022. All rights reserved.