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