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