Data field, Frame edc – MagTek MCP User Manual

Page 11

Advertising
background image

Section 2. Transport Frame Format


5

DATA FIELD

The data field can be 0 – 65535 bytes in length. The contents of the data field depend on the
frame type. R-frames do not use this field. S-frames use this field to carry information that is
specific to the S-frame command. I-frames use this field to carry information that is transparent
to this protocol. Details of this I-frame information are contained in the devices command
reference manual.

FRAME EDC

The frame error detection code (EDC) is used to detect errors in a block. It is calculated from all
bytes in the block starting from the first byte of the frame header and ending at the last byte of
the blocks data field.

The frame EDC can be one of three types:

1) None – With this type, message integrity is not checked at all. It should only be used for data

that can handle errors such as printer data. When using this EDC type the EDC field is
omitted.


2) LRC (Longitudinal Redundancy Check) – This EDC type insures, with a high probability,

that the message has no errors. This EDC is calculated using a bitwise exclusive or. This
EDC field is 1 byte long.


3) CRC (Cyclic Redundancy Check) – This EDC type insures, with a very high probability, that

the message has no errors. This EDC is calculated according to the rules specified in
ISO/IEC 3309. This EDC field is 2 bytes long with MSB first.


All R-frames and S-frames use EDC type LRC. I-frames can use any of the three EDC types.
The PCB in the frame header of the block designates the type of EDC to use.

Advertising