Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ hpib_bus_st(3I) — HP-UX 6.00

Media Vault

Software Library

Restoration Projects

Artifacts Sought

HPIB_BUS_STATUS(3I)  —  HP-UX

NAME

hpib_bus_status − return status of HP-IB interface

SYNOPSIS

int hpib_bus_status (eid, status);
int eid, status;

DESCRIPTION

Hpib_bus_status  enables you to determine various status  information  about  an  HP-IB  channel.  Eid is an entity identifier of an open HP-IB raw bus device file obtained from an open(2), dup(2), fcntl(2), or creat(2) call.  Status is an integer determining what status information is returned for a particular call.  The values defined for status and their associated meanings are:

ValueMeaning

  0Is the channel currently in remote state?
  1What is the current state of the SRQ line?
  2What is the current state of the NDAC line?
  3Is the channel currently system controller?
  4Is the channel currently active controller?
  5Is the channel currently addressed as talker?
  6Is the channel currently addressed as listener?
  7What is the channel’s bus address?

The remote state status  is  not  defined  when the  interface  is the  active controller,  although  reading  remote state status in such a situation is not an error. Determining the status of the NDAC line  is  not  available  on  all  machines,  and  its use is therefore  discouraged to ensure compatibility  among various systems. Machines which do not support sensing the NDAC  line return an error. 

DEPENDENCIES

Series 300
The status of those lines being driven by the interface is undefined, although reading them in such a situation is not an error. Non-active controllers cannot sense the SRQ line. Active listeners cannot sense the NDAC line.

The HP 98625A/B HP-IB interface cannot determine the current state of the NDAC line.  Attempts to read this line will fail and set ERRNO (see errno(2)) to EINVAL. 

Series 500
A bug in the HP27110A HP-IB interface causes an erroneous report of the state of the SRQ line.  There is a small window when hpib_bus_status(eid, 1)  reports that the SRQ line is  clear  when  in  reality  it is set.  OR-ing together  five  successive  readings  of the state of the SRQ line yields a reading of about 99% accuracy. 

RETURN VALUE

Hpib_bus_status’s return value depends upon the value of status, as follows:

StatusReturn ValueMeaning

  −−    −1Error condition.
0 − 6     0False condition (line is clear).
0 − 6     1True condition (line is set).
  7   0 − 30Bus address of interface card.

ERRORS

Hpib_bus_status fails under the following conditions, 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

AUTHOR

Hpib_bus_status was developed by HP. 

Hewlett-Packard Company  —  Version B.1,  May 11, 2021

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