EncodeTxt extends Steps
Com\Tecnick\Barcode\Type\Square\Datamatrix\Encodetxt
Datamatrix Barcode type class DATAMATRIX (ISO/IEC 16022)
Tags
Table of Contents
- encodeTXT() : mixed
- Encode TXT
- encodeTXTC40() : int
- Encode TXTC40
- encodeTXTC40last() : mixed
- 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() : mixed
- Encode TXTC40 shift
- get253StateCodeword() : pad
- Return the 253-state codeword
- getPlacementMap() : array<string|int, mixed>
- Build a placement map.
- lookAheadTest() : int
- The look-ahead test scans the data to be encoded to find the best mode (Annex P - steps from J to S).
- get255StateCodeword() : int
- Return the 255-state codeword
- getMaxDataCodewords() : number
- Choose the minimum matrix size and return the max number of data codewords.
- getSwitchEncodingCodeword() : (int)
- Get the switching codeword to a new encoding mode (latch codeword)
- isASCIIEXTMode() : bool
- Tell if char is ASCII character 128 to 255
- isASCIINUMMode() : bool
- Tell if char is ASCII digits
- isBASE256Mode() : bool
- Tell if char is Function character (FNC1, Structured Append, Reader Program, or Code Page)
- isC40Mode() : bool
- Tell if char is Upper-case alphanumeric
- isCharMode() : bool
- Returns true if the char belongs to the selected mode
- isEDFMode() : bool
- Tell if char is ASCII character 32 to 94
- isTXTMode() : bool
- Tell if char is Lower-case alphanumeric
- isX12Mode() : bool
- Tell if char is ANSI X12
- placeCornerA() : array<string|int, mixed>
- Places the 8 bits of the first special corner case.
- placeCornerB() : array<string|int, mixed>
- Places the 8 bits of the second special corner case.
- placeCornerC() : array<string|int, mixed>
- Places the 8 bits of the third special corner case.
- placeCornerD() : array<string|int, mixed>
- Places the 8 bits of the fourth special corner case.
- placeModule() : array<string|int, mixed>
- Places "chr+bit" with appropriate wrapping within array[].
- placeSweepDownward() : array<string|int, mixed>
- Sweep downward diagonally, inserting successive characters, (Annex F - ECC 200 symbol character placement)
- placeSweepUpward() : array<string|int, mixed>
- Sweep upward diagonally, inserting successive characters, (Annex F - ECC 200 symbol character placement)
- placeUtah() : array<string|int, mixed>
- Places the 8 bits of a utah-shaped symbol character.
- stepK() : int
- Step K
- stepL() : mixed
- Step L
- stepM() : mixed
- Step M
- stepN() : mixed
- Step N
- stepO() : mixed
- Step O
- stepP() : mixed
- Step P
- stepQ() : mixed
- Step Q
- stepR() : mixed
- Step R
- stepRf() : int
- Step R-f
Methods
encodeTXT()
Encode TXT
public encodeTXT(int &$cdw,
int &$cdw_num,
int &$pos,
int &$data_length,
string &$data,
int &$enc)
: mixed
Parameters
- $cdw : int
- $cdw_num : int
- $pos : int
- $data_length : int
- $data : string
- $enc : int
Return values
mixed —encodeTXTC40()
Encode TXTC40
public encodeTXTC40(string &$data,
int &$enc,
int &$temp_cw,
int &$ptr,
int &$epos,
array<string|int,
mixed> &$charset)
: int
Parameters
- $data : string
- $enc : int
- $temp_cw : int
- $ptr : int
- $epos : int
- $charset : array<string|int, mixed>
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,
int &$cdw,
int &$cdw_num,
int &$enc,
int &$temp_cw,
int &$ptr,
int &$epos)
: mixed
Parameters
- $chr : int
- $cdw : int
- $cdw_num : int
- $enc : int
- $temp_cw : int
- $ptr : int
- $epos : int
Return values
mixed —encodeTXTC40shift()
Encode TXTC40 shift
public encodeTXTC40shift(int &$chr,
int &$enc,
int &$temp_cw,
int &$ptr)
: mixed
Parameters
- $chr : int
- $enc : int
- $temp_cw : int
- $ptr : int
Return values
mixed —get253StateCodeword()
Return the 253-state codeword
public get253StateCodeword(int $cdwpad,
int $cdwpos)
: pad
Parameters
- $cdwpad : int
-
Pad codeword.
- $cdwpos : int
-
Number of data codewords from the beginning of encoded data.
Return values
pad —codeword
getPlacementMap()
Build a placement map.
public getPlacementMap(int $nrow,
int $ncol)
: array<string|int,
mixed>
(Annex F - ECC 200 symbol character placement)
Parameters
- $nrow : int
-
Number of rows.
- $ncol : int
-
Number of columns.
Return values
array<string|int, mixed> —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
get255StateCodeword()
Return the 255-state codeword
protected get255StateCodeword(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 —pad codeword
getMaxDataCodewords()
Choose the minimum matrix size and return the max number of data codewords.
protected getMaxDataCodewords(int $numcw)
: number
Parameters
- $numcw : int
-
Number of current codewords.
Return values
number —of data codewords in matrix
getSwitchEncodingCodeword()
Get the switching codeword to a new encoding mode (latch codeword)
protected getSwitchEncodingCodeword( $mode)
: (int)
Parameters
Tags
Return values
(int) —Switch codeword.
isASCIIEXTMode()
Tell if char is ASCII character 128 to 255
protected isASCIIEXTMode(int $chr)
: bool
Parameters
- $chr : int
-
Character (byte) to check.
Return values
bool —isASCIINUMMode()
Tell if char is ASCII digits
protected isASCIINUMMode(int $chr)
: bool
Parameters
- $chr : int
-
Character (byte) to check.
Return values
bool —isBASE256Mode()
Tell if char is Function character (FNC1, Structured Append, Reader Program, or Code Page)
protected isBASE256Mode(int $chr)
: bool
Parameters
- $chr : int
-
Character (byte) to check.
Return values
bool —isC40Mode()
Tell if char is Upper-case alphanumeric
protected isC40Mode(int $chr)
: bool
Parameters
- $chr : int
-
Character (byte) to check.
Return values
bool —isCharMode()
Returns true if the char belongs to the selected mode
protected isCharMode(int $chr,
int $mode)
: bool
Parameters
- $chr : int
-
Character (byte) to check.
- $mode : int
-
Current encoding mode.
Return values
bool —true if the char is of the selected mode.
isEDFMode()
Tell if char is ASCII character 32 to 94
protected isEDFMode(int $chr)
: bool
Parameters
- $chr : int
-
Character (byte) to check.
Return values
bool —isTXTMode()
Tell if char is Lower-case alphanumeric
protected isTXTMode(int $chr)
: bool
Parameters
- $chr : int
-
Character (byte) to check.
Return values
bool —isX12Mode()
Tell if char is ANSI X12
protected isX12Mode(int $chr)
: bool
Parameters
- $chr : int
-
Character (byte) to check.
Return values
bool —placeCornerA()
Places the 8 bits of the first special corner case.
protected placeCornerA(array<string|int,
mixed> $marr,
int $nrow,
int $ncol,
int &$chr,
int $row,
int $col)
: array<string|int,
mixed>
(Annex F - ECC 200 symbol character placement)
Parameters
- $marr : array<string|int, mixed>
-
Array of symbols
- $nrow : int
-
Number of rows
- $ncol : int
-
Number of columns
- $chr : int
-
Char byte
- $row : int
-
Current row
- $col : int
-
Current column
Return values
array<string|int, mixed> —placeCornerB()
Places the 8 bits of the second special corner case.
protected placeCornerB(array<string|int,
mixed> $marr,
int $nrow,
int $ncol,
int &$chr,
int $row,
int $col)
: array<string|int,
mixed>
(Annex F - ECC 200 symbol character placement)
Parameters
- $marr : array<string|int, mixed>
-
Array of symbols
- $nrow : int
-
Number of rows
- $ncol : int
-
Number of columns
- $chr : int
-
Char byte
- $row : int
-
Current row
- $col : int
-
Current column
Return values
array<string|int, mixed> —placeCornerC()
Places the 8 bits of the third special corner case.
protected placeCornerC(array<string|int,
mixed> $marr,
int $nrow,
int $ncol,
int &$chr,
int $row,
int $col)
: array<string|int,
mixed>
(Annex F - ECC 200 symbol character placement)
Parameters
- $marr : array<string|int, mixed>
-
Array of symbols
- $nrow : int
-
Number of rows
- $ncol : int
-
Number of columns
- $chr : int
-
Char byte
- $row : int
-
Current row
- $col : int
-
Current column
Return values
array<string|int, mixed> —placeCornerD()
Places the 8 bits of the fourth special corner case.
protected placeCornerD(array<string|int,
mixed> $marr,
int $nrow,
int $ncol,
int &$chr,
int $row,
int $col)
: array<string|int,
mixed>
(Annex F - ECC 200 symbol character placement)
Parameters
- $marr : array<string|int, mixed>
-
Array of symbols
- $nrow : int
-
Number of rows
- $ncol : int
-
Number of columns
- $chr : int
-
Char byte
- $row : int
-
Current row
- $col : int
-
Current column
Return values
array<string|int, mixed> —placeModule()
Places "chr+bit" with appropriate wrapping within array[].
protected placeModule(array<string|int,
mixed> $marr,
int $nrow,
int $ncol,
int $row,
int $col,
int $chr,
int $bit)
: array<string|int,
mixed>
(Annex F - ECC 200 symbol character placement)
Parameters
- $marr : array<string|int, mixed>
-
Array of symbols.
- $nrow : int
-
Number of rows.
- $ncol : int
-
Number of columns.
- $row : int
-
Row number.
- $col : int
-
Column number.
- $chr : int
-
Char byte.
- $bit : int
-
Bit.
Return values
array<string|int, mixed> —placeSweepDownward()
Sweep downward diagonally, inserting successive characters, (Annex F - ECC 200 symbol character placement)
protected placeSweepDownward(array<string|int,
mixed> $marr,
int $nrow,
int $ncol,
int &$chr,
int &$row,
int &$col)
: array<string|int,
mixed>
Parameters
- $marr : array<string|int, mixed>
-
Array of symbols
- $nrow : int
-
Number of rows
- $ncol : int
-
Number of columns
- $chr : int
-
Char byte
- $row : int
-
Current row
- $col : int
-
Current column
Return values
array<string|int, mixed> —placeSweepUpward()
Sweep upward diagonally, inserting successive characters, (Annex F - ECC 200 symbol character placement)
protected placeSweepUpward(array<string|int,
mixed> $marr,
int $nrow,
int $ncol,
int &$chr,
int &$row,
int &$col)
: array<string|int,
mixed>
Parameters
- $marr : array<string|int, mixed>
-
Array of symbols
- $nrow : int
-
Number of rows
- $ncol : int
-
Number of columns
- $chr : int
-
Char byte
- $row : int
-
Current row
- $col : int
-
Current column
Return values
array<string|int, mixed> —placeUtah()
Places the 8 bits of a utah-shaped symbol character.
protected placeUtah(array<string|int,
mixed> $marr,
int $nrow,
int $ncol,
int $row,
int $col,
int $chr)
: array<string|int,
mixed>
(Annex F - ECC 200 symbol character placement)
Parameters
- $marr : array<string|int, mixed>
-
Array of symbols.
- $nrow : int
-
Number of rows.
- $ncol : int
-
Number of columns.
- $row : int
-
Row number.
- $col : int
-
Column number.
- $chr : int
-
Char byte.
Return values
array<string|int, mixed> —stepK()
Step K
protected stepK(int $numch)
: int
Parameters
- $numch : int
Return values
int —stepL()
Step L
protected stepL(int $chr,
int &$numch)
: mixed
Parameters
- $chr : int
- $numch : int
Return values
mixed —stepM()
Step M
protected stepM(int $chr,
int &$numch)
: mixed
Parameters
- $chr : int
- $numch : int
Return values
mixed —stepN()
Step N
protected stepN(int $chr,
int &$numch)
: mixed
Parameters
- $chr : int
- $numch : int
Return values
mixed —stepO()
Step O
protected stepO(int $chr,
int &$numch)
: mixed
Parameters
- $chr : int
- $numch : int
Return values
mixed —stepP()
Step P
protected stepP(int $chr,
int &$numch)
: mixed
Parameters
- $chr : int
- $numch : int
Return values
mixed —stepQ()
Step Q
protected stepQ(int $chr,
int &$numch)
: mixed
Parameters
- $chr : int
- $numch : int
Return values
mixed —stepR()
Step R
protected stepR(int $numch,
int $pos,
int $data_length,
int $charscount,
string $data)
: mixed
Parameters
- $numch : int
- $pos : int
- $data_length : int
- $charscount : int
- $data : string
Return values
mixed —stepRf()
Step R-f
protected stepRf(int $numch,
int $pos,
int $data_length,
int $charscount,
string $data)
: int
Parameters
- $numch : int
- $pos : int
- $data_length : int
- $charscount : int
- $data : string
Return values
int —Encoding mode