Attributes

A data type node may have attributes as extra constrains, or optimization of user interface.

Example

For example, if a “Number” type has 2 attributes:

  • Min = 0
  • Step = 1

It’s value will be limited to a positive integer or 0. Although a number can be any real number, a minimum 0 with step of 1 adds additional constraints.

Those constraints are enforced in client user interface (Users’ Smartphone).

Number Attributes

Following attributes applies to Number type. These attributes will affect the input normalization and validation on client UI (e.g. Smartphone).

  • Min - A number represents the minimum acceptable value.
  • Max - A number represents the maximum acceptable value.
  • Step - A number constraints the minimum precision. Must be used with “Min” or “Max” or both.
  • Default - Default value initialized.
  • ShowPercentage - Only valid with “Min”, “Max” and “Step” are all specified. A percentage indicator (0%-100%) will be displayed along with value on users’ screen.
  • Physical Quantity - The number represents a physical quantity. Physical quantity has following properties:
    • Quantity Type - Type of physical quantity.
      • Temperature
      • Length
      • Mass
    • Units of Measure - The unit of measure of this value, which is defined in “The Unified Code for Units of Measure” (look for the “c/s” field).
      • Temperature
        • Cel” - Temperature degree Celsius
        • [degF]” - Temperature degree Fahrenheit
      • Length
        • m” - Meter
        • km” - Kilometer
        • cm” - Centimeter
        • mm” - Millimeter
        • mil” - Mil
        • [in_i]” - Inch
        • [ft_i]” - Foot
        • [yd_i]” - Yard
        • [mi_i]” - Mile
      • Mass
        • g” - Gram
        • kg” - Gram
        • [gr]” - Grain
        • [lb_av]” - Pound
        • [oz_av]” - Ounce

On user’s screen, the input UI can be optimized based on attributes. For example, a wheel can be used to facilitate the steps. A percentage value can also be displayed along with actual value.

For example, the level for lighting is 0-255. A percentage value will give regular user better understanding.

Number Editor with Percentage, Step Wheel and Value Input.

Number Editor

Number Editor with Value Input only.

Number Editor

Display Percentage along with Value

Number Editor

Physical Quantity

A “Physical Quantity” field is required to define a “Target Unit” and a list of “Alternative Lists”.

For example, a “Temperature Field” may be defined as below:

Physical Temperature

“Target Unit” and “Alternative Units” can be further customized:

Physical Temperature Unit

“Target Unit” is the unit used as input of the App code. In example above,

  • “Target Unit” is in Celsius
  • The value ranges between 7°C and 32°C, with a step of 0.1°.

“Alternative Units” defines a list of units that affects user interface (on Smartphone). In example above,

  • Alternative Units defines both Celsius (°C) and Fahrenheit (°F).
  • Note Celsius is defined again with a different step value (precision) of 0.5°C.
  • Fahrenheit defines a range that is close to the range of Celsius (between 45°F and 89°F).

Right now Fahrenheit is only in United States and its island territory. The Smartphone will automatically adopt correct input UI based on the Regional Settings of the phone.

For example, both British and United States use English language. However, on a phone with British region, the UI will accept Celsius (°C), while on phones with United States region, Fahrenheit (°F) will be used.

No matter what unit is used in the UI, the user input will be automatically converted into “Target Unit”, which is Celsius with 0.1 °C of precision (step value).

The screenshots below demonstrates the presentation of a task, with different region settings (United States and China).

Note the UI is automatically translated and temperature Units are automatically adjusted.

Eng Cn

Note: With current release only temperature conversion is supported. More unit conversion will be implemented in the future.

Boolean, String and Enumeration Attributes

Percentage value can be displayed along with value on users’ screen, if “ShowPercentage” attribute is specified.

  • Default - Default value when first initialized.

Device Attributes

Device must have additional constraints. This rule is enforce by Signature Editor UI.

Device type constraints can have more than 1 entries. Entries are “or”ed together.

For example, below represents “On/off Load” or “Level Control Load” devices.

Device Type

Each individual entrie may have more than one “capabilities” and together.

For example, in the UI below, more “capabilities” can be added along with “On/off”.

Device Type

Other Attributes on Device

  • Exclusive Write - Only one task is allowed to write (control) the device.
  • Readonly - Device can only be read by App

If one task with “Exclusive Write” on a device is started. Only tasks with “Readonly” on same device is allowed to run.

Virtual Device Attribute

Virtual device is force to have an attribute with the following information.

  • Load Types
  • Device Type
  • Capabilities (1 or more is allowed)

Virtual Device Type

Nullable Attribute

If a node has “Nullable” attribute, the node can be a special “Null”. “Nullable” applies to any type, except for List (array) item. In another word, List can not have “Null” member item.

Nullable type will be displayed with a “Create” button on users’ screen.

Nullable create

User click “Create” button to create a default value for nullable type. For example, a boolean value.

Nullable create

User can also “delete” a nullable value. Once deleted the value will be reset to “null” again.

Nullable create

Table Member Attributes

  • Header - Applies to certain primitive type of a direct member of table type.

This attribute affects the user interface optimization on client (e.g. users’ Smartphone).

For example, in our “Light Show” example, the “Light” field has “Header” attribute.

If the attribute is removed, the difference is show in the two screenshots below.

Device Type

Note, the array member line is replaced by a device node, which is, still unique by design and visually much cleaner.

Without Header With Header

List Attributes

  • Minimum Size - Minimum allowed size.
  • Maximum Size - Maximum allowed size.
  • Unordered Set - The order of the member items is not important. This allows UI optimization.

“Unique” Attribute on Array Members

The attributes below can be applied to array member of certain types (Enumeration, User, Device).

  • Unique - The value has to be unique among other members of the array.

Combining “Unordered Set” on a List and “Unique” on member allows powerful UI optimization, on “Enumeration”, “Device” and “User” type. It will turn a list (array) into a multi-select check dialog.

Nulti Enum Multi Device

Note the beauty of this “Unique” attribute is that, it doesn’t limit to direct child type of an array. It can be a child type of array member type.

Device Type

  • Singleton - Only one task instance of this function (regardless of which version of App) is allowed to run.

This will be supported in the future.

  • URL - External URL access request

Work in Progress

More attributes will be introduced in the future.

The related technology has been granted US patent.