asyn  4-41
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 setInteger64(epicsInt64 value);
34  epicsInt64 getInteger64();
35  void setUInt32(epicsUInt32 value, epicsUInt32 valueMask, epicsUInt32 interruptMask);
36  epicsUInt32 getUInt32(epicsUInt32 valueMask);
37  void setDouble(epicsFloat64 value);
38  epicsFloat64 getDouble();
39  void setString(const std::string& value);
40  const std::string& getString();
41  void report(int id, FILE *fp, int details);
42  const char* getTypeName();
44  static const char* typeNames[];
45  epicsUInt32 uInt32RisingMask;
46  epicsUInt32 uInt32FallingMask;
47  epicsUInt32 uInt32CallbackMask;
48 
49 protected:
50  asynStatus status_;
55  char *name;
56  std::string sval;
58  union
59  {
60  epicsInt32 ival;
61  epicsInt64 i64val;
62  epicsUInt32 uival;
63  epicsFloat64 dval;
64  epicsInt8 *pi8;
65  epicsInt16 *pi16;
66  epicsInt32 *pi32;
67  epicsInt64 *pi64;
68  epicsFloat32 *pf32;
69  epicsFloat64 *pf64;
70  void *pgp;
71  } data;
72 };
73 
74 #endif /* cplusplus */
75 
76 #endif
bool isDefined()
Definition: paramVal.cpp:55
int getAlarmStatus()
Definition: paramVal.cpp:93
paramVal(const char *name)
Definition: paramVal.cpp:34
epicsInt64 * pi64
Definition: paramVal.h:67
epicsUInt32 getUInt32(epicsUInt32 valueMask)
Gets the value for a UInt32 in the parameter library.
Definition: paramVal.cpp:216
asynParamType
Parameter data types for the parameter library.
Definition: asynParamType.h:12
void resetValueChanged()
Definition: paramVal.cpp:67
epicsInt64 getInteger64()
Gets the value for a 64-bit integer in the parameter library.
Definition: paramVal.cpp:176
epicsUInt32 uInt32RisingMask
Definition: paramVal.h:45
int getAlarmSeverity()
Definition: paramVal.cpp:106
bool valueChanged
Definition: paramVal.h:54
bool hasValueChanged()
Definition: paramVal.cpp:59
char * name
Parameter name.
Definition: paramVal.h:55
void setStatus(asynStatus status)
Definition: paramVal.cpp:71
epicsInt32 ival
Definition: paramVal.h:60
void setInteger(epicsInt32 value)
Sets the value for an integer.
Definition: paramVal.cpp:131
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:47
int alarmSeverity_
Definition: paramVal.h:52
char * getName()
Definition: paramVal.cpp:117
epicsUInt32 uInt32FallingMask
Definition: paramVal.h:46
void setValueChanged()
Definition: paramVal.cpp:63
void setString(const std::string &value)
Sets the value for a string in the parameter library.
Definition: paramVal.cpp:257
epicsUInt32 uival
Definition: paramVal.h:62
epicsFloat64 * pf64
Definition: paramVal.h:69
const char * getTypeName()
Definition: paramVal.cpp:360
static const char * typeNames[]
Definition: paramVal.h:44
std::string sval
Definition: paramVal.h:56
bool nameEquals(const char *name)
Definition: paramVal.cpp:121
void setDouble(epicsFloat64 value)
Sets the value for a double in the parameter library.
Definition: paramVal.cpp:229
asynStatus status_
Definition: paramVal.h:50
bool valueDefined
Definition: paramVal.h:53
epicsInt32 getInteger()
Gets the value for an integer in the parameter library.
Definition: paramVal.cpp:147
epicsFloat64 getDouble()
Gets the value for an double in the parameter library.
Definition: paramVal.cpp:245
epicsInt16 * pi16
Definition: paramVal.h:65
const std::string & getString()
Gets the value for a string in the parameter library.
Definition: paramVal.cpp:273
void * pgp
Definition: paramVal.h:70
~paramVal()
Definition: paramVal.cpp:48
void setInteger64(epicsInt64 value)
Sets the value for a 64-bit integer.
Definition: paramVal.cpp:160
void report(int id, FILE *fp, int details)
Definition: paramVal.cpp:282
void setAlarmStatus(int status)
Definition: paramVal.cpp:84
void setUInt32(epicsUInt32 value, epicsUInt32 valueMask, epicsUInt32 interruptMask)
Sets the value for a UInt32 in the parameter library.
Definition: paramVal.cpp:190
epicsFloat32 * pf32
Definition: paramVal.h:68
asynStatus getStatus()
Definition: paramVal.cpp:80
epicsInt32 * pi32
Definition: paramVal.h:66
epicsFloat64 dval
Definition: paramVal.h:63
epicsInt8 * pi8
Definition: paramVal.h:64
void setDefined(bool defined)
Definition: paramVal.cpp:113
void setAlarmSeverity(int severity)
Definition: paramVal.cpp:97
asynParamType type
Parameter data type.
Definition: paramVal.h:43
epicsInt64 i64val
Definition: paramVal.h:61
int alarmStatus_
Definition: paramVal.h:51