YARP
Yet Another Robot Platform
 
Loading...
Searching...
No Matches
RobotDescriptionStorage.h
Go to the documentation of this file.
1/*
2 * SPDX-FileCopyrightText: 2025-2025 Istituto Italiano di Tecnologia (IIT)
3 * SPDX-License-Identifier: BSD-3-Clause
4 */
5
6#ifndef YARP_DEV_ROBOTDESCRIPTIONSTORAGE_H
7#define YARP_DEV_ROBOTDESCRIPTIONSTORAGE_H
8
9#include <mutex>
10#include <string>
11
16
29{
30 private:
31 std::recursive_mutex m_recmutex;
32 std::vector<yarp::dev::DeviceDescription> m_devices;
33
34 private:
35 bool add_device(yarp::dev::DeviceDescription dev);
36 bool remove_device(const std::string& device_name);
37
38 public:
40 virtual ~RobotDescriptionStorage() = default;
41 bool open(yarp::os::Searchable& params) override { return true; }
42 bool close() override { return true; }
43
44 public:
45 bool detachAll() override;
46 bool attachAll(const yarp::dev::PolyDriverList &l) override;
47
48 public:
49 yarp::dev::ReturnValue getAllDevices(std::vector<yarp::dev::DeviceDescription>& dev_list) override;
50 yarp::dev::ReturnValue getAllDevicesByType(const std::string &type, std::vector<yarp::dev::DeviceDescription>& dev_list) override;
52 yarp::dev::ReturnValue unregisterDevice(const std::string& device_name) override;
54};
55
56#endif // YARP_DEV_ROBOTDESCRIPTIONSTORAGE_H
RobotDescription_nws_yarp: This device is a storage which contains a list of the currently opened dev...
bool open(yarp::os::Searchable &params) override
Open the DeviceDriver.
yarp::dev::ReturnValue registerDevice(const yarp::dev::DeviceDescription &dev) override
Register a new running yarp device into a robot description server.
bool close() override
Close the DeviceDriver.
RobotDescriptionStorage()=default
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.
virtual ~RobotDescriptionStorage()=default
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.
Interface implemented by all device drivers.
Interface for an object that can wrap/attach to to another.
This interface allows users to retrieve a list which contains the names and the types of the currentl...
A base class for nested structures that can be searched.
Definition Searchable.h:31