industrial_robot_status_interface.h
Go to the documentation of this file.
1 
19 #ifndef INDUSTRIAL_ROBOT_STATUS_INTERFACE_INDUSTRIAL_ROBOT_STATUS_INTERFACE_H_
20 #define INDUSTRIAL_ROBOT_STATUS_INTERFACE_INDUSTRIAL_ROBOT_STATUS_INTERFACE_H_
21 
23 
24 #include <string>
25 
26 
28 {
29 
30 // following enums mirror ROS-Industrial's simple_message enums
31 // TODO: should we just re-use those?
32 
33 enum class TriState : int8_t
34 {
35  UNKNOWN = -1,
36  FALSE = 0,
37  TRUE = 1,
38 };
39 
40 enum class RobotMode : int8_t
41 {
42  UNKNOWN = -1,
43  MANUAL = 1,
44  AUTO = 2,
45 };
46 
47 typedef std::int32_t ErrorCode;
48 
50 {
57  ErrorCode error_code;
58 };
59 
60 
62 {
63  public:
64  IndustrialRobotStatusHandle() = delete;
65 
66  IndustrialRobotStatusHandle(const std::string& name, RobotStatus& robot_status)
67  : name_(name), robot_status_(&robot_status) {}
68 
69  const std::string& getName() const noexcept { return name_; }
70 
71  const RobotStatus& getRobotStatus() const noexcept { return *robot_status_; }
72 
73  private:
74  std::string name_;
76 };
77 
78 
79 class IndustrialRobotStatusInterface : public hardware_interface::HardwareResourceManager<IndustrialRobotStatusHandle> {};
80 
81 
82 } // namespace industrial_robot_status_interface
83 
84 
85 #endif // INDUSTRIAL_ROBOT_STATUS_INTERFACE_INDUSTRIAL_ROBOT_STATUS_INTERFACE_H_
IndustrialRobotStatusHandle(const std::string &name, RobotStatus &robot_status)


industrial_robot_status_interface
Author(s): G.A. vd. Hoorn (TU Delft Robotics Institute)
autogenerated on Wed Jan 20 2021 03:28:39