FieldParameter.hpp
Go to the documentation of this file.
1 //
2 // FieldParameter.hpp
3 //
4 // Created on: 30.08.2011
5 // Author: wahnfla
6 //
7 
8 #ifndef FIELDPARAMETER_HPP
9 #define FIELDPARAMETER_HPP
10 
11 #include "../BasicDatatypes.hpp"
12 #include "FieldDescription.hpp"
13 #include "Polygon2D.hpp"
14 #include <vector>
15 #include <stdexcept>
16 //#include "Trace.hpp"
17 
18 namespace datatypes
19 {
20 
21 //
22 // Class that represents the structure of a field parameter of a scanner
23 //
24 class FieldParameter : public BasicData
25 {
26 public:
28  {
30  ECR_LOW = 1,
31  ECR_HIGH = 2,
33  };
34 
35  // These codes match the internal representation of the LD-MRS
37  {
42  };
43 
45  virtual ~FieldParameter();
46  virtual const UINT32 getUsedMemory() const;
48  INT32 getAngleScaleOffset() const;
49  double getDistScaleFactor() const;
50  double getDistScaleOffset() const;
51  FieldDescription* getField() const;
53  std::string getFieldTypeInternAsString() const;
54  void setAngleScaleFactor(UINT32 angleScaleFactor);
55  void setAngleScaleOffset(INT32 angleScaleOffset);
56  void setDistScaleFactor(double distScaleFactor);
57  void setDistScaleOffset(double distScaleOffset);
58  void setField(FieldDescription* field);
59 
61  const UINT16 getFieldNumber() const;
62  const bool isValid() const;
63 
64  void setFieldTypeIntern(UINT8 fieldTypeIntern);
66  const std::string & getComment() const;
67  const std::string & getFieldName() const;
68  void setComment(const std::string& comment);
69  void setFieldName(const std::string& fieldName);
70  UINT8 getVersionNumber() const;
73  void setLastKnownInfringementState(CaseResult lastKnownInfringementState);
74 
75  bool isLayerFilterEnabled() const;
76  void setEnableLayerFilter(bool enableLayerFilter);
78  void setLayerFilterBitmap(UINT8 layerFilterBitmap);
79 
80  bool empty() const
81  {
82  return !m_field;
83  }
84 
85  const Polygon2D & getPolygon() const
86  {
87  if (empty())
88  {
89  throw std::runtime_error("FieldDescription::getPolygon(): No field available.");
90  }
91  return m_field->getFieldAsPolygon();
92  }
93 
95 
96 
97 private:
98  // Header data (sensor specific)
106  std::string m_fieldName;
107  std::string m_comment;
112 };
113 
114 } // namespace datatypes
115 
116 #endif // FIELDPARAMETER_HPP
double getDistScaleFactor() const
CaseResult getLastKnownInfringementState() const
void setLayerFilterBitmap(UINT8 layerFilterBitmap)
bool isLayerFilterEnabled() const
FieldDescription * m_field
const FieldDescription::FieldType getFieldType() const
uint16_t UINT16
void setDistScaleFactor(double distScaleFactor)
void setAngleScaleFactor(UINT32 angleScaleFactor)
uint32_t UINT32
const UINT16 getFieldNumber() const
void setAngleScaleOffset(INT32 angleScaleOffset)
A polygon of 2D-points.
Definition: Polygon2D.hpp:43
const std::string & getFieldName() const
void setField(FieldDescription *field)
virtual const UINT32 getUsedMemory() const
void setLastKnownInfringementState(CaseResult lastKnownInfringementState)
std::string getFieldTypeInternAsString() const
INT32 m_angleScaleOffset
internal parameter: sensor specific
FieldTypeIntern getFieldTypeIntern() const
void setDistScaleOffset(double distScaleOffset)
INT32 getAngleScaleOffset() const
UINT32 m_angleScaleFactor
internal parameter: sensor specific
int32_t INT32
const bool isValid() const
void setFieldTypeIntern(UINT8 fieldTypeIntern)
const std::string & getComment() const
const Polygon2D & getFieldAsPolygon() const
double m_distScaleFactor
conversion factor
void setComment(const std::string &comment)
double getDistScaleOffset() const
UINT32 getAngleScaleFactor() const
const Polygon2D & getPolygon() const
FieldDescription * getField() const
FieldTypeIntern m_fieldTypeIntern
internal parameter: sensor specific
void setVersionNumber(UINT8 m_versionNumber)
UINT8 getLayerFilterBitmap() const
void setFieldNumber(UINT16 m_fieldNumber)
void setEnableLayerFilter(bool enableLayerFilter)
void setFieldName(const std::string &fieldName)
uint8_t UINT8


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