HPlogo HP-UX Reference Volume 4 of 5 > h

hpib_rqst_srvce(3I)

Series 800 Only
» 

Technical documentation

Complete book in PDF

 » Table of Contents

 » Index

NAME

hpib_rqst_srvce() — allow interface to enable SRQ line on HP-IB (OBSOLETED AT 10.30)

SYNOPSIS

#include <dvio.h>

int hpib_rqst_srvce(int eid, int cv);

DESCRIPTION

hpib_rqst_srvce() specifies a response byte to be sent by the interface when it is serially polled by the active controller. eid is an entity identifier of an open HP-IB raw bus device file obtained from an open(), dup(), fcntl(), or creat() call. cv is an integer control value representation of the desired response byte.

hpib_rqst_srvce() optionally enables the SRQ line depending upon the response byte. If bit 6 of the response byte is set, the SRQ line is enabled. It remains enabled until the active controller conducts a serial poll or until the computer executes the request function with bit 6 cleared. However, the SRQ line is not enabled as long as the interface is active controller. If bit 6 is set, the interface remembers its response byte, and enables the SRQ line when control is passed to another device on the bus.

The response byte is structured as follows:

  • BitMeaning
    0SPOLL bit (least significant bit of response byte)
    1SPOLL bit
    2SPOLL bit
    3SPOLL bit
    4SPOLL bit
    5SPOLL bit
    6SRQ line
    7SPOLL bit (most significant bit of response byte)

RETURN VALUE

hpib_rqst_srvce() returns 0 (zero) if successful, or -1 if an error was encountered.

ERRORS

hpib_rqst_srvce() fails under the following circumstances, and sets errno (see errno(2)) to the value in square brackets:

[EBADF]

eid does not refer to an open file.

[ENOTTY]

eid does not refer to an HP-IB raw bus device file.

[ETIMEDOUT]

a timeout occurred.

[EACCES]

The interface associated with this eid is locked by another process and O_NDELAY is set for this eid (see io_lock(3I)).

DEPENDENCIES

The HP27110B HP-IB interface card allows only bit 6 to be set. All other bits are cleared.

AUTHOR

hpib_rqst_srvce() was developed by HP.

© Hewlett-Packard Development Company, L.P.