User`s manual

Serial Programming Tools
Intellio C320Turbo/PCI User's Manual 4-9
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 <sys/stropts.h>
#include <sys/sysmacros.h>
#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*/
/* bit0CTS (1:on, 0:off)*/
/* bit1DSR (1:on, 0:off)*/
/* bit2DCD (1:on, 0:off)*/
ioctl(moxa_fd, MSTATUS, &status);
Syntax for UNIX SVR4
#define MSTATUS 0x407
#include <sys/stropts.h>
#include <sys/sysmacros.h>
struct strioctl ioc;
int status; /* status = RS-232 line status*/
/* bit0CTS (1:on, 0:off)*/
/* bit1DSR (1:on, 0:off)*/
/* bit2DCD (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);