ErrorCorrection

Error correction methods and other utilities for Datamatrix Barcode type class

Namespace: Com\Tecnick\Barcode\Type\Square\Datamatrix

class ErrorCorrection

Source: src/Type/Square/Datamatrix/ErrorCorrection.php:36

Error correction methods and other utilities for Datamatrix Barcode type class

Methods

getErrorCorrection()

Add error correction codewords to data codewords array (ANNEX E).

The data codewords are split over $nbk interleaved blocks and each block is followed by its own error correction codewords, interleaved the same way.

public getErrorCorrection(
    array<int,int> $wdc,
    int $nbk,
    int $ncw,
    int $ncc,
    int $ngf = 256,
    int $vpp = 301
): array<int,int>

Parameters:

  • $wdc (array<int,int>): Array of datacodewords.
  • $nbk (int): Number of blocks.
  • $ncw (int): Number of data codewords per block.
  • $ncc (int): Number of correction codewords per block.
  • $ngf (int): Number of fields on log/antilog table (power of 2).
  • $vpp (int): The value of its prime modulus polynomial (301 for ECC200).

Returns: array<int,int>: data codewords + error codewords

Source: src/Type/Square/Datamatrix/ErrorCorrection.php:61