\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
EDOC034\par
\vskip .5truein
\large
EUROGAM PROJECT\par
\vskip 1.5truein
\hrule height 2pt
\vskip 20pt
\large
NSF DATA ACQUISITION SYSTEM\par
\vskip .5truein
Eurogam Register Server Protocol\par
\vskip 20pt
\hrule height 2pt
\vskip 1truein
\medium
Edition 1.1\par
\vskip 5pt
May 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 a general purpose protocol used 
within the Eurogam Data Acquisition System to enable clients
to communicate with the various applications programs 
which control equipment and acquire data.
 
The general concepts of the Register Server are defined in
the document {\it EDOC079} (The Eurogam Register Server - An Overview)
and
an example of its use  is described in the document {\it
EDOC024} which defines the requirements for the
{\it Eurogam Frontend Crate Server}.
 
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}
 
 Edition 1.1 May 1991 - first entry in Eurogam document server
 
\vskip .5in
\vskip .75in

{\large Operation }
 
\vskip .5in


\par
\vfill\eject


{\large Program Specification}          
\vskip .5in

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

 Basic Data Types

\smallskip
\settabs\+
\qquad&xxxx  \quad&initialiseregisterxxxxxxxxxxxxxxxxxxxx\quad&returns(reply)\cr
\+&typedef~~ enum~~ $\{$ FALSE $=$ 0, TRUE $=$1 $\}$ boolean; & & \cr
\smallskip
\settabs\+
\qquad&xxxx  \quad&initialiseregisterxxxxxxxxxxxxxxxxxxxx\quad&returns(reply)\cr
\+& typedef~~ enum  $\{$     &  &  \cr
\+& & OK $=$ 0,    & \cr    
\+& & Resource\_not\_known $=$ 1,    & \cr    
\+& & Resource\_already\_in\_use $=$ 2,    & \cr    
\+& & Capability\_invalid $=$ 3,    & \cr    
\+& & Register\_not\_known $=$ 4,    & \cr    
\+& & Register\_already\_defined $=$ 6,    & \cr    
\+& & Prototype\_not\_known $=$ 7,    & \cr    
\+& & Application\_not\_responding $=$ 8,    & \cr    
\+& & Invalid\_cookie $=$ 9,    & \cr    
\+& & Application\_detected\_failure $=$ 10,         & \cr
\+& & Illegal\_register\_name $=$ 11,         & \cr
\+& & Out\_of\_memory $=$ 12,         & \cr
\+& & Count\_too\_small $=$ 13,         & \cr
\+& & Bad\_request $=$ 14          & \cr
\+&  $\}$ stat;        & & \cr

\smallskip
\+&typedef~~ string~~ resource$<$255$>$;  & & \cr   
\+&typedef~~ string~~ register$<$255$>$;  & & \cr   
\+&typedef~~ string~~ class$<$255$>$;  & & \cr   
\+&typedef~~ string~~ pattern$<$255$>$;  & & \cr

\smallskip
\+&typedef~~ opaque~~ capability[8];  & & \cr 
\+&typedef~~ opaque~~ cookie[4];  & & \cr 
\+&typedef~~ opaque~~ registervalue$<$1024$>$;  & & \cr 
\+&typedef~~ opaque~~ registerattribute$<$1024$>$;   & \cr
 
\par
\vfill\eject
 
\smallskip
\+&typedef~~ union switch (boolean valid)~~ $\{$ & & \cr
\+&&TRUE:              & \cr
\+&&struct $\{$         & \cr
\+&&~~~register~~ reg;  &    \cr
\+&&~~~registervalue~~ rval;  &    \cr
\+&&~~~cookie~~ kk;  &       \cr
\+&&~~~regvallist~~ nextentry;  &   \cr
\+&&$\}$                & \cr
\+&&FALSE:             & \cr
\+&&struct $\{$$\}$     & \cr
\+&$\}$ regvallist;   & & \cr
 
