Jump to content

Policy-based Resilience Simulator with OMNeT++/ReaSE and XML-RPC

From Wikibooks, open books for an open world

Now that you have INET framework up and running, you are ready to build ReaSE and install XML-RPC

Download ReaSE (ID #29) and Example Topologies (ID #21) for ReaSE.

Building ReaSE

[edit | edit source]

Unpack the .tar.gz file to omnetpp folder in Home.

In OMNeT++ IDE, go to File > Import > General > Existing Projects into Workspace. Choose the ReaSE parent directory (situated in /home/<your_user_name>/omnetpp-4.1/ ) as root directory and click finish.

Now, right click on ReaSE folder shown in Project Explorer, Click Properties > Project References. Uncheck "INET" and check "inet". Press Ctrl+B or Project > Build All to build ReaSE.

ReaSE should compile without any errors now. If they show some errors regarding Makefile, just go to ReaSE directory, delete the Makefiles in the parent directory and ReaSE/src directory. Now go back to the IDE, right click ReaSE in Project Explorer, click Refresh. Press Ctrl+B or Project > Build All to build ReaSE.

Testing ReaSE build

[edit | edit source]

Unpack the Examples Topologies and copy the "Topologies" folder to ReaSE folder. Now, go to Run > Run Configuration. Create a new configuration under OMNeT++ Simulation, set working directory as the simulation you want to run- topo_tiny or topo_small or topo_router situated in "Topologies" directory under ReaSE. Now, set Executable as ReaSE/src/rease. Ini file should automatically be selected as omnetpp.ini located in the simulation directory. Now change Config name to General:inet and click run. The simulation should run now if ReaSE compiled without any error.

Installing XML-RPC

[edit | edit source]

Install XML-RPC library, (package is named libxmlrpc-c++-dev or so, and is different in different distros, you can try searching for it in your cache).

Configuring ReaSE

[edit | edit source]
  • Once XML-RPC is installed, in OMNeT++'s IDE, select ReaSE/src folder in Project Explorer and go to:

Project > Properties > OMNeT++ > Makemake > src > Options > Preview

Right after

–deep -o rease -O out -pREASE

and BEFORE

–meta:auto-include-path –meta:use-exported-libs

include the following libraries:

-lxmlrpc_server_abyss++ -lxmlrpc_server++ -lxmlrpc_server_abyss -lxmlrpc_server -lxmlrpc_abyss -lpthread -lxmlrpc++ -lxmlrpc -lxmlrpc_util -lxmlrpc_xmlparse -lxmlrpc_xmltok

It will look something like

--deep -o rease -O out -pREASE -lxmlrpc_server_abyss++ -lxmlrpc_server++ -lxmlrpc_server_abyss -lxmlrpc_server -lxmlrpc_abyss -lpthread -lxmlrpc++ -lxmlrpc -lxmlrpc_util -lxmlrpc_xmlparse -lxmlrpc_xmltok --meta:auto-include-path –meta:use-exported-lib

Testing XML-RPC install

[edit | edit source]

Try running one of the ReaSE simulations again-if it launches successfully, that means your XML-RPC install is correct- ReaSE automatically invokes XML-RPC on startup, and the simulation won't run if there is some error with XML-RPC install. Otherwise, check the console output to see if the error is caused by XML-RPC - if so, mostly the error is cause because you installed a wrong xml-rpc package - try Googling for xml-rpc with your distro name (like "linux mint xml-rpc") for exact package name.

Compiling INET · Building Distack