
This is our new RELEASE-4_0 branch which was taken from ansto/93d9a7c Conflicts: .gitignore SICSmain.c asynnet.c confvirtualmot.c counter.c devexec.c drive.c event.h exebuf.c exeman.c histmem.c interface.h motor.c motorlist.c motorsec.c multicounter.c napi.c napi.h napi4.c network.c nwatch.c nxscript.c nxxml.c nxxml.h ofac.c reflist.c scan.c sicshipadaba.c sicsobj.c site_ansto/docs/Copyright.txt site_ansto/instrument/lyrebird/config/tasmad/sicscommon/nxsupport.tcl site_ansto/instrument/lyrebird/config/tasmad/taspub_sics/tasscript.tcl statusfile.c tasdrive.c tasub.c tasub.h tasublib.c tasublib.h
181 lines
7.3 KiB
TeX
181 lines
7.3 KiB
TeX
\subsection{SICS Events}
|
|
This section lists the callback events known to Sics, their purpose, and
|
|
their associated event datastructures when applicable. See the
|
|
\ref{inter} section about callbacks for more information about
|
|
callbacks. This only defines the integer codes possible. Please be
|
|
aware that the implementation of the callbacks is a duty of the SICS
|
|
objects generating it. The mentioning of an event code here means it
|
|
is used somewhere in SICS but does not mean that it is implemented by
|
|
all objects which might implement the event.
|
|
|
|
This module defines several event related functions as well.
|
|
|
|
\begin{flushleft} \small
|
|
\begin{minipage}{\linewidth} \label{scrap1}
|
|
$\langle$eFunc {\footnotesize ?}$\rangle\equiv$
|
|
\vspace{-1ex}
|
|
\begin{list}{}{} \item
|
|
\mbox{}\verb@@\\
|
|
\mbox{}\verb@ int Text2Event(char *pText);@\\
|
|
\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}
|
|
{\bf Text2Event } converts a text value into an event code. It returns -1
|
|
if the event code is not known, else the apropriate event code.
|
|
|
|
\begin{flushleft} \small
|
|
\begin{minipage}{\linewidth} \label{scrap2}
|
|
$\langle$VE {\footnotesize ?}$\rangle\equiv$
|
|
\vspace{-1ex}
|
|
\begin{list}{}{} \item
|
|
\mbox{}\verb@@\\
|
|
\mbox{}\verb@#define VALUECHANGE 0@\\
|
|
\mbox{}\verb@#define MOTDRIVE 1@\\
|
|
\mbox{}\verb@#define MONITOR 2 @\\
|
|
\mbox{}\verb@#define ROTSTART 3@\\
|
|
\mbox{}\verb@#define ROTMOVE 4@\\
|
|
\mbox{}\verb@#define SCANEND 5@\\
|
|
\mbox{}\verb@#define SCANSTART 6@\\
|
|
\mbox{}\verb@#define SCANPOINT 7@\\
|
|
\mbox{}\verb@#define WLCHANGE 8@\\
|
|
\mbox{}\verb@#define REFLECTIONDONE 9@\\
|
|
\mbox{}\verb@#define COUNTSTART 10@\\
|
|
\mbox{}\verb@#define COUNTEND 11@\\
|
|
\mbox{}\verb@#define FILELOADED 12@\\
|
|
\mbox{}\verb@#define MOTEND 13@\\
|
|
\mbox{}\verb@#define BATCHSTART 14@\\
|
|
\mbox{}\verb@#define BATCHAREA 15@\\
|
|
\mbox{}\verb@#define BATCHEND 16@\\
|
|
\mbox{}\verb@#define DRIVSTAT 17@\\
|
|
\mbox{}\verb@#define STATUS 18@\\
|
|
\mbox{}\verb@#define POSITION 19@\\
|
|
\mbox{}\verb@#define HDBVAL 20@\\
|
|
\mbox{}\verb@#define STSTART 21@\\
|
|
\mbox{}\verb@#define STEND 22@\\
|
|
\mbox{}\verb@#define NEWTARGET 23@\\
|
|
\mbox{}\verb@#define DIMCHANGE 24@\\
|
|
\mbox{}\verb@#define IPAUSE 25@\\
|
|
\mbox{}\verb@#define CONTINUE 26@\\
|
|
\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{description}
|
|
\item[VALUECHANGE] This is a variable changing its value. As event data a pointer to the
|
|
SicsVariable is passed along. This is defined in sicsvar.h.
|
|
\item[MOTDRIVE] a motor is moving. The event data is the current position.
|
|
\item[MONITOR] The control value for a counting operation has changed.
|
|
The event data is the new value.
|
|
\item[ROTSTART] A velocity selector is starting up.
|
|
\item[ROTMOVE] A velocity selector changes its rotation speed.
|
|
\item[SCANEND] A scan has ended.
|
|
\item[SCANSTART] A new scan has been started.
|
|
\item[SCANPOINT] A scan point has finished and there is new data.
|
|
\item[WLCHANGE] is incoked when the wavelength of a crystal monochromator
|
|
changes. The event parameter is a pointer to the wave length or energy
|
|
variable being driven. Client code can then get what it needs to know.
|
|
\item[REFLECTIONDONE] is issued when a single reflection of a four circle
|
|
fiffractometer has been measured.
|
|
\item[COUNTSTART] is an event which signals the start of a counting
|
|
operation.
|
|
\item[COUNTEND] is an event signalling the end of a counting operation.
|
|
\item[MOTEND] signals the end of a motor driving operation.
|
|
\item[BATCHSTART] signals starting batch processing a new buffer
|
|
\item[BATCHAREA] signals that a new area of the batch file is processing.
|
|
\item[BATCHEND] signals the end of the batch buffers processing.
|
|
\item[DRIVSTAT] signals a change in the status of a driving operation
|
|
(start, finished, fault)
|
|
\item[STATUS] ANSTO defined code.
|
|
\item[POSITION] ANSTO defined code
|
|
\item[HDBVAL] The Hdb is notified of a value change. The eventData will be
|
|
the object on which the data changed.
|
|
\item[NEWTARGET] is invoked when a new target has been set on a drivable.
|
|
\item[PAUSE] Pause counting
|
|
\item[CONTINUE] Continue counting
|
|
\end{description}
|
|
|
|
|
|
Furthermore event contains system wide signal codes which are interpreted in
|
|
the signal functions provided by each SICS task. These code are
|
|
evaluated by the TaskSignalFunction which may be configured for each
|
|
SICS task. See the task section for more information. Here, only
|
|
possible codes are defined.
|
|
|
|
\begin{flushleft} \small
|
|
\begin{minipage}{\linewidth} \label{scrap3}
|
|
$\langle$VSIG {\footnotesize ?}$\rangle\equiv$
|
|
\vspace{-1ex}
|
|
\begin{list}{}{} \item
|
|
\mbox{}\verb@@\\
|
|
\mbox{}\verb@#define SICSINT 300@\\
|
|
\mbox{}\verb@#define SICSBROADCAST 301@\\
|
|
\mbox{}\verb@#define TOKENGRAB 302@\\
|
|
\mbox{}\verb@#define TOKENRELEASE 303@\\
|
|
\mbox{}\verb@#define COMLOG 304@\\
|
|
\mbox{}\verb@#define CRONLIST 305@\\
|
|
\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{description}
|
|
\item[SICSINT] An interrupt has ocurred. The signal data is the interrupt
|
|
number which ocurred.
|
|
\item[SICSBROADCAST] A message shall be sent to each SICS client. The signal
|
|
data is the string to send.
|
|
\item[TOKENGRAB] A connection has successfully grabbed the control token.
|
|
\item[TOKENRELEASE] A connection has released the control token.
|
|
\item[COMLOG] A command log message. This is to implement listen mode to the command log.
|
|
\item[CRONLIST] Tell the cron tasks to inform about themselves.
|
|
\end{description}
|
|
\begin{flushleft} \small
|
|
\begin{minipage}{\linewidth} \label{scrap4}
|
|
\verb@"event.h"@ {\footnotesize ? }$\equiv$
|
|
\vspace{-1ex}
|
|
\begin{list}{}{} \item
|
|
\mbox{}\verb@@\\
|
|
\mbox{}\verb@/*----------------------------------------------------------------------------@\\
|
|
\mbox{}\verb@ E V E N T@\\
|
|
\mbox{}\verb@@\\
|
|
\mbox{}\verb@ This header file lists the event codes known to SICS. These event code@\\
|
|
\mbox{}\verb@ are used in callback functions. Where apropriate, the event data@\\
|
|
\mbox{}\verb@ structures are also defined in this file.@\\
|
|
\mbox{}\verb@@\\
|
|
\mbox{}\verb@ Mark Koennecke, 1997@\\
|
|
\mbox{}\verb@@\\
|
|
\mbox{}\verb@----------------------------------------------------------------------------*/@\\
|
|
\mbox{}\verb@#ifndef SICSEVENT@\\
|
|
\mbox{}\verb@#define SICSEVENT@\\
|
|
\mbox{}\verb@@$\langle$eFunc {\footnotesize ?}$\rangle$\verb@@\\
|
|
\mbox{}\verb@@\\
|
|
\mbox{}\verb@@$\langle$VE {\footnotesize ?}$\rangle$\verb@@\\
|
|
\mbox{}\verb@@\\
|
|
\mbox{}\verb@/*----------------- event data structure for the NEWTARGET event ---------*/@\\
|
|
\mbox{}\verb@typedef struct {@\\
|
|
\mbox{}\verb@ char *name;@\\
|
|
\mbox{}\verb@ float target;@\\
|
|
\mbox{}\verb@ } NewTarget, *pNewTarget;@\\
|
|
\mbox{}\verb@/*--------------- Signals for the Signalfunction of each task ------------*/@\\
|
|
\mbox{}\verb@@$\langle$VSIG {\footnotesize ?}$\rangle$\verb@ @\\
|
|
\mbox{}\verb@#endif@\\
|
|
\mbox{}\verb@@$\Diamond$
|
|
\end{list}
|
|
\vspace{-2ex}
|
|
\end{minipage}\\[4ex]
|
|
\end{flushleft}
|