asyn  4-32
paramVal.h
Go to the documentation of this file.
1 #ifndef asynparamVal_H
2 #define asynparamVal_H
3 
4 #include "stdio.h"
5 #include "epicsTypes.h"
6 #include "asynParamType.h"
7 #include "asynDriver.h"
8 #ifdef __cplusplus
9 
10 #include <string>
11 
13 class paramVal {
14 public:
15  paramVal(const char *name);
16  paramVal(const char *name, asynParamType type);
17  ~paramVal();
18  bool isDefined();
19  void setDefined(bool defined);
20  bool hasValueChanged();
21  void setValueChanged();
22  void resetValueChanged();
23  void setStatus(asynStatus status);
24  asynStatus getStatus();
25  void setAlarmStatus(int status);
26  int getAlarmStatus();
27  void setAlarmSeverity(int severity);
28  int getAlarmSeverity();
29  char* getName();
30  bool nameEquals(const char* name);
31  void setInteger(epicsInt32 value);
32  epicsInt32 getInteger();
33  void setUInt32(epicsUInt32 value, epicsUInt32 valueMask, epicsUInt32 interruptMask);
34  epicsUInt32 getUInt32(epicsUInt32 valueMask);
35  void setDouble(epicsFloat64 value);
36  epicsFloat64 getDouble();
37  void setString(const std::string& value);
38  const std::string& getString();
39  void report(int id, FILE *fp, int details);
40  const char* getTypeName();
42  static const char* typeNames[];
43  epicsUInt32 uInt32RisingMask;
44  epicsUInt32 uInt32FallingMask;
45  epicsUInt32 uInt32CallbackMask;
46 
47 protected:
48  asynStatus status_;
53  char *name;
54  std::string sval;
56  union
57  {
58  epicsInt32 ival;
59  epicsUInt32 uival;
60  epicsFloat64 dval;
61  epicsInt8 *pi8;
62  epicsInt16 *pi16;
63  epicsInt32 *pi32;
64  epicsFloat32 *pf32;
65  epicsFloat64 *pf64;
66  void *pgp;
67  } data;
68 };
69 
70 #endif /* cplusplus */
71 
72 #endif
bool isDefined()
Definition: paramVal.cpp:52
int getAlarmStatus()
Definition: paramVal.cpp:90
paramVal(const char *name)
Definition: paramVal.cpp:32
epicsUInt32 getUInt32(epicsUInt32 valueMask)
Gets the value for a UInt32 in the parameter library.
Definition: paramVal.cpp:184
asynParamType
Parameter data types for the parameter library.
Definition: asynParamType.h:12
void resetValueChanged()
Definition: paramVal.cpp:64
epicsUInt32 uInt32RisingMask
Definition: paramVal.h:43
int getAlarmSeverity()
Definition: paramVal.cpp:103
bool valueChanged
Definition: paramVal.h:52
bool hasValueChanged()
Definition: paramVal.cpp:56
char * name
Parameter name.
Definition: paramVal.h:53
void setStatus(asynStatus status)
Definition: paramVal.cpp:68
epicsInt32 ival
Definition: paramVal.h:58
void setInteger(epicsInt32 value)
Sets the value for an integer.
Definition: paramVal.cpp:128
union paramVal::@0 data
Union for parameter value.
Structure for storing parameter value in parameter library.
Definition: paramVal.h:13
epicsUInt32 uInt32CallbackMask
Definition: paramVal.h:45
int alarmSeverity_
Definition: paramVal.h:50
char * getName()
Definition: paramVal.cpp:114
epicsUInt32 uInt32FallingMask
Definition: paramVal.h:44
void setValueChanged()
Definition: paramVal.cpp:60
void setString(const std::string &value)
Sets the value for a string in the parameter library.
Definition: paramVal.cpp:225
epicsUInt32 uival
Definition: paramVal.h:59
epicsFloat64 * pf64
Definition: paramVal.h:65
const char * getTypeName()
Definition: paramVal.cpp:316
static const char * typeNames[]
Definition: paramVal.h:42
std::string sval
Definition: paramVal.h:54
bool nameEquals(const char *name)
Definition: paramVal.cpp:118
void setDouble(epicsFloat64 value)
Sets the value for a double in the parameter library.
Definition: paramVal.cpp:197
asynStatus status_
Definition: paramVal.h:48
bool valueDefined
Definition: paramVal.h:51
epicsInt32 getInteger()
Gets the value for an integer in the parameter library.
Definition: paramVal.cpp:144
epicsFloat64 getDouble()
Gets the value for an double in the parameter library.
Definition: paramVal.cpp:213
epicsInt16 * pi16
Definition: paramVal.h:62
const std::string & getString()
Gets the value for a string in the parameter library.
Definition: paramVal.cpp:241
void * pgp
Definition: paramVal.h:66
~paramVal()
Definition: paramVal.cpp:45
void report(int id, FILE *fp, int details)
Definition: paramVal.cpp:250
void setAlarmStatus(int status)
Definition: paramVal.cpp:81
void setUInt32(epicsUInt32 value, epicsUInt32 valueMask, epicsUInt32 interruptMask)
Sets the value for a UInt32 in the parameter library.
Definition: paramVal.cpp:158
epicsFloat32 * pf32
Definition: paramVal.h:64
asynStatus getStatus()
Definition: paramVal.cpp:77
epicsInt32 * pi32
Definition: paramVal.h:63
epicsFloat64 dval
Definition: paramVal.h:60
epicsInt8 * pi8
Definition: paramVal.h:61
void setDefined(bool defined)
Definition: paramVal.cpp:110
void setAlarmSeverity(int severity)
Definition: paramVal.cpp:94
asynParamType type
Parameter data type.
Definition: paramVal.h:41
int alarmStatus_
Definition: paramVal.h:49