classes-Com-Tecnick-Barcode-Type-Square-Datamatrix-ErrorCorrection

It appears that you are using AdBlocking software. The cost of running this website is covered by advertisements. If you like it please feel free to a small amount of money to secure the future of this website.

ErrorCorrection

Com\Tecnick\Barcode\Type\Square\Datamatrix\ErrorCorrection

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-2016 Nicola Asuni - Tecnick.com LTD

license

http://www.gnu.org/copyleft/lesser.html GNU-LGPL v3 (see LICENSE.TXT)

link
https://github.com/tecnickcom/tc-lib-barcode

Table of Contents

getErrorCorrection()  : array<string|int, mixed>
Add error correction codewords to data codewords array (ANNEX E).
genLogs()  : mixed
Generate the log ($log) and antilog ($alog) tables
getGFProduct()  : int
Product of two numbers in a Power-of-Two Galois Field

Methods

getErrorCorrection()

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

public getErrorCorrection(array<string|int, mixed> $wdc, int $nbk, int $ncw, int $ncc[, int $ngf = 256 ][, int $vpp = 301 ]) : array<string|int, mixed>
Parameters
$wdc : array<string|int, mixed>

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<string|int, mixed>

data codewords + error codewords

genLogs()

Generate the log ($log) and antilog ($alog) tables

protected genLogs(array<string|int, mixed> &$log, arrya &$alog, int $ngf, int $vpp) : mixed
Parameters
$log : array<string|int, mixed>

Log table

$alog : arrya

Anti-Log table

$ngf : int

Number of fields on log/antilog table (power of 2).

$vpp : int

The value of its prime modulus polynomial (301 for ECC200).

Return values
mixed

getGFProduct()

Product of two numbers in a Power-of-Two Galois Field

protected getGFProduct(int $numa, int $numb, array<string|int, mixed> $log, array<string|int, mixed> $alog, array<string|int, mixed> $ngf) : int
Parameters
$numa : int

First number to multiply.

$numb : int

Second number to multiply.

$log : array<string|int, mixed>

Log table.

$alog : array<string|int, mixed>

Anti-Log table.

$ngf : array<string|int, mixed>

Number of Factors of the Reed-Solomon polynomial.

Return values
int

product

 

© 2004-2021 – Nicola Asuni - Tecnick.com - All rights reserved.
about - disclaimer - privacy