- Adapted indenation to new agreed upon system
- Added support for second generation scriptcontext based counter
This commit is contained in:
113
interface.h
113
interface.h
@ -30,88 +30,85 @@
|
||||
#line 121 "interface.w"
|
||||
|
||||
|
||||
typedef struct {
|
||||
int ID;
|
||||
int (*Halt)(void *self);
|
||||
int (*CheckLimits)(void *self, float fVal,
|
||||
char *error, int iErrLen);
|
||||
long (*SetValue)(void *self, SConnection *pCon,
|
||||
float fVal);
|
||||
int (*CheckStatus)(void *self, SConnection *pCon);
|
||||
float (*GetValue)(void *self, SConnection *pCon);
|
||||
int iErrorCount;
|
||||
int drivableStatus;
|
||||
} IDrivable, *pIDrivable;
|
||||
typedef struct {
|
||||
int ID;
|
||||
int (*Halt) (void *self);
|
||||
int (*CheckLimits) (void *self, float fVal, char *error, int iErrLen);
|
||||
long (*SetValue) (void *self, SConnection * pCon, float fVal);
|
||||
int (*CheckStatus) (void *self, SConnection * pCon);
|
||||
float (*GetValue) (void *self, SConnection * pCon);
|
||||
int iErrorCount;
|
||||
int drivableStatus;
|
||||
} IDrivable, *pIDrivable;
|
||||
|
||||
pIDrivable GetDrivableInterface(void *pObject);
|
||||
int GetDrivablePosition(void *pObject, SConnection *pCon,
|
||||
float *fPos);
|
||||
pIDrivable GetDrivableInterface(void *pObject);
|
||||
int GetDrivablePosition(void *pObject, SConnection * pCon, float *fPos);
|
||||
|
||||
|
||||
#line 425 "interface.w"
|
||||
|
||||
|
||||
pIDrivable CreateDrivableInterface(void);
|
||||
pIDrivable CreateDrivableInterface(void);
|
||||
|
||||
/* ------------------------ The countable interface ---------------------*/
|
||||
|
||||
#line 188 "interface.w"
|
||||
|
||||
typedef struct {
|
||||
int ID;
|
||||
int running;
|
||||
int (*Halt)(void *self);
|
||||
void (*SetCountParameters)(void *self, float fPreset,
|
||||
CounterMode eMode);\
|
||||
int (*StartCount)(void *self, SConnection *pCon);
|
||||
int (*CheckCountStatus)(void *self, SConnection *pCon);
|
||||
int (*Pause)(void *self, SConnection *pCon);
|
||||
int (*Continue)(void *self, SConnection *pCon);
|
||||
int (*TransferData)(void *self, SConnection *pCon);
|
||||
} ICountable, *pICountable;
|
||||
typedef struct {
|
||||
int ID;
|
||||
int running;
|
||||
int (*Halt) (void *self);
|
||||
void (*SetCountParameters) (void *self, float fPreset,
|
||||
CounterMode eMode);
|
||||
int (*StartCount) (void *self, SConnection * pCon);
|
||||
int (*CheckCountStatus) (void *self, SConnection * pCon);
|
||||
int (*Pause) (void *self, SConnection * pCon);
|
||||
int (*Continue) (void *self, SConnection * pCon);
|
||||
int (*TransferData) (void *self, SConnection * pCon);
|
||||
} ICountable, *pICountable;
|
||||
|
||||
pICountable GetCountableInterface(void *pObject);
|
||||
int GetCountLock(pICountable self, SConnection *pCon);
|
||||
void ReleaseCountLock(pICountable self);
|
||||
int isRunning(pICountable self);
|
||||
pICountable GetCountableInterface(void *pObject);
|
||||
int GetCountLock(pICountable self, SConnection * pCon);
|
||||
void ReleaseCountLock(pICountable self);
|
||||
int isRunning(pICountable self);
|
||||
|
||||
#line 430 "interface.w"
|
||||
|
||||
|
||||
pICountable CreateCountableInterface(void);
|
||||
pICountable CreateCountableInterface(void);
|
||||
|
||||
/* ------------------------- The CallBack Interface --------------------*/
|
||||
|
||||
#line 253 "interface.w"
|
||||
|
||||
typedef void (*KillFuncIT)(void *pData);
|
||||
typedef int (*SICSCallBack)(int iEvent, void *pEventData,
|
||||
void *pUserData);
|
||||
typedef void (*KillFuncIT) (void *pData);
|
||||
typedef int (*SICSCallBack) (int iEvent, void *pEventData,
|
||||
void *pUserData);
|
||||
|
||||
#line 435 "interface.w"
|
||||
|
||||
|
||||
#line 275 "interface.w"
|
||||
|
||||
typedef struct __ICallBack *pICallBack;
|
||||
|
||||
typedef struct __ICallBack *pICallBack;
|
||||
|
||||
/* event source side */
|
||||
pICallBack CreateCallBackInterface(void);
|
||||
void DeleteCallBackInterface(pICallBack self);
|
||||
int InvokeCallBack(pICallBack pInterface, int iEvent, void *pEventData);
|
||||
pICallBack CreateCallBackInterface(void);
|
||||
void DeleteCallBackInterface(pICallBack self);
|
||||
int InvokeCallBack(pICallBack pInterface, int iEvent, void *pEventData);
|
||||
|
||||
/* callback client side */
|
||||
long RegisterCallback(pICallBack pInterface,
|
||||
int iEvent, SICSCallBack pFunc,
|
||||
void *pUserData, KillFuncIT pKill);
|
||||
int RemoveCallback(pICallBack pInterface, long iID);
|
||||
int RemoveCallback2(pICallBack pInterface, void *pUserData);
|
||||
int RemoveCallbackCon(pICallBack pInterface, SConnection *pCon);
|
||||
long RegisterCallback(pICallBack pInterface,
|
||||
int iEvent, SICSCallBack pFunc,
|
||||
void *pUserData, KillFuncIT pKill);
|
||||
int RemoveCallback(pICallBack pInterface, long iID);
|
||||
int RemoveCallback2(pICallBack pInterface, void *pUserData);
|
||||
int RemoveCallbackCon(pICallBack pInterface, SConnection * pCon);
|
||||
|
||||
int CallbackScript(SConnection *pCon, SicsInterp *pSics, void *pData,
|
||||
int argc, char *argv[]);
|
||||
int CallbackScript(SConnection * pCon, SicsInterp * pSics, void *pData,
|
||||
int argc, char *argv[]);
|
||||
|
||||
pICallBack GetCallbackInterface(void *pData);
|
||||
pICallBack GetCallbackInterface(void *pData);
|
||||
|
||||
#line 436 "interface.w"
|
||||
|
||||
@ -119,20 +116,20 @@
|
||||
|
||||
#line 353 "interface.w"
|
||||
|
||||
typedef enum { EVIdle, EVDrive, EVMonitor, EVError } EVMode;
|
||||
typedef struct {
|
||||
int iID;
|
||||
EVMode (*GetMode)(void *self);
|
||||
int (*IsInTolerance)(void *self);
|
||||
int (*HandleError)(void *self);
|
||||
} EVInterface, *pEVInterface;
|
||||
typedef enum { EVIdle, EVDrive, EVMonitor, EVError } EVMode;
|
||||
typedef struct {
|
||||
int iID;
|
||||
EVMode(*GetMode) (void *self);
|
||||
int (*IsInTolerance) (void *self);
|
||||
int (*HandleError) (void *self);
|
||||
} EVInterface, *pEVInterface;
|
||||
|
||||
#line 438 "interface.w"
|
||||
|
||||
|
||||
#line 379 "interface.w"
|
||||
|
||||
pEVInterface CreateEVInterface(void);
|
||||
pEVInterface CreateEVInterface(void);
|
||||
|
||||
#line 439 "interface.w"
|
||||
|
||||
|
Reference in New Issue
Block a user