Envoy ACP/XF Application Programming Manual
Normal Response Mode (NRM) Protocols
EnvoyACP/XF Application Programming Manual–132179
3-17
Message Control Word (MCW)
Message Control Word (MCW)
Your application must place an MCW into the first two bytes of its buffer:
For details, see the READ[X] Procedure
on page 4-10 and WRITE[X] Procedure on
page 4-19.
If you are not sending data, the WRITE call references a two-byte buffer containing only
the MCW. Each WRITE call transmitting an information field completes when the
remote station acknowledges the successful receipt of the frame; WRITE calls that send
only an SDLC or ADCCP command/response complete when the frame is transmitted.
EnvoyACP/XF automatically sets the P/F bit when the number of WRITE requests
reaches the window size.
Accepting Incoming Frames
Each READ call accepts one incoming frame. You normally use the READ procedure to
accept incoming I-frames or to initiate a poll. A READ request, however, also completes
on certain incoming SDLC or ADCCP commands/responses, as well as on incoming
unnumbered frames containing data. In a READ call, you supply the name of an
application buffer that will receive the incoming control information and/or data, and a
count parameter specifying the size of the buffer, in octets.
As for the WRITE buffer, the READ buffer contains the MCW in the first two bytes.
The first MCW byte specifies what kind of frame was sent, whether the frame contains
an I-field, and whether the P/F bit is set. In a multipoint environment, the second MCW
byte contains an entry number referring to an entry in the DEFINELIST station-address
list. A READ call completes after the associated READ buffer receives and records an
entire frame.
When issued from within a multipoint supervisor application, a READ call initiates the
polling of all defined tributary stations if no received frames or WRITE requests are
currently queued.
Queuing I/O Requests
The WRITEREAD procedure initiates two I/O requests: a WRITE request followed by a
READ request. Both operations use the same application buffer. The READ request is
queued when the WRITE request completes.
If you issue a separate READ request after a WRITEREAD but before the WRITE
portion of the WRITEREAD procedure completes, the separate READ request can
complete before the READ portion of the WRITEREAD. To avoid the latter situation,
Point-to-point
environment
Generally, set the MCW to 0. However, you can use the first byte of
the MCW to specify some of the less-frequently used U-frame
command/responses (UI, UP, XID, TEST, and NonReserved).
Always set the second byte to 0 for point-to-point configurations.
Multipoint
environment
Use the second MCW byte to specify a station index that refers to a
tributary previously specified in the DEFINELIST station address
list.