Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
languagexml
titleThingModel
linenumberstrue
<ThingModel#
ThingModel(Name=: "TempSensor", combines=: "TempFacetSerial"/>)

In this case, the ThingModel TempSensor definition will have all the structures (attributes and actions) defined as part of the TempFacetSerial.

...

Code Block
languagexml
titleThingModel
linenumberstrue
<ThingModel#
ThingModel(Name=: "TempHumidity", combines=: "TempFacetSerial, HumidityFacetSerial">):
     <Sid name=Sid(name: "MySensorType" />
</ThingModel>)

Here two ThingFacets - TempFacetSerial and HumidityFacetSerial are combined and that will make TempHumidity to have attributes and actions from both ThingFacets.

Because only models can be instantiated, not model facets, model facets must be combined into a model for meaningful use at run time.