AP&C API Reference
Static Public Member Functions | List of all members
Apac.Dallas.OneWire.Crc8 Class Reference

More...

Static Public Member Functions

static uint Compute (uint dataToCRC, uint seed)
 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. More...
 
static uint Compute (uint dataToCRC)
 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. More...
 
static uint Compute (byte[] dataToCrc)
 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. More...
 
static uint Compute (byte[] dataToCrc, int off, int len)
 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. More...
 
static uint Compute (byte[] dataToCrc, int off, int len, uint seed)
 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. More...
 
static uint Compute (byte[] dataToCrc, uint seed)
 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. More...
 

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. This is derived from code in the OWdotNET project.

Member Function Documentation

◆ Compute() [1/6]

static uint Apac.Dallas.OneWire.Crc8.Compute ( byte[]  dataToCrc)
inlinestatic

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

◆ Compute() [2/6]

static uint Apac.Dallas.OneWire.Crc8.Compute ( byte[]  dataToCrc,
int  off,
int  len 
)
inlinestatic

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

◆ Compute() [3/6]

static uint Apac.Dallas.OneWire.Crc8.Compute ( byte[]  dataToCrc,
int  off,
int  len,
uint  seed 
)
inlinestatic

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

◆ Compute() [4/6]

static uint Apac.Dallas.OneWire.Crc8.Compute ( byte[]  dataToCrc,
uint  seed 
)
inlinestatic

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

◆ Compute() [5/6]

static uint Apac.Dallas.OneWire.Crc8.Compute ( uint  dataToCRC)
inlinestatic

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

◆ Compute() [6/6]

static uint Apac.Dallas.OneWire.Crc8.Compute ( uint  dataToCRC,
uint  seed 
)
inlinestatic

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: