Skip to content

Adding a new program

kheiken edited this page Feb 11, 2012 · 3 revisions

Adding a new program

Note that this is intended mainly for developers.
The task of implementing a new application requires some knowledge of Java and PHP.

To add a new application for simulation purposes, you need to write/program the following parts:

  • adapter written in Java, so the client knows how to start the simulator
  • config-generator in PHP, so the server knows how to generate the configuration files

Java Adapter

Requirements

The basic requirements for an application to be included in the client are the following:

  • The application must be able to be run without a graphical user interface
  • Once the application is started, it may not ask for any input - interactive applications can not be run

Adding the program

If you want to add a new program to the ScattPort client, you need to create a new class in the package org.scattport.client.apps.

The classes DummyApp and Sscatt can be used as a starting point.

To learn more about how this job is handled by the client, read the article Handling of results, #3-6.

Extension of the web interface

To add a new application to the server component (the web interface), you need to create the following parts:

  • a driver to generate the configuration files and read the uploaded results (in the directory application/libraries/programs/)
  • add the application via the web interface (as an administrator)

You should get an idea of how this works by examining the following files:

  • application/libraries/Program_runner.php
  • application/libraries/programs/Scatt.php

Clone this wiki locally