Class QREncoderMatrix
Inheritance
System.Object
MatrixBase<System.Byte>
Matrix2DBase<System.Byte>
Matrix2D<System.Byte>
QREncoderMatrix
Implements
System.Collections.Generic.IEnumerable<System.Byte>
System.Collections.IEnumerable
Inherited Members
System.Object.Equals(System.Object, System.Object)
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
Namespace: Azos.Media.TagCodes.QR
Assembly: Azos.Media.dll
Syntax
public class QREncoderMatrix : QRMatrix, IEnumerable<byte>, IEnumerable, IEquatable<MatrixBase<byte>>
Fields
Content
Declaration
public readonly string Content
Field Value
Type | Description |
---|---|
System.String |
CorrectionLevel
Declaration
public readonly QRCorrectionLevel CorrectionLevel
Field Value
Type | Description |
---|---|
QRCorrectionLevel |
DEFAULT_ENCODING
Declaration
public const string DEFAULT_ENCODING = "ISO-8859-1"
Field Value
Type | Description |
---|---|
System.String |
Properties
MaskPattern
Declaration
public int MaskPattern { get; }
Property Value
Type | Description |
---|---|
System.Int32 |
Mode
Declaration
public QRMode Mode { get; }
Property Value
Type | Description |
---|---|
QRMode |
Version
Declaration
public QRVersion Version { get; }
Property Value
Type | Description |
---|---|
QRVersion |
Methods
Append8BitBytes(String, BitList)
Declaration
public static void Append8BitBytes(string content, BitList bits)
Parameters
Type | Name | Description |
---|---|---|
System.String | content | |
BitList | bits |
AppendAlphanumericBytes(String, BitList)
Declaration
public static void AppendAlphanumericBytes(string content, BitList bits)
Parameters
Type | Name | Description |
---|---|---|
System.String | content | |
BitList | bits |
AppendBytes(String, QRMode, BitList)
Declaration
public static void AppendBytes(string content, QRMode mode, BitList bits)
Parameters
Type | Name | Description |
---|---|---|
System.String | content | |
QRMode | mode | |
BitList | bits |
AppendLengthInfo(Int32, QRVersion, QRMode, BitList)
Declaration
public static void AppendLengthInfo(int numLetters, QRVersion version, QRMode mode, BitList bits)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | numLetters | |
QRVersion | version | |
QRMode | mode | |
BitList | bits |
AppendNumericBytes(String, BitList)
Declaration
public static void AppendNumericBytes(string content, BitList bits)
Parameters
Type | Name | Description |
---|---|---|
System.String | content | |
BitList | bits |
CreateMatrix(String, QRCorrectionLevel)
Declaration
public static QREncoderMatrix CreateMatrix(string content, QRCorrectionLevel correctionLevel)
Parameters
Type | Name | Description |
---|---|---|
System.String | content | |
QRCorrectionLevel | correctionLevel |
Returns
Type | Description |
---|---|
QREncoderMatrix |
Encode(String, QRCorrectionLevel)
Declaration
public static QREncoderMatrix Encode(string content, QRCorrectionLevel correctionLevel)
Parameters
Type | Name | Description |
---|---|---|
System.String | content | |
QRCorrectionLevel | correctionLevel |
Returns
Type | Description |
---|---|
QREncoderMatrix |
GetCorrectionBytes(Byte[], Int32)
Declaration
public static byte[] GetCorrectionBytes(byte[] dataBytes, int numEcBytesInBlock)
Parameters
Type | Name | Description |
---|---|---|
System.Byte[] | dataBytes | |
System.Int32 | numEcBytesInBlock |
Returns
Type | Description |
---|---|
System.Byte[] |
GetNumDataBytesAndNumCorrectionBytesByBlockID(Int32, Int32, Int32, Int32, Int32[], Int32[])
According to JISX0510:2004 (p.30) tbl 12 in 8.5.1 Calculate data and correction bytes for block
Declaration
public static void GetNumDataBytesAndNumCorrectionBytesByBlockID(int numTotalBytes, int numDataBytes, int numRSBlocks, int blockID, int[] numDataBytesInBlock, int[] numECBytesInBlock)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | numTotalBytes | Total bytes count |
System.Int32 | numDataBytes | Data bytes count |
System.Int32 | numRSBlocks | Reed/Solomon blocks count |
System.Int32 | blockID | Block Id |
System.Int32[] | numDataBytesInBlock | Data bytes count in this block |
System.Int32[] | numECBytesInBlock | Correction bytes count in this block |
MixWithCorrectionBytes(BitList, Int32, Int32, Int32)
According to JISX0510:2004 8.6 p.37 bits are mixed mixes with their correction bytes.
Declaration
public static BitList MixWithCorrectionBytes(BitList bits, int numTotalBytes, int numDataBytes, int rsBlocksQty)
Parameters
Type | Name | Description |
---|---|---|
BitList | bits | Data bits |
System.Int32 | numTotalBytes | Total bytes count |
System.Int32 | numDataBytes | Data bytes count |
System.Int32 | rsBlocksQty | Reed/Solomon blocks count |
Returns
Type | Description |
---|---|
BitList | Mixed bits |
ToString()
Declaration
public override string ToString()
Returns
Type | Description |
---|---|
System.String |
Overrides
WriteTerminationSection(Int32, BitList)
Write termination section according 8.4.8 and 8.4.9 of JISX0510:2004 (p.24).
Declaration
public static void WriteTerminationSection(int dataBytesQty, BitList bits)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | dataBytesQty | |
BitList | bits |
Implements
System.Collections.Generic.IEnumerable<T>
System.Collections.IEnumerable
System.IEquatable<T>