OpenIndy-Core  0.2.0.43
totalstation.h
Go to the documentation of this file.
1 #ifndef TOTALSTATION_H
2 #define TOTALSTATION_H
3 
4 #include "sensor.h"
5 
6 namespace oi{
7 
12 {
13  Q_OBJECT
14 
15 public:
16  TotalStation(QObject *parent = 0) : Sensor(parent){}
17 
18  virtual ~TotalStation(){}
19 
20  //##########################################
21  //calls the appropriate laser tracker method
22  //##########################################
23 
24  bool accept(const SensorFunctions &method, const SensorAttributes &sAttr){
25 
26  switch(method){
27  case(eMoveAngle):
28  return this->move(sAttr.moveAzimuth, sAttr.moveZenith, sAttr.moveDistance, sAttr.moveIsRelative);
29  case(eMoveXYZ):
30  return this->move(sAttr.moveX, sAttr.moveY, sAttr.moveZ);
31  case(eToggleSight):
32  return this->toggleSightOrientation();
33  }
34  return false;
35 
36  }
37 
38 protected:
39 
40  //#####################
41  //total station methods
42  //#####################
43 
52  virtual bool move(const double &azimuth, const double &zenith, const double &distance, const bool &isRelative){
53  emit this->sensorMessage(QString("Total Station not implemented correctly: move method missing"), eCriticalMessage, eMessageBoxMessage);
54  return false;
55  }
56 
64  virtual bool move(const double &x, const double &y, const double &z){
65  emit this->sensorMessage(QString("Total Station not implemented correctly: move method missing"), eCriticalMessage, eMessageBoxMessage);
66  return false;
67  }
68 
73  virtual bool toggleSightOrientation(){
74  emit this->sensorMessage(QString("Total Station not implemented correctly: toggle sight method missing"), eCriticalMessage, eMessageBoxMessage);
75  return false;
76  }
77 
78 };
79 
80 }
81 
82 #ifndef STR
83 #define STR(x) #x
84 #endif
85 #ifndef STR2
86 #define STR2(x) STR(x)
87 #endif
88 
89 #ifndef CONCAT
90 #define CONCAT(a, b) a ## b
91 #endif
92 #ifndef CONCAT2
93 #define CONCAT2(a, b) CONCAT(a, b)
94 #endif
95 
96 #define TOTALSTATION_PREFIX de.openIndy.plugin.sensor.totalStation.v
97 #define TotalStation_iidd STR2(CONCAT2(TOTALSTATION_PREFIX, PLUGIN_INTERFACE_VERSION))
98 
99 #endif // TOTALSTATION_H
TotalStation(QObject *parent=0)
Definition: totalstation.h:16
virtual bool move(const double &azimuth, const double &zenith, const double &distance, const bool &isRelative)
move
Definition: totalstation.h:52
double moveY
Definition: sensor.h:31
double moveX
Definition: sensor.h:30
Definition: types.h:415
Definition: coordinatesystem.h:15
double moveZ
Definition: sensor.h:32
The SensorAttributes class.
Definition: sensor.h:24
virtual bool toggleSightOrientation()
toggleSightOrientation
Definition: totalstation.h:73
bool moveIsRelative
Definition: sensor.h:29
double moveAzimuth
Definition: sensor.h:26
The TotalStation class.
Definition: totalstation.h:11
Definition: types.h:33
Definition: types.h:414
The Sensor class.
Definition: sensor.h:43
bool accept(const SensorFunctions &method, const SensorAttributes &sAttr)
Sensor::accept Calls the appropriate internal sensor method.
Definition: totalstation.h:24
virtual ~TotalStation()
Definition: totalstation.h:18
double moveDistance
Definition: sensor.h:28
virtual bool move(const double &x, const double &y, const double &z)
move
Definition: totalstation.h:64
SensorFunctions
Definition: types.h:412
Definition: types.h:417
#define OI_CORE_EXPORT
Definition: types.h:11
double moveZenith
Definition: sensor.h:27
Definition: types.h:39