ZBar Bar Code Reader Library  version 0.10
code128.c File Reference
Include dependency graph for code128.c:

Macros

#define NUM_CHARS
 

Typedefs

typedef enum code128_char_e code128_char_t
 

Enumerations

enum  code128_char_e {
  FNC3,
  FNC2,
  SHIFT,
  CODE_C,
  CODE_B,
  CODE_A,
  FNC1,
  START_A,
  START_B,
  START_C,
  STOP,
  FNC3,
  FNC2,
  SHIFT,
  CODE_C,
  CODE_B,
  CODE_A,
  FNC1,
  START_A,
  START_B,
  START_C,
  STOP_FWD,
  STOP_REV,
  FNC4
}
 

Functions

zbar_symbol_type_t _zbar_decode_code128 (zbar_decoder_t *dcode)
 
static unsigned char calc_check (unsigned char c)
 
static signed char decode6 (zbar_decoder_t *dcode)
 
static signed char decode_hi (int sig)
 
static signed char decode_lo (int sig)
 
static unsigned char postprocess (zbar_decoder_t *dcode)
 
static unsigned postprocess_c (zbar_decoder_t *dcode, unsigned start, unsigned end, unsigned dst)
 
static unsigned char validate_checksum (zbar_decoder_t *dcode)
 

Variables

static const unsigned char characters [108]
 
static const unsigned char lo_base [8]
 
static const unsigned char lo_offset [0x80]
 

Macro Definition Documentation

#define NUM_CHARS

Typedef Documentation

Enumeration Type Documentation

Enumerator
FNC3 
FNC2 
SHIFT 
CODE_C 
CODE_B 
CODE_A 
FNC1 
START_A 
START_B 
START_C 
STOP 
FNC3 
FNC2 
SHIFT 
CODE_C 
CODE_B 
CODE_A 
FNC1 
START_A 
START_B 
START_C 
STOP_FWD 
STOP_REV 
FNC4 

Function Documentation

static unsigned char calc_check ( unsigned char  c)
inlinestatic

Referenced by decode6().

Here is the caller graph for this function:

static signed char decode6 ( zbar_decoder_t *  dcode)
inlinestatic

References calc_check(), decode_e(), decode_hi(), decode_lo(), dprintf, get_color(), get_width(), and zbar::ZBAR_BAR.

Referenced by _zbar_decode_code128().

Here is the caller graph for this function:

static signed char decode_hi ( int  sig)
inlinestatic

References characters, dprintf, and idx.

Referenced by decode6().

Here is the caller graph for this function:

static signed char decode_lo ( int  sig)
inlinestatic

References characters, dprintf, idx, lo_base, lo_offset, and zassert.

Referenced by decode6().

Here is the caller graph for this function:

static unsigned char postprocess ( zbar_decoder_t *  dcode)
inlinestatic

References _zbar_decoder_buf_dump(), code128_decoder_s::character, CODE_A, CODE_C, code128_decoder_s::direction, dprintf, FNC1, FNC2, FNC3, postprocess_c(), SHIFT, START_A, START_C, STOP_FWD, STOP_REV, and zassert.

Referenced by _zbar_decode_code128().

Here is the call graph for this function:

Here is the caller graph for this function:

static unsigned postprocess_c ( zbar_decoder_t *  dcode,
unsigned  start,
unsigned  end,
unsigned  dst 
)
inlinestatic

References _zbar_decoder_buf_dump(), size_buf(), and zassert.

Referenced by postprocess().

Here is the call graph for this function:

Here is the caller graph for this function:

static unsigned char validate_checksum ( zbar_decoder_t *  dcode)
inlinestatic

References _zbar_decoder_buf_dump(), code128_decoder_s::character, code128_decoder_s::direction, dprintf, idx, and zassert.

Referenced by _zbar_decode_code128().

Here is the call graph for this function:

Here is the caller graph for this function:

Variable Documentation

const unsigned char characters[108]
static

Referenced by decode_hi(), and decode_lo().

const unsigned char lo_base[8]
static

Referenced by decode_lo().

const unsigned char lo_offset[0x80]
static

Referenced by decode_lo().