Envoy Application Programming Manual

Table Of Contents
File-System Procedures
Envoy Application Programming Manual427159-001
C-26
SETMODE
Examples
CALL READ (fnum,in^buffer,102);
fnum is the name of the one-word integer variable specified in the OPEN call that
opened the particular communications line. in^buffer is the name of the integer
array in the application program where the received data is placed. The read count of
102 specifies an incoming message containing up to 100 bytes of data (this count also
includes the two-byte MCW is expected to be received).
CALL READ (fnum,in^buffer,102,in^count);
This example is the same as the preceding one except that the READ call includes
in^count, which is an integer variable into which Envoy places a value specifying
how many bytes were actually deposited into the application buffer. If the maximum
message size was received, then in^count is set to 102. If, however, the incoming
message contained only 50 bytes of data, then in^count is set to 52.
SETMODE
A call to the SETMODE procedure defines one or more line characteristics such as the
line type (point-to-point switched, point-to-point nonswitched, or multipoint), the station
type (primary, secondary, supervisor, or tributary), the block size, the number of retries,
and the timeout duration.
The form of the SETMODE procedure is:
filenum input
INT:value
is the number returned by the OPEN call that opened the line. In a SETMODE call,
you supply this variable to Envoy.
function input
INT:value
is an integer value you use to specify the desired SETMODE function to Envoy. The
SETMODE codes are summarized in Table C-5
on page C-27. They are also listed
in the protocol sections (Sections 4 through 11).
CALL SETMODE ( filenum !i
, function !i
, parameter-1 !i
, parameter-2 !i
,[ last-params ] ); !o
Note. The function codes and parameter settings may have different meanings for
different protocols.