Structural deformable models
Namespaces | Macros | Functions | Variables
crc.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

 crc
 

Macros

#define POLYNOMIAL   0x8005
 
#define INITIAL_VALUE   0x0000
 

Functions

void crc::PutCRC (unsigned char b)
 
unsigned short CRC (const unsigned char *Data, unsigned int Length)
 

Variables

union {
   unsigned long   crc::Whole
 
   struct {
      unsigned char   crc::Data
 
      unsigned short   crc::Remainder
 
      unsigned char   crc::Head
 
   }   crc::Part
 
crc::CRC_buffer
 

Macro Definition Documentation

#define INITIAL_VALUE   0x0000

Definition at line 22 of file crc.h.

Referenced by CRC().

#define POLYNOMIAL   0x8005

Definition at line 19 of file crc.h.

Referenced by crc::PutCRC().

Function Documentation

unsigned short CRC ( const unsigned char *  Data,
unsigned int  Length 
)
inline

Definition at line 56 of file crc.h.

References crc::CRC_buffer, INITIAL_VALUE, and crc::PutCRC().

Referenced by Model::setName().

58 {
59  using namespace crc;
60  CRC_buffer.Part.Remainder = INITIAL_VALUE;
61  while (Length-- > 0)
62  PutCRC(*Data++);
63  PutCRC(0);
64  PutCRC(0);
65  return CRC_buffer.Part.Remainder;
66 }
Definition: crc.h:24
union crc::@2 CRC_buffer
unsigned char Data
Definition: crc.h:30
void PutCRC(unsigned char b)
Definition: crc.h:38
#define INITIAL_VALUE
Definition: crc.h:22