When comparing data types in Sedona and Niagara, note that properties in Sedona components use one of several primitive data types, including “bool” (boolean value), “int” (signed 32-bit integer), “float” (32-bit floating point), and several others. For complete details, see the documentation on the Sedona Framework org website, for example at http://www.sedonadev.org/doc/primitives.html.
Niagara models this data with Sedona proxy points, using standard control points based on “status value” data types (statusBoolean, statusNumeric, statusEnum, statusString). The following sections provide more details:
Table 5 provides a cross listing of Sedona property data types, and the corresponding default Sedona (Niagara) proxy point types, and alternates.
Table 4. Sedona property data types to default Proxy Point types, with alternate types
Sedona data type | Default Proxy Point types | Alternately available point types |
---|---|---|
bool (boolean) | BooleanPoint, BooleanWritable | EnumPoint, EnumWritable (see Booleans as Enums) |
float or double | NumericPoint, NumericWritable | — |
int, long, byte, or short | EnumPoint, EnumWritable | NumericPoint, NumericWritable |
Str (string), sys::Buf, | StringPoint, StringWritable | — |
Sedona does not explicitly model “multistate” (enumerated) data. However, note that properties using integer type primitives (int, long, byte, short) default to Enum point types. Often, say for properties using “int” or “long” data type, you may wish to change this to NumericPoint or NumericWritable at proxy point add time.
Writable Sedona proxy points (BooleanWritable, NumericWritable, EnumWritable, StringWritable) have a “Fallback” property that is, by default, set to “null”. When all other priority levels are cleared, a “null” status output results.
However, Niagara never issues any write to (or clears any value from) Sedona on a null transition—for example, whatever “null value” may exist in that Fallback property. Therefore, to remove any ambiguity you may want to clear (remove) the Fallback “null” setting, and enter (or verify) a specific fallback value to write from Niagara.
For example, consider a BooleanWritable proxy point for the “In” property of a Sedona “WriteBool” component. The BooleanWritable has a default Fallback property with the “null” status checked. If the proxy point is linked to a BooleanSchedule component that has its own “Default Output” of “- null”, it is possible that all inputs to the proxy point will be nulled. However, nothing will be written to Sedona on the transition from schedule “On” to “null”, such that the WriteBool will remain “true”.
Also note that Sedona has its own “null” implementation for the primitive bool (boolean) type. For this, there is no direct translation from a Niagara “null” to a Sedona “null”. However, if necessary the Sedona boolean null can be included in a Sedona proxy point. See Booleans as Enums for details.
Although Sedona does not explicitly model “multistate” (enumerated) data, there is a unique exception of the boolean (bool) primitive type, with three possible states for boolean literals, as shown in Table 5.
Table 5. Sedona boolean (bool) states
Value | Ordinal | String |
---|---|---|
false | 0 | “false” |
true | 1 | “true” |
null | 2 | “null” |
In Sedona, null can indicate an invalid boolean value. If used in a boolean expression, null evaluates to true (it is represented as 2 in memory). Not all Sedona Framework apps may make use of boolean null.
The Niagara “null” status in writable Sedona proxy points does not translate into a “Sedona null”, nor does a Niagara null status ever result in any write (i.e. “null value”) to Sedona.
By default, a Sedona boolean property is proxied in Niagara as a BooleanPoint or (if writable) a BooleanWritable, with only two states. However, if you need to model a Sedona boolean property with all three states, you can select an EnumPoint (or if writable, an EnumWritable point) instead of a BooleanPoint or BooleanWritable, as shown being done in Figure 65.
In this case, the Enum point’s facets are automatically configured using the value and ordinals shown in Table 5, except null appears as “sedonaNull” (so as to distinguish this from when point status is “null”). If needed, you can edit these descriptors in point facets.
Note if an EnumWritable proxy point, these facet descriptors appear in the “override” action menu for the point, just like any other EnumWritable. See Figure 66.
Copyright © 2000-2014 Tridium Inc. All rights reserved.