BasicDatatypes.hpp
Go to the documentation of this file.
00001 //
00002 // BasicDatatypes.hpp
00003 //
00004 // Defines very basic structures and types
00005 // Copyright (c) Sick AG
00006 // created: 31.05.2010
00007 //
00008 // HISTORY
00009 //
00010 // 1.0.0        31.05.2010, VWi
00011 //                      Initial version.
00012 
00013 
00014 #ifndef BASICDATATYPES_HPP
00015 #define BASICDATATYPES_HPP
00016 
00017 #include <string>       // for std::string
00018 #include <vector>       // for std::vector
00019 #include <stdint.h>
00020 
00021 //
00022 // Standard-Datentypen
00023 //
00024 typedef uint64_t      UINT64;
00025 typedef int32_t       INT32;
00026 typedef uint32_t      UINT32;
00027 typedef uint16_t      UINT16;
00028 typedef int16_t       INT16;
00029 typedef uint8_t       UINT8;
00030 typedef int8_t        INT8;
00031 typedef unsigned char BYTE;
00032 
00033 #ifndef PI
00034         #define PI 3.141592653589793238462
00035 #endif
00036 #ifndef deg2rad
00037         #define deg2rad 0.01745329251994329576923690768         // (PI / 180.0)
00038 #endif
00039 #ifndef rad2deg
00040         #define rad2deg 57.29577951308232087679815481           // (180.0 / PI)
00041 #endif
00042 
00043 
00044 //
00045 enum Datatypes
00046 {
00047         Datatype_Unknown                                = 0x0000,
00048         
00049         Datatype_MeasurementList                = 0x0001,
00050         Datatype_Box2D                                  = 0x0002,
00051         Datatype_Line2D                                 = 0x0003,
00052         Datatype_Polygon2D                              = 0x0004,
00053         Datatype_Polygon3D                              = 0x0005,
00054         Datatype_Point2D                                = 0x0006,
00055         Datatype_Point3D                                = 0x0007,
00056         Datatype_Circle2D                               = 0x0008,
00057         Datatype_Ellipse2D                              = 0x0009,
00058         Datatype_Msg                                    = 0x000A,
00059         Datatype_Scan                                   = 0x000B,
00060         Datatype_Objects                                = 0x000C,
00061         Datatype_Scannerinfo                    = 0x000D,
00062         Datatype_Trigger                                = 0x000E,
00063         Datatype_EvalCaseResult                 = 0x000F,
00064         Datatype_EvalCaseResults                = 0x0010,
00065         Datatype_EvalCase                               = 0x0011,
00066         Datatype_EvalCases                              = 0x0012,
00067         Datatype_FieldParameter                 = 0x0013,
00068         Datatype_FieldDescription               = 0x0014,
00069         Datatype_Fields                                 = 0x0015,
00070         Datatype_SensorStateInfo                = 0x0016
00071 };
00072 
00073 //
00074 // Type-IDs of modules (devices, applications, ...)
00075 //
00076 enum Sourcetype
00077 {
00078         Sourcetype_Unknown                              = 0x0000,
00079         
00080         // Devices = 0x0001 - 0x0FFF
00081         Sourcetype_LDMRS                                = 0x0003,
00082 
00083         // Applications = 0x1000 - 0x1FFF
00084         Sourcetype_MrsApp                               = 0x1002,
00085         Sourcetype_MrsChangeApp                 = 0x1003,
00086         Sourcetype_MrsFieldApp                  = 0x1004,
00087         Sourcetype_MrsNtpTimeApp                = 0x1005,
00088         Sourcetype_MrsScanpointCoordinateApp = 0x1006
00089 };
00090 
00091 namespace datatypes
00092 {
00093 
00094 // Datencontainer fuer alle transportierbaren Daten
00095 class BasicData
00096 {
00097 public:
00098         BasicData() {m_datatype = Datatype_Unknown; m_sourceId = Sourcetype_Unknown;}
00099         virtual ~BasicData() {}
00100         
00101         UINT16 getDatatype() {return m_datatype;}
00102         UINT16 getSourceId() {return m_sourceId;}
00103         virtual void setSourceId(UINT16 id) {m_sourceId = id;}
00104         virtual const UINT32 getUsedMemory() const = 0;
00105         
00106 protected:
00107         UINT16 m_datatype;              // Typ dieses Datums
00108         UINT16 m_sourceId;              // Unique ID of the data source
00109 
00110 private:
00111 };
00112 
00113 
00114 }       // namespace datatypes
00115 
00116 #endif // BASICDATATYPES_HPP


libsick_ldmrs
Author(s): SICK AG , Martin Günther , Jochen Sprickerhof
autogenerated on Thu Jun 6 2019 21:02:36