Wiki

Clone wiki

smool / Use

Use SMOOL to create KPs and SIBs

In this page, we will show how to create SMOOL clients by using Eclipse and JAVA.

Nomenclature

See Nomenclature

Configure environment (install updatesite)

Note: If you plan to contribute to SMOOL source code, you may follow instead the Installation steps and then launch a new instance of Eclipse. Otherwise you just need to install the SMOOL updatesite and few dependencies in a fresh Eclipse:

Note 2: If you install eclipse with the Eclipse Installer, make sure you do not have any previous smool installation in your user folder, in the .p2 subfolder.

  • Tip: To install updatesites from .zip files, go to eclipsemenu/help/install new software/button 'add'/button 'archive'.
  • Download latest GEMDE update-site from downloads. Install gemde core and mofscript engine for gemde and restart. (GEMDE is required by SMOOL,for generating the JAVA classes from the ontology).
  • Download latest SMOOL update-site from downloads. Install the feature and restart. If zip is not recognized, unzip the file and use the folder as updatesite. Note: if SMOOL category is not shown, uncheck 'group items by category'.
  • Video of installing the updatesite can be found at the SMOOL youtube playlist

Install sample Projects

If everything has gone fine you should have the next layout:

SMOOLperspective.jpg

Use SMOOL to create KPs

The following videos provide some details on how to create and launch KPs:

Steps:

  • [NEW] first, make sure you have the latest smool-core.owl in your workspace (the ontology). Otherwise, go to the downloads section for the file.
  • then go to new/other/Smool client and customize it with the required sensors/actuators.
  • finally, go to src/.../ProducerMain.java (or ConsumerMain.java) and uncomment the template part depending on producer or consumer.

Troubleshooting:

  • if creating a KP from wizard fails, probably there is an obsolete xtext version installed. Go to Help/About Eclipse IDE/Installation details/configuration tab/View error log button or start eclipse from command line with eclipse.exe -consoleLog -debug `

Start a server (SIB) to test KPs

  • option 1 (for a first approach): use the public demo server at IP 15.236.132.74 and PORT 23000
  • option 2 (when working, testing autonomously) : when using the SMOOL perspective, on the bottom left there is a tab to create a server and a TCP gateway. Then press start.
  • option 3 (shared server for several developers creating KPs): use a standalone server out of Eclipse, to download and use it follow the steps at Production

Updated