- Fixed various bugs in evcontroller relating to bad access after
initialization failure. - Fixed a bug in scan.c which causes scan to go in an endless loop when SICS failed to start a motor. - Fixed a bug in motor.c which caused bad softwarelimits after changes to the softzero. - Started changes in choco* in order incorporate normal parameters and an environment driver.
This commit is contained in:
24
choco.w
24
choco.w
@ -1,8 +1,9 @@
|
||||
\subsection{Chopper Controller}
|
||||
Yet another way to deal with a controller has beenn devised for
|
||||
Yet another way to deal with a controller has been devised for
|
||||
SICS. This uses the concept of a general controller which can have
|
||||
parameters enquired and set. Furthermore it may have parameters which
|
||||
may be driven like a motor through a special adapter. This scheme is
|
||||
may be driven like a motor or environment controller through special
|
||||
adapters . This scheme is
|
||||
used for the chopper controller for FOCUS.
|
||||
\begin{itemize}
|
||||
\item A driver for a particular controller which allows to set and get
|
||||
@ -11,6 +12,7 @@ parameters.
|
||||
\item An adapter object which allows to drive special parameters in a general
|
||||
controller. Such adapter objects can be configured for each drivable parameter
|
||||
in a controller.
|
||||
\item An adapter to an environment controller driver.
|
||||
\end{itemize}
|
||||
The test case for this way of doing things is a controller for running
|
||||
choppers. This is why it gets the name.
|
||||
@ -72,7 +74,7 @@ fValue. The last is floating point which covers the frequent
|
||||
occurence of numeric values.
|
||||
\item[SetPar2] The same as SetPar but uses test string as input for
|
||||
parameter setting.
|
||||
\item[GetPar] retrieves the parameter parname formatted as test. The
|
||||
\item[GetPar] retrieves the parameter parname formatted as text. The
|
||||
value is put into the buffer pBuffer. iBufLen is the maximum number of
|
||||
bytes permissable for pBuffer.
|
||||
\item[CheckPar] When parameters are driven a means is needed to find
|
||||
@ -141,7 +143,7 @@ the internal data structure for a controller object is very simple:
|
||||
It consists just of the standard SICS object descriptor and a pointer
|
||||
to the driver.
|
||||
|
||||
\subsubsection{The Drive Adapter}
|
||||
\subsubsection{The Drive And Environment Adapters}
|
||||
Most of the work of the drive adaptor is hidden in the functions
|
||||
implementing the drivable interface. Thus the interface to the
|
||||
DriveAdapter is fairly simple:
|
||||
@ -155,6 +157,8 @@ DriveAdapter is fairly simple:
|
||||
int CHAdapterAction(SConnection *pCon, SicsInterp *pSics,
|
||||
void *pData,
|
||||
int argc, char *argv[]);
|
||||
|
||||
pEVDriver MakeControllerEnvironmentDriver(int argc, char *argv[]);
|
||||
|
||||
@}
|
||||
\begin{description}
|
||||
@ -163,6 +167,8 @@ creating a drive adapter.
|
||||
\item[CHAdapterAction] is the SICS interpreter function for
|
||||
representing the object in SICS. Just a single action is supported:
|
||||
request the value of the parameter.
|
||||
\item[MakeControllerEnvironmentDriver] creates an environment control
|
||||
driver for a parameter in a general controller object.
|
||||
\end{description}
|
||||
|
||||
The data structure for the drive adapter is slightly more interesting:
|
||||
@ -188,6 +194,15 @@ The data structure for the drive adapter is slightly more interesting:
|
||||
this adapter.
|
||||
\end{description}
|
||||
|
||||
This is the data structure for the private part of the environment
|
||||
controller driver:
|
||||
@d evada @{
|
||||
typedef struct __CHEV {
|
||||
char *pParName;
|
||||
pCodri pDriv;
|
||||
}CHev, *pCHev;
|
||||
@}
|
||||
|
||||
@o codri.h @{
|
||||
/*-------------------------------------------------------------------------
|
||||
C o n t r o l l e r D r i v e r
|
||||
@ -242,6 +257,7 @@ this adapter.
|
||||
@<adapter@>
|
||||
#ifdef CHADAINTERNAL
|
||||
@<adadata@>
|
||||
@<evada@>
|
||||
#endif
|
||||
#endif
|
||||
@}
|
||||
|
Reference in New Issue
Block a user