\magnification=\magstep1
{

\hoffset=1truein
\hsize=5.25truein
\vsize=10.25truein
\font\small=cmssbx10 at 14.4truept
\font\medium=cmssbx10 at 17.28truept
\font\large=cmssbx10 at 20.74truept
\nopagenumbers
\hrule height 0pt
\parindent=0pt
%\parskip=0pt
\hskip 3.9truein
\large
EDOC021\par
\vskip .5truein
\large
EUROGAM PROJECT\par
\vskip 1.5truein
\hrule height 2pt
\vskip 20pt
\large
NSF DATA ACQUISITION SYSTEM\par
\vskip .5truein
Network VME System\par
\vskip 20pt
\hrule height 2pt
\vskip 1truein
\medium
Edition 1.1\par
\vskip 5pt
Apr 1991\par
\vfill
\medium
NSF Software Systems Group\par
\vskip 5pt
UK Science and Engineering Research Council\par
\vskip 5pt
Daresbury Laboratory\par
\vskip .5truein

\eject
}
\font\large=cmbx10 scaled \magstep3
\font\small=cmbx10 scaled \magstep2
\parindent=0pt\hsize=6.25truein\vsize=9.75truein
\def\section#1{\bigbreak{\bf #1}\par\nobreak\medskip}
\def\blob{$\bullet$}
\parskip=.5\baselineskip
\def\list{\parindent=2em\parskip=0pt\smallskip}
\def\endlist{\par\parindent=0pt\parskip=.5\baselineskip}
\def\tabrule{\noalign{\hrule\vskip-0.4pt}}
\newbox\tab
\newdimen\tabht\newcount\tablines
\newdimen\savepagetotal\newcount\savepageno
\newcount\label
\newdimen\pagesum
\newtoks\stuff
\newtoks\heading

\def\lb{\hfil\break}
\def\Group#1. #2\par{
\heading={\bf Order Group    #1.\quad #2} 
\hbox{\the\heading}\nobreak}

\def\endGroup{\vfill\eject}

\def\procedure#1. #2\par{
\heading={\bf Procedure #1.\quad #2}}

\def\table{
   \label=0
   \setbox\tab=
   \vbox\bgroup\offinterlineskip
   \tabskip=0pt
   \halign to 2.0 truein \bgroup
   \vrule##\tabskip=0in plus1in\strut&
   \hbox to 0.99truein{\hfil##\hfil}&
   \vrule##&
   \hbox to 0.99truein{\hfil##\hfil}&
   \vrule##\cr
}
\def\byte#1#2{
   \tabrule
   \global\advance\label by 2\relax
   &\sl #1&&\sl #2&\cr
   }
\def\half#1{
   \tabrule
   \global\advance\label by 2\relax
   &\multispan3\hbox to 1.99truein{\hfil\sl #1\hfil}&\cr
   }
\def\full#1{
   \tabrule
   \global\advance\label by 4\relax
   &\multispan3\hbox to 1.99truein{\vrule height14.5pt depth9.5pt width0pt
   \hfil\sl #1\hfil}&\cr
   }
\def\data#1{
   \tabrule
   \global\advance\label by 4\relax
   &\multispan3\hbox to 1.99truein{\vrule height20.5pt depth15.5pt width0pt
   \hfil\sl #1\hfil}&\cr
   }
\def\endtable{\tabrule\egroup\egroup}



\def\desc{
   \tabht=\ht\tab
   \vskip24pt plus 3in\penalty-200\vskip0pt plus -3in
   \hbox{\the\heading}\nobreak\medskip
   \moveright 4.5truein \box\tab
   \savepagetotal=\pagetotal\savepageno=\pageno
   \vskip-\tabht\prevdepth=0pt
   \tablines=\tabht
%  \advance\tablines by \baselineskip
   \divide\tablines by \baselineskip
   \hangindent=-2.0truein \hangafter=-\tablines
   \vskip-\parskip
   \noindent\tolerance=2000
   }
\def\enddesc{
   \par 
   \ifnum\prevgraf<\tablines
      \advance\tablines by -\prevgraf
      \savepagetotal=\baselineskip
      \multiply\savepagetotal by\tablines
     \vskip\savepagetotal\fi}     
   

\def\block{
   \vbox\bgroup\offinterlineskip
   \tabskip=0pt
   \halign to 2.0 truein \bgroup
   \vrule              ##\tabskip=0in plus2in\strut&
                       \hfil##\hfil &
   \vrule              ##\tabskip=0pt         \cr
}

\def\entry#1{
   \tabrule
   &\sl #1 &\cr
   }

\def\fullentry#1{
   \tabrule
   &\vrule height14.5pt depth9.5pt width0pt
   \hfil\sl #1\hfil&\cr
   }

