The KIELER KLighD Console Diagram Renderer is a pure Java program that together with a KIELER RCA allows to call the KIELER KLighD Rendering for model diagrams from the console. For using the KIELER Console Rendering you need to
- Enable the KLighD HTTP Server in the KIELER RCA and
- Download KLighD (alternative download) as a runnable Java JAR archive and run it.
In the following we give a short quick start guide and describe the details for both, the enabling of the HTTP server and the possible command line calls of KiCo from the command line:
Quick Start Guide (Online Rendering)
- Download KLighD (alternative download) as a runnable Java JAR archive and save it to some location y on your hard drive
- Change directory to location y, then type:
java -jar KLighD.jar render.sccharts.com -f somescchart.sct -o somescchart.c CORE
where somescchart.sct must be a valid SCChart modeled with the KIELER SCCharts editor. You should find the generated c code in the file somsschart.c. Be sure that somescchart.sct is also located in directory y (or give the full path in "...").
Quick Start Guide (Local Rendering)
- Download KIELER RCA from http://rtsys.informatik.uni-kiel.de/~kieler/files/nightly/sccharts/ extract it to some location x on your hard drive
- Download KLighD (alternative download) as a runnable Java JAR archive and save it to some location y on your hard drive
- Open console window and change directory to location x, then type:
kieler -application de.cau.cs.kieler.klighd.server.headless -noExit -p 4444 &
- Change directory to location y, then type:
java -jar KLighD.jar 4444 -f somescchart.sct -o somescchart.c CORE
where somescchart.sct must be a valid SCChart modeled with the KIELER SCCharts editor. You should find the generated c code in the file somsschart.c. Be sure that somescchart.sct is also located in directory y (or give the full path in "...").
Enable the KLighD HTTP Server
Before you can use KLighD.jar from the console, you need to start the KIELER RCA and activate the KLighD HTTP Server. This is done using the button at 1. shown in the screenshot below. After downloading the KIELER SCCharts RCA (as descibed in the paragraph before), activate the sever as illustrated in the figure below. When pressing it the windows shown at 2. is displayed and allows to enable or disable the server and also to modify the default port of 4444. Whenever the server was enabled and is started, you will see its job running at 3. in the lower region of the KIELER RCA. When you enabled the server in previous runs of the KIELER RCA it will automatically started when you run KIELER again.
Non-GUI HTTP Server
Alternatively (after you configured the port) you can start the KLighD HTTP Server via command line:
kieler -application de.cau.cs.kieler.klighd.server.headless -noExit [-p <port>] [-d]
This will start a background process with the KIELER KLighD HTTP Server. Optionally you can specify a (new) listening port for the HTTP server using "-p <port>" or "–port <port>",e.g. "-p 4444". The option -d or --debug enables the debug mode with verbose debug output messages.
Using KLighD.jar from Console
Download the KLighD (alternative download) as a runnable Java JAR archive and start it using java:
java -jar KLighD.jar <host>:<port> [Options]
In the above screenshot you see the KLighD options when calling with no/too few parameters. The host or the port are mandatory parameters. By default the port 4444 is used and the default host is localhost. If you specify the port you do not need to specify localhost, if you specify the host you do not need to specify 4444. The following options are available:
- -f <filename> : Use a specific input file for the main model (and not the console)
- -i <filename> : Include additional input files that are referenced by the main model, note that the order for using multiple -i options is important: Use the order -i file1 -i file2 if file1 has references to file2 but file2 has NO references to file1!
- -o <filename> : Use a specific output file (and not the console)
- -r <svg or png> : Use a specific output rendering, png or svg, default is png
- -s <1 - 5>: Use a specific scale factor, e.g. 1, default is 1