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

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.

Encode extends EncodeTxt

in package

Com\Tecnick\Barcode\Type\Square\Datamatrix\Encode

Datamatrix Barcode type class DATAMATRIX (ISO/IEC 16022)

Tags
since
2015-02-21
category

Library

author

Nicola Asuni info@tecnick.com

copyright

2015-2024 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

Properties

$last_enc  : int
Store last used encoding for data codewords.
$shape  : string
Datamatrix shape key (S=square, R=rectangular)

Methods

__construct()  : mixed
Initialize a new encode object
encodeASCII()  : void
Encode ASCII
encodeBase256()  : void
Encode Base256
encodeEDF()  : void
Encode EDF
encodeEDFfour()  : bool
Encode EDF4
encodeTXT()  : void
Encode TXT
encodeTXTC40()  : int
Encode TXTC40
encodeTXTC40last()  : void
Encode TXTC40 last The following rules apply when only one or two symbol characters remain in the symbol before the start of the error correction codewords.
encodeTXTC40shift()  : void
Encode TXTC40 shift
get253StateCodeword()  : int
Return the 253-state codeword
getPlacementMap()  : array<int, int>
Build a placement map.
getSwitchEncodingCodeword()  : int
Get the switching codeword to a new encoding mode (latch codeword)
lookAheadTest()  : int
The look-ahead test scans the data to be encoded to find the best mode (Annex P - steps from J to S).

Properties

$last_enc

Store last used encoding for data codewords.

public int $last_enc

$shape

Datamatrix shape key (S=square, R=rectangular)

public string $shape

Methods

__construct()

Initialize a new encode object

public __construct([string $shape = 'S' ]) : mixed
Parameters
$shape : string = 'S'

Datamatrix shape key (S=square, R=rectangular)

encodeASCII()

Encode ASCII

public encodeASCII(array<int, int> &$cdw, int &$cdw_num, int &$pos, int &$data_length, string &$data, int &$enc) : void
Parameters
$cdw : array<int, int>

Codewords array

$cdw_num : int

Codewords number

$pos : int

Current position

$data_length : int

Data length

$data : string

Data string

$enc : int

Current encoding

encodeBase256()

Encode Base256

public encodeBase256(array<int, int> &$cdw, int &$cdw_num, int &$pos, int &$data_length, int &$field_length, string &$data, int &$enc) : void
Parameters
$cdw : array<int, int>

Codewords array

$cdw_num : int

Codewords number

$pos : int

Current position

$data_length : int

Data length

$field_length : int

Field length

$data : string

Data string

$enc : int

Current encoding

encodeEDF()

Encode EDF

public encodeEDF(array<int, int> &$cdw, int &$cdw_num, int &$pos, int &$data_length, int &$field_length, string &$data, int &$enc) : void
Parameters
$cdw : array<int, int>

Codewords array

$cdw_num : int

Codewords number

$pos : int

Current position

$data_length : int

Data length

$field_length : int

Field length

$data : string

Data string

$enc : int

Current encoding

encodeEDFfour()

Encode EDF4

public encodeEDFfour(int $epos, array<int, int> &$cdw, int &$cdw_num, int &$pos, int &$data_length, int &$field_length, int &$enc, array<int, int> &$temp_cw) : bool
Parameters
$epos : int

Current position

$cdw : array<int, int>

Codewords array

$cdw_num : int

Codewords number

$pos : int

Current position

$data_length : int

Data length

$field_length : int

Field length

$enc : int

Current encoding

$temp_cw : array<int, int>

Temporary codewords array

Return values
bool

true to break the loop

encodeTXT()

Encode TXT

public encodeTXT(array<int, int> &$cdw, int &$cdw_num, int &$pos, int &$data_length, string &$data, int &$enc) : void
Parameters
$cdw : array<int, int>

Codewords array

$cdw_num : int

Codewords number

$pos : int

Current position

$data_length : int

Data length

$data : string

Data string

$enc : int

Current encoding

encodeTXTC40()

Encode TXTC40

public encodeTXTC40(string &$data, int &$enc, array<int, int> &$temp_cw, int &$ptr, int &$epos, array<int, int> &$charset) : int
Parameters
$data : string

Data string

$enc : int

Current encoding

$temp_cw : array<int, int>

Temporary codewords array

$ptr : int

Pointer

$epos : int

End position

$charset : array<int, int>

Charset array

Return values
int

Curent character code

encodeTXTC40last()

Encode TXTC40 last The following rules apply when only one or two symbol characters remain in the symbol before the start of the error correction codewords.

public encodeTXTC40last(int $chr, array<int, int> &$cdw, int &$cdw_num, int &$enc, array<int, int> &$temp_cw, int &$ptr, int &$epos) : void
Parameters
$chr : int

Character code

$cdw : array<int, int>

Codewords array

$cdw_num : int

Codewords number

$enc : int

Current encoding

$temp_cw : array<int, int>

Temporary codewords array

$ptr : int

Pointer

$epos : int

End position

encodeTXTC40shift()

Encode TXTC40 shift

public encodeTXTC40shift(int &$chr, int &$enc, array<int, int> &$temp_cw, int &$ptr) : void
Parameters
$chr : int

Character code

$enc : int

Current encoding

$temp_cw : array<int, int>

Temporary codewords array

$ptr : int

Pointer

get253StateCodeword()

Return the 253-state codeword

public get253StateCodeword(int $cdwpad, int $cdwpos) : int
Parameters
$cdwpad : int

Pad codeword.

$cdwpos : int

Number of data codewords from the beginning of encoded data.

Return values
int

getPlacementMap()

Build a placement map.

public getPlacementMap(int $nrow, int $ncol) : array<int, int>

(Annex F - ECC 200 symbol character placement)

Parameters
$nrow : int

Number of rows.

$ncol : int

Number of columns.

Return values
array<int, int>

getSwitchEncodingCodeword()

Get the switching codeword to a new encoding mode (latch codeword)

public getSwitchEncodingCodeword(int $mode) : int
Parameters
$mode : int

New encoding mode.

Return values
int

Switch codeword.

lookAheadTest()

The look-ahead test scans the data to be encoded to find the best mode (Annex P - steps from J to S).

public lookAheadTest(string $data, int $pos, int $mode) : int
Parameters
$data : string

Data to encode

$pos : int

Current position

$mode : int

Current encoding mode

Return values
int

encoding mode

On this page
 

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