Feature definition

Bosch IoT Things supports contract-based development by using Definitions to ensure validity and integrity of your managed assets. This concept is especially useful for large-scale and cross-domain solutions.

These formal definitions are derived from device abstractions - so called “Information Models” and “Function Blocks” - which can be modeled based on Eclipse Vorto (see http://www.eclipse.org/vorto/).

A Definition can optionally be related to a thing's feature.
It holds a list of fully qualified identifiers:

  • The pattern for a valid identifier is namespace:name:version ,
    while the namespace does not necessarily need to be the thing's namespace but can be any namespace (Java package namespace).
  • The list must not be empty, but can contain one to multiple identifiers.
{
  "thingId": "my.namespace:cool-thing-0123",
  "attributes": {},
  "features": {
      "thermostat": {
          "properties": {
              "min-temp": -2,
              "max-temp": 4,
              "curr-temp": 3,
              "target-temp": 0
              }
          }
      }
  }

The same thing with a definition of the thermostat could look like the following:

{
  "thingId": "my.namespace:cool-thing-0123",
  "attributes": {},
  "features": {
      "thermostat":  {
          "defintion": [ "org.frosty:cooler:0.1.0","org.frosty:cooler:1.1.0"],
          "properties": {
              "min-temp": -2,
              "max-temp": 4,
              "curr-temp": 3,
              "target-temp": 0
              }
          }
      }
  }

As a first step, we provide the possibility to attach one definition (i.e. one or multiple identifiers) to a feature. The definition identifiers can thus be stored at the specific feature of your thing within the Things service store, given that you follow the pattern shown above.

However, at the time of writing we do not apply any definition:

  • We do not check whether or not such a definition is available at any Vorto repository.
  • In case of multiple definition identifiers, we do not interpret how the multiple definitions complement or override one another.

As a consequence, the Bosch IoT Things service currently does not check the conformity of the feature properties with the definition.

Further reading