YARP
Yet Another Robot Platform
RobotDescriptionClient.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2006-2020 Istituto Italiano di Tecnologia (IIT)
3  * Copyright (C) 2006-2010 RobotCub Consortium
4  * All rights reserved.
5  *
6  * This software may be modified and distributed under the terms of the
7  * BSD-3-Clause license. See the accompanying LICENSE file for details.
8  */
9 
10 #ifndef YARP_DEV_ROBOTDESCRIPTION_CLIENT_H
11 #define YARP_DEV_ROBOTDESCRIPTION_CLIENT_H
12 
13 #include <yarp/os/Network.h>
14 #include <yarp/os/BufferedPort.h>
18 #include <yarp/sig/Vector.h>
19 #include <yarp/os/Time.h>
20 #include <mutex>
21 #include <string>
22 #include <yarp/dev/PolyDriver.h>
24 
39 {
40 protected:
41  std::mutex m_mutex;
43  std::string m_local_name;
44  std::string m_remote_name;
45 
46 public:
47  /* DeviceDriver methods */
48  bool open(yarp::os::Searchable& config) override;
49  bool close() override;
50 
54  bool getAllDevices(std::vector<yarp::dev::DeviceDescription>& dev_list) override;
55 
59  bool getAllDevicesByType(const std::string &type, std::vector<yarp::dev::DeviceDescription>& dev_list) override;
60 
64  bool registerDevice(const yarp::dev::DeviceDescription& dev) override;
65 
69  bool unregisterDevice(const std::string& device_name) override;
70 };
71 
72 #endif // YARP_DEV_ROBOTDESCRIPTION_CLIENT_H
define control board standard interfaces
contains the definition of a Vector type
This client device is used to connect to a robotDescriptionServer and ask info about the currently op...
bool open(yarp::os::Searchable &config) override
Open the DeviceDriver.
bool getAllDevices(std::vector< yarp::dev::DeviceDescription > &dev_list) override
Ask the complete list of all yarp device drivers registered by a robot description server.
bool registerDevice(const yarp::dev::DeviceDescription &dev) override
Register a new running yarp device into a robot description server.
bool unregisterDevice(const std::string &device_name) override
Unregister a running yarp device from a robot description server.
bool close() override
Close the DeviceDriver.
bool 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.
Definition: DeviceDriver.h:38
This interface allows users to retrieve a list which contains the names and the types of the currentl...
A mini-server for network communication.
Definition: Port.h:50
A base class for nested structures that can be searched.
Definition: Searchable.h:69