- Added SicsList
- Removed group and description attributes from ObjectDescriptor SKIPPED: psi/dornier2.c psi/libpsi.a psi/make_gen psi/makefile_linux psi/pimotor.c psi/pipiezo.c psi/psi.c psi/serial.c psi/sinqhttp.c psi/sinqhttp.h psi/tcpdornier.c psi/velodornier.c
This commit is contained in:
118
interface.tex
118
interface.tex
@ -1,13 +1,3 @@
|
||||
\newcommand{\NWtarget}[2]{#2}
|
||||
\newcommand{\NWlink}[2]{#2}
|
||||
\newcommand{\NWtxtMacroDefBy}{Macro defined by}
|
||||
\newcommand{\NWtxtMacroRefIn}{Macro referenced in}
|
||||
\newcommand{\NWtxtMacroNoRef}{Macro never referenced}
|
||||
\newcommand{\NWtxtDefBy}{Defined by}
|
||||
\newcommand{\NWtxtRefIn}{Referenced in}
|
||||
\newcommand{\NWtxtNoRef}{Not referenced}
|
||||
\newcommand{\NWtxtFileDefBy}{File defined by}
|
||||
\newcommand{\NWsep}{${\diamond}$}
|
||||
\subsection{Object interfaces}\label{inter}
|
||||
In order to present themselves to the system SICS objects need to adhere to
|
||||
certyain interfaces. These interfaces are described in this
|
||||
@ -38,24 +28,24 @@ Let's start with the objectdescriptor:
|
||||
|
||||
\begin{flushleft} \small
|
||||
\begin{minipage}{\linewidth} \label{scrap1}
|
||||
$\langle\,$obdes\nobreak\ {\footnotesize \NWtarget{nuweb?}{?}}$\,\rangle\equiv$
|
||||
$\langle$obdes {\footnotesize ?}$\rangle\equiv$
|
||||
\vspace{-1ex}
|
||||
\begin{list}{}{} \item
|
||||
\mbox{}\verb@@\\
|
||||
\mbox{}\verb@/*--------------------------------------------------------------------------@\\
|
||||
\mbox{}\verb@ In SICS there is the to find out what an@\\
|
||||
\mbox{}\verb@ object is capable of at runtime. If this has been done a general@\\
|
||||
\mbox{}\verb@ way to access those capabilities is needed. In order to do all@\\
|
||||
\mbox{}\verb@ this each SICS-object is required to carry an object descriptor@\\
|
||||
\mbox{}\verb@ struct as first parameter in its class/object struct. Additionslly@\\
|
||||
\mbox{}\verb@ it is required to initialize this struct to something sensible.@\\
|
||||
\mbox{}\verb@ @\\
|
||||
\mbox{}\verb@ This file defines this struct. Additionally a few functions of@\\
|
||||
\mbox{}\verb@ general use are prototyped.@\\
|
||||
\mbox{}\verb@ @\\
|
||||
\mbox{}\verb@ Mark Koennecke, June, 1997@\\
|
||||
\mbox{}\verb@ @\\
|
||||
\mbox{}\verb@ copyrigth: see implementation file @\\
|
||||
\mbox{}\verb@ In SICS there is the to find out what an@\\
|
||||
\mbox{}\verb@ object is capable of at runtime. If this has been done a general@\\
|
||||
\mbox{}\verb@ way to access those capabilities is needed. In order to do all@\\
|
||||
\mbox{}\verb@ this each SICS-object is required to carry an object descriptor@\\
|
||||
\mbox{}\verb@ struct as first parameter in its class/object struct. Additionslly@\\
|
||||
\mbox{}\verb@ it is required to initialize this struct to something sensible.@\\
|
||||
\mbox{}\verb@ @\\
|
||||
\mbox{}\verb@ This file defines this struct. Additionally a few functions of@\\
|
||||
\mbox{}\verb@ general use are prototyped.@\\
|
||||
\mbox{}\verb@ @\\
|
||||
\mbox{}\verb@ Mark Koennecke, June, 1997@\\
|
||||
\mbox{}\verb@ @\\
|
||||
\mbox{}\verb@ copyrigth: see implementation file @\\
|
||||
\mbox{}\verb@----------------------------------------------------------------------------*/@\\
|
||||
\mbox{}\verb@#ifndef SICSDESCRIPTOR@\\
|
||||
\mbox{}\verb@#define SICSDESCRIPTOR@\\
|
||||
@ -66,8 +56,6 @@ $\langle\,$obdes\nobreak\ {\footnotesize \NWtarget{nuweb?}{?}}$\,\rangle\equiv$
|
||||
\mbox{}\verb@ char *name;@\\
|
||||
\mbox{}\verb@ int (*SaveStatus)(void *self, char *name,FILE *fd);@\\
|
||||
\mbox{}\verb@ void *(*GetInterface)(void *self, int iInterfaceID);@\\
|
||||
\mbox{}\verb@ char *description;@\\
|
||||
\mbox{}\verb@ char *group;@\\
|
||||
\mbox{}\verb@ IPair *pKeys;@\\
|
||||
\mbox{}\verb@ } ObjectDescriptor, *pObjectDescriptor;@\\
|
||||
\mbox{}\verb@@\\
|
||||
@ -77,9 +65,9 @@ $\langle\,$obdes\nobreak\ {\footnotesize \NWtarget{nuweb?}{?}}$\,\rangle\equiv$
|
||||
\mbox{}\verb@ pObjectDescriptor FindDescriptor(void *pData);@\\
|
||||
\mbox{}\verb@ @\\
|
||||
\mbox{}\verb@/*============================================================================@\\
|
||||
\mbox{}\verb@ Objects which do not carry data need a dummy descriptor. Otherwise@\\
|
||||
\mbox{}\verb@ drive or scan will protection fault when trying to drive something@\\
|
||||
\mbox{}\verb@ which should not be driven. This is defined below.@\\
|
||||
\mbox{}\verb@ Objects which do not carry data need a dummy descriptor. Otherwise@\\
|
||||
\mbox{}\verb@ drive or scan will protection fault when trying to drive something@\\
|
||||
\mbox{}\verb@ which should not be driven. This is defined below.@\\
|
||||
\mbox{}\verb@*/@\\
|
||||
\mbox{}\verb@@\\
|
||||
\mbox{}\verb@typedef struct {@\\
|
||||
@ -88,17 +76,17 @@ $\langle\,$obdes\nobreak\ {\footnotesize \NWtarget{nuweb?}{?}}$\,\rangle\equiv$
|
||||
\mbox{}\verb@ @\\
|
||||
\mbox{}\verb@@\\
|
||||
\mbox{}\verb@ pDummy CreateDummy(char *name);@\\
|
||||
\mbox{}\verb@ void KillDummy(void *pData); @\\
|
||||
\mbox{}\verb@ void KillDummy(void *pData); @\\
|
||||
\mbox{}\verb@@\\
|
||||
\mbox{}\verb@ int iHasType(void *pData, char *Type);@\\
|
||||
\mbox{}\verb@ @\\
|
||||
\mbox{}\verb@#endif @\\
|
||||
\mbox{}\verb@@{\NWsep}
|
||||
\mbox{}\verb@@$\diamond$
|
||||
\end{list}
|
||||
\vspace{-1ex}
|
||||
\footnotesize\addtolength{\baselineskip}{-1ex}
|
||||
\begin{list}{}{\setlength{\itemsep}{-\parsep}\setlength{\itemindent}{-\leftmargin}}
|
||||
\item \NWtxtMacroRefIn\ \NWlink{nuweb?}{?}.
|
||||
\item Macro referenced in scrap ?.
|
||||
\end{list}
|
||||
\end{minipage}\\[4ex]
|
||||
\end{flushleft}
|
||||
@ -142,7 +130,7 @@ environment controllers fit this bill as well.
|
||||
|
||||
\begin{flushleft} \small
|
||||
\begin{minipage}{\linewidth} \label{scrap2}
|
||||
$\langle\,$driv\nobreak\ {\footnotesize \NWtarget{nuweb?}{?}}$\,\rangle\equiv$
|
||||
$\langle$driv {\footnotesize ?}$\rangle\equiv$
|
||||
\vspace{-1ex}
|
||||
\begin{list}{}{} \item
|
||||
\mbox{}\verb@@\\
|
||||
@ -161,15 +149,15 @@ $\langle\,$driv\nobreak\ {\footnotesize \NWtarget{nuweb?}{?}}$\,\rangle\equiv$
|
||||
\mbox{}\verb@ } IDrivable, *pIDrivable;@\\
|
||||
\mbox{}\verb@@\\
|
||||
\mbox{}\verb@ pIDrivable GetDrivableInterface(void *pObject); @\\
|
||||
\mbox{}\verb@ int GetDrivablePosition(void *pObject, SConnection *pCon,@\\
|
||||
\mbox{}\verb@ float *fPos);@\\
|
||||
\mbox{}\verb@ int GetDrivablePosition(void *pObject, SConnection *pCon,@\\
|
||||
\mbox{}\verb@ float *fPos);@\\
|
||||
\mbox{}\verb@@\\
|
||||
\mbox{}\verb@@{\NWsep}
|
||||
\mbox{}\verb@@$\diamond$
|
||||
\end{list}
|
||||
\vspace{-1ex}
|
||||
\footnotesize\addtolength{\baselineskip}{-1ex}
|
||||
\begin{list}{}{\setlength{\itemsep}{-\parsep}\setlength{\itemindent}{-\leftmargin}}
|
||||
\item \NWtxtMacroRefIn\ \NWlink{nuweb?}{?}.
|
||||
\item Macro referenced in scrap ?.
|
||||
\end{list}
|
||||
\end{minipage}\\[4ex]
|
||||
\end{flushleft}
|
||||
@ -222,7 +210,7 @@ This is an interface for interacting with anything which counts.
|
||||
|
||||
\begin{flushleft} \small
|
||||
\begin{minipage}{\linewidth} \label{scrap3}
|
||||
$\langle\,$count\nobreak\ {\footnotesize \NWtarget{nuweb?}{?}}$\,\rangle\equiv$
|
||||
$\langle$count {\footnotesize ?}$\rangle\equiv$
|
||||
\vspace{-1ex}
|
||||
\begin{list}{}{} \item
|
||||
\mbox{}\verb@@\\
|
||||
@ -240,12 +228,12 @@ $\langle\,$count\nobreak\ {\footnotesize \NWtarget{nuweb?}{?}}$\,\rangle\equiv$
|
||||
\mbox{}\verb@@\\
|
||||
\mbox{}\verb@ pICountable GetCountableInterface(void *pObject); @\\
|
||||
\mbox{}\verb@@\\
|
||||
\mbox{}\verb@@{\NWsep}
|
||||
\mbox{}\verb@@$\diamond$
|
||||
\end{list}
|
||||
\vspace{-1ex}
|
||||
\footnotesize\addtolength{\baselineskip}{-1ex}
|
||||
\begin{list}{}{\setlength{\itemsep}{-\parsep}\setlength{\itemindent}{-\leftmargin}}
|
||||
\item \NWtxtMacroRefIn\ \NWlink{nuweb?}{?}.
|
||||
\item Macro referenced in scrap ?.
|
||||
\end{list}
|
||||
\end{minipage}\\[4ex]
|
||||
\end{flushleft}
|
||||
@ -287,19 +275,19 @@ The first thing to define for such an interface is the type of the callback
|
||||
function:
|
||||
\begin{flushleft} \small
|
||||
\begin{minipage}{\linewidth} \label{scrap4}
|
||||
$\langle\,$callfunc\nobreak\ {\footnotesize \NWtarget{nuweb?}{?}}$\,\rangle\equiv$
|
||||
$\langle$callfunc {\footnotesize ?}$\rangle\equiv$
|
||||
\vspace{-1ex}
|
||||
\begin{list}{}{} \item
|
||||
\mbox{}\verb@@\\
|
||||
\mbox{}\verb@ typedef void (*KillFuncIT)(void *pData);@\\
|
||||
\mbox{}\verb@ typedef int (*SICSCallBack)(int iEvent, void *pEventData, @\\
|
||||
\mbox{}\verb@ void *pUserData, commandContext cc);@\\
|
||||
\mbox{}\verb@@{\NWsep}
|
||||
\mbox{}\verb@@$\diamond$
|
||||
\end{list}
|
||||
\vspace{-1ex}
|
||||
\footnotesize\addtolength{\baselineskip}{-1ex}
|
||||
\begin{list}{}{\setlength{\itemsep}{-\parsep}\setlength{\itemindent}{-\leftmargin}}
|
||||
\item \NWtxtMacroRefIn\ \NWlink{nuweb?}{?}.
|
||||
\item Macro referenced in scrap ?.
|
||||
\end{list}
|
||||
\end{minipage}\\[4ex]
|
||||
\end{flushleft}
|
||||
@ -321,7 +309,7 @@ interface:
|
||||
|
||||
\begin{flushleft} \small
|
||||
\begin{minipage}{\linewidth} \label{scrap5}
|
||||
$\langle\,$cifunc\nobreak\ {\footnotesize \NWtarget{nuweb?}{?}}$\,\rangle\equiv$
|
||||
$\langle$cifunc {\footnotesize ?}$\rangle\equiv$
|
||||
\vspace{-1ex}
|
||||
\begin{list}{}{} \item
|
||||
\mbox{}\verb@@\\
|
||||
@ -340,15 +328,15 @@ $\langle\,$cifunc\nobreak\ {\footnotesize \NWtarget{nuweb?}{?}}$\,\rangle\equiv$
|
||||
\mbox{}\verb@ int RemoveCallback2(pICallBack pInterface, void *pUserData);@\\
|
||||
\mbox{}\verb@@\\
|
||||
\mbox{}\verb@ int CallbackScript(SConnection *pCon, SicsInterp *pSics, void *pData,@\\
|
||||
\mbox{}\verb@ int argc, char *argv[]); @\\
|
||||
\mbox{}\verb@ int argc, char *argv[]); @\\
|
||||
\mbox{}\verb@@\\
|
||||
\mbox{}\verb@ pICallBack GetCallbackInterface(void *pData); @\\
|
||||
\mbox{}\verb@@{\NWsep}
|
||||
\mbox{}\verb@@$\diamond$
|
||||
\end{list}
|
||||
\vspace{-1ex}
|
||||
\footnotesize\addtolength{\baselineskip}{-1ex}
|
||||
\begin{list}{}{\setlength{\itemsep}{-\parsep}\setlength{\itemindent}{-\leftmargin}}
|
||||
\item \NWtxtMacroRefIn\ \NWlink{nuweb?}{?}.
|
||||
\item Macro referenced in scrap ?.
|
||||
\end{list}
|
||||
\end{minipage}\\[4ex]
|
||||
\end{flushleft}
|
||||
@ -405,7 +393,7 @@ This interface is used by the environment monitor in order to monitor
|
||||
the status of a environment controller. The interface looks like this:
|
||||
\begin{flushleft} \small
|
||||
\begin{minipage}{\linewidth} \label{scrap6}
|
||||
$\langle\,$envir\nobreak\ {\footnotesize \NWtarget{nuweb?}{?}}$\,\rangle\equiv$
|
||||
$\langle$envir {\footnotesize ?}$\rangle\equiv$
|
||||
\vspace{-1ex}
|
||||
\begin{list}{}{} \item
|
||||
\mbox{}\verb@@\\
|
||||
@ -416,12 +404,12 @@ $\langle\,$envir\nobreak\ {\footnotesize \NWtarget{nuweb?}{?}}$\,\rangle\equiv$
|
||||
\mbox{}\verb@ int (*IsInTolerance)(void *self);@\\
|
||||
\mbox{}\verb@ int (*HandleError)(void *self);@\\
|
||||
\mbox{}\verb@ } EVInterface, *pEVInterface;@\\
|
||||
\mbox{}\verb@@{\NWsep}
|
||||
\mbox{}\verb@@$\diamond$
|
||||
\end{list}
|
||||
\vspace{-1ex}
|
||||
\footnotesize\addtolength{\baselineskip}{-1ex}
|
||||
\begin{list}{}{\setlength{\itemsep}{-\parsep}\setlength{\itemindent}{-\leftmargin}}
|
||||
\item \NWtxtMacroRefIn\ \NWlink{nuweb?}{?}.
|
||||
\item Macro referenced in scrap ?.
|
||||
\end{list}
|
||||
\end{minipage}\\[4ex]
|
||||
\end{flushleft}
|
||||
@ -444,17 +432,17 @@ in question.
|
||||
The environment interface has just one function associated with it:
|
||||
\begin{flushleft} \small
|
||||
\begin{minipage}{\linewidth} \label{scrap7}
|
||||
$\langle\,$envfunc\nobreak\ {\footnotesize \NWtarget{nuweb?}{?}}$\,\rangle\equiv$
|
||||
$\langle$envfunc {\footnotesize ?}$\rangle\equiv$
|
||||
\vspace{-1ex}
|
||||
\begin{list}{}{} \item
|
||||
\mbox{}\verb@@\\
|
||||
\mbox{}\verb@ pEVInterface CreateEVInterface(void);@\\
|
||||
\mbox{}\verb@@{\NWsep}
|
||||
\mbox{}\verb@@$\diamond$
|
||||
\end{list}
|
||||
\vspace{-1ex}
|
||||
\footnotesize\addtolength{\baselineskip}{-1ex}
|
||||
\begin{list}{}{\setlength{\itemsep}{-\parsep}\setlength{\itemindent}{-\leftmargin}}
|
||||
\item \NWtxtMacroRefIn\ \NWlink{nuweb?}{?}.
|
||||
\item Macro referenced in scrap ?.
|
||||
\end{list}
|
||||
\end{minipage}\\[4ex]
|
||||
\end{flushleft}
|
||||
@ -462,11 +450,11 @@ $\langle\,$envfunc\nobreak\ {\footnotesize \NWtarget{nuweb?}{?}}$\,\rangle\equiv
|
||||
|
||||
\begin{flushleft} \small
|
||||
\begin{minipage}{\linewidth} \label{scrap8}
|
||||
\verb@"obdes.h"@\nobreak\ {\footnotesize \NWtarget{nuweb?}{?} }$\equiv$
|
||||
\verb@"obdes.h"@ {\footnotesize ? }$\equiv$
|
||||
\vspace{-1ex}
|
||||
\begin{list}{}{} \item
|
||||
\mbox{}\verb@@\\
|
||||
\mbox{}\verb@@\hbox{$\langle\,$obdes\nobreak\ {\footnotesize \NWlink{nuweb?}{?}}$\,\rangle$}\verb@@\\
|
||||
\mbox{}\verb@@$\langle$obdes {\footnotesize ?}$\rangle$\verb@@\\
|
||||
\mbox{}\verb@/*--------------------------------------------------------------------------*/@\\
|
||||
\mbox{}\verb@/* Additional properties used by the ANSTO site to provide more information@\\
|
||||
\mbox{}\verb@ * about each object instance, especially devices.@\\
|
||||
@ -477,19 +465,19 @@ $\langle\,$envfunc\nobreak\ {\footnotesize \NWtarget{nuweb?}{?}}$\,\rangle\equiv
|
||||
\mbox{}\verb@ char * GetDescriptorKey(pObjectDescriptor self, char *keyName);@\\
|
||||
\mbox{}\verb@ char * GetDescriptorGroup(pObjectDescriptor self);@\\
|
||||
\mbox{}\verb@ char * GetDescriptorDescription(pObjectDescriptor self);@\\
|
||||
\mbox{}\verb@@{\NWsep}
|
||||
\mbox{}\verb@@$\diamond$
|
||||
\end{list}
|
||||
\vspace{-2ex}
|
||||
\end{minipage}\\[4ex]
|
||||
\end{flushleft}
|
||||
\begin{flushleft} \small
|
||||
\begin{minipage}{\linewidth} \label{scrap9}
|
||||
\verb@"interface.h"@\nobreak\ {\footnotesize \NWtarget{nuweb?}{?} }$\equiv$
|
||||
\verb@"interface.h"@ {\footnotesize ? }$\equiv$
|
||||
\vspace{-1ex}
|
||||
\begin{list}{}{} \item
|
||||
\mbox{}\verb@@\\
|
||||
\mbox{}\verb@/*---------------------------------------------------------------------------@\\
|
||||
\mbox{}\verb@ I N T E R F A C E S@\\
|
||||
\mbox{}\verb@ I N T E R F A C E S@\\
|
||||
\mbox{}\verb@@\\
|
||||
\mbox{}\verb@ Any object in SICS has to adhere to the object descriptor interface (see@\\
|
||||
\mbox{}\verb@ file obdes.h). Furthermore SICS objects may choose to support other@\\
|
||||
@ -513,23 +501,23 @@ $\langle\,$envfunc\nobreak\ {\footnotesize \NWtarget{nuweb?}{?}}$\,\rangle\equiv
|
||||
\mbox{}\verb@#define ENVIRINTERFACE 949@\\
|
||||
\mbox{}\verb@@\\
|
||||
\mbox{}\verb@/* ----------------------- The drivable interface -----------------------*/@\\
|
||||
\mbox{}\verb@@\hbox{$\langle\,$driv\nobreak\ {\footnotesize \NWlink{nuweb?}{?}}$\,\rangle$}\verb@@\\
|
||||
\mbox{}\verb@@$\langle$driv {\footnotesize ?}$\rangle$\verb@@\\
|
||||
\mbox{}\verb@@\\
|
||||
\mbox{}\verb@ pIDrivable CreateDrivableInterface(void);@\\
|
||||
\mbox{}\verb@@\\
|
||||
\mbox{}\verb@/* ------------------------ The countable interface ---------------------*/@\\
|
||||
\mbox{}\verb@@\hbox{$\langle\,$count\nobreak\ {\footnotesize \NWlink{nuweb?}{?}}$\,\rangle$}\verb@@\\
|
||||
\mbox{}\verb@@$\langle$count {\footnotesize ?}$\rangle$\verb@@\\
|
||||
\mbox{}\verb@@\\
|
||||
\mbox{}\verb@ pICountable CreateCountableInterface(void);@\\
|
||||
\mbox{}\verb@@\\
|
||||
\mbox{}\verb@/* ------------------------- The CallBack Interface --------------------*/@\\
|
||||
\mbox{}\verb@@\hbox{$\langle\,$callfunc\nobreak\ {\footnotesize \NWlink{nuweb?}{?}}$\,\rangle$}\verb@@\\
|
||||
\mbox{}\verb@@\hbox{$\langle\,$cifunc\nobreak\ {\footnotesize \NWlink{nuweb?}{?}}$\,\rangle$}\verb@@\\
|
||||
\mbox{}\verb@@$\langle$callfunc {\footnotesize ?}$\rangle$\verb@@\\
|
||||
\mbox{}\verb@@$\langle$cifunc {\footnotesize ?}$\rangle$\verb@@\\
|
||||
\mbox{}\verb@/*---------------------- The Environment Interface --------------------*/@\\
|
||||
\mbox{}\verb@@\hbox{$\langle\,$envir\nobreak\ {\footnotesize \NWlink{nuweb?}{?}}$\,\rangle$}\verb@@\\
|
||||
\mbox{}\verb@@\hbox{$\langle\,$envfunc\nobreak\ {\footnotesize \NWlink{nuweb?}{?}}$\,\rangle$}\verb@@\\
|
||||
\mbox{}\verb@@$\langle$envir {\footnotesize ?}$\rangle$\verb@@\\
|
||||
\mbox{}\verb@@$\langle$envfunc {\footnotesize ?}$\rangle$\verb@@\\
|
||||
\mbox{}\verb@#endif@\\
|
||||
\mbox{}\verb@@{\NWsep}
|
||||
\mbox{}\verb@@$\diamond$
|
||||
\end{list}
|
||||
\vspace{-2ex}
|
||||
\end{minipage}\\[4ex]
|
||||
|
Reference in New Issue
Block a user