gpib_open(3) CLIX gpib_open(3)
NAME
gpib_open - Opens a General Purpose Interface Bus (GPIB) channel
LIBRARY
Intergraph Device Library (libix.a)
SYNOPSIS
#include <sys/xio/xerr.h>
int gpib_open(
int channel );
PARAMETERS
channel Represents a GPIB channel.
DESCRIPTION
The gpib_open() function allocates the General Purpose Interface Bus
(GPIB) channel for GPIB operations. A process which successfully opens a
channel receives sole control until it closes the channel, exits, or
execs.
EXAMPLES
To open GPIB channel 0 for use:
channel = 0;
if (status = gpib_open(channel)) {
fprintf(stderr, "gpib_open: failed, %d\n", status);
return(-1);
}
fprintf(stdout, "gpib_open: succeeded\n");
RETURN VALUES
Upon successful completion, a value of 0 is returned. Otherwise, one of
the failure codes listed in the ERRORS section is returned.
ERRORS
The gpib_open() function fails if one of the following is true:
[XIO_FAILURE]
The system does not contain the driver needed to support this
request.
2/94 - Intergraph Corporation 1
gpib_open(3) CLIX gpib_open(3)
[GPIB_OUT_OF_RANGE]
The specified channel is beyond the maximum allowed.
[GPIB_IN_USE]
The specified channel is currently open by another process.
[GPIB_NOT_FOUND]
The GPIB channel is not in the system.
RELATED INFORMATION
Functions: gpib_close(3)
Files: xgpib(7)
2 Intergraph Corporation - 2/94