BasicDevice.hpp
Go to the documentation of this file.
1 //
2 // BasicDevice.hpp
3 //
4 // Basis-Datentyp fuer alle Devices (Geraetetreiber, Datenquellen)
5 //
6 
7 #ifndef BASICDEVICE_HPP
8 #define BASICDEVICE_HPP
9 
10 #include "../BasicDatatypes.hpp"
11 
12 namespace devices
13 {
14 
15 // Container fuer alle Devices
17 {
18 public:
19  BasicDevice();
20  virtual ~BasicDevice();
21 
24  void setSourceId(UINT16 deviceId);
25  void setDeviceName(std::string name);
26  std::string getDeviceName();
27 
28  // Diese Funktionen koennen da sein.
29  virtual bool init() {return true;};
30 
31  // Diese Funktionen muessen da sein.
32  virtual bool run() = 0;
33  virtual bool stop() = 0;
34 
35 protected:
36  void setDevicetype(UINT16 devicetype); // {m_devicetype = devicetype;}
37  bool m_beVerbose; // Debug-Ausgaben an oder aus.
38 
39 private:
40  UINT16 m_devicetype; // Der Geratetyp (=Sourcetype)
41  UINT16 m_sourceId; // Die ID
42  std::string m_deviceName; // Ein sprechender Name
43 };
44 
45 
46 } // namespace devices
47 
48 #endif
uint16_t UINT16
void setDeviceName(std::string name)
Definition: BasicDevice.cpp:66
virtual bool init()
Definition: BasicDevice.hpp:29
void setSourceId(UINT16 deviceId)
Definition: BasicDevice.cpp:58
virtual bool stop()=0
void setDevicetype(UINT16 devicetype)
Definition: BasicDevice.cpp:42
virtual bool run()=0
std::string getDeviceName()
Definition: BasicDevice.cpp:74
std::string m_deviceName
Definition: BasicDevice.hpp:42


libsick_ldmrs
Author(s): SICK AG , Martin Günther , Jochen Sprickerhof
autogenerated on Sat Jun 8 2019 17:57:33