asyn 4-22
/home/epics/devel/asynR4-22/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     char* getName();
00023     bool nameEquals(const char* name);
00024     void setInteger(epicsInt32 value);
00025     epicsInt32 getInteger();
00026     void setUInt32(epicsUInt32 value, epicsUInt32 valueMask, epicsUInt32 interruptMask);
00027     epicsUInt32 getUInt32(epicsUInt32 valueMask);
00028     void setDouble(epicsFloat64 value);
00029     epicsFloat64 getDouble();
00030     void setString(const char *value);
00031     char *getString();
00032     void report(int id, FILE *fp, int details);
00033     const char* getTypeName();
00034     asynParamType type; 
00035     static const char* typeNames[];
00036     epicsUInt32 uInt32RisingMask;
00037     epicsUInt32 uInt32FallingMask;
00038     epicsUInt32 uInt32CallbackMask;
00039 
00040 protected:
00041     asynStatus status_;
00042     bool valueDefined;
00043     bool valueChanged;
00044     char *name;         
00046     union
00047     {
00048         epicsInt32   ival;
00049         epicsUInt32  uival;
00050         epicsFloat64 dval;
00051         char         *sval;
00052         epicsInt8    *pi8;
00053         epicsInt16   *pi16;
00054         epicsInt32   *pi32;
00055         epicsFloat32 *pf32;
00056         epicsFloat64 *pf64;
00057         void         *pgp;
00058     } data;
00059 };
00060 
00061 #endif /* cplusplus */
00062 
00063 #endif