Disabling A Read Termination Pattern - HP 9000 Series 300 Tutorials Manual

Device i/o and user interfacing hp-ux concepts and tutorials
Hide thumbs Also See for HP 9000 Series 300:
Table of Contents

Advertisement

Disabling a Read Termination Pattern
To disable the read termination pattern, call io_eol_ctl with the flag
parameter disabled (set to 0):
io_eol_ctl(eid, 0, xx);
where xx represents a "don't care" value for the match argument. If the flag
argument is 0, the match argument is ignored.
The following code segment defines the ASCII. character (decimal value 46)
as a termination pattern, performs a read operation, then disables termination
pattern recognition.
#include <fcntl.h>
#include <errno.h>
maine)
{
}
int eid;
char buffer[12] ;
i f
((eid
=
open ("/dev/hpib_dev", O_RDWR»
==
-1) {
printf("open failed, errno
=
%d\n", errno);
exit (2) ;
}
io_reset(eid);
io_timeout_ctl(eid, 10000000);
io_eol_ctl(eid, 1, 46);
read( eid, buffer, 12); /*Read operation halts when a period character
"." is read or when the 12th byte is read*/
io_eol_ctl( eid, 0, 0); /*termination pattern recognition is disabled*/
General-Purpose Routines
2-23

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Hp 9000 series 800

Table of Contents