PyTree is the openWNS configuration browser. It’s main purpose is to help you understand and debug simulation configurations. The Figure PyTree Screenshot shows a small example of the PyTree.
PyTree Screenshot
PyTree displays your configuration in a tree view. You can see the tree structure on the left hand side. If you navigate the tree the current information on a tree node is shown on the right hand side.
PyTree can also plot Functional Unit Networks and visualize protocol stacks that you have configured. The screenshot above shows the WiFi-MAC FUN.
To start PyTree change to a directory that contains your configuration (we will use the WiFi-Mac test here).
cd tests/system/wifimac-tests/
PyTree is located in the bin subdirectory of your openWNS-sdk.
../../../bin/pytree -g -p ../../../sandbox/dbg/lib/PyConfig config.py
We use several switches here. First, -g tells PyTree to run in GUI mode. If you omit the switch the configuration is dumped to the console. You can then use grep or other command line tools to find the information you need. The second parameter -p tells pytree where to search for the PyConfig files. We tell PyTree to search in debug flavour within the sandbox.
Note
You need to build your openwns-sdk before you can use PyTree. Make sure you have executed ./playground.py install or at least have installed the PyConfig to the sandbox by running scons sandbox/dbg/lib/PyConfig
The last argument to PyTree defines which configuration file to parse. That’s it. The PyTree window should appear and you are ready to go.