YARP
Yet Another Robot Platform
 
Loading...
Searching...
No Matches
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
22
39{
40protected:
41 std::mutex m_external_mutex;
42 std::mutex m_internal_mutex;
44 std::vector<yarp::dev::DeviceDescription> m_robot_devices;
45
46public:
47 /* DeviceDriver methods */
48 bool open(yarp::os::Searchable& config) override;
49 bool close() override;
50
51 bool detachAll() override;
52 bool attachAll(const yarp::dev::PolyDriverList &l) override;
53 bool read(yarp::os::ConnectionReader& connection) override;
54
55private:
56 bool add_device(yarp::dev::DeviceDescription dev);
57 bool remove_device(yarp::dev::DeviceDescription dev);
58};
59
60#endif // YARP_DEV_ROBOTDESCRIPTIONSERVER_H
contains the definition of a Vector type
This class is the parameters parser for class RobotDescriptionServer.
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.
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:31