Files
sics/doc/user/buffer.htm

54 lines
3.2 KiB
HTML

<html>
<head>
<title> RuenBuffer Commands </title>
</head>
<body>
<h2>R&#252;nbuffer Commands</h2>
<p>
LNS scientists have got used to using R&#252;nbuffers for instrument
control. A R&#252;nbuffer is an array of SICS commands which
typically represent a measurement. This R&#252;nbuffer can be edited
at run time. This is very similar to a macro. In contrast to a macro
only SICS commands are allowed in R&#252;nbuffers. When done with
editing the R&#252;nbuffer it can be entered in a R&#252;nlist. This
is a stack of R&#252;nbuffers which get executed one by one. While
this is happening it is possible (from another client) to modify the
R&#252;nlist and edit and add additional R&#252;nbuffers on top of
the stack. This allows for almost infinite measurement and gives more
control than a static batch file. In order to cater for this scheme
three commands have been defined:</p>
<p>
The <b> Buf </b> object is responsible for creating and deleting R&#252;nbuffers. The syntax is:<ul>
<li> <b> Buf new <i>name</i> </b> creates a new empty R&#252;nbuffer with the name name. name will be installed as a SICS object afterwards.
<li> <b> Buf copy <i>name1 name2</i> </b> copies R&#252;nbuffer name1 to buffer name2.
<li> <b> Buf del <i>name</i> </b> deletes the R&#252;nbuffer name.
</ul>
</p>
<p>
After creation, the R&#252;nbuffer is accessible by his name. It
then understands the commands:<ul>
<li> <b> <i>NAME</i> append <i>what shall we do with a drunken sailor</i> </b> will add all text after append as a new line at the end of the R&#252;nbuffer.
<li> <b> <i>NAME</i> print </b> will list the contents of the R&#252;nbuffer.
<li> <b> <i>NAME</i> del <i>iLine</i> </b> will delete line number iLine from the R&#252;nbuffer.
<li> <b> <i>NAME</i> ins <i>iLine BimBamBim</i> </b> inserts a new line <b> after </b> line iLine into the R&#252;nbuffer. The line will consist of everything given after the iLine.
<li> <b> <i>NAME</i> subst pattern <i>newval</i> </b> replaces all occurences of pattern in the R&#252;nbuffer by the text specified as newval. Currently this feature allows only exact match but may be expanded to Unix style regexp or shell like globbing.
<li> <b> <i>NAME</i> save <i>filename</i> </b> saves the contents of the R&#252;nbuffer into file filename.
<li> <b> <i>NAME</i> load <i>filename</i> </b> loads the R&#252;nbuffer with the data in file filename.
<li> <b> <i>NAME</i> run </b> executes the R&#252;nbuffer.
</ul>
</p>
<p>
The R&#252;nlist is accessible as object <b> stack </b>. Only one R&#252;nlist per server is permitted. The syntax:<ul>
<li> <b> stack add <i>NAME</i> </b> adds R&#252;nbuffer name to the top of the stack.
<li> <b> stack list </b> lists the current R&#252;nlist.
<li> <b> stack del <i>iLine</i> </b> deletes the R&#252;nbuffer iLine from the R&#252;nlist.
<li> <b> stack ins <i>iLine NAME</i> </b> inserts R&#252;nbuffer name after R&#252;nbuffer number iLine into the R&#252;nlist.
<li> <b> stack run </b> executes the R&#252;nlist and returns when all R&#252;nbuffers are done.
<li> <b> stack batch </b> executes the R&#252;nlist but does not return when done but waits for further R&#252;nbuffers to be added to the list. This feature allows a sort of background process in the server.
</ul>
</p>
</body>
</html>