YARP
Yet Another Robot Platform
 
Loading...
Searching...
No Matches
IRobotDescription.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_IROBOTDESCRIPTION_H
7#define YARP_DEV_IROBOTDESCRIPTION_H
8
9#include <yarp/dev/api.h>
10#include <yarp/os/Vocab.h>
11#include <vector>
12#include <string>
13
14namespace yarp::dev {
15
17{
18 std::string device_name;
19 std::string device_type;
20 bool operator ==(DeviceDescription const& b) const
21 {
22 return this->device_name == b.device_name && this->device_type == b.device_type;
23 }
24};
25
33{
34public:
39
43 virtual bool getAllDevices(std::vector<DeviceDescription>& dev_list) = 0;
44
48 virtual bool getAllDevicesByType(const std::string &type, std::vector<DeviceDescription>& dev_list) = 0;
49
53 virtual bool registerDevice(const DeviceDescription& dev) = 0;
54
58 virtual bool unregisterDevice(const std::string& device_name) = 0;
59};
60
61} // namespace yarp::dev
62
70
71#endif // YARP_DEV_IROBOTDESCRIPTION_H
constexpr yarp::conf::vocab32_t VOCAB_IROBOT_SET
constexpr yarp::conf::vocab32_t VOCAB_IROBOT_DEVICE
constexpr yarp::conf::vocab32_t VOCAB_IROBOT_DELETE
constexpr yarp::conf::vocab32_t VOCAB_IROBOT_DESCRIPTION
constexpr yarp::conf::vocab32_t VOCAB_IROBOT_BY_TYPE
constexpr yarp::conf::vocab32_t VOCAB_IROBOT_ALL
constexpr yarp::conf::vocab32_t VOCAB_IROBOT_GET
This interface allows users to retrieve a list which contains the names and the types of the currentl...
virtual ~IRobotDescription()
Destructor.
virtual bool registerDevice(const DeviceDescription &dev)=0
Register a new running yarp device into a robot description server.
virtual bool getAllDevices(std::vector< DeviceDescription > &dev_list)=0
Ask the complete list of all yarp device drivers registered by a robot description server.
virtual bool getAllDevicesByType(const std::string &type, std::vector< DeviceDescription > &dev_list)=0
Ask a list of all registered yarp device drivers whose type corresponds to the given param.
virtual bool unregisterDevice(const std::string &device_name)=0
Unregister a running yarp device from a robot description server.
std::int32_t vocab32_t
Definition numeric.h:78
For streams capable of holding different kinds of content, check what they actually have.
constexpr yarp::conf::vocab32_t createVocab32(char a, char b=0, char c=0, char d=0)
Create a vocab from chars.
Definition Vocab.h:27
bool operator==(DeviceDescription const &b) const
#define YARP_dev_API
Definition api.h:18