| // 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/stats.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.stats.NetsimRadioStats) |
| pub struct NetsimRadioStats { |
| // message fields |
| // @@protoc_insertion_point(field:netsim.stats.NetsimRadioStats.device_id) |
| pub device_id: ::std::option::Option<u32>, |
| // @@protoc_insertion_point(field:netsim.stats.NetsimRadioStats.kind) |
| pub kind: ::std::option::Option<::protobuf::EnumOrUnknown<netsim_radio_stats::Kind>>, |
| // @@protoc_insertion_point(field:netsim.stats.NetsimRadioStats.duration_secs) |
| pub duration_secs: ::std::option::Option<u64>, |
| // @@protoc_insertion_point(field:netsim.stats.NetsimRadioStats.tx_count) |
| pub tx_count: ::std::option::Option<i32>, |
| // @@protoc_insertion_point(field:netsim.stats.NetsimRadioStats.rx_count) |
| pub rx_count: ::std::option::Option<i32>, |
| // @@protoc_insertion_point(field:netsim.stats.NetsimRadioStats.tx_bytes) |
| pub tx_bytes: ::std::option::Option<i32>, |
| // @@protoc_insertion_point(field:netsim.stats.NetsimRadioStats.rx_bytes) |
| pub rx_bytes: ::std::option::Option<i32>, |
| // special fields |
| // @@protoc_insertion_point(special_field:netsim.stats.NetsimRadioStats.special_fields) |
| pub special_fields: ::protobuf::SpecialFields, |
| } |
| |
| impl<'a> ::std::default::Default for &'a NetsimRadioStats { |
| fn default() -> &'a NetsimRadioStats { |
| <NetsimRadioStats as ::protobuf::Message>::default_instance() |
| } |
| } |
| |
| impl NetsimRadioStats { |
| pub fn new() -> NetsimRadioStats { |
| ::std::default::Default::default() |
| } |
| |
| // optional uint32 device_id = 1; |
| |
| pub fn device_id(&self) -> u32 { |
| self.device_id.unwrap_or(0) |
| } |
| |
| pub fn clear_device_id(&mut self) { |
| self.device_id = ::std::option::Option::None; |
| } |
| |
| pub fn has_device_id(&self) -> bool { |
| self.device_id.is_some() |
| } |
| |
| // Param is passed by value, moved |
| pub fn set_device_id(&mut self, v: u32) { |
| self.device_id = ::std::option::Option::Some(v); |
| } |
| |
| // optional .netsim.stats.NetsimRadioStats.Kind kind = 2; |
| |
| pub fn kind(&self) -> netsim_radio_stats::Kind { |
| match self.kind { |
| Some(e) => e.enum_value_or(netsim_radio_stats::Kind::UNSPECIFIED), |
| None => netsim_radio_stats::Kind::UNSPECIFIED, |
| } |
| } |
| |
| pub fn clear_kind(&mut self) { |
| self.kind = ::std::option::Option::None; |
| } |
| |
| pub fn has_kind(&self) -> bool { |
| self.kind.is_some() |
| } |
| |
| // Param is passed by value, moved |
| pub fn set_kind(&mut self, v: netsim_radio_stats::Kind) { |
| self.kind = ::std::option::Option::Some(::protobuf::EnumOrUnknown::new(v)); |
| } |
| |
| // optional uint64 duration_secs = 3; |
| |
| pub fn duration_secs(&self) -> u64 { |
| self.duration_secs.unwrap_or(0) |
| } |
| |
| pub fn clear_duration_secs(&mut self) { |
| self.duration_secs = ::std::option::Option::None; |
| } |
| |
| pub fn has_duration_secs(&self) -> bool { |
| self.duration_secs.is_some() |
| } |
| |
| // Param is passed by value, moved |
| pub fn set_duration_secs(&mut self, v: u64) { |
| self.duration_secs = ::std::option::Option::Some(v); |
| } |
| |
| // optional int32 tx_count = 4; |
| |
| pub fn tx_count(&self) -> i32 { |
| self.tx_count.unwrap_or(0) |
| } |
| |
| pub fn clear_tx_count(&mut self) { |
| self.tx_count = ::std::option::Option::None; |
| } |
| |
| pub fn has_tx_count(&self) -> bool { |
| self.tx_count.is_some() |
| } |
| |
| // Param is passed by value, moved |
| pub fn set_tx_count(&mut self, v: i32) { |
| self.tx_count = ::std::option::Option::Some(v); |
| } |
| |
| // optional int32 rx_count = 5; |
| |
| pub fn rx_count(&self) -> i32 { |
| self.rx_count.unwrap_or(0) |
| } |
| |
| pub fn clear_rx_count(&mut self) { |
| self.rx_count = ::std::option::Option::None; |
| } |
| |
| pub fn has_rx_count(&self) -> bool { |
| self.rx_count.is_some() |
| } |
| |
| // Param is passed by value, moved |
| pub fn set_rx_count(&mut self, v: i32) { |
| self.rx_count = ::std::option::Option::Some(v); |
| } |
| |
| // optional int32 tx_bytes = 6; |
| |
| pub fn tx_bytes(&self) -> i32 { |
| self.tx_bytes.unwrap_or(0) |
| } |
| |
| pub fn clear_tx_bytes(&mut self) { |
| self.tx_bytes = ::std::option::Option::None; |
| } |
| |
| pub fn has_tx_bytes(&self) -> bool { |
| self.tx_bytes.is_some() |
| } |
| |
| // Param is passed by value, moved |
| pub fn set_tx_bytes(&mut self, v: i32) { |
| self.tx_bytes = ::std::option::Option::Some(v); |
| } |
| |
| // optional int32 rx_bytes = 7; |
| |
| pub fn rx_bytes(&self) -> i32 { |
| self.rx_bytes.unwrap_or(0) |
| } |
| |
| pub fn clear_rx_bytes(&mut self) { |
| self.rx_bytes = ::std::option::Option::None; |
| } |
| |
| pub fn has_rx_bytes(&self) -> bool { |
| self.rx_bytes.is_some() |
| } |
| |
| // Param is passed by value, moved |
| pub fn set_rx_bytes(&mut self, v: i32) { |
| self.rx_bytes = ::std::option::Option::Some(v); |
| } |
| |
| 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(0); |
| fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( |
| "device_id", |
| |m: &NetsimRadioStats| { &m.device_id }, |
| |m: &mut NetsimRadioStats| { &mut m.device_id }, |
| )); |
| fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( |
| "kind", |
| |m: &NetsimRadioStats| { &m.kind }, |
| |m: &mut NetsimRadioStats| { &mut m.kind }, |
| )); |
| fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( |
| "duration_secs", |
| |m: &NetsimRadioStats| { &m.duration_secs }, |
| |m: &mut NetsimRadioStats| { &mut m.duration_secs }, |
| )); |
| fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( |
| "tx_count", |
| |m: &NetsimRadioStats| { &m.tx_count }, |
| |m: &mut NetsimRadioStats| { &mut m.tx_count }, |
| )); |
| fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( |
| "rx_count", |
| |m: &NetsimRadioStats| { &m.rx_count }, |
| |m: &mut NetsimRadioStats| { &mut m.rx_count }, |
| )); |
| fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( |
| "tx_bytes", |
| |m: &NetsimRadioStats| { &m.tx_bytes }, |
| |m: &mut NetsimRadioStats| { &mut m.tx_bytes }, |
| )); |
| fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( |
| "rx_bytes", |
| |m: &NetsimRadioStats| { &m.rx_bytes }, |
| |m: &mut NetsimRadioStats| { &mut m.rx_bytes }, |
| )); |
| ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::<NetsimRadioStats>( |
| "NetsimRadioStats", |
| fields, |
| oneofs, |
| ) |
| } |
| } |
| |
| impl ::protobuf::Message for NetsimRadioStats { |
| const NAME: &'static str = "NetsimRadioStats"; |
| |
| 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.device_id = ::std::option::Option::Some(is.read_uint32()?); |
| }, |
| 16 => { |
| self.kind = ::std::option::Option::Some(is.read_enum_or_unknown()?); |
| }, |
| 24 => { |
| self.duration_secs = ::std::option::Option::Some(is.read_uint64()?); |
| }, |
| 32 => { |
| self.tx_count = ::std::option::Option::Some(is.read_int32()?); |
| }, |
| 40 => { |
| self.rx_count = ::std::option::Option::Some(is.read_int32()?); |
| }, |
| 48 => { |
| self.tx_bytes = ::std::option::Option::Some(is.read_int32()?); |
| }, |
| 56 => { |
| self.rx_bytes = ::std::option::Option::Some(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.device_id { |
| my_size += ::protobuf::rt::uint32_size(1, v); |
| } |
| if let Some(v) = self.kind { |
| my_size += ::protobuf::rt::int32_size(2, v.value()); |
| } |
| if let Some(v) = self.duration_secs { |
| my_size += ::protobuf::rt::uint64_size(3, v); |
| } |
| if let Some(v) = self.tx_count { |
| my_size += ::protobuf::rt::int32_size(4, v); |
| } |
| if let Some(v) = self.rx_count { |
| my_size += ::protobuf::rt::int32_size(5, v); |
| } |
| if let Some(v) = self.tx_bytes { |
| my_size += ::protobuf::rt::int32_size(6, v); |
| } |
| if let Some(v) = self.rx_bytes { |
| my_size += ::protobuf::rt::int32_size(7, 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 let Some(v) = self.device_id { |
| os.write_uint32(1, v)?; |
| } |
| if let Some(v) = self.kind { |
| os.write_enum(2, ::protobuf::EnumOrUnknown::value(&v))?; |
| } |
| if let Some(v) = self.duration_secs { |
| os.write_uint64(3, v)?; |
| } |
| if let Some(v) = self.tx_count { |
| os.write_int32(4, v)?; |
| } |
| if let Some(v) = self.rx_count { |
| os.write_int32(5, v)?; |
| } |
| if let Some(v) = self.tx_bytes { |
| os.write_int32(6, v)?; |
| } |
| if let Some(v) = self.rx_bytes { |
| os.write_int32(7, 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() -> NetsimRadioStats { |
| NetsimRadioStats::new() |
| } |
| |
| fn clear(&mut self) { |
| self.device_id = ::std::option::Option::None; |
| self.kind = ::std::option::Option::None; |
| self.duration_secs = ::std::option::Option::None; |
| self.tx_count = ::std::option::Option::None; |
| self.rx_count = ::std::option::Option::None; |
| self.tx_bytes = ::std::option::Option::None; |
| self.rx_bytes = ::std::option::Option::None; |
| self.special_fields.clear(); |
| } |
| |
| fn default_instance() -> &'static NetsimRadioStats { |
| static instance: NetsimRadioStats = NetsimRadioStats { |
| device_id: ::std::option::Option::None, |
| kind: ::std::option::Option::None, |
| duration_secs: ::std::option::Option::None, |
| tx_count: ::std::option::Option::None, |
| rx_count: ::std::option::Option::None, |
| tx_bytes: ::std::option::Option::None, |
| rx_bytes: ::std::option::Option::None, |
| special_fields: ::protobuf::SpecialFields::new(), |
| }; |
| &instance |
| } |
| } |
| |
| impl ::protobuf::MessageFull for NetsimRadioStats { |
| 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("NetsimRadioStats").unwrap()).clone() |
| } |
| } |
| |
| impl ::std::fmt::Display for NetsimRadioStats { |
| fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { |
| ::protobuf::text_format::fmt(self, f) |
| } |
| } |
| |
| impl ::protobuf::reflect::ProtobufValue for NetsimRadioStats { |
| type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage<Self>; |
| } |
| |
| /// Nested message and enums of message `NetsimRadioStats` |
| pub mod netsim_radio_stats { |
| #[derive(Clone,Copy,PartialEq,Eq,Debug,Hash)] |
| // @@protoc_insertion_point(enum:netsim.stats.NetsimRadioStats.Kind) |
| pub enum Kind { |
| // @@protoc_insertion_point(enum_value:netsim.stats.NetsimRadioStats.Kind.UNSPECIFIED) |
| UNSPECIFIED = 0, |
| // @@protoc_insertion_point(enum_value:netsim.stats.NetsimRadioStats.Kind.BLUETOOTH_LOW_ENERGY) |
| BLUETOOTH_LOW_ENERGY = 1, |
| // @@protoc_insertion_point(enum_value:netsim.stats.NetsimRadioStats.Kind.BLUETOOTH_CLASSIC) |
| BLUETOOTH_CLASSIC = 2, |
| // @@protoc_insertion_point(enum_value:netsim.stats.NetsimRadioStats.Kind.BLE_BEACON) |
| BLE_BEACON = 3, |
| // @@protoc_insertion_point(enum_value:netsim.stats.NetsimRadioStats.Kind.WIFI) |
| WIFI = 4, |
| // @@protoc_insertion_point(enum_value:netsim.stats.NetsimRadioStats.Kind.UWB) |
| UWB = 5, |
| // @@protoc_insertion_point(enum_value:netsim.stats.NetsimRadioStats.Kind.NFC) |
| NFC = 6, |
| } |
| |
| impl ::protobuf::Enum for Kind { |
| const NAME: &'static str = "Kind"; |
| |
| fn value(&self) -> i32 { |
| *self as i32 |
| } |
| |
| fn from_i32(value: i32) -> ::std::option::Option<Kind> { |
| match value { |
| 0 => ::std::option::Option::Some(Kind::UNSPECIFIED), |
| 1 => ::std::option::Option::Some(Kind::BLUETOOTH_LOW_ENERGY), |
| 2 => ::std::option::Option::Some(Kind::BLUETOOTH_CLASSIC), |
| 3 => ::std::option::Option::Some(Kind::BLE_BEACON), |
| 4 => ::std::option::Option::Some(Kind::WIFI), |
| 5 => ::std::option::Option::Some(Kind::UWB), |
| 6 => ::std::option::Option::Some(Kind::NFC), |
| _ => ::std::option::Option::None |
| } |
| } |
| |
| const VALUES: &'static [Kind] = &[ |
| Kind::UNSPECIFIED, |
| Kind::BLUETOOTH_LOW_ENERGY, |
| Kind::BLUETOOTH_CLASSIC, |
| Kind::BLE_BEACON, |
| Kind::WIFI, |
| Kind::UWB, |
| Kind::NFC, |
| ]; |
| } |
| |
| impl ::protobuf::EnumFull for Kind { |
| fn enum_descriptor() -> ::protobuf::reflect::EnumDescriptor { |
| static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::EnumDescriptor> = ::protobuf::rt::Lazy::new(); |
| descriptor.get(|| super::file_descriptor().enum_by_package_relative_name("NetsimRadioStats.Kind").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 Kind { |
| fn default() -> Self { |
| Kind::UNSPECIFIED |
| } |
| } |
| |
| impl Kind { |
| pub(in super) fn generated_enum_descriptor_data() -> ::protobuf::reflect::GeneratedEnumDescriptorData { |
| ::protobuf::reflect::GeneratedEnumDescriptorData::new::<Kind>("NetsimRadioStats.Kind") |
| } |
| } |
| } |
| |
| #[derive(PartialEq,Clone,Default,Debug)] |
| // @@protoc_insertion_point(message:netsim.stats.NetsimStats) |
| pub struct NetsimStats { |
| // message fields |
| // @@protoc_insertion_point(field:netsim.stats.NetsimStats.duration_secs) |
| pub duration_secs: ::std::option::Option<u64>, |
| // @@protoc_insertion_point(field:netsim.stats.NetsimStats.device_count) |
| pub device_count: ::std::option::Option<i32>, |
| // @@protoc_insertion_point(field:netsim.stats.NetsimStats.peak_concurrent_devices) |
| pub peak_concurrent_devices: ::std::option::Option<i32>, |
| // @@protoc_insertion_point(field:netsim.stats.NetsimStats.radio_stats) |
| pub radio_stats: ::std::vec::Vec<NetsimRadioStats>, |
| // special fields |
| // @@protoc_insertion_point(special_field:netsim.stats.NetsimStats.special_fields) |
| pub special_fields: ::protobuf::SpecialFields, |
| } |
| |
| impl<'a> ::std::default::Default for &'a NetsimStats { |
| fn default() -> &'a NetsimStats { |
| <NetsimStats as ::protobuf::Message>::default_instance() |
| } |
| } |
| |
| impl NetsimStats { |
| pub fn new() -> NetsimStats { |
| ::std::default::Default::default() |
| } |
| |
| // optional uint64 duration_secs = 1; |
| |
| pub fn duration_secs(&self) -> u64 { |
| self.duration_secs.unwrap_or(0) |
| } |
| |
| pub fn clear_duration_secs(&mut self) { |
| self.duration_secs = ::std::option::Option::None; |
| } |
| |
| pub fn has_duration_secs(&self) -> bool { |
| self.duration_secs.is_some() |
| } |
| |
| // Param is passed by value, moved |
| pub fn set_duration_secs(&mut self, v: u64) { |
| self.duration_secs = ::std::option::Option::Some(v); |
| } |
| |
| // optional int32 device_count = 2; |
| |
| pub fn device_count(&self) -> i32 { |
| self.device_count.unwrap_or(0) |
| } |
| |
| pub fn clear_device_count(&mut self) { |
| self.device_count = ::std::option::Option::None; |
| } |
| |
| pub fn has_device_count(&self) -> bool { |
| self.device_count.is_some() |
| } |
| |
| // Param is passed by value, moved |
| pub fn set_device_count(&mut self, v: i32) { |
| self.device_count = ::std::option::Option::Some(v); |
| } |
| |
| // optional int32 peak_concurrent_devices = 3; |
| |
| pub fn peak_concurrent_devices(&self) -> i32 { |
| self.peak_concurrent_devices.unwrap_or(0) |
| } |
| |
| pub fn clear_peak_concurrent_devices(&mut self) { |
| self.peak_concurrent_devices = ::std::option::Option::None; |
| } |
| |
| pub fn has_peak_concurrent_devices(&self) -> bool { |
| self.peak_concurrent_devices.is_some() |
| } |
| |
| // Param is passed by value, moved |
| pub fn set_peak_concurrent_devices(&mut self, v: i32) { |
| self.peak_concurrent_devices = ::std::option::Option::Some(v); |
| } |
| |
| 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::<_, _>( |
| "duration_secs", |
| |m: &NetsimStats| { &m.duration_secs }, |
| |m: &mut NetsimStats| { &mut m.duration_secs }, |
| )); |
| fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( |
| "device_count", |
| |m: &NetsimStats| { &m.device_count }, |
| |m: &mut NetsimStats| { &mut m.device_count }, |
| )); |
| fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( |
| "peak_concurrent_devices", |
| |m: &NetsimStats| { &m.peak_concurrent_devices }, |
| |m: &mut NetsimStats| { &mut m.peak_concurrent_devices }, |
| )); |
| fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>( |
| "radio_stats", |
| |m: &NetsimStats| { &m.radio_stats }, |
| |m: &mut NetsimStats| { &mut m.radio_stats }, |
| )); |
| ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::<NetsimStats>( |
| "NetsimStats", |
| fields, |
| oneofs, |
| ) |
| } |
| } |
| |
| impl ::protobuf::Message for NetsimStats { |
| const NAME: &'static str = "NetsimStats"; |
| |
| 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.duration_secs = ::std::option::Option::Some(is.read_uint64()?); |
| }, |
| 16 => { |
| self.device_count = ::std::option::Option::Some(is.read_int32()?); |
| }, |
| 24 => { |
| self.peak_concurrent_devices = ::std::option::Option::Some(is.read_int32()?); |
| }, |
| 34 => { |
| self.radio_stats.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 let Some(v) = self.duration_secs { |
| my_size += ::protobuf::rt::uint64_size(1, v); |
| } |
| if let Some(v) = self.device_count { |
| my_size += ::protobuf::rt::int32_size(2, v); |
| } |
| if let Some(v) = self.peak_concurrent_devices { |
| my_size += ::protobuf::rt::int32_size(3, v); |
| } |
| for value in &self.radio_stats { |
| 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 let Some(v) = self.duration_secs { |
| os.write_uint64(1, v)?; |
| } |
| if let Some(v) = self.device_count { |
| os.write_int32(2, v)?; |
| } |
| if let Some(v) = self.peak_concurrent_devices { |
| os.write_int32(3, v)?; |
| } |
| for v in &self.radio_stats { |
| ::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() -> NetsimStats { |
| NetsimStats::new() |
| } |
| |
| fn clear(&mut self) { |
| self.duration_secs = ::std::option::Option::None; |
| self.device_count = ::std::option::Option::None; |
| self.peak_concurrent_devices = ::std::option::Option::None; |
| self.radio_stats.clear(); |
| self.special_fields.clear(); |
| } |
| |
| fn default_instance() -> &'static NetsimStats { |
| static instance: NetsimStats = NetsimStats { |
| duration_secs: ::std::option::Option::None, |
| device_count: ::std::option::Option::None, |
| peak_concurrent_devices: ::std::option::Option::None, |
| radio_stats: ::std::vec::Vec::new(), |
| special_fields: ::protobuf::SpecialFields::new(), |
| }; |
| &instance |
| } |
| } |
| |
| impl ::protobuf::MessageFull for NetsimStats { |
| 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("NetsimStats").unwrap()).clone() |
| } |
| } |
| |
| impl ::std::fmt::Display for NetsimStats { |
| fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { |
| ::protobuf::text_format::fmt(self, f) |
| } |
| } |
| |
| impl ::protobuf::reflect::ProtobufValue for NetsimStats { |
| type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage<Self>; |
| } |
| |
| static file_descriptor_proto_data: &'static [u8] = b"\ |
| \n\x12netsim/stats.proto\x12\x0cnetsim.stats\"\xef\x02\n\x10NetsimRadioS\ |
| tats\x12\x1b\n\tdevice_id\x18\x01\x20\x01(\rR\x08deviceId\x127\n\x04kind\ |
| \x18\x02\x20\x01(\x0e2#.netsim.stats.NetsimRadioStats.KindR\x04kind\x12#\ |
| \n\rduration_secs\x18\x03\x20\x01(\x04R\x0cdurationSecs\x12\x19\n\x08tx_\ |
| count\x18\x04\x20\x01(\x05R\x07txCount\x12\x19\n\x08rx_count\x18\x05\x20\ |
| \x01(\x05R\x07rxCount\x12\x19\n\x08tx_bytes\x18\x06\x20\x01(\x05R\x07txB\ |
| ytes\x12\x19\n\x08rx_bytes\x18\x07\x20\x01(\x05R\x07rxBytes\"t\n\x04Kind\ |
| \x12\x0f\n\x0bUNSPECIFIED\x10\0\x12\x18\n\x14BLUETOOTH_LOW_ENERGY\x10\ |
| \x01\x12\x15\n\x11BLUETOOTH_CLASSIC\x10\x02\x12\x0e\n\nBLE_BEACON\x10\ |
| \x03\x12\x08\n\x04WIFI\x10\x04\x12\x07\n\x03UWB\x10\x05\x12\x07\n\x03NFC\ |
| \x10\x06\"\xce\x01\n\x0bNetsimStats\x12#\n\rduration_secs\x18\x01\x20\ |
| \x01(\x04R\x0cdurationSecs\x12!\n\x0cdevice_count\x18\x02\x20\x01(\x05R\ |
| \x0bdeviceCount\x126\n\x17peak_concurrent_devices\x18\x03\x20\x01(\x05R\ |
| \x15peakConcurrentDevices\x12?\n\x0bradio_stats\x18\x04\x20\x03(\x0b2\ |
| \x1e.netsim.stats.NetsimRadioStatsR\nradioStats\ |
| "; |
| |
| /// `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(0); |
| let mut messages = ::std::vec::Vec::with_capacity(2); |
| messages.push(NetsimRadioStats::generated_message_descriptor_data()); |
| messages.push(NetsimStats::generated_message_descriptor_data()); |
| let mut enums = ::std::vec::Vec::with_capacity(1); |
| enums.push(netsim_radio_stats::Kind::generated_enum_descriptor_data()); |
| ::protobuf::reflect::GeneratedFileDescriptor::new_generated( |
| file_descriptor_proto(), |
| deps, |
| messages, |
| enums, |
| ) |
| }); |
| ::protobuf::reflect::FileDescriptor::new_generated_2(generated_file_descriptor) |
| }) |
| } |