openwsn-berkeley/openwsn-sw — pull request #37 by kb2ma (2013-08-10 12:45:59+00:00)
Title: Added openVisualizerApp directory and allow to run app from SCons.

openVisualizerApp unifies UI implementations around a single
openVisualizerApp application model. A UI is defined as a module or
package within this directory.

Can now run GUI and CLI in two ways:

1. Via SCons from software/openvisualizer directory, which uses
openVisualizerApp/openVisualizer[Gui|Cli].py. For example,

> scons rungui

Use 'scons -h' to see usage. Also, notice application writes log files
and reads conf files in 'build/openVisualizer' directory.

2. Via traditional use in
software/openvisualizer/bin/openVisualizer[Gui|Cli] directory.

However, traditional use is deprecated. These directories will be
removed in the near future.

openVisualizerApp/openVisualizerGui.py -- Remove sys.path initialization.
Removed obsolete logging setup with NullHandler. Switched CLI option
parser to ArgumentParser; OptionParser is deprecated.

openVisualizerGui/openVisualizerGui.py -- Set path for openwsnmodule_obj.h
in moteHandler, as described below.

OpenVisualizerCli.py -- 'root' command now lists serial ports when no
arguments given. 'state' command lists available states when no arguments
given. Added 'help all' for one-liner list of all commands.
Now can run simulation in CLI.
Now uses Python cmd module for command line handling, rather than
OpenCli package.

openVisualizerApp.py -- Add options for working directory and firmware
directory. Set path for openwsnmodule_obj.h in moteHandler, as described
below. Replace deprecated optparse with argparse for parsing options.

MoteHandler.py -- Don't determine location for openwsnmodule_obj.h. Instead,
require calling app to provide this path in a call to new function
readNotifIds().

SConstruct -- Now operational in openvisualizer directory. Moved Python
path settings here, as a PYTHONPATH environment variable.
Trace handling for app disabled in SConstruct. OVtracer calls nonexistent
methods in yappi.

.gitignore -- Ignore build directory and scons work files.