- Added a a general data handling object
- Extended the callback interface to register scipts on callbacks - Fixed a stop bug in the anticollision object - Modified the HM code to do zero through a client connection
This commit is contained in:
78
sicsdata.w
Normal file
78
sicsdata.w
Normal file
@ -0,0 +1,78 @@
|
||||
\subsection{SICS Generic Data}
|
||||
This is an attempt to create a generic interface between SICS data and
|
||||
clients. At the bottom of it is a auto resizing array of data. Data
|
||||
can be entered into this array either manually or copied from data
|
||||
sources such as histogram memories or scans. Data assembled in this
|
||||
way, for instance through scripts, can then be forwarded to clients
|
||||
either in UUencoded form or as a zipped array.
|
||||
|
||||
In a later stage this may be extended to support selected mathematical
|
||||
operations as well. In another stage this may supersede the uuget and
|
||||
zipget methods in the scan, histogram memory and specialized status
|
||||
objects.
|
||||
|
||||
This needs a data structure:
|
||||
@d sidastruc @{
|
||||
typedef struct {
|
||||
pObjectDescriptor pDes;
|
||||
int *data;
|
||||
char *dataType;
|
||||
int dataUsed;
|
||||
int currentDataSize;
|
||||
}SICSData, *pSICSData;
|
||||
|
||||
@}
|
||||
The fields:
|
||||
\begin{description}
|
||||
\item[pDes] The standard object descriptor.
|
||||
\item[data] The actual data array. This code assumes that sizeof(int)
|
||||
== sizeof(float).
|
||||
\item[dataType] An array defining the data type for each element of
|
||||
data. Supported are: 4 byte int and 4 byte float.
|
||||
\item[dataUsed] is the highest data element adressed so far.
|
||||
\item[currentDataSize] is the size of data.
|
||||
\end{description}
|
||||
|
||||
This object exports the following functions:
|
||||
@d sidafunc @{
|
||||
int *getSICSDataPointer(pSICSData self, int start, int end);
|
||||
|
||||
pSICSData createSICSData(void);
|
||||
|
||||
int SICSDataFactory(SConnection *pCon, SicsInterp *pSics,
|
||||
void *pData,
|
||||
int argc, char *argv[]);
|
||||
|
||||
int SICSDataAction(SConnection *pCon, SicsInterp *pSics,
|
||||
void *pData,
|
||||
int argc, char *argv[]);
|
||||
@}
|
||||
\begin{description}
|
||||
\item[getSICSDataPointer] returns a pointer to the first element of
|
||||
start in the data array. It is also ensured that enough space is
|
||||
available till end.
|
||||
\item[createSICSData] creates a new SICSData structure.
|
||||
\item[SICSDataFactory] is an interpreter function for creating and
|
||||
deleting SICSData things.
|
||||
\item[SICSDataAction] is the interpreter wrapper function through
|
||||
which users may interact with the SICSData element.
|
||||
\end{description}
|
||||
|
||||
@o sicsdata.h @{
|
||||
/*---------------------------------------------------------------------
|
||||
S I C S D A T A
|
||||
|
||||
An attempt to a generic interface to SICS data for all sorts of SICS
|
||||
clients.
|
||||
|
||||
copyright: see file COPYRIGHT
|
||||
|
||||
Mark Koennecke, June 2003
|
||||
----------------------------------------------------------------------*/
|
||||
#ifndef SICSDATA
|
||||
#define SICSDATA
|
||||
@<sidastruc@>
|
||||
/*------------------------------------------------------------------*/
|
||||
@<sidafunc@>
|
||||
#endif
|
||||
@}
|
Reference in New Issue
Block a user