140 lines
5.7 KiB
TeX
140 lines
5.7 KiB
TeX
\subsection{Amor Status Display Support}
|
|
The reflectometer AMOR has a few unique status display requirements:
|
|
\begin{itemize}
|
|
\item In scan mode up to four detector counts curves must be shown for
|
|
the two counters in spin-up or spin-down mode. This needs to be
|
|
updated after each scan point.
|
|
\item Additionally user defined curves may need to be displayed.
|
|
\item The usual helper information muste be displayed.
|
|
\item In TOF mode it must be possible to define a region on the
|
|
detector whose summed counts are displayed versus the time
|
|
binning. This must be sent on request.
|
|
\end{itemize}
|
|
In order to cover all this a special object within SICS is required
|
|
which deals with all this and packages information in a status display
|
|
compliant way.
|
|
|
|
In order to do this the amorstatus object registers callbacks both
|
|
with the histogram memory and the scan object. These callback
|
|
functions are then responsible for updating the status displays. In
|
|
order for amorstatus to be able to do this, the client must register
|
|
itself with a special command.
|
|
|
|
In order to achieve all this some data structures are needed:
|
|
\begin{flushleft} \small
|
|
\begin{minipage}{\linewidth} \label{scrap1}
|
|
$\langle$asdata {\footnotesize ?}$\rangle\equiv$
|
|
\vspace{-1ex}
|
|
\begin{list}{}{} \item
|
|
\mbox{}\verb@@\\
|
|
\mbox{}\verb@/*---------------------------------------------------------------------*/@\\
|
|
\mbox{}\verb@ typedef struct {@\\
|
|
\mbox{}\verb@ float *fX, *fY;@\\
|
|
\mbox{}\verb@ int iNP;@\\
|
|
\mbox{}\verb@ char *name;@\\
|
|
\mbox{}\verb@ }UserData, *pUserData; @\\
|
|
\mbox{}\verb@/*---------------------------------------------------------------------*/@\\
|
|
\mbox{}\verb@ typedef struct __AMORSTAT {@\\
|
|
\mbox{}\verb@ pObjectDescriptor pDes;@\\
|
|
\mbox{}\verb@ pICallBack pCall;@\\
|
|
\mbox{}\verb@ int iUserList;@\\
|
|
\mbox{}\verb@ pScanData pScan;@\\
|
|
\mbox{}\verb@ pHistMem pHM;@\\
|
|
\mbox{}\verb@ int iTOF;@\\
|
|
\mbox{}\verb@ int iHTTP;@\\
|
|
\mbox{}\verb@ }AmorStat, *pAmorStat;@\\
|
|
\mbox{}\verb@ @\\
|
|
\mbox{}\verb@@$\diamond$
|
|
\end{list}
|
|
\vspace{-1ex}
|
|
\footnotesize\addtolength{\baselineskip}{-1ex}
|
|
\begin{list}{}{\setlength{\itemsep}{-\parsep}\setlength{\itemindent}{-\leftmargin}}
|
|
\item Macro referenced in scrap ?.
|
|
\end{list}
|
|
\end{minipage}\\[4ex]
|
|
\end{flushleft}
|
|
The fourth data structure is the amor status object data structure. It
|
|
has the following fields:
|
|
\begin{description}
|
|
\item[pDes] The standard SICS object descriptor.
|
|
\item[pCall] The callback interface.
|
|
\item[iUserList] A list of user data loaded data.
|
|
\item[pScan] A pointer to the scan object.
|
|
\item[pHM] A pointer to the histogram memory.
|
|
\item[iTOF] A flag which is true if we are taking measurements in TOF
|
|
mode.
|
|
\end{description}
|
|
|
|
In terms of a function interface this object has not much to
|
|
offer. Its main purpose is really as an interface to the status
|
|
display clients and thus it is configured through the interpreter
|
|
interface function. No need for other SICS objects to access it.
|
|
|
|
\begin{flushleft} \small
|
|
\begin{minipage}{\linewidth} \label{scrap2}
|
|
$\langle$asinter {\footnotesize ?}$\rangle\equiv$
|
|
\vspace{-1ex}
|
|
\begin{list}{}{} \item
|
|
\mbox{}\verb@@\\
|
|
\mbox{}\verb@ int AmorStatusFactory(SConnection *pCon, SicsInterp *pSics, void *pData,@\\
|
|
\mbox{}\verb@ int argc, char *argv[]);@\\
|
|
\mbox{}\verb@ int AmorStatusAction(SConnection *pCon, SicsInterp *pSics, void *pData,@\\
|
|
\mbox{}\verb@ int argc, char *argv[]);@\\
|
|
\mbox{}\verb@ void KillAmorStatus(void *pData);@\\
|
|
\mbox{}\verb@@$\diamond$
|
|
\end{list}
|
|
\vspace{-1ex}
|
|
\footnotesize\addtolength{\baselineskip}{-1ex}
|
|
\begin{list}{}{\setlength{\itemsep}{-\parsep}\setlength{\itemindent}{-\leftmargin}}
|
|
\item Macro referenced in scrap ?.
|
|
\end{list}
|
|
\end{minipage}\\[4ex]
|
|
\end{flushleft}
|
|
\begin{flushleft} \small
|
|
\begin{minipage}{\linewidth} \label{scrap3}
|
|
\verb@"amorstat.i"@ {\footnotesize ? }$\equiv$
|
|
\vspace{-1ex}
|
|
\begin{list}{}{} \item
|
|
\mbox{}\verb@@\\
|
|
\mbox{}\verb@/*------------------------------------------------------------------------@\\
|
|
\mbox{}\verb@ A M O R S T A T U S@\\
|
|
\mbox{}\verb@@\\
|
|
\mbox{}\verb@ Internal data structure definitions for the AMOR status display @\\
|
|
\mbox{}\verb@ facilitator object. DO NOT CHANGE. This file is automatically@\\
|
|
\mbox{}\verb@ created from amorstat.w.@\\
|
|
\mbox{}\verb@@\\
|
|
\mbox{}\verb@ Mark Koennecke, September 1999@\\
|
|
\mbox{}\verb@---------------------------------------------------------------------*/@\\
|
|
\mbox{}\verb@@$\langle$asdata {\footnotesize ?}$\rangle$\verb@@\\
|
|
\mbox{}\verb@ @\\
|
|
\mbox{}\verb@@$\diamond$
|
|
\end{list}
|
|
\vspace{-2ex}
|
|
\end{minipage}\\[4ex]
|
|
\end{flushleft}
|
|
\begin{flushleft} \small
|
|
\begin{minipage}{\linewidth} \label{scrap4}
|
|
\verb@"amorstat.h"@ {\footnotesize ? }$\equiv$
|
|
\vspace{-1ex}
|
|
\begin{list}{}{} \item
|
|
\mbox{}\verb@@\\
|
|
\mbox{}\verb@/*------------------------------------------------------------------------@\\
|
|
\mbox{}\verb@ A M O R S T A T U S@\\
|
|
\mbox{}\verb@@\\
|
|
\mbox{}\verb@ Public definitions for the AMOR status display @\\
|
|
\mbox{}\verb@ facilitator object. DO NOT CHANGE. This file is automatically@\\
|
|
\mbox{}\verb@ created from amorstat.w.@\\
|
|
\mbox{}\verb@@\\
|
|
\mbox{}\verb@ Mark Koennecke, September 1999@\\
|
|
\mbox{}\verb@---------------------------------------------------------------------*/@\\
|
|
\mbox{}\verb@#ifndef AMORSTATUS@\\
|
|
\mbox{}\verb@#define AMORSTATUS@\\
|
|
\mbox{}\verb@@$\langle$asinter {\footnotesize ?}$\rangle$\verb@@\\
|
|
\mbox{}\verb@#endif@\\
|
|
\mbox{}\verb@@\\
|
|
\mbox{}\verb@@$\diamond$
|
|
\end{list}
|
|
\vspace{-2ex}
|
|
\end{minipage}\\[4ex]
|
|
\end{flushleft}
|