Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ ionsrq(3) — HP-UX Instrument Control Library G.03.00

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

igetonsrq(3)

igpibbusstatus(3)

igeterrno(3)

igeterrstr(3)

IONSRQ(3)

HP-UX

NAME

ionsrq − installs an SRQ (service request) handler

SYNOPSIS

 #include <sicl.h>
 int ionsrq (INST id, void (*proc)());
 
 void proc(INST id);

DESCRIPTION

Ionsrq installs proc as the SRQ handler for the device specified by the id parameter; the id parameter must refer to a valid device session.  For VXI, the id parameter must refer to a valid message-based device session.  Proc is called any time the device generates an SRQ.  There is only one SRQ handler for a given device session; multiple calls to ionsrq with the same session INST id overwrites the current effective SRQ handler. 
 
One proc can be the SRQ handler for more than one device session.  The id parameter passed to proc is set to the INST id of the session that generated the SRQ, allowing the handler to determine the session for which it is executing. 
 
Depending on the interface, it may not be possible to determine the device that generated the SRQ; in this case the SRQ is passed to all SRQ handlers that are assigned to devices on the interface.  Therefore, an SRQ handler cannot assume that the device session id passed to proc actually generated an SRQ.  An SRQ handler should execute the ireadstb(3) function to determine whether its corresponding device generated an SRQ. 
 
If a process has two or more device sessions that refer to the same device, the handler for each id is called. 
 
For VXI, an SRQ is generated from a message-based device when the device sends either a VME interrupt or a signal register write that is a request true event, and the device is one of our servants.
 
To disable the SRQ handler for a device session, pass 0 in the proc parameter. 
 

RETURN VALUE

The ionsrq command returns I_ERR_NOERROR on success, and a non-zero error code if an error occurred. 

ERRORS

Some possible reasons for ionsrq failing are:

­[I_ERR_BADID] Invalid INST id. 

­[I_ERR_PARAM] Invalid parameter. 

WARNING

For HP-IB, if an SRQ handler does not reset the state of the SRQ line, then the SRQ may still be asserted and the hardware will not be able to determine if another device asserts SRQ; it may be best to have all sessions install an SRQ handler if any session is to depend on SRQ notification.  Also, all handlers should read the status byte of their device session to allow their devices to release the SRQ line. 
 
Similarly, for VXI, the SRQ handler is called only if the SRQ state goes from a request false state to a request true state; two conditions that put the SRQ state into request false are reading the status byte of that device, or the device signalling a request false event.

AUTHOR

ionsrq was developed by HP. 

SEE ALSO

igetonsrq(3), igpibbusstatus(3), igeterrno(3), igeterrstr(3). 

Hewlett-Packard Company  —  September 29, 1999

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026