FieldData.cpp
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 
36 
37 namespace sick {
38 namespace datastructure {
39 
41 
43 {
44  return m_is_valid;
45 }
46 
47 void FieldData::setIsValid(bool is_valid)
48 {
49  m_is_valid = is_valid;
50 }
51 
53 {
54  return m_field_set_index;
55 }
56 
57 void FieldData::setFieldSetIndex(uint16_t& field_set_index)
58 {
59  m_field_set_index = field_set_index;
60 }
61 
63 {
64  return m_is_warning_field;
65 }
66 
67 void FieldData::setIsWarningField(bool is_warning_field)
68 {
69  m_is_warning_field = is_warning_field;
70 }
71 
73 {
74  return m_is_protective_field;
75 }
76 
77 void FieldData::setIsProtectiveField(bool is_protective_field)
78 {
79  m_is_protective_field = is_protective_field;
80 }
81 
82 std::vector<uint16_t> FieldData::getBeamDistances() const
83 {
84  return m_beam_distances;
85 }
86 
87 void FieldData::setBeamDistances(const std::vector<uint16_t>& beam_distance)
88 {
89  m_beam_distances = beam_distance;
90 }
91 
93 {
94  return m_start_angle;
95 }
96 
97 void FieldData::setStartAngle(const int32_t& start_angle)
98 {
99  m_start_angle = (float)start_angle / ANGLE_RESOLUTION;
100 }
101 
102 void FieldData::setStartAngleDegrees(const float& start_angle)
103 {
104  m_start_angle = start_angle;
105 }
106 
108 {
109  return m_end_angle;
110 }
111 
112 void FieldData::setEndAngle(const int32_t& end_angle)
113 {
114  m_end_angle = (float)end_angle / ANGLE_RESOLUTION;
115 }
116 
117 void FieldData::setEndAngleDegrees(const float& end_angle)
118 {
119  m_end_angle = end_angle;
120 }
121 
123 {
125 }
126 
127 void FieldData::setAngularBeamResolution(const int32_t& angular_beam_resolution)
128 {
129  m_angular_beam_resolution = (float)angular_beam_resolution / ANGLE_RESOLUTION;
130 }
131 
132 void FieldData::setAngularBeamResolutionDegrees(const float& angular_beam_resolution)
133 {
134  m_angular_beam_resolution = angular_beam_resolution;
135 }
136 
137 } // namespace datastructure
138 } // namespace sick
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
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