C# Class 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] ***************************************************************************
Afficher le fichier Open project: grodansparadis/vscp_firmware Class Usage Examples

Méthodes publiques

Méthode Description
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.

Private Methods

Méthode Description
generate_crc_table ( ) : void
reflect ( ulong crc, byte bitnum ) : ulong

Method Details

CRCTool() public méthode

public CRCTool ( ) : System
Résultat System

CalcCRCITT() public méthode

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
Résultat int

Dispose() public méthode

public Dispose ( ) : void
Résultat void

Init() public méthode

public Init ( CRCCode CodingType ) : void
CodingType CRCCode
Résultat void

crcbitbybit() public méthode

public crcbitbybit ( byte p ) : long
p byte
Résultat long

crcbitbybitfast() public méthode

public crcbitbybitfast ( byte p ) : long
p byte
Résultat long

crctable() public méthode

public crctable ( byte p ) : long
p byte
Résultat long

crctablefast() public méthode

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
Résultat long