\def\endblock{\tabrule\egroup\egroup}
\tolerance=1000\hfuzz=5pt\raggedbottom
\hyphenation{key-slot}

{\large Introduction }
\vskip .5in

This document describes the Network VME System (NVS) protocol
specification used to provide access to the distributed
array of VME and VXI crates which form part of the NSF 
data acquisition system.
 
It is intended that this protocol be available over a number
of communications media and hence the relevant 
{\it Communications Protocol} specification document 
should be consulted for detail in this area.
 
This protocol is an application carried by the RPC protocol
which is described in the Eurogam document 
{\it Remote Procedure Call}.
 
The general structure of the protocol is described in 
the Eurogam document {\it RPC Application Programs}.

\vskip .75in
{\large Document History}
\vskip .5in
 
Version 1.0 July 1990 - Initial version
 
Version 1.1 April 1991 - add failing address in error responses
 
\vskip .75in
{\large Use }
\vskip .5in
 
Throughout this document {\it capability} is an 8 byte (64 bit) opaque
field generated by the server and used by the client as 
an access token. At present this service places no access
restrictions by clients to the VME address space. The 
capability field is provided for possible future use and at 
present should be set to nulls.
 
It is the responsibility of the client to supply valid VME
addresses.

\par

\vfill\eject


{\large Program Specification}          
\vskip .5in

{\bf RPC Information}
\parindent=36pt
\item{}The NVS service uses only the Null authentication  
\item{}NVS is supported on the UDP/IP transport only 
\item{}NVS is RPC Program 28000210    
\item{}This is Version 1 of the protocol
\item{}NVS uses UDP port number 10210 
\parindent=0pt

\section{Procedure 0.\quad Null procedure} 
This procedure does no work. There are no input parameters and
no returned results. It is made available in all RPC
services to allow server response testing and timing.

\section{Procedure 1.\quad Write}
\heading={REQUEST}
\table
\full{capability}
\half{mode}
\half{items}
\half{address$_1$}
\half{data$_1$}
\half{address$_2$}
\half{data$_2$}
\data{}
\half{address$_n$}
\half{data$_n$}
\endtable
\desc
Writes the supplied data items to the specified VME addresses.
\enddesc
\smallskip
\settabs\+
\qquad&option:\quad&9999\quad&xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx \cr
\+& Mode=&  1  &  write byte - ie 8 bits   \cr
\+&        &  2  &  write short - ie 16 bits     \cr
\+&        &  3  &  write long - ie 32 bits     \cr
{\sl Items} is the number of address/data item pairs following. 
The data items are right justified in 32 bits.  \lb
Each data item is written in the specified mode to the
corresponding VME address.
\heading={RESPONSE}
\table
\half{procedure status}
\half{address}
\endtable
\desc

\enddesc
{\sl Procedure status} is a 4 byte field which 
indicates the result of the request.
\smallskip
\settabs\+
\qquad&procedure status:\quad&9999\quad&xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx \cr
\+& Procedure status=&  0  & accepted    \cr
\+&     &  1  & invalid VME address \cr
\+&     &  2  & VME bus error occurred\cr
\+&        &  3  &  VME parity occurred     \cr
 
{\sl Address} is a 4 byte field which is present only if
{\sl procedure status} is non zero and contains the VME address
at which the error occurred.
 
