Mstatus – Moxa Technologies INTELLIO C218 User Manual
Page 64

4-10
Intellio C218Turbo /PCI User's Manual
Syntax for SCO UNIX/XENIX
#define MLOWATER
0x405
int
lowater; /* low water value of output buffer (default = 512 bytes) */
ioctl(moxa_fd, MLOWATER, lowater);
Syntax for UNIX SVR4
#include
#include
#define MLOWATER
0x405
struct strioctl
ioc;
int lowater; /* low water value of output buffer (default = 512 bytes) */
ioc.ic_cmd = MLOWATER;
ioc.ic_timout = 0;
ioc.ic_len = sizeof(int);
ioc.ic_dp = (char *)&lowater;
ioctl(moxa_fd, I_STR, &ioc);
6. MSTATUS
This function is used to know the RS-232 line status (CTS/DSR/DCD).
Syntax for SCO UNIX/XENIX
#define MSTATUS 0x407
int
status; /* status = RS-232 line status */
/* bit0¡Ð
CTS (1:on, 0:off)
*/
/* bit1¡Ð
DSR (1:on, 0:off)
*/
/* bit2¡Ð
DCD (1:on, 0:off)
*/
ioctl(moxa_fd, MSTATUS, &status);
Syntax for UNIX SVR4
#define MSTATUS
0x407
#include
#include
struct strioctl
ioc;
int
status; /* status = RS-232 line status */
/* bit0¡Ð
CTS (1:on, 0:off)
*/
/* bit1¡Ð
DSR (1:on, 0:off)
*/
/* bit2¡Ð
DCD (1:on, 0:off)
*/
ioc.ic_cmd = MSTATUS;
ioc.ic_timout = 0;
ioc.ic_len = sizeof(int);
ioc.ic_dp = (char *)&status;
ioctl(moxa_fd, I_STR, &ioc);