\smallskip
\+&typedef~~ union switch (boolean valid)~~ $\{$ & & \cr
\+&&TRUE:              & \cr
\+&&struct $\{$         & \cr
\+&&~~~register~~ reg;  &    \cr
\+&&~~~registerattribute~~ rattrib;  &    \cr
\+&&~~~cookie~~ kk;  &       \cr
\+&&~~~regattriblist~~ nextentry;  &   \cr
\+&&$\}$                & \cr
\+&&FALSE:             & \cr
\+&&struct $\{$$\}$     & \cr
\+&$\}$ regattriblist;   & & \cr
 
\smallskip
\+&typedef~~ union switch (boolean valid)~~ $\{$ & & \cr
\+&&TRUE:              & \cr
\+&&struct $\{$         & \cr
\+&&~~~register~~ reg;  &    \cr
\+&&~~~cookie~~ kk;  &       \cr
\+&&~~~reglist~~ nextentry;  &   \cr
\+&&$\}$                & \cr
\+&&FALSE:             & \cr
\+&&struct $\{$$\}$     & \cr
\+&$\}$ reglist;   & & \cr
 
 
\smallskip
 
\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.

XDR Specification
\settabs\+
\qquad&procedure  \quad&xxxxxxxxxxxxxx\quad&returns(reply)\cr
\+& procedure &  Null ()  &   returns ()\cr
\section{Procedure 1.\quad Claim Resource}
\heading={REQUEST}
\table
\half{resource name length}
\data{resource name}
\endtable
\desc
Allocates the specified resource for exclusive use of the
client.
The available resources will be dependant on the
specific server and its supported applications.
\enddesc
\heading={RESPONSE - success}
\table
\half{success $= 0$}
\full{capability}
\endtable
\desc
The response returns a 8 byte (64 bit) {\sl capability}
which is an opaque field generated by the server and used
by the client as an access token in subsequent procedure
requests for the allocated resource. 
\enddesc
\heading={RESPONSE - failure}
\table
\half{procedure status}
\endtable
\desc
{\sl Procedure status} is a 4 byte field which is non zero and
indicates the cause of the failure.
\enddesc
\smallskip
\settabs\+
\qquad&procedure status:\quad&9999\quad&xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx \cr
\+& Procedure status=&  1  &   resource not known   \cr
\+&        &  2  &  resource already in use    \cr

XDR Specification
\settabs\+
\qquad&procedure  \quad&initialiseregisterxxxxxxxxxxxxxxxxx\quad&returns(reply)\cr
\+& procedure &  ClaimResource (res)      &   returns (reply)\cr
\+&        &  resource~~ res;   &   \cr
\+&        &  union switch (stat status)~~  $\{$             &  \cr
\+&        &  ~~~~OK:                                      &  \cr
\+&        &  ~~~~capability~~cap;                         &  \cr
\+&        &  ~~~~default:                                 &  \cr
\+&        &  ~~~~struct~~  $\{\}$                             &  \cr
\+&        &  $\}$~~reply;     &  \cr
\procedure 2. Free Resource\par
\table
\full{capability}
\half{resource name length}
\data{resource name}
\endtable
\desc
The specified resource is released by the client. The server
will cancel the capability and no further access to this
resource will be permitted until after a successful 
Claim Resource request.
\enddesc
\heading={RESPONSE}
\table
\half{procedure status}
\endtable
\desc
{\sl Procedure status} is a 4 byte field which 
indicates the result of the request.
\enddesc
\smallskip
\settabs\+
\qquad&procedure status:\quad&9999\quad&xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx \cr
\+& Procedure status=&  0  &   Ok        \cr
\+&     &  1  &    resource not known                     \cr
\+&        &  3  &    capability invalid      \cr

