Robot Devastation
MockRobotManager.hpp
1 // Authors: see AUTHORS.md at project root.
2 // CopyPolicy: released under the terms of the LGPLv2.1, see LICENSE at project root.
3 // URL: https://github.com/asrob-uc3m/robotDevastation
4 
5 #ifndef __RD_MOCK_ROBOT_MANAGER_HPP__
6 #define __RD_MOCK_ROBOT_MANAGER_HPP__
7 
8 #include <string>
9 
10 #include "IRobotManager.hpp"
11 
12 namespace rd{
13 
20 class MockRobotManager : public asrob::IRobotManager
21 {
22  public:
23 
24  MockRobotManager(const std::string& robotName);
25 
26  //-- RobotManager interface
27  //-----------------------------------------------------
29  virtual bool moveForward(double value);
30 
32  virtual bool turnLeft(double value);
33 
35  virtual bool stopMovement();
36 
38  virtual bool tiltDown(double value);
39 
41  virtual bool panLeft(double value);
42 
44  virtual bool stopCameraMovement();
45 
46  //-- Mock functionality
47  //-----------------------------------------------------
48  bool isMoving() const;
49  int getMovementDirection();
50  static const int FORWARD;
51  static const int BACKWARDS;
52  static const int LEFT;
53  static const int RIGHT;
54  static const int NONE;
55 
56  bool isCameraMoving();
57  int getCameraMovementDirection();
58  static const int CAMERA_UP;
59  static const int CAMERA_DOWN;
60  static const int CAMERA_LEFT;
61  static const int CAMERA_RIGHT;
62  static const int CAMERA_NONE;
63 
64  private:
65  std::string robotName;
66 
67  int movement_direction;
68  int camera_movement_direction;
69 
70 };
71 
72 }
73 
74 
75 
76 #endif //-- __RD_MOCK_ROBOT_MANAGER_HPP__
rd::MockRobotManager::stopMovement
virtual bool stopMovement()
Robot: Stop movement.
Definition: MockRobotManager.cpp:48
rd
The main, catch-all namespace for Robot Devastation.
Definition: groups.dox:4
rd::MockRobotManager::turnLeft
virtual bool turnLeft(double value)
Robot: Turn left (use negative value for turn left). position mode [deg]. Velocity mode [deg/s].
Definition: MockRobotManager.cpp:37
rd::MockRobotManager::moveForward
virtual bool moveForward(double value)
Robot: Move forward (use negative value for move backward). position mode [m]. Velocity mode [m/s].
Definition: MockRobotManager.cpp:26
rd::MockRobotManager
The Robot Manager for testing.
Definition: MockRobotManager.hpp:20
rd::MockRobotManager::panLeft
virtual bool panLeft(double value)
Robot camera: Pan left (use negative value for pan right). position mode [deg]. Velocity mode [deg/s]...
Definition: MockRobotManager.cpp:65
rd::MockRobotManager::tiltDown
virtual bool tiltDown(double value)
Robot camera: Tilt down (use negative value for tilt up). position mode [deg]. Velocity mode [deg/s].
Definition: MockRobotManager.cpp:54
rd::MockRobotManager::stopCameraMovement
virtual bool stopCameraMovement()
Robot camera: Stop movement.
Definition: MockRobotManager.cpp:76