User`s manual
4-8 Intellio C320Turbo User's Manual
This function, only valid when hardware flow control is turned off (see
MHWFLOW), is used to turn DTR on or off.
Syntax for SCO UNIX/XENIX
#define MTCDTR 0x404
#define TurnON 1
#define TurnOFF 0
ioctl(moxa_fd, MTCDTR, TurnON);
ioctl(moxa_fd, MTCDTR, TurnOFF);
Syntax for SVR4.x UNIX/Solaris x86
#include <sys/stropts.h>
#include <sys/sysmacros.h>
#define MTCDTR 0x404
#define TurnON 1
#define TurnOFF 0
struct strioctl ioc;
int setting;
setting = TurnON /* or TurnOFF */;
ioc.ic_cmd = MTCDTR;
ioc.ic_timout = 0;
ioc.ic_len = sizeof(int);
ioc.ic_dp = (char *)&setting;
ioctl(moxa_fd, I_STR, &ioc);
5. MLOWATER
Sometimes the application software may not be able to write any further data to the
output buffer because of the output buffer being full. The application has to wait
until the output buffer has 'enough space' again. The criteria to tell if the output
buffer has 'enough space' is that 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