crc.cpp File Reference

#include "crc.h"
#include <lar/lar.h>
Include dependency graph for crc.cpp:
This graph shows which files directly or indirectly include this file:

Defines

#define P_16   0xA001
#define P_32   0xEDB88320L
#define P_CCITT   0x1021
#define P_DNP   0xA6BC
#define P_KERMIT   0x8408
#define P_SICK   0x8005

Functions

static void init_crc16_tab (void)
static void init_crc32_tab (void)
static void init_crcccitt_tab (void)
static void init_crcdnp_tab (void)
static void init_crckermit_tab (void)
unsigned short update_crc_ccitt (unsigned short crc, unsigned char c)
unsigned short update_crc_sick (unsigned short crc, char c, char prev_byte)
unsigned short update_crc_16 (unsigned short crc, char c)
unsigned short update_crc_kermit (unsigned short crc, char c)
unsigned short update_crc_dnp (unsigned short crc, char c)
unsigned long update_crc_32 (unsigned long crc, char c)

Variables

static int crc_tab16_init = FALSE
static int crc_tab32_init = FALSE
static int crc_tabccitt_init = FALSE
static int crc_tabdnp_init = FALSE
static int crc_tabkermit_init = FALSE
static unsigned short crc_tab16 [256]
static unsigned long crc_tab32 [256]
static unsigned short crc_tabccitt [256]
static unsigned short crc_tabdnp [256]
static unsigned short crc_tabkermit [256]

Define Documentation

#define P_16   0xA001

Referenced by init_crc16_tab().

#define P_32   0xEDB88320L

Referenced by init_crc32_tab().

#define P_CCITT   0x1021

Referenced by init_crcccitt_tab().

#define P_DNP   0xA6BC

Referenced by init_crcdnp_tab().

#define P_KERMIT   0x8408

Referenced by init_crckermit_tab().

#define P_SICK   0x8005

Referenced by update_crc_sick().


Function Documentation

static void init_crc16_tab ( void   )  [static]

References c, crc_tab16, crc_tab16_init, i, P_16, and TRUE.

Referenced by update_crc_16().

Here is the caller graph for this function:

static void init_crc32_tab ( void   )  [static]

References crc_tab32, crc_tab32_init, i, P_32, and TRUE.

Referenced by update_crc_32().

Here is the caller graph for this function:

static void init_crcccitt_tab ( void   )  [static]

References c, crc_tabccitt, crc_tabccitt_init, i, P_CCITT, and TRUE.

Referenced by update_crc_ccitt().

Here is the caller graph for this function:

static void init_crcdnp_tab ( void   )  [static]

References c, crc_tabdnp, crc_tabdnp_init, i, P_DNP, and TRUE.

Referenced by update_crc_dnp().

Here is the caller graph for this function:

static void init_crckermit_tab ( void   )  [static]

References c, crc_tabkermit, crc_tabkermit_init, i, P_KERMIT, and TRUE.

Referenced by update_crc_kermit().

Here is the caller graph for this function:


Variable Documentation

unsigned short crc_tab16[256] [static]

Referenced by init_crc16_tab(), and update_crc_16().

int crc_tab16_init = FALSE [static]

Referenced by init_crc16_tab(), and update_crc_16().

unsigned long crc_tab32[256] [static]

Referenced by init_crc32_tab(), and update_crc_32().

int crc_tab32_init = FALSE [static]

Referenced by init_crc32_tab(), and update_crc_32().

unsigned short crc_tabccitt[256] [static]
int crc_tabccitt_init = FALSE [static]
unsigned short crc_tabdnp[256] [static]

Referenced by init_crcdnp_tab(), and update_crc_dnp().

int crc_tabdnp_init = FALSE [static]

Referenced by init_crcdnp_tab(), and update_crc_dnp().

unsigned short crc_tabkermit[256] [static]
int crc_tabkermit_init = FALSE [static]
Generated on Wed Jun 2 12:43:03 2010 for LAR Atlas by  doxygen 1.6.3