XDR Specification
\settabs\+
\qquad&procedure  \quad&initialiseregisterxxxxxxx\quad&returns(reply)\cr
\+& procedure &  FreeResource (cap,res)  &   returns (status)\cr
\+&        &  capability~~cap;  &   \cr
\+&        &  resource~~ res;   &   \cr
\+&        &  stat~~ status;    &   \cr
\procedure 3. Define Register\par
\table
\full{capability}
\half{resource name length}
\data{resource name}
\half{register name length}
\data{register name}
\half{class name length}
\data{class name}
\endtable
\desc
If the resource specified is known by the server and the access
capability is valid 
defines a new register name 
which is to be associated with  the object 
known   by the specified class.
\enddesc
\heading={RESPONSE}
\table
\half{procedure status}
\endtable
\desc
{\sl Procedure status} is a 4 byte field which 
indicates the result of the request.
\enddesc
\smallskip
\settabs\+
\qquad&procedure status:\quad&9999\quad&xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx \cr
\+& Procedure status=&  0  & Ok          \cr
\+&     &  1  &    resource not known                     \cr
\+&     &  3  &  capability invalid \cr
\+&     &  6  &  register already defined \cr
\+&        &  7  &  unknown class       \cr
\+&        &  11 &  illegal register name  \cr
\+&        &  12 &  out of memory       \cr

XDR Specification
\settabs\+
\qquad&procedure  \quad&initialiseregisterxxxxxxxxxxxxx\quad&returns(reply)\cr
\+& procedure &  DefineRegister (cap, res, reg, p)  &   returns (status)\cr
\+&        &  capability~~cap;  &   \cr
\+&        &  resource~~ res;   &   \cr
\+&        &  register~~ reg;   &   \cr
\+&        &  class~~ c;    &   \cr
\+&        &  stat~~ status;    &   \cr
\procedure 4.  Undefine Register\par
\table
\full{capability}
\half{resource name length}
\data{resource name}
\half{register name length}
\data{register name}
\endtable
\desc
If the register specified is known by the server for the 
resource specified and the access capability is valid    
the register is removed from those known
by the server for the specified resource.
\enddesc
\heading={RESPONSE}
\table
\half{procedure status}
\endtable
\desc
{\sl Procedure status} is a 4 byte field which 
indicates the result of the request.
\enddesc
\smallskip
\settabs\+
\qquad&procedure status:\quad&9999\quad&xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx \cr
\+& Procedure status=&  0  & Ok          \cr
\+&     &  1  &  resource not known                       \cr
\+&     &  3  &  capability invalid                       \cr
\+&     &  4  &  register not known  \cr

XDR Specification
\settabs\+
\qquad&procedure  \quad&initialiseregisterxxxxxxxxxxxxx\quad&returns(reply)\cr
\+& procedure &  UndefineRegister (cap, res, reg)  &   returns (status)\cr
\+&        &  capability~~cap;  &   \cr
\+&        &  resource~~ res;   &   \cr
\+&        &  register~~ reg;   &   \cr
\+&        &  stat~~ status;    &   \cr
\procedure 5. Read Register\par
\table
\full{capability}
\half{resource name length}
\data{resource name}
\half{register name length}
\data{register name}
\endtable
\desc
If the register specified is known by the server for the 
resource specified and the access capability is valid the
read  procedure defined by the object associated with the
register is envoked and the data obtained is returned.
\enddesc
\heading={RESPONSE - success}
\table
\half{success $= 0$}
\half{register value length}
\data{register value}
\endtable
\desc
{\sl Register length} is a 4 byte field which defines the 
length of the following register data in bytes.      
\enddesc
{\sl Register value} contains the data returned by the read 
procedure. Data in this field conforms to the XDR standard for 
the particular data type.
\heading={RESPONSE - failure}
\table
\half{procedure status}
\endtable
\desc
{\sl Procedure status} is a 4 byte field which is non zero and
indicates the cause of the failure.
\enddesc
\smallskip
\settabs\+
\qquad&procedure status:\quad&9999\quad&xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx \cr
\+& Procedure status=&  1  &  resource not known \cr
\+&     &  3  &  capability invalid                       \cr
\+&     &  4  &  register not known  \cr
\+&        &  8  &   application not responding \cr
\+&        &  10 &  application detected failure  \cr

