gz_msgs/gz_msgs11/
sensor_noise.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 `gz/msgs/sensor_noise.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::GzMessage)]
28// @@protoc_insertion_point(message:gz.msgs.SensorNoise)
29#[derive(PartialEq,Clone,Default,Debug)]
30pub struct SensorNoise {
31    // message fields
32    // @@protoc_insertion_point(field:gz.msgs.SensorNoise.header)
33    pub header: ::protobuf::MessageField<super::header::Header>,
34    // @@protoc_insertion_point(field:gz.msgs.SensorNoise.type)
35    pub type_: ::protobuf::EnumOrUnknown<sensor_noise::Type>,
36    // @@protoc_insertion_point(field:gz.msgs.SensorNoise.mean)
37    pub mean: f64,
38    // @@protoc_insertion_point(field:gz.msgs.SensorNoise.stddev)
39    pub stddev: f64,
40    // @@protoc_insertion_point(field:gz.msgs.SensorNoise.bias_mean)
41    pub bias_mean: f64,
42    // @@protoc_insertion_point(field:gz.msgs.SensorNoise.bias_stddev)
43    pub bias_stddev: f64,
44    // @@protoc_insertion_point(field:gz.msgs.SensorNoise.precision)
45    pub precision: f64,
46    // @@protoc_insertion_point(field:gz.msgs.SensorNoise.dynamic_bias_stddev)
47    pub dynamic_bias_stddev: f64,
48    // @@protoc_insertion_point(field:gz.msgs.SensorNoise.dynamic_bias_correlation_time)
49    pub dynamic_bias_correlation_time: f64,
50    // special fields
51    // @@protoc_insertion_point(special_field:gz.msgs.SensorNoise.special_fields)
52    pub special_fields: ::protobuf::SpecialFields,
53}
54
55impl<'a> ::std::default::Default for &'a SensorNoise {
56    fn default() -> &'a SensorNoise {
57        <SensorNoise as ::protobuf::Message>::default_instance()
58    }
59}
60
61impl SensorNoise {
62    pub fn new() -> SensorNoise {
63        ::std::default::Default::default()
64    }
65
66    fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData {
67        let mut fields = ::std::vec::Vec::with_capacity(9);
68        let mut oneofs = ::std::vec::Vec::with_capacity(0);
69        fields.push(::protobuf::reflect::rt::v2::make_message_field_accessor::<_, super::header::Header>(
70            "header",
71            |m: &SensorNoise| { &m.header },
72            |m: &mut SensorNoise| { &mut m.header },
73        ));
74        fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>(
75            "type",
76            |m: &SensorNoise| { &m.type_ },
77            |m: &mut SensorNoise| { &mut m.type_ },
78        ));
79        fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>(
80            "mean",
81            |m: &SensorNoise| { &m.mean },
82            |m: &mut SensorNoise| { &mut m.mean },
83        ));
84        fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>(
85            "stddev",
86            |m: &SensorNoise| { &m.stddev },
87            |m: &mut SensorNoise| { &mut m.stddev },
88        ));
89        fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>(
90            "bias_mean",
91            |m: &SensorNoise| { &m.bias_mean },
92            |m: &mut SensorNoise| { &mut m.bias_mean },
93        ));
94        fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>(
95            "bias_stddev",
96            |m: &SensorNoise| { &m.bias_stddev },
97            |m: &mut SensorNoise| { &mut m.bias_stddev },
98        ));
99        fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>(
100            "precision",
101            |m: &SensorNoise| { &m.precision },
102            |m: &mut SensorNoise| { &mut m.precision },
103        ));
104        fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>(
105            "dynamic_bias_stddev",
106            |m: &SensorNoise| { &m.dynamic_bias_stddev },
107            |m: &mut SensorNoise| { &mut m.dynamic_bias_stddev },
108        ));
109        fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>(
110            "dynamic_bias_correlation_time",
111            |m: &SensorNoise| { &m.dynamic_bias_correlation_time },
112            |m: &mut SensorNoise| { &mut m.dynamic_bias_correlation_time },
113        ));
114        ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::<SensorNoise>(
115            "SensorNoise",
116            fields,
117            oneofs,
118        )
119    }
120}
121
122impl ::protobuf::Message for SensorNoise {
123    const NAME: &'static str = "SensorNoise";
124
125    fn is_initialized(&self) -> bool {
126        true
127    }
128
129    fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> {
130        while let Some(tag) = is.read_raw_tag_or_eof()? {
131            match tag {
132                10 => {
133                    ::protobuf::rt::read_singular_message_into_field(is, &mut self.header)?;
134                },
135                16 => {
136                    self.type_ = is.read_enum_or_unknown()?;
137                },
138                25 => {
139                    self.mean = is.read_double()?;
140                },
141                33 => {
142                    self.stddev = is.read_double()?;
143                },
144                41 => {
145                    self.bias_mean = is.read_double()?;
146                },
147                49 => {
148                    self.bias_stddev = is.read_double()?;
149                },
150                57 => {
151                    self.precision = is.read_double()?;
152                },
153                65 => {
154                    self.dynamic_bias_stddev = is.read_double()?;
155                },
156                73 => {
157                    self.dynamic_bias_correlation_time = is.read_double()?;
158                },
159                tag => {
160                    ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?;
161                },
162            };
163        }
164        ::std::result::Result::Ok(())
165    }
166
167    // Compute sizes of nested messages
168    #[allow(unused_variables)]
169    fn compute_size(&self) -> u64 {
170        let mut my_size = 0;
171        if let Some(v) = self.header.as_ref() {
172            let len = v.compute_size();
173            my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len;
174        }
175        if self.type_ != ::protobuf::EnumOrUnknown::new(sensor_noise::Type::NONE) {
176            my_size += ::protobuf::rt::int32_size(2, self.type_.value());
177        }
178        if self.mean != 0. {
179            my_size += 1 + 8;
180        }
181        if self.stddev != 0. {
182            my_size += 1 + 8;
183        }
184        if self.bias_mean != 0. {
185            my_size += 1 + 8;
186        }
187        if self.bias_stddev != 0. {
188            my_size += 1 + 8;
189        }
190        if self.precision != 0. {
191            my_size += 1 + 8;
192        }
193        if self.dynamic_bias_stddev != 0. {
194            my_size += 1 + 8;
195        }
196        if self.dynamic_bias_correlation_time != 0. {
197            my_size += 1 + 8;
198        }
199        my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields());
200        self.special_fields.cached_size().set(my_size as u32);
201        my_size
202    }
203
204    fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> {
205        if let Some(v) = self.header.as_ref() {
206            ::protobuf::rt::write_message_field_with_cached_size(1, v, os)?;
207        }
208        if self.type_ != ::protobuf::EnumOrUnknown::new(sensor_noise::Type::NONE) {
209            os.write_enum(2, ::protobuf::EnumOrUnknown::value(&self.type_))?;
210        }
211        if self.mean != 0. {
212            os.write_double(3, self.mean)?;
213        }
214        if self.stddev != 0. {
215            os.write_double(4, self.stddev)?;
216        }
217        if self.bias_mean != 0. {
218            os.write_double(5, self.bias_mean)?;
219        }
220        if self.bias_stddev != 0. {
221            os.write_double(6, self.bias_stddev)?;
222        }
223        if self.precision != 0. {
224            os.write_double(7, self.precision)?;
225        }
226        if self.dynamic_bias_stddev != 0. {
227            os.write_double(8, self.dynamic_bias_stddev)?;
228        }
229        if self.dynamic_bias_correlation_time != 0. {
230            os.write_double(9, self.dynamic_bias_correlation_time)?;
231        }
232        os.write_unknown_fields(self.special_fields.unknown_fields())?;
233        ::std::result::Result::Ok(())
234    }
235
236    fn special_fields(&self) -> &::protobuf::SpecialFields {
237        &self.special_fields
238    }
239
240    fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields {
241        &mut self.special_fields
242    }
243
244    fn new() -> SensorNoise {
245        SensorNoise::new()
246    }
247
248    fn clear(&mut self) {
249        self.header.clear();
250        self.type_ = ::protobuf::EnumOrUnknown::new(sensor_noise::Type::NONE);
251        self.mean = 0.;
252        self.stddev = 0.;
253        self.bias_mean = 0.;
254        self.bias_stddev = 0.;
255        self.precision = 0.;
256        self.dynamic_bias_stddev = 0.;
257        self.dynamic_bias_correlation_time = 0.;
258        self.special_fields.clear();
259    }
260
261    fn default_instance() -> &'static SensorNoise {
262        static instance: SensorNoise = SensorNoise {
263            header: ::protobuf::MessageField::none(),
264            type_: ::protobuf::EnumOrUnknown::from_i32(0),
265            mean: 0.,
266            stddev: 0.,
267            bias_mean: 0.,
268            bias_stddev: 0.,
269            precision: 0.,
270            dynamic_bias_stddev: 0.,
271            dynamic_bias_correlation_time: 0.,
272            special_fields: ::protobuf::SpecialFields::new(),
273        };
274        &instance
275    }
276}
277
278impl ::protobuf::MessageFull for SensorNoise {
279    fn descriptor() -> ::protobuf::reflect::MessageDescriptor {
280        static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new();
281        descriptor.get(|| file_descriptor().message_by_package_relative_name("SensorNoise").unwrap()).clone()
282    }
283}
284
285impl ::std::fmt::Display for SensorNoise {
286    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
287        ::protobuf::text_format::fmt(self, f)
288    }
289}
290
291impl ::protobuf::reflect::ProtobufValue for SensorNoise {
292    type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage<Self>;
293}
294
295/// Nested message and enums of message `SensorNoise`
296pub mod sensor_noise {
297    #[derive(Clone,Copy,PartialEq,Eq,Debug,Hash)]
298    // @@protoc_insertion_point(enum:gz.msgs.SensorNoise.Type)
299    pub enum Type {
300        // @@protoc_insertion_point(enum_value:gz.msgs.SensorNoise.Type.NONE)
301        NONE = 0,
302        // @@protoc_insertion_point(enum_value:gz.msgs.SensorNoise.Type.GAUSSIAN)
303        GAUSSIAN = 2,
304        // @@protoc_insertion_point(enum_value:gz.msgs.SensorNoise.Type.GAUSSIAN_QUANTIZED)
305        GAUSSIAN_QUANTIZED = 3,
306    }
307
308    impl ::protobuf::Enum for Type {
309        const NAME: &'static str = "Type";
310
311        fn value(&self) -> i32 {
312            *self as i32
313        }
314
315        fn from_i32(value: i32) -> ::std::option::Option<Type> {
316            match value {
317                0 => ::std::option::Option::Some(Type::NONE),
318                2 => ::std::option::Option::Some(Type::GAUSSIAN),
319                3 => ::std::option::Option::Some(Type::GAUSSIAN_QUANTIZED),
320                _ => ::std::option::Option::None
321            }
322        }
323
324        fn from_str(str: &str) -> ::std::option::Option<Type> {
325            match str {
326                "NONE" => ::std::option::Option::Some(Type::NONE),
327                "GAUSSIAN" => ::std::option::Option::Some(Type::GAUSSIAN),
328                "GAUSSIAN_QUANTIZED" => ::std::option::Option::Some(Type::GAUSSIAN_QUANTIZED),
329                _ => ::std::option::Option::None
330            }
331        }
332
333        const VALUES: &'static [Type] = &[
334            Type::NONE,
335            Type::GAUSSIAN,
336            Type::GAUSSIAN_QUANTIZED,
337        ];
338    }
339
340    impl ::protobuf::EnumFull for Type {
341        fn enum_descriptor() -> ::protobuf::reflect::EnumDescriptor {
342            static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::EnumDescriptor> = ::protobuf::rt::Lazy::new();
343            descriptor.get(|| super::file_descriptor().enum_by_package_relative_name("SensorNoise.Type").unwrap()).clone()
344        }
345
346        fn descriptor(&self) -> ::protobuf::reflect::EnumValueDescriptor {
347            let index = match self {
348                Type::NONE => 0,
349                Type::GAUSSIAN => 1,
350                Type::GAUSSIAN_QUANTIZED => 2,
351            };
352            Self::enum_descriptor().value_by_index(index)
353        }
354    }
355
356    impl ::std::default::Default for Type {
357        fn default() -> Self {
358            Type::NONE
359        }
360    }
361
362    impl Type {
363        pub(in super) fn generated_enum_descriptor_data() -> ::protobuf::reflect::GeneratedEnumDescriptorData {
364            ::protobuf::reflect::GeneratedEnumDescriptorData::new::<Type>("SensorNoise.Type")
365        }
366    }
367}
368
369static file_descriptor_proto_data: &'static [u8] = b"\
370    \n\x1agz/msgs/sensor_noise.proto\x12\x07gz.msgs\x1a\x14gz/msgs/header.pr\
371    oto\"\x98\x03\n\x0bSensorNoise\x12'\n\x06header\x18\x01\x20\x01(\x0b2\
372    \x0f.gz.msgs.HeaderR\x06header\x12-\n\x04type\x18\x02\x20\x01(\x0e2\x19.\
373    gz.msgs.SensorNoise.TypeR\x04type\x12\x12\n\x04mean\x18\x03\x20\x01(\x01\
374    R\x04mean\x12\x16\n\x06stddev\x18\x04\x20\x01(\x01R\x06stddev\x12\x1b\n\
375    \tbias_mean\x18\x05\x20\x01(\x01R\x08biasMean\x12\x1f\n\x0bbias_stddev\
376    \x18\x06\x20\x01(\x01R\nbiasStddev\x12\x1c\n\tprecision\x18\x07\x20\x01(\
377    \x01R\tprecision\x12.\n\x13dynamic_bias_stddev\x18\x08\x20\x01(\x01R\x11\
378    dynamicBiasStddev\x12A\n\x1ddynamic_bias_correlation_time\x18\t\x20\x01(\
379    \x01R\x1adynamicBiasCorrelationTime\"6\n\x04Type\x12\x08\n\x04NONE\x10\0\
380    \x12\x0c\n\x08GAUSSIAN\x10\x02\x12\x16\n\x12GAUSSIAN_QUANTIZED\x10\x03B\
381    \x15\n\x0bcom.gz.msgsB\x06Protosb\x06proto3\
382";
383
384/// `FileDescriptorProto` object which was a source for this generated file
385fn file_descriptor_proto() -> &'static ::protobuf::descriptor::FileDescriptorProto {
386    static file_descriptor_proto_lazy: ::protobuf::rt::Lazy<::protobuf::descriptor::FileDescriptorProto> = ::protobuf::rt::Lazy::new();
387    file_descriptor_proto_lazy.get(|| {
388        ::protobuf::Message::parse_from_bytes(file_descriptor_proto_data).unwrap()
389    })
390}
391
392/// `FileDescriptor` object which allows dynamic access to files
393pub fn file_descriptor() -> &'static ::protobuf::reflect::FileDescriptor {
394    static generated_file_descriptor_lazy: ::protobuf::rt::Lazy<::protobuf::reflect::GeneratedFileDescriptor> = ::protobuf::rt::Lazy::new();
395    static file_descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::FileDescriptor> = ::protobuf::rt::Lazy::new();
396    file_descriptor.get(|| {
397        let generated_file_descriptor = generated_file_descriptor_lazy.get(|| {
398            let mut deps = ::std::vec::Vec::with_capacity(1);
399            deps.push(super::header::file_descriptor().clone());
400            let mut messages = ::std::vec::Vec::with_capacity(1);
401            messages.push(SensorNoise::generated_message_descriptor_data());
402            let mut enums = ::std::vec::Vec::with_capacity(1);
403            enums.push(sensor_noise::Type::generated_enum_descriptor_data());
404            ::protobuf::reflect::GeneratedFileDescriptor::new_generated(
405                file_descriptor_proto(),
406                deps,
407                messages,
408                enums,
409            )
410        });
411        ::protobuf::reflect::FileDescriptor::new_generated_2(generated_file_descriptor)
412    })
413}