required inclusion of a matrix package. - modified counter error handling to send a Stop when the _BAD_BUSY error is received. - added an environment interface to the general controller stuff in choco.* Also added setting a parameter directly at the controller object. - Added a driver for the ETH High Temperature Furnace to be used at SANS.
58 lines
2.0 KiB
C
58 lines
2.0 KiB
C
/*-------------------------------------------------------------------------
|
|
|
|
C O U N T E R
|
|
|
|
The SICS Interface to a single detector and his associated
|
|
monitors.
|
|
|
|
Mark Koennecke, January 1996
|
|
|
|
copyright: see implementation file.
|
|
----------------------------------------------------------------------------*/
|
|
#ifndef SICSCOUNTER
|
|
#define SICSCOUNTER
|
|
#include "countdriv.h"
|
|
|
|
typedef struct {
|
|
pObjectDescriptor pDes;
|
|
char *name;
|
|
int isUpToDate;
|
|
int iExponent;
|
|
pICountable pCountInt;
|
|
pCounterDriver pDriv;
|
|
pICallBack pCall;
|
|
unsigned long tStart;
|
|
int iCallbackCounter;
|
|
} Counter, *pCounter;
|
|
|
|
/*----------------------------- birth & death -----------------------------*/
|
|
|
|
pCounter CreateCounter(char *name, pCounterDriver pDriv);
|
|
void DeleteCounter(void *self);
|
|
int MakeCounter(SConnection *pCon, SicsInterp *pSics, void *pData,
|
|
int argc, char *argv[]);
|
|
/*------------------------- set/get Parameters ----------------------------*/
|
|
int SetCounterMode(pCounter self, CounterMode eNew);
|
|
CounterMode GetCounterMode(pCounter self);
|
|
|
|
int SetCounterPreset(pCounter self, float fVal);
|
|
float GetCounterPreset(pCounter self);
|
|
|
|
long GetCounts(pCounter self, SConnection *pCon);
|
|
long GetMonitor(pCounter self, int iNum, SConnection *pCon);
|
|
int GetNMonitor(pCounter self);
|
|
float GetCountTime(pCounter self, SConnection *pCon);
|
|
|
|
int DoCount(pCounter self,float fPreset, SConnection *pCon,
|
|
int iBlock);
|
|
|
|
/*-------------------------------------------------------------------------
|
|
the real action: starting and checking is packaged with the
|
|
ObjectDescriptor.
|
|
*/
|
|
|
|
int CountAction(SConnection *pCon, SicsInterp *pSics, void *pData,
|
|
int argc, char *argv[]);
|
|
|
|
#endif
|