Skip to content
FlorianLiers edited this page Jan 22, 2013 · 12 revisions

Start

FoGSiEm can be started in command line mode via OSGi or in GUI-mode as Eclipse instance.

GUI Mode

If you wish to start FoGSiEm in GUI mode it is necessary to install at least the minimum set of plug-ins of FoGSiEm.

The following steps are shown in a short video on YouTube:

  1. Open the view, which show the FoG-specific parts.
    1. Open the "FoG Simulation Perspective" via the menu: Window -> Open Perspective -> Others
    2. Additional views can be opened via the menu: Window -> Show View -> Others...
      • Open all views in the subitems of "Datastream" and "FoGSiEm"
      • Furthermore the views "Console", "Properties" and "Outline" are important.
  2. Start a simulation
    1. Click on "Start simulation" in the simulation view.
    2. Create a FoGSiEm simulation configuration.
    3. The default values are suffice for a small test run.

Command line

You have to prepare an OSGi environment. For Eclipse Equinox, follow the guidelines on the Eclipse page. For GPL2 environments, use other OSGi implementations such as Glassfish.

After preparing the environment you can start it with java -Drun=yyy -jar org.eclipse.osgi_xxx.jar -console. "yyy" has to be replaced with the name of the Eclipse launch configuration. "xxx" has to be replaced with the version you have installed.

In the OSGi console you can check the bundles with ss. Start the de.tuilmenau.ics.fog.eclipse.launcher bundle via the start command. It checks the environment variable run for the launch configuration name.

Environment variables

Normal simulation do not require any environment variables. They can be controled with the launch configurations provided by the GUI. However, environment variables might be useful for pure command line usage or distributed simulations.

Local simulation

Name Description Example
authentication.entity Sets the type of authentication used by FoG. see fog plug-in de.tuilmenau.ics.fog.authentication.IdentityManagement
execute Command, which is executed after importing the scenario. It is executed in addition to the command specified in the launch configuration. "-Dexecute=start RandomConnect 500 true true"
outputprefix Sets prefix for all output files of simulation -Doutputprefix=mysim_
scenario_file Overwrites the scenario name/file in the launch configuration. "-Dscenario_file=/directory/might contain spaces/filename"
watchdog Name of the file created by the watchdog. If this file is deleted during a simulation, the watchdog will try to terminate the simulation after some minutes. -Dwatchdog=filename

Distributed simulations

Via JINI/Apache River the simulator can be distributed. It allows a single simulation, which runs on multiple physical hosts. Before you start such a simulation you have to (1) install Apache River and (2) starts the JINI/River registry (if you use JINI on Windows, you can start it via jini2_1\installverify\support\launch-all.exe).

The simulation requires the following VM-parameters in order to start the simulator with a connection to the JINI/River service registry:

-Djava.security.manager
-Djava.security.policy=java.policy

If the simulation runs with Eclipse, a bug prevents the usage of the securtiy manager. In such cases, you have to use the following parameters:

-Declipse.security=""
-Djava.security.policy=java.policy

You can specify the address of the host that provides the JINI/River registry: -Djini.lookup=<address/name>;
By default it is: -Djini.lookup=localhost

Furthermore it is possible to specify at which interface the Jini Service should be discovered: -Dnet.jini.discovery.interface=<IP address or FQDN>