YARP
Yet Another Robot Platform
RobotDescriptionServer.h
Go to the documentation of this file.
1 /*
2  * SPDX-FileCopyrightText: 2006-2021 Istituto Italiano di Tecnologia (IIT)
3  * SPDX-License-Identifier: BSD-3-Clause
4  */
5 
6 #ifndef YARP_DEV_ROBOTDESCRIPTIONSERVER_H
7 #define YARP_DEV_ROBOTDESCRIPTIONSERVER_H
8 
9 
10 #include <yarp/os/Network.h>
11 #include <yarp/os/BufferedPort.h>
15 #include <yarp/sig/Vector.h>
16 #include <mutex>
17 #include <yarp/os/Time.h>
18 #include <string>
19 #include <yarp/dev/PolyDriver.h>
22 
39  public yarp::os::PortReader,
41 {
42 protected:
43  std::mutex m_external_mutex;
44  std::mutex m_internal_mutex;
46  std::string m_local_name;
47  std::vector<yarp::dev::DeviceDescription> m_robot_devices;
48 
49 public:
50  /* DeviceDriver methods */
51  bool open(yarp::os::Searchable& config) override;
52  bool close() override;
53 
54  bool detachAll() override;
55  bool attachAll(const yarp::dev::PolyDriverList &l) override;
56  bool read(yarp::os::ConnectionReader& connection) override;
57 
58 private:
59  bool add_device(yarp::dev::DeviceDescription dev);
60  bool remove_device(yarp::dev::DeviceDescription dev);
61 };
62 
63 #endif // YARP_DEV_ROBOTDESCRIPTIONSERVER_H
define control board standard interfaces
contains the definition of a Vector type
robotDescriptionServer: This device is a storage which contains a list of the currently opened device...
bool read(yarp::os::ConnectionReader &connection) override
Read this object from a network connection.
bool detachAll() override
Detach the object (you must have first called attach).
bool open(yarp::os::Searchable &config) override
Open the DeviceDriver.
bool attachAll(const yarp::dev::PolyDriverList &l) override
Attach to a list of objects.
bool close() override
Close the DeviceDriver.
std::vector< yarp::dev::DeviceDescription > m_robot_devices
Interface implemented by all device drivers.
Definition: DeviceDriver.h:35
Interface for an object that can wrap/attach to to another.
An interface for reading from a network connection.
Interface implemented by all objects that can read themselves from the network, such as Bottle object...
Definition: PortReader.h:25
A mini-server for network communication.
Definition: Port.h:47
A base class for nested structures that can be searched.
Definition: Searchable.h:66