Options
All
  • Public
  • Public/Protected
  • All
Menu
author

bbrown@google.com (Brian Brown)

Hierarchy

  • BitMatrixParser

Index

Constructors

constructor

Properties

Private mappingBitMatrix

mappingBitMatrix: BitMatrix

Private readMappingMatrix

readMappingMatrix: BitMatrix

Private version

version: Version

Methods

Private extractDataRegion

getVersion

readCodewords

  • readCodewords(): Int8Array
  • Reads the bits in the BitMatrix representing the mapping matrix (No alignment patterns) in the correct order in order to reconstitute the codewords bytes contained within the Data Matrix Code.

    throws

    FormatException if the exact number of bytes expected is not read

    Returns Int8Array

    bytes encoded within the Data Matrix Code

Private readCorner1

  • readCorner1(numRows: number, numColumns: number): number
  • Reads the 8 bits of the special corner condition 1.

    See ISO 16022:2006, Figure F.3

    Parameters

    • numRows: number

      Number of rows in the mapping matrix

    • numColumns: number

      Number of columns in the mapping matrix

    Returns number

    byte from the Corner condition 1

Private readCorner2

  • readCorner2(numRows: number, numColumns: number): number
  • Reads the 8 bits of the special corner condition 2.

    See ISO 16022:2006, Figure F.4

    Parameters

    • numRows: number

      Number of rows in the mapping matrix

    • numColumns: number

      Number of columns in the mapping matrix

    Returns number

    byte from the Corner condition 2

Private readCorner3

  • readCorner3(numRows: number, numColumns: number): number
  • Reads the 8 bits of the special corner condition 3.

    See ISO 16022:2006, Figure F.5

    Parameters

    • numRows: number

      Number of rows in the mapping matrix

    • numColumns: number

      Number of columns in the mapping matrix

    Returns number

    byte from the Corner condition 3

Private readCorner4

  • readCorner4(numRows: number, numColumns: number): number
  • Reads the 8 bits of the special corner condition 4.

    See ISO 16022:2006, Figure F.6

    Parameters

    • numRows: number

      Number of rows in the mapping matrix

    • numColumns: number

      Number of columns in the mapping matrix

    Returns number

    byte from the Corner condition 4

Private readModule

  • readModule(row: number, column: number, numRows: number, numColumns: number): boolean
  • Reads a bit of the mapping matrix accounting for boundary wrapping.

    Parameters

    • row: number

      Row to read in the mapping matrix

    • column: number

      Column to read in the mapping matrix

    • numRows: number

      Number of rows in the mapping matrix

    • numColumns: number

      Number of columns in the mapping matrix

    Returns boolean

    value of the given bit in the mapping matrix

Private readUtah

  • readUtah(row: number, column: number, numRows: number, numColumns: number): number
  • Reads the 8 bits of the standard Utah-shaped pattern.

    See ISO 16022:2006, 5.8.1 Figure 6

    Parameters

    • row: number

      Current row in the mapping matrix, anchored at the 8th bit (LSB) of the pattern

    • column: number

      Current column in the mapping matrix, anchored at the 8th bit (LSB) of the pattern

    • numRows: number

      Number of rows in the mapping matrix

    • numColumns: number

      Number of columns in the mapping matrix

    Returns number

    byte from the utah shape

Static readVersion

  • Creates the version object based on the dimension of the original bit matrix from the datamatrix code.

    See ISO 16022:2006 Table 7 - ECC 200 symbol attributes

    throws

    FormatException if the dimensions of the mapping matrix are not valid Data Matrix dimensions.

    Parameters

    Returns Version

    Version encapsulating the Data Matrix Code's "version"

Generated using TypeDoc