gz_msgs/ign_msgs8/
laserscan.rs

1// This file is generated by rust-protobuf 3.7.2. Do not edit
2// .proto file is parsed by protoc 3.21.12
3// @generated
4
5// https://github.com/rust-lang/rust-clippy/issues/702
6#![allow(unknown_lints)]
7#![allow(clippy::all)]
8
9#![allow(unused_attributes)]
10#![cfg_attr(rustfmt, rustfmt::skip)]
11
12#![allow(dead_code)]
13#![allow(missing_docs)]
14#![allow(non_camel_case_types)]
15#![allow(non_snake_case)]
16#![allow(non_upper_case_globals)]
17#![allow(trivial_casts)]
18#![allow(unused_results)]
19#![allow(unused_mut)]
20
21//! Generated file from `ignition/msgs/laserscan.proto`
22
23/// Generated files are compatible only with the same version
24/// of protobuf runtime.
25const _PROTOBUF_VERSION_CHECK: () = ::protobuf::VERSION_3_7_2;
26
27#[derive(::gz_msgs_common::IgnMessage)]
28// @@protoc_insertion_point(message:ignition.msgs.LaserScan)
29#[derive(PartialEq,Clone,Default,Debug)]
30pub struct LaserScan {
31    // message fields
32    // @@protoc_insertion_point(field:ignition.msgs.LaserScan.header)
33    pub header: ::protobuf::MessageField<super::header::Header>,
34    // @@protoc_insertion_point(field:ignition.msgs.LaserScan.frame)
35    pub frame: ::std::string::String,
36    // @@protoc_insertion_point(field:ignition.msgs.LaserScan.world_pose)
37    pub world_pose: ::protobuf::MessageField<super::pose::Pose>,
38    // @@protoc_insertion_point(field:ignition.msgs.LaserScan.angle_min)
39    pub angle_min: f64,
40    // @@protoc_insertion_point(field:ignition.msgs.LaserScan.angle_max)
41    pub angle_max: f64,
42    // @@protoc_insertion_point(field:ignition.msgs.LaserScan.angle_step)
43    pub angle_step: f64,
44    // @@protoc_insertion_point(field:ignition.msgs.LaserScan.range_min)
45    pub range_min: f64,
46    // @@protoc_insertion_point(field:ignition.msgs.LaserScan.range_max)
47    pub range_max: f64,
48    // @@protoc_insertion_point(field:ignition.msgs.LaserScan.count)
49    pub count: u32,
50    // @@protoc_insertion_point(field:ignition.msgs.LaserScan.vertical_angle_min)
51    pub vertical_angle_min: f64,
52    // @@protoc_insertion_point(field:ignition.msgs.LaserScan.vertical_angle_max)
53    pub vertical_angle_max: f64,
54    // @@protoc_insertion_point(field:ignition.msgs.LaserScan.vertical_angle_step)
55    pub vertical_angle_step: f64,
56    // @@protoc_insertion_point(field:ignition.msgs.LaserScan.vertical_count)
57    pub vertical_count: u32,
58    // @@protoc_insertion_point(field:ignition.msgs.LaserScan.ranges)
59    pub ranges: ::std::vec::Vec<f64>,
60    // @@protoc_insertion_point(field:ignition.msgs.LaserScan.intensities)
61    pub intensities: ::std::vec::Vec<f64>,
62    // special fields
63    // @@protoc_insertion_point(special_field:ignition.msgs.LaserScan.special_fields)
64    pub special_fields: ::protobuf::SpecialFields,
65}
66
67impl<'a> ::std::default::Default for &'a LaserScan {
68    fn default() -> &'a LaserScan {
69        <LaserScan as ::protobuf::Message>::default_instance()
70    }
71}
72
73impl LaserScan {
74    pub fn new() -> LaserScan {
75        ::std::default::Default::default()
76    }
77
78    fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData {
79        let mut fields = ::std::vec::Vec::with_capacity(15);
80        let mut oneofs = ::std::vec::Vec::with_capacity(0);
81        fields.push(::protobuf::reflect::rt::v2::make_message_field_accessor::<_, super::header::Header>(
82            "header",
83            |m: &LaserScan| { &m.header },
84            |m: &mut LaserScan| { &mut m.header },
85        ));
86        fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>(
87            "frame",
88            |m: &LaserScan| { &m.frame },
89            |m: &mut LaserScan| { &mut m.frame },
90        ));
91        fields.push(::protobuf::reflect::rt::v2::make_message_field_accessor::<_, super::pose::Pose>(
92            "world_pose",
93            |m: &LaserScan| { &m.world_pose },
94            |m: &mut LaserScan| { &mut m.world_pose },
95        ));
96        fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>(
97            "angle_min",
98            |m: &LaserScan| { &m.angle_min },
99            |m: &mut LaserScan| { &mut m.angle_min },
100        ));
101        fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>(
102            "angle_max",
103            |m: &LaserScan| { &m.angle_max },
104            |m: &mut LaserScan| { &mut m.angle_max },
105        ));
106        fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>(
107            "angle_step",
108            |m: &LaserScan| { &m.angle_step },
109            |m: &mut LaserScan| { &mut m.angle_step },
110        ));
111        fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>(
112            "range_min",
113            |m: &LaserScan| { &m.range_min },
114            |m: &mut LaserScan| { &mut m.range_min },
115        ));
116        fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>(
117            "range_max",
118            |m: &LaserScan| { &m.range_max },
119            |m: &mut LaserScan| { &mut m.range_max },
120        ));
121        fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>(
122            "count",
123            |m: &LaserScan| { &m.count },
124            |m: &mut LaserScan| { &mut m.count },
125        ));
126        fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>(
127            "vertical_angle_min",
128            |m: &LaserScan| { &m.vertical_angle_min },
129            |m: &mut LaserScan| { &mut m.vertical_angle_min },
130        ));
131        fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>(
132            "vertical_angle_max",
133            |m: &LaserScan| { &m.vertical_angle_max },
134            |m: &mut LaserScan| { &mut m.vertical_angle_max },
135        ));
136        fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>(
137            "vertical_angle_step",
138            |m: &LaserScan| { &m.vertical_angle_step },
139            |m: &mut LaserScan| { &mut m.vertical_angle_step },
140        ));
141        fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>(
142            "vertical_count",
143            |m: &LaserScan| { &m.vertical_count },
144            |m: &mut LaserScan| { &mut m.vertical_count },
145        ));
146        fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>(
147            "ranges",
148            |m: &LaserScan| { &m.ranges },
149            |m: &mut LaserScan| { &mut m.ranges },
150        ));
151        fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>(
152            "intensities",
153            |m: &LaserScan| { &m.intensities },
154            |m: &mut LaserScan| { &mut m.intensities },
155        ));
156        ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::<LaserScan>(
157            "LaserScan",
158            fields,
159            oneofs,
160        )
161    }
162}
163
164impl ::protobuf::Message for LaserScan {
165    const NAME: &'static str = "LaserScan";
166
167    fn is_initialized(&self) -> bool {
168        true
169    }
170
171    fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> {
172        while let Some(tag) = is.read_raw_tag_or_eof()? {
173            match tag {
174                10 => {
175                    ::protobuf::rt::read_singular_message_into_field(is, &mut self.header)?;
176                },
177                18 => {
178                    self.frame = is.read_string()?;
179                },
180                26 => {
181                    ::protobuf::rt::read_singular_message_into_field(is, &mut self.world_pose)?;
182                },
183                33 => {
184                    self.angle_min = is.read_double()?;
185                },
186                41 => {
187                    self.angle_max = is.read_double()?;
188                },
189                49 => {
190                    self.angle_step = is.read_double()?;
191                },
192                57 => {
193                    self.range_min = is.read_double()?;
194                },
195                65 => {
196                    self.range_max = is.read_double()?;
197                },
198                72 => {
199                    self.count = is.read_uint32()?;
200                },
201                81 => {
202                    self.vertical_angle_min = is.read_double()?;
203                },
204                89 => {
205                    self.vertical_angle_max = is.read_double()?;
206                },
207                97 => {
208                    self.vertical_angle_step = is.read_double()?;
209                },
210                104 => {
211                    self.vertical_count = is.read_uint32()?;
212                },
213                114 => {
214                    is.read_repeated_packed_double_into(&mut self.ranges)?;
215                },
216                113 => {
217                    self.ranges.push(is.read_double()?);
218                },
219                122 => {
220                    is.read_repeated_packed_double_into(&mut self.intensities)?;
221                },
222                121 => {
223                    self.intensities.push(is.read_double()?);
224                },
225                tag => {
226                    ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?;
227                },
228            };
229        }
230        ::std::result::Result::Ok(())
231    }
232
233    // Compute sizes of nested messages
234    #[allow(unused_variables)]
235    fn compute_size(&self) -> u64 {
236        let mut my_size = 0;
237        if let Some(v) = self.header.as_ref() {
238            let len = v.compute_size();
239            my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len;
240        }
241        if !self.frame.is_empty() {
242            my_size += ::protobuf::rt::string_size(2, &self.frame);
243        }
244        if let Some(v) = self.world_pose.as_ref() {
245            let len = v.compute_size();
246            my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len;
247        }
248        if self.angle_min != 0. {
249            my_size += 1 + 8;
250        }
251        if self.angle_max != 0. {
252            my_size += 1 + 8;
253        }
254        if self.angle_step != 0. {
255            my_size += 1 + 8;
256        }
257        if self.range_min != 0. {
258            my_size += 1 + 8;
259        }
260        if self.range_max != 0. {
261            my_size += 1 + 8;
262        }
263        if self.count != 0 {
264            my_size += ::protobuf::rt::uint32_size(9, self.count);
265        }
266        if self.vertical_angle_min != 0. {
267            my_size += 1 + 8;
268        }
269        if self.vertical_angle_max != 0. {
270            my_size += 1 + 8;
271        }
272        if self.vertical_angle_step != 0. {
273            my_size += 1 + 8;
274        }
275        if self.vertical_count != 0 {
276            my_size += ::protobuf::rt::uint32_size(13, self.vertical_count);
277        }
278        my_size += ::protobuf::rt::vec_packed_double_size(14, &self.ranges);
279        my_size += ::protobuf::rt::vec_packed_double_size(15, &self.intensities);
280        my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields());
281        self.special_fields.cached_size().set(my_size as u32);
282        my_size
283    }
284
285    fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> {
286        if let Some(v) = self.header.as_ref() {
287            ::protobuf::rt::write_message_field_with_cached_size(1, v, os)?;
288        }
289        if !self.frame.is_empty() {
290            os.write_string(2, &self.frame)?;
291        }
292        if let Some(v) = self.world_pose.as_ref() {
293            ::protobuf::rt::write_message_field_with_cached_size(3, v, os)?;
294        }
295        if self.angle_min != 0. {
296            os.write_double(4, self.angle_min)?;
297        }
298        if self.angle_max != 0. {
299            os.write_double(5, self.angle_max)?;
300        }
301        if self.angle_step != 0. {
302            os.write_double(6, self.angle_step)?;
303        }
304        if self.range_min != 0. {
305            os.write_double(7, self.range_min)?;
306        }
307        if self.range_max != 0. {
308            os.write_double(8, self.range_max)?;
309        }
310        if self.count != 0 {
311            os.write_uint32(9, self.count)?;
312        }
313        if self.vertical_angle_min != 0. {
314            os.write_double(10, self.vertical_angle_min)?;
315        }
316        if self.vertical_angle_max != 0. {
317            os.write_double(11, self.vertical_angle_max)?;
318        }
319        if self.vertical_angle_step != 0. {
320            os.write_double(12, self.vertical_angle_step)?;
321        }
322        if self.vertical_count != 0 {
323            os.write_uint32(13, self.vertical_count)?;
324        }
325        os.write_repeated_packed_double(14, &self.ranges)?;
326        os.write_repeated_packed_double(15, &self.intensities)?;
327        os.write_unknown_fields(self.special_fields.unknown_fields())?;
328        ::std::result::Result::Ok(())
329    }
330
331    fn special_fields(&self) -> &::protobuf::SpecialFields {
332        &self.special_fields
333    }
334
335    fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields {
336        &mut self.special_fields
337    }
338
339    fn new() -> LaserScan {
340        LaserScan::new()
341    }
342
343    fn clear(&mut self) {
344        self.header.clear();
345        self.frame.clear();
346        self.world_pose.clear();
347        self.angle_min = 0.;
348        self.angle_max = 0.;
349        self.angle_step = 0.;
350        self.range_min = 0.;
351        self.range_max = 0.;
352        self.count = 0;
353        self.vertical_angle_min = 0.;
354        self.vertical_angle_max = 0.;
355        self.vertical_angle_step = 0.;
356        self.vertical_count = 0;
357        self.ranges.clear();
358        self.intensities.clear();
359        self.special_fields.clear();
360    }
361
362    fn default_instance() -> &'static LaserScan {
363        static instance: LaserScan = LaserScan {
364            header: ::protobuf::MessageField::none(),
365            frame: ::std::string::String::new(),
366            world_pose: ::protobuf::MessageField::none(),
367            angle_min: 0.,
368            angle_max: 0.,
369            angle_step: 0.,
370            range_min: 0.,
371            range_max: 0.,
372            count: 0,
373            vertical_angle_min: 0.,
374            vertical_angle_max: 0.,
375            vertical_angle_step: 0.,
376            vertical_count: 0,
377            ranges: ::std::vec::Vec::new(),
378            intensities: ::std::vec::Vec::new(),
379            special_fields: ::protobuf::SpecialFields::new(),
380        };
381        &instance
382    }
383}
384
385impl ::protobuf::MessageFull for LaserScan {
386    fn descriptor() -> ::protobuf::reflect::MessageDescriptor {
387        static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new();
388        descriptor.get(|| file_descriptor().message_by_package_relative_name("LaserScan").unwrap()).clone()
389    }
390}
391
392impl ::std::fmt::Display for LaserScan {
393    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
394        ::protobuf::text_format::fmt(self, f)
395    }
396}
397
398impl ::protobuf::reflect::ProtobufValue for LaserScan {
399    type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage<Self>;
400}
401
402static file_descriptor_proto_data: &'static [u8] = b"\
403    \n\x1dignition/msgs/laserscan.proto\x12\rignition.msgs\x1a\x18ignition/m\
404    sgs/pose.proto\x1a\x1aignition/msgs/header.proto\"\x9a\x04\n\tLaserScan\
405    \x12-\n\x06header\x18\x01\x20\x01(\x0b2\x15.ignition.msgs.HeaderR\x06hea\
406    der\x12\x14\n\x05frame\x18\x02\x20\x01(\tR\x05frame\x122\n\nworld_pose\
407    \x18\x03\x20\x01(\x0b2\x13.ignition.msgs.PoseR\tworldPose\x12\x1b\n\tang\
408    le_min\x18\x04\x20\x01(\x01R\x08angleMin\x12\x1b\n\tangle_max\x18\x05\
409    \x20\x01(\x01R\x08angleMax\x12\x1d\n\nangle_step\x18\x06\x20\x01(\x01R\t\
410    angleStep\x12\x1b\n\trange_min\x18\x07\x20\x01(\x01R\x08rangeMin\x12\x1b\
411    \n\trange_max\x18\x08\x20\x01(\x01R\x08rangeMax\x12\x14\n\x05count\x18\t\
412    \x20\x01(\rR\x05count\x12,\n\x12vertical_angle_min\x18\n\x20\x01(\x01R\
413    \x10verticalAngleMin\x12,\n\x12vertical_angle_max\x18\x0b\x20\x01(\x01R\
414    \x10verticalAngleMax\x12.\n\x13vertical_angle_step\x18\x0c\x20\x01(\x01R\
415    \x11verticalAngleStep\x12%\n\x0evertical_count\x18\r\x20\x01(\rR\rvertic\
416    alCount\x12\x16\n\x06ranges\x18\x0e\x20\x03(\x01R\x06ranges\x12\x20\n\
417    \x0bintensities\x18\x0f\x20\x03(\x01R\x0bintensitiesB$\n\x11com.ignition\
418    .msgsB\x0fLaserScanProtosb\x06proto3\
419";
420
421/// `FileDescriptorProto` object which was a source for this generated file
422fn file_descriptor_proto() -> &'static ::protobuf::descriptor::FileDescriptorProto {
423    static file_descriptor_proto_lazy: ::protobuf::rt::Lazy<::protobuf::descriptor::FileDescriptorProto> = ::protobuf::rt::Lazy::new();
424    file_descriptor_proto_lazy.get(|| {
425        ::protobuf::Message::parse_from_bytes(file_descriptor_proto_data).unwrap()
426    })
427}
428
429/// `FileDescriptor` object which allows dynamic access to files
430pub fn file_descriptor() -> &'static ::protobuf::reflect::FileDescriptor {
431    static generated_file_descriptor_lazy: ::protobuf::rt::Lazy<::protobuf::reflect::GeneratedFileDescriptor> = ::protobuf::rt::Lazy::new();
432    static file_descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::FileDescriptor> = ::protobuf::rt::Lazy::new();
433    file_descriptor.get(|| {
434        let generated_file_descriptor = generated_file_descriptor_lazy.get(|| {
435            let mut deps = ::std::vec::Vec::with_capacity(2);
436            deps.push(super::pose::file_descriptor().clone());
437            deps.push(super::header::file_descriptor().clone());
438            let mut messages = ::std::vec::Vec::with_capacity(1);
439            messages.push(LaserScan::generated_message_descriptor_data());
440            let mut enums = ::std::vec::Vec::with_capacity(0);
441            ::protobuf::reflect::GeneratedFileDescriptor::new_generated(
442                file_descriptor_proto(),
443                deps,
444                messages,
445                enums,
446            )
447        });
448        ::protobuf::reflect::FileDescriptor::new_generated_2(generated_file_descriptor)
449    })
450}