#ifndef DEV_MCH_H #define DEV_MCH_H #include #include #include #include #ifdef __cplusplus extern "C" { #endif /* #define SUCCESS 0 #define NO_CONVERT 2 Return value for ai record #define ERROR -1 */ /* device support return values ai: init read 0: Success. A new raw value is placed in RVAL. convert will be called. 2: Success, but don't call convert. This is useful if read_ai obtains a value already converted to engineering units or in the event a hardware failure is detected. Other: Error. bi: init read 0: Success. A new raw value is placed in RVAL. The record support module forces VAL to be (0,1) if RVAL is (0, not 0). 2: Success, but don't modify VAL. other: Error. bo: init 0: Success. RVAL modified (VAL will be set accordingly) 2: Success. VAL modified other: Error. write 0: Success. other: Error. longin: init read 0: Success. A new value is placed in VAL. Other: Error. longout: init read 0: Success. Other: Error. */ #define RESET_TIMEOUT 180 /* seconds */ /* Some arbitrary sizes */ #define MAX_NAME_LENGTH 50 #define MAX_TASK_LENGTH 10 IOSCANPVT drvMchStatScan; IOSCANPVT drvMchInitScan; IOSCANPVT drvMchFruScan; /* Much of this stolen from devBusMapped */ /* Per-MCH information kept in the registry */ typedef struct MchDevRec_ { epicsMutexId mutex; /* any other driver/devSup sharing resources must with devMch MUST LOCK THIS MUTEX when performing modifications or non-atomical reads. */ void *udata; /* for use by the driver / user */ const char name[MAX_NAME_LENGTH]; /* space for the terminating NULL; the entire string is appended here, however. */ } MchDevRec, *MchDev; /* Data private to IPMI MCH device support; to be stored in record's DPVT field */ typedef struct MchRec_ { MchDev mch; char task[MAX_TASK_LENGTH]; /* operation type */ } *MchRec; MchDev devMchRegister(const char *name); /* Find the structure of a registered MCH by name */ MchDev devMchFind(const char *name); #ifdef __cplusplus }; #endif #endif