FieldData.h
Go to the documentation of this file.
1 // this is for emacs file handling -*- mode: c++; indent-tabs-mode: nil -*-
2 
3 // -- BEGIN LICENSE BLOCK ----------------------------------------------
4 
24 // -- END LICENSE BLOCK ------------------------------------------------
25 
26 //----------------------------------------------------------------------
33 //----------------------------------------------------------------------
34 
35 #ifndef SICK_SAFETYSCANNERS_DATASTRUCTURE_FIELDDATA_H
36 #define SICK_SAFETYSCANNERS_DATASTRUCTURE_FIELDDATA_H
37 
38 #include <iostream>
39 #include <vector>
40 
41 namespace sick {
42 namespace datastructure {
43 
44 
48 class FieldData
49 {
50 public:
54  FieldData();
55 
61  bool getIsValid() const;
62 
68  void setIsValid(bool is_valid);
69 
75  uint16_t getFieldSetIndex() const;
76 
82  void setFieldSetIndex(uint16_t& field_set_index);
83 
89  bool getIsWarningField() const;
90 
96  void setIsWarningField(bool is_warning_field);
97 
103  bool getIsProtectiveField() const;
104 
110  void setIsProtectiveField(bool is_protective_field);
111 
117  std::vector<uint16_t> getBeamDistances() const;
118 
124  void setBeamDistances(const std::vector<uint16_t>& beam_distances);
125 
130  float getStartAngle() const;
131 
136  void setStartAngle(const int32_t& start_angle);
137 
142  void setStartAngleDegrees(const float& start_angle);
143 
148  float getEndAngle() const;
149 
154  void setEndAngle(const int32_t& end_angle);
155 
160  void setEndAngleDegrees(const float& end_angle);
161 
166  float getAngularBeamResolution() const;
167 
172  void setAngularBeamResolution(const int32_t& angular_beam_resolution);
173 
178  void setAngularBeamResolutionDegrees(const float& angular_beam_resolution);
179 
180 private:
184  const double ANGLE_RESOLUTION = 4194304.0;
185 
190  std::vector<uint16_t> m_beam_distances; // in mm
192  float m_end_angle;
194 };
195 
196 
197 } // namespace datastructure
198 } // namespace sick
199 
200 #endif // SICK_SAFETYSCANNERS_DATASTRUCTURE_FIELDDATA_H
FieldData()
The constructor of the field data.
Definition: FieldData.cpp:40
float getStartAngle() const
Get the start angle of the scan.
Definition: FieldData.cpp:92
uint16_t getFieldSetIndex() const
Returns the index of the field set the field belongs to.
Definition: FieldData.cpp:52
void setIsValid(bool is_valid)
Sets if the field data is valid.
Definition: FieldData.cpp:47
bool getIsProtectiveField() const
Returns if a field is a protective field.
Definition: FieldData.cpp:72
void setStartAngleDegrees(const float &start_angle)
Set the start angle of the scan from degrees.
Definition: FieldData.cpp:102
std::vector< uint16_t > getBeamDistances() const
Returns vector with beam distances.
Definition: FieldData.cpp:82
Field data for warning and protective fields.
Definition: FieldData.h:48
float getEndAngle() const
Get the end angle of the scan.
Definition: FieldData.cpp:107
void setIsProtectiveField(bool is_protective_field)
Set if a field is protective field.
Definition: FieldData.cpp:77
void setEndAngle(const int32_t &end_angle)
Set the end angle of the scan.
Definition: FieldData.cpp:112
const double ANGLE_RESOLUTION
Defined angle resolution to convert sensor input to the right frame.
Definition: FieldData.h:184
void setAngularBeamResolutionDegrees(const float &angular_beam_resolution)
Set the angular resolution between beams from degrees.
Definition: FieldData.cpp:132
std::vector< uint16_t > m_beam_distances
Definition: FieldData.h:190
void setBeamDistances(const std::vector< uint16_t > &beam_distances)
Sets vector with beam distances for field.
Definition: FieldData.cpp:87
void setIsWarningField(bool is_warning_field)
Set if a field is a warning field.
Definition: FieldData.cpp:67
void setEndAngleDegrees(const float &end_angle)
Set the end angle of the scan from degrees.
Definition: FieldData.cpp:117
bool getIsValid() const
Returns if the received field data is valid.
Definition: FieldData.cpp:42
void setAngularBeamResolution(const int32_t &angular_beam_resolution)
Set the angular resolution between beams.
Definition: FieldData.cpp:127
void setFieldSetIndex(uint16_t &field_set_index)
Sets the index of the field set where the field belongs to.
Definition: FieldData.cpp:57
bool getIsWarningField() const
Returns if a field is warning field.
Definition: FieldData.cpp:62
void setStartAngle(const int32_t &start_angle)
Set the start angle of the scan.
Definition: FieldData.cpp:97
float getAngularBeamResolution() const
Returns the angular resolution between the beams.
Definition: FieldData.cpp:122


sick_safetyscanners
Author(s): Lennart Puck
autogenerated on Thu May 9 2019 02:41:08