.\" Automatically generated by Pod::Man 4.09 (Pod::Simple 3.35) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" Set up some character translations and predefined strings. \*(-- will .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left .\" double quote, and \*(R" will give a right double quote. \*(C+ will .\" give a nicer C++. Capital omega is used to do unbreakable dashes and .\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, .\" nothing in troff, for use with C<>. .tr \(*W- .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' .ie n \{\ . ds -- \(*W- . ds PI pi . if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch . if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch . ds L" "" . ds R" "" . ds C` "" . ds C' "" 'br\} .el\{\ . ds -- \|\(em\| . ds PI \(*p . ds L" `` . ds R" '' . ds C` . ds C' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is >0, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .\" .\" Avoid warning from groff about undefined register 'F'. .de IX .. .if !\nF .nr F 0 .if \nF>0 \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{\ . nr % 0 . nr F 2 . \} .\} .\" ======================================================================== .\" .IX Title "Barcode::DataMatrix::Engine 3pm" .TH Barcode::DataMatrix::Engine 3pm "2017-11-19" "perl v5.26.1" "User Contributed Perl Documentation" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH "NAME" Barcode::DataMatrix::Engine \- The engine which generates the data matrix bitmap. .SS "\s-1DEBUG\s0" .IX Subsection "DEBUG" Turn on/off general debugging information. .SS "E_ASCII" .IX Subsection "E_ASCII" Represent the \s-1ASCII\s0 encoding type. .SS "E_C40" .IX Subsection "E_C40" Represent the C40 encoding type. (upper case alphanumeric) .SS "E_TEXT" .IX Subsection "E_TEXT" Represent the \s-1TEXT\s0 encoding type. (lower case alphanumeric) .SS "E_BASE256" .IX Subsection "E_BASE256" Represent the \s-1BASE256\s0 encoding type. .SS "E_NONE" .IX Subsection "E_NONE" Represent the when there is no encoding type. .SS "E_AUTO" .IX Subsection "E_AUTO" Represent the when the encoding type is automatically set. .SS "Types" .IX Subsection "Types" Return a list of encoding types. .SS "stringToType (type_name)" .IX Subsection "stringToType (type_name)" Return the integer representing the type from the type name. .SS "typeToString (type_integer)" .IX Subsection "typeToString (type_integer)" Return the type name from the integer representing the type. .SS "stringToFormat (format_string)" .IX Subsection "stringToFormat (format_string)" Convert a \*(L"width x height\*(R" format string into an internal format specification. .SS "setType (type_name)" .IX Subsection "setType (type_name)" Set the encoding type from the given type name. .SS "new" .IX Subsection "new" Construct a \f(CW\*(C`Barcode::DataMatrix::Engine\*(C'\fR object. .SS "init" .IX Subsection "init" Initialize some of the basic \f(CW\*(C`Barcode::DataMatrix::Engine\*(C'\fR data. .SS "ProcessTilde" .IX Subsection "ProcessTilde" Handle special or control characters, which are prefixed by a tilde \f(CW\*(C`~\*(C'\fR when encoding. .SS "CalcReed (ai, err)" .IX Subsection "CalcReed (ai, err)" Return the message as a Reed-Solomon encoded array. .SS "A253 (i, j)" .IX Subsection "A253 (i, j)" Return padding codewords via the 253\-state algorithm. .PP For more information see . .PP The relevant text for this algorithm is reproduced here. .PP If the symbol is not full, pad \f(CW\*(C`CW\*(C'\fRs are required. After the last data \&\f(CW\*(C`CW\*(C'\fR, the 254 \f(CW\*(C`CW\*(C'\fR indicates the end of the datas or the return to \s-1ASCII\s0 method. First padding \f(CW\*(C`CW\*(C'\fR is 129 and next padding \f(CW\*(C`CW\*(C'\fRs are computed with the 253\-state algorithm. .PP \fIThe 253\-state algorithm\fR .IX Subsection "The 253-state algorithm" .PP Let \f(CW\*(C`P\*(C'\fR be the number of data \f(CW\*(C`CW\*(C'\fRs from the beginning of the data, \f(CW\*(C`R\*(C'\fR a pseudo random number and \f(CW\*(C`CW\*(C'\fR the required pad \f(CW\*(C`CW\*(C'\fR. .PP .Vb 2 \& R = ((149 * P) MOD 253) + 1 \& CW = (129 + R) MOD 254 .Ve .SS "CreateBitmap" .IX Subsection "CreateBitmap" Generate and return the bitmap representing the message. .SS "ecc (format, ai)" .IX Subsection "ecc (format, ai)" Return the \s-1ECC200\s0 (DataMatrix) array, formatted for the appropriate matrix size. .SS "isIDigit (character_code)" .IX Subsection "isIDigit (character_code)" Return true if the character code represents a digit. .SS "isILower (character_code)" .IX Subsection "isILower (character_code)" Return true if the character code represents a lower case letter. .SS "isIUpper (character_code)" .IX Subsection "isIUpper (character_code)" Return true if the character code represents an upper case letter. .SS "DetectEncoding" .IX Subsection "DetectEncoding" Detect the encoding type. .SS "EncodeASCII (i, ai, ai1, as)" .IX Subsection "EncodeASCII (i, ai, ai1, as)" Encode the message as \s-1ASCII.\s0 .SS "SelectEncoding (j, ai, i)" .IX Subsection "SelectEncoding (j, ai, i)" Select a new encoding type for the message. .SS "EncodeC40TEXT (i, ai, ai1, ai2, flag, flag1, flag2)" .IX Subsection "EncodeC40TEXT (i, ai, ai1, ai2, flag, flag1, flag2)" Encode the message as C40/TEXT. .SS "state255 (V, P)" .IX Subsection "state255 (V, P)" The 255\-state algorithm. Used when encoding strings with the \s-1BASE256\s0 type. .PP This information originally from . .PP Let \f(CW\*(C`P\*(C'\fR the number of data \f(CW\*(C`CW\*(C'\fRs from the beginning of datas (\f(CW\*(C`CW\*(C'\fR = code word). Let \f(CW\*(C`R\*(C'\fR be a pseudo random number, \f(CW\*(C`V\*(C'\fR the base 256 \f(CW\*(C`CW\*(C'\fR value and \f(CW\*(C`CW\*(C'\fR the required \f(CW\*(C`CW\*(C'\fR. .PP .Vb 2 \& R = ((149 * P) MOD 255) + 1 \& CW = (V + R) MOD 256 .Ve .SS "hexary (src)" .IX Subsection "hexary (src)" Return a string representation of the input hexadecimal number. .SS "EncodeBASE256 (i, hint, src, stat, res, flag)" .IX Subsection "EncodeBASE256 (i, hint, src, stat, res, flag)" Encode the message as \s-1BASE256.\s0 .SS "GenData (ai)" .IX Subsection "GenData (ai)" Generate and return the data for the DataMatrix bitmap from the input array. .SS "FillBorder (ai, i, j, k, l)" .IX Subsection "FillBorder (ai, i, j, k, l)" Fill the border of the \s-1ECC200\s0 data matrix bitmap. .SS "FillCharData (ncol, nrow, array)" .IX Subsection "FillCharData (ncol, nrow, array)" Fill the data matrix with the character data in the given message array.