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>
13#include <yarp/sig/Vector.h>
14#include <mutex>
15#include <yarp/os/Time.h>
16#include <string>
17#include <yarp/dev/PolyDriver.h>
20
39{
40protected:
41 std::mutex m_external_mutex;
42 std::mutex m_internal_mutex;
44 std::string m_local_name;
45 std::vector<yarp::dev::DeviceDescription> m_robot_devices;
46
47public:
48 /* DeviceDriver methods */
49 bool open(yarp::os::Searchable& config) override;
50 bool close() override;
51
52 bool detachAll() override;
53 bool attachAll(const yarp::dev::PolyDriverList &l) override;
54 bool read(yarp::os::ConnectionReader& connection) override;
55
56private:
57 bool add_device(yarp::dev::DeviceDescription dev);
58 bool remove_device(yarp::dev::DeviceDescription dev);
59};
60
61#endif // YARP_DEV_ROBOTDESCRIPTIONSERVER_H
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:30
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:24
A mini-server for network communication.
Definition: Port.h:46
A base class for nested structures that can be searched.
Definition: Searchable.h:63