
Serial Programming Tools
Smartio C168H/HS User’s Manual 4-9
setting = TurnON /* or TurnOFF */;
ioc.ic_cmd = MTCRTS;
ioc.ic_timout = 0;
ioc.ic_len = sizeof(int);
ioc.ic_dp = (char *)&setting;
ioctl(moxa_fd, I_STR, &ioc);
4. MTCDTR
This function, only valid when hardware flow control is turned off (see
MHWFLOW), is used to drive DTR signal on or off.
Syntax for SCO UNIX/OpenServer
#define MTCDTR 0x404
#define TurnON 1
#define TurnOFF 0
ioctl(moxa_fd, MTCDTR, TurnON);
ioctl(moxa_fd, MTCDTR, TurnOFF);
Syntax for UNIX SVR4.2
#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
Comentarios a estos manuales