Moxa C320Turbo/PCI Manual de usuario Pagina 61

  • Descarga
  • Añadir a mis manuales
  • Imprimir
  • Pagina
    / 101
  • Tabla de contenidos
  • SOLUCIÓN DE PROBLEMAS
  • MARCADORES
  • Valorado. / 5. Basado en revisión del cliente
Vista de pagina 60
4-6 Intellio C320Turbo/PCI User's Manual
Syntax for UNIX SVR4
#include <sys/stropts.h>
#include <sys/sysmacros.h>
#define MIBUFED 0x401
struct strioctl ioc;
int count; /*number of bytes queued in the buffer */
ioc.ic_cmd = MIBUFED;
ioc.ic_timout = 0;
ioc.ic_len = sizeof(int);
ioc.ic_dp = (char *)&count;
ioctl(moxa_fd, I_STR, &ioc);
Note: Due to the characteristics of STREAMS driver, the returned count of bytes buffered
only reflect the data buffered on MOXA board, not including the data buffered in STREAMS
queue. In this case, the count is for reference only. For example, returned count may always
be zero, but there still are data buffered in STREAMS queue.
2. MOBUFED
This function let you know the byte count queued in output buffer when this function
is issued.
Syntax for SCO UNIX/XENIX
#define MOBUFED 0x402
int count; /* number of bytes queued in the output buffer */
ioctl(moxa_fd, MOBUFED, &count);
Syntax for UNIX SVR4
#include <sys/stropts.h>
#include <sys/sysmacros.h>
#define MOBUFED 0x402
struct strioctl ioc;
int count; /* number of bytes queued in the output buffer */
ioc.ic_cmd = MOBUFED;
ioc.ic_timout = 0;
ioc.ic_len = sizeof(int);
ioc.ic_dp = (char *)&count;
ioctl(moxa_fd, I_STR, &ioc);
Note: See MIBUFED for influence of STREAMS driver.
Vista de pagina 60
1 2 ... 56 57 58 59 60 61 62 63 64 65 66 ... 100 101

Comentarios a estos manuales

Sin comentarios