Moxa Technologies C360 Computer Hardware User Manual


 
For UNIX Users Chapter 4
27
2. MOBUFED
This function let user know the byte count queued in output buffer
when this function is issued.
#define MOBUFED 0x402
int count; /* number of bytes queued in the output buffer */
ioctl(moxa_fd, MOBUFED, &count);
3. MTCRTS
This function, only valid when hardware flow control is turned off
(see MHWFLOW), is used to drive RTS on or off.
#define MTCRTS 0x403
#define TurnON 1
#define TurnOFF 0
ioctl(moxa_fd, MTCRTS, TurnON);
ioctl(moxa_fd, MTCRTS, TurnOFF);
4. MTCDTR
This function is used to DTR on or off.
#define MTCDTR 0x404
#define TurnON 1
#define TurnOFF 0
ioctl(moxa_fd, MTCDTR, TurnON);
ioctl(moxa_fd, MTCDTR, TurnOFF);
5. MSTATUS
This function is used to know the RS-232 line status(CTS/DSR/DCD).