National Instruments NI-VXI Network Card User Manual


 
Chapter 3 Software Overview
NI-VXI User Manual 3-14 © National Instruments Corporation
WSwrtf (la, filename, count, modevalue, retcount)
WSwrtf
is an extension of the
WSwrt
function.
WSwrtf
writes a
specified number of bytes from the specified file to a message-based
Servant using the VXIbus Byte Transfer Protocol. The process involves
calling the
WSwrt
function (possibly many times) to write out a block
of data read from the specified file. The modevalue parameter in the
call specifies whether to send BAV only or BAV with END for the last
byte of the transfer.
Servant Word Serial Protocol Functions
Word Serial communication is the minimal mode of communication
between VXI message-based devices within the VXI
Commander/Servant hierarchy. The local CPU (the CPU on which the
NI-VXI functions are running) uses the Servant Word Serial functions
to perform VXI message-based Servant Word Serial communication
with its Commander. These functions are needed only in the case
where the local CPU is not a top-level Commander (probably not the
Resource Manager), such as in a multiple CPU situation. In a multiple
CPU situation, the local CPU must allow the Resource Manager device
to configure the local CPU and can optionally implement some basic
message-transfer Word Serial communication with its Commander.
The four basic types of Servant Word Serial functions are as follows:
Receiving commands
Receiving and responding to queries
Responding to requests to send buffers
Receiving buffers
The Word Serial Protocol is a 16-bit transfer protocol between a
Commander and its Servants. The Commander polls specific bits in the
Servant’s VXI Response register to determine when it can write a
command or read a response from the Data Low register. It also
determines when a Word Serial protocol error occurs. Before a
Commander can send a Word Serial command to a Servant, it must
first poll the Write Ready (WR) bit until it is asserted (set to 1). The
Commander can then write the command to the Data Low register. If
the Commander is sending a query, it first sends the query in the same
manner as sending a command, but then continues by polling the Read
Ready (RR) bit until it is asserted. It then reads the response from the
Data Low register.