- Reworked the connection object and the IO system
- Reworked the support for TRICS - Added a second generation motor
This commit is contained in:
14
motor.h
14
motor.h
@ -13,13 +13,17 @@
|
||||
#include "modriv.h"
|
||||
#include "obdes.h"
|
||||
#include "interface.h"
|
||||
#include "hipadaba.h"
|
||||
|
||||
#define MOTOBPARLENGTH 12
|
||||
typedef struct __Motor {
|
||||
pObjectDescriptor pDescriptor;
|
||||
ObPar *ParArray;
|
||||
pObjectDescriptor pDescriptor;
|
||||
pHdb objectNode;
|
||||
pIDrivable pDrivInt;
|
||||
pICallBack pCall;
|
||||
int (*MotorSetPar)(struct __Motor *self, SConnection *pCon, char *name, float fVal);
|
||||
int (*MotorGetPar)(struct __Motor *self, char *name, float *fVal);
|
||||
int (*MotorGetHardPosition)(struct __Motor *self, SConnection *pCon, float *fVal);
|
||||
char *drivername;
|
||||
char *name;
|
||||
MotorDriver *pDriver;
|
||||
@ -31,6 +35,10 @@
|
||||
int retryCount; /* for retries in status */
|
||||
int posFaultCount;
|
||||
int stopped;
|
||||
int errorCount;
|
||||
ObPar *ParArray;
|
||||
void *pPrivate;
|
||||
void (*KillPrivate)(void *);
|
||||
} Motor;
|
||||
typedef Motor *pMotor;
|
||||
/*------------------------------------------------------------------------
|
||||
@ -50,12 +58,10 @@ typedef struct {
|
||||
long MotorRun(void *self, SConnection *pCon, float fNew);
|
||||
int MotorCheckBoundary(pMotor self, float fVal, float *fHard,
|
||||
char *error, int iErrLen);
|
||||
int MotorCheckPosition(void *self, SConnection *pCon);
|
||||
|
||||
/* Where are we ? */
|
||||
int MotorGetSoftPosition(pMotor self,SConnection *pCon, float *fVal);
|
||||
int MotorGetHardPosition(pMotor self,SConnection *pCon, float *fVal);
|
||||
float MotorHardToSoftPosition(pMotor self, float fHard);
|
||||
|
||||
/* creation */
|
||||
int MotorCreate(SConnection *pCon, SicsInterp *pSics, void *pData,
|
||||
|
Reference in New Issue
Block a user