/*============================================================================= Name: loopDev.h Abs: neutral include which both DBADDR and CAC source files can include Auth: 10 JUL-2009, drogind created Rev: -----------------------------------------------------------------------------*/ #include "copyright_SLAC.h" /*----------------------------------------------------------------------------- Mod: (newest to oldest) DD-MMM-YYYY, My Name: Changed such and such to so and so. etc. etc. DD-MMM-YYYY, Your Name: More changes ... The ordering of the revision history should be such that the NEWEST changes are at the HEAD of the list. =============================================================================*/ #ifndef INCloopDevH #define INCloopDevH #ifdef __cplusplus extern "C" { #endif #include "fcom_api.h" /* enumeration of data from fcom packets */ typedef enum { fcDefault, fcBpmX, fcBpmY, fcBpmT, fcBlenAr, fcBlenAi, fcBlenBr, fcBlenBi, } FcomAccessId_te; /* external device name information to be used for caMonitors */ typedef struct { char pvName_ca[MAX_CHAR_EPICS_NAME]; /* contains device name+ attribute */ FcomID fcomId; /* the fcom Id for this device */ FcomBlob *blob_ps; /* pointer to a blob */ FcomAccessId_te fcomAccessId; /* access into fcom data packet */ unsigned short used; /* indicates if this device is used in the loop */ double hihi; /* value of the HIHI limit */ double high; /* value of the HIGH limit */ double low; /* value of the LOW limit */ double lolo; /* value of the LOLO limit */ } device_ts; typedef struct { unsigned short measNum; /* num possible meas devices, whether used or not */ unsigned short measUsedNum; /* num used meas devices*/ unsigned short actNum; /* num possible act devices, whether used or not */ unsigned short actUsedNum; /* num used act devices */ unsigned short stateNum; /* num possible states, whether used or not */ unsigned short stateUsedNum; /* num used states */ unsigned short totalPOIs; /* total num assigned POIs */ unsigned short network; /* 0=CA, 1=FCOM */ unsigned short installed; /* 0=NO, 1=YES */ unsigned short useavg; /* 0=NO, 1=YES */ unsigned short avgcnt; /* number of measurements to average */ pattern_ts POIs_as[MAX_POIS_PER_LOOP]; /* POI struct for this loop */ device_ts measDev_as [MAX_MEAS_DEVICES]; /* meas devices info has real dev name */ device_ts actDev_as [MAX_ACT_DEVICES]; /* act devices info */ device_ts state_as[MAX_STATES]; /* state info */ epicsBoolean reConfigure; /* set when state changes to On from Off */ epicsBoolean on; /* cleared after reConfigure code is called */ int (*initFunc_pf)(ffThread_te ffThread_e ); /* pointer to init func */ int (*iterateFunc_pf)(ffThread_te ffThread_e ); /* pointer to iterate func */ int (*fMatrixFunc_pf)(ffThread_te ffThread_e ); /* pointer to F matrix func */ int (*gMatrixFunc_pf)(ffThread_te ffThread_e ); /* pointer to G matrix func */ int (*reconfigFunc_pf)(ffThread_te ffThread_e ); /* pointer to reconfig func */ } loopDev_ts; extern loopDev_ts loop_as[MAX_LOOPS]; /*extern epicsEventId wakeupTable[MAX_LOOPS];*/ #ifdef __cplusplus } #endif #endif /*INCloopDevH*/