First use of OpenRDK

Now you can launch your first OpenRDK application.

StringWriter module

Go to ${OpenRDK}/data/config/examples and type:

ragent2 -c ra-stringWriter.config
you should see some colored output on your console. Here is a brief explanation of what is going on. The configuration file that you launched contains only one module, the StringWriterModule. This module has one string property (that contains the string to write) and its task is to write, each second, a logging message on the console. This configuration is depicted in the following figure:

StringWriter module with RConsole

Let's try another example, this time we will be introduced to RConsole, the OpenRDK visual inspection tool. As you should know, RConsole is actually an RDK Agent that has a module that is responsible of showing a good GUI. In the ${OpenRDK}/data/config/examples directory, launch:

rconsoleqt -c rqra-stringWriter.config

Ok, good. Now you have also a window on the screen. Maximize this window, so that we have more space to see and begin to learn OpenRDK basics. Go to the "Network" menu and click on "Show my repository". You will be presented to a tree viewer that shows the repository of this RDK Agent, that contains also the module for the GUI management. Remember: this RDK Agent (i.e., the RConsole) is identical to the previous one, except for the fact that it has another module (the RConsole GUI manager) and some libraries pre-loaded (this is the reason why you launched rconsoleqt and not ragent2, as before).

The tree viewer that you opened allows you to see the contents of the repository. Among the other things, you can see the "directory" of the template module. Open it and look at its properties. Among them you can see a "subdirectory", whose name is params: open it and you should see the stringToWrite property.

In order to look at this property, you have to open an instance of the StringViewerModule of RConsole. There are two ways: either double click on the property or drag it and drop on the grey workspace of the RConsole window.

The StringWriter module is an example module that, every one second, reads the params/stringToWrite property and writes a console log message that contains this string. This means that if we change the content of the string, the module will change the message that it prints on the screen. Edit the string on the box and press enter, now go to the console view to see that the message has changed.

You will find how useful this can be, when you will be able to change the parameters of your modules on-the-fly, and look at the changes in the algorithms behavior without having to stop programs, edit code, recompile, etc.

More interesting examples

In order to run some more interesting examples, go to next section.