Справочник Пользователя для National Instruments NI-VXI

Скачать
Страница из 149
Chapter 3      Software Overview
NI-VXI User Manual
3-22
© National Instruments Corporation
  WSSnoResp ()
WSSnoResp
 sets the WR bit so that it is ready to accept any further
Word Serial commands. The 
WSScmd
 interrupt handler should call
WSSnoResp
 after processing a Word Serial command (it calls
WSSsendResp
 for a Word Serial query, which requires a response).
  WSSrd (buf, count, modevalue)
WSSrd
 is the buffer read function. 
WSSrd
 receives a specified number
of bytes from a VXI message-based Commander device and places the
bytes into a memory buffer, using the VXIbus Byte Transfer Protocol.
The process involves setting the DIR and WR bits on the local CPU
Response register and building a buffer out of data bytes received via a
series of Byte Available (BAV) Word Serial commands. When 
WSSrd
reaches the specified count or an END bit, or an error occurs, it calls
the 
WSSrd
 interrupt handler with the status of the call. It clears the DIR
bit before setting the WR on the last byte of transfer.
  WSSsendResp (response)
WSSsendResp
 responds to a Word Serial Protocol query from a VXI
message-based Commander device. The 
WSScmd
 interrupt handler calls
this function to respond to a Word Serial query. If a previous response
has not been read yet, a 
WSSsendResp
 call generates a Multiple Query
Error (MQE). Otherwise, it writes a response value to the Data Low
register and sets the RR bit is. It also sets the WR bit so that it is ready
to accept any further Word Serial commands.
  WSSwrt (buf, count, modevalue)
WSSwrt
 sends a specified number of bytes to a VXI message-based
Commander device, using the VXIbus Byte Transfer Protocol. The
process involves setting the DOR and WR bits in the local Response
register and responding to a series of Byte Request (BREQ) Word
Serial commands. When the data output completes or an error occurs,
WSSwrt
 calls its interrupt handler with the status of the call. Before
responding to the last byte of the write, it clears DOR to prevent
another BREQ from being sent before the application is able to handle
the BREQ properly.