ALlauncher allows to link dynamicaly with library, run executable, unload library, check if module is loaded...
vector<string> launchLocal (const string& moduleName)
Loads dynamicaly a module
the name of the modulePack to launch or the name of the python script to evaluate
list of modules loaded
bool launchExecutable (const string& moduleName)
runs an executable and connect it to current broker (executable)
the name of the modulePack to launch or the name of the script file to execute
true if ok
bool launchScript (const string& moduleName)
runs a script connected the current broker
the name of the script to launch (python)
true if ok
bool launchPythonModule (const string& moduleName)
Import a python module
the name of the module to launch
true if ok
bool isModulePresent (const string& strPartOfModuleName)
Tests the existence of an active module in the global system (in same executable or in another executable of the distributed system)
a part of the name of the module to test existence
the returned value is true if this module is present
vector<string> getGlobalModuleList ()
get the list of modules loaded on the robot and connected on the robot
array of present modules
string version ()
Returns the version of the module.
A string containing the version of the module.
AL::ALValue getMethodHelp (const string& methodName)
Retrieves a method's description.
The name of the method.
A structure containing the method's description.
AL::ALValue getModuleHelp ()
Retrieves the module's description.
A structure describing the module.
string getUsage (const string& name)
Gets the method usage string. This summarise how to use the method.
The name of the method.
A string that summarises the usage of the method.
Example in python :
# We assume you have a module called Foo in a foo project, # hence in a libfoo.so (or foo.dll) library. launcher = ALProxy('ALLauncher', ip, port) if not launcher.isModulePresent('Foo'): launcher.launchLocal('foo') foo = ALProxy('ALFoo', ip, port) # Careful: you have to use the name of the module for isModulePresent, # but the name of the library for launchLocal