Schema construction

Setting up a schema involves binding station data to JSON entities.

Binding configuration, about binding

Bound properties, objects and arrays are JSON entities, which can use the current values of an ord target to render their values. Fixed variants do not support binding.

Slot selection

When picking a bound object or array, you may choose which slots from the target to include in the resultant JSON container. Currently the options are:

Figure 10.   Slots to include
Image
  • All slots
  • All visible slots (hidden slots excluded)
  • Summary slots—only those with a summary flag
  • Selected slots—manually-selected slots from a list

Target types

 
NOTE: When choosing the bind target for a binding you could select any type of slot, from devices to control points to out slots to simple values, there are no restrictions.
 

Bound arrays and objects output the value of each of the selected slots (refer to Slot Selection). The default behaviour for each encountered slot type is as follows:

Selection Output
Strings The string value is unchanged
Booleans A JSON Boolean
Integer/Long A JSON number
Double and float decimals A JSON number rounded to use the schema’s decimal places config
Enum value A JSON String that represents the Enum value
AbsTime A String representation of the date formatted as per the schema config
Control Point A JSON String, Numeric, Boolean, or Enum to represent the out slot’s value
Status Value A JSON String, Numeric, Boolean, or Enum to represent the value
Status A JSON string to represent the value, for example, {ok}
Anything else The string representation of the value as returned from the framework. This is often the type display name.
 
NOTE: Bound objects and arrays do not recurse. Only direct child slots are included. These behaviours make a few assumptions about the most-expected case, for example, excluding the status string from certain types. Program overrides may override all these behaviours.
 

Naming

For binding results you may choose what the key is in the key/value pair:

Selection Output
Display Name The name of the bound property, object or array
Target Name The name of the ord target
Target Display Name The display name of the ord target
Target Parent Name The name of the ord target’s parent
Target Path The absolute path of the target from the root of the component tree
 
TIP: You may use a Tag property with the name n:name to include point names. This property inserts a single tag value from the bound component in the output. If the SearchParents property is true, the framework searches up the hierarchy for the closest component with a matching tag id (if the tag not found on binding target.