asyn  4-36
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:53
int getAlarmStatus()
Definition: paramVal.cpp:91
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:185
asynParamType
Parameter data types for the parameter library.
Definition: asynParamType.h:12
void resetValueChanged()
Definition: paramVal.cpp:65
epicsUInt32 uInt32RisingMask
Definition: paramVal.h:43
int getAlarmSeverity()
Definition: paramVal.cpp:104
bool valueChanged
Definition: paramVal.h:52
bool hasValueChanged()
Definition: paramVal.cpp:57
char * name
Parameter name.
Definition: paramVal.h:53
void setStatus(asynStatus status)
Definition: paramVal.cpp:69
epicsInt32 ival
Definition: paramVal.h:58
void setInteger(epicsInt32 value)
Sets the value for an integer.
Definition: paramVal.cpp:129
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:115
epicsUInt32 uInt32FallingMask
Definition: paramVal.h:44
void setValueChanged()
Definition: paramVal.cpp:61
void setString(const std::string &value)
Sets the value for a string in the parameter library.
Definition: paramVal.cpp:226
epicsUInt32 uival
Definition: paramVal.h:59
epicsFloat64 * pf64
Definition: paramVal.h:65
const char * getTypeName()
Definition: paramVal.cpp:317
static const char * typeNames[]
Definition: paramVal.h:42
std::string sval
Definition: paramVal.h:54
bool nameEquals(const char *name)
Definition: paramVal.cpp:119
void setDouble(epicsFloat64 value)
Sets the value for a double in the parameter library.
Definition: paramVal.cpp:198
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:145
epicsFloat64 getDouble()
Gets the value for an double in the parameter library.
Definition: paramVal.cpp:214
epicsInt16 * pi16
Definition: paramVal.h:62
const std::string & getString()
Gets the value for a string in the parameter library.
Definition: paramVal.cpp:242
void * pgp
Definition: paramVal.h:66
~paramVal()
Definition: paramVal.cpp:46
void report(int id, FILE *fp, int details)
Definition: paramVal.cpp:251
void setAlarmStatus(int status)
Definition: paramVal.cpp:82
void setUInt32(epicsUInt32 value, epicsUInt32 valueMask, epicsUInt32 interruptMask)
Sets the value for a UInt32 in the parameter library.
Definition: paramVal.cpp:159
epicsFloat32 * pf32
Definition: paramVal.h:64
asynStatus getStatus()
Definition: paramVal.cpp:78
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:111
void setAlarmSeverity(int severity)
Definition: paramVal.cpp:95
asynParamType type
Parameter data type.
Definition: paramVal.h:41
int alarmStatus_
Definition: paramVal.h:49