YARP
Yet Another Robot Platform
Robot.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_ROBOTINTERFACE_ROBOT_H
7 #define YARP_ROBOTINTERFACE_ROBOT_H
8 
12 
13 namespace yarp {
14 namespace robotinterface {
15 namespace experimental {
16 
18 {
19 public:
20  explicit Robot();
21  explicit Robot(const std::string& name, const DeviceList& devices = DeviceList());
22  Robot(const Robot& other);
23  Robot& operator=(const Robot& other);
24 
25  virtual ~Robot();
26 
27  std::string& name();
28  unsigned int& build();
29  std::string& portprefix();
30 
31  void setVerbose(bool verbose);
32  void setAllowDeprecatedDevices(bool allowDeprecatedDevices);
33 
36  Device& device(const std::string& name);
37 
38  const std::string& name() const;
39  const unsigned int& build() const;
40  const std::string& portprefix() const;
41  const ParamList& params() const;
42 
43  const DeviceList& devices() const;
44  bool hasDevice(const std::string& name) const;
45  const Device& device(const std::string& name) const;
46 
47  bool hasParam(const std::string& name) const;
48  std::string findParam(const std::string& name) const;
49 
50  void interrupt();
54  int currentLevel() const;
55 
56 private:
57  class Private;
58  Private* const mPriv;
59 }; // class Robot
60 
61 } // namespace experimental
62 } // namespace robotinterface
63 } // namespace yarp
64 
66 
67 
68 #endif // YARP_ROBOTINTERFACE_ROBOT_H
float t
bool hasDevice(const std::string &name) const
bool hasParam(const std::string &name) const
void setAllowDeprecatedDevices(bool allowDeprecatedDevices)
const DeviceList & devices() const
const std::string & name() const
bool enterPhase(yarp::robotinterface::experimental::ActionPhase phase)
std::string findParam(const std::string &name) const
Robot & operator=(const Robot &other)
const Device & device(const std::string &name) const
Device & device(const std::string &name)
const unsigned int & build() const
yarp::robotinterface::experimental::ActionPhase currentPhase() const
Robot(const std::string &name, const DeviceList &devices=DeviceList())
bool setExternalDevices(const yarp::dev::PolyDriverList &list)
const std::string & portprefix() const
yarp::os::LogStream operator<<(yarp::os::LogStream dbg, const yarp::robotinterface::experimental::Robot &t)
yarp::robotinterface::ParamList ParamList
Definition: Types.h:22
yarp::robotinterface::DeviceList DeviceList
Definition: Types.h:24
The main, catch-all namespace for YARP.
Definition: dirs.h:16
#define YARP_robotinterface_API
Definition: api.h:18