ZCOM C I/F Library Routines
ZCNTL (3X)
ibuf, len If rcode=ZCOM_MRQCODE_CNTWR, ibuf contains the control data for the protocol, and len indicates the length of the control data. If rcode=ZCOM_MRQCODE_TERM, ibuf contains the configuration data for the terminal as described below, and the len indicates the total length of the configuration data. For other values of rcode, ibuf and len are not used.
rstat | Return status. Only used for requests issued with ‘wait’, i.e. mode = | ||
(Return | ZMODE_WAIT. NULL may be used if the return status is not required. | ||
Param) |
|
|
|
NOTES | 1. File /opt/acc/include/zcom/zcomsys.h contains the symbolic names | ||
| for rcode (not all of them are applicable to zcntl): | ||
| /* Message request code values applicable to zcntl() */ | ||
| #define ZCOM_MRQCODE_CNTWR | 3 | /* Terminal write */ |
| #define ZCOM_MRQCODE_STATUS | 5 | /* Unsolicited status change */ |
| #define ZCOM_MRQCODE_TERM | 6 | /* Set terminal parameters */ |
| #define ZCOM_MRQCODE_ENB | 7 | /* Terminal enable */ |
| #define ZCOM_MRQCODE_DSB | 8 | /* Terminal disable */ |
| #define ZCOM_MRQCODE_ACT | 9 | /* Terminal activate */ |
| #define ZCOM_MRQCODE_DEA | 10 /* Terminal deactivate */ |
2.The result for a zcntl request is returned in the rstat parameter if mode=8, or may be returned in a response message via zread(3X) if another
3.For rcode=ZCOM_MRQCODE_TERM (Set terminal parameters), the terminal configuration data in ibuf must be set as follows. Refer to /opt/acc/include/zcom/zcomsys.h for these data structures:
For any ACC card except an i960
Data structure: ztrq_type
Must set RTYP bit = 0.
| 15 | 14 | 13 | 12 | 11 | 10 | 9 | 8 | 7 | 6 | 5 | 4 |
| 3 | 2 | 1 | 0 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
0 | RTYP | 0 | Terminal Type |
|
|
| - | - | - | - |
| - | Port # |
| |||
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2 | Group Poll Code |
|
|
|
|
| Device Poll Code |
|
|
|
| ||||||
|
|
|
|
|
|
|
|
|
|
|
| ||||||
4 | Group Select Code |
|
|
|
|
| Device Select Code |
|
|
|
| ||||||
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Chapter 4 | 173 |