ACC Programmer's Reference Guide

164 Chapter4
ZCOM C I/F Library Routines
ZCNTL (3X)
For any i960 4-channel ACC card:
Data structure: ztrq2_type
Must set RTYP bit = 1. This usually means setting the ztrq2_type.tmreqt field
to 0x80.
Theterminaltyperelatesaprotocoltothespecificterminal(the
device name in a TTGEN configuration file maps to a terminal type
for each terminal). The terminal port must be the same as the
original port. To move a terminal from one port to another, use
zconfig(3X). The special terminal configuration is protocol dependent,
and corresponds to the field spec_cfg of the physical terminal table
(see zptt_type in /opt/acc/include/zcom/zcomsys.h). Currently, a
maximum of 6-byte is allowed. Configuration data larger than this is
silently truncated.
4. The tag parameters (mhp->mid.mtagw1 and mtagw2) may be used in
zcntl for identifying the origin of a response when returned from
zread(3X). They may al so contain codes i ndicating the specific action
tobetakenoncompletionoftherequest.
RETURN VALUE Routine zcntl returns 0 if successful. Otherwise, a non-zero error code is
returned. See / opt/acc/include/zcom/zcomsys.h for the lis t of ZCOM
error codes and their meanings.
If mode 8isusedandzcntl returns with zero, rstat contains the return
status: 0 means successful, a non-zero valuemeanstherewasa
problem with the control request. zcomstatus(3X) may be used to retrieve
a status message, using rcode and rstat.
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
0 RTYP Ext. Req. Type Terminal Type
2 Port Number Subchannel Number
4 Group Poll Code Device Poll Code
6 Group Select Code Device Poll Code
8 Terminal Option Word
10 Special Terminal Configuration
(Variable Length, max. 6 bytes)