Rename radio Kind to match existing protos
Test: ninja -C objs netsim
Bug: 308849344
Change-Id: I17c9fe763de7a20d4c5ec1c8ee425104cc1dbff9
diff --git a/proto/netsim/stats.proto b/proto/netsim/stats.proto
index 5124497..0d09d89 100644
--- a/proto/netsim/stats.proto
+++ b/proto/netsim/stats.proto
@@ -21,10 +21,10 @@
// The kind of radio
enum Kind {
UNSPECIFIED = 0;
- BT_LE = 1;
- BT_CLASSIC = 2;
- // BT LE radio used by built-in beacons
- BT_LE_BEACON = 3;
+ BLUETOOTH_LOW_ENERGY = 1;
+ BLUETOOTH_CLASSIC = 2;
+ // built-in BLE beacon
+ BLE_BEACON = 3;
WIFI = 4;
UWB = 5;
NFC = 6;
diff --git a/rust/daemon/src/devices/chip.rs b/rust/daemon/src/devices/chip.rs
index 69dd5d9..c0628dc 100644
--- a/rust/daemon/src/devices/chip.rs
+++ b/rust/daemon/src/devices/chip.rs
@@ -93,18 +93,18 @@
match self.kind {
ProtoChipKind::BLUETOOTH => {
let bt = bluetooth_facade::bluetooth_get(facade_id);
- stats.set_kind(netsim_radio_stats::Kind::BT_LE);
+ stats.set_kind(netsim_radio_stats::Kind::BLUETOOTH_LOW_ENERGY);
stats.set_tx_count(bt.low_energy.tx_count);
stats.set_rx_count(bt.low_energy.rx_count);
vec.push(stats);
stats = ProtoRadioStats::new();
stats.set_duration_secs(self.start.elapsed().as_secs());
- stats.set_kind(netsim_radio_stats::Kind::BT_CLASSIC);
+ stats.set_kind(netsim_radio_stats::Kind::BLUETOOTH_CLASSIC);
stats.set_tx_count(bt.classic.tx_count);
stats.set_rx_count(bt.classic.rx_count);
}
ProtoChipKind::BLUETOOTH_BEACON => {
- stats.set_kind(netsim_radio_stats::Kind::BT_LE_BEACON);
+ stats.set_kind(netsim_radio_stats::Kind::BLE_BEACON);
if let Ok(beacon) = bluetooth_facade::ble_beacon_get(self.id, facade_id) {
stats.set_tx_count(beacon.bt.low_energy.tx_count);
stats.set_rx_count(beacon.bt.low_energy.rx_count);
diff --git a/rust/proto/src/stats.rs b/rust/proto/src/stats.rs
index 736ccab..7943130 100644
--- a/rust/proto/src/stats.rs
+++ b/rust/proto/src/stats.rs
@@ -398,12 +398,12 @@
pub enum Kind {
// @@protoc_insertion_point(enum_value:netsim.stats.NetsimRadioStats.Kind.UNSPECIFIED)
UNSPECIFIED = 0,
- // @@protoc_insertion_point(enum_value:netsim.stats.NetsimRadioStats.Kind.BT_LE)
- BT_LE = 1,
- // @@protoc_insertion_point(enum_value:netsim.stats.NetsimRadioStats.Kind.BT_CLASSIC)
- BT_CLASSIC = 2,
- // @@protoc_insertion_point(enum_value:netsim.stats.NetsimRadioStats.Kind.BT_LE_BEACON)
- BT_LE_BEACON = 3,
+ // @@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)
@@ -422,9 +422,9 @@
fn from_i32(value: i32) -> ::std::option::Option<Kind> {
match value {
0 => ::std::option::Option::Some(Kind::UNSPECIFIED),
- 1 => ::std::option::Option::Some(Kind::BT_LE),
- 2 => ::std::option::Option::Some(Kind::BT_CLASSIC),
- 3 => ::std::option::Option::Some(Kind::BT_LE_BEACON),
+ 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),
@@ -434,9 +434,9 @@
const VALUES: &'static [Kind] = &[
Kind::UNSPECIFIED,
- Kind::BT_LE,
- Kind::BT_CLASSIC,
- Kind::BT_LE_BEACON,
+ Kind::BLUETOOTH_LOW_ENERGY,
+ Kind::BLUETOOTH_CLASSIC,
+ Kind::BLE_BEACON,
Kind::WIFI,
Kind::UWB,
Kind::NFC,
@@ -703,21 +703,21 @@
}
static file_descriptor_proto_data: &'static [u8] = b"\
- \n\x12netsim/stats.proto\x12\x0cnetsim.stats\"\xdb\x02\n\x10NetsimRadioS\
+ \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\"`\n\x04Kind\
- \x12\x0f\n\x0bUNSPECIFIED\x10\0\x12\t\n\x05BT_LE\x10\x01\x12\x0e\n\nBT_C\
- LASSIC\x10\x02\x12\x10\n\x0cBT_LE_BEACON\x10\x03\x12\x08\n\x04WIFI\x10\
- \x04\x12\x07\n\x03UWB\x10\x05\x12\x07\n\x03NFC\x10\x06\"\xce\x01\n\x0bNe\
- tsimStats\x12#\n\rduration_secs\x18\x01\x20\x01(\x04R\x0cdurationSecs\
- \x12!\n\x0cdevice_count\x18\x02\x20\x01(\x05R\x0bdeviceCount\x126\n\x17p\
- eak_concurrent_devices\x18\x03\x20\x01(\x05R\x15peakConcurrentDevices\
- \x12?\n\x0bradio_stats\x18\x04\x20\x03(\x0b2\x1e.netsim.stats.NetsimRadi\
- oStatsR\nradioStats\
+ 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