XDR Specification
\settabs\+
\qquad&procedure  \quad&initialiseregisterxxxxxxxxxxxxxxxxxx\quad&returns(reply)\cr
\+& procedure &  ReadRegister (cap, res, reg)      &   returns (reply)\cr
\+&        &  capability~~ cap;   &   \cr
\+&        &  resource~~ res;   &   \cr
\+&        &  register~~ reg;   &   \cr
\+&        &  union switch (stat status)~~  $\{$             &  \cr
\+&        &  ~~~~OK:                                      &  \cr
\+&        &  ~~~~registervalue~~v;                        &  \cr
\+&        &  ~~~~default:                                 &  \cr
\+&        &  ~~~~struct~~  $\{\}$                             &  \cr
\+&        &  $\}$~~reply;     &  \cr
\procedure 6. Write Register\par
\table
\full{capability}
\half{resource name length}
\data{resource name}
\half{register name length}
\data{register name}
\half{register value length}
\data{register value}
\endtable
\desc
If the register specified is known by the server for the 
resource specified and the access capability is valid the
write procedure defined by the object associated with the
register is envoked with the data supplied.
\enddesc
\heading={RESPONSE}
\table
\half{procedure status}
\endtable
\desc
{\sl Procedure status} is a 4 byte field which 
indicates the result of the request.
\enddesc
\smallskip
\settabs\+
\qquad&procedure status:\quad&9999\quad&xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx \cr
\+& Procedure status=&  0  & OK          \cr
\+&     &  1  &  resource not known                       \cr
\+&     &  3  &  capability invalid                       \cr
\+&     &  4  &  register not known  \cr
\+&        &  8  &   application not responding \cr
\+&        &  10 &  application detected failure  \cr

XDR Specification
\settabs\+
\qquad&procedure  \quad&initialiseregisterxxxxxxxxxxxxx\quad&returns(reply)\cr
\+& procedure &  WriteRegister (cap, res, reg, v)  &   returns (status)\cr
\+&        &  capability~~cap;  &   \cr
\+&        &  resource~~ res;   &   \cr
\+&        &  register~~ reg;   &   \cr
\+&        &  registervalue~~ v;    &   \cr
\+&        &  stat~~ status;    &   \cr
\procedure 7. Initialise Register\par
\table
\full{capability}
\half{resource name length}
\data{resource name}
\half{register name length}
\data{register name}
\endtable
\desc
If the register specified is known by the server for the 
resource specified and the access capability is valid the
initialise procedure defined by the object associated with the
register is envoked.
\enddesc
\heading={RESPONSE}
\table
\half{procedure status}
\endtable
\desc
{\sl Procedure status} is a 4 byte field which 
indicates the result of the request.
\enddesc
\smallskip
\settabs\+
\qquad&procedure status:\quad&9999\quad&xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx \cr
\+& Procedure status=&  0  &  OK         \cr
\+&     &  1  &  resource not known                       \cr
\+&     &  3  &  capability invalid                       \cr
\+&     &  4  &  register not known  \cr
\+&        &  8  &   application not responding \cr
\+&        &  10 &  application detected failure  \cr

XDR Specification
\settabs\+
\qquad&procedure  \quad&initialiseregisterxxxxxxxxxxxxx\quad&returns(reply)\cr
\+& procedure &  InitialiseRegister (cap, res, reg)  &   returns (status)\cr
\+&        &  capability~~cap;  &   \cr
\+&        &  resource~~ res;   &   \cr
\+&        &  register~~ reg;   &   \cr
\+&        &  stat~~ status;    &   \cr
\procedure 8. Inquire Registers\par
\table
\full{capability}
\half{resource name length}
\data{resource name}
\half{pattern length}
\data{pattern}
\half{cookie}
\half{count}
\endtable
\desc
If the resource specified is known by the server and the access
capability is valid  those
 register names known by the 
