=== Device factory ===

The factory project contains a device factory that can create
simulated devices available in the palcom tree. Created devices are
given a unique identity, which will be the same when the device is
started a second time.

== Building the project ==

Import the factory project into Eclipse. It is located under
palcom/developer/services. Also import all the projects it depends on,
directly and indirectly. The needed projects are sibling projects
under palcom/developer/services, the project
palcom/developer/tools/simulation/simulated-devices, and projects
under palcom/developer/runtime and palcom/developer/core. If you
choose to import all projects below palcom/developer, you will get all
the necessary projects. When all dependencies are fulfilled, there
should be no errors in the Problems view.

The factory project will be built automatically. The Ant script
build.xml will be run, which generates a JAR file named factory.jar at
the root of the project. For rebuilding the JAR file later, clean the
project by selecting it in Package Explorer and choosing
Project->Clean.

From the command-line, the JAR file can be built by typing "ant" while
standing in the project directory.

== Running the program ==

In order to start the device factory from inside Eclipse, open
factory->src->ist.palcom.simulated.device.factory, right-click on
DeviceFactory and choose Run As->Java Application.

From the command line, the program can be started like this:

java -jar factory.jar

While the program runs, the Device factory window is shown. It is
divided into two areas. To the left is the scenarios pane, and to the
right is the devices list (initially empty).

New devices can be created by choosing Device->New Device. A dialog
box will be shown, where you can choose among the available device
types. Click OK, and a second dialog box will ask you for the device
name. Click OK again, and the device will be added to the device list.

A device can be started by clicking on it in the list, and choosing
Device->Start. It can also be stopped, which means that it will stop
running but can be started again, or deleted, which means that it will
be removed from the list and cannot be started again.

On the Scenario menu, scenarios can be created. Scenarios are groups
of devices that can be started and stopped together. After creating a
scenario, a device can be added to it by choosing Device->Add to a
scenario.
