Moxa Technologies C360 Manual de usuario Pagina 37

  • Descarga
  • Añadir a mis manuales
  • Imprimir
  • Pagina
    / 55
  • Tabla de contenidos
  • SOLUCIÓN DE PROBLEMAS
  • MARCADORES
  • Valorado. / 5. Basado en revisión del cliente
Vista de pagina 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.
Vista de pagina 36
1 2 ... 32 33 34 35 36 37 38 39 40 41 42 ... 54 55

Comentarios a estos manuales

Sin comentarios