The Eclipse Vorto project comprises of the meta information model, the tool set to create information models, the code generators and the repository to manage existing information models. The meta information model and also the tool set are based on the Eclipse EMF (Eclipse Modeling Framework) framework. EMF is a modeling framework and code generation facility for building tools and other applications based on a structured data model. For more details regarding EMF, please refer to the Eclipse Modeling Framework Project page. The tool set is realized as an Eclipse plug-in and thus can be integrated into any supported Eclipse platform.
Meta Information Model
While information models represent the capabilities of a particular type of device in its entirety, the meta model describes how the information models are structured. Since the overall target of this project is to push standardization of information models it is very important to have a sustainable and flexible meta model which can be used as a basis of the described standardization. In particular this means that the meta model must be compatible to meta models defined for example by EEBus, ETSI and oneM2M. It is also required that the meta model is compatible with the Smart Home Device Template (SDT) which has been specified by HGi and is currently discussed with BBF, ETSI and the OSGi Alliance.
Function blocks describe the capabilities of a device, exposing properties, operations and events. The function blocks which are essential parts of information models can be re-used for describing arbitrary types of devices sharing the same functionalities. The meta model is technically based on the Eclipse EMF framework which allows the use of other Eclipse components based on EMF, such as Eclipse Sirius for graphical modelers or template engines for code generations such as JET or XPand.
The IoT tool set textual editor itself uses the Eclipse Xtext Framework to parse the textual information model representation and convert it to an Information EMF Model. The information model code generators can then further process these EMF models.
The code generators allow application developers to comfortably include the described concepts into their applications. For example one code generator allows generating information model based parts of an access layer for Eclipse Smart Home and another generator allows doing this for openHAB or OSGi-DAL. Other examples could be EEBus, ETSI or oneM2M specific implementation parts. An openHAB generator for example would map an information model to items with command types, which is the basis of the openHAB representation for a thing in the IoT world.
The described tool set provides an extension point to include new code generators without major effort. This enables the usage of the information model concept in various environments and device ecosystems. The code generators concept is very general which means that there are no constraints regarding the implementations.
As mentioned before the device information model is based on EMF which empowers code generators to generate logic written in any language, for example XML, JSON, Lua, Java or C/C++. It leverages template engines such as Java Emitter Templates (JET) or XPand.
IoT Tool Set
The tool provides two options for creating information models based on the described meta-model:
- The first possibility is to do this using a graphical environment that allows doing most of the steps using drag-and-drop mechanisms. This option targets at the group of business users that have no or only a small background regarding programming skills. The created information models can be validated and it is also possible to use the code generators for the creation of solutions.
- The second possibility is to use a domain specific language (DSL) that has been designed for comfortably creating the information models. The corresponding editors allow syntax highlighting and auto completion. This option targets at the group of developers that have an IT background and are experienced in using programming and scripting languages.
In addition, the tool set shall allow for importing existing information models which are for example conform to ETSI, oneM2M or EEBus.
The planned initial features of the tool set include:
- Information Model Language Editor: A simple way to describe information models in a declarative way using auto-completion, syntax highlighting, content assistance and model validation. The declarative model is internally converted into an EMF model.
- Eclipse Project Wizard: Easily create an information model project using an Eclipse Project Wizard.
The Information Model Repository
The information model repository is a server based technology which shall be used as the centralized storage location for information models. During development time the repository allows developers accessing the standardized information models for integrating them into applications (e.g. by using the above described code generators).
It is comprised of:
- Resource and version management using e.g. Git or CDO.
- Query layer to query information models by different search criteria.
- Dependency management of information models.
- Web browser interface.
- IDE Integration.
When version 1.0 of the repository is released it shall be hosted by the Eclipse Foundation to initialize the standardization process.
Let's assume Vendor A creates a new Z-Wave smoke detector which can measure the temperature, return the battery status and also fire an alarm event in case of fire. Using the IoT tool set, vendor A creates a corresponding information model which describes the three functionalities. After creating the information model vendor A publishes the model to the Information Model Repository. Now user B who bought such a smoke detector wants to include it into his openHAB environment. Using the IoT tool set he can browse the repository to find the information model created by Vendor A. After downloading it he could create the openHAB representation of the device using a specific code generator. In a last step he would complete this representation by adding required Z-Wave configurations.
In another scenario user C wants to access the smoke detector using an OSGi device abstraction layer. He also downloads the information model using the IoT tool set and creates an implementation skeleton using another OSGi specific code generator. Within the created skeleton he would then add his specific code.
The content of this open source project is received and distributed under the license(s) listed above. Some source code and binaries may be distributed under different terms. Specific license information is provided in file headers and in NOTICE files distributed with the project's binaries.