64 API Command Reference
Personal488 User's Manual For Windows95 and Windows NT
EnterX
Syntax
LONG WINAPI EnterX(DevHandleT devHandle, LPBYTE data,DWORD
count,BOOL forceAddr,TermT*term,BOOL async,LPDWORD
compStat);
devHandle
refers to either an IEEE 488 interface or an external device.
data
is a pointer to the buffer into which the data is read.
count
is the number of characters to read.
forceAddr
is used to specify whether the addressing control bytes are to be issued for
each
EnterX
command.
term
is a pointer to a terminator structure that is used to set up the input terminators. If
term
is set to
0
, the default terminator is used.
async
is a flag that allows asynchronous data transfer. Note that this asynchronous flag is
ignored in Driver488/WNT.
compStat
is a pointer to an integer containing completion status information.
Returns
-1
if error
otherwise, the actual count of bytes transferred. The memory buffer pointed to by the data
parameter is filled in with the information read from the device. Note that the actual
count does not include terminating characters if term characters are specified by the
term in function. In addition, term characters are not returned but are discarded.
Mode
CA
Bus States
With interface handle:
*ATN, data
With external device handle:
ATN
••
UNL, MLA, TAG, *ATN, data
Example
term.EOI = TRUE;
term.nChar = 1;
term.EightBits = TRUE;
term.termChar[0] = ‘\r’;
bytecount=EnterX(timer,data,1024,0,&term,1,&stat);
See Also
OutputX, Term, Buffered
Note:
The asynchronous flag
async
is ignored in Driver488/WNT.
The
EnterX
command reads data from the I/O adapter. If an external device is specified, then
Driver488 is addressed to Listen, and that device is addressed to Talk. If an interface is specified, then
Driver488 must already be configured to receive data and the external device must be configured to
Talk, either as a result of an immediately preceding
EnterX
command or as a result of one of the
Send
commands.
EnterX
terminates reception on either the specified count of bytes transferred, or the
specified or default terminator being detected. Terminator characters, if any, are stripped from the
received data before the
EnterX
command returns to the calling application.
The
forceAddr
flag is used to specify whether the addressing control bytes are to be issued for each
EnterX
command. If the device handle refers to an I/O adapter, then
forceAddr
has no effect and
command bytes are not sent. For an external device, if
forceAddr
is
TRUE
then Driver488 always
sends the
UNL
,
MLA
, and
TAG
command bytes. If
forceAddr
is
FALSE
, then Driver488 compares the
current device with the previous device that used that interface adapter board for an
EnterX
command.
If they are the same, then no command bytes are sent. If they are different, then
EnterX
acts as if the
forceAddr
flag were
TRUE
and sends the command bytes. The
forceAddr
flag is usually set
TRUE
for the first transfer of data from a device, and then set
FALSE
for additional transfers from the same
block of data from that device.
Additional Enter Functions
Driver488 provides additional
Enter
routines that are short-form versions of the
EnterX
function.
The following
Enter
functions are already defined in your header file.
Summary of Contents for OMB-PER-488/W95
Page 1: ......
Page 4: ...ii Personal488 User s Manual For Windows 95 and Windows NT Notes...
Page 38: ...32 Personal488 with GP488B Personal488 User s Manual For Windows95 and Windows NT Notes...
Page 52: ...46 Driver488 W95 Driver488 WNT Personal488 User s Manual For Windows95 and Windows NT Notes...
Page 136: ...130 Appendix Personal488 User s Manual For Windows95 and Windows NT Notes...
Page 139: ...Personal488 User s Manual For Windows 95 and Windows NT Index 133 Notes...
Page 142: ...136 Abbreviations Personal488 User s Manual For Windows95 and Windows NT Notes...