66 lines
2.4 KiB
HTML
66 lines
2.4 KiB
HTML
<HTML>
|
|
<HEAD>
|
|
<TITLE>Aliases in SICS</TITLE>
|
|
</HEAD>
|
|
<BODY>
|
|
<H1>Aliases in SICS</H1>
|
|
<P>
|
|
SICS knows three different kinds of aliases: object aliases,
|
|
runtime aliases and command
|
|
aliases. This is confusing but finds its explanation in the structure
|
|
of SICS internals.
|
|
</P>
|
|
<h2>Object Aliases</h2>
|
|
<p>
|
|
An object alias is another name for a first class object installed
|
|
into the SICS interpreter. For instance a second name for a motor. For
|
|
instance the motor twotheta is quite often aliased to a4. Such an
|
|
alias can be used like a normal SICS objects. Even in commands which
|
|
access internal SICS interfaces like the drive command or
|
|
others. Object aliases are installed into SICS with the SICSAlias
|
|
command:
|
|
<DL>
|
|
<DT>SicsAlias oldname newname
|
|
<DD>This command installs newname as alias for the object oldname.
|
|
</dl>
|
|
SicsAlias can only be used within initialization scripts. SicsAlias is
|
|
considered deprecated and can be replaced with the superior runtime
|
|
aliases described below.
|
|
</p>
|
|
<h2>Runtime Aliases</h2>
|
|
<p>
|
|
Runtime aliases are full object aliases which can be configured into the
|
|
system at run time by a SICS manager.
|
|
The syntax looks like this:
|
|
<dl>
|
|
<dt>DefineAlias aliasname SICSobject
|
|
<dd>This defines aliasname to be the alias for the SICS object SICSobject.
|
|
It is not needed that SICSobject already exists. If SICSobject is already
|
|
an alias, it is translated before definition.
|
|
Multiple translation is possible, depending on the order of definition.
|
|
When an alias is used, and it does not point to an existing object,
|
|
the behaviour is the same as if an unknown object would have been used.
|
|
<dt>DefineAlias aliasname
|
|
<dd>This command deletes the alias aliasname.
|
|
</dl>
|
|
</p>
|
|
<h2>Command Aliases</h2>
|
|
<p>
|
|
Command aliases are shortcuts for lengthy commands. For instance one
|
|
might want to define A4LL as a shortcut for "a4 softlowerlim". This is
|
|
just to save typing or adapt SICS to MAD users who appear to have an
|
|
unlimited memory for 2-4 letter acronyms. It is possible to redefine a
|
|
SICS object with this for instance to define tt as an alias for
|
|
temperature. However if one tries to use tt in a drive command it will
|
|
fail because it is just a text replacement. A command alias can be
|
|
installed into SICS at any time with manager privilege and the
|
|
command:
|
|
<DL>
|
|
<DT>alias shortcut bla bla bla ....
|
|
<DD>This define shortcut as an alias for everything behind it.
|
|
</DL>
|
|
A shortcut may take parameters.
|
|
</p>
|
|
</BODY>
|
|
</HTML>
|