Moxa Technologies C360 Manuel d'utilisateur Page 37

  • Télécharger
  • Ajouter à mon manuel
  • Imprimer
  • Page
    / 55
  • Table des matières
  • DEPANNAGE
  • MARQUE LIVRES
  • Noté. / 5. Basé sur avis des utilisateurs
Vue de la page 36
For UNIX Users Chapter 4
31
int sio_read(int port, char *buf, int len)
return = >0 length of data received
0 no data received
-1 bad port
-2 time out
-5 port is not open
port = port number
buf = receive buffer pointer with required space
len = buffer length
4. Write a string of data to Tx buffer.
int sio_write(int port, char *buf, int len)
return = >0 length of data transmitted to Tx buffer
=0 buffer full
-1 bad port
-2 time out
-5 port is not open
port = port number
buf = transmit string pointer
len = transmit string length
5. Put a block of data to Tx buffer. If the Tx buffer free space is
smaller than block length, it will return zero.
int sio_putb(int port, char *buf, int len)
return = >0 length of data transmitted to Tx buffer
0 free buffer not enough
-1 bad port
-2 time out
-5 port is not open
-6 len > Tx buffer size
port = port number
buf = transmit string pointer
len = transmit string length
6. Non-TTY port parameter setting.
Vue de la page 36
1 2 ... 32 33 34 35 36 37 38 39 40 41 42 ... 54 55

Commentaires sur ces manuels

Pas de commentaire