Moxa Technologies Moxa Smartio C168H Manuel d'utilisateur Page 64

  • Télécharger
  • Ajouter à mon manuel
  • Imprimer
  • Page
    / 102
  • Table des matières
  • DEPANNAGE
  • MARQUE LIVRES
  • Noté. / 5. Basé sur avis des utilisateurs
Vue de la page 63
4-6 Smartio C168H/HS User’s Manual
UNIX
Programming the MOXA Ports
The system calls that apply to standard tty port can also be applied to MOXA port
since MOXA port conforms to UNIX tty standard. System calls are like open(),
ioctl(), read(), write(), close(), etc. Please refer to your UNIX Programmer's
Reference manual.
However, these system services only provide limited functions and thus may not
satisfy the sophisticated programmers' need. In order to meet the user's special
purpose, MOXA supports extended services through ioctl() command, which are:
1. MIBUFED (= 0x401) To get byte count in input buffer.
2. MOBUFED (= 0x402) To get byte count in output buffer.
3. MTCRTS (= 0x403) To control RTS output signal.
4. MTCDTR (= 0x404) To control DTR output signal.
5. MLOWATER (= 0x405) To set output buffer low water level.
6. MSTATUS (= 0x407) To read modem line status (CTS/DSR/DCD).
7.MHWFLOW (= 0x40e) To enable/disable the hardware flow control.
The next Section details all the commands.
Extended UNIX Ioctl() Commands
The following lists the syntax of MOXA extended functions for both non-SVR4.x
and SVR4.x UNIX. The variable moxa_fd is the returned file descriptor by open() a
specific MOXA port. For example,
int moxa_fd;
moxa_fd = open(“/dev/ttye11”,O_RDWR);
1. MIBUFED
This function let you know how many bytes queued in input buffer when this
function is issued.
Vue de la page 63
1 2 ... 59 60 61 62 63 64 65 66 67 68 69 ... 101 102

Commentaires sur ces manuels

Pas de commentaire