PSI sics-cvs-psi_pre-ansto
This commit is contained in:
37
doc/programmer/alias.tex
Normal file
37
doc/programmer/alias.tex
Normal file
@@ -0,0 +1,37 @@
|
||||
\subsection{The Alias Facility}
|
||||
Aliases make commands available under a different name. SICS currently supports two types of aliases:
|
||||
\begin{itemize}
|
||||
\item Object aliases. This is a facility for renaming first class SICS
|
||||
objects such as commands and hardware objects. This is installed into
|
||||
SICS by creating a new name in the interpreter but with the data
|
||||
structures of the original object. Thus all interface operations such
|
||||
as driving etc will work. Object aliases are installed from the
|
||||
initialization script through the SicsAlias command.
|
||||
\item Command aliases. This is just plain text replacement. For
|
||||
instance one may define ``sttll'' instead of ``a4 softlowerlim''. Such
|
||||
an alias can be installed with the ``alias'' command at any
|
||||
time. However, renaming a motor with this scheme will not work
|
||||
properly as this alias facility has no way to forward interfaces
|
||||
properly.
|
||||
\end{itemize}
|
||||
There is no
|
||||
data structure associated with object aliases. The trick is done by
|
||||
just putting in
|
||||
the same command as a new name into the interpreter.
|
||||
|
||||
Corrspondingly there is only one function to it:
|
||||
\begin{verbatim}
|
||||
int SicsAlias(SConnection *pCon, SicsInterp *pSics, void *pData,
|
||||
int argc, char *argv[]);
|
||||
\end{verbatim}
|
||||
SicsAlias is the object wrapper function which implements the alias command.
|
||||
|
||||
|
||||
Command aliases are implemented through:
|
||||
\begin{verbatim}
|
||||
int MakeAlias(SConnection *pCon, SicsInterp *pSics, void *pData,
|
||||
int argc, char *argv[]);
|
||||
\end{verbatim}
|
||||
There is a little trivial data structure associated with command
|
||||
aliases which is defined in alias.c.
|
||||
|
||||
Reference in New Issue
Block a user