server for the resource  are returned with a total size of 
up to count bytes. 
The pattern string supplied is used to select the set of
registers to be returned from the total available.
\enddesc
\heading={RESPONSE - success}
\table
\half{success $= 0$}
\half{valid = 1}
\half{register name length}
\data{register name}
\half{cookie}
\data{ : }
\half{valid = 0}
\half{eod}
\endtable
\desc
Each entry contains the name of the register and a cookie
which is an opaque pointer to the next entry. The cookie
is used in the next Inquire Registers call to get more
entries starting  at a given point.  The special cookie
zero (all bits zero) can be used to get the entries 
starting at the beginning. The eod flag has a value of TRUE
if there are no more entries; valid is used to mark
the end of the entries.
\enddesc
\heading={RESPONSE - failure}
\table
\half{procedure status}
\endtable
\desc
{\sl Procedure status} is a 4 byte field which is non zero and
indicates the cause of the failure.
\enddesc
\smallskip
\settabs\+
\qquad&procedure status:\quad&9999\quad&xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx \cr
\+& Procedure status=&  1  &   resource not known \cr
\+&     &  3  &  capability invalid                       \cr
\+&        &  9  &  invalid cookie             \cr
\+&        &  13  &  count too small            \cr

XDR Specification
\settabs\+
\qquad&procedure  \quad&initialiseregisterxxxxxxxxxxxxxxxxxxxxxx\quad&returns(reply)\cr
\+& procedure &  InquireRegisters (cap, res, patt, k, n)  &   returns (reply)\cr
\+&        &  capability~~ cap;   &   \cr
\+&        &  resource~~ res;   &   \cr
\+&        &  pattern~~ patt;   &   \cr
\+&        &  cookie~~     k;   &   \cr
\+&        &  unsigned~~   n;   &   \cr
\+&        &  union switch (stat status)~~  $\{$             &  \cr
\+&        &  ~~~~OK:                                      &  \cr
\+&        &  ~~~~reglist~~regs;                           &  \cr
\+&        &  ~~~~boolean~~eod;                            &  \cr
\+&        &  ~~~~default:                                 &  \cr
\+&        &  ~~~~struct~~  $\{\}$                             &  \cr
\+&        &  $\}$~~reply;     &  \cr
\procedure 9. Read Registers\par
\table
\full{capability}
\half{resource name length}
\data{resource name}
\half{pattern length}
\data{pattern}
\half{cookie}
\half{count}
\endtable
\desc
If the resource specified is known to the server and the access capability
is valid the read procedure defined by the object 
associated with each register selected from the total available
using the supplied pattern is envoked. 
\enddesc
\heading={RESPONSE - success}
\table
\half{success $= 0$}
\half{valid = 1}
\half{register name length}
\data{register name}
\half{register value length}
\data{register value}
\half{cookie}
\data{:}
\half{valid = 0}
\half{eod}
\endtable
\desc
Each entry contains the name of the register, the data returned
by the read procedure and a cookie
which is an opaque pointer to the next entry. The cookie
is used in the next Read    Registers call to get more
entries starting  at a given point.  The special cookie
zero (all bits zero) can be used to get the entries 
starting at the beginning. The eod flag has a value of TRUE
if there are no more entries; valid is used to mark
the end of the entries.
\enddesc
\heading={RESPONSE - failure}
\table
\half{procedure status}
\endtable
\desc

\enddesc
{\sl Procedure status} is a 4 byte field which is non zero and
indicates the cause of the failure.
\smallskip
\settabs\+
\qquad&procedure status:\quad&9999\quad&xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx \cr
\+& Procedure status=&  1  &   resource not known \cr
\+&     &  3  &  capability invalid                       \cr
\+&        &  8  &   application not responding \cr
\+&        &  9  &  invalid cookie             \cr
\+&        &  10 &  application detected failure  \cr
\+&        &  13  &  count too small            \cr

