20 return options.
check(
"type",
Value(
"none")).asString() ==
"RFModule";
62 return mPriv->command;
67 return mPriv->module->getThreadKey();
72 mPriv->module->stopModule();
77 return !mPriv->module->isStopping();
91 while ((
p2 !=
nullptr) && argc <
kMaxArgs - 1) {
96 return std::make_pair(argc, argv);
104 char* str =
new char[
inCommand.size() + 1];
135 if (!settings.
setSelector(mPriv->shared->selector)) {
138 if (!mPriv->shared->yarpPlugin.open(settings)) {
142 mPriv->shared->sharedLibClass.
open(*mPriv->shared->yarpPlugin.getFactory());
144 if (!mPriv->shared->sharedLibClass.isValid()) {
149 settings.
setClassInfo(mPriv->shared->yarpPlugin.getFactory()->getClassName(), mPriv->shared->yarpPlugin.getFactory()->getBaseClassName());
153 ret = mPriv->shared->sharedLibClass.getContent().configure(rf);
159 mPriv->shared->sharedLibClass->runModuleThreaded();
161 mPriv->module = &(mPriv->shared->sharedLibClass.getContent());
std::pair< int, char ** > str2ArgcArgv(char *str)
A mini-server for performing network communication in the background.
bool open(const std::string &name) override
Start port operation, with a specific name, with automatically-chosen network parameters.
A base-class for standard YARP modules that supports ResourceFinder.
virtual bool open(const std::string &command)
opens the plugin
virtual bool isRunning()
check if the plugin is running
virtual std::string getCmd()
get the command line used to open the plugin
virtual int getThreadKey()
get the thread id
virtual void close()
closes the plugin
Helper class for finding config files and other external resources.
bool configure(int argc, char *argv[], bool skipFirstArgument=true)
Sets up the ResourceFinder.
A base class for nested structures that can be searched.
virtual bool check(const std::string &key) const =0
Check if there exists a property of the given name.
A single value (typically within a Bottle).
Pick out a set of relevant plugins.
void scan()
Find plugin configuration files, and run [plugin] sections through the select method.
Collect hints for finding a particular plugin.
bool setSelector(YarpPluginSelector &selector)
Use a selector to find a plugin or plugins.
void setLibraryMethodName(const std::string &dll_name, const std::string &fn_name)
Set the name of the library to load and the method name to use as a factory.
void setPluginName(const std::string &name)
Set the name of the plugin to load.
std::string getMethodName() const
void setClassInfo(const std::string &class_name, const std::string &baseclass_name)
Set the information about the class and the base class constructed by this plugin.
static RFModuleFactory & GetInstance()
An interface to the operating system, including Port based communication.
RFModuleSelector selector
YarpPlugin< RFModule > yarpPlugin
SharedLibraryClass< RFModule > sharedLibClass