Fields
Each class can contain two categories of field—Configuration fields and Data fields. The configuration fields store the data that defines the setup of each database item, and the data fields store the values for the database items.
Both the configuration fields and the data fields can be any of the following field types:
- AOI Reference—This is the object ID of an Area of Interest in the database. This field is a 32-bit unsigned integer. 0 is the 'World' Area of Interest (which is typically assigned as the Default Area of Interest).
The field only applies to systems on which the Area of Interest feature is enabled (see Restrict Alarm and Event Access to Specific Areas of Interest in the Geo SCADA Expert Guide to Core Configuration).
- Boolean—This is a True/False value.
- Byte (Unsigned)—This is an 8-bit integer. The range is 0 to 255 inclusive.
- Colour—This is a color value. The color is a Red Green Blue (RGB) 32-bit integer value.
Red = Bits 0 to 7
Green = Bits 8 to 15
Blue = Bits 16 to 23
Unused (zero) = Bits 24 to 31.0x00FF0000 (=16711680) is pure blue.
0x00FFFFFF (=16777215) (the sum of 255+(255*256)+(255*65536)) is white.
- Double (Signed)—This is an IEEE 64-bit double precision real value (floating point value). The range is:
±2.23×10−308 to ±1.80×10308
- Float (Signed)—This is an IEEE single precision 32-bit real value (floating point value). The range is:
±1.18×10−38 to ±3.4×1038
- Long (Either Sign)—This is a 32-bit integer value. The value can be either signed or unsigned, depending on an external factor, such as another field. With a signed value, the range is -2147483648 to 2147483647 inclusive. With an unsigned value, the range 0 to 4294967295 inclusive.
- Long (Signed)—This is a 32-bit signed integer value. The range is -2147483648 to 2147483647 inclusive.
- Unsigned Long (Unsigned)—This is a 32-bit unsigned integer value. The range is 0 to 4294967295 inclusive.
- Long Long (Either Sign)—This is a 64-bit integer value. The value can be either signed or unsigned, depending on an external factor, such as another field. With a signed value, the range is -9223372036854775808 to 9223372036854775807 inclusive. With an unsigned value, the range 0 to 18446744073709551615 inclusive.
- Long Long (Signed)—This is a 64-bit signed integer value. The range is -9223372036854775808 to 9223372036854775807 inclusive.
- Unsigned Long Long (Unsigned)—This is a 64-bit unsigned integer value. The range is 0 to 18446744073709551615 inclusive.
- Reference—This is the object ID of another item in the database or -1 if it is unused. In the Database Schema, the class in parentheses shows the type of database item that is referenced. This field is a 32-bit unsigned integer.
- String—This is a string of characters with a specified maximum length. In the Database Schema, the number in parentheses that follows a String entry in the Type column indicates the maximum number of characters for the string.
The maximum length might comprise a fixed length (including the NULL terminator) that cannot be exceeded, in which case any characters that exceed that length are truncated.
The maximum length might be purely advisory. This only applies with a standard (such as ODBC) that supports a value for a length limit.
- Time—This is a timestamp value.
- Variant—This can comprise any type of value. Database items might have different types of value in Variant fields, for example, one point might have a signed float value and another point might have an integer value.
- Word (Signed)—This is a 16-bit signed integer value. The range is -32768 to 32767 inclusive.
- Unsigned Word (Unsigned)—This is a 16-bit unsigned integer value. The range is 0 to 65535 inclusive.
The type of information that you can access about the fields (listed above) is described in more detail in the Class Information section (you can use the Geo SCADA Expert Database Schema to display information about each field that is in a class).
Aggregates and Alarm Conditions also provide access to additional fields. For aggregates, the fields can be configuration fields or data fields but alarm conditions can only provide access to data fields. Many of the fields for alarm conditions are read-only and relate to specific alarm data, but there are two notable exceptions: Disabled and Accepted (see Alarm Conditions Section).
As an alternative to using the Database Schema to ascertain the field type, you can use the Status Bar in ViewX to ascertain the field type of configuration fields. Log on to ViewX using a User Account that is allocated the Configure Database feature and the relevant permissions to access the database item. Display the item's configuration form and click on the relevant field. A description of the field, along with its field type, is displayed in the Status Bar on the ViewX client.
Some of the names used to identify the field types differ slightly in the Status Bar when compared to the Database Schema.
-
AOI Reference
-
Boolean
-
Signed Byte
-
Unsigned Byte
-
Colour
-
Double
-
Float
-
Either Long
-
Signed Long
-
Unsigned Long
-
Either Long Long
-
Signed Long Long
-
Unsigned Long Long
-
Reference
-
String
-
Time
-
Variant
-
Signed Word
-
Unsigned Word.
For more information about the Status Bar, see Status Bar in the Geo SCADA Expert Guide to ViewX and Virtual ViewX Clients.
When a field is an integer value that represents an interval, the above ranges are in the time units of the field. In the Database Schema, the Enumeration column of a field that represents an interval specifies the time unit that applies to the field (for example, seconds).
An Unsigned Word field is a 16-bit unsigned integer value. Its range is 0 to 65535 inclusive. If that field represents an interval in seconds, the maximum value of the field is 65535 seconds, which equates to approximately 18.2 hours.
Instead of a single value, some configuration fields and data fields comprise an array of values. These appear as 'Array of <Field Type>' in Type column in the Database Schema. Each value in the array is referred to as an 'element' that can be accessed separately to the other elements in the array. For more information, see Array Field in the Geo SCADA Expert Guide to Core Configuration.