Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

A simulated network behaves exactly like a network with real hardware. You can interact with the OpenVisualizer, communicate with your nodes from the Internet. The difference is that the firmware of each node mote is emulated running on your computer, rather than being real hardwareon a target device.

OpenSim does so by compiling the mote code firmware as a Python extension module, and creating an instance of the resulting class for each emulated mote. When the simulation is running, these emulate motes communicate with the rest of the OpenVisualizer architecture (see Architecture) over the eventBus.

...

  • You need to be able to run the OpenVisualizer, so make sure installed the elements necessary for the OpenVisualizer to run.
  • Your computer needs to have gcc installed to be able to compile the firmware as a Python extension module. On Linux, that should be the case by default. On Windows, we recommend http://www.mingw.org/.

...

Code Block
openwsn-fw/firmware/openos/projects/common/oos_openwsn.pyd

The OpenSim infrastructure automatically adjusts its path to find this extension module, no need to move this file.

Before your can run a simulation, you invoke the following command which will copy the extension module, and some other files, from the firmware to the software repository.

Code Block
scons copy-simfw

Running a simulation

Running a simulation is exactly like running the OpenVisualizer, but specifying that this is a simulation.

As with the OpenVisualizer, there are several visualizations interfaces available.

graphical user interface (GUI)

...

  • from the command line, navigate to openwsn-sw/software/openvisualizer/bin/openVisualizerApp/ and enter the following command:

    Code Block
    python openVisualizerCli.py --sim [--simCount <number of simulated nodes>]
  • enter the following command from openwsn-sw/software/openvisualizer/:

    Code Block
    scons runcli --sim [--simCount <number of simulated nodes>]

web interface

...

The web interface is actively being worked on. See the next elements to follow the progress. You can contact Ken Bannister if you wish to contribute:

...

You have two options to start it:

  • from the command line, navigate to openwsn-sw/software/openvisualizer/bin/openVisualizerApp/ and enter the following command:

    Code Block
    python openVisualizerWeb.py --sim [--simCount <number of simulated nodes>]
  • enter the following command from openwsn-sw/software/openvisualizer/:

    Code Block
    scons runweb --sim [--simCount <number of simulated nodes>]