Documentation

Mode
in package

FinalYes

Data mode information - ISO 18004:2006, 6.4.1, Tables 2 and 3

Table of Contents

Constants

ALPHANUM  = 0b10
BYTE  = 0b100
ECI  = 0b111
FNC1_FIRST  = 0b101
FNC1_SECOND  = 0b1001
HANZI  = 0b1101
INTERFACES  = [self::NUMBER => \chillerlan\QRCode\Data\Number::class, self::ALPHANUM => \chillerlan\QRCode\Data\AlphaNum::class, self::KANJI => \chillerlan\QRCode\Data\Kanji::class, self::HANZI => \chillerlan\QRCode\Data\Hanzi::class, self::BYTE => \chillerlan\QRCode\Data\Byte::class]
Map of data mode => interface (detection order)
KANJI  = 0b1000
LENGTH_BITS  = [self::NUMBER => [10, 12, 14], self::ALPHANUM => [9, 11, 13], self::BYTE => [8, 16, 16], self::KANJI => [8, 10, 12], self::HANZI => [8, 10, 12], self::ECI => [0, 0, 0]]
mode length bits for the version breakpoints 1-9, 10-26 and 27-40
NUMBER  = 0b1
STRCTURED_APPEND  = 0b11
TERMINATOR  = 0b0

Methods

getLengthBitsForVersion()  : int
returns the length bits for the version breakpoints 1-9, 10-26 and 27-40

Constants

ALPHANUM

public int ALPHANUM = 0b10

BYTE

public int BYTE = 0b100

ECI

public int ECI = 0b111

FNC1_FIRST

public int FNC1_FIRST = 0b101

FNC1_SECOND

public int FNC1_SECOND = 0b1001

HANZI

public int HANZI = 0b1101

INTERFACES

Map of data mode => interface (detection order)

public array<int, QRDataModeInterface|string> INTERFACES = [self::NUMBER => \chillerlan\QRCode\Data\Number::class, self::ALPHANUM => \chillerlan\QRCode\Data\AlphaNum::class, self::KANJI => \chillerlan\QRCode\Data\Kanji::class, self::HANZI => \chillerlan\QRCode\Data\Hanzi::class, self::BYTE => \chillerlan\QRCode\Data\Byte::class]

KANJI

public int KANJI = 0b1000

LENGTH_BITS

mode length bits for the version breakpoints 1-9, 10-26 and 27-40

public mixed LENGTH_BITS = [self::NUMBER => [10, 12, 14], self::ALPHANUM => [9, 11, 13], self::BYTE => [8, 16, 16], self::KANJI => [8, 10, 12], self::HANZI => [8, 10, 12], self::ECI => [0, 0, 0]]

ISO/IEC 18004:2000 Table 3 - Number of bits in Character Count Indicator

NUMBER

public int NUMBER = 0b1

STRCTURED_APPEND

public int STRCTURED_APPEND = 0b11

TERMINATOR

public int TERMINATOR = 0b0

Methods

getLengthBitsForVersion()

returns the length bits for the version breakpoints 1-9, 10-26 and 27-40

public static getLengthBitsForVersion(int $mode, int $version) : int
Parameters
$mode : int
$version : int
Tags
throws
QRCodeException
Return values
int

        
On this page

Search results