Table of contents
Namespace: Com\Tecnick\Barcode\Type\Square\Datamatrix
File: ErrorCorrection.php line 36
Error correction methods and other utilities for Datamatrix Barcode type class
Tags
- since: 2015-02-21
- category: Library
- author: Nicola Asuni info@tecnick.com
- copyright: 2010-2026 Nicola Asuni - Tecnick.com LTD
- license: https://www.gnu.org/copyleft/lesser.html GNU-LGPL v3 (see LICENSE)
- link: https://github.com/tecnickcom/tc-lib-barcode
Methods
getErrorCorrection()
File: ErrorCorrection.php line 61
public getErrorCorrection(array<int, int> $wdc, int $nbk, int $ncw, int $ncc[, int $ngf = 256 ][, int $vpp = 301 ]) : array<int, int>
The data codewords are split over $nbk interleaved blocks and each block is followed by its own error correction codewords, interleaved the same way.
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 = 256: Number of fields on log/antilog table (power of 2).
- $vpp : int = 301: The value of its prime modulus polynomial (301 for ECC200).
Return values
array<int, int> —
data codewords + error codewords