asyn 4-30
/home/epics/devel/asyn-R4-30/asyn/asynPortDriver/paramVal.h
Go to the documentation of this file.
00001 #ifndef asynparamVal_H
00002 #define asynparamVal_H
00003 
00004 #include "stdio.h"
00005 #include "epicsTypes.h"
00006 #include "asynParamType.h"
00007 #include "asynDriver.h"
00008 #ifdef __cplusplus
00009 
00011 class paramVal {
00012 public:
00013     paramVal(const char *name);
00014     paramVal(const char *name, asynParamType type);
00015     bool isDefined();
00016     void setDefined(bool defined);
00017     bool hasValueChanged();
00018     void setValueChanged();
00019     void resetValueChanged();
00020     void setStatus(asynStatus status);
00021     asynStatus getStatus();
00022     void setAlarmStatus(int status);
00023     int getAlarmStatus();
00024     void setAlarmSeverity(int severity);
00025     int getAlarmSeverity();
00026     char* getName();
00027     bool nameEquals(const char* name);
00028     void setInteger(epicsInt32 value);
00029     epicsInt32 getInteger();
00030     void setUInt32(epicsUInt32 value, epicsUInt32 valueMask, epicsUInt32 interruptMask);
00031     epicsUInt32 getUInt32(epicsUInt32 valueMask);
00032     void setDouble(epicsFloat64 value);
00033     epicsFloat64 getDouble();
00034     void setString(const char *value);
00035     char *getString();
00036     void report(int id, FILE *fp, int details);
00037     const char* getTypeName();
00038     asynParamType type; 
00039     static const char* typeNames[];
00040     epicsUInt32 uInt32RisingMask;
00041     epicsUInt32 uInt32FallingMask;
00042     epicsUInt32 uInt32CallbackMask;
00043 
00044 protected:
00045     asynStatus status_;
00046     int alarmStatus_;
00047     int alarmSeverity_;
00048     bool valueDefined;
00049     bool valueChanged;
00050     char *name;         
00052     union
00053     {
00054         epicsInt32   ival;
00055         epicsUInt32  uival;
00056         epicsFloat64 dval;
00057         char         *sval;
00058         epicsInt8    *pi8;
00059         epicsInt16   *pi16;
00060         epicsInt32   *pi32;
00061         epicsFloat32 *pf32;
00062         epicsFloat64 *pf64;
00063         void         *pgp;
00064     } data;
00065 };
00066 
00067 #endif /* cplusplus */
00068 
00069 #endif