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
UINT16
uint16_t UINT16
Definition: BasicDatatypes.hpp:27
UINT8
uint8_t UINT8
Definition: BasicDatatypes.hpp:29
Datatype_Line2D
@ Datatype_Line2D
Definition: BasicDatatypes.hpp:51
datatypes::BasicData::setSourceId
virtual void setSourceId(UINT16 id)
Definition: BasicDatatypes.hpp:103
Datatype_Ellipse2D
@ Datatype_Ellipse2D
Definition: BasicDatatypes.hpp:57
datatypes::BasicData::~BasicData
virtual ~BasicData()
Definition: BasicDatatypes.hpp:99
Sourcetype_Unknown
@ Sourcetype_Unknown
Definition: BasicDatatypes.hpp:78
Datatype_Scan
@ Datatype_Scan
Definition: BasicDatatypes.hpp:59
Datatype_EvalCaseResults
@ Datatype_EvalCaseResults
Definition: BasicDatatypes.hpp:64
Sourcetype
Sourcetype
Definition: BasicDatatypes.hpp:76
INT16
int16_t INT16
Definition: BasicDatatypes.hpp:28
Sourcetype_MrsApp
@ Sourcetype_MrsApp
Definition: BasicDatatypes.hpp:84
Datatype_Box2D
@ Datatype_Box2D
Definition: BasicDatatypes.hpp:50
Sourcetype_MrsNtpTimeApp
@ Sourcetype_MrsNtpTimeApp
Definition: BasicDatatypes.hpp:87
Datatypes
Datatypes
Definition: BasicDatatypes.hpp:45
Datatype_EvalCaseResult
@ Datatype_EvalCaseResult
Definition: BasicDatatypes.hpp:63
INT8
int8_t INT8
Definition: BasicDatatypes.hpp:30
datatypes::BasicData::getSourceId
UINT16 getSourceId()
Definition: BasicDatatypes.hpp:102
datatypes::BasicData::m_datatype
UINT16 m_datatype
Definition: BasicDatatypes.hpp:107
datatypes::BasicData
Definition: BasicDatatypes.hpp:95
datatypes::BasicData::getUsedMemory
virtual const UINT32 getUsedMemory() const =0
Datatype_SensorStateInfo
@ Datatype_SensorStateInfo
Definition: BasicDatatypes.hpp:70
INT32
int32_t INT32
Definition: BasicDatatypes.hpp:25
Datatype_Polygon2D
@ Datatype_Polygon2D
Definition: BasicDatatypes.hpp:52
datatypes::BasicData::getDatatype
UINT16 getDatatype()
Definition: BasicDatatypes.hpp:101
Datatype_Unknown
@ Datatype_Unknown
Definition: BasicDatatypes.hpp:47
Datatype_EvalCases
@ Datatype_EvalCases
Definition: BasicDatatypes.hpp:66
UINT64
uint64_t UINT64
Definition: BasicDatatypes.hpp:24
Datatype_Point2D
@ Datatype_Point2D
Definition: BasicDatatypes.hpp:54
Datatype_Circle2D
@ Datatype_Circle2D
Definition: BasicDatatypes.hpp:56
Datatype_Polygon3D
@ Datatype_Polygon3D
Definition: BasicDatatypes.hpp:53
Datatype_FieldParameter
@ Datatype_FieldParameter
Definition: BasicDatatypes.hpp:67
Sourcetype_MrsChangeApp
@ Sourcetype_MrsChangeApp
Definition: BasicDatatypes.hpp:85
Datatype_Fields
@ Datatype_Fields
Definition: BasicDatatypes.hpp:69
Datatype_Objects
@ Datatype_Objects
Definition: BasicDatatypes.hpp:60
Datatype_EvalCase
@ Datatype_EvalCase
Definition: BasicDatatypes.hpp:65
Sourcetype_MrsFieldApp
@ Sourcetype_MrsFieldApp
Definition: BasicDatatypes.hpp:86
BYTE
unsigned char BYTE
Definition: BasicDatatypes.hpp:31
Datatype_MeasurementList
@ Datatype_MeasurementList
Definition: BasicDatatypes.hpp:49
Sourcetype_MrsScanpointCoordinateApp
@ Sourcetype_MrsScanpointCoordinateApp
Definition: BasicDatatypes.hpp:88
UINT32
uint32_t UINT32
Definition: BasicDatatypes.hpp:26
datatypes::BasicData::BasicData
BasicData()
Definition: BasicDatatypes.hpp:98
datatypes::BasicData::m_sourceId
UINT16 m_sourceId
Definition: BasicDatatypes.hpp:108
Datatype_Scannerinfo
@ Datatype_Scannerinfo
Definition: BasicDatatypes.hpp:61
Datatype_Trigger
@ Datatype_Trigger
Definition: BasicDatatypes.hpp:62
Datatype_FieldDescription
@ Datatype_FieldDescription
Definition: BasicDatatypes.hpp:68
Datatype_Msg
@ Datatype_Msg
Definition: BasicDatatypes.hpp:58
Datatype_Point3D
@ Datatype_Point3D
Definition: BasicDatatypes.hpp:55
Sourcetype_LDMRS
@ Sourcetype_LDMRS
Definition: BasicDatatypes.hpp:81
datatypes
Definition: BasicDatatypes.hpp:91


sick_scan
Author(s): Michael Lehning , Jochen Sprickerhof , Martin Günther
autogenerated on Thu Sep 8 2022 02:30:19