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  std::string getVersionCVersion() const;
81  void setVersionCVersion(const std::string& version_c_version);
82 
88  uint8_t getVersionMajorVersionNumber() const;
94  void setVersionMajorVersionNumber(const uint8_t& version_major_version_number);
95 
101  uint8_t getVersionMinorVersionNumber() const;
107  void setVersionMinorVersionNumber(const uint8_t& version_minor_version_number);
108 
114  uint8_t getVersionReleaseNumber() const;
120  void setVersionReleaseNumber(const uint8_t& version_release_number);
121 
127  bool getIsDefined() const;
128 
134  void setIsDefined(bool is_defined);
135  ;
136 
142  uint8_t getEvalMethod() const;
143 
149  void setEvalMethod(const uint8_t& eval_method);
150 
156  uint16_t getMultiSampling() const;
157 
163  void setMultiSampling(const uint16_t& multi_sampling);
164  ;
165 
171  uint16_t getObjectResolution() const;
172 
178  void setObjectResolution(const uint16_t& object_resolution);
179  ;
185  uint16_t getFieldSetIndex() const;
186 
192  void setFieldSetIndex(const uint16_t& field_set_index);
198  uint32_t getNameLength() const;
204  void setNameLength(const uint32_t& name_length);
210  std::string getFieldName() const;
216  void setFieldName(const std::string& field_name);
217 
223  bool getIsWarningField() const;
224 
230  void setIsWarningField(bool is_warning_field);
231 
237  bool getIsProtectiveField() const;
238 
244  void setIsProtectiveField(bool is_protective_field);
245 
251  std::vector<uint16_t> getBeamDistances() const;
252 
258  void setBeamDistances(const std::vector<uint16_t>& beam_distances);
259 
264  float getStartAngle() const;
265 
270  void setStartAngle(const int32_t& start_angle);
271 
276  void setStartAngleDegrees(const float& start_angle);
277 
282  float getEndAngle() const;
283 
288  void setEndAngle(const int32_t& end_angle);
289 
294  void setEndAngleDegrees(const float& end_angle);
295 
300  float getAngularBeamResolution() const;
301 
306  void setAngularBeamResolution(const int32_t& angular_beam_resolution);
307 
312  void setAngularBeamResolutionDegrees(const float& angular_beam_resolution);
313 
314 private:
318  const double m_ANGLE_RESOLUTION = 4194304.0;
319 
320  std::string m_version_c_version;
326  uint8_t m_eval_method;
330  uint32_t m_name_length;
331  std::string m_field_name;
334  std::vector<uint16_t> m_beam_distances; // in mm
336  float m_end_angle;
338 };
339 
340 
341 } // namespace datastructure
342 } // namespace sick
343 
344 #endif // SICK_SAFETYSCANNERS_DATASTRUCTURE_FIELDDATA_H
FieldData()
The constructor of the field data.
Definition: FieldData.cpp:40
void setNameLength(const uint32_t &name_length)
Sets the length of the field name.
Definition: FieldData.cpp:147
void setMultiSampling(const uint16_t &multi_sampling)
Sets the configured multiple sampling of the field.
Definition: FieldData.cpp:117
float getStartAngle() const
Get the start angle of the scan.
Definition: FieldData.cpp:193
uint16_t getFieldSetIndex() const
Returns the index of the field set the field belongs to.
Definition: FieldData.cpp:132
void setEvalMethod(const uint8_t &eval_method)
Sets the configured eval method.
Definition: FieldData.cpp:107
void setVersionReleaseNumber(const uint8_t &version_release_number)
Sets the version release number for the scanner.
Definition: FieldData.cpp:87
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:173
void setIsDefined(bool is_defined)
Sets if the field data is defined.
Definition: FieldData.cpp:97
void setStartAngleDegrees(const float &start_angle)
Set the start angle of the scan from degrees.
Definition: FieldData.cpp:203
std::vector< uint16_t > getBeamDistances() const
Returns vector with beam distances.
Definition: FieldData.cpp:183
Field data for warning and protective fields.
Definition: FieldData.h:48
void setVersionCVersion(const std::string &version_c_version)
Sets the version indicator for the scanner.
Definition: FieldData.cpp:57
float getEndAngle() const
Get the end angle of the scan.
Definition: FieldData.cpp:208
void setIsProtectiveField(bool is_protective_field)
Set if a field is protective field.
Definition: FieldData.cpp:178
std::string getVersionCVersion() const
Gets the version indicator for the scanner.
Definition: FieldData.cpp:52
void setEndAngle(const int32_t &end_angle)
Set the end angle of the scan.
Definition: FieldData.cpp:213
const double m_ANGLE_RESOLUTION
Defined angle resolution to convert sensor input to the right frame.
Definition: FieldData.h:318
uint8_t getVersionReleaseNumber() const
Gets the version release number for the scanner.
Definition: FieldData.cpp:82
uint16_t getMultiSampling() const
Returns the multiple sampling of the field.
Definition: FieldData.cpp:112
void setAngularBeamResolutionDegrees(const float &angular_beam_resolution)
Set the angular resolution between beams from degrees.
Definition: FieldData.cpp:233
std::vector< uint16_t > m_beam_distances
Definition: FieldData.h:334
uint8_t getEvalMethod() const
Returns the configured eval method.
Definition: FieldData.cpp:102
void setBeamDistances(const std::vector< uint16_t > &beam_distances)
Sets vector with beam distances for field.
Definition: FieldData.cpp:188
bool getIsDefined() const
Returns if the received field data is defined.
Definition: FieldData.cpp:92
void setObjectResolution(const uint16_t &object_resolution)
Sets the configured object resolution.
Definition: FieldData.cpp:127
uint16_t getObjectResolution() const
Returns the configured object resolution.
Definition: FieldData.cpp:122
void setIsWarningField(bool is_warning_field)
Set if a field is a warning field.
Definition: FieldData.cpp:168
std::string getFieldName() const
Gets the current field name.
Definition: FieldData.cpp:152
uint8_t getVersionMinorVersionNumber() const
Gets the minor version number for the scanner.
Definition: FieldData.cpp:72
void setEndAngleDegrees(const float &end_angle)
Set the end angle of the scan from degrees.
Definition: FieldData.cpp:218
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:228
void setFieldName(const std::string &field_name)
Sets the field name.
Definition: FieldData.cpp:157
void setFieldSetIndex(const uint16_t &field_set_index)
Sets the index of the field set where the field belongs to.
Definition: FieldData.cpp:137
uint8_t getVersionMajorVersionNumber() const
Gets the major version number for the scanner.
Definition: FieldData.cpp:62
void setVersionMinorVersionNumber(const uint8_t &version_minor_version_number)
Sets the minor version number for the scanner.
Definition: FieldData.cpp:77
bool getIsWarningField() const
Returns if a field is warning field.
Definition: FieldData.cpp:163
void setStartAngle(const int32_t &start_angle)
Set the start angle of the scan.
Definition: FieldData.cpp:198
float getAngularBeamResolution() const
Returns the angular resolution between the beams.
Definition: FieldData.cpp:223
void setVersionMajorVersionNumber(const uint8_t &version_major_version_number)
Sets the major version number for the scanner.
Definition: FieldData.cpp:67
uint32_t getNameLength() const
Gets the length of the field name.
Definition: FieldData.cpp:142


sick_safetyscanners
Author(s): Lennart Puck
autogenerated on Fri Apr 2 2021 02:45:41