XDR Specification
\settabs\+
\qquad&procedure  \quad&initialiseregisterxxxxxxxxxxxxxxxxxxxxxx\quad&returns(reply)\cr
\+& procedure &  ReadRegisters (cap, res, patt, k, n)&   returns (reply)\cr
\+&        &  capability~~ cap;   &   \cr
\+&        &  resource~~ res;   &   \cr
\+&        &  pattern~~ patt;   &   \cr
\+&        &  cookie~~     k;   &   \cr
\+&        &  unsigned~~   n;   &   \cr
\+&        &  union switch (stat status)~~  $\{$             &  \cr
\+&        &  ~~~~OK:                                      &  \cr
\+&        &  ~~~~regvallist~~regvals;                           &  \cr
\+&        &  ~~~~boolean~~eod;                            &  \cr
\+&        &  ~~~~default:                                 &  \cr
\+&        &  ~~~~struct~~  $\{\}$                             &  \cr
\+&        &  $\}$~~reply;     &  \cr
\procedure 10. Write Registers\par
\table
\full{capability}
\half{resource name length}
\data{resource name}
\half{pattern length}
\data{pattern}
\half{register value length}
\data{register value}
\endtable
\desc
If the resource specified is known to the server and the access capability
is valid the write procedure defined by the object 
associated with each register selected from the total available
using the supplied pattern is envoked with the data supplied.
\enddesc
\heading={RESPONSE}
\table
\half{procedure status}
\endtable
\desc
{\sl Procedure status} is a 4 byte field which 
indicates the result of the request.
\enddesc
\smallskip
\settabs\+
\qquad&procedure status:\quad&9999\quad&xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx \cr
\+& Procedure status=&  0  & Ok         \cr
\+&     &  1  &  resource not known                       \cr
\+&     &  3  &  capability invalid                       \cr
\+&        &  8  &   application not responding \cr
\+&        &  10 &  application detected failure  \cr

XDR Specification
\settabs\+
\qquad&procedure  \quad&initialiseregisterxxxxxxxxxxxxxxxxx\quad&returns(reply)\cr
\+& procedure &  WriteRegisters (cap, res, patt, v)  &   returns (status)\cr
\+&        &  capability~~cap;  &   \cr
\+&        &  resource~~ res;   &   \cr
\+&        &  pattern~~ patt;   &   \cr
\+&        &  registervalue~~    v;   &   \cr
\+&        &  stat~~ status;    &   \cr
\procedure 11.  Initialise Registers\par
\table
\full{capability}
\half{resource name length}
\data{resource name}
\half{pattern length}
\data{pattern}
\endtable
\desc
If the resource specified is known to the server and the access capability
is valid the initialise procedure defined by the object 
associated with each register selected from the total available
using the supplied pattern is envoked.
\enddesc
\heading={RESPONSE}
\table
\half{procedure status}
\endtable
\desc
{\sl Procedure status} is a 4 byte field which 
indicates the result of the request.
\enddesc
\smallskip
\settabs\+
\qquad&procedure status:\quad&9999\quad&xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx \cr
\+& Procedure status=&  0  & Ok         \cr
\+&     &  1  &  resource not known                       \cr
\+&     &  3  &  capability invalid                       \cr
\+&        &  8  &   application not responding \cr
\+&        &  10 &  application detected failure  \cr

XDR Specification
\settabs\+
\qquad&procedure  \quad&initialiseregisterxxxxxxxxxxxxxxxxx\quad&returns(reply)\cr
\+& procedure &  InitialiseRegisters (cap, res, patt)  &   returns (status)\cr
\+&        &  capability~~cap;  &   \cr
\+&        &  resource~~ res;   &   \cr
\+&        &  pattern~~ patt;   &   \cr
\+&        &  stat~~ status;    &   \cr
\procedure 12. Read Attribute \par
\table
\full{capability}
\half{resource name length}
\data{resource name}
\half{register name length}
\data{register name}
\endtable
\desc
If the register specified is known by the server for the 
resource specified and the access capability is valid the
attribute string  associated with the
register is returned.
\enddesc
\heading={RESPONSE - success}
\table
\half{success $= 0$}
\half{attribute value length}
\data{attribute value}
\endtable
\desc
{\sl Attribute length} is a 4 byte field which defines the 
length of the following attribute data in bytes. 
\enddesc
{\sl Attribute value} contains the data component of the
attribute. Data in this field conforms to the XDR standard for 
the particular data type.
\heading={RESPONSE - failure}
\table
\half{procedure status}
\endtable
\desc
{\sl Procedure status} is a 4 byte field which is non zero and
indicates the cause of the failure.
\enddesc
\smallskip
\settabs\+
\qquad&procedure status:\quad&9999\quad&xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx \cr
\+& Procedure status=&  1  &  resource not known \cr
\+&     &  3  &  capability invalid                       \cr
\+&     &  4  &  register not known  \cr

