Personal488 User's Manual For Windows 95 and Windows NT
API Command Reference 87
OutputX
Syntax
LONG WINAPI OutputX(DevHandleT devHandle, LPBYTE data, DWORD
count, BOOL last, BOOL forceAddr, TermT *terminator, BOOL
async, LPDWORD compStat);
devHandle
refers to either an interface or an external device. If
devHandle
refers to an
external device, the
OutputX
command acts on the hardware interface to which the
external device is attached.
data
is a string of bytes to send.
count
is the number of bytes to send.
last
is a flag that forces the device output terminator to be sent with the data.
forceAddr
is used to specify whether the addressing control bytes are to be issued for
each
OutputX
command.
terminator
is a pointer to a terminator structure that is used to set up the input
terminators. If
terminator
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 number of characters transferred
Mode
CA
Bus States
With interface handle:
REN (if SC and AutoRemote), *ATN, ATN
With external device handle:
REN (if SC and AutoRemote), ATN
••
MTA, UNL,
LAG, *ATN, ATN
Example
term.EOI = TRUE;
term.nChar = 1;
term.EightBits = TRUE;
term.termChar[0] = ‘\r’;
data = “U0X”;
count = strlen(data);
bytecnt=Output(timer,data,count,1,0,&term,0,&stat);
See Also
EnterX, Term, TimeOut, Buffered
Note:
The asynchronous flag
async
is ignored in Driver488/WNT.
The
OutputX
command sends data to an interface or external device. The Remote Enable (
REN
) line is
first asserted if Driver488 is the System Controller and
AutoRemote
is enabled. Then, if a device
address (with optional secondary address) is specified, Driver488 is addressed to Talk and the specified
device is addressed to Listen. If no address is specified, then Driver488 must already be configured to
send data, either as a result of a preceding
OutputX
command, or as the result of a
Send
command.
Terminators are automatically appended to the output data as specified.
The
forceAddr
flag is used to specify whether the addressing control bytes are to be issued for each
OutputX
command. If the device handle refers to an interface,
forceAddr
has no effect and
command bytes are not sent. If the device handle refers to an external device and
forceAddr
is
TRUE
,
Driver488 addresses the interface to Talk and the external device to Listen. If
forceAddr
is
FALSE
,
Driver488 compares the current device with the most recently addressed device on that interface. If the
addressing information is the same, no command bytes are sent. If they are different,
OutputX
acts as
if the
forceAddr
flag were
TRUE
and sends the addressing information.
The
terminator
is a pointer to a terminator structure that is used to set up the input terminators. This
pointer may be a null pointer, requesting use of the default terminators for the device, or it may point to
a terminator structure requesting no terminators. The
async
is a flag that allows asynchronous data
transfer. If this flag is
TRUE
, the
OutputX
command returns to the caller as soon as the data transfer is
underway.
FALSE
indicates that the
OutputX
command should not return until the transfer is
complete. The
compStat
is a pointer to an integer containing completion status information. A null
pointer indicates that completion status is not requested. In the case of an asynchronous transfer, this
pointer must remain valid until the transfer is complete.
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...