Prerequisites¶
Required Lablink resources¶
The following Lablink resources are required:
Configuration Server: config-0.0.1-jar-with-dependencies.jar
Datapoint Bridge: dpbridge-0.0.1-jar-with-dependencies.jar
Simple Sync Host: sync-0.0.1-jar-with-dependencies.jar
When building from source, the corresponding JAR files will be copied to directory target/dependency.
Starting the configuration server¶
Start the configuration server by executing script run_config.cmd in subdirectory examples/0_config. This will make the content of database file test-config.db available via http://localhost:10101.
Note
Once the server is running, you can view the available configurations in a web browser via http://localhost:10101.
See also
A convenient tool for viewing the content of the database file (and editing it for experimenting with the examples) is DB Browser for SQLite.
MQTT broker¶
An MQTT broker is required for running the example, for instance Eclipse Mosquitto or EMQ.
Example 1: Asynchronous plotter¶
All relevant scripts can be found in subdirectory examples/1_async. To run the example, execute all scripts either in separate command prompt windows or by double-clicking:
dpb.cmd: runs the data point bridge service, connecting the data source and the plotter
source.cmd: runs the data source, which will send data to the plotter
plot.cmd: runs the plotter, which will plot incoming data to the screen (and write one of the inputs to a CSV output file)
Note
The order in which the scripts are started is arbitrary.
Example 2: Synchronous plotter¶
All relevant scripts can be found in subdirectory examples/2_sync. To run the example, execute all scripts either in separate command prompt windows or by double-clicking:
dpb.cmd: runs the data point bridge service, connecting the data source and the plotter
source.cmd: runs the data source, which will send data to the plotter
plot.cmd: runs the plotter, which will plot incoming data to the screen (and write one of the inputs to a CSV output file)
sync.cmd: runs the sync host
Note
Start the data point bridge and the clients first (in arbitrary order). Before you start the sync host, make sure that the clients are already connected to the data point bridge (check status messages of data point bridge).