|
Moodle
2.2.1
http://www.collinsharper.com
|
Public Member Functions | |
| __construct ($code) | |
| getBarcodeArray () | |
Protected Member Functions | |
| getGFProduct ($a, $b, $log, $alog, $gf) | |
| getErrorCorrection ($wd, $nb, $nd, $nc, $gf=256, $pp=301) | |
| get253StateCodeword ($cwpad, $cwpos) | |
| get255StateCodeword ($cwpad, $cwpos) | |
| isCharMode ($chr, $mode) | |
| lookAheadTest ($data, $pos, $mode) | |
| getSwitchEncodingCodeword ($mode) | |
| getMaxDataCodewords ($numcw) | |
| getHighLevelEncoding ($data) | |
| placeModule ($marr, $nrow, $ncol, $row, $col, $chr, $bit) | |
| placeUtah ($marr, $nrow, $ncol, $row, $col, $chr) | |
| placeCornerA ($marr, $nrow, $ncol, $chr) | |
| placeCornerB ($marr, $nrow, $ncol, $chr) | |
| placeCornerC ($marr, $nrow, $ncol, $chr) | |
| placeCornerD ($marr, $nrow, $ncol, $chr) | |
| getPlacemetMap ($nrow, $ncol) | |
Protected Attributes | |
| $barcode_array = array() | |
| $last_enc = ENC_ASCII | |
| $symbattr | |
| $chset_id = array(ENC_C40 => 'C40', ENC_TXT => 'TXT', ENC_X12 =>'X12') | |
| $chset | |
Class to create DataMatrix ECC 200 barcode arrays for TCPDF class. DataMatrix (ISO/IEC 16022:2006) is a 2-dimensional bar code.
Definition at line 110 of file datamatrix.php.
| __construct | ( | $ | code | ) |
This is the class constructor. Creates a datamatrix object
| $code | (string) Code to represent using Datamatrix. |
Definition at line 235 of file datamatrix.php.

| get253StateCodeword | ( | $ | cwpad, |
| $ | cwpos | ||
| ) | [protected] |
Return the 253-state codeword
| $cwpad | (int) Pad codeword. |
| $cwpos | (int) Number of data codewords from the beginning of encoded data. |
Definition at line 444 of file datamatrix.php.

| get255StateCodeword | ( | $ | cwpad, |
| $ | cwpos | ||
| ) | [protected] |
Return the 255-state codeword
| $cwpad | (int) Pad codeword. |
| $cwpos | (int) Number of data codewords from the beginning of encoded data. |
Definition at line 459 of file datamatrix.php.

| getBarcodeArray | ( | ) |
Returns a barcode array which is readable by TCPDF
Definition at line 350 of file datamatrix.php.
| getErrorCorrection | ( | $ | wd, |
| $ | nb, | ||
| $ | nd, | ||
| $ | nc, | ||
| $ | gf = 256, |
||
| $ | pp = 301 |
||
| ) | [protected] |
Add error correction codewords to data codewords array (ANNEX E).
| $wd | (array) Array of datacodewords. |
| $nb | (int) Number of blocks. |
| $nd | (int) Number of data codewords per block. |
| $nc | (int) Number of correction codewords per block. |
| $gf | (int) numner of fields on log/antilog table (power of 2). |
| $pp | (int) The value of its prime modulus polynomial (301 for ECC200). |
Definition at line 382 of file datamatrix.php.


| getGFProduct | ( | $ | a, |
| $ | b, | ||
| $ | log, | ||
| $ | alog, | ||
| $ | gf | ||
| ) | [protected] |
Product of two numbers in a Power-of-Two Galois Field
| $a | (int) first number to multiply. |
| $b | (int) second number to multiply. |
| $log | (array) Log table. |
| $alog | (array) Anti-Log table. |
| $gf | (array) Number of Factors of the Reed-Solomon polynomial. |
Definition at line 364 of file datamatrix.php.

| getHighLevelEncoding | ( | $ | data | ) | [protected] |
Get high level encoding using the minimum symbol data characters for ECC 200
| $data | (string) data to encode |
Definition at line 702 of file datamatrix.php.


| getMaxDataCodewords | ( | $ | numcw | ) | [protected] |
Choose the minimum matrix size and return the max number of data codewords.
| $numcw | (int) Number of current codewords. |
Definition at line 687 of file datamatrix.php.