\section{Procedure 2.\quad Write incremental}
\heading={REQUEST}
\table
\full{capability}
\half{mode}
\half{increment}
\half{items}
\half{address}
\half{data$_1$}
\half{data$_2$}
\data{}
\half{data$_n$}
\endtable
\desc
Writes the supplied data items starting at the specified VME address.
\enddesc
\smallskip
\settabs\+
\qquad&option:\quad&9999\quad&xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx \cr
\+& Mode=&  1  &  write byte - ie 8 bits   \cr
\+&        &  2  &  write short - ie 16 bits     \cr
\+&        &  3  &  write long - ie 32 bits     \cr
{\sl Increment} is the amount by which the VME address is
incremented following each write operation.    \lb
{\sl Items} is the number of data items              following. 
The data items are right justified in 32 bits. \lb
Each data item is written in the specified mode to the 
current VME address.
\heading={RESPONSE}
\table
\half{procedure status}
\half{address}
\endtable
\desc

\enddesc
{\sl Procedure status} is a 4 byte field which 
indicates the result of the request.
\smallskip
\settabs\+
\qquad&procedure status:\quad&9999\quad&xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx \cr
\+& Procedure status=&  0  & accepted    \cr
\+&     &  1  & invalid VME address \cr
\+&     &  2  & VME bus error occurred\cr
\+&        &  3  &  VME parity occurred     \cr
 
{\sl Address} is a 4 byte field which is present only if
{\sl procedure status} is non zero and contains the VME address
at which the error occurred.
 
\section{Procedure 3.\quad Write incremental packed}
\heading={REQUEST}
\table
\full{capability}
\half{mode}
\half{increment}
\half{items}
\half{address}
\data{data}
\endtable
\desc
Writes the supplied data  starting at the specified VME address.
\enddesc
\smallskip
\settabs\+
\qquad&option:\quad&9999\quad&xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx \cr
\+& Mode=&  1  &  write byte - ie 8 bits   \cr
\+&        &  2  &  write short - ie 16 bits     \cr
\+&        &  3  &  write long  - ie 32 bits     \cr
{\sl Increment} is the amount by which the VME address is
incremented following each write operation.   \lb
{\sl Items} is the number of data items              following. 
The data items are packed into {\sl data} and each occupies the next
8 bits (mode=1),   16 bits (mode=2) or 32 bits (mode=3).
Note that in mode=3 write incremental and write incremental packed
are equivalent.
\heading={RESPONSE}
\table
\half{procedure status}
\half{address}
\endtable
\desc

\enddesc
{\sl Procedure status} is a 4 byte field which 
indicates the result of the request.
\smallskip
\settabs\+
\qquad&procedure status:\quad&9999\quad&xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx \cr
\+& Procedure status=&  0  & accepted    \cr
\+&     &  1  & invalid VME address \cr
\+&     &  2  & VME bus error occurred\cr
\+&        &  3  &  VME parity occurred     \cr
 
{\sl Address} is a 4 byte field which is present only if
{\sl procedure status} is non zero and contains the VME address
at which the error occurred.
 
\eject
\section{Procedure 4.\quad Read }
\heading={REQUEST}
\table
\full{capability}
\half{mode}
\half{items}
\half{address$_1$}
\half{data$_1$}
\half{address$_2$}
\half{data$_2$}
\data{}
\half{address$_n$}
\half{data$_n$}
\endtable
\desc
Reads   data items from the specified VME addresses.
\enddesc
\smallskip
\settabs\+
\qquad&option:\quad&9999\quad&xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx \cr
\+& Mode=&  1  &  read byte - ie 8 bits   \cr
\+&        &  2  &  read short - ie 16 bits     \cr
\+&        &  3  &  read long - ie 32 bits     \cr
{\sl Items} is the number of address/data item pairs following. 
The contents of the data items is undefined in the request.
\heading={RESPONSE - success}
\table
\half{success = 0}
\half{items}
\half{address$_1$}
\half{data$_1$}
\half{address$_2$}
\half{data$_2$}
\data{}
\half{address$_n$}
\half{data$_n$}
\endtable
\desc
The data items read from the corresponding VME addresses are returned.
\enddesc
The data items are right justified in 32 bits.
\heading={RESPONSE - failure}
\table
\half{procedure status}
\half{address}
\endtable
\desc

