September, 99
TTPM2 Installation and Programming Manual
35
5.4.2 Checksum
To ensure correct reception of the message to be magnetically encoded, a checksum can
be appended to the data by the host computer. This checksum will then be compared by
the TTPM2 before encoding which guarantees that the magnetic code data is correctly
received.
1. Calculate the checksum as the modulo 2 sum (consecutive XOR) of the ASCII data
bytes sent in the !M command. The checksum must have bit 7 set to 1 to distinguish it
from ordinary data.
2. Append the checksum at the end of the !M data string when encoding ISO data at
track 2 (or centre track).
3. When the message has been received, the TTPM2 calculates the checksum and
compares it to the checksum appended to the message. If they are identical, an ACK
is returned, otherwise a NAK followed by the checksum calculated by the TTPM2 will
be returned.
The checksum is never encoded on the magnetic strip, it is only intended to secure data
transmission. The ISO format itself automatically adds a check digit to the magnetic code
5.4.3
Reading and decoding
!D
Reads and decodes ISO format data from ISO track position 2 (or center track) of a
ticket in active position, and transmits the data to the host computer. The command
then returns the ticket to active position.
!D1 Reads and decodes ISO format data from track 1 of a ticket in active position and
transmits the data to the host computer. The command then returns the ticket to ac-
tive position.
!D3 Reads, decodes, and transmits ISO track 3 position data
!O Reads and transmits bit-by-bit data, from ISO track position 2 (or center track) of a
ticket in the active position, to the host computer. The command then returns the
ticket to active position. No decoding takes place in the TTPM2.
5.4.4
Magnetic encoding attributes
1
The magnetic encoding data strings can be given attributes that govern versions of the
standard encode/read-after-write routines and cancellation functions.
The following attributes, inserted anywhere in the applicable data strings, will cause the
following functional deviations from default standards:
NOTE – The attributes in parenthesis only work for the !M command
{ (or *)
Cancels the read-after-write function. The ticket is encoded and directly trans-
ported forwards for separation (if applicable) and subsequent printing according
to the !F command data without prior read-after-write.
| (or $)
Encodes the ticket, performs read-after-write, but does not transport the ticket
for printing. Instead, the ticket is backed into the active position without being
cut, waiting for the command to proceed, for instance, for a decode operation.
1
{, | and } was introduced in firmware version 3.2