Robotics Library  0.7.0
UniversalRobotsDashboard.h
Go to the documentation of this file.
1 //
2 // Copyright (c) 2009, Markus Rickert
3 // All rights reserved.
4 //
5 // Redistribution and use in source and binary forms, with or without
6 // modification, are permitted provided that the following conditions are met:
7 //
8 // * Redistributions of source code must retain the above copyright notice,
9 // this list of conditions and the following disclaimer.
10 // * Redistributions in binary form must reproduce the above copyright notice,
11 // this list of conditions and the following disclaimer in the documentation
12 // and/or other materials provided with the distribution.
13 //
14 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
15 // AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
16 // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
17 // ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
18 // LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
19 // CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
20 // SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
21 // INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
22 // CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
23 // ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
24 // POSSIBILITY OF SUCH DAMAGE.
25 //
26 
27 #ifndef RL_HAL_UNIVERSALROBOTSDASHBOARD_H
28 #define RL_HAL_UNIVERSALROBOTSDASHBOARD_H
29 
30 #include <string>
31 #include <utility>
32 
33 #include "Com.h"
34 #include "Socket.h"
35 
36 namespace rl
37 {
38  namespace hal
39  {
44  {
45  public:
47  {
51  };
52 
53  enum RobotMode
54  {
64  };
65 
67  {
77  };
78 
79  UniversalRobotsDashboard(const ::std::string& address);
80 
81  virtual ~UniversalRobotsDashboard();
82 
83  void close();
84 
85  void doAddToLog(const ::std::string& message);
86 
87  void doBrakeRelease();
88 
89  void doClosePopup();
90 
91  void doCloseSafetyPopup();
92 
93  ::std::string doGetLoadedProgram();
94 
95  ::std::pair<bool, ::std::string> doIsProgramSaved();
96 
97  void doLoad(const ::std::string& program);
98 
99  void doLoadInstallation(const ::std::string& installation);
100 
101  void doPause();
102 
103  void doPlay();
104 
105  ::std::string doPolyscopeVersion();
106 
107  void doPopup(const ::std::string& text);
108 
109  void doPowerOff();
110 
111  void doPowerOn();
112 
113  ::std::pair<ProgramState, ::std::string> doProgramState();
114 
116 
117  bool doRunning();
118 
120 
121  void doShutdown();
122 
123  void doStop();
124 
125  void doQuit();
126 
127  void doUnlockProtectiveStop();
128 
129  void open();
130 
131  protected:
132 
133  private:
134  void send(const ::std::string& command);
135 
137  };
138  }
139 }
140 
141 #endif // RL_HAL_UNIVERSALROBOTSDASHBOARD_H
rl::hal::UniversalRobotsDashboard::SAFETY_MODE_PROTECTIVE_STOP
@ SAFETY_MODE_PROTECTIVE_STOP
Definition: UniversalRobotsDashboard.h:70
rl::hal::UniversalRobotsDashboard::ROBOT_MODE_BACKDRIVE
@ ROBOT_MODE_BACKDRIVE
Definition: UniversalRobotsDashboard.h:62
rl::hal::UniversalRobotsDashboard::doIsProgramSaved
::std::pair< bool, ::std::string > doIsProgramSaved()
Definition: UniversalRobotsDashboard.cpp:158
rl::hal::Socket
Definition: Socket.h:48
rl::hal::UniversalRobotsDashboard::doProgramState
::std::pair< ProgramState, ::std::string > doProgramState()
Definition: UniversalRobotsDashboard.cpp:343
rl::hal::UniversalRobotsDashboard::doPowerOn
void doPowerOn()
Definition: UniversalRobotsDashboard.cpp:325
rl::hal::UniversalRobotsDashboard::doUnlockProtectiveStop
void doUnlockProtectiveStop()
Definition: UniversalRobotsDashboard.cpp:553
rl::hal::UniversalRobotsDashboard::SAFETY_MODE_REDUCED
@ SAFETY_MODE_REDUCED
Definition: UniversalRobotsDashboard.h:69
rl::hal::UniversalRobotsDashboard::ProgramState
ProgramState
Definition: UniversalRobotsDashboard.h:47
rl::hal::UniversalRobotsDashboard::SAFETY_MODE_RECOVERY
@ SAFETY_MODE_RECOVERY
Definition: UniversalRobotsDashboard.h:71
rl::hal::UniversalRobotsDashboard::doBrakeRelease
void doBrakeRelease()
Definition: UniversalRobotsDashboard.cpp:81
rl::hal::UniversalRobotsDashboard::doRobotmode
RobotMode doRobotmode()
Definition: UniversalRobotsDashboard.cpp:370
rl::hal::UniversalRobotsDashboard::ROBOT_MODE_DISCONNECTED
@ ROBOT_MODE_DISCONNECTED
Definition: UniversalRobotsDashboard.h:56
rl::hal::UniversalRobotsDashboard::doGetLoadedProgram
::std::string doGetLoadedProgram()
Definition: UniversalRobotsDashboard.cpp:135
rl::hal::UniversalRobotsDashboard::doCloseSafetyPopup
void doCloseSafetyPopup()
Definition: UniversalRobotsDashboard.cpp:117
rl::hal::UniversalRobotsDashboard::UniversalRobotsDashboard
UniversalRobotsDashboard(const ::std::string &address)
Definition: UniversalRobotsDashboard.cpp:37
rl::hal::UniversalRobotsDashboard::ROBOT_MODE_NO_CONTROLLER
@ ROBOT_MODE_NO_CONTROLLER
Definition: UniversalRobotsDashboard.h:55
rl::hal::UniversalRobotsDashboard::RobotMode
RobotMode
Definition: UniversalRobotsDashboard.h:54
rl::hal::UniversalRobotsDashboard::doAddToLog
void doAddToLog(const ::std::string &message)
Definition: UniversalRobotsDashboard.cpp:59
Com.h
rl::hal::UniversalRobotsDashboard::SAFETY_MODE_SYSTEM_EMERGENCY_STOP
@ SAFETY_MODE_SYSTEM_EMERGENCY_STOP
Definition: UniversalRobotsDashboard.h:73
rl::hal::UniversalRobotsDashboard::ROBOT_MODE_CONFIRM_SAFETY
@ ROBOT_MODE_CONFIRM_SAFETY
Definition: UniversalRobotsDashboard.h:57
rl::hal::UniversalRobotsDashboard::SAFETY_MODE_ROBOT_EMERGENCY_STOP
@ SAFETY_MODE_ROBOT_EMERGENCY_STOP
Definition: UniversalRobotsDashboard.h:74
rl::hal::UniversalRobotsDashboard::doSafetymode
SafetyMode doSafetymode()
Definition: UniversalRobotsDashboard.cpp:444
rl::hal::UniversalRobotsDashboard::doLoadInstallation
void doLoadInstallation(const ::std::string &installation)
Definition: UniversalRobotsDashboard.cpp:207
rl::hal::UniversalRobotsDashboard::doRunning
bool doRunning()
Definition: UniversalRobotsDashboard.cpp:421
rl::hal::UniversalRobotsDashboard::close
void close()
Definition: UniversalRobotsDashboard.cpp:52
rl::hal::UniversalRobotsDashboard::PROGRAM_STATE_STOPPED
@ PROGRAM_STATE_STOPPED
Definition: UniversalRobotsDashboard.h:48
rl::hal::UniversalRobotsDashboard::doPopup
void doPopup(const ::std::string &text)
Definition: UniversalRobotsDashboard.cpp:289
rl::hal::UniversalRobotsDashboard::doQuit
void doQuit()
Definition: UniversalRobotsDashboard.cpp:535
rl::hal::UniversalRobotsDashboard::PROGRAM_STATE_PLAYING
@ PROGRAM_STATE_PLAYING
Definition: UniversalRobotsDashboard.h:49
rl::hal::UniversalRobotsDashboard::ROBOT_MODE_IDLE
@ ROBOT_MODE_IDLE
Definition: UniversalRobotsDashboard.h:61
rl::hal::UniversalRobotsDashboard::~UniversalRobotsDashboard
virtual ~UniversalRobotsDashboard()
Definition: UniversalRobotsDashboard.cpp:43
rl::hal::UniversalRobotsDashboard::SAFETY_MODE_SAFEGUARD_STOP
@ SAFETY_MODE_SAFEGUARD_STOP
Definition: UniversalRobotsDashboard.h:72
rl::hal::UniversalRobotsDashboard
Universal Robots dashboard server.
Definition: UniversalRobotsDashboard.h:44
rl::hal::UniversalRobotsDashboard::SAFETY_MODE_FAULT
@ SAFETY_MODE_FAULT
Definition: UniversalRobotsDashboard.h:76
rl::hal::Com
Definition: Com.h:35
rl::hal::UniversalRobotsDashboard::doClosePopup
void doClosePopup()
Definition: UniversalRobotsDashboard.cpp:99
rl::hal::UniversalRobotsDashboard::SafetyMode
SafetyMode
Definition: UniversalRobotsDashboard.h:67
rl::hal::UniversalRobotsDashboard::doPowerOff
void doPowerOff()
Definition: UniversalRobotsDashboard.cpp:307
rl::hal::UniversalRobotsDashboard::doPlay
void doPlay()
Definition: UniversalRobotsDashboard.cpp:255
rl::hal::UniversalRobotsDashboard::doStop
void doStop()
Definition: UniversalRobotsDashboard.cpp:513
rl::hal::UniversalRobotsDashboard::doLoad
void doLoad(const ::std::string &program)
Definition: UniversalRobotsDashboard.cpp:181
rl::hal::UniversalRobotsDashboard::SAFETY_MODE_NORMAL
@ SAFETY_MODE_NORMAL
Definition: UniversalRobotsDashboard.h:68
rl::hal::UniversalRobotsDashboard::doShutdown
void doShutdown()
Definition: UniversalRobotsDashboard.cpp:495
rl::hal::UniversalRobotsDashboard::ROBOT_MODE_POWER_ON
@ ROBOT_MODE_POWER_ON
Definition: UniversalRobotsDashboard.h:60
rl::hal::UniversalRobotsDashboard::open
void open()
Definition: UniversalRobotsDashboard.cpp:571
rl::hal::UniversalRobotsDashboard::ROBOT_MODE_RUNNING
@ ROBOT_MODE_RUNNING
Definition: UniversalRobotsDashboard.h:63
rl::hal::UniversalRobotsDashboard::SAFETY_MODE_VIOLATION
@ SAFETY_MODE_VIOLATION
Definition: UniversalRobotsDashboard.h:75
rl::hal::UniversalRobotsDashboard::socket
Socket socket
Definition: UniversalRobotsDashboard.h:136
rl::hal::UniversalRobotsDashboard::ROBOT_MODE_POWER_OFF
@ ROBOT_MODE_POWER_OFF
Definition: UniversalRobotsDashboard.h:59
rl::hal::UniversalRobotsDashboard::ROBOT_MODE_BOOTING
@ ROBOT_MODE_BOOTING
Definition: UniversalRobotsDashboard.h:58
Socket.h
rl::hal::UniversalRobotsDashboard::doPolyscopeVersion
::std::string doPolyscopeVersion()
Definition: UniversalRobotsDashboard.cpp:277
rl::hal::UniversalRobotsDashboard::doPause
void doPause()
Definition: UniversalRobotsDashboard.cpp:233
rl::hal::UniversalRobotsDashboard::PROGRAM_STATE_PAUSED
@ PROGRAM_STATE_PAUSED
Definition: UniversalRobotsDashboard.h:50
rl::hal::UniversalRobotsDashboard::send
void send(const ::std::string &command)
Definition: UniversalRobotsDashboard.cpp:584
rl
Robotics Library.
Definition: AnalogInput.cpp:30