Skip to content
Snippets Groups Projects
SebastianEbert's avatar
Sebastian Ebert authored
e756e65e
History

PNML-Editor

Prerequisites

The following libraries/frameworks need to be installed on your system:

Building the Editor

The server component is built with maven and the client component is built with yarn. A convenience script to build both is provided. To build all components execute the following in the directory containing this README:

yarn build

In addition, it is also possible to build each component individually:

# Build only the glsp-client
yarn build:client

# Build only glsp-server
yarn build:server

Or you can use the available VSCode tasks configured in the workspace (via Menu Terminal > Run Task...)

Running the Editor

To start the Theia browser application with the app, navigate to the client directory

cd glsp-client

and then execute:

yarn start

This will launch the app in the browser with an embedded GLSP server on localhost:3000. From there the file examples can be opened.

DiNeROS Dashboard Messages

The broker can be changed by modifying the "broker" filed in the class glsp-server/src/main/java/org/eclipse/glsp/example/javaemf/MQTT/MQTTClient.java

Three different kinds of messages can be sent:

  • filling places with tokens

    • topic name: fillPlace
    • topic JSON format: {"placeId": place id as string, "tokens": array of token strings}
    • example: {"placeId": "cd0bae27-ab7a-4647-85d3-b1bb2b3dcd60", "tokens": ["aaaa", "bbbb"]}
  • firing transitions

    • topic name: fireTransition
    • topic JSON format: {"transitionId": transition id as string, "tokens": {placeId: Array of token strings}} -example: {"transitionId": "7c12def4-f37f-4948-96c7-a248088d1bee", "tokens": {02cb7814-11e3-496b-9d6a-4be829073826: ["Hund", "Katze"], "c784ac65-fd96-4158-9ba2-c27527a5d69e": ["Dativ"]}}
  • changing the value of input signals

    • topic name: name of the signal
    • topic format: Boolean value
    • example: topic: "Red" ; content: "true"

The examples can be executed as they are on the example in the workspace folder.