1#![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
21const _PROTOBUF_VERSION_CHECK: () = ::protobuf::VERSION_3_7_2;
26
27#[derive(::gz_msgs_common::IgnMessage)]
28#[derive(PartialEq,Clone,Default,Debug)]
30pub struct PID {
31 pub header: ::protobuf::MessageField<super::header::Header>,
34 pub target_optional: ::protobuf::MessageField<super::double::Double>,
36 pub p_gain_optional: ::protobuf::MessageField<super::double::Double>,
38 pub i_gain_optional: ::protobuf::MessageField<super::double::Double>,
40 pub d_gain_optional: ::protobuf::MessageField<super::double::Double>,
42 pub i_max_optional: ::protobuf::MessageField<super::double::Double>,
44 pub i_min_optional: ::protobuf::MessageField<super::double::Double>,
46 pub limit_optional: ::protobuf::MessageField<super::double::Double>,
48 pub special_fields: ::protobuf::SpecialFields,
51}
52
53impl<'a> ::std::default::Default for &'a PID {
54 fn default() -> &'a PID {
55 <PID as ::protobuf::Message>::default_instance()
56 }
57}
58
59impl PID {
60 pub fn new() -> PID {
61 ::std::default::Default::default()
62 }
63
64 fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData {
65 let mut fields = ::std::vec::Vec::with_capacity(8);
66 let mut oneofs = ::std::vec::Vec::with_capacity(0);
67 fields.push(::protobuf::reflect::rt::v2::make_message_field_accessor::<_, super::header::Header>(
68 "header",
69 |m: &PID| { &m.header },
70 |m: &mut PID| { &mut m.header },
71 ));
72 fields.push(::protobuf::reflect::rt::v2::make_message_field_accessor::<_, super::double::Double>(
73 "target_optional",
74 |m: &PID| { &m.target_optional },
75 |m: &mut PID| { &mut m.target_optional },
76 ));
77 fields.push(::protobuf::reflect::rt::v2::make_message_field_accessor::<_, super::double::Double>(
78 "p_gain_optional",
79 |m: &PID| { &m.p_gain_optional },
80 |m: &mut PID| { &mut m.p_gain_optional },
81 ));
82 fields.push(::protobuf::reflect::rt::v2::make_message_field_accessor::<_, super::double::Double>(
83 "i_gain_optional",
84 |m: &PID| { &m.i_gain_optional },
85 |m: &mut PID| { &mut m.i_gain_optional },
86 ));
87 fields.push(::protobuf::reflect::rt::v2::make_message_field_accessor::<_, super::double::Double>(
88 "d_gain_optional",
89 |m: &PID| { &m.d_gain_optional },
90 |m: &mut PID| { &mut m.d_gain_optional },
91 ));
92 fields.push(::protobuf::reflect::rt::v2::make_message_field_accessor::<_, super::double::Double>(
93 "i_max_optional",
94 |m: &PID| { &m.i_max_optional },
95 |m: &mut PID| { &mut m.i_max_optional },
96 ));
97 fields.push(::protobuf::reflect::rt::v2::make_message_field_accessor::<_, super::double::Double>(
98 "i_min_optional",
99 |m: &PID| { &m.i_min_optional },
100 |m: &mut PID| { &mut m.i_min_optional },
101 ));
102 fields.push(::protobuf::reflect::rt::v2::make_message_field_accessor::<_, super::double::Double>(
103 "limit_optional",
104 |m: &PID| { &m.limit_optional },
105 |m: &mut PID| { &mut m.limit_optional },
106 ));
107 ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::<PID>(
108 "PID",
109 fields,
110 oneofs,
111 )
112 }
113}
114
115impl ::protobuf::Message for PID {
116 const NAME: &'static str = "PID";
117
118 fn is_initialized(&self) -> bool {
119 true
120 }
121
122 fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> {
123 while let Some(tag) = is.read_raw_tag_or_eof()? {
124 match tag {
125 10 => {
126 ::protobuf::rt::read_singular_message_into_field(is, &mut self.header)?;
127 },
128 18 => {
129 ::protobuf::rt::read_singular_message_into_field(is, &mut self.target_optional)?;
130 },
131 26 => {
132 ::protobuf::rt::read_singular_message_into_field(is, &mut self.p_gain_optional)?;
133 },
134 34 => {
135 ::protobuf::rt::read_singular_message_into_field(is, &mut self.i_gain_optional)?;
136 },
137 42 => {
138 ::protobuf::rt::read_singular_message_into_field(is, &mut self.d_gain_optional)?;
139 },
140 50 => {
141 ::protobuf::rt::read_singular_message_into_field(is, &mut self.i_max_optional)?;
142 },
143 58 => {
144 ::protobuf::rt::read_singular_message_into_field(is, &mut self.i_min_optional)?;
145 },
146 66 => {
147 ::protobuf::rt::read_singular_message_into_field(is, &mut self.limit_optional)?;
148 },
149 tag => {
150 ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?;
151 },
152 };
153 }
154 ::std::result::Result::Ok(())
155 }
156
157 #[allow(unused_variables)]
159 fn compute_size(&self) -> u64 {
160 let mut my_size = 0;
161 if let Some(v) = self.header.as_ref() {
162 let len = v.compute_size();
163 my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len;
164 }
165 if let Some(v) = self.target_optional.as_ref() {
166 let len = v.compute_size();
167 my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len;
168 }
169 if let Some(v) = self.p_gain_optional.as_ref() {
170 let len = v.compute_size();
171 my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len;
172 }
173 if let Some(v) = self.i_gain_optional.as_ref() {
174 let len = v.compute_size();
175 my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len;
176 }
177 if let Some(v) = self.d_gain_optional.as_ref() {
178 let len = v.compute_size();
179 my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len;
180 }
181 if let Some(v) = self.i_max_optional.as_ref() {
182 let len = v.compute_size();
183 my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len;
184 }
185 if let Some(v) = self.i_min_optional.as_ref() {
186 let len = v.compute_size();
187 my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len;
188 }
189 if let Some(v) = self.limit_optional.as_ref() {
190 let len = v.compute_size();
191 my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len;
192 }
193 my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields());
194 self.special_fields.cached_size().set(my_size as u32);
195 my_size
196 }
197
198 fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> {
199 if let Some(v) = self.header.as_ref() {
200 ::protobuf::rt::write_message_field_with_cached_size(1, v, os)?;
201 }
202 if let Some(v) = self.target_optional.as_ref() {
203 ::protobuf::rt::write_message_field_with_cached_size(2, v, os)?;
204 }
205 if let Some(v) = self.p_gain_optional.as_ref() {
206 ::protobuf::rt::write_message_field_with_cached_size(3, v, os)?;
207 }
208 if let Some(v) = self.i_gain_optional.as_ref() {
209 ::protobuf::rt::write_message_field_with_cached_size(4, v, os)?;
210 }
211 if let Some(v) = self.d_gain_optional.as_ref() {
212 ::protobuf::rt::write_message_field_with_cached_size(5, v, os)?;
213 }
214 if let Some(v) = self.i_max_optional.as_ref() {
215 ::protobuf::rt::write_message_field_with_cached_size(6, v, os)?;
216 }
217 if let Some(v) = self.i_min_optional.as_ref() {
218 ::protobuf::rt::write_message_field_with_cached_size(7, v, os)?;
219 }
220 if let Some(v) = self.limit_optional.as_ref() {
221 ::protobuf::rt::write_message_field_with_cached_size(8, v, os)?;
222 }
223 os.write_unknown_fields(self.special_fields.unknown_fields())?;
224 ::std::result::Result::Ok(())
225 }
226
227 fn special_fields(&self) -> &::protobuf::SpecialFields {
228 &self.special_fields
229 }
230
231 fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields {
232 &mut self.special_fields
233 }
234
235 fn new() -> PID {
236 PID::new()
237 }
238
239 fn clear(&mut self) {
240 self.header.clear();
241 self.target_optional.clear();
242 self.p_gain_optional.clear();
243 self.i_gain_optional.clear();
244 self.d_gain_optional.clear();
245 self.i_max_optional.clear();
246 self.i_min_optional.clear();
247 self.limit_optional.clear();
248 self.special_fields.clear();
249 }
250
251 fn default_instance() -> &'static PID {
252 static instance: PID = PID {
253 header: ::protobuf::MessageField::none(),
254 target_optional: ::protobuf::MessageField::none(),
255 p_gain_optional: ::protobuf::MessageField::none(),
256 i_gain_optional: ::protobuf::MessageField::none(),
257 d_gain_optional: ::protobuf::MessageField::none(),
258 i_max_optional: ::protobuf::MessageField::none(),
259 i_min_optional: ::protobuf::MessageField::none(),
260 limit_optional: ::protobuf::MessageField::none(),
261 special_fields: ::protobuf::SpecialFields::new(),
262 };
263 &instance
264 }
265}
266
267impl ::protobuf::MessageFull for PID {
268 fn descriptor() -> ::protobuf::reflect::MessageDescriptor {
269 static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new();
270 descriptor.get(|| file_descriptor().message_by_package_relative_name("PID").unwrap()).clone()
271 }
272}
273
274impl ::std::fmt::Display for PID {
275 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
276 ::protobuf::text_format::fmt(self, f)
277 }
278}
279
280impl ::protobuf::reflect::ProtobufValue for PID {
281 type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage<Self>;
282}
283
284static file_descriptor_proto_data: &'static [u8] = b"\
285 \n\x17ignition/msgs/pid.proto\x12\rignition.msgs\x1a\x1aignition/msgs/do\
286 uble.proto\x1a\x1aignition/msgs/header.proto\"\xe9\x03\n\x03PID\x12-\n\
287 \x06header\x18\x01\x20\x01(\x0b2\x15.ignition.msgs.HeaderR\x06header\x12\
288 >\n\x0ftarget_optional\x18\x02\x20\x01(\x0b2\x15.ignition.msgs.DoubleR\
289 \x0etargetOptional\x12=\n\x0fp_gain_optional\x18\x03\x20\x01(\x0b2\x15.i\
290 gnition.msgs.DoubleR\rpGainOptional\x12=\n\x0fi_gain_optional\x18\x04\
291 \x20\x01(\x0b2\x15.ignition.msgs.DoubleR\riGainOptional\x12=\n\x0fd_gain\
292 _optional\x18\x05\x20\x01(\x0b2\x15.ignition.msgs.DoubleR\rdGainOptional\
293 \x12;\n\x0ei_max_optional\x18\x06\x20\x01(\x0b2\x15.ignition.msgs.Double\
294 R\x0ciMaxOptional\x12;\n\x0ei_min_optional\x18\x07\x20\x01(\x0b2\x15.ign\
295 ition.msgs.DoubleR\x0ciMinOptional\x12<\n\x0elimit_optional\x18\x08\x20\
296 \x01(\x0b2\x15.ignition.msgs.DoubleR\rlimitOptionalB\x1e\n\x11com.igniti\
297 on.msgsB\tPIDProtosb\x06proto3\
298";
299
300fn file_descriptor_proto() -> &'static ::protobuf::descriptor::FileDescriptorProto {
302 static file_descriptor_proto_lazy: ::protobuf::rt::Lazy<::protobuf::descriptor::FileDescriptorProto> = ::protobuf::rt::Lazy::new();
303 file_descriptor_proto_lazy.get(|| {
304 ::protobuf::Message::parse_from_bytes(file_descriptor_proto_data).unwrap()
305 })
306}
307
308pub fn file_descriptor() -> &'static ::protobuf::reflect::FileDescriptor {
310 static generated_file_descriptor_lazy: ::protobuf::rt::Lazy<::protobuf::reflect::GeneratedFileDescriptor> = ::protobuf::rt::Lazy::new();
311 static file_descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::FileDescriptor> = ::protobuf::rt::Lazy::new();
312 file_descriptor.get(|| {
313 let generated_file_descriptor = generated_file_descriptor_lazy.get(|| {
314 let mut deps = ::std::vec::Vec::with_capacity(2);
315 deps.push(super::double::file_descriptor().clone());
316 deps.push(super::header::file_descriptor().clone());
317 let mut messages = ::std::vec::Vec::with_capacity(1);
318 messages.push(PID::generated_message_descriptor_data());
319 let mut enums = ::std::vec::Vec::with_capacity(0);
320 ::protobuf::reflect::GeneratedFileDescriptor::new_generated(
321 file_descriptor_proto(),
322 deps,
323 messages,
324 enums,
325 )
326 });
327 ::protobuf::reflect::FileDescriptor::new_generated_2(generated_file_descriptor)
328 })
329}