TPppFcs32 Class Reference

class TPppFcs32

Calculates the CCITT CRC-32 used as an option by PPP in HDLC framing.

Public Member Functions
TPppFcs32()
voidCalc(const TUint8 *, const TUint8 *)
voidCalcByte(TUint8)
TUint32 Fcs()
voidInit()
TBool IsGood()
Private Member Enumerations
enumanonymous { KPppInitFcs32 = 0xffffffff, KPppGoodFcs32 = 0xdebb20e3 }
Private Attributes
const TUint32FcsTable
TUint32 iFcs

Constructor & Destructor Documentation

TPppFcs32()

TPppFcs32()[inline]

Member Functions Documentation

Calc(const TUint8 *, const TUint8 *)

voidCalc(const TUint8 *aPtr,
const TUint8 *aEnd
)

Calculate a new FCS given the current FCS and the new data.

Parameters

const TUint8 * aPtr
const TUint8 * aEnd

CalcByte(TUint8)

voidCalcByte(TUint8aByte)[inline]

Incrementally calculates the CRC for the next message byte.

Parameters

TUint8 aByteMessage byte

Fcs()

TUint32 Fcs()const [inline]

Returns the current CRC value.

Init()

voidInit()[inline]

Sets the CRC value to the initial state before calculation.

IsGood()

TBool IsGood()const [inline]

Determines if the calculated CRC is valid.

Member Enumerations Documentation

Enum anonymous

Enumerators

KPppInitFcs32 = 0xffffffff

Initial FCS value

KPppGoodFcs32 = 0xdebb20e3

Good final FCS value

Member Data Documentation

const TUint32 FcsTable

const TUint32FcsTable[private, static]

Fast CRC calculation table

TUint32 iFcs

TUint32 iFcs[private]

CRC value