Manual

19
Developer’s guide - C++, Urbi, Flex, Java - V2.0
robopec
This document is the property of Robopec. The information contained herein may not be used, reproduced or
communicated without its prior written consent.
}
//function do
void Ma_classe::do()
{
//launch do_something() to URBI
Client->send(do_something(););
}
//Function calledas soon as something variable changes
int Ma_classe::somethingChange(UVar& var)
{
//Get the UVar in a classical type
int a=static_cast<int>(var);
cout<<a<<endl;
}
7.2 Load a module at Reeti Launch
Once your module is compiled as a dynamic library (e.g. libMACLASSE.so) you have to declare your
module to URBI. You have to add to /home/reeti/reetiPrograms/load/InitModule.u these lines:
loadModule("/chemin_vers_votre_lib/libMACLASSE");
var Global.mon_nom = uobjects.Ma_classe.new(IP, portUrbi);
Directory /home/reeti/reetiPrograms/UModules is dedicated to your modules. The directory
/home/reeti/reetiPrograms/data is dedicated to the data used by your modules.
Now, you must restart your console URBI to make your changes effective and your module loaded.
To do this, pass to dev mode (in Configuration) and launch reetiDev.sh script (default password:
reeti).
In developer mode, you have access to URBI console giving information and allowing you to
manipulate files and software more easily.
In console mode, Reeti does not take care of handling the Launcher, so be careful. To
get back with all functionalities, restart Reeti.
Then, to use your new functions:
- Global.mon_nom.play(Coucou) ;
- Global.mon_nom.something=5;