Skip to content

Latest commit

 

History

History
86 lines (49 loc) · 4.29 KB

describe_device_with_eclipse_ide.md

File metadata and controls

86 lines (49 loc) · 4.29 KB

Describing a device with Vorto using the Eclipse IDE

In this tutorial you are going to learn, how you can use the Eclipse IDE to describe a Vorto Information Model and manage it in the Vorto Repository.

Prerequisites

Proceed as follows

Step 1: Installation of Vorto DSL Eclipse Plugins

  1. Open Eclipse IDE

  2. Install the Vorto Eclipse Plugins from the zip-file from the Vorto Eclipse Update Site

  3. Restart your Eclipse

Step 2: Create a Simple Eclipse Project

  1. Right-click -> New Project

  1. Choose a project name and click Finish.

Step 3: Describe a device

In this tutorial we will use a security camera to illustrate how to describe a device with Vorto using Eclipse. To keep it simple, we will describe the camera with the indispensable Informationmodel and only one Functionblock.

1. Informationmodel To create a new Informationmodel, right-click on your created project and select New File. It is important the file name suffix represents the type of file you want to create: SecurityCamera.infomodel

After clicking Finish, you will be asked if you want to convert your project to an Xtext project. Click Yes to enable autocomplete.

With the help of the autocomplete function (Ctrl-space) you can now describe the Informationmodel of your device.

The next step is to describe the needed functionalities of the camera.

2. Functionblock When creating the new file for the Functionblock, make sure that you use the correct suffix: Presence.fbmodel

Now we need to reference from the Informationmodel to your newly created Functionblock. Go back to your .infomodel file and add using org.mycompany.demo.Presence ; 1.0.0, using your respective namespace and name.

Now you need to define an instance of the function within functionblocks. The autocomplete function should already suggest your referenced Functionblock.

Step 4: Import the Model into the Vorto Repository

You can now import your Informationmodel into the Vorto Repository where you can manage your models and release it to the community. To do that, you need to export your project as a General Archive File.

Log into the Eclipse Vorto Repository with your BoschID or GitHub account and Import the zip-file.

What's Next?


In case you're having difficulties or facing any issues, feel free to create a new question on StackOverflow and we'll answer it as soon as possible!
Please make sure to use eclipse-vorto as one of the tags.