Humble Framework for SkyOS


Main Page | Modules | Class Hierarchy | Alphabetical List | Data Structures | Directories | File List | Data Fields | Globals | Related Pages

HCRC Class Reference
[Abstract Data Types]

#include <HCRC.h>

Inheritance diagram for HCRC:

HObj

Detailed Description

The HCRC class can generate a 32-bit CRC for any arbitrary-sized block of data. There are two ways in which a CRC can be generated:

Definition at line 27 of file HCRC.h.

Public Member Functions

ErrCode Start (void)
 Initializes a CRC computation.
ErrCode Stop (uint32 &uCRC) const
 Returns the current CRC value.
ErrCode Update (PtrConst pData, uint32 uBytes)
 Updates an on-going CRC computation.
uint32 Get (void) const

Static Public Member Functions

static ErrCode Compute (const HMemory &buffer, uint32 &uCRC)
 Computes the CRC for a memory buffer.
static ErrCode Compute (PtrConst pData, uint32 uBytes, uint32 &uCRC)
 Computes the CRC for a data stream.

Static Protected Member Functions

static ErrCode compute (PtrDataConst pData, uint32 uBytes, uint32 &uCRC)
 Computes the CRC of a block of data.

Protected Attributes

uint32 m_uCRC
 Stores the CRC value.


Member Function Documentation

static ErrCode HCRC::Compute const HMemory buffer,
uint32 &  uCRC
[static]
 

Returns:
NO_ERROR on success, error code otherwise
Parameters:
buffer HMemory object
uCRC 32-bit CRC value

Definition at line 59 of file HCRC.h.

static ErrCode HCRC::Compute PtrConst  pData,
uint32  uBytes,
uint32 &  uCRC
[static]
 

Returns:
NO_ERROR on success, error code otherwise
Parameters:
pData Pointer to data stream to verify
uBytes Count of bytes in stream
[out] uCRC 32-bit CRC value

Definition at line 70 of file HCRC.h.

ErrCode HCRC::Start void   ) 
 

Returns:
Always NO_ERROR

Definition at line 85 of file HCRC.h.

ErrCode HCRC::Stop uint32 &  uCRC  )  const
 

Returns:
Always NO_ERROR
Parameters:
[out] uCRC CRC value

Definition at line 96 of file HCRC.h.

ErrCode HCRC::Update PtrConst  pData,
uint32  uBytes
 

Returns:
NO_ERROR on success, error code otherwise
Parameters:
pData Pointer to data stream to verify
uBytes Count of bytes in stream

Definition at line 109 of file HCRC.h.

static ErrCode HCRC::compute PtrDataConst  pData,
uint32  uBytes,
uint32 &  uCRC
[static, protected]
 

This method does not perform and pre or post processing of the CRC value, because it is intended to be called repetitively.

Returns:
NO_ERROR on success, error code otherwise
Parameters:
pData Pointer to data to verify
uBytes Data length (in bytes)
[out] uCRC 32-bit CRC value

Definition at line 125 of file HCRC.h.


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

2006.01.09-16:37