Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

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

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

iserialctrl(3)

ISERIALSTAT(3)

HP-UX

NAME

iserialstat − finds serial interface status

SYNOPSIS

#include <sicl.h>

int iserialstat (id, request, result);
 INST id;
int request;
unsigned long &FAR; *result;

DESCRIPTION

Iserialstat finds the status of the serial interface.  This function takes one of the following values passed in request and returns the status in the result parameter:
 

­I_SERIAL_BAUD The result parameter will be set to the speed of the interface. 

­I_SERIAL_PARITY The result parameter will be set to one of the following values:
 
I_SERIAL_PAR_EVENEven parity I_SERIAL_PAR_ODDOdd parity  I_SERIAL_PAR_NONE No parity bit is used  I_SERIAL_PAR_MARK Parity is always one  I_SERIAL_PAR_SPACE Parity is always zero

­I_SERIAL_STOP The result parameter will be set to one of the following values:
 
I_SERIAL_STOP_11 stop bits I_SERIAL_STOP_22 stop bits

­I_SERIAL_WIDTH The result parameter will be set to one of the following values:
 
I_SERIAL_CHAR_55 bit characters I_SERIAL_CHAR_66 bit characters I_SERIAL_CHAR_7 7 bit characters  I_SERIAL_CHAR_8 8 bit characters

­I_SERIAL_DUPLEX The result parameter will be set to one of the following values:
 
I_SERIAL_DUPLEX_FULLUse full duplex I_SERIAL_DUPLEX_HALFUse half duplex

­I_SERIAL_MSL The result parameter will be set to the bit wise OR of all of the Modem Status Lines that are currently being asserted.  The value of the result parameter will be the logical OR of all of the serial lines currently being asserted.  The serial lines are both the Modem Control Lines and the Modem Status Lines.  The following are the supported serial lines:
 

I_SERIAL_DCDData Carrier Detect.
I_SERIAL_DSRData Set Ready.
I_SERIAL_CTSClear To Send.
I_SERIAL_RIRing Indicator.
I_SERIAL_TERITrailing Edge of RI.
I_SERIAL_D_DCDThe DCD line has changed
since the last time this
status has been checked.
I_SERIAL_D_DSRThe DSR line has changed
since the last time this
status has been checked.
I_SERIAL_D_CTSThe CTS line has changed
since the last time this
status has been checked.

­I_SERIAL_STAT This is a read destructive status.  That means reading this request resets the condition. 
 
The result parameter will be set the bit wise OR of the following conditions:

 I_SERIAL_DAVData is available.
I_SERIAL_PARITYParity error has occurred
since the last time the
status was checked.
I_SERIAL_OVERFLOWOverflow error has occurred
since the last time the
status was checked.
I_SERIAL_FRAMINGFraming error has occurred
since the last time the
status was checked.
I_SERIAL_BREAKBreak has been received
since the last time the
status was checked.
I_SERIAL_TEMTTransmitter empty.

$I_SERIAL_READ_BUFSZ The result parameter will be set to the current size of the read buffer. 

­I_SERIAL_READ_DAV The result parameter will be set to the current amount of data available for reading. 

­I_SERIAL_WRITE_BUFSZ The result parameter will be set to the current size of the write buffer. 

­I_SERIAL_FLOW_CTRL The result parameter will be set to the value of the current type of flow control that the interface is using.  If no flow control is used, result will be set to zero (0).  The following are the supported types of flow control:
 
I_SERIAL_FLOW_NONENo handshaking I_SERIAL_FLOW_XONSoftware handshaking  I_SERIAL_FLOW_RTS_CTS Hardware handshaking  I_SERIAL_FLOW_DTR_DSR Hardware handshaking

­I_SERIAL_READ_EOI The result parameter will be set to the value of the current type of END indicator that is being used for reads.  The following values can be returned:
 
I_SERIAL_EOI_CHR(n)A character is used to indicate EOI, where n is the character.  These two values are logically OR-ed together.  To find the value of the character, AND result with 0xff.  The default is a 0. 

 I_SERIAL_EOI_NONENo EOI indicator.  This is
the default for I_SERIAL_WRITE
(iprintf).
 I_SERIAL_EOI_BIT8Use the eighth bit of the data
to indicate EOI.  This last byte
will mask off this bit and use
the rest for the data that is
put in your buffer.

­I_SERIAL_WRITE_EOI The result parameter will be set to the value of the current type of END indicator that is being used for reads.  The following values can be returned:

 I_SERIAL_EOI_NONENo EOI indicator.  This is
the default for I_SERIAL_WRITE
(iprintf).
I_SERIAL_EOI_BIT8Use the eighth bit of the data
to indicate EOI.  This last
byte will mask off this bit
and use the rest for the data
that is put in your buffer.

 

RETURN VALUE

For C programs, this function returns zero (0) if successful, or a non-zero error number if an error occurs. 
 

SEE ALSO

iserialctrl(3)
 

AUTHOR

iserialstat was developed by HP. 

Hewlett-Packard Comapny  —  September 29, 1999

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