XDR Specification
\settabs\+
\qquad&procedure  \quad&initialiseregisterxxxxxxxxxxxxxxxxxx\quad&returns(reply)\cr
\+& procedure &  ReadAttribute (cap, res, reg)  &   returns (reply)\cr
\+&        &  capability~~ cap;   &   \cr
\+&        &  resource~~ res;   &   \cr
\+&        &  register~~ reg;   &   \cr
\+&        &  union switch (stat status)~~  $\{$             &  \cr
\+&        &  ~~~~OK:                                      &  \cr
\+&        &  ~~~~registerattribute~~v;          &  \cr
\+&        &  ~~~~default:                                 &  \cr
\+&        &  ~~~~struct~~  $\{\}$                             &  \cr
\+&        &  $\}$~~reply;     &  \cr
\procedure 13. Write Attribute\par
\table
\full{capability}
\half{resource name length}
\data{resource name}
\half{register name length}
\data{register name}
\half{attribute value length}
\data{attribute value}
\endtable
\desc
If the register specified is known by the server for the 
resource specified and the access capability is valid the
attribute string associated with the
register is defined using the data supplied.
\enddesc
\heading={RESPONSE}
\table
\half{procedure status}
\endtable
\desc
{\sl Procedure status} is a 4 byte field which 
indicates the result of the request.
\enddesc
\smallskip
\settabs\+
\qquad&procedure status:\quad&9999\quad&xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx \cr
\+& Procedure status=&  0  & OK          \cr
\+&     &  1  &  resource not known                       \cr
\+&     &  3  &  capability invalid                       \cr
\+&     &  4  &  register not known  \cr

XDR Specification
\settabs\+
\qquad&procedure  \quad&initialiseregisterxxxxxxxxxxxxxxxxxx\quad&returns(reply)\cr
\+& procedure &  WriteAttribute (cap, res, reg, v)      &   returns (status)\cr
\+&        &  capability~~ cap;   &   \cr
\+&        &  resource~~ res;   &   \cr
\+&        &  register~~ reg;   &   \cr
\+&        &  attributevalue~~v;   &   \cr
\+&        &  stat~~   status;  &   \cr
\procedure 14.  Undefine   Registers\par
\table
\full{capability}
\half{resource name length}
\data{resource name}
\half{pattern length}
\data{pattern}
\endtable
\desc
If the resource specified is known to the server and the
access capability is valid those registers selected from
the total available using the supplied pattern are 
removed from those known by the server for the specified
resource.
\enddesc
\heading={RESPONSE}
\table
\half{procedure status}
\endtable
\desc
{\sl Procedure status} is a 4 byte field which 
indicates the result of the request.
\enddesc
\smallskip
\settabs\+
\qquad&procedure status:\quad&9999\quad&xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx \cr
\+& Procedure status=&  0  & Ok         \cr
\+&     &  1  &  resource not known                       \cr
\+&     &  3  &  capability invalid                       \cr

