// This file is generated by rust-protobuf 3.2.0. Do not edit // .proto file is parsed by protoc 3.21.12 // @generated // https://github.com/rust-lang/rust-clippy/issues/702 #![allow(unknown_lints)] #![allow(clippy::all)] #![allow(unused_attributes)] #![cfg_attr(rustfmt, rustfmt::skip)] #![allow(box_pointers)] #![allow(dead_code)] #![allow(missing_docs)] #![allow(non_camel_case_types)] #![allow(non_snake_case)] #![allow(non_upper_case_globals)] #![allow(trivial_casts)] #![allow(unused_results)] #![allow(unused_mut)] //! Generated file from `netsim/model.proto` /// Generated files are compatible only with the same version /// of protobuf runtime. const _PROTOBUF_VERSION_CHECK: () = ::protobuf::VERSION_3_2_0; #[derive(PartialEq,Clone,Default,Debug)] // @@protoc_insertion_point(message:netsim.model.Position) pub struct Position { // message fields // @@protoc_insertion_point(field:netsim.model.Position.x) pub x: f32, // @@protoc_insertion_point(field:netsim.model.Position.y) pub y: f32, // @@protoc_insertion_point(field:netsim.model.Position.z) pub z: f32, // special fields // @@protoc_insertion_point(special_field:netsim.model.Position.special_fields) pub special_fields: ::protobuf::SpecialFields, } impl<'a> ::std::default::Default for &'a Position { fn default() -> &'a Position { ::default_instance() } } impl Position { pub fn new() -> Position { ::std::default::Default::default() } fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData { let mut fields = ::std::vec::Vec::with_capacity(3); let mut oneofs = ::std::vec::Vec::with_capacity(0); fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>( "x", |m: &Position| { &m.x }, |m: &mut Position| { &mut m.x }, )); fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>( "y", |m: &Position| { &m.y }, |m: &mut Position| { &mut m.y }, )); fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>( "z", |m: &Position| { &m.z }, |m: &mut Position| { &mut m.z }, )); ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::( "Position", fields, oneofs, ) } } impl ::protobuf::Message for Position { const NAME: &'static str = "Position"; fn is_initialized(&self) -> bool { true } fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { while let Some(tag) = is.read_raw_tag_or_eof()? { match tag { 13 => { self.x = is.read_float()?; }, 21 => { self.y = is.read_float()?; }, 29 => { self.z = is.read_float()?; }, tag => { ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; }, }; } ::std::result::Result::Ok(()) } // Compute sizes of nested messages #[allow(unused_variables)] fn compute_size(&self) -> u64 { let mut my_size = 0; if self.x != 0. { my_size += 1 + 4; } if self.y != 0. { my_size += 1 + 4; } if self.z != 0. { my_size += 1 + 4; } my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); self.special_fields.cached_size().set(my_size as u32); my_size } fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { if self.x != 0. { os.write_float(1, self.x)?; } if self.y != 0. { os.write_float(2, self.y)?; } if self.z != 0. { os.write_float(3, self.z)?; } os.write_unknown_fields(self.special_fields.unknown_fields())?; ::std::result::Result::Ok(()) } fn special_fields(&self) -> &::protobuf::SpecialFields { &self.special_fields } fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { &mut self.special_fields } fn new() -> Position { Position::new() } fn clear(&mut self) { self.x = 0.; self.y = 0.; self.z = 0.; self.special_fields.clear(); } fn default_instance() -> &'static Position { static instance: Position = Position { x: 0., y: 0., z: 0., special_fields: ::protobuf::SpecialFields::new(), }; &instance } } impl ::protobuf::MessageFull for Position { fn descriptor() -> ::protobuf::reflect::MessageDescriptor { static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new(); descriptor.get(|| file_descriptor().message_by_package_relative_name("Position").unwrap()).clone() } } impl ::std::fmt::Display for Position { fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { ::protobuf::text_format::fmt(self, f) } } impl ::protobuf::reflect::ProtobufValue for Position { type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage; } #[derive(PartialEq,Clone,Default,Debug)] // @@protoc_insertion_point(message:netsim.model.Orientation) pub struct Orientation { // message fields // @@protoc_insertion_point(field:netsim.model.Orientation.yaw) pub yaw: f32, // @@protoc_insertion_point(field:netsim.model.Orientation.pitch) pub pitch: f32, // @@protoc_insertion_point(field:netsim.model.Orientation.roll) pub roll: f32, // special fields // @@protoc_insertion_point(special_field:netsim.model.Orientation.special_fields) pub special_fields: ::protobuf::SpecialFields, } impl<'a> ::std::default::Default for &'a Orientation { fn default() -> &'a Orientation { ::default_instance() } } impl Orientation { pub fn new() -> Orientation { ::std::default::Default::default() } fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData { let mut fields = ::std::vec::Vec::with_capacity(3); let mut oneofs = ::std::vec::Vec::with_capacity(0); fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>( "yaw", |m: &Orientation| { &m.yaw }, |m: &mut Orientation| { &mut m.yaw }, )); fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>( "pitch", |m: &Orientation| { &m.pitch }, |m: &mut Orientation| { &mut m.pitch }, )); fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>( "roll", |m: &Orientation| { &m.roll }, |m: &mut Orientation| { &mut m.roll }, )); ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::( "Orientation", fields, oneofs, ) } } impl ::protobuf::Message for Orientation { const NAME: &'static str = "Orientation"; fn is_initialized(&self) -> bool { true } fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { while let Some(tag) = is.read_raw_tag_or_eof()? { match tag { 13 => { self.yaw = is.read_float()?; }, 21 => { self.pitch = is.read_float()?; }, 29 => { self.roll = is.read_float()?; }, tag => { ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; }, }; } ::std::result::Result::Ok(()) } // Compute sizes of nested messages #[allow(unused_variables)] fn compute_size(&self) -> u64 { let mut my_size = 0; if self.yaw != 0. { my_size += 1 + 4; } if self.pitch != 0. { my_size += 1 + 4; } if self.roll != 0. { my_size += 1 + 4; } my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); self.special_fields.cached_size().set(my_size as u32); my_size } fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { if self.yaw != 0. { os.write_float(1, self.yaw)?; } if self.pitch != 0. { os.write_float(2, self.pitch)?; } if self.roll != 0. { os.write_float(3, self.roll)?; } os.write_unknown_fields(self.special_fields.unknown_fields())?; ::std::result::Result::Ok(()) } fn special_fields(&self) -> &::protobuf::SpecialFields { &self.special_fields } fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { &mut self.special_fields } fn new() -> Orientation { Orientation::new() } fn clear(&mut self) { self.yaw = 0.; self.pitch = 0.; self.roll = 0.; self.special_fields.clear(); } fn default_instance() -> &'static Orientation { static instance: Orientation = Orientation { yaw: 0., pitch: 0., roll: 0., special_fields: ::protobuf::SpecialFields::new(), }; &instance } } impl ::protobuf::MessageFull for Orientation { fn descriptor() -> ::protobuf::reflect::MessageDescriptor { static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new(); descriptor.get(|| file_descriptor().message_by_package_relative_name("Orientation").unwrap()).clone() } } impl ::std::fmt::Display for Orientation { fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { ::protobuf::text_format::fmt(self, f) } } impl ::protobuf::reflect::ProtobufValue for Orientation { type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage; } #[derive(PartialEq,Clone,Default,Debug)] // @@protoc_insertion_point(message:netsim.model.Chip) pub struct Chip { // message fields // @@protoc_insertion_point(field:netsim.model.Chip.kind) pub kind: ::protobuf::EnumOrUnknown, // @@protoc_insertion_point(field:netsim.model.Chip.id) pub id: u32, // @@protoc_insertion_point(field:netsim.model.Chip.name) pub name: ::std::string::String, // @@protoc_insertion_point(field:netsim.model.Chip.manufacturer) pub manufacturer: ::std::string::String, // @@protoc_insertion_point(field:netsim.model.Chip.product_name) pub product_name: ::std::string::String, // message oneof groups pub chip: ::std::option::Option, // special fields // @@protoc_insertion_point(special_field:netsim.model.Chip.special_fields) pub special_fields: ::protobuf::SpecialFields, } impl<'a> ::std::default::Default for &'a Chip { fn default() -> &'a Chip { ::default_instance() } } impl Chip { pub fn new() -> Chip { ::std::default::Default::default() } // .netsim.model.Chip.Bluetooth bt = 6; pub fn bt(&self) -> &chip::Bluetooth { match self.chip { ::std::option::Option::Some(chip::Chip::Bt(ref v)) => v, _ => ::default_instance(), } } pub fn clear_bt(&mut self) { self.chip = ::std::option::Option::None; } pub fn has_bt(&self) -> bool { match self.chip { ::std::option::Option::Some(chip::Chip::Bt(..)) => true, _ => false, } } // Param is passed by value, moved pub fn set_bt(&mut self, v: chip::Bluetooth) { self.chip = ::std::option::Option::Some(chip::Chip::Bt(v)) } // Mutable pointer to the field. pub fn mut_bt(&mut self) -> &mut chip::Bluetooth { if let ::std::option::Option::Some(chip::Chip::Bt(_)) = self.chip { } else { self.chip = ::std::option::Option::Some(chip::Chip::Bt(chip::Bluetooth::new())); } match self.chip { ::std::option::Option::Some(chip::Chip::Bt(ref mut v)) => v, _ => panic!(), } } // Take field pub fn take_bt(&mut self) -> chip::Bluetooth { if self.has_bt() { match self.chip.take() { ::std::option::Option::Some(chip::Chip::Bt(v)) => v, _ => panic!(), } } else { chip::Bluetooth::new() } } // .netsim.model.Chip.BleBeacon ble_beacon = 9; pub fn ble_beacon(&self) -> &chip::BleBeacon { match self.chip { ::std::option::Option::Some(chip::Chip::BleBeacon(ref v)) => v, _ => ::default_instance(), } } pub fn clear_ble_beacon(&mut self) { self.chip = ::std::option::Option::None; } pub fn has_ble_beacon(&self) -> bool { match self.chip { ::std::option::Option::Some(chip::Chip::BleBeacon(..)) => true, _ => false, } } // Param is passed by value, moved pub fn set_ble_beacon(&mut self, v: chip::BleBeacon) { self.chip = ::std::option::Option::Some(chip::Chip::BleBeacon(v)) } // Mutable pointer to the field. pub fn mut_ble_beacon(&mut self) -> &mut chip::BleBeacon { if let ::std::option::Option::Some(chip::Chip::BleBeacon(_)) = self.chip { } else { self.chip = ::std::option::Option::Some(chip::Chip::BleBeacon(chip::BleBeacon::new())); } match self.chip { ::std::option::Option::Some(chip::Chip::BleBeacon(ref mut v)) => v, _ => panic!(), } } // Take field pub fn take_ble_beacon(&mut self) -> chip::BleBeacon { if self.has_ble_beacon() { match self.chip.take() { ::std::option::Option::Some(chip::Chip::BleBeacon(v)) => v, _ => panic!(), } } else { chip::BleBeacon::new() } } // .netsim.model.Chip.Radio uwb = 7; pub fn uwb(&self) -> &chip::Radio { match self.chip { ::std::option::Option::Some(chip::Chip::Uwb(ref v)) => v, _ => ::default_instance(), } } pub fn clear_uwb(&mut self) { self.chip = ::std::option::Option::None; } pub fn has_uwb(&self) -> bool { match self.chip { ::std::option::Option::Some(chip::Chip::Uwb(..)) => true, _ => false, } } // Param is passed by value, moved pub fn set_uwb(&mut self, v: chip::Radio) { self.chip = ::std::option::Option::Some(chip::Chip::Uwb(v)) } // Mutable pointer to the field. pub fn mut_uwb(&mut self) -> &mut chip::Radio { if let ::std::option::Option::Some(chip::Chip::Uwb(_)) = self.chip { } else { self.chip = ::std::option::Option::Some(chip::Chip::Uwb(chip::Radio::new())); } match self.chip { ::std::option::Option::Some(chip::Chip::Uwb(ref mut v)) => v, _ => panic!(), } } // Take field pub fn take_uwb(&mut self) -> chip::Radio { if self.has_uwb() { match self.chip.take() { ::std::option::Option::Some(chip::Chip::Uwb(v)) => v, _ => panic!(), } } else { chip::Radio::new() } } // .netsim.model.Chip.Radio wifi = 8; pub fn wifi(&self) -> &chip::Radio { match self.chip { ::std::option::Option::Some(chip::Chip::Wifi(ref v)) => v, _ => ::default_instance(), } } pub fn clear_wifi(&mut self) { self.chip = ::std::option::Option::None; } pub fn has_wifi(&self) -> bool { match self.chip { ::std::option::Option::Some(chip::Chip::Wifi(..)) => true, _ => false, } } // Param is passed by value, moved pub fn set_wifi(&mut self, v: chip::Radio) { self.chip = ::std::option::Option::Some(chip::Chip::Wifi(v)) } // Mutable pointer to the field. pub fn mut_wifi(&mut self) -> &mut chip::Radio { if let ::std::option::Option::Some(chip::Chip::Wifi(_)) = self.chip { } else { self.chip = ::std::option::Option::Some(chip::Chip::Wifi(chip::Radio::new())); } match self.chip { ::std::option::Option::Some(chip::Chip::Wifi(ref mut v)) => v, _ => panic!(), } } // Take field pub fn take_wifi(&mut self) -> chip::Radio { if self.has_wifi() { match self.chip.take() { ::std::option::Option::Some(chip::Chip::Wifi(v)) => v, _ => panic!(), } } else { chip::Radio::new() } } fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData { let mut fields = ::std::vec::Vec::with_capacity(9); let mut oneofs = ::std::vec::Vec::with_capacity(1); fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>( "kind", |m: &Chip| { &m.kind }, |m: &mut Chip| { &mut m.kind }, )); fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>( "id", |m: &Chip| { &m.id }, |m: &mut Chip| { &mut m.id }, )); fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>( "name", |m: &Chip| { &m.name }, |m: &mut Chip| { &mut m.name }, )); fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>( "manufacturer", |m: &Chip| { &m.manufacturer }, |m: &mut Chip| { &mut m.manufacturer }, )); fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>( "product_name", |m: &Chip| { &m.product_name }, |m: &mut Chip| { &mut m.product_name }, )); fields.push(::protobuf::reflect::rt::v2::make_oneof_message_has_get_mut_set_accessor::<_, chip::Bluetooth>( "bt", Chip::has_bt, Chip::bt, Chip::mut_bt, Chip::set_bt, )); fields.push(::protobuf::reflect::rt::v2::make_oneof_message_has_get_mut_set_accessor::<_, chip::BleBeacon>( "ble_beacon", Chip::has_ble_beacon, Chip::ble_beacon, Chip::mut_ble_beacon, Chip::set_ble_beacon, )); fields.push(::protobuf::reflect::rt::v2::make_oneof_message_has_get_mut_set_accessor::<_, chip::Radio>( "uwb", Chip::has_uwb, Chip::uwb, Chip::mut_uwb, Chip::set_uwb, )); fields.push(::protobuf::reflect::rt::v2::make_oneof_message_has_get_mut_set_accessor::<_, chip::Radio>( "wifi", Chip::has_wifi, Chip::wifi, Chip::mut_wifi, Chip::set_wifi, )); oneofs.push(chip::Chip::generated_oneof_descriptor_data()); ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::( "Chip", fields, oneofs, ) } } impl ::protobuf::Message for Chip { const NAME: &'static str = "Chip"; fn is_initialized(&self) -> bool { true } fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { while let Some(tag) = is.read_raw_tag_or_eof()? { match tag { 8 => { self.kind = is.read_enum_or_unknown()?; }, 16 => { self.id = is.read_uint32()?; }, 26 => { self.name = is.read_string()?; }, 34 => { self.manufacturer = is.read_string()?; }, 42 => { self.product_name = is.read_string()?; }, 50 => { self.chip = ::std::option::Option::Some(chip::Chip::Bt(is.read_message()?)); }, 74 => { self.chip = ::std::option::Option::Some(chip::Chip::BleBeacon(is.read_message()?)); }, 58 => { self.chip = ::std::option::Option::Some(chip::Chip::Uwb(is.read_message()?)); }, 66 => { self.chip = ::std::option::Option::Some(chip::Chip::Wifi(is.read_message()?)); }, tag => { ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; }, }; } ::std::result::Result::Ok(()) } // Compute sizes of nested messages #[allow(unused_variables)] fn compute_size(&self) -> u64 { let mut my_size = 0; if self.kind != ::protobuf::EnumOrUnknown::new(super::common::ChipKind::UNSPECIFIED) { my_size += ::protobuf::rt::int32_size(1, self.kind.value()); } if self.id != 0 { my_size += ::protobuf::rt::uint32_size(2, self.id); } if !self.name.is_empty() { my_size += ::protobuf::rt::string_size(3, &self.name); } if !self.manufacturer.is_empty() { my_size += ::protobuf::rt::string_size(4, &self.manufacturer); } if !self.product_name.is_empty() { my_size += ::protobuf::rt::string_size(5, &self.product_name); } if let ::std::option::Option::Some(ref v) = self.chip { match v { &chip::Chip::Bt(ref v) => { let len = v.compute_size(); my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len; }, &chip::Chip::BleBeacon(ref v) => { let len = v.compute_size(); my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len; }, &chip::Chip::Uwb(ref v) => { let len = v.compute_size(); my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len; }, &chip::Chip::Wifi(ref v) => { let len = v.compute_size(); my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len; }, }; } my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); self.special_fields.cached_size().set(my_size as u32); my_size } fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { if self.kind != ::protobuf::EnumOrUnknown::new(super::common::ChipKind::UNSPECIFIED) { os.write_enum(1, ::protobuf::EnumOrUnknown::value(&self.kind))?; } if self.id != 0 { os.write_uint32(2, self.id)?; } if !self.name.is_empty() { os.write_string(3, &self.name)?; } if !self.manufacturer.is_empty() { os.write_string(4, &self.manufacturer)?; } if !self.product_name.is_empty() { os.write_string(5, &self.product_name)?; } if let ::std::option::Option::Some(ref v) = self.chip { match v { &chip::Chip::Bt(ref v) => { ::protobuf::rt::write_message_field_with_cached_size(6, v, os)?; }, &chip::Chip::BleBeacon(ref v) => { ::protobuf::rt::write_message_field_with_cached_size(9, v, os)?; }, &chip::Chip::Uwb(ref v) => { ::protobuf::rt::write_message_field_with_cached_size(7, v, os)?; }, &chip::Chip::Wifi(ref v) => { ::protobuf::rt::write_message_field_with_cached_size(8, v, os)?; }, }; } os.write_unknown_fields(self.special_fields.unknown_fields())?; ::std::result::Result::Ok(()) } fn special_fields(&self) -> &::protobuf::SpecialFields { &self.special_fields } fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { &mut self.special_fields } fn new() -> Chip { Chip::new() } fn clear(&mut self) { self.kind = ::protobuf::EnumOrUnknown::new(super::common::ChipKind::UNSPECIFIED); self.id = 0; self.name.clear(); self.manufacturer.clear(); self.product_name.clear(); self.chip = ::std::option::Option::None; self.chip = ::std::option::Option::None; self.chip = ::std::option::Option::None; self.chip = ::std::option::Option::None; self.special_fields.clear(); } fn default_instance() -> &'static Chip { static instance: Chip = Chip { kind: ::protobuf::EnumOrUnknown::from_i32(0), id: 0, name: ::std::string::String::new(), manufacturer: ::std::string::String::new(), product_name: ::std::string::String::new(), chip: ::std::option::Option::None, special_fields: ::protobuf::SpecialFields::new(), }; &instance } } impl ::protobuf::MessageFull for Chip { fn descriptor() -> ::protobuf::reflect::MessageDescriptor { static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new(); descriptor.get(|| file_descriptor().message_by_package_relative_name("Chip").unwrap()).clone() } } impl ::std::fmt::Display for Chip { fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { ::protobuf::text_format::fmt(self, f) } } impl ::protobuf::reflect::ProtobufValue for Chip { type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage; } /// Nested message and enums of message `Chip` pub mod chip { #[derive(Clone,PartialEq,Debug)] #[non_exhaustive] // @@protoc_insertion_point(oneof:netsim.model.Chip.chip) pub enum Chip { // @@protoc_insertion_point(oneof_field:netsim.model.Chip.bt) Bt(Bluetooth), // @@protoc_insertion_point(oneof_field:netsim.model.Chip.ble_beacon) BleBeacon(BleBeacon), // @@protoc_insertion_point(oneof_field:netsim.model.Chip.uwb) Uwb(Radio), // @@protoc_insertion_point(oneof_field:netsim.model.Chip.wifi) Wifi(Radio), } impl ::protobuf::Oneof for Chip { } impl ::protobuf::OneofFull for Chip { fn descriptor() -> ::protobuf::reflect::OneofDescriptor { static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::OneofDescriptor> = ::protobuf::rt::Lazy::new(); descriptor.get(|| ::descriptor().oneof_by_name("chip").unwrap()).clone() } } impl Chip { pub(in super) fn generated_oneof_descriptor_data() -> ::protobuf::reflect::GeneratedOneofDescriptorData { ::protobuf::reflect::GeneratedOneofDescriptorData::new::("chip") } } #[derive(PartialEq,Clone,Default,Debug)] // @@protoc_insertion_point(message:netsim.model.Chip.Radio) pub struct Radio { // message fields // @@protoc_insertion_point(field:netsim.model.Chip.Radio.state) pub state: ::std::option::Option, // @@protoc_insertion_point(field:netsim.model.Chip.Radio.range) pub range: f32, // @@protoc_insertion_point(field:netsim.model.Chip.Radio.tx_count) pub tx_count: i32, // @@protoc_insertion_point(field:netsim.model.Chip.Radio.rx_count) pub rx_count: i32, // special fields // @@protoc_insertion_point(special_field:netsim.model.Chip.Radio.special_fields) pub special_fields: ::protobuf::SpecialFields, } impl<'a> ::std::default::Default for &'a Radio { fn default() -> &'a Radio { ::default_instance() } } impl Radio { pub fn new() -> Radio { ::std::default::Default::default() } pub(in super) fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData { let mut fields = ::std::vec::Vec::with_capacity(4); let mut oneofs = ::std::vec::Vec::with_capacity(0); fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( "state", |m: &Radio| { &m.state }, |m: &mut Radio| { &mut m.state }, )); fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>( "range", |m: &Radio| { &m.range }, |m: &mut Radio| { &mut m.range }, )); fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>( "tx_count", |m: &Radio| { &m.tx_count }, |m: &mut Radio| { &mut m.tx_count }, )); fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>( "rx_count", |m: &Radio| { &m.rx_count }, |m: &mut Radio| { &mut m.rx_count }, )); ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::( "Chip.Radio", fields, oneofs, ) } } impl ::protobuf::Message for Radio { const NAME: &'static str = "Radio"; fn is_initialized(&self) -> bool { true } fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { while let Some(tag) = is.read_raw_tag_or_eof()? { match tag { 8 => { self.state = ::std::option::Option::Some(is.read_bool()?); }, 21 => { self.range = is.read_float()?; }, 24 => { self.tx_count = is.read_int32()?; }, 32 => { self.rx_count = is.read_int32()?; }, tag => { ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; }, }; } ::std::result::Result::Ok(()) } // Compute sizes of nested messages #[allow(unused_variables)] fn compute_size(&self) -> u64 { let mut my_size = 0; if let Some(v) = self.state { my_size += 1 + 1; } if self.range != 0. { my_size += 1 + 4; } if self.tx_count != 0 { my_size += ::protobuf::rt::int32_size(3, self.tx_count); } if self.rx_count != 0 { my_size += ::protobuf::rt::int32_size(4, self.rx_count); } my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); self.special_fields.cached_size().set(my_size as u32); my_size } fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { if let Some(v) = self.state { os.write_bool(1, v)?; } if self.range != 0. { os.write_float(2, self.range)?; } if self.tx_count != 0 { os.write_int32(3, self.tx_count)?; } if self.rx_count != 0 { os.write_int32(4, self.rx_count)?; } os.write_unknown_fields(self.special_fields.unknown_fields())?; ::std::result::Result::Ok(()) } fn special_fields(&self) -> &::protobuf::SpecialFields { &self.special_fields } fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { &mut self.special_fields } fn new() -> Radio { Radio::new() } fn clear(&mut self) { self.state = ::std::option::Option::None; self.range = 0.; self.tx_count = 0; self.rx_count = 0; self.special_fields.clear(); } fn default_instance() -> &'static Radio { static instance: Radio = Radio { state: ::std::option::Option::None, range: 0., tx_count: 0, rx_count: 0, special_fields: ::protobuf::SpecialFields::new(), }; &instance } } impl ::protobuf::MessageFull for Radio { fn descriptor() -> ::protobuf::reflect::MessageDescriptor { static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new(); descriptor.get(|| super::file_descriptor().message_by_package_relative_name("Chip.Radio").unwrap()).clone() } } impl ::std::fmt::Display for Radio { fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { ::protobuf::text_format::fmt(self, f) } } impl ::protobuf::reflect::ProtobufValue for Radio { type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage; } #[derive(PartialEq,Clone,Default,Debug)] // @@protoc_insertion_point(message:netsim.model.Chip.Bluetooth) pub struct Bluetooth { // message fields // @@protoc_insertion_point(field:netsim.model.Chip.Bluetooth.low_energy) pub low_energy: ::protobuf::MessageField, // @@protoc_insertion_point(field:netsim.model.Chip.Bluetooth.classic) pub classic: ::protobuf::MessageField, // @@protoc_insertion_point(field:netsim.model.Chip.Bluetooth.address) pub address: ::std::string::String, // @@protoc_insertion_point(field:netsim.model.Chip.Bluetooth.bt_properties) pub bt_properties: ::protobuf::MessageField, // special fields // @@protoc_insertion_point(special_field:netsim.model.Chip.Bluetooth.special_fields) pub special_fields: ::protobuf::SpecialFields, } impl<'a> ::std::default::Default for &'a Bluetooth { fn default() -> &'a Bluetooth { ::default_instance() } } impl Bluetooth { pub fn new() -> Bluetooth { ::std::default::Default::default() } pub(in super) fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData { let mut fields = ::std::vec::Vec::with_capacity(4); let mut oneofs = ::std::vec::Vec::with_capacity(0); fields.push(::protobuf::reflect::rt::v2::make_message_field_accessor::<_, Radio>( "low_energy", |m: &Bluetooth| { &m.low_energy }, |m: &mut Bluetooth| { &mut m.low_energy }, )); fields.push(::protobuf::reflect::rt::v2::make_message_field_accessor::<_, Radio>( "classic", |m: &Bluetooth| { &m.classic }, |m: &mut Bluetooth| { &mut m.classic }, )); fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>( "address", |m: &Bluetooth| { &m.address }, |m: &mut Bluetooth| { &mut m.address }, )); fields.push(::protobuf::reflect::rt::v2::make_message_field_accessor::<_, super::super::configuration::Controller>( "bt_properties", |m: &Bluetooth| { &m.bt_properties }, |m: &mut Bluetooth| { &mut m.bt_properties }, )); ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::( "Chip.Bluetooth", fields, oneofs, ) } } impl ::protobuf::Message for Bluetooth { const NAME: &'static str = "Bluetooth"; fn is_initialized(&self) -> bool { true } fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { while let Some(tag) = is.read_raw_tag_or_eof()? { match tag { 10 => { ::protobuf::rt::read_singular_message_into_field(is, &mut self.low_energy)?; }, 18 => { ::protobuf::rt::read_singular_message_into_field(is, &mut self.classic)?; }, 26 => { self.address = is.read_string()?; }, 34 => { ::protobuf::rt::read_singular_message_into_field(is, &mut self.bt_properties)?; }, tag => { ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; }, }; } ::std::result::Result::Ok(()) } // Compute sizes of nested messages #[allow(unused_variables)] fn compute_size(&self) -> u64 { let mut my_size = 0; if let Some(v) = self.low_energy.as_ref() { let len = v.compute_size(); my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len; } if let Some(v) = self.classic.as_ref() { let len = v.compute_size(); my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len; } if !self.address.is_empty() { my_size += ::protobuf::rt::string_size(3, &self.address); } if let Some(v) = self.bt_properties.as_ref() { let len = v.compute_size(); my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len; } my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); self.special_fields.cached_size().set(my_size as u32); my_size } fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { if let Some(v) = self.low_energy.as_ref() { ::protobuf::rt::write_message_field_with_cached_size(1, v, os)?; } if let Some(v) = self.classic.as_ref() { ::protobuf::rt::write_message_field_with_cached_size(2, v, os)?; } if !self.address.is_empty() { os.write_string(3, &self.address)?; } if let Some(v) = self.bt_properties.as_ref() { ::protobuf::rt::write_message_field_with_cached_size(4, v, os)?; } os.write_unknown_fields(self.special_fields.unknown_fields())?; ::std::result::Result::Ok(()) } fn special_fields(&self) -> &::protobuf::SpecialFields { &self.special_fields } fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { &mut self.special_fields } fn new() -> Bluetooth { Bluetooth::new() } fn clear(&mut self) { self.low_energy.clear(); self.classic.clear(); self.address.clear(); self.bt_properties.clear(); self.special_fields.clear(); } fn default_instance() -> &'static Bluetooth { static instance: Bluetooth = Bluetooth { low_energy: ::protobuf::MessageField::none(), classic: ::protobuf::MessageField::none(), address: ::std::string::String::new(), bt_properties: ::protobuf::MessageField::none(), special_fields: ::protobuf::SpecialFields::new(), }; &instance } } impl ::protobuf::MessageFull for Bluetooth { fn descriptor() -> ::protobuf::reflect::MessageDescriptor { static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new(); descriptor.get(|| super::file_descriptor().message_by_package_relative_name("Chip.Bluetooth").unwrap()).clone() } } impl ::std::fmt::Display for Bluetooth { fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { ::protobuf::text_format::fmt(self, f) } } impl ::protobuf::reflect::ProtobufValue for Bluetooth { type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage; } #[derive(PartialEq,Clone,Default,Debug)] // @@protoc_insertion_point(message:netsim.model.Chip.BleBeacon) pub struct BleBeacon { // message fields // @@protoc_insertion_point(field:netsim.model.Chip.BleBeacon.bt) pub bt: ::protobuf::MessageField, // @@protoc_insertion_point(field:netsim.model.Chip.BleBeacon.address) pub address: ::std::string::String, // @@protoc_insertion_point(field:netsim.model.Chip.BleBeacon.settings) pub settings: ::protobuf::MessageField, // @@protoc_insertion_point(field:netsim.model.Chip.BleBeacon.adv_data) pub adv_data: ::protobuf::MessageField, // @@protoc_insertion_point(field:netsim.model.Chip.BleBeacon.scan_response) pub scan_response: ::protobuf::MessageField, // special fields // @@protoc_insertion_point(special_field:netsim.model.Chip.BleBeacon.special_fields) pub special_fields: ::protobuf::SpecialFields, } impl<'a> ::std::default::Default for &'a BleBeacon { fn default() -> &'a BleBeacon { ::default_instance() } } impl BleBeacon { pub fn new() -> BleBeacon { ::std::default::Default::default() } pub(in super) fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData { let mut fields = ::std::vec::Vec::with_capacity(5); let mut oneofs = ::std::vec::Vec::with_capacity(0); fields.push(::protobuf::reflect::rt::v2::make_message_field_accessor::<_, Bluetooth>( "bt", |m: &BleBeacon| { &m.bt }, |m: &mut BleBeacon| { &mut m.bt }, )); fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>( "address", |m: &BleBeacon| { &m.address }, |m: &mut BleBeacon| { &mut m.address }, )); fields.push(::protobuf::reflect::rt::v2::make_message_field_accessor::<_, ble_beacon::AdvertiseSettings>( "settings", |m: &BleBeacon| { &m.settings }, |m: &mut BleBeacon| { &mut m.settings }, )); fields.push(::protobuf::reflect::rt::v2::make_message_field_accessor::<_, ble_beacon::AdvertiseData>( "adv_data", |m: &BleBeacon| { &m.adv_data }, |m: &mut BleBeacon| { &mut m.adv_data }, )); fields.push(::protobuf::reflect::rt::v2::make_message_field_accessor::<_, ble_beacon::AdvertiseData>( "scan_response", |m: &BleBeacon| { &m.scan_response }, |m: &mut BleBeacon| { &mut m.scan_response }, )); ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::( "Chip.BleBeacon", fields, oneofs, ) } } impl ::protobuf::Message for BleBeacon { const NAME: &'static str = "BleBeacon"; fn is_initialized(&self) -> bool { true } fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { while let Some(tag) = is.read_raw_tag_or_eof()? { match tag { 10 => { ::protobuf::rt::read_singular_message_into_field(is, &mut self.bt)?; }, 18 => { self.address = is.read_string()?; }, 26 => { ::protobuf::rt::read_singular_message_into_field(is, &mut self.settings)?; }, 34 => { ::protobuf::rt::read_singular_message_into_field(is, &mut self.adv_data)?; }, 42 => { ::protobuf::rt::read_singular_message_into_field(is, &mut self.scan_response)?; }, tag => { ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; }, }; } ::std::result::Result::Ok(()) } // Compute sizes of nested messages #[allow(unused_variables)] fn compute_size(&self) -> u64 { let mut my_size = 0; if let Some(v) = self.bt.as_ref() { let len = v.compute_size(); my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len; } if !self.address.is_empty() { my_size += ::protobuf::rt::string_size(2, &self.address); } if let Some(v) = self.settings.as_ref() { let len = v.compute_size(); my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len; } if let Some(v) = self.adv_data.as_ref() { let len = v.compute_size(); my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len; } if let Some(v) = self.scan_response.as_ref() { let len = v.compute_size(); my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len; } my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); self.special_fields.cached_size().set(my_size as u32); my_size } fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { if let Some(v) = self.bt.as_ref() { ::protobuf::rt::write_message_field_with_cached_size(1, v, os)?; } if !self.address.is_empty() { os.write_string(2, &self.address)?; } if let Some(v) = self.settings.as_ref() { ::protobuf::rt::write_message_field_with_cached_size(3, v, os)?; } if let Some(v) = self.adv_data.as_ref() { ::protobuf::rt::write_message_field_with_cached_size(4, v, os)?; } if let Some(v) = self.scan_response.as_ref() { ::protobuf::rt::write_message_field_with_cached_size(5, v, os)?; } os.write_unknown_fields(self.special_fields.unknown_fields())?; ::std::result::Result::Ok(()) } fn special_fields(&self) -> &::protobuf::SpecialFields { &self.special_fields } fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { &mut self.special_fields } fn new() -> BleBeacon { BleBeacon::new() } fn clear(&mut self) { self.bt.clear(); self.address.clear(); self.settings.clear(); self.adv_data.clear(); self.scan_response.clear(); self.special_fields.clear(); } fn default_instance() -> &'static BleBeacon { static instance: BleBeacon = BleBeacon { bt: ::protobuf::MessageField::none(), address: ::std::string::String::new(), settings: ::protobuf::MessageField::none(), adv_data: ::protobuf::MessageField::none(), scan_response: ::protobuf::MessageField::none(), special_fields: ::protobuf::SpecialFields::new(), }; &instance } } impl ::protobuf::MessageFull for BleBeacon { fn descriptor() -> ::protobuf::reflect::MessageDescriptor { static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new(); descriptor.get(|| super::file_descriptor().message_by_package_relative_name("Chip.BleBeacon").unwrap()).clone() } } impl ::std::fmt::Display for BleBeacon { fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { ::protobuf::text_format::fmt(self, f) } } impl ::protobuf::reflect::ProtobufValue for BleBeacon { type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage; } /// Nested message and enums of message `BleBeacon` pub mod ble_beacon { #[derive(PartialEq,Clone,Default,Debug)] // @@protoc_insertion_point(message:netsim.model.Chip.BleBeacon.AdvertiseSettings) pub struct AdvertiseSettings { // message fields // @@protoc_insertion_point(field:netsim.model.Chip.BleBeacon.AdvertiseSettings.scannable) pub scannable: bool, // @@protoc_insertion_point(field:netsim.model.Chip.BleBeacon.AdvertiseSettings.timeout) pub timeout: u64, // message oneof groups pub interval: ::std::option::Option, pub tx_power: ::std::option::Option, // special fields // @@protoc_insertion_point(special_field:netsim.model.Chip.BleBeacon.AdvertiseSettings.special_fields) pub special_fields: ::protobuf::SpecialFields, } impl<'a> ::std::default::Default for &'a AdvertiseSettings { fn default() -> &'a AdvertiseSettings { ::default_instance() } } impl AdvertiseSettings { pub fn new() -> AdvertiseSettings { ::std::default::Default::default() } // .netsim.model.Chip.BleBeacon.AdvertiseSettings.AdvertiseMode advertise_mode = 1; pub fn advertise_mode(&self) -> advertise_settings::AdvertiseMode { match self.interval { ::std::option::Option::Some(advertise_settings::Interval::AdvertiseMode(v)) => ::protobuf::EnumOrUnknown::enum_value_or_default(&v), _ => advertise_settings::AdvertiseMode::LOW_POWER, } } pub fn clear_advertise_mode(&mut self) { self.interval = ::std::option::Option::None; } pub fn has_advertise_mode(&self) -> bool { match self.interval { ::std::option::Option::Some(advertise_settings::Interval::AdvertiseMode(..)) => true, _ => false, } } // Param is passed by value, moved pub fn set_advertise_mode(&mut self, v: advertise_settings::AdvertiseMode) { self.interval = ::std::option::Option::Some(advertise_settings::Interval::AdvertiseMode(::protobuf::EnumOrUnknown::new(v))) } // uint64 milliseconds = 2; pub fn milliseconds(&self) -> u64 { match self.interval { ::std::option::Option::Some(advertise_settings::Interval::Milliseconds(v)) => v, _ => 0, } } pub fn clear_milliseconds(&mut self) { self.interval = ::std::option::Option::None; } pub fn has_milliseconds(&self) -> bool { match self.interval { ::std::option::Option::Some(advertise_settings::Interval::Milliseconds(..)) => true, _ => false, } } // Param is passed by value, moved pub fn set_milliseconds(&mut self, v: u64) { self.interval = ::std::option::Option::Some(advertise_settings::Interval::Milliseconds(v)) } // .netsim.model.Chip.BleBeacon.AdvertiseSettings.AdvertiseTxPower tx_power_level = 3; pub fn tx_power_level(&self) -> advertise_settings::AdvertiseTxPower { match self.tx_power { ::std::option::Option::Some(advertise_settings::Tx_power::TxPowerLevel(v)) => ::protobuf::EnumOrUnknown::enum_value_or_default(&v), _ => advertise_settings::AdvertiseTxPower::ULTRA_LOW, } } pub fn clear_tx_power_level(&mut self) { self.tx_power = ::std::option::Option::None; } pub fn has_tx_power_level(&self) -> bool { match self.tx_power { ::std::option::Option::Some(advertise_settings::Tx_power::TxPowerLevel(..)) => true, _ => false, } } // Param is passed by value, moved pub fn set_tx_power_level(&mut self, v: advertise_settings::AdvertiseTxPower) { self.tx_power = ::std::option::Option::Some(advertise_settings::Tx_power::TxPowerLevel(::protobuf::EnumOrUnknown::new(v))) } // int32 dbm = 4; pub fn dbm(&self) -> i32 { match self.tx_power { ::std::option::Option::Some(advertise_settings::Tx_power::Dbm(v)) => v, _ => 0, } } pub fn clear_dbm(&mut self) { self.tx_power = ::std::option::Option::None; } pub fn has_dbm(&self) -> bool { match self.tx_power { ::std::option::Option::Some(advertise_settings::Tx_power::Dbm(..)) => true, _ => false, } } // Param is passed by value, moved pub fn set_dbm(&mut self, v: i32) { self.tx_power = ::std::option::Option::Some(advertise_settings::Tx_power::Dbm(v)) } pub(in super::super) fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData { let mut fields = ::std::vec::Vec::with_capacity(6); let mut oneofs = ::std::vec::Vec::with_capacity(2); fields.push(::protobuf::reflect::rt::v2::make_oneof_enum_accessors::<_, _>( "advertise_mode", |message: &AdvertiseSettings| match &message.interval { ::std::option::Option::Some(advertise_settings::Interval::AdvertiseMode(e)) => ::std::option::Option::Some(*e), _ => ::std::option::Option::None, }, |message: &mut AdvertiseSettings, e: ::protobuf::EnumOrUnknown| { message.interval = ::std::option::Option::Some(advertise_settings::Interval::AdvertiseMode(e)); }, advertise_settings::AdvertiseMode::LOW_POWER, )); fields.push(::protobuf::reflect::rt::v2::make_oneof_copy_has_get_set_simpler_accessors::<_, _>( "milliseconds", AdvertiseSettings::has_milliseconds, AdvertiseSettings::milliseconds, AdvertiseSettings::set_milliseconds, )); fields.push(::protobuf::reflect::rt::v2::make_oneof_enum_accessors::<_, _>( "tx_power_level", |message: &AdvertiseSettings| match &message.tx_power { ::std::option::Option::Some(advertise_settings::Tx_power::TxPowerLevel(e)) => ::std::option::Option::Some(*e), _ => ::std::option::Option::None, }, |message: &mut AdvertiseSettings, e: ::protobuf::EnumOrUnknown| { message.tx_power = ::std::option::Option::Some(advertise_settings::Tx_power::TxPowerLevel(e)); }, advertise_settings::AdvertiseTxPower::ULTRA_LOW, )); fields.push(::protobuf::reflect::rt::v2::make_oneof_copy_has_get_set_simpler_accessors::<_, _>( "dbm", AdvertiseSettings::has_dbm, AdvertiseSettings::dbm, AdvertiseSettings::set_dbm, )); fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>( "scannable", |m: &AdvertiseSettings| { &m.scannable }, |m: &mut AdvertiseSettings| { &mut m.scannable }, )); fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>( "timeout", |m: &AdvertiseSettings| { &m.timeout }, |m: &mut AdvertiseSettings| { &mut m.timeout }, )); oneofs.push(advertise_settings::Interval::generated_oneof_descriptor_data()); oneofs.push(advertise_settings::Tx_power::generated_oneof_descriptor_data()); ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::( "Chip.BleBeacon.AdvertiseSettings", fields, oneofs, ) } } impl ::protobuf::Message for AdvertiseSettings { const NAME: &'static str = "AdvertiseSettings"; fn is_initialized(&self) -> bool { true } fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { while let Some(tag) = is.read_raw_tag_or_eof()? { match tag { 8 => { self.interval = ::std::option::Option::Some(advertise_settings::Interval::AdvertiseMode(is.read_enum_or_unknown()?)); }, 16 => { self.interval = ::std::option::Option::Some(advertise_settings::Interval::Milliseconds(is.read_uint64()?)); }, 24 => { self.tx_power = ::std::option::Option::Some(advertise_settings::Tx_power::TxPowerLevel(is.read_enum_or_unknown()?)); }, 32 => { self.tx_power = ::std::option::Option::Some(advertise_settings::Tx_power::Dbm(is.read_int32()?)); }, 40 => { self.scannable = is.read_bool()?; }, 48 => { self.timeout = is.read_uint64()?; }, tag => { ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; }, }; } ::std::result::Result::Ok(()) } // Compute sizes of nested messages #[allow(unused_variables)] fn compute_size(&self) -> u64 { let mut my_size = 0; if self.scannable != false { my_size += 1 + 1; } if self.timeout != 0 { my_size += ::protobuf::rt::uint64_size(6, self.timeout); } if let ::std::option::Option::Some(ref v) = self.interval { match v { &advertise_settings::Interval::AdvertiseMode(v) => { my_size += ::protobuf::rt::int32_size(1, v.value()); }, &advertise_settings::Interval::Milliseconds(v) => { my_size += ::protobuf::rt::uint64_size(2, v); }, }; } if let ::std::option::Option::Some(ref v) = self.tx_power { match v { &advertise_settings::Tx_power::TxPowerLevel(v) => { my_size += ::protobuf::rt::int32_size(3, v.value()); }, &advertise_settings::Tx_power::Dbm(v) => { my_size += ::protobuf::rt::int32_size(4, v); }, }; } my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); self.special_fields.cached_size().set(my_size as u32); my_size } fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { if self.scannable != false { os.write_bool(5, self.scannable)?; } if self.timeout != 0 { os.write_uint64(6, self.timeout)?; } if let ::std::option::Option::Some(ref v) = self.interval { match v { &advertise_settings::Interval::AdvertiseMode(v) => { os.write_enum(1, ::protobuf::EnumOrUnknown::value(&v))?; }, &advertise_settings::Interval::Milliseconds(v) => { os.write_uint64(2, v)?; }, }; } if let ::std::option::Option::Some(ref v) = self.tx_power { match v { &advertise_settings::Tx_power::TxPowerLevel(v) => { os.write_enum(3, ::protobuf::EnumOrUnknown::value(&v))?; }, &advertise_settings::Tx_power::Dbm(v) => { os.write_int32(4, v)?; }, }; } os.write_unknown_fields(self.special_fields.unknown_fields())?; ::std::result::Result::Ok(()) } fn special_fields(&self) -> &::protobuf::SpecialFields { &self.special_fields } fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { &mut self.special_fields } fn new() -> AdvertiseSettings { AdvertiseSettings::new() } fn clear(&mut self) { self.interval = ::std::option::Option::None; self.interval = ::std::option::Option::None; self.tx_power = ::std::option::Option::None; self.tx_power = ::std::option::Option::None; self.scannable = false; self.timeout = 0; self.special_fields.clear(); } fn default_instance() -> &'static AdvertiseSettings { static instance: AdvertiseSettings = AdvertiseSettings { scannable: false, timeout: 0, interval: ::std::option::Option::None, tx_power: ::std::option::Option::None, special_fields: ::protobuf::SpecialFields::new(), }; &instance } } impl ::protobuf::MessageFull for AdvertiseSettings { fn descriptor() -> ::protobuf::reflect::MessageDescriptor { static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new(); descriptor.get(|| super::super::file_descriptor().message_by_package_relative_name("Chip.BleBeacon.AdvertiseSettings").unwrap()).clone() } } impl ::std::fmt::Display for AdvertiseSettings { fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { ::protobuf::text_format::fmt(self, f) } } impl ::protobuf::reflect::ProtobufValue for AdvertiseSettings { type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage; } /// Nested message and enums of message `AdvertiseSettings` pub mod advertise_settings { #[derive(Clone,PartialEq,Debug)] #[non_exhaustive] // @@protoc_insertion_point(oneof:netsim.model.Chip.BleBeacon.AdvertiseSettings.interval) pub enum Interval { // @@protoc_insertion_point(oneof_field:netsim.model.Chip.BleBeacon.AdvertiseSettings.advertise_mode) AdvertiseMode(::protobuf::EnumOrUnknown), // @@protoc_insertion_point(oneof_field:netsim.model.Chip.BleBeacon.AdvertiseSettings.milliseconds) Milliseconds(u64), } impl ::protobuf::Oneof for Interval { } impl ::protobuf::OneofFull for Interval { fn descriptor() -> ::protobuf::reflect::OneofDescriptor { static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::OneofDescriptor> = ::protobuf::rt::Lazy::new(); descriptor.get(|| ::descriptor().oneof_by_name("interval").unwrap()).clone() } } impl Interval { pub(in super::super::super) fn generated_oneof_descriptor_data() -> ::protobuf::reflect::GeneratedOneofDescriptorData { ::protobuf::reflect::GeneratedOneofDescriptorData::new::("interval") } } #[derive(Clone,PartialEq,Debug)] #[non_exhaustive] // @@protoc_insertion_point(oneof:netsim.model.Chip.BleBeacon.AdvertiseSettings.tx_power) pub enum Tx_power { // @@protoc_insertion_point(oneof_field:netsim.model.Chip.BleBeacon.AdvertiseSettings.tx_power_level) TxPowerLevel(::protobuf::EnumOrUnknown), // @@protoc_insertion_point(oneof_field:netsim.model.Chip.BleBeacon.AdvertiseSettings.dbm) Dbm(i32), } impl ::protobuf::Oneof for Tx_power { } impl ::protobuf::OneofFull for Tx_power { fn descriptor() -> ::protobuf::reflect::OneofDescriptor { static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::OneofDescriptor> = ::protobuf::rt::Lazy::new(); descriptor.get(|| ::descriptor().oneof_by_name("tx_power").unwrap()).clone() } } impl Tx_power { pub(in super::super::super) fn generated_oneof_descriptor_data() -> ::protobuf::reflect::GeneratedOneofDescriptorData { ::protobuf::reflect::GeneratedOneofDescriptorData::new::("tx_power") } } #[derive(Clone,Copy,PartialEq,Eq,Debug,Hash)] // @@protoc_insertion_point(enum:netsim.model.Chip.BleBeacon.AdvertiseSettings.AdvertiseMode) pub enum AdvertiseMode { // @@protoc_insertion_point(enum_value:netsim.model.Chip.BleBeacon.AdvertiseSettings.AdvertiseMode.LOW_POWER) LOW_POWER = 0, // @@protoc_insertion_point(enum_value:netsim.model.Chip.BleBeacon.AdvertiseSettings.AdvertiseMode.BALANCED) BALANCED = 1, // @@protoc_insertion_point(enum_value:netsim.model.Chip.BleBeacon.AdvertiseSettings.AdvertiseMode.LOW_LATENCY) LOW_LATENCY = 2, } impl ::protobuf::Enum for AdvertiseMode { const NAME: &'static str = "AdvertiseMode"; fn value(&self) -> i32 { *self as i32 } fn from_i32(value: i32) -> ::std::option::Option { match value { 0 => ::std::option::Option::Some(AdvertiseMode::LOW_POWER), 1 => ::std::option::Option::Some(AdvertiseMode::BALANCED), 2 => ::std::option::Option::Some(AdvertiseMode::LOW_LATENCY), _ => ::std::option::Option::None } } const VALUES: &'static [AdvertiseMode] = &[ AdvertiseMode::LOW_POWER, AdvertiseMode::BALANCED, AdvertiseMode::LOW_LATENCY, ]; } impl ::protobuf::EnumFull for AdvertiseMode { fn enum_descriptor() -> ::protobuf::reflect::EnumDescriptor { static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::EnumDescriptor> = ::protobuf::rt::Lazy::new(); descriptor.get(|| super::super::super::file_descriptor().enum_by_package_relative_name("Chip.BleBeacon.AdvertiseSettings.AdvertiseMode").unwrap()).clone() } fn descriptor(&self) -> ::protobuf::reflect::EnumValueDescriptor { let index = *self as usize; Self::enum_descriptor().value_by_index(index) } } impl ::std::default::Default for AdvertiseMode { fn default() -> Self { AdvertiseMode::LOW_POWER } } impl AdvertiseMode { pub(in super::super::super) fn generated_enum_descriptor_data() -> ::protobuf::reflect::GeneratedEnumDescriptorData { ::protobuf::reflect::GeneratedEnumDescriptorData::new::("Chip.BleBeacon.AdvertiseSettings.AdvertiseMode") } } #[derive(Clone,Copy,PartialEq,Eq,Debug,Hash)] // @@protoc_insertion_point(enum:netsim.model.Chip.BleBeacon.AdvertiseSettings.AdvertiseTxPower) pub enum AdvertiseTxPower { // @@protoc_insertion_point(enum_value:netsim.model.Chip.BleBeacon.AdvertiseSettings.AdvertiseTxPower.ULTRA_LOW) ULTRA_LOW = 0, // @@protoc_insertion_point(enum_value:netsim.model.Chip.BleBeacon.AdvertiseSettings.AdvertiseTxPower.LOW) LOW = 1, // @@protoc_insertion_point(enum_value:netsim.model.Chip.BleBeacon.AdvertiseSettings.AdvertiseTxPower.MEDIUM) MEDIUM = 2, // @@protoc_insertion_point(enum_value:netsim.model.Chip.BleBeacon.AdvertiseSettings.AdvertiseTxPower.HIGH) HIGH = 3, } impl ::protobuf::Enum for AdvertiseTxPower { const NAME: &'static str = "AdvertiseTxPower"; fn value(&self) -> i32 { *self as i32 } fn from_i32(value: i32) -> ::std::option::Option { match value { 0 => ::std::option::Option::Some(AdvertiseTxPower::ULTRA_LOW), 1 => ::std::option::Option::Some(AdvertiseTxPower::LOW), 2 => ::std::option::Option::Some(AdvertiseTxPower::MEDIUM), 3 => ::std::option::Option::Some(AdvertiseTxPower::HIGH), _ => ::std::option::Option::None } } const VALUES: &'static [AdvertiseTxPower] = &[ AdvertiseTxPower::ULTRA_LOW, AdvertiseTxPower::LOW, AdvertiseTxPower::MEDIUM, AdvertiseTxPower::HIGH, ]; } impl ::protobuf::EnumFull for AdvertiseTxPower { fn enum_descriptor() -> ::protobuf::reflect::EnumDescriptor { static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::EnumDescriptor> = ::protobuf::rt::Lazy::new(); descriptor.get(|| super::super::super::file_descriptor().enum_by_package_relative_name("Chip.BleBeacon.AdvertiseSettings.AdvertiseTxPower").unwrap()).clone() } fn descriptor(&self) -> ::protobuf::reflect::EnumValueDescriptor { let index = *self as usize; Self::enum_descriptor().value_by_index(index) } } impl ::std::default::Default for AdvertiseTxPower { fn default() -> Self { AdvertiseTxPower::ULTRA_LOW } } impl AdvertiseTxPower { pub(in super::super::super) fn generated_enum_descriptor_data() -> ::protobuf::reflect::GeneratedEnumDescriptorData { ::protobuf::reflect::GeneratedEnumDescriptorData::new::("Chip.BleBeacon.AdvertiseSettings.AdvertiseTxPower") } } } #[derive(PartialEq,Clone,Default,Debug)] // @@protoc_insertion_point(message:netsim.model.Chip.BleBeacon.AdvertiseData) pub struct AdvertiseData { // message fields // @@protoc_insertion_point(field:netsim.model.Chip.BleBeacon.AdvertiseData.include_device_name) pub include_device_name: bool, // @@protoc_insertion_point(field:netsim.model.Chip.BleBeacon.AdvertiseData.include_tx_power_level) pub include_tx_power_level: bool, // @@protoc_insertion_point(field:netsim.model.Chip.BleBeacon.AdvertiseData.manufacturer_data) pub manufacturer_data: ::std::vec::Vec, // @@protoc_insertion_point(field:netsim.model.Chip.BleBeacon.AdvertiseData.services) pub services: ::std::vec::Vec, // special fields // @@protoc_insertion_point(special_field:netsim.model.Chip.BleBeacon.AdvertiseData.special_fields) pub special_fields: ::protobuf::SpecialFields, } impl<'a> ::std::default::Default for &'a AdvertiseData { fn default() -> &'a AdvertiseData { ::default_instance() } } impl AdvertiseData { pub fn new() -> AdvertiseData { ::std::default::Default::default() } pub(in super::super) fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData { let mut fields = ::std::vec::Vec::with_capacity(4); let mut oneofs = ::std::vec::Vec::with_capacity(0); fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>( "include_device_name", |m: &AdvertiseData| { &m.include_device_name }, |m: &mut AdvertiseData| { &mut m.include_device_name }, )); fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>( "include_tx_power_level", |m: &AdvertiseData| { &m.include_tx_power_level }, |m: &mut AdvertiseData| { &mut m.include_tx_power_level }, )); fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>( "manufacturer_data", |m: &AdvertiseData| { &m.manufacturer_data }, |m: &mut AdvertiseData| { &mut m.manufacturer_data }, )); fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>( "services", |m: &AdvertiseData| { &m.services }, |m: &mut AdvertiseData| { &mut m.services }, )); ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::( "Chip.BleBeacon.AdvertiseData", fields, oneofs, ) } } impl ::protobuf::Message for AdvertiseData { const NAME: &'static str = "AdvertiseData"; fn is_initialized(&self) -> bool { true } fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { while let Some(tag) = is.read_raw_tag_or_eof()? { match tag { 8 => { self.include_device_name = is.read_bool()?; }, 16 => { self.include_tx_power_level = is.read_bool()?; }, 26 => { self.manufacturer_data = is.read_bytes()?; }, 34 => { self.services.push(is.read_message()?); }, tag => { ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; }, }; } ::std::result::Result::Ok(()) } // Compute sizes of nested messages #[allow(unused_variables)] fn compute_size(&self) -> u64 { let mut my_size = 0; if self.include_device_name != false { my_size += 1 + 1; } if self.include_tx_power_level != false { my_size += 1 + 1; } if !self.manufacturer_data.is_empty() { my_size += ::protobuf::rt::bytes_size(3, &self.manufacturer_data); } for value in &self.services { let len = value.compute_size(); my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len; }; my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); self.special_fields.cached_size().set(my_size as u32); my_size } fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { if self.include_device_name != false { os.write_bool(1, self.include_device_name)?; } if self.include_tx_power_level != false { os.write_bool(2, self.include_tx_power_level)?; } if !self.manufacturer_data.is_empty() { os.write_bytes(3, &self.manufacturer_data)?; } for v in &self.services { ::protobuf::rt::write_message_field_with_cached_size(4, v, os)?; }; os.write_unknown_fields(self.special_fields.unknown_fields())?; ::std::result::Result::Ok(()) } fn special_fields(&self) -> &::protobuf::SpecialFields { &self.special_fields } fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { &mut self.special_fields } fn new() -> AdvertiseData { AdvertiseData::new() } fn clear(&mut self) { self.include_device_name = false; self.include_tx_power_level = false; self.manufacturer_data.clear(); self.services.clear(); self.special_fields.clear(); } fn default_instance() -> &'static AdvertiseData { static instance: AdvertiseData = AdvertiseData { include_device_name: false, include_tx_power_level: false, manufacturer_data: ::std::vec::Vec::new(), services: ::std::vec::Vec::new(), special_fields: ::protobuf::SpecialFields::new(), }; &instance } } impl ::protobuf::MessageFull for AdvertiseData { fn descriptor() -> ::protobuf::reflect::MessageDescriptor { static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new(); descriptor.get(|| super::super::file_descriptor().message_by_package_relative_name("Chip.BleBeacon.AdvertiseData").unwrap()).clone() } } impl ::std::fmt::Display for AdvertiseData { fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { ::protobuf::text_format::fmt(self, f) } } impl ::protobuf::reflect::ProtobufValue for AdvertiseData { type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage; } /// Nested message and enums of message `AdvertiseData` pub mod advertise_data { #[derive(PartialEq,Clone,Default,Debug)] // @@protoc_insertion_point(message:netsim.model.Chip.BleBeacon.AdvertiseData.Service) pub struct Service { // message fields // @@protoc_insertion_point(field:netsim.model.Chip.BleBeacon.AdvertiseData.Service.uuid) pub uuid: ::std::string::String, // @@protoc_insertion_point(field:netsim.model.Chip.BleBeacon.AdvertiseData.Service.data) pub data: ::std::vec::Vec, // special fields // @@protoc_insertion_point(special_field:netsim.model.Chip.BleBeacon.AdvertiseData.Service.special_fields) pub special_fields: ::protobuf::SpecialFields, } impl<'a> ::std::default::Default for &'a Service { fn default() -> &'a Service { ::default_instance() } } impl Service { pub fn new() -> Service { ::std::default::Default::default() } pub(in super::super::super) fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData { let mut fields = ::std::vec::Vec::with_capacity(2); let mut oneofs = ::std::vec::Vec::with_capacity(0); fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>( "uuid", |m: &Service| { &m.uuid }, |m: &mut Service| { &mut m.uuid }, )); fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>( "data", |m: &Service| { &m.data }, |m: &mut Service| { &mut m.data }, )); ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::( "Chip.BleBeacon.AdvertiseData.Service", fields, oneofs, ) } } impl ::protobuf::Message for Service { const NAME: &'static str = "Service"; fn is_initialized(&self) -> bool { true } fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { while let Some(tag) = is.read_raw_tag_or_eof()? { match tag { 10 => { self.uuid = is.read_string()?; }, 18 => { self.data = is.read_bytes()?; }, tag => { ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; }, }; } ::std::result::Result::Ok(()) } // Compute sizes of nested messages #[allow(unused_variables)] fn compute_size(&self) -> u64 { let mut my_size = 0; if !self.uuid.is_empty() { my_size += ::protobuf::rt::string_size(1, &self.uuid); } if !self.data.is_empty() { my_size += ::protobuf::rt::bytes_size(2, &self.data); } my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); self.special_fields.cached_size().set(my_size as u32); my_size } fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { if !self.uuid.is_empty() { os.write_string(1, &self.uuid)?; } if !self.data.is_empty() { os.write_bytes(2, &self.data)?; } os.write_unknown_fields(self.special_fields.unknown_fields())?; ::std::result::Result::Ok(()) } fn special_fields(&self) -> &::protobuf::SpecialFields { &self.special_fields } fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { &mut self.special_fields } fn new() -> Service { Service::new() } fn clear(&mut self) { self.uuid.clear(); self.data.clear(); self.special_fields.clear(); } fn default_instance() -> &'static Service { static instance: Service = Service { uuid: ::std::string::String::new(), data: ::std::vec::Vec::new(), special_fields: ::protobuf::SpecialFields::new(), }; &instance } } impl ::protobuf::MessageFull for Service { fn descriptor() -> ::protobuf::reflect::MessageDescriptor { static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new(); descriptor.get(|| super::super::super::file_descriptor().message_by_package_relative_name("Chip.BleBeacon.AdvertiseData.Service").unwrap()).clone() } } impl ::std::fmt::Display for Service { fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { ::protobuf::text_format::fmt(self, f) } } impl ::protobuf::reflect::ProtobufValue for Service { type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage; } } } } #[derive(PartialEq,Clone,Default,Debug)] // @@protoc_insertion_point(message:netsim.model.ChipCreate) pub struct ChipCreate { // message fields // @@protoc_insertion_point(field:netsim.model.ChipCreate.kind) pub kind: ::protobuf::EnumOrUnknown, // @@protoc_insertion_point(field:netsim.model.ChipCreate.address) pub address: ::std::string::String, // @@protoc_insertion_point(field:netsim.model.ChipCreate.name) pub name: ::std::string::String, // @@protoc_insertion_point(field:netsim.model.ChipCreate.manufacturer) pub manufacturer: ::std::string::String, // @@protoc_insertion_point(field:netsim.model.ChipCreate.product_name) pub product_name: ::std::string::String, // @@protoc_insertion_point(field:netsim.model.ChipCreate.bt_properties) pub bt_properties: ::protobuf::MessageField, // message oneof groups pub chip: ::std::option::Option, // special fields // @@protoc_insertion_point(special_field:netsim.model.ChipCreate.special_fields) pub special_fields: ::protobuf::SpecialFields, } impl<'a> ::std::default::Default for &'a ChipCreate { fn default() -> &'a ChipCreate { ::default_instance() } } impl ChipCreate { pub fn new() -> ChipCreate { ::std::default::Default::default() } // .netsim.model.ChipCreate.BleBeaconCreate ble_beacon = 6; pub fn ble_beacon(&self) -> &chip_create::BleBeaconCreate { match self.chip { ::std::option::Option::Some(chip_create::Chip::BleBeacon(ref v)) => v, _ => ::default_instance(), } } pub fn clear_ble_beacon(&mut self) { self.chip = ::std::option::Option::None; } pub fn has_ble_beacon(&self) -> bool { match self.chip { ::std::option::Option::Some(chip_create::Chip::BleBeacon(..)) => true, _ => false, } } // Param is passed by value, moved pub fn set_ble_beacon(&mut self, v: chip_create::BleBeaconCreate) { self.chip = ::std::option::Option::Some(chip_create::Chip::BleBeacon(v)) } // Mutable pointer to the field. pub fn mut_ble_beacon(&mut self) -> &mut chip_create::BleBeaconCreate { if let ::std::option::Option::Some(chip_create::Chip::BleBeacon(_)) = self.chip { } else { self.chip = ::std::option::Option::Some(chip_create::Chip::BleBeacon(chip_create::BleBeaconCreate::new())); } match self.chip { ::std::option::Option::Some(chip_create::Chip::BleBeacon(ref mut v)) => v, _ => panic!(), } } // Take field pub fn take_ble_beacon(&mut self) -> chip_create::BleBeaconCreate { if self.has_ble_beacon() { match self.chip.take() { ::std::option::Option::Some(chip_create::Chip::BleBeacon(v)) => v, _ => panic!(), } } else { chip_create::BleBeaconCreate::new() } } fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData { let mut fields = ::std::vec::Vec::with_capacity(7); let mut oneofs = ::std::vec::Vec::with_capacity(1); fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>( "kind", |m: &ChipCreate| { &m.kind }, |m: &mut ChipCreate| { &mut m.kind }, )); fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>( "address", |m: &ChipCreate| { &m.address }, |m: &mut ChipCreate| { &mut m.address }, )); fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>( "name", |m: &ChipCreate| { &m.name }, |m: &mut ChipCreate| { &mut m.name }, )); fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>( "manufacturer", |m: &ChipCreate| { &m.manufacturer }, |m: &mut ChipCreate| { &mut m.manufacturer }, )); fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>( "product_name", |m: &ChipCreate| { &m.product_name }, |m: &mut ChipCreate| { &mut m.product_name }, )); fields.push(::protobuf::reflect::rt::v2::make_oneof_message_has_get_mut_set_accessor::<_, chip_create::BleBeaconCreate>( "ble_beacon", ChipCreate::has_ble_beacon, ChipCreate::ble_beacon, ChipCreate::mut_ble_beacon, ChipCreate::set_ble_beacon, )); fields.push(::protobuf::reflect::rt::v2::make_message_field_accessor::<_, super::configuration::Controller>( "bt_properties", |m: &ChipCreate| { &m.bt_properties }, |m: &mut ChipCreate| { &mut m.bt_properties }, )); oneofs.push(chip_create::Chip::generated_oneof_descriptor_data()); ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::( "ChipCreate", fields, oneofs, ) } } impl ::protobuf::Message for ChipCreate { const NAME: &'static str = "ChipCreate"; fn is_initialized(&self) -> bool { true } fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { while let Some(tag) = is.read_raw_tag_or_eof()? { match tag { 8 => { self.kind = is.read_enum_or_unknown()?; }, 18 => { self.address = is.read_string()?; }, 26 => { self.name = is.read_string()?; }, 34 => { self.manufacturer = is.read_string()?; }, 42 => { self.product_name = is.read_string()?; }, 50 => { self.chip = ::std::option::Option::Some(chip_create::Chip::BleBeacon(is.read_message()?)); }, 58 => { ::protobuf::rt::read_singular_message_into_field(is, &mut self.bt_properties)?; }, tag => { ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; }, }; } ::std::result::Result::Ok(()) } // Compute sizes of nested messages #[allow(unused_variables)] fn compute_size(&self) -> u64 { let mut my_size = 0; if self.kind != ::protobuf::EnumOrUnknown::new(super::common::ChipKind::UNSPECIFIED) { my_size += ::protobuf::rt::int32_size(1, self.kind.value()); } if !self.address.is_empty() { my_size += ::protobuf::rt::string_size(2, &self.address); } if !self.name.is_empty() { my_size += ::protobuf::rt::string_size(3, &self.name); } if !self.manufacturer.is_empty() { my_size += ::protobuf::rt::string_size(4, &self.manufacturer); } if !self.product_name.is_empty() { my_size += ::protobuf::rt::string_size(5, &self.product_name); } if let Some(v) = self.bt_properties.as_ref() { let len = v.compute_size(); my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len; } if let ::std::option::Option::Some(ref v) = self.chip { match v { &chip_create::Chip::BleBeacon(ref v) => { let len = v.compute_size(); my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len; }, }; } my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); self.special_fields.cached_size().set(my_size as u32); my_size } fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { if self.kind != ::protobuf::EnumOrUnknown::new(super::common::ChipKind::UNSPECIFIED) { os.write_enum(1, ::protobuf::EnumOrUnknown::value(&self.kind))?; } if !self.address.is_empty() { os.write_string(2, &self.address)?; } if !self.name.is_empty() { os.write_string(3, &self.name)?; } if !self.manufacturer.is_empty() { os.write_string(4, &self.manufacturer)?; } if !self.product_name.is_empty() { os.write_string(5, &self.product_name)?; } if let Some(v) = self.bt_properties.as_ref() { ::protobuf::rt::write_message_field_with_cached_size(7, v, os)?; } if let ::std::option::Option::Some(ref v) = self.chip { match v { &chip_create::Chip::BleBeacon(ref v) => { ::protobuf::rt::write_message_field_with_cached_size(6, v, os)?; }, }; } os.write_unknown_fields(self.special_fields.unknown_fields())?; ::std::result::Result::Ok(()) } fn special_fields(&self) -> &::protobuf::SpecialFields { &self.special_fields } fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { &mut self.special_fields } fn new() -> ChipCreate { ChipCreate::new() } fn clear(&mut self) { self.kind = ::protobuf::EnumOrUnknown::new(super::common::ChipKind::UNSPECIFIED); self.address.clear(); self.name.clear(); self.manufacturer.clear(); self.product_name.clear(); self.chip = ::std::option::Option::None; self.bt_properties.clear(); self.special_fields.clear(); } fn default_instance() -> &'static ChipCreate { static instance: ChipCreate = ChipCreate { kind: ::protobuf::EnumOrUnknown::from_i32(0), address: ::std::string::String::new(), name: ::std::string::String::new(), manufacturer: ::std::string::String::new(), product_name: ::std::string::String::new(), bt_properties: ::protobuf::MessageField::none(), chip: ::std::option::Option::None, special_fields: ::protobuf::SpecialFields::new(), }; &instance } } impl ::protobuf::MessageFull for ChipCreate { fn descriptor() -> ::protobuf::reflect::MessageDescriptor { static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new(); descriptor.get(|| file_descriptor().message_by_package_relative_name("ChipCreate").unwrap()).clone() } } impl ::std::fmt::Display for ChipCreate { fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { ::protobuf::text_format::fmt(self, f) } } impl ::protobuf::reflect::ProtobufValue for ChipCreate { type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage; } /// Nested message and enums of message `ChipCreate` pub mod chip_create { #[derive(Clone,PartialEq,Debug)] #[non_exhaustive] // @@protoc_insertion_point(oneof:netsim.model.ChipCreate.chip) pub enum Chip { // @@protoc_insertion_point(oneof_field:netsim.model.ChipCreate.ble_beacon) BleBeacon(BleBeaconCreate), } impl ::protobuf::Oneof for Chip { } impl ::protobuf::OneofFull for Chip { fn descriptor() -> ::protobuf::reflect::OneofDescriptor { static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::OneofDescriptor> = ::protobuf::rt::Lazy::new(); descriptor.get(|| ::descriptor().oneof_by_name("chip").unwrap()).clone() } } impl Chip { pub(in super) fn generated_oneof_descriptor_data() -> ::protobuf::reflect::GeneratedOneofDescriptorData { ::protobuf::reflect::GeneratedOneofDescriptorData::new::("chip") } } #[derive(PartialEq,Clone,Default,Debug)] // @@protoc_insertion_point(message:netsim.model.ChipCreate.BleBeaconCreate) pub struct BleBeaconCreate { // message fields // @@protoc_insertion_point(field:netsim.model.ChipCreate.BleBeaconCreate.address) pub address: ::std::string::String, // @@protoc_insertion_point(field:netsim.model.ChipCreate.BleBeaconCreate.settings) pub settings: ::protobuf::MessageField, // @@protoc_insertion_point(field:netsim.model.ChipCreate.BleBeaconCreate.adv_data) pub adv_data: ::protobuf::MessageField, // @@protoc_insertion_point(field:netsim.model.ChipCreate.BleBeaconCreate.scan_response) pub scan_response: ::protobuf::MessageField, // special fields // @@protoc_insertion_point(special_field:netsim.model.ChipCreate.BleBeaconCreate.special_fields) pub special_fields: ::protobuf::SpecialFields, } impl<'a> ::std::default::Default for &'a BleBeaconCreate { fn default() -> &'a BleBeaconCreate { ::default_instance() } } impl BleBeaconCreate { pub fn new() -> BleBeaconCreate { ::std::default::Default::default() } pub(in super) fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData { let mut fields = ::std::vec::Vec::with_capacity(4); let mut oneofs = ::std::vec::Vec::with_capacity(0); fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>( "address", |m: &BleBeaconCreate| { &m.address }, |m: &mut BleBeaconCreate| { &mut m.address }, )); fields.push(::protobuf::reflect::rt::v2::make_message_field_accessor::<_, super::chip::ble_beacon::AdvertiseSettings>( "settings", |m: &BleBeaconCreate| { &m.settings }, |m: &mut BleBeaconCreate| { &mut m.settings }, )); fields.push(::protobuf::reflect::rt::v2::make_message_field_accessor::<_, super::chip::ble_beacon::AdvertiseData>( "adv_data", |m: &BleBeaconCreate| { &m.adv_data }, |m: &mut BleBeaconCreate| { &mut m.adv_data }, )); fields.push(::protobuf::reflect::rt::v2::make_message_field_accessor::<_, super::chip::ble_beacon::AdvertiseData>( "scan_response", |m: &BleBeaconCreate| { &m.scan_response }, |m: &mut BleBeaconCreate| { &mut m.scan_response }, )); ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::( "ChipCreate.BleBeaconCreate", fields, oneofs, ) } } impl ::protobuf::Message for BleBeaconCreate { const NAME: &'static str = "BleBeaconCreate"; fn is_initialized(&self) -> bool { true } fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { while let Some(tag) = is.read_raw_tag_or_eof()? { match tag { 10 => { self.address = is.read_string()?; }, 26 => { ::protobuf::rt::read_singular_message_into_field(is, &mut self.settings)?; }, 34 => { ::protobuf::rt::read_singular_message_into_field(is, &mut self.adv_data)?; }, 42 => { ::protobuf::rt::read_singular_message_into_field(is, &mut self.scan_response)?; }, tag => { ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; }, }; } ::std::result::Result::Ok(()) } // Compute sizes of nested messages #[allow(unused_variables)] fn compute_size(&self) -> u64 { let mut my_size = 0; if !self.address.is_empty() { my_size += ::protobuf::rt::string_size(1, &self.address); } if let Some(v) = self.settings.as_ref() { let len = v.compute_size(); my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len; } if let Some(v) = self.adv_data.as_ref() { let len = v.compute_size(); my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len; } if let Some(v) = self.scan_response.as_ref() { let len = v.compute_size(); my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len; } my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); self.special_fields.cached_size().set(my_size as u32); my_size } fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { if !self.address.is_empty() { os.write_string(1, &self.address)?; } if let Some(v) = self.settings.as_ref() { ::protobuf::rt::write_message_field_with_cached_size(3, v, os)?; } if let Some(v) = self.adv_data.as_ref() { ::protobuf::rt::write_message_field_with_cached_size(4, v, os)?; } if let Some(v) = self.scan_response.as_ref() { ::protobuf::rt::write_message_field_with_cached_size(5, v, os)?; } os.write_unknown_fields(self.special_fields.unknown_fields())?; ::std::result::Result::Ok(()) } fn special_fields(&self) -> &::protobuf::SpecialFields { &self.special_fields } fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { &mut self.special_fields } fn new() -> BleBeaconCreate { BleBeaconCreate::new() } fn clear(&mut self) { self.address.clear(); self.settings.clear(); self.adv_data.clear(); self.scan_response.clear(); self.special_fields.clear(); } fn default_instance() -> &'static BleBeaconCreate { static instance: BleBeaconCreate = BleBeaconCreate { address: ::std::string::String::new(), settings: ::protobuf::MessageField::none(), adv_data: ::protobuf::MessageField::none(), scan_response: ::protobuf::MessageField::none(), special_fields: ::protobuf::SpecialFields::new(), }; &instance } } impl ::protobuf::MessageFull for BleBeaconCreate { fn descriptor() -> ::protobuf::reflect::MessageDescriptor { static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new(); descriptor.get(|| super::file_descriptor().message_by_package_relative_name("ChipCreate.BleBeaconCreate").unwrap()).clone() } } impl ::std::fmt::Display for BleBeaconCreate { fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { ::protobuf::text_format::fmt(self, f) } } impl ::protobuf::reflect::ProtobufValue for BleBeaconCreate { type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage; } } #[derive(PartialEq,Clone,Default,Debug)] // @@protoc_insertion_point(message:netsim.model.Device) pub struct Device { // message fields // @@protoc_insertion_point(field:netsim.model.Device.id) pub id: u32, // @@protoc_insertion_point(field:netsim.model.Device.name) pub name: ::std::string::String, // @@protoc_insertion_point(field:netsim.model.Device.visible) pub visible: ::std::option::Option, // @@protoc_insertion_point(field:netsim.model.Device.position) pub position: ::protobuf::MessageField, // @@protoc_insertion_point(field:netsim.model.Device.orientation) pub orientation: ::protobuf::MessageField, // @@protoc_insertion_point(field:netsim.model.Device.chips) pub chips: ::std::vec::Vec, // special fields // @@protoc_insertion_point(special_field:netsim.model.Device.special_fields) pub special_fields: ::protobuf::SpecialFields, } impl<'a> ::std::default::Default for &'a Device { fn default() -> &'a Device { ::default_instance() } } impl Device { pub fn new() -> Device { ::std::default::Default::default() } fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData { let mut fields = ::std::vec::Vec::with_capacity(6); let mut oneofs = ::std::vec::Vec::with_capacity(0); fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>( "id", |m: &Device| { &m.id }, |m: &mut Device| { &mut m.id }, )); fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>( "name", |m: &Device| { &m.name }, |m: &mut Device| { &mut m.name }, )); fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( "visible", |m: &Device| { &m.visible }, |m: &mut Device| { &mut m.visible }, )); fields.push(::protobuf::reflect::rt::v2::make_message_field_accessor::<_, Position>( "position", |m: &Device| { &m.position }, |m: &mut Device| { &mut m.position }, )); fields.push(::protobuf::reflect::rt::v2::make_message_field_accessor::<_, Orientation>( "orientation", |m: &Device| { &m.orientation }, |m: &mut Device| { &mut m.orientation }, )); fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>( "chips", |m: &Device| { &m.chips }, |m: &mut Device| { &mut m.chips }, )); ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::( "Device", fields, oneofs, ) } } impl ::protobuf::Message for Device { const NAME: &'static str = "Device"; fn is_initialized(&self) -> bool { true } fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { while let Some(tag) = is.read_raw_tag_or_eof()? { match tag { 8 => { self.id = is.read_uint32()?; }, 18 => { self.name = is.read_string()?; }, 24 => { self.visible = ::std::option::Option::Some(is.read_bool()?); }, 34 => { ::protobuf::rt::read_singular_message_into_field(is, &mut self.position)?; }, 42 => { ::protobuf::rt::read_singular_message_into_field(is, &mut self.orientation)?; }, 50 => { self.chips.push(is.read_message()?); }, tag => { ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; }, }; } ::std::result::Result::Ok(()) } // Compute sizes of nested messages #[allow(unused_variables)] fn compute_size(&self) -> u64 { let mut my_size = 0; if self.id != 0 { my_size += ::protobuf::rt::uint32_size(1, self.id); } if !self.name.is_empty() { my_size += ::protobuf::rt::string_size(2, &self.name); } if let Some(v) = self.visible { my_size += 1 + 1; } if let Some(v) = self.position.as_ref() { let len = v.compute_size(); my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len; } if let Some(v) = self.orientation.as_ref() { let len = v.compute_size(); my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len; } for value in &self.chips { let len = value.compute_size(); my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len; }; my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); self.special_fields.cached_size().set(my_size as u32); my_size } fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { if self.id != 0 { os.write_uint32(1, self.id)?; } if !self.name.is_empty() { os.write_string(2, &self.name)?; } if let Some(v) = self.visible { os.write_bool(3, v)?; } if let Some(v) = self.position.as_ref() { ::protobuf::rt::write_message_field_with_cached_size(4, v, os)?; } if let Some(v) = self.orientation.as_ref() { ::protobuf::rt::write_message_field_with_cached_size(5, v, os)?; } for v in &self.chips { ::protobuf::rt::write_message_field_with_cached_size(6, v, os)?; }; os.write_unknown_fields(self.special_fields.unknown_fields())?; ::std::result::Result::Ok(()) } fn special_fields(&self) -> &::protobuf::SpecialFields { &self.special_fields } fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { &mut self.special_fields } fn new() -> Device { Device::new() } fn clear(&mut self) { self.id = 0; self.name.clear(); self.visible = ::std::option::Option::None; self.position.clear(); self.orientation.clear(); self.chips.clear(); self.special_fields.clear(); } fn default_instance() -> &'static Device { static instance: Device = Device { id: 0, name: ::std::string::String::new(), visible: ::std::option::Option::None, position: ::protobuf::MessageField::none(), orientation: ::protobuf::MessageField::none(), chips: ::std::vec::Vec::new(), special_fields: ::protobuf::SpecialFields::new(), }; &instance } } impl ::protobuf::MessageFull for Device { fn descriptor() -> ::protobuf::reflect::MessageDescriptor { static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new(); descriptor.get(|| file_descriptor().message_by_package_relative_name("Device").unwrap()).clone() } } impl ::std::fmt::Display for Device { fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { ::protobuf::text_format::fmt(self, f) } } impl ::protobuf::reflect::ProtobufValue for Device { type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage; } #[derive(PartialEq,Clone,Default,Debug)] // @@protoc_insertion_point(message:netsim.model.DeviceCreate) pub struct DeviceCreate { // message fields // @@protoc_insertion_point(field:netsim.model.DeviceCreate.name) pub name: ::std::string::String, // @@protoc_insertion_point(field:netsim.model.DeviceCreate.position) pub position: ::protobuf::MessageField, // @@protoc_insertion_point(field:netsim.model.DeviceCreate.orientation) pub orientation: ::protobuf::MessageField, // @@protoc_insertion_point(field:netsim.model.DeviceCreate.chips) pub chips: ::std::vec::Vec, // special fields // @@protoc_insertion_point(special_field:netsim.model.DeviceCreate.special_fields) pub special_fields: ::protobuf::SpecialFields, } impl<'a> ::std::default::Default for &'a DeviceCreate { fn default() -> &'a DeviceCreate { ::default_instance() } } impl DeviceCreate { pub fn new() -> DeviceCreate { ::std::default::Default::default() } fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData { let mut fields = ::std::vec::Vec::with_capacity(4); let mut oneofs = ::std::vec::Vec::with_capacity(0); fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>( "name", |m: &DeviceCreate| { &m.name }, |m: &mut DeviceCreate| { &mut m.name }, )); fields.push(::protobuf::reflect::rt::v2::make_message_field_accessor::<_, Position>( "position", |m: &DeviceCreate| { &m.position }, |m: &mut DeviceCreate| { &mut m.position }, )); fields.push(::protobuf::reflect::rt::v2::make_message_field_accessor::<_, Orientation>( "orientation", |m: &DeviceCreate| { &m.orientation }, |m: &mut DeviceCreate| { &mut m.orientation }, )); fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>( "chips", |m: &DeviceCreate| { &m.chips }, |m: &mut DeviceCreate| { &mut m.chips }, )); ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::( "DeviceCreate", fields, oneofs, ) } } impl ::protobuf::Message for DeviceCreate { const NAME: &'static str = "DeviceCreate"; fn is_initialized(&self) -> bool { true } fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { while let Some(tag) = is.read_raw_tag_or_eof()? { match tag { 10 => { self.name = is.read_string()?; }, 18 => { ::protobuf::rt::read_singular_message_into_field(is, &mut self.position)?; }, 26 => { ::protobuf::rt::read_singular_message_into_field(is, &mut self.orientation)?; }, 34 => { self.chips.push(is.read_message()?); }, tag => { ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; }, }; } ::std::result::Result::Ok(()) } // Compute sizes of nested messages #[allow(unused_variables)] fn compute_size(&self) -> u64 { let mut my_size = 0; if !self.name.is_empty() { my_size += ::protobuf::rt::string_size(1, &self.name); } if let Some(v) = self.position.as_ref() { let len = v.compute_size(); my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len; } if let Some(v) = self.orientation.as_ref() { let len = v.compute_size(); my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len; } for value in &self.chips { let len = value.compute_size(); my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len; }; my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); self.special_fields.cached_size().set(my_size as u32); my_size } fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { if !self.name.is_empty() { os.write_string(1, &self.name)?; } if let Some(v) = self.position.as_ref() { ::protobuf::rt::write_message_field_with_cached_size(2, v, os)?; } if let Some(v) = self.orientation.as_ref() { ::protobuf::rt::write_message_field_with_cached_size(3, v, os)?; } for v in &self.chips { ::protobuf::rt::write_message_field_with_cached_size(4, v, os)?; }; os.write_unknown_fields(self.special_fields.unknown_fields())?; ::std::result::Result::Ok(()) } fn special_fields(&self) -> &::protobuf::SpecialFields { &self.special_fields } fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { &mut self.special_fields } fn new() -> DeviceCreate { DeviceCreate::new() } fn clear(&mut self) { self.name.clear(); self.position.clear(); self.orientation.clear(); self.chips.clear(); self.special_fields.clear(); } fn default_instance() -> &'static DeviceCreate { static instance: DeviceCreate = DeviceCreate { name: ::std::string::String::new(), position: ::protobuf::MessageField::none(), orientation: ::protobuf::MessageField::none(), chips: ::std::vec::Vec::new(), special_fields: ::protobuf::SpecialFields::new(), }; &instance } } impl ::protobuf::MessageFull for DeviceCreate { fn descriptor() -> ::protobuf::reflect::MessageDescriptor { static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new(); descriptor.get(|| file_descriptor().message_by_package_relative_name("DeviceCreate").unwrap()).clone() } } impl ::std::fmt::Display for DeviceCreate { fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { ::protobuf::text_format::fmt(self, f) } } impl ::protobuf::reflect::ProtobufValue for DeviceCreate { type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage; } #[derive(PartialEq,Clone,Default,Debug)] // @@protoc_insertion_point(message:netsim.model.Scene) pub struct Scene { // message fields // @@protoc_insertion_point(field:netsim.model.Scene.devices) pub devices: ::std::vec::Vec, // special fields // @@protoc_insertion_point(special_field:netsim.model.Scene.special_fields) pub special_fields: ::protobuf::SpecialFields, } impl<'a> ::std::default::Default for &'a Scene { fn default() -> &'a Scene { ::default_instance() } } impl Scene { pub fn new() -> Scene { ::std::default::Default::default() } fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData { let mut fields = ::std::vec::Vec::with_capacity(1); let mut oneofs = ::std::vec::Vec::with_capacity(0); fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>( "devices", |m: &Scene| { &m.devices }, |m: &mut Scene| { &mut m.devices }, )); ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::( "Scene", fields, oneofs, ) } } impl ::protobuf::Message for Scene { const NAME: &'static str = "Scene"; fn is_initialized(&self) -> bool { true } fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { while let Some(tag) = is.read_raw_tag_or_eof()? { match tag { 10 => { self.devices.push(is.read_message()?); }, tag => { ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; }, }; } ::std::result::Result::Ok(()) } // Compute sizes of nested messages #[allow(unused_variables)] fn compute_size(&self) -> u64 { let mut my_size = 0; for value in &self.devices { let len = value.compute_size(); my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len; }; my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); self.special_fields.cached_size().set(my_size as u32); my_size } fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { for v in &self.devices { ::protobuf::rt::write_message_field_with_cached_size(1, v, os)?; }; os.write_unknown_fields(self.special_fields.unknown_fields())?; ::std::result::Result::Ok(()) } fn special_fields(&self) -> &::protobuf::SpecialFields { &self.special_fields } fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { &mut self.special_fields } fn new() -> Scene { Scene::new() } fn clear(&mut self) { self.devices.clear(); self.special_fields.clear(); } fn default_instance() -> &'static Scene { static instance: Scene = Scene { devices: ::std::vec::Vec::new(), special_fields: ::protobuf::SpecialFields::new(), }; &instance } } impl ::protobuf::MessageFull for Scene { fn descriptor() -> ::protobuf::reflect::MessageDescriptor { static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new(); descriptor.get(|| file_descriptor().message_by_package_relative_name("Scene").unwrap()).clone() } } impl ::std::fmt::Display for Scene { fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { ::protobuf::text_format::fmt(self, f) } } impl ::protobuf::reflect::ProtobufValue for Scene { type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage; } #[derive(PartialEq,Clone,Default,Debug)] // @@protoc_insertion_point(message:netsim.model.Capture) pub struct Capture { // message fields // @@protoc_insertion_point(field:netsim.model.Capture.id) pub id: u32, // @@protoc_insertion_point(field:netsim.model.Capture.chip_kind) pub chip_kind: ::protobuf::EnumOrUnknown, // @@protoc_insertion_point(field:netsim.model.Capture.device_name) pub device_name: ::std::string::String, // @@protoc_insertion_point(field:netsim.model.Capture.state) pub state: ::std::option::Option, // @@protoc_insertion_point(field:netsim.model.Capture.size) pub size: i32, // @@protoc_insertion_point(field:netsim.model.Capture.records) pub records: i32, // @@protoc_insertion_point(field:netsim.model.Capture.timestamp) pub timestamp: ::protobuf::MessageField<::protobuf::well_known_types::timestamp::Timestamp>, // @@protoc_insertion_point(field:netsim.model.Capture.valid) pub valid: bool, // special fields // @@protoc_insertion_point(special_field:netsim.model.Capture.special_fields) pub special_fields: ::protobuf::SpecialFields, } impl<'a> ::std::default::Default for &'a Capture { fn default() -> &'a Capture { ::default_instance() } } impl Capture { pub fn new() -> Capture { ::std::default::Default::default() } fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData { let mut fields = ::std::vec::Vec::with_capacity(8); let mut oneofs = ::std::vec::Vec::with_capacity(0); fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>( "id", |m: &Capture| { &m.id }, |m: &mut Capture| { &mut m.id }, )); fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>( "chip_kind", |m: &Capture| { &m.chip_kind }, |m: &mut Capture| { &mut m.chip_kind }, )); fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>( "device_name", |m: &Capture| { &m.device_name }, |m: &mut Capture| { &mut m.device_name }, )); fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( "state", |m: &Capture| { &m.state }, |m: &mut Capture| { &mut m.state }, )); fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>( "size", |m: &Capture| { &m.size }, |m: &mut Capture| { &mut m.size }, )); fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>( "records", |m: &Capture| { &m.records }, |m: &mut Capture| { &mut m.records }, )); fields.push(::protobuf::reflect::rt::v2::make_message_field_accessor::<_, ::protobuf::well_known_types::timestamp::Timestamp>( "timestamp", |m: &Capture| { &m.timestamp }, |m: &mut Capture| { &mut m.timestamp }, )); fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>( "valid", |m: &Capture| { &m.valid }, |m: &mut Capture| { &mut m.valid }, )); ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::( "Capture", fields, oneofs, ) } } impl ::protobuf::Message for Capture { const NAME: &'static str = "Capture"; fn is_initialized(&self) -> bool { true } fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { while let Some(tag) = is.read_raw_tag_or_eof()? { match tag { 8 => { self.id = is.read_uint32()?; }, 16 => { self.chip_kind = is.read_enum_or_unknown()?; }, 26 => { self.device_name = is.read_string()?; }, 32 => { self.state = ::std::option::Option::Some(is.read_bool()?); }, 40 => { self.size = is.read_int32()?; }, 48 => { self.records = is.read_int32()?; }, 58 => { ::protobuf::rt::read_singular_message_into_field(is, &mut self.timestamp)?; }, 64 => { self.valid = is.read_bool()?; }, tag => { ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; }, }; } ::std::result::Result::Ok(()) } // Compute sizes of nested messages #[allow(unused_variables)] fn compute_size(&self) -> u64 { let mut my_size = 0; if self.id != 0 { my_size += ::protobuf::rt::uint32_size(1, self.id); } if self.chip_kind != ::protobuf::EnumOrUnknown::new(super::common::ChipKind::UNSPECIFIED) { my_size += ::protobuf::rt::int32_size(2, self.chip_kind.value()); } if !self.device_name.is_empty() { my_size += ::protobuf::rt::string_size(3, &self.device_name); } if let Some(v) = self.state { my_size += 1 + 1; } if self.size != 0 { my_size += ::protobuf::rt::int32_size(5, self.size); } if self.records != 0 { my_size += ::protobuf::rt::int32_size(6, self.records); } if let Some(v) = self.timestamp.as_ref() { let len = v.compute_size(); my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len; } if self.valid != false { my_size += 1 + 1; } my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); self.special_fields.cached_size().set(my_size as u32); my_size } fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { if self.id != 0 { os.write_uint32(1, self.id)?; } if self.chip_kind != ::protobuf::EnumOrUnknown::new(super::common::ChipKind::UNSPECIFIED) { os.write_enum(2, ::protobuf::EnumOrUnknown::value(&self.chip_kind))?; } if !self.device_name.is_empty() { os.write_string(3, &self.device_name)?; } if let Some(v) = self.state { os.write_bool(4, v)?; } if self.size != 0 { os.write_int32(5, self.size)?; } if self.records != 0 { os.write_int32(6, self.records)?; } if let Some(v) = self.timestamp.as_ref() { ::protobuf::rt::write_message_field_with_cached_size(7, v, os)?; } if self.valid != false { os.write_bool(8, self.valid)?; } os.write_unknown_fields(self.special_fields.unknown_fields())?; ::std::result::Result::Ok(()) } fn special_fields(&self) -> &::protobuf::SpecialFields { &self.special_fields } fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { &mut self.special_fields } fn new() -> Capture { Capture::new() } fn clear(&mut self) { self.id = 0; self.chip_kind = ::protobuf::EnumOrUnknown::new(super::common::ChipKind::UNSPECIFIED); self.device_name.clear(); self.state = ::std::option::Option::None; self.size = 0; self.records = 0; self.timestamp.clear(); self.valid = false; self.special_fields.clear(); } fn default_instance() -> &'static Capture { static instance: Capture = Capture { id: 0, chip_kind: ::protobuf::EnumOrUnknown::from_i32(0), device_name: ::std::string::String::new(), state: ::std::option::Option::None, size: 0, records: 0, timestamp: ::protobuf::MessageField::none(), valid: false, special_fields: ::protobuf::SpecialFields::new(), }; &instance } } impl ::protobuf::MessageFull for Capture { fn descriptor() -> ::protobuf::reflect::MessageDescriptor { static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new(); descriptor.get(|| file_descriptor().message_by_package_relative_name("Capture").unwrap()).clone() } } impl ::std::fmt::Display for Capture { fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { ::protobuf::text_format::fmt(self, f) } } impl ::protobuf::reflect::ProtobufValue for Capture { type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage; } #[derive(Clone,Copy,PartialEq,Eq,Debug,Hash)] // @@protoc_insertion_point(enum:netsim.model.PhyKind) pub enum PhyKind { // @@protoc_insertion_point(enum_value:netsim.model.PhyKind.NONE) NONE = 0, // @@protoc_insertion_point(enum_value:netsim.model.PhyKind.BLUETOOTH_CLASSIC) BLUETOOTH_CLASSIC = 1, // @@protoc_insertion_point(enum_value:netsim.model.PhyKind.BLUETOOTH_LOW_ENERGY) BLUETOOTH_LOW_ENERGY = 2, // @@protoc_insertion_point(enum_value:netsim.model.PhyKind.WIFI) WIFI = 3, // @@protoc_insertion_point(enum_value:netsim.model.PhyKind.UWB) UWB = 4, // @@protoc_insertion_point(enum_value:netsim.model.PhyKind.WIFI_RTT) WIFI_RTT = 5, } impl ::protobuf::Enum for PhyKind { const NAME: &'static str = "PhyKind"; fn value(&self) -> i32 { *self as i32 } fn from_i32(value: i32) -> ::std::option::Option { match value { 0 => ::std::option::Option::Some(PhyKind::NONE), 1 => ::std::option::Option::Some(PhyKind::BLUETOOTH_CLASSIC), 2 => ::std::option::Option::Some(PhyKind::BLUETOOTH_LOW_ENERGY), 3 => ::std::option::Option::Some(PhyKind::WIFI), 4 => ::std::option::Option::Some(PhyKind::UWB), 5 => ::std::option::Option::Some(PhyKind::WIFI_RTT), _ => ::std::option::Option::None } } const VALUES: &'static [PhyKind] = &[ PhyKind::NONE, PhyKind::BLUETOOTH_CLASSIC, PhyKind::BLUETOOTH_LOW_ENERGY, PhyKind::WIFI, PhyKind::UWB, PhyKind::WIFI_RTT, ]; } impl ::protobuf::EnumFull for PhyKind { fn enum_descriptor() -> ::protobuf::reflect::EnumDescriptor { static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::EnumDescriptor> = ::protobuf::rt::Lazy::new(); descriptor.get(|| file_descriptor().enum_by_package_relative_name("PhyKind").unwrap()).clone() } fn descriptor(&self) -> ::protobuf::reflect::EnumValueDescriptor { let index = *self as usize; Self::enum_descriptor().value_by_index(index) } } impl ::std::default::Default for PhyKind { fn default() -> Self { PhyKind::NONE } } impl PhyKind { fn generated_enum_descriptor_data() -> ::protobuf::reflect::GeneratedEnumDescriptorData { ::protobuf::reflect::GeneratedEnumDescriptorData::new::("PhyKind") } } static file_descriptor_proto_data: &'static [u8] = b"\ \n\x12netsim/model.proto\x12\x0cnetsim.model\x1a\x13netsim/common.proto\ \x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x1drootcanal/configuration.p\ roto\"4\n\x08Position\x12\x0c\n\x01x\x18\x01\x20\x01(\x02R\x01x\x12\x0c\ \n\x01y\x18\x02\x20\x01(\x02R\x01y\x12\x0c\n\x01z\x18\x03\x20\x01(\x02R\ \x01z\"I\n\x0bOrientation\x12\x10\n\x03yaw\x18\x01\x20\x01(\x02R\x03yaw\ \x12\x14\n\x05pitch\x18\x02\x20\x01(\x02R\x05pitch\x12\x12\n\x04roll\x18\ \x03\x20\x01(\x02R\x04roll\"\x9e\x0e\n\x04Chip\x12+\n\x04kind\x18\x01\ \x20\x01(\x0e2\x17.netsim.common.ChipKindR\x04kind\x12\x0e\n\x02id\x18\ \x02\x20\x01(\rR\x02id\x12\x12\n\x04name\x18\x03\x20\x01(\tR\x04name\x12\ \"\n\x0cmanufacturer\x18\x04\x20\x01(\tR\x0cmanufacturer\x12!\n\x0cprodu\ ct_name\x18\x05\x20\x01(\tR\x0bproductName\x12.\n\x02bt\x18\x06\x20\x01(\ \x0b2\x1c.netsim.model.Chip.BluetoothH\0R\x02bt\x12=\n\nble_beacon\x18\t\ \x20\x01(\x0b2\x1c.netsim.model.Chip.BleBeaconH\0R\tbleBeacon\x12,\n\x03\ uwb\x18\x07\x20\x01(\x0b2\x18.netsim.model.Chip.RadioH\0R\x03uwb\x12.\n\ \x04wifi\x18\x08\x20\x01(\x0b2\x18.netsim.model.Chip.RadioH\0R\x04wifi\ \x1ax\n\x05Radio\x12\x19\n\x05state\x18\x01\x20\x01(\x08H\0R\x05state\ \x88\x01\x01\x12\x14\n\x05range\x18\x02\x20\x01(\x02R\x05range\x12\x19\n\ \x08tx_count\x18\x03\x20\x01(\x05R\x07txCount\x12\x19\n\x08rx_count\x18\ \x04\x20\x01(\x05R\x07rxCountB\x08\n\x06_state\x1a\xdc\x01\n\tBluetooth\ \x127\n\nlow_energy\x18\x01\x20\x01(\x0b2\x18.netsim.model.Chip.RadioR\t\ lowEnergy\x122\n\x07classic\x18\x02\x20\x01(\x0b2\x18.netsim.model.Chip.\ RadioR\x07classic\x12\x18\n\x07address\x18\x03\x20\x01(\tR\x07address\ \x12H\n\rbt_properties\x18\x04\x20\x01(\x0b2#.rootcanal.configuration.Co\ ntrollerR\x0cbtProperties\x1a\xcf\x08\n\tBleBeacon\x12,\n\x02bt\x18\x01\ \x20\x01(\x0b2\x1c.netsim.model.Chip.BluetoothR\x02bt\x12\x18\n\x07addre\ ss\x18\x02\x20\x01(\tR\x07address\x12J\n\x08settings\x18\x03\x20\x01(\ \x0b2..netsim.model.Chip.BleBeacon.AdvertiseSettingsR\x08settings\x12E\n\ \x08adv_data\x18\x04\x20\x01(\x0b2*.netsim.model.Chip.BleBeacon.Advertis\ eDataR\x07advData\x12O\n\rscan_response\x18\x05\x20\x01(\x0b2*.netsim.mo\ del.Chip.BleBeacon.AdvertiseDataR\x0cscanResponse\x1a\xee\x03\n\x11Adver\ tiseSettings\x12e\n\x0eadvertise_mode\x18\x01\x20\x01(\x0e2<.netsim.mode\ l.Chip.BleBeacon.AdvertiseSettings.AdvertiseModeH\0R\radvertiseMode\x12$\ \n\x0cmilliseconds\x18\x02\x20\x01(\x04H\0R\x0cmilliseconds\x12g\n\x0etx\ _power_level\x18\x03\x20\x01(\x0e2?.netsim.model.Chip.BleBeacon.Advertis\ eSettings.AdvertiseTxPowerH\x01R\x0ctxPowerLevel\x12\x12\n\x03dbm\x18\ \x04\x20\x01(\x05H\x01R\x03dbm\x12\x1c\n\tscannable\x18\x05\x20\x01(\x08\ R\tscannable\x12\x18\n\x07timeout\x18\x06\x20\x01(\x04R\x07timeout\"=\n\ \rAdvertiseMode\x12\r\n\tLOW_POWER\x10\0\x12\x0c\n\x08BALANCED\x10\x01\ \x12\x0f\n\x0bLOW_LATENCY\x10\x02\"@\n\x10AdvertiseTxPower\x12\r\n\tULTR\ A_LOW\x10\0\x12\x07\n\x03LOW\x10\x01\x12\n\n\x06MEDIUM\x10\x02\x12\x08\n\ \x04HIGH\x10\x03B\n\n\x08intervalB\n\n\x08tx_power\x1a\xa4\x02\n\rAdvert\ iseData\x12.\n\x13include_device_name\x18\x01\x20\x01(\x08R\x11includeDe\ viceName\x123\n\x16include_tx_power_level\x18\x02\x20\x01(\x08R\x13inclu\ deTxPowerLevel\x12+\n\x11manufacturer_data\x18\x03\x20\x01(\x0cR\x10manu\ facturerData\x12N\n\x08services\x18\x04\x20\x03(\x0b22.netsim.model.Chip\ .BleBeacon.AdvertiseData.ServiceR\x08services\x1a1\n\x07Service\x12\x12\ \n\x04uuid\x18\x01\x20\x01(\tR\x04uuid\x12\x12\n\x04data\x18\x02\x20\x01\ (\x0cR\x04dataB\x06\n\x04chip\"\xdd\x04\n\nChipCreate\x12+\n\x04kind\x18\ \x01\x20\x01(\x0e2\x17.netsim.common.ChipKindR\x04kind\x12\x18\n\x07addr\ ess\x18\x02\x20\x01(\tR\x07address\x12\x12\n\x04name\x18\x03\x20\x01(\tR\ \x04name\x12\"\n\x0cmanufacturer\x18\x04\x20\x01(\tR\x0cmanufacturer\x12\ !\n\x0cproduct_name\x18\x05\x20\x01(\tR\x0bproductName\x12I\n\nble_beaco\ n\x18\x06\x20\x01(\x0b2(.netsim.model.ChipCreate.BleBeaconCreateH\0R\tbl\ eBeacon\x12H\n\rbt_properties\x18\x07\x20\x01(\x0b2#.rootcanal.configura\ tion.ControllerR\x0cbtProperties\x1a\x8f\x02\n\x0fBleBeaconCreate\x12\ \x18\n\x07address\x18\x01\x20\x01(\tR\x07address\x12J\n\x08settings\x18\ \x03\x20\x01(\x0b2..netsim.model.Chip.BleBeacon.AdvertiseSettingsR\x08se\ ttings\x12E\n\x08adv_data\x18\x04\x20\x01(\x0b2*.netsim.model.Chip.BleBe\ acon.AdvertiseDataR\x07advData\x12O\n\rscan_response\x18\x05\x20\x01(\ \x0b2*.netsim.model.Chip.BleBeacon.AdvertiseDataR\x0cscanResponseB\x06\n\ \x04chip\"\xf2\x01\n\x06Device\x12\x0e\n\x02id\x18\x01\x20\x01(\rR\x02id\ \x12\x12\n\x04name\x18\x02\x20\x01(\tR\x04name\x12\x1d\n\x07visible\x18\ \x03\x20\x01(\x08H\0R\x07visible\x88\x01\x01\x122\n\x08position\x18\x04\ \x20\x01(\x0b2\x16.netsim.model.PositionR\x08position\x12;\n\x0borientat\ ion\x18\x05\x20\x01(\x0b2\x19.netsim.model.OrientationR\x0borientation\ \x12(\n\x05chips\x18\x06\x20\x03(\x0b2\x12.netsim.model.ChipR\x05chipsB\ \n\n\x08_visible\"\xc3\x01\n\x0cDeviceCreate\x12\x12\n\x04name\x18\x01\ \x20\x01(\tR\x04name\x122\n\x08position\x18\x02\x20\x01(\x0b2\x16.netsim\ .model.PositionR\x08position\x12;\n\x0borientation\x18\x03\x20\x01(\x0b2\ \x19.netsim.model.OrientationR\x0borientation\x12.\n\x05chips\x18\x04\ \x20\x03(\x0b2\x18.netsim.model.ChipCreateR\x05chips\"7\n\x05Scene\x12.\ \n\x07devices\x18\x01\x20\x03(\x0b2\x14.netsim.model.DeviceR\x07devices\ \"\x93\x02\n\x07Capture\x12\x0e\n\x02id\x18\x01\x20\x01(\rR\x02id\x124\n\ \tchip_kind\x18\x02\x20\x01(\x0e2\x17.netsim.common.ChipKindR\x08chipKin\ d\x12\x1f\n\x0bdevice_name\x18\x03\x20\x01(\tR\ndeviceName\x12\x19\n\x05\ state\x18\x04\x20\x01(\x08H\0R\x05state\x88\x01\x01\x12\x12\n\x04size\ \x18\x05\x20\x01(\x05R\x04size\x12\x18\n\x07records\x18\x06\x20\x01(\x05\ R\x07records\x128\n\ttimestamp\x18\x07\x20\x01(\x0b2\x1a.google.protobuf\ .TimestampR\ttimestamp\x12\x14\n\x05valid\x18\x08\x20\x01(\x08R\x05valid\ B\x08\n\x06_state*e\n\x07PhyKind\x12\x08\n\x04NONE\x10\0\x12\x15\n\x11BL\ UETOOTH_CLASSIC\x10\x01\x12\x18\n\x14BLUETOOTH_LOW_ENERGY\x10\x02\x12\ \x08\n\x04WIFI\x10\x03\x12\x07\n\x03UWB\x10\x04\x12\x0c\n\x08WIFI_RTT\ \x10\x05b\x06proto3\ "; /// `FileDescriptorProto` object which was a source for this generated file fn file_descriptor_proto() -> &'static ::protobuf::descriptor::FileDescriptorProto { static file_descriptor_proto_lazy: ::protobuf::rt::Lazy<::protobuf::descriptor::FileDescriptorProto> = ::protobuf::rt::Lazy::new(); file_descriptor_proto_lazy.get(|| { ::protobuf::Message::parse_from_bytes(file_descriptor_proto_data).unwrap() }) } /// `FileDescriptor` object which allows dynamic access to files pub fn file_descriptor() -> &'static ::protobuf::reflect::FileDescriptor { static generated_file_descriptor_lazy: ::protobuf::rt::Lazy<::protobuf::reflect::GeneratedFileDescriptor> = ::protobuf::rt::Lazy::new(); static file_descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::FileDescriptor> = ::protobuf::rt::Lazy::new(); file_descriptor.get(|| { let generated_file_descriptor = generated_file_descriptor_lazy.get(|| { let mut deps = ::std::vec::Vec::with_capacity(3); deps.push(super::common::file_descriptor().clone()); deps.push(::protobuf::well_known_types::timestamp::file_descriptor().clone()); deps.push(super::configuration::file_descriptor().clone()); let mut messages = ::std::vec::Vec::with_capacity(15); messages.push(Position::generated_message_descriptor_data()); messages.push(Orientation::generated_message_descriptor_data()); messages.push(Chip::generated_message_descriptor_data()); messages.push(ChipCreate::generated_message_descriptor_data()); messages.push(Device::generated_message_descriptor_data()); messages.push(DeviceCreate::generated_message_descriptor_data()); messages.push(Scene::generated_message_descriptor_data()); messages.push(Capture::generated_message_descriptor_data()); messages.push(chip::Radio::generated_message_descriptor_data()); messages.push(chip::Bluetooth::generated_message_descriptor_data()); messages.push(chip::BleBeacon::generated_message_descriptor_data()); messages.push(chip::ble_beacon::AdvertiseSettings::generated_message_descriptor_data()); messages.push(chip::ble_beacon::AdvertiseData::generated_message_descriptor_data()); messages.push(chip::ble_beacon::advertise_data::Service::generated_message_descriptor_data()); messages.push(chip_create::BleBeaconCreate::generated_message_descriptor_data()); let mut enums = ::std::vec::Vec::with_capacity(3); enums.push(PhyKind::generated_enum_descriptor_data()); enums.push(chip::ble_beacon::advertise_settings::AdvertiseMode::generated_enum_descriptor_data()); enums.push(chip::ble_beacon::advertise_settings::AdvertiseTxPower::generated_enum_descriptor_data()); ::protobuf::reflect::GeneratedFileDescriptor::new_generated( file_descriptor_proto(), deps, messages, enums, ) }); ::protobuf::reflect::FileDescriptor::new_generated_2(generated_file_descriptor) }) }