Documentation ¶
Index ¶
- Constants
- func EncodeHighLevel(msg string, shape SymbolShapeHint, minSize, maxSize *gozxing.Dimension) ([]byte, error)
- func ErrorCorrection_EncodeECC200(codewords []byte, symbolInfo *SymbolInfo) ([]byte, error)
- func HighLevelEncoder_determineConsecutiveDigitCount(msg []byte, startpos int) int
- func HighLevelEncoder_isDigit(ch byte) bool
- func HighLevelEncoder_isExtendedASCII(ch byte) bool
- func HighLevelEncoder_lookAheadTest(msg []byte, startpos, currentMode int) int
- type ASCIIEncoder
- type Base256Encoder
- type C40Encoder
- type DefaultPlacement
- type EdifactEncoder
- type Encoder
- type EncoderContext
- func (this *EncoderContext) GetCodewordCount() int
- func (this *EncoderContext) GetCodewords() []byte
- func (this *EncoderContext) GetCurrent() byte
- func (this *EncoderContext) GetCurrentChar() byte
- func (this *EncoderContext) GetMessage() []byte
- func (this *EncoderContext) GetNewEncoding() int
- func (this *EncoderContext) GetRemainingCharacters() int
- func (this *EncoderContext) GetSymbolInfo() *SymbolInfo
- func (this *EncoderContext) HasMoreCharacters() bool
- func (this *EncoderContext) ResetEncoderSignal()
- func (this *EncoderContext) ResetSymbolInfo()
- func (this *EncoderContext) SetSizeConstraints(minSize, maxSize *gozxing.Dimension)
- func (this *EncoderContext) SetSkipAtEnd(count int)
- func (this *EncoderContext) SetSymbolShape(shape SymbolShapeHint)
- func (this *EncoderContext) SignalEncoderChange(encoding int)
- func (this *EncoderContext) UpdateSymbolInfo() error
- func (this *EncoderContext) UpdateSymbolInfoByLength(len int) error
- func (this *EncoderContext) WriteCodeword(codeword byte)
- func (this *EncoderContext) WriteCodewords(codewords []byte)
- type SymbolInfo
- func (this *SymbolInfo) GetCodewordCount() int
- func (this *SymbolInfo) GetDataCapacity() int
- func (this *SymbolInfo) GetDataLengthForInterleavedBlock(index int) int
- func (this *SymbolInfo) GetErrorCodewords() int
- func (this *SymbolInfo) GetErrorLengthForInterleavedBlock(index int) int
- func (this *SymbolInfo) GetInterleavedBlockCount() int
- func (this *SymbolInfo) GetMatrixHeight() int
- func (this *SymbolInfo) GetMatrixWidth() int
- func (this *SymbolInfo) GetSymbolDataHeight() int
- func (this *SymbolInfo) GetSymbolDataWidth() int
- func (this *SymbolInfo) GetSymbolHeight() int
- func (this *SymbolInfo) GetSymbolWidth() int
- func (this *SymbolInfo) String() string
- type SymbolShapeHint
- type X12Encoder
Constants ¶
const ( // Padding character HighLevelEncoder_PAD = 129 // mode latch to C40 encodation mode HighLevelEncoder_LATCH_TO_C40 = 230 // mode latch to Base 256 encodation mode HighLevelEncoder_LATCH_TO_BASE256 = 231 // Upper Shift HighLevelEncoder_UPPER_SHIFT = 235 // 05 Macro HighLevelEncoder_MACRO_05 = 236 // 06 Macro HighLevelEncoder_MACRO_06 = 237 // mode latch to ANSI X.12 encodation mode HighLevelEncoder_LATCH_TO_ANSIX12 = 238 // mode latch to Text encodation mode HighLevelEncoder_LATCH_TO_TEXT = 239 // mode latch to EDIFACT encodation mode HighLevelEncoder_LATCH_TO_EDIFACT = 240 // Unlatch from C40 encodation HighLevelEncoder_C40_UNLATCH = 254 // Unlatch from X12 encodation HighLevelEncoder_X12_UNLATCH = 254 // 05 Macro header HighLevelEncoder_MACRO_05_HEADER = "[)>\u001E05\u001D" // 06 Macro header HighLevelEncoder_MACRO_06_HEADER = "[)>\u001E06\u001D" // Macro trailer HighLevelEncoder_MACRO_TRAILER = "\u001E\u0004" HighLevelEncoder_ASCII_ENCODATION = 0 HighLevelEncoder_C40_ENCODATION = 1 HighLevelEncoder_TEXT_ENCODATION = 2 HighLevelEncoder_X12_ENCODATION = 3 HighLevelEncoder_EDIFACT_ENCODATION = 4 HighLevelEncoder_BASE256_ENCODATION = 5 )
const ( SymbolShapeHint_FORCE_NONE = SymbolShapeHint(iota) SymbolShapeHint_FORCE_SQUARE SymbolShapeHint_FORCE_RECTANGLE )
Variables ¶
This section is empty.
Functions ¶
func EncodeHighLevel ¶
func EncodeHighLevel(msg string, shape SymbolShapeHint, minSize, maxSize *gozxing.Dimension) ([]byte, error)
EncodeHighLevel Performs message encoding of a DataMatrix message using the algorithm described in annex P of ISO/IEC 16022:2000(E).
@param msg the message @param shape requested shape. May be {@code SymbolShapeHint.FORCE_NONE},
{@code SymbolShapeHint.FORCE_SQUARE} or {@code SymbolShapeHint.FORCE_RECTANGLE}.
@param minSize the minimum symbol size constraint or null for no constraint @param maxSize the maximum symbol size constraint or null for no constraint @return the encoded message (the char values range from 0 to 255)
func ErrorCorrection_EncodeECC200 ¶
func ErrorCorrection_EncodeECC200(codewords []byte, symbolInfo *SymbolInfo) ([]byte, error)
createECC200 Creates the ECC200 error correction for an encoded message.
@param codewords the codewords @param symbolInfo information about the symbol to be encoded @return the codewords with interleaved error correction.
func HighLevelEncoder_determineConsecutiveDigitCount ¶
determineConsecutiveDigitCount Determines the number of consecutive characters that are encodable using numeric compaction.
@param msg the message @param startpos the start position within the message @return the requested character count
Types ¶
type ASCIIEncoder ¶
type ASCIIEncoder struct{}
type Base256Encoder ¶
type Base256Encoder struct{}
type C40Encoder ¶
type C40Encoder struct {
// contains filtered or unexported fields
}
type DefaultPlacement ¶
type DefaultPlacement struct {
// contains filtered or unexported fields
}
func NewDefaultPlacement ¶
func NewDefaultPlacement(codewords []byte, numcols, numrows int) *DefaultPlacement
func (*DefaultPlacement) GetBit ¶
func (this *DefaultPlacement) GetBit(col, row int) bool
func (*DefaultPlacement) Place ¶
func (this *DefaultPlacement) Place()
type EdifactEncoder ¶
type EdifactEncoder struct{}
type Encoder ¶
type Encoder interface {
// contains filtered or unexported methods
}
func NewASCIIEncoder ¶
func NewASCIIEncoder() Encoder
func NewBase256Encoder ¶
func NewBase256Encoder() Encoder
func NewC40Encoder ¶
func NewC40Encoder() Encoder
func NewEdifactEncoder ¶
func NewEdifactEncoder() Encoder
func NewTextEncoder ¶
func NewTextEncoder() Encoder
func NewX12Encoder ¶
func NewX12Encoder() Encoder
type EncoderContext ¶
type EncoderContext struct {
// contains filtered or unexported fields
}
func NewEncoderContext ¶
func NewEncoderContext(msg string) (*EncoderContext, error)
func (*EncoderContext) GetCodewordCount ¶
func (this *EncoderContext) GetCodewordCount() int
func (*EncoderContext) GetCodewords ¶
func (this *EncoderContext) GetCodewords() []byte
func (*EncoderContext) GetCurrent ¶
func (this *EncoderContext) GetCurrent() byte
func (*EncoderContext) GetCurrentChar ¶
func (this *EncoderContext) GetCurrentChar() byte
func (*EncoderContext) GetMessage ¶
func (this *EncoderContext) GetMessage() []byte
func (*EncoderContext) GetNewEncoding ¶
func (this *EncoderContext) GetNewEncoding() int
func (*EncoderContext) GetRemainingCharacters ¶
func (this *EncoderContext) GetRemainingCharacters() int
func (*EncoderContext) GetSymbolInfo ¶
func (this *EncoderContext) GetSymbolInfo() *SymbolInfo
func (*EncoderContext) HasMoreCharacters ¶
func (this *EncoderContext) HasMoreCharacters() bool
func (*EncoderContext) ResetEncoderSignal ¶
func (this *EncoderContext) ResetEncoderSignal()
func (*EncoderContext) ResetSymbolInfo ¶
func (this *EncoderContext) ResetSymbolInfo()
func (*EncoderContext) SetSizeConstraints ¶
func (this *EncoderContext) SetSizeConstraints(minSize, maxSize *gozxing.Dimension)
func (*EncoderContext) SetSkipAtEnd ¶
func (this *EncoderContext) SetSkipAtEnd(count int)
func (*EncoderContext) SetSymbolShape ¶
func (this *EncoderContext) SetSymbolShape(shape SymbolShapeHint)
func (*EncoderContext) SignalEncoderChange ¶
func (this *EncoderContext) SignalEncoderChange(encoding int)
func (*EncoderContext) UpdateSymbolInfo ¶
func (this *EncoderContext) UpdateSymbolInfo() error
func (*EncoderContext) UpdateSymbolInfoByLength ¶
func (this *EncoderContext) UpdateSymbolInfoByLength(len int) error
func (*EncoderContext) WriteCodeword ¶
func (this *EncoderContext) WriteCodeword(codeword byte)
func (*EncoderContext) WriteCodewords ¶
func (this *EncoderContext) WriteCodewords(codewords []byte)
type SymbolInfo ¶
type SymbolInfo struct {
// contains filtered or unexported fields
}
func NewDataMatrixSymbolInfo144 ¶
func NewDataMatrixSymbolInfo144() *SymbolInfo
func NewSymbolInfo ¶
func NewSymbolInfo(rectangular bool, dataCapacity, errorCodewords, matrixWidth, matrixHeight, dataRegions int) *SymbolInfo
func NewSymbolInfoRS ¶
func NewSymbolInfoRS(rectangular bool, dataCapacity, errorCodewords, matrixWidth, matrixHeight, dataRegions, rsBlockData, rsBlockError int) *SymbolInfo
func SymbolInfo_Lookup ¶
func SymbolInfo_Lookup(dataCodewords int, shape SymbolShapeHint, minSize, maxSize *gozxing.Dimension, fail bool) (*SymbolInfo, error)
func (*SymbolInfo) GetCodewordCount ¶
func (this *SymbolInfo) GetCodewordCount() int
func (*SymbolInfo) GetDataCapacity ¶
func (this *SymbolInfo) GetDataCapacity() int
func (*SymbolInfo) GetDataLengthForInterleavedBlock ¶
func (this *SymbolInfo) GetDataLengthForInterleavedBlock(index int) int
func (*SymbolInfo) GetErrorCodewords ¶
func (this *SymbolInfo) GetErrorCodewords() int
func (*SymbolInfo) GetErrorLengthForInterleavedBlock ¶
func (this *SymbolInfo) GetErrorLengthForInterleavedBlock(index int) int
func (*SymbolInfo) GetInterleavedBlockCount ¶
func (this *SymbolInfo) GetInterleavedBlockCount() int
func (*SymbolInfo) GetMatrixHeight ¶
func (this *SymbolInfo) GetMatrixHeight() int
func (*SymbolInfo) GetMatrixWidth ¶
func (this *SymbolInfo) GetMatrixWidth() int
func (*SymbolInfo) GetSymbolDataHeight ¶
func (this *SymbolInfo) GetSymbolDataHeight() int
func (*SymbolInfo) GetSymbolDataWidth ¶
func (this *SymbolInfo) GetSymbolDataWidth() int
func (*SymbolInfo) GetSymbolHeight ¶
func (this *SymbolInfo) GetSymbolHeight() int
func (*SymbolInfo) GetSymbolWidth ¶
func (this *SymbolInfo) GetSymbolWidth() int
func (*SymbolInfo) String ¶
func (this *SymbolInfo) String() string
type SymbolShapeHint ¶
type SymbolShapeHint int
SymbolShapeHint Enumeration for DataMatrix symbol shape hint. It can be used to force square or rectangular symbols.
type X12Encoder ¶
type X12Encoder struct{}