Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ iclear(3) — HP-UX Instrument Control Library C.03.01

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

igeterrno(3)

igeterrstr(3)

isetlock(3)

ICLEAR(3)

HP-UX

NAME

iclear − Clear device or interface

SYNOPSIS

 #include <sicl.h>
 int iclear (id);
 INST id;

DESCRIPTION

Iclear performs a device or interface defined clear operation on the device or interface specified by id.  If id refers to a device, then a device clear command will be sent to the device.  If id refers to an interface, the interface clear command will be sent to that interface.  The actual functions of the device clear or interface clear are specific to the device or interface. 

If a device id is given, then that device must be unlocked, or locked by the current process.  If an interface id is given, then that interface must be unlocked, or locked by the current process. 

For example, executing iclear on an HP-IB device will result in the DCL command being sent to that device.  Executing iclear on an HP-IB interface will result in the IFC line being pulsed (if the interface is system controller), and the interface hardware being reset. 

The iclear command, when used on a VXI interface session causes a pulse on the SYSRESET line which cancels the normal operation state until the resource manager has reconfigured the VXI system.  The iclear command, when used on a VXI message-based device session sends a word-serial device clear command to the specified device. 

The iclear function also discards the data in both the read and the write formatted I/O buffers.  This discard is equivalent to performing the following iflush call (in addition to the device or interface clear function):
 
iflush (id, I_BUF_DISCARD_READ | I_BUF_DISCARD_WRITE);
 

RETURN VALUE

Iclear returns 0 on success, or a non-zero error code otherwise. 

ERRORS

Iclear fails under the following circumstances, and sets the return value to one of the following:

­[I_ERR_BADID] The INST id is invalid. 

­[I_ERR_LOCKED] Locked by another user

­[I_ERR_TIMEOUT] Timeout occurred
 

 

SEE ALSO

igeterrno(3), igeterrstr(3), isetlock(3)
 

AUTHOR

iclear was developed by HP. 

Hewlett-Packard Company  —  May 05, 1994

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