35 config_wrap.
unput(
"device");
36 config_wrap.
unput(
"wrapper_device");
37 config_wrap.
unput(
"attached_device");
38 config_wrap.
unput(
"wrapping_enabled");
40 std::string sw = config_wrap.
toString();
41 ret = m_pdev_wrapper.
open(config_wrap);
51 config_sub.
unput(
"device");
52 config_sub.
unput(
"wrapper_device");
53 config_sub.
unput(
"attached_device");
54 config_sub.
unput(
"wrapping_enabled");
56 std::string ss = config_sub.
toString();
57 ret = m_pdev_subdevice.
open(config_sub);
66 yCInfo(DEVICEBUNDLER,
"doNotAttach option found. Device will not be attached.");
72 ret = m_pdev_wrapper.
view(m_iWrapper);
75 yCError(DEVICEBUNDLER,
"Unable to open iWrapper interface. Maybe %s is not a wrapper device?",
m_wrapper_device.c_str());
79 ret = m_iWrapper->
attach(&m_pdev_subdevice);
100 m_pdev_wrapper.
close();
103 if (m_pdev_subdevice.
isValid())
105 m_pdev_subdevice.
close();
std::string m_wrapper_device
bool parseParams(const yarp::os::Searchable &config) override
Parse the DeviceDriver parameters.
std::string m_attached_device
bool open(yarp::os::Searchable &config) override
Open the DeviceDriver.
bool close() override
Close the DeviceDriver.
~DeviceBundler() override
bool view(T *&x)
Get an interface to the device driver.
virtual bool detach()=0
Detach the object (you must have first called attach).
virtual bool attach(PolyDriver *driver)=0
Attach to another object.
bool close() override
Close the DeviceDriver.
bool isValid() const
Check if device is valid.
bool open(const std::string &txt)
Construct and configure a device by its common name.
A class for storing options and configuration information.
std::string toString() const override
Return a standard text representation of the content of the object.
void put(const std::string &key, const std::string &value)
Associate the given key with the given string.
void unput(const std::string &key)
Remove the association from the given key to a value, if present.
A base class for nested structures that can be searched.
virtual std::string toString() const =0
Return a standard text representation of the content of the object.
#define yCInfo(component,...)
#define yCError(component,...)
#define YARP_LOG_COMPONENT(name,...)