XDR Specification
\settabs\+
\qquad&procedure  \quad&initialiseregisterxxxxxxxxxxxxxxxxxx\quad&returns(reply)\cr
\+& procedure &  UndefineRegisters (cap, res, patt)      &   returns (status)\cr
\+&        &  capability~~ cap;   &   \cr
\+&        &  resource~~ res;   &   \cr
\+&        &  pattern~~ patt;   &   \cr
\+&        &  stat~~   status;  &   \cr
\procedure 15. Read Attributes\par
\table
\full{capability}
\half{resource name length}
\data{resource name}
\half{pattern length}
\data{pattern}
\half{cookie}
\half{count}
\endtable
\desc
If the resource specified is known by the server and the access
capability is valid  those
register names and the associated attribute string known by the
server for the resource  are returned with a total size of 
up to  count bytes. 
The pattern string supplied is used to select the set of
registers to be returned from the total available.
\enddesc
\heading={RESPONSE - success}
\table
\half{success $= 0$}
\half{valid = 1}
\half{register name length}
\data{register name}
\half{attribute value length}
\data{attribute value}
\half{cookie}
\data{:}
\half{valid = 0}
\half{eod}
\endtable
\desc
Each entry contains the name of the register,
its associated attribute string and a cookie
which is an opaque pointer to the next entry. The cookie
is used in the next Read Attributes   call to get more
entries starting  at a given point.  The special cookie
zero (all bits zero) can be used to get the entries 
starting at the beginning. The eod flag has a value of TRUE
if there are no more entries; valid is used to mark
the end of the entries.
\enddesc
\heading={RESPONSE - failure}
\table
\half{procedure status}
\endtable
\desc
{\sl Procedure status} is a 4 byte field which is non zero and
indicates the cause of the failure.
\enddesc
\smallskip
\settabs\+
\qquad&procedure status:\quad&9999\quad&xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx \cr
\+& Procedure status=&  1  &    resource not known \cr
\+&     &  3  &  capability invalid                       \cr
\+&        &  13  &  count too small            \cr

XDR Specification
\settabs\+
\qquad&procedure  \quad&initialiseregisterxxxxxxxxxxxxxxxxxxxxxx\quad&returns(reply)\cr
\+& procedure &  ReadAttributes   (cap, res, patt, k, n)  &   returns (reply)\cr
\+&        &  capability~~ cap;   &   \cr
\+&        &  resource~~ res;   &   \cr
\+&        &  pattern~~ patt;   &   \cr
\+&        &  cookie~~     k;   &   \cr
\+&        &  unsigned~~   n;   &   \cr
\+&        &  union switch (stat status)~~  $\{$             &  \cr
\+&        &  ~~~~OK:                                      &  \cr
\+&        &  ~~~~regattriblist~~regattribs;        &  \cr
\+&        &  ~~~~boolean~~eod;                            &  \cr
\+&        &  ~~~~default:                                 &  \cr
\+&        &  ~~~~struct~~  $\{\}$                             &  \cr
\+&        &  $\}$~~reply;     &  \cr
\procedure 16. Write Attributes\par
\table
\full{capability}
\half{resource name length}
\data{resource name}
\half{pattern length}
\data{pattern}
\half{attribute value length}
\data{attribute value}
\endtable
\desc
If the resource specified is known to the server and the access capability
is valid the attribute string associated
with each register selected from the total available
using the supplied pattern is defined using the data supplied.
\enddesc
\heading={RESPONSE}
\table
\half{procedure status}
\endtable
\desc
{\sl Procedure status} is a 4 byte field which 
indicates the result of the request.
\enddesc
\smallskip
\settabs\+
\qquad&procedure status:\quad&9999\quad&xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx \cr
\+& Procedure status=&  0  & Ok         \cr
\+&     &  1  &  resource not known                       \cr
\+&     &  3  &  capability invalid                       \cr

XDR Specification
\settabs\+
\qquad&procedure  \quad&initialiseregisterxxxxxxxxxxxxxxxxx\quad&returns(reply)\cr
\+& procedure &  WriteAttributes (cap, res, patt, v)  &   returns (status)\cr
\+&        &  capability~~cap;  &   \cr
\+&        &  resource~~ res;   &   \cr
\+&        &  pattern~~ patt;   &   \cr
\+&        &  registervalue~~ v;    &   \cr
\+&        &  stat~~ status;    &   \cr
\end
