beautypg.com

Description – MagTek 99875125 User Manual

Page 38

background image

MagTek Device Drivers for Windows


30

• Property names specified in format rules are 11 characters or less, consisting of alphabetic

characters, digits, and ‘_’. The property name begins with an alphabetic character.

• Properties used in format strings do not conflict with properties defined by the driver. If

there is a duplicate property (e.g., dev_version) specified in the format strings, the driver will
return the value of the parsed property rather than the device version string.

• Magnetic stripe formats are comprised of the following types of fields.

Format Code

– One or two characters specifying the format

of the data to follow

Field Separator

– Used to delimit fields of data

Fixed-Size

– Data field which is fixed-length

Variable-Size

– Data field which is variable-length and is

terminated by a field separator

Optional

– The data is either a fixed-size field or a field

separator (if the field is not present)


DESCRIPTION

The MTD driver supports up to 8 different card formats. Each format consists of a name, a
template, and a set of rules. There may be multiple rules for a single template, but there can only
be one template per format name. The name identifies the format. The template provides a
high-level format to which the data is to be compared so as to determine if the rules for the
format in question should be applied. The rules are specific format strings that specify how to
parse the data and the properties into which the parsed data is to be stored.

When the driver applies a format, it will make that knowledge available to an application through
a property which can be retrieved with the /get command.

The driver may be parameterized with the formats via values in the device’s software key in the
registry. The following REG_SZ registry values are supported where x is a number 1-8.

fmtx_name

name for format

fmtx_template format template
fmtx_rules

one or more comma-delimited rules


When the driver receives data from the device, it attempts to match the incoming data to one of
the templates. If a template matches, the driver attempts to parse the data using one of the rules
corresponding to the matched template. It sequentially attempts to apply each rule in the order
that it appears in the fmtx_rules property. If the driver cannot apply any of the rules, the driver
attempts to match the data to the next template and apply its rules until it either successfully
applies a rule or runs out of templates.