Tyco Electronics 1525l Car Video System User Manual


 
MagTek Device Drivers for Windows
108
A format rule describes how the data is to be parsed. Characters that must be matched as literals
are placed as is in the string or preceded with a ‘\’ if the character is one of the following: ‘[’, ‘]’,
‘(’, ‘)’, ‘*’, ‘_’, ‘<’, ‘>’, ‘:’, ‘.’, or ‘\’. Fields that are either to be parsed or ignored are contained
within <>. The format rules string cannot exceed 1027 characters. The following is an example
for retrieving the customer name and account number from track 1:
{%B<acct_no>^<cust_name>^<*>?}
The ‘%’ specifies the start sentinel and ‘B’ specifies a format ID for the track. These two
characters must be matched for the remainder of the rule to be executed. <acct_no> specifies
that all data up to the following ‘^’ should be stored in a property named “acct_no”.
<cust_name> specifies that all data up to ‘^’ should be stored in a property named “cust_name”.
<*> specifies that the remainder of the track data up to ‘?’ should be ignored.
The following table describes the procedure for specifying fields. Remember that property
names can have a maximum of 11 characters.
Note
If there is a property specified more than once in a rule, the last
successful match will be saved in the property. The driver will
ignore previous matches and the value will not be compared to the
previously saved value for consistency.
Field Type Example Description
Variable size field <acct_no> All data up to the next field separator or
end sentinel is stored in a property named
“acct_no”.
Fixed size field <exp_date[n]> Store the next n characters in a property
named “exp_date”.
Variable size field
with limit
<cust_name[x..y]> Store at least x characters and at most y
characters up to the next field separator or
end sentinel into property named
“cust_name”.
Variable size
(ignore)
<*> Ignore all characters up to the next
character specified in the format string
(usually a field separator) or the end
sentinel character (?).
Fixed size (ignore) <*[n]> Ignore the next n bytes.
Variable size with
limit (ignore)
<*[x..y]> Ignore at least x characters and at most y
characters up to the next literal found.