Moxa Technologies C168HS Computer Hardware User Manual


 
4-10 Smartio C168H/HS User’s Manual
until the output buffer has 'enough space' again. The criteria to tell if the output
buffer has 'enough space' is whether the output buffer reached its 'low water' level.
That
is the output buffer will accept further data only when the 'low water' level is reached.
If the 'low water' value is relatively small, you may find that the output buffer
become empty before you write another block of data (this is quite possible because
UNIX is time-sharing multitasking environment). This will result in discontinuous
data transmission. In a timeout-sensitive application, e.g. facsimile (FAX)
transmission, discontinuous data may falter the operation.
The default 'low water' is 512 bytes. You can enlarge it but better not exceed one
half of the output buffer. Each port's output buffer is 32K bytes.
Syntax for SCO UNIX/OpenServer
#define MLOWATER 0x405
int lowater; /* low water value of output buffer
(default = 512 bytes) */
ioctl(moxa_fd, MLOWATER, lowater);
Syntax for UNIX SVR4.2
#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).