TPppFcs32 Class Reference

class TPppFcs32

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

Public Member Functions
TPppFcs32 ()
void Calc (const TUint8 *, const TUint8 *)
void CalcByte ( TUint8 )
TUint32 Fcs ()
void Init ()
TBool IsGood ()
Private Member Enumerations
enum anonymous { KPppInitFcs32  = 0xffffffff, KPppGoodFcs32  = 0xdebb20e3 }
Private Attributes
const TUint32 FcsTable
TUint32 iFcs

Constructor & Destructor Documentation

TPppFcs32()

TPppFcs32 ( ) [inline]

Member Functions Documentation

Calc(const TUint8 *, const TUint8 *)

void Calc ( 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)

void CalcByte ( TUint8 aByte ) [inline]

Incrementally calculates the CRC for the next message byte.

Parameters

TUint8 aByte Message byte

Fcs()

TUint32 Fcs ( ) const [inline]

Returns the current CRC value.

Init()

void Init ( ) [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 TUint32 FcsTable [private, static]

Fast CRC calculation table

TUint32 iFcs

TUint32 iFcs [private]

CRC value