Class StandardField¶
Defined in File standardField.h
Class Documentation¶
-
class StandardField¶
Standard Fields is a class or creating or sharing Field objects for standard fields.
For each type of standard object two methods are defined:s one with no properties and with properties The property field is a comma separated string of property names of the following: alarm, timeStamp, display, control, and valueAlarm. An example is “alarm,timeStamp,valueAlarm”. The method with properties creates a structure with fields named fieldName and each of the property names. Each property field is a structure defining the property. The details about each property is given in the section named “Property”. For example the call:
Will result in a Field definition that has the form:StructureConstPtr example = standardField->scalar( std::string("value"), pvDouble, std::string("value,alarm,timeStamp"));
In addition there are methods that create each of the property structures, i.e. the methods named: alarm, …. enumeratedAlarm.”structure example double value structure alarm int severity int status string message structure timeStamp long secondsPastEpoch int nanoseconds long userTag
StandardField is a singleton class. The class is accessed via the statement:
StandardField *standardField = getStandardField();
Public Functions
-
~StandardField()¶
-
StructureConstPtr scalar(ScalarType type, std::string const &properties)¶
Create a structure that has a scalar value field.
- Parameters
type – The type.
properties – A comma separated list of properties. This is some combination of “alarm,timeStamp,display,control,valueAlarm”.
- Returns
The const shared pointer to the structure.
-
StructureConstPtr regUnion(UnionConstPtr const &punion, std::string const &properties)¶
Create a structure that has a union value field.
- Parameters
punion – The interface for value field.
properties – A comma separated list of properties. This is some combination of “alarm,timeStamp,display,control,valueAlarm”.
- Returns
The const shared pointer to the structure.
-
StructureConstPtr variantUnion(std::string const &properties)¶
Create a structure that has a variant union value field.
- Parameters
properties – A comma separated list of properties. This is some combination of “alarm,timeStamp,display,control,valueAlarm”.
- Returns
The const shared pointer to the structure.
-
StructureConstPtr scalarArray(ScalarType elementType, std::string const &properties)¶
Create a structure that has a scalarArray value field.
- Parameters
elementType – The element type.
properties – A comma separated list of properties. This is some combination of “alarm,timeStamp,display,control,valueAlarm”.
- Returns
The const shared pointer to the structure.
-
StructureConstPtr structureArray(StructureConstPtr const &structure, std::string const &properties)¶
Create a structure that has a structureArray value field.
- Parameters
structure – The Structure introspection object for elements of the value field.
properties – A comma separated list of properties. This is some combination of “alarm,timeStamp,display,control,valueAlarm”.
- Returns
The const shared pointer to the structure.
-
StructureConstPtr unionArray(UnionConstPtr const &punion, std::string const &properties)¶
Create a structure that has a unionArray value field.
- Parameters
punion – The Union introspection object for elements of the value field.
properties – A comma separated list of properties. This is some combination of “alarm,timeStamp,display,control”.
- Returns
The const shared pointer to the structure.
-
StructureConstPtr enumerated()¶
Create a structure that has an enumerated structure value field. The id for the structure is “enum_t”.
- Returns
The const shared pointer to the structure.
-
StructureConstPtr enumerated(std::string const &properties)¶
Create a structure that has an enumerated structure value field The id for the structure is “epics:nt/NTEnum:1.0”.
- Parameters
properties – A comma separated list of properties. This is some combination of “alarm,timeStamp,display,control,valueAlarm”.
- Returns
The const shared pointer to the structure.
-
inline const StructureConstPtr &alarm() const¶
create an alarm structure
- Returns
The const shared pointer to the structure.
-
inline const StructureConstPtr &timeStamp() const¶
create a timeStamp structure
- Returns
The const shared pointer to the structure.
-
inline const StructureConstPtr &display() const¶
create a display structure
- Returns
The const shared pointer to the structure.
-
inline const StructureConstPtr &control() const¶
create a control structure
- Returns
The const shared pointer to the structure.
-
inline const StructureConstPtr &booleanAlarm() const¶
create a boolean alarm structure
- Returns
The const shared pointer to the structure.
-
inline const StructureConstPtr &byteAlarm() const¶
create a byte alarm structure
- Returns
The const shared pointer to the structure.
-
inline const StructureConstPtr &ubyteAlarm() const¶
create a unsigned byte alarm structure
- Returns
The const shared pointer to the structure.
-
inline const StructureConstPtr &shortAlarm() const¶
create a short alarm structure
- Returns
The const shared pointer to the structure.
-
inline const StructureConstPtr &ushortAlarm() const¶
create a unsigned short alarm structure
- Returns
The const shared pointer to the structure.
-
inline const StructureConstPtr &intAlarm() const¶
create an int alarm structure
- Returns
The const shared pointer to the structure.
-
inline const StructureConstPtr &uintAlarm() const¶
create a unsigned int alarm structure
- Returns
The const shared pointer to the structure.
-
inline const StructureConstPtr &longAlarm() const¶
create a long alarm structure
- Returns
The const shared pointer to the structure.
-
inline const StructureConstPtr &ulongAlarm() const¶
create a unsigned long alarm structure
- Returns
The const shared pointer to the structure.
-
inline const StructureConstPtr &floatAlarm() const¶
create a float alarm structure
- Returns
The const shared pointer to the structure.
-
inline const StructureConstPtr &doubleAlarm() const¶
create a double alarm structure
- Returns
The const shared pointer to the structure.
-
inline const StructureConstPtr &enumeratedAlarm() const¶
create an enumerated alarm structure
- Returns
The const shared pointer to the structure.
Public Static Functions
-
static const StandardFieldPtr &getStandardField()¶
getStandardField returns the singleton.
- Returns
Shared pointer to StandardField.
-
~StandardField()¶