CtrlInfoI Class
A value is archived with control information. Several values might share the same control information for efficiency.
The control information is variable in size because it holds units or state strings.Interface
- Type of Value:
typedef enum { Invalid = 0, Numeric = 1, Enumerated = 2 } Type; Type getType() const;- Read Control Information: Numeric precision, units, high/low limits for display etc.:
long getPrecision() const; const char *getUnits() const; float getDisplayHigh() const; float getDisplayLow() const; float getHighAlarm() const; float getHighWarning() const; float getLowWarning() const; float getLowAlarm() const;- Initialize a Numeric CtrlInfo (sets Type to Numeric and then sets fields)
void setNumeric(long prec, const stdString &units, float disp_low, float disp_high, float low_alarm, float low_warn, float high_warn, float high_alarm);- Initialize an Enumerated CtrlInfo
void setEnumerated(size_t num_states, char *strings[]);- Format a double value according to precision
Throws Invalid if CtrlInfo is not for Numericvoid formatDouble(double value, stdString &result) const;- Enumerated: state string
size_t getNumStates() const; void getState(size_t state, stdString &result) const;
IndexCreated from sources with MakeDoc Perl script.