Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 9 Next »

ThingModels and AppModels can inherit from model facets by using the keyword "combines".

For example:

ThingModel
<ThingModel Name="TempSensor" combines="TempFacetSerial"/>

In this case, ThingModel TempSensor will have all attributes of TempFacetSerial.

One model can combine one or more model facets.

ThingModel
<ThingModel Name="TempHumidity" combines="TempFacetSerial, HumidityFacetSerial">
     <Sid name="MySensorType" />
</ThingModel>

Here two ThingFacets - TempFacetSerial and HumidityFacetSerial are combined and that will make TempHumidity to have attributes 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.

 

  • No labels