Using your module in an other C++ module
Instantiate your module in a broker
Simply use:
ALModule::createModule<MyModule> (pBroker) ;
Calling bound methods of your module
Only bound methods can be called by another module. The set of all bound methods of the module constitutes the module API. To create a bound method in C++:
functionName( "functionName", "ModuleName", "description" ); // functionName should be a public method of ModuleName addParam("pIP", "NaoQi IP"); setReturn ("Test_return", "return description"); BIND_METHOD( ALModule::functionName ); // method is now visible in the module API
Bound methods appear in the distributed environment web display:
If you have used the ModuleGenerator, you can test your module using the test_yourmodule.py file located in the directory containing your project.
Warning: | Be careful, you will probably need to edit it to specify correct IP and port. |
---|