C# 클래스 Xedia.Protocol.VSCP.CRCTool

Tool to calculate and add CRC codes to a string *************************************************************************** Copyright (c) 2003 Thoraxcentrum, Erasmus MC, The Netherlands. Written by Marcel de Wijs with help from a lot of others, especially Stefan Nelwan This code is for free. I ported it from several different sources to C#. For comments: [email protected] ***************************************************************************
파일 보기 프로젝트 열기: grodansparadis/vscp_firmware 1 사용 예제들

공개 메소드들

메소드 설명
CRCTool ( ) : System
CalcCRCITT ( byte p ) : int

CalcCRCITT is an algorithm found on the web for calculating the CRCITT checksum It is included to demonstrate that although it looks different it is the same routine as the crcbitbybit* functions. But it is optimized and preconfigured for CRCITT.

Dispose ( ) : void
Init ( CRCCode CodingType ) : void
crcbitbybit ( byte p ) : long
crcbitbybitfast ( byte p ) : long
crctable ( byte p ) : long
crctablefast ( byte p, int length ) : long

4 ways to calculate the crc checksum. If you have to do a lot of encoding you should use the table functions. Since they use precalculated values, which saves some calculating.

비공개 메소드들

메소드 설명
generate_crc_table ( ) : void
reflect ( ulong crc, byte bitnum ) : ulong

메소드 상세

CRCTool() 공개 메소드

public CRCTool ( ) : System
리턴 System

CalcCRCITT() 공개 메소드

CalcCRCITT is an algorithm found on the web for calculating the CRCITT checksum It is included to demonstrate that although it looks different it is the same routine as the crcbitbybit* functions. But it is optimized and preconfigured for CRCITT.
public CalcCRCITT ( byte p ) : int
p byte
리턴 int

Dispose() 공개 메소드

public Dispose ( ) : void
리턴 void

Init() 공개 메소드

public Init ( CRCCode CodingType ) : void
CodingType CRCCode
리턴 void

crcbitbybit() 공개 메소드

public crcbitbybit ( byte p ) : long
p byte
리턴 long

crcbitbybitfast() 공개 메소드

public crcbitbybitfast ( byte p ) : long
p byte
리턴 long

crctable() 공개 메소드

public crctable ( byte p ) : long
p byte
리턴 long

crctablefast() 공개 메소드

4 ways to calculate the crc checksum. If you have to do a lot of encoding you should use the table functions. Since they use precalculated values, which saves some calculating.
public crctablefast ( byte p, int length ) : long
p byte
length int
리턴 long