Envoy Application Programming Manual

Table Of Contents
BISYNC Point-To-Point Protocol
Envoy Application Programming Manual427159-001
3-15
ID Exchange
ID Exchange
When performing an ID exchange, the application process must format the ID in its
buffer by appending the appropriate control characters:
An ID exchange message from the caller is indicated by a message having the
following form:
message = ID—ENQ
(message length = 1 + ID length)
An ID exchange message from the called station is indicated by a message having
the following form:
message = ID—ACK0 (caller’s ID okay)
message = ID—WACK (caller’s ID okay, wait before sending)
(message length = 2 + ID length)
ACK0 = DLE ,
"0" (DLE = %020)
WACK = DLE , ";"
message = ID—NAK (caller’s ID not okay)
(message length = 1 + ID length)
An ID consists of up to 16 noncontrol characters.
BCC Calculation
Block-check characters (BCCs) are computed by Envoy using the Consultative
Committee International Telephone and Telegraph (CCITT) polynomial, the cyclic
redundancy check (CRC-16) polynomial, or the longitudinal redundancy check (LRC).
Envoy adds BCC on output and checks BCC on input for messages that start with an
SOH or an STX and that end with an ETB or an ETX. Normally, only the characters
after the initial SOH or STX are included in the BCC calculation; the SOH and STX
characters themselves are excluded from the BCC calculation for most protocols.
SWIFT Variant of BCC
The SWIFT variant of BCC includes the initial STX characters (after a block starting
with SOH) in the BCC calculation. Therefore, a specific message format must be
followed when using SWIFT communication:
Single block:
SOH—head—STX—text—ETX
Multiple blocks:
SOH—head—STX—text—ETB (initial block)
STX—text—ETB (intermediate blocks)
STX—text—ETX (final block)