EncodeTxt extends Steps
in package
Com\Tecnick\Barcode\Type\Square\Datamatrix\Encodetxt
Datamatrix Barcode type class DATAMATRIX (ISO/IEC 16022)
Tags
Table of Contents
Properties
- $last_enc : int
- Store last used encoding for data codewords.
- $shape : string
- Datamatrix shape key (S=square, R=rectangular)
Methods
- 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
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
intgetPlacementMap()
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