gz_msgs/ign_msgs8/
gps_sensor.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/gps_sensor.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.GPSSensor)
29#[derive(PartialEq,Clone,Default,Debug)]
30pub struct GPSSensor {
31    // message fields
32    // @@protoc_insertion_point(field:ignition.msgs.GPSSensor.header)
33    pub header: ::protobuf::MessageField<super::header::Header>,
34    // @@protoc_insertion_point(field:ignition.msgs.GPSSensor.position)
35    pub position: ::protobuf::MessageField<gpssensor::Sensing>,
36    // @@protoc_insertion_point(field:ignition.msgs.GPSSensor.velocity)
37    pub velocity: ::protobuf::MessageField<gpssensor::Sensing>,
38    // special fields
39    // @@protoc_insertion_point(special_field:ignition.msgs.GPSSensor.special_fields)
40    pub special_fields: ::protobuf::SpecialFields,
41}
42
43impl<'a> ::std::default::Default for &'a GPSSensor {
44    fn default() -> &'a GPSSensor {
45        <GPSSensor as ::protobuf::Message>::default_instance()
46    }
47}
48
49impl GPSSensor {
50    pub fn new() -> GPSSensor {
51        ::std::default::Default::default()
52    }
53
54    fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData {
55        let mut fields = ::std::vec::Vec::with_capacity(3);
56        let mut oneofs = ::std::vec::Vec::with_capacity(0);
57        fields.push(::protobuf::reflect::rt::v2::make_message_field_accessor::<_, super::header::Header>(
58            "header",
59            |m: &GPSSensor| { &m.header },
60            |m: &mut GPSSensor| { &mut m.header },
61        ));
62        fields.push(::protobuf::reflect::rt::v2::make_message_field_accessor::<_, gpssensor::Sensing>(
63            "position",
64            |m: &GPSSensor| { &m.position },
65            |m: &mut GPSSensor| { &mut m.position },
66        ));
67        fields.push(::protobuf::reflect::rt::v2::make_message_field_accessor::<_, gpssensor::Sensing>(
68            "velocity",
69            |m: &GPSSensor| { &m.velocity },
70            |m: &mut GPSSensor| { &mut m.velocity },
71        ));
72        ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::<GPSSensor>(
73            "GPSSensor",
74            fields,
75            oneofs,
76        )
77    }
78}
79
80impl ::protobuf::Message for GPSSensor {
81    const NAME: &'static str = "GPSSensor";
82
83    fn is_initialized(&self) -> bool {
84        true
85    }
86
87    fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> {
88        while let Some(tag) = is.read_raw_tag_or_eof()? {
89            match tag {
90                10 => {
91                    ::protobuf::rt::read_singular_message_into_field(is, &mut self.header)?;
92                },
93                18 => {
94                    ::protobuf::rt::read_singular_message_into_field(is, &mut self.position)?;
95                },
96                26 => {
97                    ::protobuf::rt::read_singular_message_into_field(is, &mut self.velocity)?;
98                },
99                tag => {
100                    ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?;
101                },
102            };
103        }
104        ::std::result::Result::Ok(())
105    }
106
107    // Compute sizes of nested messages
108    #[allow(unused_variables)]
109    fn compute_size(&self) -> u64 {
110        let mut my_size = 0;
111        if let Some(v) = self.header.as_ref() {
112            let len = v.compute_size();
113            my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len;
114        }
115        if let Some(v) = self.position.as_ref() {
116            let len = v.compute_size();
117            my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len;
118        }
119        if let Some(v) = self.velocity.as_ref() {
120            let len = v.compute_size();
121            my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len;
122        }
123        my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields());
124        self.special_fields.cached_size().set(my_size as u32);
125        my_size
126    }
127
128    fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> {
129        if let Some(v) = self.header.as_ref() {
130            ::protobuf::rt::write_message_field_with_cached_size(1, v, os)?;
131        }
132        if let Some(v) = self.position.as_ref() {
133            ::protobuf::rt::write_message_field_with_cached_size(2, v, os)?;
134        }
135        if let Some(v) = self.velocity.as_ref() {
136            ::protobuf::rt::write_message_field_with_cached_size(3, v, os)?;
137        }
138        os.write_unknown_fields(self.special_fields.unknown_fields())?;
139        ::std::result::Result::Ok(())
140    }
141
142    fn special_fields(&self) -> &::protobuf::SpecialFields {
143        &self.special_fields
144    }
145
146    fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields {
147        &mut self.special_fields
148    }
149
150    fn new() -> GPSSensor {
151        GPSSensor::new()
152    }
153
154    fn clear(&mut self) {
155        self.header.clear();
156        self.position.clear();
157        self.velocity.clear();
158        self.special_fields.clear();
159    }
160
161    fn default_instance() -> &'static GPSSensor {
162        static instance: GPSSensor = GPSSensor {
163            header: ::protobuf::MessageField::none(),
164            position: ::protobuf::MessageField::none(),
165            velocity: ::protobuf::MessageField::none(),
166            special_fields: ::protobuf::SpecialFields::new(),
167        };
168        &instance
169    }
170}
171
172impl ::protobuf::MessageFull for GPSSensor {
173    fn descriptor() -> ::protobuf::reflect::MessageDescriptor {
174        static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new();
175        descriptor.get(|| file_descriptor().message_by_package_relative_name("GPSSensor").unwrap()).clone()
176    }
177}
178
179impl ::std::fmt::Display for GPSSensor {
180    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
181        ::protobuf::text_format::fmt(self, f)
182    }
183}
184
185impl ::protobuf::reflect::ProtobufValue for GPSSensor {
186    type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage<Self>;
187}
188
189/// Nested message and enums of message `GPSSensor`
190pub mod gpssensor {
191    #[derive(::gz_msgs_common::IgnMessage)]
192    // @@protoc_insertion_point(message:ignition.msgs.GPSSensor.Sensing)
193    #[derive(PartialEq,Clone,Default,Debug)]
194    pub struct Sensing {
195        // message fields
196        // @@protoc_insertion_point(field:ignition.msgs.GPSSensor.Sensing.horizontal_noise)
197        pub horizontal_noise: ::protobuf::MessageField<super::super::sensor_noise::SensorNoise>,
198        // @@protoc_insertion_point(field:ignition.msgs.GPSSensor.Sensing.vertical_noise)
199        pub vertical_noise: ::protobuf::MessageField<super::super::sensor_noise::SensorNoise>,
200        // special fields
201        // @@protoc_insertion_point(special_field:ignition.msgs.GPSSensor.Sensing.special_fields)
202        pub special_fields: ::protobuf::SpecialFields,
203    }
204
205    impl<'a> ::std::default::Default for &'a Sensing {
206        fn default() -> &'a Sensing {
207            <Sensing as ::protobuf::Message>::default_instance()
208        }
209    }
210
211    impl Sensing {
212        pub fn new() -> Sensing {
213            ::std::default::Default::default()
214        }
215
216        pub(in super) fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData {
217            let mut fields = ::std::vec::Vec::with_capacity(2);
218            let mut oneofs = ::std::vec::Vec::with_capacity(0);
219            fields.push(::protobuf::reflect::rt::v2::make_message_field_accessor::<_, super::super::sensor_noise::SensorNoise>(
220                "horizontal_noise",
221                |m: &Sensing| { &m.horizontal_noise },
222                |m: &mut Sensing| { &mut m.horizontal_noise },
223            ));
224            fields.push(::protobuf::reflect::rt::v2::make_message_field_accessor::<_, super::super::sensor_noise::SensorNoise>(
225                "vertical_noise",
226                |m: &Sensing| { &m.vertical_noise },
227                |m: &mut Sensing| { &mut m.vertical_noise },
228            ));
229            ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::<Sensing>(
230                "GPSSensor.Sensing",
231                fields,
232                oneofs,
233            )
234        }
235    }
236
237    impl ::protobuf::Message for Sensing {
238        const NAME: &'static str = "Sensing";
239
240        fn is_initialized(&self) -> bool {
241            true
242        }
243
244        fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> {
245            while let Some(tag) = is.read_raw_tag_or_eof()? {
246                match tag {
247                    10 => {
248                        ::protobuf::rt::read_singular_message_into_field(is, &mut self.horizontal_noise)?;
249                    },
250                    18 => {
251                        ::protobuf::rt::read_singular_message_into_field(is, &mut self.vertical_noise)?;
252                    },
253                    tag => {
254                        ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?;
255                    },
256                };
257            }
258            ::std::result::Result::Ok(())
259        }
260
261        // Compute sizes of nested messages
262        #[allow(unused_variables)]
263        fn compute_size(&self) -> u64 {
264            let mut my_size = 0;
265            if let Some(v) = self.horizontal_noise.as_ref() {
266                let len = v.compute_size();
267                my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len;
268            }
269            if let Some(v) = self.vertical_noise.as_ref() {
270                let len = v.compute_size();
271                my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len;
272            }
273            my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields());
274            self.special_fields.cached_size().set(my_size as u32);
275            my_size
276        }
277
278        fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> {
279            if let Some(v) = self.horizontal_noise.as_ref() {
280                ::protobuf::rt::write_message_field_with_cached_size(1, v, os)?;
281            }
282            if let Some(v) = self.vertical_noise.as_ref() {
283                ::protobuf::rt::write_message_field_with_cached_size(2, v, os)?;
284            }
285            os.write_unknown_fields(self.special_fields.unknown_fields())?;
286            ::std::result::Result::Ok(())
287        }
288
289        fn special_fields(&self) -> &::protobuf::SpecialFields {
290            &self.special_fields
291        }
292
293        fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields {
294            &mut self.special_fields
295        }
296
297        fn new() -> Sensing {
298            Sensing::new()
299        }
300
301        fn clear(&mut self) {
302            self.horizontal_noise.clear();
303            self.vertical_noise.clear();
304            self.special_fields.clear();
305        }
306
307        fn default_instance() -> &'static Sensing {
308            static instance: Sensing = Sensing {
309                horizontal_noise: ::protobuf::MessageField::none(),
310                vertical_noise: ::protobuf::MessageField::none(),
311                special_fields: ::protobuf::SpecialFields::new(),
312            };
313            &instance
314        }
315    }
316
317    impl ::protobuf::MessageFull for Sensing {
318        fn descriptor() -> ::protobuf::reflect::MessageDescriptor {
319            static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new();
320            descriptor.get(|| super::file_descriptor().message_by_package_relative_name("GPSSensor.Sensing").unwrap()).clone()
321        }
322    }
323
324    impl ::std::fmt::Display for Sensing {
325        fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
326            ::protobuf::text_format::fmt(self, f)
327        }
328    }
329
330    impl ::protobuf::reflect::ProtobufValue for Sensing {
331        type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage<Self>;
332    }
333}
334
335static file_descriptor_proto_data: &'static [u8] = b"\
336    \n\x1eignition/msgs/gps_sensor.proto\x12\rignition.msgs\x1a\x20ignition/\
337    msgs/sensor_noise.proto\x1a\x1aignition/msgs/header.proto\"\xcc\x02\n\tG\
338    PSSensor\x12-\n\x06header\x18\x01\x20\x01(\x0b2\x15.ignition.msgs.Header\
339    R\x06header\x12<\n\x08position\x18\x02\x20\x01(\x0b2\x20.ignition.msgs.G\
340    PSSensor.SensingR\x08position\x12<\n\x08velocity\x18\x03\x20\x01(\x0b2\
341    \x20.ignition.msgs.GPSSensor.SensingR\x08velocity\x1a\x93\x01\n\x07Sensi\
342    ng\x12E\n\x10horizontal_noise\x18\x01\x20\x01(\x0b2\x1a.ignition.msgs.Se\
343    nsorNoiseR\x0fhorizontalNoise\x12A\n\x0evertical_noise\x18\x02\x20\x01(\
344    \x0b2\x1a.ignition.msgs.SensorNoiseR\rverticalNoiseB\x1b\n\x11com.igniti\
345    on.msgsB\x06Protosb\x06proto3\
346";
347
348/// `FileDescriptorProto` object which was a source for this generated file
349fn file_descriptor_proto() -> &'static ::protobuf::descriptor::FileDescriptorProto {
350    static file_descriptor_proto_lazy: ::protobuf::rt::Lazy<::protobuf::descriptor::FileDescriptorProto> = ::protobuf::rt::Lazy::new();
351    file_descriptor_proto_lazy.get(|| {
352        ::protobuf::Message::parse_from_bytes(file_descriptor_proto_data).unwrap()
353    })
354}
355
356/// `FileDescriptor` object which allows dynamic access to files
357pub fn file_descriptor() -> &'static ::protobuf::reflect::FileDescriptor {
358    static generated_file_descriptor_lazy: ::protobuf::rt::Lazy<::protobuf::reflect::GeneratedFileDescriptor> = ::protobuf::rt::Lazy::new();
359    static file_descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::FileDescriptor> = ::protobuf::rt::Lazy::new();
360    file_descriptor.get(|| {
361        let generated_file_descriptor = generated_file_descriptor_lazy.get(|| {
362            let mut deps = ::std::vec::Vec::with_capacity(2);
363            deps.push(super::sensor_noise::file_descriptor().clone());
364            deps.push(super::header::file_descriptor().clone());
365            let mut messages = ::std::vec::Vec::with_capacity(2);
366            messages.push(GPSSensor::generated_message_descriptor_data());
367            messages.push(gpssensor::Sensing::generated_message_descriptor_data());
368            let mut enums = ::std::vec::Vec::with_capacity(0);
369            ::protobuf::reflect::GeneratedFileDescriptor::new_generated(
370                file_descriptor_proto(),
371                deps,
372                messages,
373                enums,
374            )
375        });
376        ::protobuf::reflect::FileDescriptor::new_generated_2(generated_file_descriptor)
377    })
378}