\enddesc
{\sl Procedure status} is a 4 byte field which 
indicates the result of the request.
\smallskip
\settabs\+
\qquad&procedure status:\quad&9999\quad&xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx \cr
\+& Procedure status=&  1  & invalid VME address \cr
\+&     &  2  & VME bus error occurred\cr
\+&        &  3  &  VME parity occurred     \cr
 
{\sl Address} is a 4 byte field which 
contains the VME address
at which the error occurred.
 
\section{Procedure 5.\quad Read incremental}
\heading={REQUEST}
\table
\full{capability}
\half{mode}
\half{increment}
\half{items}
\half{address}
\endtable
\desc
Reads  the required data items starting at the specified VME address.
\enddesc
\smallskip
\settabs\+
\qquad&option:\quad&9999\quad&xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx \cr
\+& Mode=&  1  &  write byte - ie 8 bits   \cr
\+&        &  2  &  write short - ie 16 bits     \cr
\+&        &  3  &  write long - ie 32 bits     \cr
{\sl Increment} is the amount by which the VME address is
incremented following each read operation.    \lb
{\sl Items} is the number of data items to be returned. 
The data items are right justified in 32 bits.
\heading={RESPONSE - success}
\table
\half{success = 0}
\half{items}
\half{address}
\half{data$_1$}
\half{data$_2$}
\data{}
\half{data$_n$}
\endtable
\desc
The data items read from the corresponding VME addresses are returned.
\enddesc
The data items are right justified in 32 bits.
\heading={RESPONSE - failure}
\table
\half{procedure status}
\half{address}
\endtable
\desc

\enddesc
{\sl Procedure status} is a 4 byte field which 
indicates the result of the request.
\smallskip
\settabs\+
\qquad&procedure status:\quad&9999\quad&xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx \cr
\+& Procedure status=&  1  & invalid VME address \cr
\+&     &  2  & VME bus error occurred\cr
\+&        &  3  &  VME parity occurred     \cr
 
{\sl Address} is a 4 byte field which 
contains the VME address
at which the error occurred.
 
\eject
\section{Procedure 6.\quad Read incremental packed}
\heading={REQUEST}
\table
\full{capability}
\half{mode}
\half{increment}
\half{items}
\half{address}
\endtable
\desc
Reads  the required data  starting at the specified VME address.
\enddesc
\smallskip
\settabs\+
\qquad&option:\quad&9999\quad&xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx \cr
\+& Mode=&  1  &  write byte - ie 8 bits   \cr
\+&        &  2  &  write short - ie 16 bits     \cr
\+&        &  3  &  write long  - ie 32 bits     \cr
{\sl Increment} is the amount by which the VME address is
incremented following each read operation.   
\heading={RESPONSE - success}
\table
\half{success = 0}
\half{items}
\half{address}
\data{data}
\endtable
\desc
The data items read from the corresponding VME addresses are returned.
\enddesc
The data items are packed into {\sl data} and each occupies the next
8 bits (mode=1),   16 bits (mode=2) or 32 bits (mode=3).
Note that in mode=3 read incremental and read incremental packed
are equivalent.
\heading={RESPONSE - failure}
\table
\half{procedure status}
\half{address}
\endtable
\desc

\enddesc
{\sl Procedure status} is a 4 byte field which 
indicates the result of the request.
\smallskip
\settabs\+
\qquad&procedure status:\quad&9999\quad&xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx \cr
\+& Procedure status=&  1  & invalid VME address \cr
\+&     &  2  & VME bus error occurred\cr
\+&        &  3  &  VME parity occurred     \cr
 
{\sl Address} is a 4 byte field which 
contains the VME address
at which the error occurred.
 
\endGroup
\end
