ApparatusFramework::CodingServices Class Reference
[Pattern Services]

#include <PatternServices/current/include/PolynomicalCodingServices.h>

List of all members.

Static Public Member Functions

static uint32 computeCrc32CCITT (const uint8 *pStream, const uint16 streamLgth, const uint32 seed)
static uint16 computeCrc16 (const uint8 *pStream, const uint16 streamLgth, const uint16 seed)
static uint16 computeCrc16CCITT (const uint8 *pStream, const uint16 streamLgth, const uint16 seed)
static uint16 computeCrc16XModem (const uint8 *pStream, const uint16 streamLgth, const uint16 seed)

Static Public Attributes

static const uint32 CRC32CCITTTABLE_INIT_VALUE_C
static const uint16 CRC16TABLE_INIT_VALUE_C
static const uint16 CRC16CCITTTABLE_INIT_VALUE_C
static const uint16 CRC16XMODEMTABLE_INIT_VALUE_C

Detailed Description

The class provides a set of static methods to compute various standard ITU (formally CCITT) CRC codes. The polynomial of these CRC code can be found in the published standard of the ITU organization. For faster CRC calculation we provide a table lookup mechanism. The various CRC tables are included in the implementation file. The included file list all parameters which were used to generate the table.

Definition at line 73 of file PolynomicalCodingServices.h.


Member Function Documentation

static uint16 ApparatusFramework::CodingServices::computeCrc16 ( const uint8 pStream,
const uint16  streamLgth,
const uint16  seed 
) [static]

Returns a standard CRC16 computed on the passed byte stream.

Parameters:
pStream pointer to the byte stream for which the CRC is computed
streamLgth length of the byte stream
seed initial seed for the CRC computation
Returns:
Computed CRC value.
static uint16 ApparatusFramework::CodingServices::computeCrc16CCITT ( const uint8 pStream,
const uint16  streamLgth,
const uint16  seed 
) [static]

Returns a CRC16 using the ITU standard polynomial computed on the passed byte stream. Used by SDLC/HDLC, ADCCP and CRC-CCITT.

Parameters:
pStream pointer to the byte stream for which the CRC is computed
streamLgth length of the byte stream
seed initial seed for the CRC computation
Returns:
Computed CRC value.
static uint16 ApparatusFramework::CodingServices::computeCrc16XModem ( const uint8 pStream,
const uint16  streamLgth,
const uint16  seed 
) [static]

Returns a CRC16 computed on the passed byte stream. This CRC is used for XModem transmitting.

Parameters:
pStream pointer to the byte stream for which the CRC is computed
streamLgth length of the byte stream
seed initial seed for the CRC computation
Returns:
Computed CRC value.
static uint32 ApparatusFramework::CodingServices::computeCrc32CCITT ( const uint8 pStream,
const uint16  streamLgth,
const uint32  seed 
) [static]

static checksum computation services Returns a CRC 32 using the ITU standard polynomial computed on the passed byte stream. Used by PKZIP, Ethernet, FDDI.

Parameters:
pStream pointer to the byte stream for which the CRC is computed
streamLgth length of the byte stream
seed initial seed for the CRC computation
Returns:
Computed CRC value.

Member Data Documentation

Defines the initial CRC value for the calculation.

Definition at line 114 of file PolynomicalCodingServices.h.

Defines the initial CRC value for the calculation.

Definition at line 100 of file PolynomicalCodingServices.h.

Defines the initial CRC value for the calculation.

Definition at line 128 of file PolynomicalCodingServices.h.

Defines the initial CRC value for the calculation.

Definition at line 87 of file PolynomicalCodingServices.h.

© 2004-2010 bbv Software Services AG / Apparatus Services