- Adapted indenation to new agreed upon system
- Fixed bad status in poldi zug driver
This commit is contained in:
59
ease.h
59
ease.h
@ -23,8 +23,10 @@ Markus Zolliker, March 2005
|
||||
#define EASE_RUN 0
|
||||
|
||||
typedef enum { EASE_connecting, EASE_notconnected,
|
||||
EASE_idle, EASE_read, EASE_expect, EASE_lost } EaseState;
|
||||
typedef enum { EASE_notMonitored, EASE_inTolerance, EASE_outOfTolerance } EaseTolState;
|
||||
EASE_idle, EASE_read, EASE_expect, EASE_lost
|
||||
} EaseState;
|
||||
typedef enum { EASE_notMonitored, EASE_inTolerance,
|
||||
EASE_outOfTolerance } EaseTolState;
|
||||
|
||||
typedef struct {
|
||||
ParData p;
|
||||
@ -35,11 +37,11 @@ typedef struct {
|
||||
FsmFunc doit;
|
||||
FsmFunc todo;
|
||||
rs232 *ser;
|
||||
Fsm *task; /* a pointer to the task */
|
||||
int errCode; /* error code of last operation. not changed on success */
|
||||
Fsm *task; /* a pointer to the task */
|
||||
int errCode; /* error code of last operation. not changed on success */
|
||||
EaseState state;
|
||||
time_t cmdtime;
|
||||
int syntax; /* not used in ease, may be used by the driver. used by oxinst.c */
|
||||
int syntax; /* not used in ease, may be used by the driver. used by oxinst.c */
|
||||
char cmd[64];
|
||||
char ans[64];
|
||||
char version[64];
|
||||
@ -58,7 +60,7 @@ typedef struct {
|
||||
EVInterface *evInt;
|
||||
EVMode eMode;
|
||||
int stopped;
|
||||
int hwstate; /* SICS driver state */
|
||||
int hwstate; /* SICS driver state */
|
||||
EaseTolState tolState;
|
||||
float upperLimit;
|
||||
float lowerLimit;
|
||||
@ -76,28 +78,28 @@ ParClass *EaseDrivClass(void);
|
||||
EaseBase *EaseBaseCast(void *object);
|
||||
EaseDriv *EaseDrivCast(void *object);
|
||||
|
||||
void EaseWriteError(EaseBase *eab);
|
||||
void EaseWrite(EaseBase *eab, char *cmd);
|
||||
int EaseWaitRead(EaseBase *eab);
|
||||
int EaseHandler(EaseBase *eab);
|
||||
void EaseWriteError(EaseBase * eab);
|
||||
void EaseWrite(EaseBase * eab, char *cmd);
|
||||
int EaseWaitRead(EaseBase * eab);
|
||||
int EaseHandler(EaseBase * eab);
|
||||
void EaseBasePar(void *object);
|
||||
void EaseSendPar(void *object);
|
||||
void EaseMsgPar(void *object);
|
||||
void EaseKillDriv(EaseDriv *ead);
|
||||
void EaseKillDriv(EaseDriv * ead);
|
||||
void EaseDrivPar(void *object, char *fmt, char *unit);
|
||||
void EaseParHasChanged(void);
|
||||
void EaseStop(EaseBase *eab);
|
||||
int EaseCheckDoit(EaseBase *eab);
|
||||
int EaseNextFullRead(EaseBase *eab);
|
||||
void EaseStop(EaseBase * eab);
|
||||
int EaseCheckDoit(EaseBase * eab);
|
||||
int EaseNextFullRead(EaseBase * eab);
|
||||
|
||||
int EaseUpdate(int flag); /* used inside pardef, after ParName and before
|
||||
the parameter definition.
|
||||
The specified flag is updated
|
||||
when the parameter was changed.
|
||||
returns 1 when changed, 0 when not changed
|
||||
calls ParAccess(usUser) and ParSave(1), as
|
||||
this seems to be useful for parameters
|
||||
that reflect a state of the device. */
|
||||
int EaseUpdate(int flag); /* used inside pardef, after ParName and before
|
||||
the parameter definition.
|
||||
The specified flag is updated
|
||||
when the parameter was changed.
|
||||
returns 1 when changed, 0 when not changed
|
||||
calls ParAccess(usUser) and ParSave(1), as
|
||||
this seems to be useful for parameters
|
||||
that reflect a state of the device. */
|
||||
int EaseNextUpdate(void *object);
|
||||
/* get next update flag and clear it.
|
||||
return the next set update flag or -1 when no
|
||||
@ -108,20 +110,15 @@ int EaseGetUpdate(void *object, int flag);
|
||||
void EaseSetUpdate(void *object, int flag, int state);
|
||||
/* set an update flag */
|
||||
|
||||
void *EaseMakeBase(SConnection *con, void *class, int argc, char *argv[],
|
||||
void *EaseMakeBase(SConnection * con, void *class, int argc, char *argv[],
|
||||
int dynamic, int maxflag,
|
||||
ParDef pardef,
|
||||
FsmHandler handler,
|
||||
FsmFunc start,
|
||||
FsmFunc idle,
|
||||
FsmFunc read);
|
||||
void *EaseMakeDriv(SConnection *con, void *class, int argc, char *argv[],
|
||||
FsmFunc start, FsmFunc idle, FsmFunc read);
|
||||
void *EaseMakeDriv(SConnection * con, void *class, int argc, char *argv[],
|
||||
int dynamic, int maxflag,
|
||||
ParDef pardef,
|
||||
FsmHandler handler,
|
||||
FsmFunc start,
|
||||
FsmFunc idle,
|
||||
FsmFunc read,
|
||||
FsmFunc run);
|
||||
FsmFunc start, FsmFunc idle, FsmFunc read, FsmFunc run);
|
||||
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user