PSI sics-cvs-psi-2006
This commit is contained in:
35
interface.h
35
interface.h
@@ -1,5 +1,5 @@
|
||||
|
||||
#line 359 "interface.w"
|
||||
#line 379 "interface.w"
|
||||
|
||||
/*---------------------------------------------------------------------------
|
||||
I N T E R F A C E S
|
||||
@@ -17,6 +17,7 @@
|
||||
|
||||
#ifndef SICSINTERFACES
|
||||
#define SICSINTERFACES
|
||||
#include "commandcontext.h"
|
||||
|
||||
/* interface ID's used to recognize an interface */
|
||||
#define DRIVEID 513
|
||||
@@ -26,7 +27,7 @@
|
||||
|
||||
/* ----------------------- The drivable interface -----------------------*/
|
||||
|
||||
#line 117 "interface.w"
|
||||
#line 119 "interface.w"
|
||||
|
||||
|
||||
typedef struct {
|
||||
@@ -39,19 +40,22 @@
|
||||
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);
|
||||
|
||||
|
||||
#line 384 "interface.w"
|
||||
#line 405 "interface.w"
|
||||
|
||||
|
||||
pIDrivable CreateDrivableInterface(void);
|
||||
|
||||
/* ------------------------ The countable interface ---------------------*/
|
||||
|
||||
#line 177 "interface.w"
|
||||
#line 186 "interface.w"
|
||||
|
||||
typedef struct {
|
||||
int ID;
|
||||
@@ -68,23 +72,23 @@
|
||||
pICountable GetCountableInterface(void *pObject);
|
||||
|
||||
|
||||
#line 389 "interface.w"
|
||||
#line 410 "interface.w"
|
||||
|
||||
|
||||
pICountable CreateCountableInterface(void);
|
||||
|
||||
/* ------------------------- The CallBack Interface --------------------*/
|
||||
|
||||
#line 230 "interface.w"
|
||||
#line 239 "interface.w"
|
||||
|
||||
typedef void (*KillFuncIT)(void *pData);
|
||||
typedef int (*SICSCallBack)(int iEvent, void *pEventData,
|
||||
void *pUserData);
|
||||
void *pUserData, commandContext cc);
|
||||
|
||||
#line 394 "interface.w"
|
||||
#line 415 "interface.w"
|
||||
|
||||
|
||||
#line 252 "interface.w"
|
||||
#line 261 "interface.w"
|
||||
|
||||
typedef struct __ICallBack *pICallBack;
|
||||
|
||||
@@ -94,7 +98,8 @@
|
||||
int InvokeCallBack(pICallBack pInterface, int iEvent, void *pEventData);
|
||||
|
||||
/* callback client side */
|
||||
long RegisterCallback(pICallBack pInterface, int iEvent, SICSCallBack pFunc,
|
||||
long RegisterCallback(pICallBack pInterface, commandContext comCon,
|
||||
int iEvent, SICSCallBack pFunc,
|
||||
void *pUserData, KillFuncIT pKill);
|
||||
int RemoveCallback(pICallBack pInterface, long iID);
|
||||
int RemoveCallback2(pICallBack pInterface, void *pUserData);
|
||||
@@ -104,11 +109,11 @@
|
||||
|
||||
pICallBack GetCallbackInterface(void *pData);
|
||||
|
||||
#line 395 "interface.w"
|
||||
#line 416 "interface.w"
|
||||
|
||||
/*---------------------- The Environment Interface --------------------*/
|
||||
|
||||
#line 323 "interface.w"
|
||||
#line 333 "interface.w"
|
||||
|
||||
typedef enum { EVIdle, EVDrive, EVMonitor, EVError } EVMode;
|
||||
typedef struct {
|
||||
@@ -118,13 +123,13 @@
|
||||
int (*HandleError)(void *self);
|
||||
} EVInterface, *pEVInterface;
|
||||
|
||||
#line 397 "interface.w"
|
||||
#line 418 "interface.w"
|
||||
|
||||
|
||||
#line 349 "interface.w"
|
||||
#line 359 "interface.w"
|
||||
|
||||
pEVInterface CreateEVInterface(void);
|
||||
|
||||
#line 398 "interface.w"
|
||||
#line 419 "interface.w"
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user