- Adapted indenation to new agreed upon system
- Added support for second generation scriptcontext based counter
This commit is contained in:
84
counter.h
84
counter.h
@@ -13,47 +13,59 @@
|
||||
#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;
|
||||
int badStatusCount;
|
||||
} Counter, *pCounter;
|
||||
|
||||
typedef struct __Counter{
|
||||
pObjectDescriptor pDes;
|
||||
pHdb objectNode;
|
||||
char *name;
|
||||
int isUpToDate;
|
||||
int iExponent;
|
||||
pICountable pCountInt;
|
||||
pCounterDriver pDriv;
|
||||
pICallBack pCall;
|
||||
unsigned long tStart;
|
||||
int iCallbackCounter;
|
||||
int badStatusCount;
|
||||
int (*setMode)(struct __Counter *self, CounterMode eMode);
|
||||
CounterMode (*getMode)(struct __Counter *self);
|
||||
int (*getNMonitor)(struct __Counter *self);
|
||||
int (*setPreset)(struct __Counter *self, float val);
|
||||
float (*getPreset)(struct __Counter *self);
|
||||
long (*getCounts)(struct __Counter *self, SConnection *pCon);
|
||||
long (*getMonitor)(struct __Counter *self, int iNum, SConnection *pCon);
|
||||
void (*setMonitor)(struct __Counter *self, int iNum, long val);
|
||||
float (*getTime)(struct __Counter *self, SConnection *pCon);
|
||||
} 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[]);
|
||||
pCounter CreateCounter(char *name, pCounterDriver pDriv);
|
||||
void DeleteCounter(void *self);
|
||||
int MakeCounter(SConnection * pCon, SicsInterp * pSics, void *pData,
|
||||
int argc, char *argv[]);
|
||||
/* in countersec.c */
|
||||
int MakeSecCter(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);
|
||||
void SetMonitorValue(pCounter self, int index, long value);
|
||||
float GetCountTime(pCounter self, SConnection *pCon);
|
||||
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);
|
||||
void SetMonitorValue(pCounter self, int index, long value);
|
||||
float GetCountTime(pCounter self, SConnection * pCon);
|
||||
|
||||
int DoCount(pCounter self, float fPreset, SConnection * pCon, int iBlock);
|
||||
|
||||
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
|
||||
|
||||
int CountAction(SConnection * pCon, SicsInterp * pSics, void *pData,
|
||||
int argc, char *argv[]);
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user