Elo TouchSystems 1525L User Manual

Page 122

Advertising
background image

Section 4. Magnetic Card Data Parsing


119

Field Type

Example

Description

Literal

^

A literal is placed in the string as is and is
used to determine if a particular format
should be applied and to mark the end of a
variable-length field.

Non-ASCII literal

\r, \n, \\, \xhh

Specify an escape character or non-ASCII
character.

\r

is converted to <CR>

\n

is converted to <LF>

\\

is converted to

\

\xhh

is converted to a character with

ASCII value hh (always two hex
digits).

Optional choice

(x|y|…)

The field specifies a choice where the data
can be either a literal or a property field.
There may be any number of literals
specified but there may not be more than
1 property field, for example
(=|<country_code[3]>). If the character is
a ‘=’, skip it; otherwise store the next
three characters into a property named
“country_code”.

Optional field

[x]

Specifies an optional sequence that may
or may not be present in the data. x may
be one or more literal fields, property
fields, or optional choice fields.

Optional track

{xy}

The data parser will not enforce that the
track be present in the data when
attempting to match the data to the
template or rule. x must be a literal field
or an optional choice field containing a
literal. y may be any sequence of fields
except for another optional track field.


There can be more than one rule specified for a particular format template. The rules should be
placed in a single string enclosed in curly braces (i.e., ‘{’ and ‘}’) and delimited with commas
‘,’. When the driver applies rules for a particular template, it sequentially attempts to apply each
rule in the order it is provided in the fmtx_rules string. For example: “{rule 1},{rule 2},{rule
3}” would cause the driver to first try to apply rule 1. If the incoming data did not match rule 1,
the driver attempts to apply rule 2 followed by rule 3 if rule 2 fails. If no rules can be applied,
the driver attempts to match the incoming data to the next template.

Advertising