1-Wire API for .NET Version 4.00
Static Public Member Functions

CRC8 Class Reference

CRC8 is a class to contain an implementation of the Cyclic-Redundency-Check CRC8 for the iButton. More...

List of all members.

Static Public Member Functions

static int compute (int dataToCRC, int seed)
 Perform the CRC8 on the data element based on the provided seed.
static int compute (int dataToCRC)
 Perform the CRC8 on the data element based on a zero seed.
static int compute (byte dataToCrc[])
 Perform the CRC8 on an array of data elements based on a zero seed.
static int compute (byte dataToCrc[], int off, int len)
 Perform the CRC8 on an array of data elements based on a zero seed.
static int compute (byte dataToCrc[], int off, int len, int seed)
 Perform the CRC8 on an array of data elements based on the provided seed.
static int compute (byte dataToCrc[], int seed)
 Perform the CRC8 on an array of data elements based on the provided seed.

Detailed Description

CRC8 is a class to contain an implementation of the Cyclic-Redundency-Check CRC8 for the iButton.

The CRC8 is used in the 1-Wire Network address of all iButtons and 1-Wire devices.

CRC8 is based on the polynomial = X^8 + X^5 + X^4 + 1.

Version:
0.00, 28 Aug 2000
Author:
DS

Member Function Documentation

static int compute ( byte  dataToCrc[],
int  seed 
) [static]

Perform the CRC8 on an array of data elements based on the provided seed.

CRC8 is based on the polynomial = X^8 + X^5 + X^4 + 1.

Parameters:
dataToCrcarray of data elements on which to perform the CRC8
seedseed to use for CRC8
Returns:
CRC8 value
static int compute ( byte  dataToCrc[],
int  off,
int  len,
int  seed 
) [static]

Perform the CRC8 on an array of data elements based on the provided seed.

CRC8 is based on the polynomial = X^8 + X^5 + X^4 + 1.

Parameters:
dataToCrcarray of data elements on which to perform the CRC8
offoffset into array
lenlength of data to crc
seedseed to use for CRC8
Returns:
CRC8 value
static int compute ( byte  dataToCrc[],
int  off,
int  len 
) [static]

Perform the CRC8 on an array of data elements based on a zero seed.

CRC8 is based on the polynomial = X^8 + X^5 + X^4 + 1.

Parameters:
dataToCrcarray of data elements on which to perform the CRC8
offoffset into array
lenlength of data to crc
Returns:
CRC8 value
static int compute ( byte  dataToCrc[]) [static]

Perform the CRC8 on an array of data elements based on a zero seed.

CRC8 is based on the polynomial = X^8 + X^5 + X^4 + 1.

Parameters:
dataToCrcarray of data elements on which to perform the CRC8
Returns:
CRC8 value
static int compute ( int  dataToCRC) [static]

Perform the CRC8 on the data element based on a zero seed.

CRC8 is based on the polynomial = X^8 + X^5 + X^4 + 1.

Parameters:
dataToCrcdata element on which to perform the CRC8
Returns:
CRC8 value
static int compute ( int  dataToCRC,
int  seed 
) [static]

Perform the CRC8 on the data element based on the provided seed.

CRC8 is based on the polynomial = X^8 + X^5 + X^4 + 1.

Parameters:
dataToCrcdata element on which to perform the CRC8
seedseed the CRC8 with this value
Returns:
CRC8 value

The documentation for this class was generated from the following file: