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 setReverseShutdownActionOrder(bool reverseShutdownActionOrder);
33
34 ParamList& params();
35 DeviceList& devices();
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();
51 bool setExternalDevices(const yarp::dev::PolyDriverList& list);
52 bool enterPhase(yarp::robotinterface::ActionPhase phase);
53 yarp::robotinterface::ActionPhase currentPhase() const;
54 int currentLevel() const;
55
56private:
57 class Private;
58 Private* const mPriv;
59}; // class Robot
60
61} // namespace yarp::robotinterface
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:30
std::string findParam(const robotinterface::ParamList &list, const std::string &name)
Definition Types.cpp:26
std::vector< robotinterface::Device > DeviceList
Definition Types.h:32
#define YARP_robotinterface_API
Definition api.h:18