| getPlacemetMap | ( | $ | nrow, |
| $ | ncol | ||
| ) | [protected] |
Build a placement map. (Annex F - ECC 200 symbol character placement)
| $nrow | (int) Number of rows. |
| $ncol | (int) Number of columns. |
Definition at line 1088 of file datamatrix.php.


| getSwitchEncodingCodeword | ( | $ | mode | ) | [protected] |
Get the switching codeword to a new encoding mode (latch codeword)
| $mode | (int) New encoding mode. |
Definition at line 651 of file datamatrix.php.

| isCharMode | ( | $ | chr, |
| $ | mode | ||
| ) | [protected] |
Returns true if the char belongs to the selected mode
| $chr | (int) Character (byte) to check. |
| $mode | (int) Current encoding mode. |
Definition at line 474 of file datamatrix.php.

| lookAheadTest | ( | $ | data, |
| $ | pos, | ||
| $ | mode | ||
| ) | [protected] |
The look-ahead test scans the data to be encoded to find the best mode (Annex P - steps from J to S).
| $data | (string) data to encode |
| $pos | (int) current position |
| $mode | (int) current encoding mode |
Definition at line 521 of file datamatrix.php.


| placeCornerA | ( | $ | marr, |
| $ | nrow, | ||
| $ | ncol, | ||
| $ | chr | ||
| ) | [protected] |
Places the 8 bits of the first special corner case. (Annex F - ECC 200 symbol character placement)
| $marr | array Array of symbols. |
| $nrow | (int) Number of rows. |
| $ncol | (int) Number of columns. |
| $chr | (int) Char byte. |
Definition at line 1001 of file datamatrix.php.


| placeCornerB | ( | $ | marr, |
| $ | nrow, | ||
| $ | ncol, | ||
| $ | chr | ||
| ) | [protected] |
Places the 8 bits of the second special corner case. (Annex F - ECC 200 symbol character placement)
| $marr | array Array of symbols. |
| $nrow | (int) Number of rows. |
| $ncol | (int) Number of columns. |
| $chr | (int) Char byte. |
Definition at line 1023 of file datamatrix.php.


| placeCornerC | ( | $ | marr, |
| $ | nrow, | ||
| $ | ncol, | ||
| $ | chr | ||
| ) | [protected] |
Places the 8 bits of the third special corner case. (Annex F - ECC 200 symbol character placement)
| $marr | array Array of symbols. |
| $nrow | (int) Number of rows. |
| $ncol | (int) Number of columns. |
| $chr | (int) Char byte. |
Definition at line 1045 of file datamatrix.php.


| placeCornerD | ( | $ | marr, |
| $ | nrow, | ||
| $ | ncol, | ||
| $ | chr | ||
| ) | [protected] |
Places the 8 bits of the fourth special corner case. (Annex F - ECC 200 symbol character placement)
| $marr | array Array of symbols. |
| $nrow | (int) Number of rows. |
| $ncol | (int) Number of columns. |
| $chr | (int) Char byte. |
Definition at line 1067 of file datamatrix.php.


| placeModule | ( | $ | marr, |
| $ | nrow, | ||
| $ | ncol, | ||
| $ | row, | ||
| $ | col, | ||
| $ | chr, | ||
| $ | bit | ||
| ) | [protected] |
Places "chr+bit" with appropriate wrapping within array[]. (Annex F - ECC 200 symbol character placement)
| $marr | array 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. |
Definition at line 954 of file datamatrix.php.

| placeUtah | ( | $ | marr, |
| $ | nrow, | ||
| $ | ncol, | ||
| $ | row, | ||
| $ | col, | ||
| $ | chr | ||
| ) | [protected] |
Places the 8 bits of a utah-shaped symbol character. (Annex F - ECC 200 symbol character placement)
| $marr | array 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. |
Definition at line 979 of file datamatrix.php.


$barcode_array = array() [protected] |
Barcode array to be returned which is readable by TCPDF.
Definition at line 116 of file datamatrix.php.
$chset [protected] |
Basic set of charactes for each encodation mode.
Definition at line 190 of file datamatrix.php.
Map encodation modes whit character sets.
Definition at line 184 of file datamatrix.php.
$last_enc = ENC_ASCII [protected] |
Store last used encoding for data codewords.
Definition at line 122 of file datamatrix.php.
$symbattr [protected] |
Table of Data Matrix ECC 200 Symbol Attributes:
Definition at line 145 of file datamatrix.php.