28 for (
auto it = m_devices.begin();
it != m_devices.end();
it++)
30 if (
it->device_type == type)
40 if (add_device(dev)) {
43 return ReturnValue::return_code::return_value_error_method_failed;
48 if (remove_device(device_name)) {
51 return ReturnValue::return_code::return_value_error_method_failed;
62 std::lock_guard<std::recursive_mutex>
guard(m_recmutex);
71 m_devices.push_back(dev);
75bool RobotDescriptionStorage::remove_device(
const std::string& device_name)
77 std::lock_guard<std::recursive_mutex>
guard(m_recmutex);
78 for (
auto it = m_devices.begin();
it != m_devices.end();
it++)
80 if (device_name ==
it->device_name)
91 std::lock_guard<std::recursive_mutex>
guard(m_recmutex);
94 for (
int i = 0; i < p.
size(); i++)
yarp::dev::ReturnValue registerDevice(const yarp::dev::DeviceDescription &dev) override
Register a new running yarp device into a robot description server.
yarp::dev::ReturnValue unregisterDevice(const std::string &device_name) override
Unregister a running yarp device from a robot description server.
yarp::dev::ReturnValue unregisterAll() override
Unregister all the devices.
bool attachAll(const yarp::dev::PolyDriverList &l) override
Attach to a list of objects.
bool detachAll() override
Detach the object (you must have first called attach).
yarp::dev::ReturnValue getAllDevices(std::vector< yarp::dev::DeviceDescription > &dev_list) override
Ask the complete list of all yarp device drivers registered by a robot description server.
yarp::dev::ReturnValue getAllDevicesByType(const std::string &type, std::vector< yarp::dev::DeviceDescription > &dev_list) override
Ask a list of all registered yarp device drivers whose type corresponds to the given param.
std::string device_configuration
configuration parameters of the device
std::string device_type
type of the device
std::string device_name
name of the device
An interface for the management of the parameters of a DeviceDriver.
A mini-server for performing network communication in the background.
#define yCError(component,...)
#define yCWarning(component,...)
#define YARP_LOG_COMPONENT(name,...)
For streams capable of holding different kinds of content, check what they actually have.
An interface to the operating system, including Port based communication.