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.
Loading...
Searching...
No Matches
dmtxencodeascii.c File Reference

libdmtx - Data Matrix Encoding/Decoding Library Copyright 2011 Mike Laughton. More...

#include <assert.h>
#include "dmtx.h"
#include "dmtxstatic.h"

Go to the source code of this file.

Functions

static void encodeNextChunkAscii (DmtxEncodeStream *stream, int option)
 Simple single scheme encoding uses "Normal" The optimizer needs to track "Expanded" and "Compact" streams separately, so they are called explicitly.
 
static void appendValueAscii (DmtxEncodeStream *stream, DmtxByte value)
 this code is separated from encodeNextChunkAscii() because it needs to be called directly elsewhere
 
static void completeIfDoneAscii (DmtxEncodeStream *stream, int sizeIdxRequest)
 
static void padRemainingInAscii (DmtxEncodeStream *stream, int sizeIdx)
 Can we just receive a length to pad here? I don't like receiving sizeIdxRequest (or sizeIdx) this late in the game.
 
static DmtxByteList encodeTmpRemainingInAscii (DmtxEncodeStream *stream, DmtxByte *storage, int capacity, DmtxPassFail *passFail)
 consider receiving instantiated DmtxByteList instead of the output components
 
static DmtxByte randomize253State (DmtxByte cwValue, int cwPosition)
 Randomize 253 state.
 

Detailed Description

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

ASCII encoding rules

Definition in file dmtxencodeascii.c.

Function Documentation

◆ appendValueAscii()

static void appendValueAscii ( DmtxEncodeStream * stream,
DmtxByte value )
static

this code is separated from encodeNextChunkAscii() because it needs to be called directly elsewhere

Definition at line 95 of file dmtxencodeascii.c.

◆ completeIfDoneAscii()

static void completeIfDoneAscii ( DmtxEncodeStream * stream,
int sizeIdxRequest )
static

Definition at line 108 of file dmtxencodeascii.c.

◆ encodeNextChunkAscii()

static void encodeNextChunkAscii ( DmtxEncodeStream * stream,
int option )
static

Simple single scheme encoding uses "Normal" The optimizer needs to track "Expanded" and "Compact" streams separately, so they are called explicitly.

Normal: Automatically collapses 2 consecutive digits into one codeword Expanded: Uses a whole codeword to represent a digit (never collapses) Compact: Collapses 2 digits into a single codeword or marks the stream invalid if either values are not digits

Parameters
stream
option[Expanded|Compact|Normal]

Definition at line 35 of file dmtxencodeascii.c.

◆ encodeTmpRemainingInAscii()

static DmtxByteList encodeTmpRemainingInAscii ( DmtxEncodeStream * stream,
DmtxByte * storage,
int capacity,
DmtxPassFail * passFail )
static

consider receiving instantiated DmtxByteList instead of the output components

Definition at line 159 of file dmtxencodeascii.c.

◆ padRemainingInAscii()

static void padRemainingInAscii ( DmtxEncodeStream * stream,
int sizeIdx )
static

Can we just receive a length to pad here? I don't like receiving sizeIdxRequest (or sizeIdx) this late in the game.

Definition at line 129 of file dmtxencodeascii.c.

◆ randomize253State()

static DmtxByte randomize253State ( DmtxByte cwValue,
int cwPosition )
static

Randomize 253 state.

Parameters
cwValuecodewordValue
cwPositioncodewordPosition
Returns
Randomized value

Definition at line 204 of file dmtxencodeascii.c.