libdmtx 0.7.8.7
libdmtx is a software library that enables programs to read and write Data Matrix barcodes of the modern ECC200 variety.
|
libdmtx - Data Matrix Encoding/Decoding Library Copyright 2011 Mike Laughton. More...
Go to the source code of this file.
Macros | |
#define | CHKERR |
#define | CHKSIZE |
#define | CHKPASS |
#define | RETURN_IF_FAIL |
Functions | |
static void | encodeNextChunkCTX (DmtxEncodeStream *stream, int sizeIdxRequest) |
static void | appendValuesCTX (DmtxEncodeStream *stream, DmtxByteList *valueList) |
static void | appendUnlatchCTX (DmtxEncodeStream *stream) |
static void | completeIfDoneCTX (DmtxEncodeStream *stream, int sizeIdxRequest) |
Complete C40/Text/X12 encoding if it matches a known end-of-symbol condition. | |
static void | completePartialC40Text (DmtxEncodeStream *stream, DmtxByteList *valueList, int sizeIdxRequest) |
The remaining values can exist in 3 possible cases: | |
static void | completePartialX12 (DmtxEncodeStream *stream, DmtxByteList *valueList, int sizeIdxRequest) |
Partial chunks are not valid in X12. | |
static DmtxBoolean | partialX12ChunkRemains (DmtxEncodeStream *stream) |
Return DmtxTrue 1 or 2 X12 values remain, otherwise DmtxFalse. | |
static void | pushCTXValues (DmtxByteList *valueList, DmtxByte inputValue, int targetScheme, DmtxPassFail *passFail, int fnc1) |
static DmtxBoolean | isCTX (int scheme) |
static void | shiftValueListBy3 (DmtxByteList *list, DmtxPassFail *passFail) |
libdmtx - Data Matrix Encoding/Decoding Library Copyright 2011 Mike Laughton.
All rights reserved. Copyright 2012-2016 Vadim A. Misbakh-Soloviov. All rights reserved.
See LICENSE file in the main project directory for full terms of use and distribution.
Contact: Vadim A. Misbakh-Soloviov dmtx@.nosp@m.mva..nosp@m.name Mike Laughton mike@.nosp@m.drag.nosp@m.onfly.nosp@m.logi.nosp@m.c.com
C40/Text/X12 encoding rules
Definition in file dmtxencodec40textx12.c.
#define CHKERR |
Definition at line 23 of file dmtxencodec40textx12.c.
#define CHKPASS |
Definition at line 40 of file dmtxencodec40textx12.c.
#define CHKSIZE |
Definition at line 31 of file dmtxencodec40textx12.c.
#define RETURN_IF_FAIL |
Definition at line 49 of file dmtxencodec40textx12.c.
|
static |
Definition at line 175 of file dmtxencodec40textx12.c.
|
static |
Definition at line 141 of file dmtxencodec40textx12.c.
|
static |
Complete C40/Text/X12 encoding if it matches a known end-of-symbol condition.
Term Trip Symbol Codeword Cond Size Remain Sequence
(a) 3 2 Special case
Definition at line 203 of file dmtxencodec40textx12.c.
|
static |
The remaining values can exist in 3 possible cases:
a) 1 C40/Text/X12 remaining == 1 data b) 2 C40/Text/X12 remaining == 1 shift + 1 data c) 2 C40/Text/X12 remaining == 1 data + 1 data
To distinguish between cases (b) and (c), encode the final input value to C40/Text/X12 in a temporary location and check the resulting length. If it expands to multiple values it represents (b); otherwise it is (c). This accounts for both shift and upper shift conditions.
Note that in cases (a) and (c) the final C40/Text/X12 value encoded in the previous chunk may have been a shift value, but this will be ignored by the decoder due to the implicit shift to ASCII. <– what if symbol is much larger though?
Term Value Symbol Codeword Cond Count Remain Sequence
(b) C40 2 2 C40+C40+0 (d) ASCII 1 1 ASCII (implicit unlatch) (c) ASCII 1 2 UNLATCH ASCII
Definition at line 252 of file dmtxencodec40textx12.c.
|
static |
Partial chunks are not valid in X12.
Encode using ASCII instead, using an implied unlatch if there is exactly one ascii codeword and one symbol codeword remaining. Otherwise use explicit unlatch.
Definition at line 345 of file dmtxencodec40textx12.c.
|
static |
Definition at line 59 of file dmtxencodec40textx12.c.
|
static |
Definition at line 562 of file dmtxencodec40textx12.c.
|
static |
Return DmtxTrue 1 or 2 X12 values remain, otherwise DmtxFalse.
Definition at line 405 of file dmtxencodec40textx12.c.
|
static |
Definition at line 450 of file dmtxencodec40textx12.c.
|
static |
Definition at line 579 of file dmtxencodec40textx12.c.