• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 // This file is generated by rust-protobuf 3.2.0. 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(box_pointers)]
13 #![allow(dead_code)]
14 #![allow(missing_docs)]
15 #![allow(non_camel_case_types)]
16 #![allow(non_snake_case)]
17 #![allow(non_upper_case_globals)]
18 #![allow(trivial_casts)]
19 #![allow(unused_results)]
20 #![allow(unused_mut)]
21 
22 //! Generated file from `netsim/packet_streamer.proto`
23 
24 /// Generated files are compatible only with the same version
25 /// of protobuf runtime.
26 const _PROTOBUF_VERSION_CHECK: () = ::protobuf::VERSION_3_2_0;
27 
28 #[derive(PartialEq,Clone,Default,Debug)]
29 // @@protoc_insertion_point(message:netsim.packet.PacketRequest)
30 pub struct PacketRequest {
31     // message oneof groups
32     pub request_type: ::std::option::Option<packet_request::Request_type>,
33     // special fields
34     // @@protoc_insertion_point(special_field:netsim.packet.PacketRequest.special_fields)
35     pub special_fields: ::protobuf::SpecialFields,
36 }
37 
38 impl<'a> ::std::default::Default for &'a PacketRequest {
default() -> &'a PacketRequest39     fn default() -> &'a PacketRequest {
40         <PacketRequest as ::protobuf::Message>::default_instance()
41     }
42 }
43 
44 impl PacketRequest {
new() -> PacketRequest45     pub fn new() -> PacketRequest {
46         ::std::default::Default::default()
47     }
48 
49     // .netsim.startup.ChipInfo initial_info = 1;
50 
initial_info(&self) -> &super::startup::ChipInfo51     pub fn initial_info(&self) -> &super::startup::ChipInfo {
52         match self.request_type {
53             ::std::option::Option::Some(packet_request::Request_type::InitialInfo(ref v)) => v,
54             _ => <super::startup::ChipInfo as ::protobuf::Message>::default_instance(),
55         }
56     }
57 
clear_initial_info(&mut self)58     pub fn clear_initial_info(&mut self) {
59         self.request_type = ::std::option::Option::None;
60     }
61 
has_initial_info(&self) -> bool62     pub fn has_initial_info(&self) -> bool {
63         match self.request_type {
64             ::std::option::Option::Some(packet_request::Request_type::InitialInfo(..)) => true,
65             _ => false,
66         }
67     }
68 
69     // Param is passed by value, moved
set_initial_info(&mut self, v: super::startup::ChipInfo)70     pub fn set_initial_info(&mut self, v: super::startup::ChipInfo) {
71         self.request_type = ::std::option::Option::Some(packet_request::Request_type::InitialInfo(v))
72     }
73 
74     // Mutable pointer to the field.
mut_initial_info(&mut self) -> &mut super::startup::ChipInfo75     pub fn mut_initial_info(&mut self) -> &mut super::startup::ChipInfo {
76         if let ::std::option::Option::Some(packet_request::Request_type::InitialInfo(_)) = self.request_type {
77         } else {
78             self.request_type = ::std::option::Option::Some(packet_request::Request_type::InitialInfo(super::startup::ChipInfo::new()));
79         }
80         match self.request_type {
81             ::std::option::Option::Some(packet_request::Request_type::InitialInfo(ref mut v)) => v,
82             _ => panic!(),
83         }
84     }
85 
86     // Take field
take_initial_info(&mut self) -> super::startup::ChipInfo87     pub fn take_initial_info(&mut self) -> super::startup::ChipInfo {
88         if self.has_initial_info() {
89             match self.request_type.take() {
90                 ::std::option::Option::Some(packet_request::Request_type::InitialInfo(v)) => v,
91                 _ => panic!(),
92             }
93         } else {
94             super::startup::ChipInfo::new()
95         }
96     }
97 
98     // .netsim.packet.HCIPacket hci_packet = 2;
99 
hci_packet(&self) -> &super::hci_packet::HCIPacket100     pub fn hci_packet(&self) -> &super::hci_packet::HCIPacket {
101         match self.request_type {
102             ::std::option::Option::Some(packet_request::Request_type::HciPacket(ref v)) => v,
103             _ => <super::hci_packet::HCIPacket as ::protobuf::Message>::default_instance(),
104         }
105     }
106 
clear_hci_packet(&mut self)107     pub fn clear_hci_packet(&mut self) {
108         self.request_type = ::std::option::Option::None;
109     }
110 
has_hci_packet(&self) -> bool111     pub fn has_hci_packet(&self) -> bool {
112         match self.request_type {
113             ::std::option::Option::Some(packet_request::Request_type::HciPacket(..)) => true,
114             _ => false,
115         }
116     }
117 
118     // Param is passed by value, moved
set_hci_packet(&mut self, v: super::hci_packet::HCIPacket)119     pub fn set_hci_packet(&mut self, v: super::hci_packet::HCIPacket) {
120         self.request_type = ::std::option::Option::Some(packet_request::Request_type::HciPacket(v))
121     }
122 
123     // Mutable pointer to the field.
mut_hci_packet(&mut self) -> &mut super::hci_packet::HCIPacket124     pub fn mut_hci_packet(&mut self) -> &mut super::hci_packet::HCIPacket {
125         if let ::std::option::Option::Some(packet_request::Request_type::HciPacket(_)) = self.request_type {
126         } else {
127             self.request_type = ::std::option::Option::Some(packet_request::Request_type::HciPacket(super::hci_packet::HCIPacket::new()));
128         }
129         match self.request_type {
130             ::std::option::Option::Some(packet_request::Request_type::HciPacket(ref mut v)) => v,
131             _ => panic!(),
132         }
133     }
134 
135     // Take field
take_hci_packet(&mut self) -> super::hci_packet::HCIPacket136     pub fn take_hci_packet(&mut self) -> super::hci_packet::HCIPacket {
137         if self.has_hci_packet() {
138             match self.request_type.take() {
139                 ::std::option::Option::Some(packet_request::Request_type::HciPacket(v)) => v,
140                 _ => panic!(),
141             }
142         } else {
143             super::hci_packet::HCIPacket::new()
144         }
145     }
146 
147     // bytes packet = 3;
148 
packet(&self) -> &[u8]149     pub fn packet(&self) -> &[u8] {
150         match self.request_type {
151             ::std::option::Option::Some(packet_request::Request_type::Packet(ref v)) => v,
152             _ => &[],
153         }
154     }
155 
clear_packet(&mut self)156     pub fn clear_packet(&mut self) {
157         self.request_type = ::std::option::Option::None;
158     }
159 
has_packet(&self) -> bool160     pub fn has_packet(&self) -> bool {
161         match self.request_type {
162             ::std::option::Option::Some(packet_request::Request_type::Packet(..)) => true,
163             _ => false,
164         }
165     }
166 
167     // Param is passed by value, moved
set_packet(&mut self, v: ::std::vec::Vec<u8>)168     pub fn set_packet(&mut self, v: ::std::vec::Vec<u8>) {
169         self.request_type = ::std::option::Option::Some(packet_request::Request_type::Packet(v))
170     }
171 
172     // Mutable pointer to the field.
mut_packet(&mut self) -> &mut ::std::vec::Vec<u8>173     pub fn mut_packet(&mut self) -> &mut ::std::vec::Vec<u8> {
174         if let ::std::option::Option::Some(packet_request::Request_type::Packet(_)) = self.request_type {
175         } else {
176             self.request_type = ::std::option::Option::Some(packet_request::Request_type::Packet(::std::vec::Vec::new()));
177         }
178         match self.request_type {
179             ::std::option::Option::Some(packet_request::Request_type::Packet(ref mut v)) => v,
180             _ => panic!(),
181         }
182     }
183 
184     // Take field
take_packet(&mut self) -> ::std::vec::Vec<u8>185     pub fn take_packet(&mut self) -> ::std::vec::Vec<u8> {
186         if self.has_packet() {
187             match self.request_type.take() {
188                 ::std::option::Option::Some(packet_request::Request_type::Packet(v)) => v,
189                 _ => panic!(),
190             }
191         } else {
192             ::std::vec::Vec::new()
193         }
194     }
195 
generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData196     fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData {
197         let mut fields = ::std::vec::Vec::with_capacity(3);
198         let mut oneofs = ::std::vec::Vec::with_capacity(1);
199         fields.push(::protobuf::reflect::rt::v2::make_oneof_message_has_get_mut_set_accessor::<_, super::startup::ChipInfo>(
200             "initial_info",
201             PacketRequest::has_initial_info,
202             PacketRequest::initial_info,
203             PacketRequest::mut_initial_info,
204             PacketRequest::set_initial_info,
205         ));
206         fields.push(::protobuf::reflect::rt::v2::make_oneof_message_has_get_mut_set_accessor::<_, super::hci_packet::HCIPacket>(
207             "hci_packet",
208             PacketRequest::has_hci_packet,
209             PacketRequest::hci_packet,
210             PacketRequest::mut_hci_packet,
211             PacketRequest::set_hci_packet,
212         ));
213         fields.push(::protobuf::reflect::rt::v2::make_oneof_deref_has_get_set_simpler_accessor::<_, _>(
214             "packet",
215             PacketRequest::has_packet,
216             PacketRequest::packet,
217             PacketRequest::set_packet,
218         ));
219         oneofs.push(packet_request::Request_type::generated_oneof_descriptor_data());
220         ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::<PacketRequest>(
221             "PacketRequest",
222             fields,
223             oneofs,
224         )
225     }
226 }
227 
228 impl ::protobuf::Message for PacketRequest {
229     const NAME: &'static str = "PacketRequest";
230 
is_initialized(&self) -> bool231     fn is_initialized(&self) -> bool {
232         true
233     }
234 
merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()>235     fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> {
236         while let Some(tag) = is.read_raw_tag_or_eof()? {
237             match tag {
238                 10 => {
239                     self.request_type = ::std::option::Option::Some(packet_request::Request_type::InitialInfo(is.read_message()?));
240                 },
241                 18 => {
242                     self.request_type = ::std::option::Option::Some(packet_request::Request_type::HciPacket(is.read_message()?));
243                 },
244                 26 => {
245                     self.request_type = ::std::option::Option::Some(packet_request::Request_type::Packet(is.read_bytes()?));
246                 },
247                 tag => {
248                     ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?;
249                 },
250             };
251         }
252         ::std::result::Result::Ok(())
253     }
254 
255     // Compute sizes of nested messages
256     #[allow(unused_variables)]
compute_size(&self) -> u64257     fn compute_size(&self) -> u64 {
258         let mut my_size = 0;
259         if let ::std::option::Option::Some(ref v) = self.request_type {
260             match v {
261                 &packet_request::Request_type::InitialInfo(ref v) => {
262                     let len = v.compute_size();
263                     my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len;
264                 },
265                 &packet_request::Request_type::HciPacket(ref v) => {
266                     let len = v.compute_size();
267                     my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len;
268                 },
269                 &packet_request::Request_type::Packet(ref v) => {
270                     my_size += ::protobuf::rt::bytes_size(3, &v);
271                 },
272             };
273         }
274         my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields());
275         self.special_fields.cached_size().set(my_size as u32);
276         my_size
277     }
278 
write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()>279     fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> {
280         if let ::std::option::Option::Some(ref v) = self.request_type {
281             match v {
282                 &packet_request::Request_type::InitialInfo(ref v) => {
283                     ::protobuf::rt::write_message_field_with_cached_size(1, v, os)?;
284                 },
285                 &packet_request::Request_type::HciPacket(ref v) => {
286                     ::protobuf::rt::write_message_field_with_cached_size(2, v, os)?;
287                 },
288                 &packet_request::Request_type::Packet(ref v) => {
289                     os.write_bytes(3, v)?;
290                 },
291             };
292         }
293         os.write_unknown_fields(self.special_fields.unknown_fields())?;
294         ::std::result::Result::Ok(())
295     }
296 
special_fields(&self) -> &::protobuf::SpecialFields297     fn special_fields(&self) -> &::protobuf::SpecialFields {
298         &self.special_fields
299     }
300 
mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields301     fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields {
302         &mut self.special_fields
303     }
304 
new() -> PacketRequest305     fn new() -> PacketRequest {
306         PacketRequest::new()
307     }
308 
clear(&mut self)309     fn clear(&mut self) {
310         self.request_type = ::std::option::Option::None;
311         self.request_type = ::std::option::Option::None;
312         self.request_type = ::std::option::Option::None;
313         self.special_fields.clear();
314     }
315 
default_instance() -> &'static PacketRequest316     fn default_instance() -> &'static PacketRequest {
317         static instance: PacketRequest = PacketRequest {
318             request_type: ::std::option::Option::None,
319             special_fields: ::protobuf::SpecialFields::new(),
320         };
321         &instance
322     }
323 }
324 
325 impl ::protobuf::MessageFull for PacketRequest {
descriptor() -> ::protobuf::reflect::MessageDescriptor326     fn descriptor() -> ::protobuf::reflect::MessageDescriptor {
327         static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new();
328         descriptor.get(|| file_descriptor().message_by_package_relative_name("PacketRequest").unwrap()).clone()
329     }
330 }
331 
332 impl ::std::fmt::Display for PacketRequest {
fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result333     fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
334         ::protobuf::text_format::fmt(self, f)
335     }
336 }
337 
338 impl ::protobuf::reflect::ProtobufValue for PacketRequest {
339     type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage<Self>;
340 }
341 
342 /// Nested message and enums of message `PacketRequest`
343 pub mod packet_request {
344 
345     #[derive(Clone,PartialEq,Debug)]
346     #[non_exhaustive]
347     // @@protoc_insertion_point(oneof:netsim.packet.PacketRequest.request_type)
348     pub enum Request_type {
349         // @@protoc_insertion_point(oneof_field:netsim.packet.PacketRequest.initial_info)
350         InitialInfo(super::super::startup::ChipInfo),
351         // @@protoc_insertion_point(oneof_field:netsim.packet.PacketRequest.hci_packet)
352         HciPacket(super::super::hci_packet::HCIPacket),
353         // @@protoc_insertion_point(oneof_field:netsim.packet.PacketRequest.packet)
354         Packet(::std::vec::Vec<u8>),
355     }
356 
357     impl ::protobuf::Oneof for Request_type {
358     }
359 
360     impl ::protobuf::OneofFull for Request_type {
descriptor() -> ::protobuf::reflect::OneofDescriptor361         fn descriptor() -> ::protobuf::reflect::OneofDescriptor {
362             static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::OneofDescriptor> = ::protobuf::rt::Lazy::new();
363             descriptor.get(|| <super::PacketRequest as ::protobuf::MessageFull>::descriptor().oneof_by_name("request_type").unwrap()).clone()
364         }
365     }
366 
367     impl Request_type {
generated_oneof_descriptor_data() -> ::protobuf::reflect::GeneratedOneofDescriptorData368         pub(in super) fn generated_oneof_descriptor_data() -> ::protobuf::reflect::GeneratedOneofDescriptorData {
369             ::protobuf::reflect::GeneratedOneofDescriptorData::new::<Request_type>("request_type")
370         }
371     }
372 }
373 
374 #[derive(PartialEq,Clone,Default,Debug)]
375 // @@protoc_insertion_point(message:netsim.packet.PacketResponse)
376 pub struct PacketResponse {
377     // message oneof groups
378     pub response_type: ::std::option::Option<packet_response::Response_type>,
379     // special fields
380     // @@protoc_insertion_point(special_field:netsim.packet.PacketResponse.special_fields)
381     pub special_fields: ::protobuf::SpecialFields,
382 }
383 
384 impl<'a> ::std::default::Default for &'a PacketResponse {
default() -> &'a PacketResponse385     fn default() -> &'a PacketResponse {
386         <PacketResponse as ::protobuf::Message>::default_instance()
387     }
388 }
389 
390 impl PacketResponse {
new() -> PacketResponse391     pub fn new() -> PacketResponse {
392         ::std::default::Default::default()
393     }
394 
395     // string error = 1;
396 
error(&self) -> &str397     pub fn error(&self) -> &str {
398         match self.response_type {
399             ::std::option::Option::Some(packet_response::Response_type::Error(ref v)) => v,
400             _ => "",
401         }
402     }
403 
clear_error(&mut self)404     pub fn clear_error(&mut self) {
405         self.response_type = ::std::option::Option::None;
406     }
407 
has_error(&self) -> bool408     pub fn has_error(&self) -> bool {
409         match self.response_type {
410             ::std::option::Option::Some(packet_response::Response_type::Error(..)) => true,
411             _ => false,
412         }
413     }
414 
415     // Param is passed by value, moved
set_error(&mut self, v: ::std::string::String)416     pub fn set_error(&mut self, v: ::std::string::String) {
417         self.response_type = ::std::option::Option::Some(packet_response::Response_type::Error(v))
418     }
419 
420     // Mutable pointer to the field.
mut_error(&mut self) -> &mut ::std::string::String421     pub fn mut_error(&mut self) -> &mut ::std::string::String {
422         if let ::std::option::Option::Some(packet_response::Response_type::Error(_)) = self.response_type {
423         } else {
424             self.response_type = ::std::option::Option::Some(packet_response::Response_type::Error(::std::string::String::new()));
425         }
426         match self.response_type {
427             ::std::option::Option::Some(packet_response::Response_type::Error(ref mut v)) => v,
428             _ => panic!(),
429         }
430     }
431 
432     // Take field
take_error(&mut self) -> ::std::string::String433     pub fn take_error(&mut self) -> ::std::string::String {
434         if self.has_error() {
435             match self.response_type.take() {
436                 ::std::option::Option::Some(packet_response::Response_type::Error(v)) => v,
437                 _ => panic!(),
438             }
439         } else {
440             ::std::string::String::new()
441         }
442     }
443 
444     // .netsim.packet.HCIPacket hci_packet = 2;
445 
hci_packet(&self) -> &super::hci_packet::HCIPacket446     pub fn hci_packet(&self) -> &super::hci_packet::HCIPacket {
447         match self.response_type {
448             ::std::option::Option::Some(packet_response::Response_type::HciPacket(ref v)) => v,
449             _ => <super::hci_packet::HCIPacket as ::protobuf::Message>::default_instance(),
450         }
451     }
452 
clear_hci_packet(&mut self)453     pub fn clear_hci_packet(&mut self) {
454         self.response_type = ::std::option::Option::None;
455     }
456 
has_hci_packet(&self) -> bool457     pub fn has_hci_packet(&self) -> bool {
458         match self.response_type {
459             ::std::option::Option::Some(packet_response::Response_type::HciPacket(..)) => true,
460             _ => false,
461         }
462     }
463 
464     // Param is passed by value, moved
set_hci_packet(&mut self, v: super::hci_packet::HCIPacket)465     pub fn set_hci_packet(&mut self, v: super::hci_packet::HCIPacket) {
466         self.response_type = ::std::option::Option::Some(packet_response::Response_type::HciPacket(v))
467     }
468 
469     // Mutable pointer to the field.
mut_hci_packet(&mut self) -> &mut super::hci_packet::HCIPacket470     pub fn mut_hci_packet(&mut self) -> &mut super::hci_packet::HCIPacket {
471         if let ::std::option::Option::Some(packet_response::Response_type::HciPacket(_)) = self.response_type {
472         } else {
473             self.response_type = ::std::option::Option::Some(packet_response::Response_type::HciPacket(super::hci_packet::HCIPacket::new()));
474         }
475         match self.response_type {
476             ::std::option::Option::Some(packet_response::Response_type::HciPacket(ref mut v)) => v,
477             _ => panic!(),
478         }
479     }
480 
481     // Take field
take_hci_packet(&mut self) -> super::hci_packet::HCIPacket482     pub fn take_hci_packet(&mut self) -> super::hci_packet::HCIPacket {
483         if self.has_hci_packet() {
484             match self.response_type.take() {
485                 ::std::option::Option::Some(packet_response::Response_type::HciPacket(v)) => v,
486                 _ => panic!(),
487             }
488         } else {
489             super::hci_packet::HCIPacket::new()
490         }
491     }
492 
493     // bytes packet = 3;
494 
packet(&self) -> &[u8]495     pub fn packet(&self) -> &[u8] {
496         match self.response_type {
497             ::std::option::Option::Some(packet_response::Response_type::Packet(ref v)) => v,
498             _ => &[],
499         }
500     }
501 
clear_packet(&mut self)502     pub fn clear_packet(&mut self) {
503         self.response_type = ::std::option::Option::None;
504     }
505 
has_packet(&self) -> bool506     pub fn has_packet(&self) -> bool {
507         match self.response_type {
508             ::std::option::Option::Some(packet_response::Response_type::Packet(..)) => true,
509             _ => false,
510         }
511     }
512 
513     // Param is passed by value, moved
set_packet(&mut self, v: ::std::vec::Vec<u8>)514     pub fn set_packet(&mut self, v: ::std::vec::Vec<u8>) {
515         self.response_type = ::std::option::Option::Some(packet_response::Response_type::Packet(v))
516     }
517 
518     // Mutable pointer to the field.
mut_packet(&mut self) -> &mut ::std::vec::Vec<u8>519     pub fn mut_packet(&mut self) -> &mut ::std::vec::Vec<u8> {
520         if let ::std::option::Option::Some(packet_response::Response_type::Packet(_)) = self.response_type {
521         } else {
522             self.response_type = ::std::option::Option::Some(packet_response::Response_type::Packet(::std::vec::Vec::new()));
523         }
524         match self.response_type {
525             ::std::option::Option::Some(packet_response::Response_type::Packet(ref mut v)) => v,
526             _ => panic!(),
527         }
528     }
529 
530     // Take field
take_packet(&mut self) -> ::std::vec::Vec<u8>531     pub fn take_packet(&mut self) -> ::std::vec::Vec<u8> {
532         if self.has_packet() {
533             match self.response_type.take() {
534                 ::std::option::Option::Some(packet_response::Response_type::Packet(v)) => v,
535                 _ => panic!(),
536             }
537         } else {
538             ::std::vec::Vec::new()
539         }
540     }
541 
generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData542     fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData {
543         let mut fields = ::std::vec::Vec::with_capacity(3);
544         let mut oneofs = ::std::vec::Vec::with_capacity(1);
545         fields.push(::protobuf::reflect::rt::v2::make_oneof_deref_has_get_set_simpler_accessor::<_, _>(
546             "error",
547             PacketResponse::has_error,
548             PacketResponse::error,
549             PacketResponse::set_error,
550         ));
551         fields.push(::protobuf::reflect::rt::v2::make_oneof_message_has_get_mut_set_accessor::<_, super::hci_packet::HCIPacket>(
552             "hci_packet",
553             PacketResponse::has_hci_packet,
554             PacketResponse::hci_packet,
555             PacketResponse::mut_hci_packet,
556             PacketResponse::set_hci_packet,
557         ));
558         fields.push(::protobuf::reflect::rt::v2::make_oneof_deref_has_get_set_simpler_accessor::<_, _>(
559             "packet",
560             PacketResponse::has_packet,
561             PacketResponse::packet,
562             PacketResponse::set_packet,
563         ));
564         oneofs.push(packet_response::Response_type::generated_oneof_descriptor_data());
565         ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::<PacketResponse>(
566             "PacketResponse",
567             fields,
568             oneofs,
569         )
570     }
571 }
572 
573 impl ::protobuf::Message for PacketResponse {
574     const NAME: &'static str = "PacketResponse";
575 
is_initialized(&self) -> bool576     fn is_initialized(&self) -> bool {
577         true
578     }
579 
merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()>580     fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> {
581         while let Some(tag) = is.read_raw_tag_or_eof()? {
582             match tag {
583                 10 => {
584                     self.response_type = ::std::option::Option::Some(packet_response::Response_type::Error(is.read_string()?));
585                 },
586                 18 => {
587                     self.response_type = ::std::option::Option::Some(packet_response::Response_type::HciPacket(is.read_message()?));
588                 },
589                 26 => {
590                     self.response_type = ::std::option::Option::Some(packet_response::Response_type::Packet(is.read_bytes()?));
591                 },
592                 tag => {
593                     ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?;
594                 },
595             };
596         }
597         ::std::result::Result::Ok(())
598     }
599 
600     // Compute sizes of nested messages
601     #[allow(unused_variables)]
compute_size(&self) -> u64602     fn compute_size(&self) -> u64 {
603         let mut my_size = 0;
604         if let ::std::option::Option::Some(ref v) = self.response_type {
605             match v {
606                 &packet_response::Response_type::Error(ref v) => {
607                     my_size += ::protobuf::rt::string_size(1, &v);
608                 },
609                 &packet_response::Response_type::HciPacket(ref v) => {
610                     let len = v.compute_size();
611                     my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len;
612                 },
613                 &packet_response::Response_type::Packet(ref v) => {
614                     my_size += ::protobuf::rt::bytes_size(3, &v);
615                 },
616             };
617         }
618         my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields());
619         self.special_fields.cached_size().set(my_size as u32);
620         my_size
621     }
622 
write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()>623     fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> {
624         if let ::std::option::Option::Some(ref v) = self.response_type {
625             match v {
626                 &packet_response::Response_type::Error(ref v) => {
627                     os.write_string(1, v)?;
628                 },
629                 &packet_response::Response_type::HciPacket(ref v) => {
630                     ::protobuf::rt::write_message_field_with_cached_size(2, v, os)?;
631                 },
632                 &packet_response::Response_type::Packet(ref v) => {
633                     os.write_bytes(3, v)?;
634                 },
635             };
636         }
637         os.write_unknown_fields(self.special_fields.unknown_fields())?;
638         ::std::result::Result::Ok(())
639     }
640 
special_fields(&self) -> &::protobuf::SpecialFields641     fn special_fields(&self) -> &::protobuf::SpecialFields {
642         &self.special_fields
643     }
644 
mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields645     fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields {
646         &mut self.special_fields
647     }
648 
new() -> PacketResponse649     fn new() -> PacketResponse {
650         PacketResponse::new()
651     }
652 
clear(&mut self)653     fn clear(&mut self) {
654         self.response_type = ::std::option::Option::None;
655         self.response_type = ::std::option::Option::None;
656         self.response_type = ::std::option::Option::None;
657         self.special_fields.clear();
658     }
659 
default_instance() -> &'static PacketResponse660     fn default_instance() -> &'static PacketResponse {
661         static instance: PacketResponse = PacketResponse {
662             response_type: ::std::option::Option::None,
663             special_fields: ::protobuf::SpecialFields::new(),
664         };
665         &instance
666     }
667 }
668 
669 impl ::protobuf::MessageFull for PacketResponse {
descriptor() -> ::protobuf::reflect::MessageDescriptor670     fn descriptor() -> ::protobuf::reflect::MessageDescriptor {
671         static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new();
672         descriptor.get(|| file_descriptor().message_by_package_relative_name("PacketResponse").unwrap()).clone()
673     }
674 }
675 
676 impl ::std::fmt::Display for PacketResponse {
fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result677     fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
678         ::protobuf::text_format::fmt(self, f)
679     }
680 }
681 
682 impl ::protobuf::reflect::ProtobufValue for PacketResponse {
683     type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage<Self>;
684 }
685 
686 /// Nested message and enums of message `PacketResponse`
687 pub mod packet_response {
688 
689     #[derive(Clone,PartialEq,Debug)]
690     #[non_exhaustive]
691     // @@protoc_insertion_point(oneof:netsim.packet.PacketResponse.response_type)
692     pub enum Response_type {
693         // @@protoc_insertion_point(oneof_field:netsim.packet.PacketResponse.error)
694         Error(::std::string::String),
695         // @@protoc_insertion_point(oneof_field:netsim.packet.PacketResponse.hci_packet)
696         HciPacket(super::super::hci_packet::HCIPacket),
697         // @@protoc_insertion_point(oneof_field:netsim.packet.PacketResponse.packet)
698         Packet(::std::vec::Vec<u8>),
699     }
700 
701     impl ::protobuf::Oneof for Response_type {
702     }
703 
704     impl ::protobuf::OneofFull for Response_type {
descriptor() -> ::protobuf::reflect::OneofDescriptor705         fn descriptor() -> ::protobuf::reflect::OneofDescriptor {
706             static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::OneofDescriptor> = ::protobuf::rt::Lazy::new();
707             descriptor.get(|| <super::PacketResponse as ::protobuf::MessageFull>::descriptor().oneof_by_name("response_type").unwrap()).clone()
708         }
709     }
710 
711     impl Response_type {
generated_oneof_descriptor_data() -> ::protobuf::reflect::GeneratedOneofDescriptorData712         pub(in super) fn generated_oneof_descriptor_data() -> ::protobuf::reflect::GeneratedOneofDescriptorData {
713             ::protobuf::reflect::GeneratedOneofDescriptorData::new::<Response_type>("response_type")
714         }
715     }
716 }
717 
718 static file_descriptor_proto_data: &'static [u8] = b"\
719     \n\x1cnetsim/packet_streamer.proto\x12\rnetsim.packet\x1a\x17netsim/hci_\
720     packet.proto\x1a\x14netsim/startup.proto\"\xb3\x01\n\rPacketRequest\x12=\
721     \n\x0cinitial_info\x18\x01\x20\x01(\x0b2\x18.netsim.startup.ChipInfoH\0R\
722     \x0binitialInfo\x129\n\nhci_packet\x18\x02\x20\x01(\x0b2\x18.netsim.pack\
723     et.HCIPacketH\0R\thciPacket\x12\x18\n\x06packet\x18\x03\x20\x01(\x0cH\0R\
724     \x06packetB\x0e\n\x0crequest_type\"\x8e\x01\n\x0ePacketResponse\x12\x16\
725     \n\x05error\x18\x01\x20\x01(\tH\0R\x05error\x129\n\nhci_packet\x18\x02\
726     \x20\x01(\x0b2\x18.netsim.packet.HCIPacketH\0R\thciPacket\x12\x18\n\x06p\
727     acket\x18\x03\x20\x01(\x0cH\0R\x06packetB\x0f\n\rresponse_type2b\n\x0ePa\
728     cketStreamer\x12P\n\rStreamPackets\x12\x1c.netsim.packet.PacketRequest\
729     \x1a\x1d.netsim.packet.PacketResponse(\x010\x01b\x06proto3\
730 ";
731 
732 /// `FileDescriptorProto` object which was a source for this generated file
file_descriptor_proto() -> &'static ::protobuf::descriptor::FileDescriptorProto733 fn file_descriptor_proto() -> &'static ::protobuf::descriptor::FileDescriptorProto {
734     static file_descriptor_proto_lazy: ::protobuf::rt::Lazy<::protobuf::descriptor::FileDescriptorProto> = ::protobuf::rt::Lazy::new();
735     file_descriptor_proto_lazy.get(|| {
736         ::protobuf::Message::parse_from_bytes(file_descriptor_proto_data).unwrap()
737     })
738 }
739 
740 /// `FileDescriptor` object which allows dynamic access to files
file_descriptor() -> &'static ::protobuf::reflect::FileDescriptor741 pub fn file_descriptor() -> &'static ::protobuf::reflect::FileDescriptor {
742     static generated_file_descriptor_lazy: ::protobuf::rt::Lazy<::protobuf::reflect::GeneratedFileDescriptor> = ::protobuf::rt::Lazy::new();
743     static file_descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::FileDescriptor> = ::protobuf::rt::Lazy::new();
744     file_descriptor.get(|| {
745         let generated_file_descriptor = generated_file_descriptor_lazy.get(|| {
746             let mut deps = ::std::vec::Vec::with_capacity(2);
747             deps.push(super::hci_packet::file_descriptor().clone());
748             deps.push(super::startup::file_descriptor().clone());
749             let mut messages = ::std::vec::Vec::with_capacity(2);
750             messages.push(PacketRequest::generated_message_descriptor_data());
751             messages.push(PacketResponse::generated_message_descriptor_data());
752             let mut enums = ::std::vec::Vec::with_capacity(0);
753             ::protobuf::reflect::GeneratedFileDescriptor::new_generated(
754                 file_descriptor_proto(),
755                 deps,
756                 messages,
757                 enums,
758             )
759         });
760         ::protobuf::reflect::FileDescriptor::new_generated_2(generated_file_descriptor)
761     })
762 }
763