BasicDatatypes.hpp
Go to the documentation of this file.
1 //
2 // BasicDatatypes.hpp
3 //
4 // Defines very basic structures and types
5 // Copyright (c) Sick AG
6 // created: 31.05.2010
7 //
8 // HISTORY
9 //
10 // 1.0.0 31.05.2010, VWi
11 // Initial version.
12 
13 
14 #ifndef BASICDATATYPES_HPP
15 #define BASICDATATYPES_HPP
16 
17 #include <string> // for std::string
18 #include <vector> // for std::vector
19 #include <stdint.h>
20 
21 //
22 // Standard-Datentypen
23 //
24 typedef uint64_t UINT64;
25 typedef int32_t INT32;
26 typedef uint32_t UINT32;
27 typedef uint16_t UINT16;
28 typedef int16_t INT16;
29 typedef uint8_t UINT8;
30 typedef int8_t INT8;
31 typedef unsigned char BYTE;
32 
33 #ifndef PI
34  #define PI 3.141592653589793238462
35 #endif
36 #ifndef deg2rad
37  #define deg2rad 0.01745329251994329576923690768 // (PI / 180.0)
38 #endif
39 #ifndef rad2degMultiplier
40  #define rad2degMultiplier 57.29577951308232087679815481 // (180.0 / PI)
41 #endif
42 
43 
44 //
46 {
47  Datatype_Unknown = 0x0000,
48 
50  Datatype_Box2D = 0x0002,
51  Datatype_Line2D = 0x0003,
54  Datatype_Point2D = 0x0006,
55  Datatype_Point3D = 0x0007,
58  Datatype_Msg = 0x000A,
59  Datatype_Scan = 0x000B,
60  Datatype_Objects = 0x000C,
62  Datatype_Trigger = 0x000E,
69  Datatype_Fields = 0x0015,
71 };
72 
73 //
74 // Type-IDs of modules (devices, applications, ...)
75 //
77 {
79 
80  // Devices = 0x0001 - 0x0FFF
81  Sourcetype_LDMRS = 0x0003,
82 
83  // Applications = 0x1000 - 0x1FFF
89 };
90 
91 namespace datatypes
92 {
93 
94 // Datencontainer fuer alle transportierbaren Daten
95 class BasicData
96 {
97 public:
99  virtual ~BasicData() {}
100 
103  virtual void setSourceId(UINT16 id) {m_sourceId = id;}
104  virtual const UINT32 getUsedMemory() const = 0;
105 
106 protected:
107  UINT16 m_datatype; // Typ dieses Datums
108  UINT16 m_sourceId; // Unique ID of the data source
109 
110 private:
111 };
112 
113 
114 } // namespace datatypes
115 
116 #endif // BASICDATATYPES_HPP
unsigned char BYTE
uint16_t UINT16
virtual const UINT32 getUsedMemory() const =0
uint32_t UINT32
Datatypes
Sourcetype
int32_t INT32
int8_t INT8
int16_t INT16
virtual void setSourceId(UINT16 id)
uint64_t UINT64
uint8_t UINT8


sick_scan
Author(s): Michael Lehning , Jochen Sprickerhof , Martin Günther
autogenerated on Wed May 5 2021 03:05:47