bumble 0.0.200__py3-none-any.whl → 0.0.202__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (43) hide show
  1. bumble/_version.py +2 -2
  2. bumble/apps/bench.py +138 -93
  3. bumble/apps/rfcomm_bridge.py +10 -1
  4. bumble/att.py +1 -1
  5. bumble/avc.py +2 -0
  6. bumble/gatt_client.py +6 -0
  7. bumble/l2cap.py +1 -0
  8. bumble/link.py +2 -0
  9. bumble/profiles/bap.py +3 -0
  10. bumble/sdp.py +2 -0
  11. bumble/smp.py +1 -1
  12. bumble/transport/android_netsim.py +28 -11
  13. bumble/transport/common.py +4 -2
  14. bumble/transport/grpc_protobuf/netsim/__init__.py +0 -0
  15. bumble/transport/grpc_protobuf/{common_pb2.py → netsim/common_pb2.py} +9 -8
  16. bumble/transport/grpc_protobuf/{common_pb2.pyi → netsim/common_pb2.pyi} +11 -5
  17. bumble/transport/grpc_protobuf/netsim/hci_packet_pb2.py +29 -0
  18. bumble/transport/grpc_protobuf/{hci_packet_pb2.pyi → netsim/hci_packet_pb2.pyi} +13 -7
  19. bumble/transport/grpc_protobuf/netsim/model_pb2.py +63 -0
  20. bumble/transport/grpc_protobuf/netsim/model_pb2.pyi +238 -0
  21. bumble/transport/grpc_protobuf/netsim/packet_streamer_pb2.py +32 -0
  22. bumble/transport/grpc_protobuf/{packet_streamer_pb2.pyi → netsim/packet_streamer_pb2.pyi} +6 -6
  23. bumble/transport/grpc_protobuf/{packet_streamer_pb2_grpc.py → netsim/packet_streamer_pb2_grpc.py} +7 -7
  24. bumble/transport/grpc_protobuf/netsim/startup_pb2.py +41 -0
  25. bumble/transport/grpc_protobuf/netsim/startup_pb2.pyi +76 -0
  26. bumble/transport/grpc_protobuf/netsim/startup_pb2_grpc.py +4 -0
  27. bumble/transport/grpc_protobuf/rootcanal/__init__.py +0 -0
  28. bumble/transport/grpc_protobuf/rootcanal/configuration_pb2.py +39 -0
  29. bumble/transport/grpc_protobuf/rootcanal/configuration_pb2.pyi +78 -0
  30. bumble/transport/grpc_protobuf/rootcanal/configuration_pb2_grpc.py +4 -0
  31. {bumble-0.0.200.dist-info → bumble-0.0.202.dist-info}/METADATA +4 -3
  32. {bumble-0.0.200.dist-info → bumble-0.0.202.dist-info}/RECORD +39 -31
  33. {bumble-0.0.200.dist-info → bumble-0.0.202.dist-info}/WHEEL +1 -1
  34. bumble/transport/grpc_protobuf/hci_packet_pb2.py +0 -28
  35. bumble/transport/grpc_protobuf/packet_streamer_pb2.py +0 -31
  36. bumble/transport/grpc_protobuf/startup_pb2.py +0 -32
  37. bumble/transport/grpc_protobuf/startup_pb2.pyi +0 -46
  38. /bumble/transport/grpc_protobuf/{common_pb2_grpc.py → netsim/common_pb2_grpc.py} +0 -0
  39. /bumble/transport/grpc_protobuf/{hci_packet_pb2_grpc.py → netsim/hci_packet_pb2_grpc.py} +0 -0
  40. /bumble/transport/grpc_protobuf/{startup_pb2_grpc.py → netsim/model_pb2_grpc.py} +0 -0
  41. {bumble-0.0.200.dist-info → bumble-0.0.202.dist-info}/LICENSE +0 -0
  42. {bumble-0.0.200.dist-info → bumble-0.0.202.dist-info}/entry_points.txt +0 -0
  43. {bumble-0.0.200.dist-info → bumble-0.0.202.dist-info}/top_level.txt +0 -0
@@ -20,12 +20,14 @@ import atexit
20
20
  import logging
21
21
  import os
22
22
  import pathlib
23
+ import platform
23
24
  import sys
24
25
  from typing import Dict, Optional
25
26
 
26
27
  import grpc.aio
27
28
 
28
- from .common import (
29
+ import bumble
30
+ from bumble.transport.common import (
29
31
  ParserSource,
30
32
  PumpedTransport,
31
33
  PumpedPacketSource,
@@ -36,15 +38,15 @@ from .common import (
36
38
  )
37
39
 
38
40
  # pylint: disable=no-name-in-module
39
- from .grpc_protobuf.packet_streamer_pb2_grpc import (
41
+ from .grpc_protobuf.netsim.packet_streamer_pb2_grpc import (
40
42
  PacketStreamerStub,
41
43
  PacketStreamerServicer,
42
44
  add_PacketStreamerServicer_to_server,
43
45
  )
44
- from .grpc_protobuf.packet_streamer_pb2 import PacketRequest, PacketResponse
45
- from .grpc_protobuf.hci_packet_pb2 import HCIPacket
46
- from .grpc_protobuf.startup_pb2 import Chip, ChipInfo
47
- from .grpc_protobuf.common_pb2 import ChipKind
46
+ from .grpc_protobuf.netsim.packet_streamer_pb2 import PacketRequest, PacketResponse
47
+ from .grpc_protobuf.netsim.hci_packet_pb2 import HCIPacket
48
+ from .grpc_protobuf.netsim.startup_pb2 import Chip, ChipInfo, DeviceInfo
49
+ from .grpc_protobuf.netsim.common_pb2 import ChipKind
48
50
 
49
51
 
50
52
  # -----------------------------------------------------------------------------
@@ -58,6 +60,7 @@ logger = logging.getLogger(__name__)
58
60
  # -----------------------------------------------------------------------------
59
61
  DEFAULT_NAME = 'bumble0'
60
62
  DEFAULT_MANUFACTURER = 'Bumble'
63
+ DEFAULT_VARIANT = ''
61
64
 
62
65
 
63
66
  # -----------------------------------------------------------------------------
@@ -199,7 +202,6 @@ async def open_android_netsim_controller_transport(
199
202
  data = (
200
203
  bytes([request.hci_packet.packet_type]) + request.hci_packet.packet
201
204
  )
202
- logger.debug(f'<<< PACKET: {data.hex()}')
203
205
  self.on_data_received(data)
204
206
 
205
207
  async def send_packet(self, data):
@@ -253,7 +255,7 @@ async def open_android_netsim_controller_transport(
253
255
 
254
256
  # Check that we don't already have a device
255
257
  if self.device:
256
- logger.debug('busy, already serving a device')
258
+ logger.debug('Busy, already serving a device')
257
259
  return PacketResponse(error='Busy')
258
260
 
259
261
  # Instantiate a new device
@@ -312,16 +314,24 @@ async def open_android_netsim_host_transport_with_channel(
312
314
  ):
313
315
  # Wrapper for I/O operations
314
316
  class HciDevice:
315
- def __init__(self, name, manufacturer, hci_device):
317
+ def __init__(self, name, variant, manufacturer, hci_device):
316
318
  self.name = name
319
+ self.variant = variant
317
320
  self.manufacturer = manufacturer
318
321
  self.hci_device = hci_device
319
322
 
320
323
  async def start(self): # Send the startup info
321
- chip_info = ChipInfo(
324
+ device_info = DeviceInfo(
322
325
  name=self.name,
323
- chip=Chip(kind=ChipKind.BLUETOOTH, manufacturer=self.manufacturer),
326
+ kind='BUMBLE',
327
+ version=bumble.__version__,
328
+ sdk_version=platform.python_version(),
329
+ build_id=platform.platform(),
330
+ arch=platform.machine(),
331
+ variant=self.variant,
324
332
  )
333
+ chip = Chip(kind=ChipKind.BLUETOOTH, manufacturer=self.manufacturer)
334
+ chip_info = ChipInfo(name=self.name, chip=chip, device_info=device_info)
325
335
  logger.debug(f'Sending chip info to netsim: {chip_info}')
326
336
  await self.hci_device.write(PacketRequest(initial_info=chip_info))
327
337
 
@@ -349,12 +359,16 @@ async def open_android_netsim_host_transport_with_channel(
349
359
  )
350
360
 
351
361
  name = DEFAULT_NAME if options is None else options.get('name', DEFAULT_NAME)
362
+ variant = (
363
+ DEFAULT_VARIANT if options is None else options.get('variant', DEFAULT_VARIANT)
364
+ )
352
365
  manufacturer = DEFAULT_MANUFACTURER
353
366
 
354
367
  # Connect as a host
355
368
  service = PacketStreamerStub(channel)
356
369
  hci_device = HciDevice(
357
370
  name=name,
371
+ variant=variant,
358
372
  manufacturer=manufacturer,
359
373
  hci_device=service.StreamPackets(),
360
374
  )
@@ -404,6 +418,9 @@ async def open_android_netsim_transport(spec: Optional[str]) -> Transport:
404
418
  The "chip" name, used to identify the "chip" instance. This
405
419
  may be useful when several clients are connected, since each needs to use a
406
420
  different name.
421
+ variant=<variant>
422
+ The device info variant field, which may be used to convey a device or
423
+ application type (ex: "virtual-speaker", or "keyboard")
407
424
 
408
425
  In `controller` mode:
409
426
  The <host>:<port> part is required. <host> may be the address of a local network
@@ -370,11 +370,13 @@ class PumpedPacketSource(ParserSource):
370
370
  self.parser.feed_data(packet)
371
371
  except asyncio.CancelledError:
372
372
  logger.debug('source pump task done')
373
- self.terminated.set_result(None)
373
+ if not self.terminated.done():
374
+ self.terminated.set_result(None)
374
375
  break
375
376
  except Exception as error:
376
377
  logger.warning(f'exception while waiting for packet: {error}')
377
- self.terminated.set_exception(error)
378
+ if not self.terminated.done():
379
+ self.terminated.set_exception(error)
378
380
  break
379
381
 
380
382
  self.pump_task = asyncio.create_task(pump_packets())
File without changes
@@ -1,11 +1,12 @@
1
1
  # -*- coding: utf-8 -*-
2
2
  # Generated by the protocol buffer compiler. DO NOT EDIT!
3
- # source: common.proto
3
+ # source: netsim/common.proto
4
+ # Protobuf Python Version: 4.25.1
4
5
  """Generated protocol buffer code."""
5
- from google.protobuf.internal import builder as _builder
6
6
  from google.protobuf import descriptor as _descriptor
7
7
  from google.protobuf import descriptor_pool as _descriptor_pool
8
8
  from google.protobuf import symbol_database as _symbol_database
9
+ from google.protobuf.internal import builder as _builder
9
10
  # @@protoc_insertion_point(imports)
10
11
 
11
12
  _sym_db = _symbol_database.Default()
@@ -13,13 +14,13 @@ _sym_db = _symbol_database.Default()
13
14
 
14
15
 
15
16
 
16
- DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x0c\x63ommon.proto\x12\rnetsim.common*=\n\x08\x43hipKind\x12\x0f\n\x0bUNSPECIFIED\x10\x00\x12\r\n\tBLUETOOTH\x10\x01\x12\x08\n\x04WIFI\x10\x02\x12\x07\n\x03UWB\x10\x03\x62\x06proto3')
17
+ DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x13netsim/common.proto\x12\rnetsim.common*S\n\x08\x43hipKind\x12\x0f\n\x0bUNSPECIFIED\x10\x00\x12\r\n\tBLUETOOTH\x10\x01\x12\x08\n\x04WIFI\x10\x02\x12\x07\n\x03UWB\x10\x03\x12\x14\n\x10\x42LUETOOTH_BEACON\x10\x04\x62\x06proto3')
17
18
 
18
- _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, globals())
19
- _builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'common_pb2', globals())
19
+ _globals = globals()
20
+ _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
21
+ _builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'netsim.common_pb2', _globals)
20
22
  if _descriptor._USE_C_DESCRIPTORS == False:
21
-
22
23
  DESCRIPTOR._options = None
23
- _CHIPKIND._serialized_start=31
24
- _CHIPKIND._serialized_end=92
24
+ _globals['_CHIPKIND']._serialized_start=38
25
+ _globals['_CHIPKIND']._serialized_end=121
25
26
  # @@protoc_insertion_point(module_scope)
@@ -2,11 +2,17 @@ from google.protobuf.internal import enum_type_wrapper as _enum_type_wrapper
2
2
  from google.protobuf import descriptor as _descriptor
3
3
  from typing import ClassVar as _ClassVar
4
4
 
5
- BLUETOOTH: ChipKind
6
5
  DESCRIPTOR: _descriptor.FileDescriptor
7
- UNSPECIFIED: ChipKind
8
- UWB: ChipKind
9
- WIFI: ChipKind
10
6
 
11
7
  class ChipKind(int, metaclass=_enum_type_wrapper.EnumTypeWrapper):
12
- __slots__ = []
8
+ __slots__ = ()
9
+ UNSPECIFIED: _ClassVar[ChipKind]
10
+ BLUETOOTH: _ClassVar[ChipKind]
11
+ WIFI: _ClassVar[ChipKind]
12
+ UWB: _ClassVar[ChipKind]
13
+ BLUETOOTH_BEACON: _ClassVar[ChipKind]
14
+ UNSPECIFIED: ChipKind
15
+ BLUETOOTH: ChipKind
16
+ WIFI: ChipKind
17
+ UWB: ChipKind
18
+ BLUETOOTH_BEACON: ChipKind
@@ -0,0 +1,29 @@
1
+ # -*- coding: utf-8 -*-
2
+ # Generated by the protocol buffer compiler. DO NOT EDIT!
3
+ # source: netsim/hci_packet.proto
4
+ # Protobuf Python Version: 4.25.1
5
+ """Generated protocol buffer code."""
6
+ from google.protobuf import descriptor as _descriptor
7
+ from google.protobuf import descriptor_pool as _descriptor_pool
8
+ from google.protobuf import symbol_database as _symbol_database
9
+ from google.protobuf.internal import builder as _builder
10
+ # @@protoc_insertion_point(imports)
11
+
12
+ _sym_db = _symbol_database.Default()
13
+
14
+
15
+
16
+
17
+ DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x17netsim/hci_packet.proto\x12\rnetsim.packet\"\xb2\x01\n\tHCIPacket\x12\x38\n\x0bpacket_type\x18\x01 \x01(\x0e\x32#.netsim.packet.HCIPacket.PacketType\x12\x0e\n\x06packet\x18\x02 \x01(\x0c\"[\n\nPacketType\x12\x1a\n\x16HCI_PACKET_UNSPECIFIED\x10\x00\x12\x0b\n\x07\x43OMMAND\x10\x01\x12\x07\n\x03\x41\x43L\x10\x02\x12\x07\n\x03SCO\x10\x03\x12\t\n\x05\x45VENT\x10\x04\x12\x07\n\x03ISO\x10\x05\x42J\n\x1f\x63om.android.emulation.bluetoothP\x01\xf8\x01\x01\xa2\x02\x03\x41\x45\x42\xaa\x02\x1b\x41ndroid.Emulation.Bluetoothb\x06proto3')
18
+
19
+ _globals = globals()
20
+ _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
21
+ _builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'netsim.hci_packet_pb2', _globals)
22
+ if _descriptor._USE_C_DESCRIPTORS == False:
23
+ _globals['DESCRIPTOR']._options = None
24
+ _globals['DESCRIPTOR']._serialized_options = b'\n\037com.android.emulation.bluetoothP\001\370\001\001\242\002\003AEB\252\002\033Android.Emulation.Bluetooth'
25
+ _globals['_HCIPACKET']._serialized_start=43
26
+ _globals['_HCIPACKET']._serialized_end=221
27
+ _globals['_HCIPACKET_PACKETTYPE']._serialized_start=130
28
+ _globals['_HCIPACKET_PACKETTYPE']._serialized_end=221
29
+ # @@protoc_insertion_point(module_scope)
@@ -6,17 +6,23 @@ from typing import ClassVar as _ClassVar, Optional as _Optional, Union as _Union
6
6
  DESCRIPTOR: _descriptor.FileDescriptor
7
7
 
8
8
  class HCIPacket(_message.Message):
9
- __slots__ = ["packet", "packet_type"]
9
+ __slots__ = ("packet_type", "packet")
10
10
  class PacketType(int, metaclass=_enum_type_wrapper.EnumTypeWrapper):
11
- __slots__ = []
12
- ACL: HCIPacket.PacketType
11
+ __slots__ = ()
12
+ HCI_PACKET_UNSPECIFIED: _ClassVar[HCIPacket.PacketType]
13
+ COMMAND: _ClassVar[HCIPacket.PacketType]
14
+ ACL: _ClassVar[HCIPacket.PacketType]
15
+ SCO: _ClassVar[HCIPacket.PacketType]
16
+ EVENT: _ClassVar[HCIPacket.PacketType]
17
+ ISO: _ClassVar[HCIPacket.PacketType]
18
+ HCI_PACKET_UNSPECIFIED: HCIPacket.PacketType
13
19
  COMMAND: HCIPacket.PacketType
20
+ ACL: HCIPacket.PacketType
21
+ SCO: HCIPacket.PacketType
14
22
  EVENT: HCIPacket.PacketType
15
- HCI_PACKET_UNSPECIFIED: HCIPacket.PacketType
16
23
  ISO: HCIPacket.PacketType
17
- PACKET_FIELD_NUMBER: _ClassVar[int]
18
24
  PACKET_TYPE_FIELD_NUMBER: _ClassVar[int]
19
- SCO: HCIPacket.PacketType
20
- packet: bytes
25
+ PACKET_FIELD_NUMBER: _ClassVar[int]
21
26
  packet_type: HCIPacket.PacketType
27
+ packet: bytes
22
28
  def __init__(self, packet_type: _Optional[_Union[HCIPacket.PacketType, str]] = ..., packet: _Optional[bytes] = ...) -> None: ...
@@ -0,0 +1,63 @@
1
+ # -*- coding: utf-8 -*-
2
+ # Generated by the protocol buffer compiler. DO NOT EDIT!
3
+ # source: netsim/model.proto
4
+ # Protobuf Python Version: 4.25.1
5
+ """Generated protocol buffer code."""
6
+ from google.protobuf import descriptor as _descriptor
7
+ from google.protobuf import descriptor_pool as _descriptor_pool
8
+ from google.protobuf import symbol_database as _symbol_database
9
+ from google.protobuf.internal import builder as _builder
10
+ # @@protoc_insertion_point(imports)
11
+
12
+ _sym_db = _symbol_database.Default()
13
+
14
+
15
+ from bumble.transport.grpc_protobuf.netsim import common_pb2 as netsim_dot_common__pb2
16
+ from google.protobuf import timestamp_pb2 as google_dot_protobuf_dot_timestamp__pb2
17
+ from bumble.transport.grpc_protobuf.rootcanal import configuration_pb2 as rootcanal_dot_configuration__pb2
18
+
19
+
20
+ DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x12netsim/model.proto\x12\x0cnetsim.model\x1a\x13netsim/common.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x1drootcanal/configuration.proto\"+\n\x08Position\x12\t\n\x01x\x18\x01 \x01(\x02\x12\t\n\x01y\x18\x02 \x01(\x02\x12\t\n\x01z\x18\x03 \x01(\x02\"7\n\x0bOrientation\x12\x0b\n\x03yaw\x18\x01 \x01(\x02\x12\r\n\x05pitch\x18\x02 \x01(\x02\x12\x0c\n\x04roll\x18\x03 \x01(\x02\"\x84\x0c\n\x04\x43hip\x12%\n\x04kind\x18\x01 \x01(\x0e\x32\x17.netsim.common.ChipKind\x12\n\n\x02id\x18\x02 \x01(\r\x12\x0c\n\x04name\x18\x03 \x01(\t\x12\x14\n\x0cmanufacturer\x18\x04 \x01(\t\x12\x14\n\x0cproduct_name\x18\x05 \x01(\t\x12*\n\x02\x62t\x18\x06 \x01(\x0b\x32\x1c.netsim.model.Chip.BluetoothH\x00\x12\x32\n\nble_beacon\x18\t \x01(\x0b\x32\x1c.netsim.model.Chip.BleBeaconH\x00\x12\'\n\x03uwb\x18\x07 \x01(\x0b\x32\x18.netsim.model.Chip.RadioH\x00\x12(\n\x04wifi\x18\x08 \x01(\x0b\x32\x18.netsim.model.Chip.RadioH\x00\x12+\n\x06offset\x18\x0f \x01(\x0b\x32\x16.netsim.model.PositionH\x01\x88\x01\x01\x1aX\n\x05Radio\x12\x12\n\x05state\x18\x01 \x01(\x08H\x00\x88\x01\x01\x12\r\n\x05range\x18\x02 \x01(\x02\x12\x10\n\x08tx_count\x18\x03 \x01(\x05\x12\x10\n\x08rx_count\x18\x04 \x01(\x05\x42\x08\n\x06_state\x1a\xb1\x01\n\tBluetooth\x12,\n\nlow_energy\x18\x01 \x01(\x0b\x32\x18.netsim.model.Chip.Radio\x12)\n\x07\x63lassic\x18\x02 \x01(\x0b\x32\x18.netsim.model.Chip.Radio\x12\x0f\n\x07\x61\x64\x64ress\x18\x03 \x01(\t\x12:\n\rbt_properties\x18\x04 \x01(\x0b\x32#.rootcanal.configuration.Controller\x1a\x8d\x07\n\tBleBeacon\x12(\n\x02\x62t\x18\x01 \x01(\x0b\x32\x1c.netsim.model.Chip.Bluetooth\x12\x0f\n\x07\x61\x64\x64ress\x18\x02 \x01(\t\x12@\n\x08settings\x18\x03 \x01(\x0b\x32..netsim.model.Chip.BleBeacon.AdvertiseSettings\x12<\n\x08\x61\x64v_data\x18\x04 \x01(\x0b\x32*.netsim.model.Chip.BleBeacon.AdvertiseData\x12\x41\n\rscan_response\x18\x05 \x01(\x0b\x32*.netsim.model.Chip.BleBeacon.AdvertiseData\x1a\xaa\x03\n\x11\x41\x64vertiseSettings\x12V\n\x0e\x61\x64vertise_mode\x18\x01 \x01(\x0e\x32<.netsim.model.Chip.BleBeacon.AdvertiseSettings.AdvertiseModeH\x00\x12\x16\n\x0cmilliseconds\x18\x02 \x01(\x04H\x00\x12Y\n\x0etx_power_level\x18\x03 \x01(\x0e\x32?.netsim.model.Chip.BleBeacon.AdvertiseSettings.AdvertiseTxPowerH\x01\x12\r\n\x03\x64\x62m\x18\x04 \x01(\x05H\x01\x12\x11\n\tscannable\x18\x05 \x01(\x08\x12\x0f\n\x07timeout\x18\x06 \x01(\x04\"=\n\rAdvertiseMode\x12\r\n\tLOW_POWER\x10\x00\x12\x0c\n\x08\x42\x41LANCED\x10\x01\x12\x0f\n\x0bLOW_LATENCY\x10\x02\"@\n\x10\x41\x64vertiseTxPower\x12\r\n\tULTRA_LOW\x10\x00\x12\x07\n\x03LOW\x10\x01\x12\n\n\x06MEDIUM\x10\x02\x12\x08\n\x04HIGH\x10\x03\x42\n\n\x08intervalB\n\n\x08tx_power\x1a\xd4\x01\n\rAdvertiseData\x12\x1b\n\x13include_device_name\x18\x01 \x01(\x08\x12\x1e\n\x16include_tx_power_level\x18\x02 \x01(\x08\x12\x19\n\x11manufacturer_data\x18\x03 \x01(\x0c\x12\x44\n\x08services\x18\x04 \x03(\x0b\x32\x32.netsim.model.Chip.BleBeacon.AdvertiseData.Service\x1a%\n\x07Service\x12\x0c\n\x04uuid\x18\x01 \x01(\t\x12\x0c\n\x04\x64\x61ta\x18\x02 \x01(\x0c\x42\x06\n\x04\x63hipB\t\n\x07_offset\"\xea\x03\n\nChipCreate\x12%\n\x04kind\x18\x01 \x01(\x0e\x32\x17.netsim.common.ChipKind\x12\x0f\n\x07\x61\x64\x64ress\x18\x02 \x01(\t\x12\x0c\n\x04name\x18\x03 \x01(\t\x12\x14\n\x0cmanufacturer\x18\x04 \x01(\t\x12\x14\n\x0cproduct_name\x18\x05 \x01(\t\x12>\n\nble_beacon\x18\x06 \x01(\x0b\x32(.netsim.model.ChipCreate.BleBeaconCreateH\x00\x12:\n\rbt_properties\x18\x07 \x01(\x0b\x32#.rootcanal.configuration.Controller\x1a\xe5\x01\n\x0f\x42leBeaconCreate\x12\x0f\n\x07\x61\x64\x64ress\x18\x01 \x01(\t\x12@\n\x08settings\x18\x03 \x01(\x0b\x32..netsim.model.Chip.BleBeacon.AdvertiseSettings\x12<\n\x08\x61\x64v_data\x18\x04 \x01(\x0b\x32*.netsim.model.Chip.BleBeacon.AdvertiseData\x12\x41\n\rscan_response\x18\x05 \x01(\x0b\x32*.netsim.model.Chip.BleBeacon.AdvertiseDataB\x06\n\x04\x63hip\"\xc1\x01\n\x06\x44\x65vice\x12\n\n\x02id\x18\x01 \x01(\r\x12\x0c\n\x04name\x18\x02 \x01(\t\x12\x14\n\x07visible\x18\x03 \x01(\x08H\x00\x88\x01\x01\x12(\n\x08position\x18\x04 \x01(\x0b\x32\x16.netsim.model.Position\x12.\n\x0borientation\x18\x05 \x01(\x0b\x32\x19.netsim.model.Orientation\x12!\n\x05\x63hips\x18\x06 \x03(\x0b\x32\x12.netsim.model.ChipB\n\n\x08_visible\"\x9f\x01\n\x0c\x44\x65viceCreate\x12\x0c\n\x04name\x18\x01 \x01(\t\x12(\n\x08position\x18\x02 \x01(\x0b\x32\x16.netsim.model.Position\x12.\n\x0borientation\x18\x03 \x01(\x0b\x32\x19.netsim.model.Orientation\x12\'\n\x05\x63hips\x18\x04 \x03(\x0b\x32\x18.netsim.model.ChipCreate\".\n\x05Scene\x12%\n\x07\x64\x65vices\x18\x01 \x03(\x0b\x32\x14.netsim.model.Device\"\xd1\x01\n\x07\x43\x61pture\x12\n\n\x02id\x18\x01 \x01(\r\x12*\n\tchip_kind\x18\x02 \x01(\x0e\x32\x17.netsim.common.ChipKind\x12\x13\n\x0b\x64\x65vice_name\x18\x03 \x01(\t\x12\x12\n\x05state\x18\x04 \x01(\x08H\x00\x88\x01\x01\x12\x0c\n\x04size\x18\x05 \x01(\x05\x12\x0f\n\x07records\x18\x06 \x01(\x05\x12-\n\ttimestamp\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\r\n\x05valid\x18\x08 \x01(\x08\x42\x08\n\x06_state*e\n\x07PhyKind\x12\x08\n\x04NONE\x10\x00\x12\x15\n\x11\x42LUETOOTH_CLASSIC\x10\x01\x12\x18\n\x14\x42LUETOOTH_LOW_ENERGY\x10\x02\x12\x08\n\x04WIFI\x10\x03\x12\x07\n\x03UWB\x10\x04\x12\x0c\n\x08WIFI_RTT\x10\x05\x62\x06proto3')
21
+
22
+ _globals = globals()
23
+ _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
24
+ _builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'netsim.model_pb2', _globals)
25
+ if _descriptor._USE_C_DESCRIPTORS == False:
26
+ DESCRIPTOR._options = None
27
+ _globals['_PHYKIND']._serialized_start=2877
28
+ _globals['_PHYKIND']._serialized_end=2978
29
+ _globals['_POSITION']._serialized_start=121
30
+ _globals['_POSITION']._serialized_end=164
31
+ _globals['_ORIENTATION']._serialized_start=166
32
+ _globals['_ORIENTATION']._serialized_end=221
33
+ _globals['_CHIP']._serialized_start=224
34
+ _globals['_CHIP']._serialized_end=1764
35
+ _globals['_CHIP_RADIO']._serialized_start=565
36
+ _globals['_CHIP_RADIO']._serialized_end=653
37
+ _globals['_CHIP_BLUETOOTH']._serialized_start=656
38
+ _globals['_CHIP_BLUETOOTH']._serialized_end=833
39
+ _globals['_CHIP_BLEBEACON']._serialized_start=836
40
+ _globals['_CHIP_BLEBEACON']._serialized_end=1745
41
+ _globals['_CHIP_BLEBEACON_ADVERTISESETTINGS']._serialized_start=1104
42
+ _globals['_CHIP_BLEBEACON_ADVERTISESETTINGS']._serialized_end=1530
43
+ _globals['_CHIP_BLEBEACON_ADVERTISESETTINGS_ADVERTISEMODE']._serialized_start=1379
44
+ _globals['_CHIP_BLEBEACON_ADVERTISESETTINGS_ADVERTISEMODE']._serialized_end=1440
45
+ _globals['_CHIP_BLEBEACON_ADVERTISESETTINGS_ADVERTISETXPOWER']._serialized_start=1442
46
+ _globals['_CHIP_BLEBEACON_ADVERTISESETTINGS_ADVERTISETXPOWER']._serialized_end=1506
47
+ _globals['_CHIP_BLEBEACON_ADVERTISEDATA']._serialized_start=1533
48
+ _globals['_CHIP_BLEBEACON_ADVERTISEDATA']._serialized_end=1745
49
+ _globals['_CHIP_BLEBEACON_ADVERTISEDATA_SERVICE']._serialized_start=1708
50
+ _globals['_CHIP_BLEBEACON_ADVERTISEDATA_SERVICE']._serialized_end=1745
51
+ _globals['_CHIPCREATE']._serialized_start=1767
52
+ _globals['_CHIPCREATE']._serialized_end=2257
53
+ _globals['_CHIPCREATE_BLEBEACONCREATE']._serialized_start=2020
54
+ _globals['_CHIPCREATE_BLEBEACONCREATE']._serialized_end=2249
55
+ _globals['_DEVICE']._serialized_start=2260
56
+ _globals['_DEVICE']._serialized_end=2453
57
+ _globals['_DEVICECREATE']._serialized_start=2456
58
+ _globals['_DEVICECREATE']._serialized_end=2615
59
+ _globals['_SCENE']._serialized_start=2617
60
+ _globals['_SCENE']._serialized_end=2663
61
+ _globals['_CAPTURE']._serialized_start=2666
62
+ _globals['_CAPTURE']._serialized_end=2875
63
+ # @@protoc_insertion_point(module_scope)
@@ -0,0 +1,238 @@
1
+ from bumble.transport.grpc_protobuf.netsim import common_pb2 as _common_pb2
2
+ from google.protobuf import timestamp_pb2 as _timestamp_pb2
3
+ from bumble.transport.grpc_protobuf.rootcanal import configuration_pb2 as _configuration_pb2
4
+ from google.protobuf.internal import containers as _containers
5
+ from google.protobuf.internal import enum_type_wrapper as _enum_type_wrapper
6
+ from google.protobuf import descriptor as _descriptor
7
+ from google.protobuf import message as _message
8
+ from typing import ClassVar as _ClassVar, Iterable as _Iterable, Mapping as _Mapping, Optional as _Optional, Union as _Union
9
+
10
+ DESCRIPTOR: _descriptor.FileDescriptor
11
+
12
+ class PhyKind(int, metaclass=_enum_type_wrapper.EnumTypeWrapper):
13
+ __slots__ = ()
14
+ NONE: _ClassVar[PhyKind]
15
+ BLUETOOTH_CLASSIC: _ClassVar[PhyKind]
16
+ BLUETOOTH_LOW_ENERGY: _ClassVar[PhyKind]
17
+ WIFI: _ClassVar[PhyKind]
18
+ UWB: _ClassVar[PhyKind]
19
+ WIFI_RTT: _ClassVar[PhyKind]
20
+ NONE: PhyKind
21
+ BLUETOOTH_CLASSIC: PhyKind
22
+ BLUETOOTH_LOW_ENERGY: PhyKind
23
+ WIFI: PhyKind
24
+ UWB: PhyKind
25
+ WIFI_RTT: PhyKind
26
+
27
+ class Position(_message.Message):
28
+ __slots__ = ("x", "y", "z")
29
+ X_FIELD_NUMBER: _ClassVar[int]
30
+ Y_FIELD_NUMBER: _ClassVar[int]
31
+ Z_FIELD_NUMBER: _ClassVar[int]
32
+ x: float
33
+ y: float
34
+ z: float
35
+ def __init__(self, x: _Optional[float] = ..., y: _Optional[float] = ..., z: _Optional[float] = ...) -> None: ...
36
+
37
+ class Orientation(_message.Message):
38
+ __slots__ = ("yaw", "pitch", "roll")
39
+ YAW_FIELD_NUMBER: _ClassVar[int]
40
+ PITCH_FIELD_NUMBER: _ClassVar[int]
41
+ ROLL_FIELD_NUMBER: _ClassVar[int]
42
+ yaw: float
43
+ pitch: float
44
+ roll: float
45
+ def __init__(self, yaw: _Optional[float] = ..., pitch: _Optional[float] = ..., roll: _Optional[float] = ...) -> None: ...
46
+
47
+ class Chip(_message.Message):
48
+ __slots__ = ("kind", "id", "name", "manufacturer", "product_name", "bt", "ble_beacon", "uwb", "wifi", "offset")
49
+ class Radio(_message.Message):
50
+ __slots__ = ("state", "range", "tx_count", "rx_count")
51
+ STATE_FIELD_NUMBER: _ClassVar[int]
52
+ RANGE_FIELD_NUMBER: _ClassVar[int]
53
+ TX_COUNT_FIELD_NUMBER: _ClassVar[int]
54
+ RX_COUNT_FIELD_NUMBER: _ClassVar[int]
55
+ state: bool
56
+ range: float
57
+ tx_count: int
58
+ rx_count: int
59
+ def __init__(self, state: bool = ..., range: _Optional[float] = ..., tx_count: _Optional[int] = ..., rx_count: _Optional[int] = ...) -> None: ...
60
+ class Bluetooth(_message.Message):
61
+ __slots__ = ("low_energy", "classic", "address", "bt_properties")
62
+ LOW_ENERGY_FIELD_NUMBER: _ClassVar[int]
63
+ CLASSIC_FIELD_NUMBER: _ClassVar[int]
64
+ ADDRESS_FIELD_NUMBER: _ClassVar[int]
65
+ BT_PROPERTIES_FIELD_NUMBER: _ClassVar[int]
66
+ low_energy: Chip.Radio
67
+ classic: Chip.Radio
68
+ address: str
69
+ bt_properties: _configuration_pb2.Controller
70
+ def __init__(self, low_energy: _Optional[_Union[Chip.Radio, _Mapping]] = ..., classic: _Optional[_Union[Chip.Radio, _Mapping]] = ..., address: _Optional[str] = ..., bt_properties: _Optional[_Union[_configuration_pb2.Controller, _Mapping]] = ...) -> None: ...
71
+ class BleBeacon(_message.Message):
72
+ __slots__ = ("bt", "address", "settings", "adv_data", "scan_response")
73
+ class AdvertiseSettings(_message.Message):
74
+ __slots__ = ("advertise_mode", "milliseconds", "tx_power_level", "dbm", "scannable", "timeout")
75
+ class AdvertiseMode(int, metaclass=_enum_type_wrapper.EnumTypeWrapper):
76
+ __slots__ = ()
77
+ LOW_POWER: _ClassVar[Chip.BleBeacon.AdvertiseSettings.AdvertiseMode]
78
+ BALANCED: _ClassVar[Chip.BleBeacon.AdvertiseSettings.AdvertiseMode]
79
+ LOW_LATENCY: _ClassVar[Chip.BleBeacon.AdvertiseSettings.AdvertiseMode]
80
+ LOW_POWER: Chip.BleBeacon.AdvertiseSettings.AdvertiseMode
81
+ BALANCED: Chip.BleBeacon.AdvertiseSettings.AdvertiseMode
82
+ LOW_LATENCY: Chip.BleBeacon.AdvertiseSettings.AdvertiseMode
83
+ class AdvertiseTxPower(int, metaclass=_enum_type_wrapper.EnumTypeWrapper):
84
+ __slots__ = ()
85
+ ULTRA_LOW: _ClassVar[Chip.BleBeacon.AdvertiseSettings.AdvertiseTxPower]
86
+ LOW: _ClassVar[Chip.BleBeacon.AdvertiseSettings.AdvertiseTxPower]
87
+ MEDIUM: _ClassVar[Chip.BleBeacon.AdvertiseSettings.AdvertiseTxPower]
88
+ HIGH: _ClassVar[Chip.BleBeacon.AdvertiseSettings.AdvertiseTxPower]
89
+ ULTRA_LOW: Chip.BleBeacon.AdvertiseSettings.AdvertiseTxPower
90
+ LOW: Chip.BleBeacon.AdvertiseSettings.AdvertiseTxPower
91
+ MEDIUM: Chip.BleBeacon.AdvertiseSettings.AdvertiseTxPower
92
+ HIGH: Chip.BleBeacon.AdvertiseSettings.AdvertiseTxPower
93
+ ADVERTISE_MODE_FIELD_NUMBER: _ClassVar[int]
94
+ MILLISECONDS_FIELD_NUMBER: _ClassVar[int]
95
+ TX_POWER_LEVEL_FIELD_NUMBER: _ClassVar[int]
96
+ DBM_FIELD_NUMBER: _ClassVar[int]
97
+ SCANNABLE_FIELD_NUMBER: _ClassVar[int]
98
+ TIMEOUT_FIELD_NUMBER: _ClassVar[int]
99
+ advertise_mode: Chip.BleBeacon.AdvertiseSettings.AdvertiseMode
100
+ milliseconds: int
101
+ tx_power_level: Chip.BleBeacon.AdvertiseSettings.AdvertiseTxPower
102
+ dbm: int
103
+ scannable: bool
104
+ timeout: int
105
+ def __init__(self, advertise_mode: _Optional[_Union[Chip.BleBeacon.AdvertiseSettings.AdvertiseMode, str]] = ..., milliseconds: _Optional[int] = ..., tx_power_level: _Optional[_Union[Chip.BleBeacon.AdvertiseSettings.AdvertiseTxPower, str]] = ..., dbm: _Optional[int] = ..., scannable: bool = ..., timeout: _Optional[int] = ...) -> None: ...
106
+ class AdvertiseData(_message.Message):
107
+ __slots__ = ("include_device_name", "include_tx_power_level", "manufacturer_data", "services")
108
+ class Service(_message.Message):
109
+ __slots__ = ("uuid", "data")
110
+ UUID_FIELD_NUMBER: _ClassVar[int]
111
+ DATA_FIELD_NUMBER: _ClassVar[int]
112
+ uuid: str
113
+ data: bytes
114
+ def __init__(self, uuid: _Optional[str] = ..., data: _Optional[bytes] = ...) -> None: ...
115
+ INCLUDE_DEVICE_NAME_FIELD_NUMBER: _ClassVar[int]
116
+ INCLUDE_TX_POWER_LEVEL_FIELD_NUMBER: _ClassVar[int]
117
+ MANUFACTURER_DATA_FIELD_NUMBER: _ClassVar[int]
118
+ SERVICES_FIELD_NUMBER: _ClassVar[int]
119
+ include_device_name: bool
120
+ include_tx_power_level: bool
121
+ manufacturer_data: bytes
122
+ services: _containers.RepeatedCompositeFieldContainer[Chip.BleBeacon.AdvertiseData.Service]
123
+ def __init__(self, include_device_name: bool = ..., include_tx_power_level: bool = ..., manufacturer_data: _Optional[bytes] = ..., services: _Optional[_Iterable[_Union[Chip.BleBeacon.AdvertiseData.Service, _Mapping]]] = ...) -> None: ...
124
+ BT_FIELD_NUMBER: _ClassVar[int]
125
+ ADDRESS_FIELD_NUMBER: _ClassVar[int]
126
+ SETTINGS_FIELD_NUMBER: _ClassVar[int]
127
+ ADV_DATA_FIELD_NUMBER: _ClassVar[int]
128
+ SCAN_RESPONSE_FIELD_NUMBER: _ClassVar[int]
129
+ bt: Chip.Bluetooth
130
+ address: str
131
+ settings: Chip.BleBeacon.AdvertiseSettings
132
+ adv_data: Chip.BleBeacon.AdvertiseData
133
+ scan_response: Chip.BleBeacon.AdvertiseData
134
+ def __init__(self, bt: _Optional[_Union[Chip.Bluetooth, _Mapping]] = ..., address: _Optional[str] = ..., settings: _Optional[_Union[Chip.BleBeacon.AdvertiseSettings, _Mapping]] = ..., adv_data: _Optional[_Union[Chip.BleBeacon.AdvertiseData, _Mapping]] = ..., scan_response: _Optional[_Union[Chip.BleBeacon.AdvertiseData, _Mapping]] = ...) -> None: ...
135
+ KIND_FIELD_NUMBER: _ClassVar[int]
136
+ ID_FIELD_NUMBER: _ClassVar[int]
137
+ NAME_FIELD_NUMBER: _ClassVar[int]
138
+ MANUFACTURER_FIELD_NUMBER: _ClassVar[int]
139
+ PRODUCT_NAME_FIELD_NUMBER: _ClassVar[int]
140
+ BT_FIELD_NUMBER: _ClassVar[int]
141
+ BLE_BEACON_FIELD_NUMBER: _ClassVar[int]
142
+ UWB_FIELD_NUMBER: _ClassVar[int]
143
+ WIFI_FIELD_NUMBER: _ClassVar[int]
144
+ OFFSET_FIELD_NUMBER: _ClassVar[int]
145
+ kind: _common_pb2.ChipKind
146
+ id: int
147
+ name: str
148
+ manufacturer: str
149
+ product_name: str
150
+ bt: Chip.Bluetooth
151
+ ble_beacon: Chip.BleBeacon
152
+ uwb: Chip.Radio
153
+ wifi: Chip.Radio
154
+ offset: Position
155
+ def __init__(self, kind: _Optional[_Union[_common_pb2.ChipKind, str]] = ..., id: _Optional[int] = ..., name: _Optional[str] = ..., manufacturer: _Optional[str] = ..., product_name: _Optional[str] = ..., bt: _Optional[_Union[Chip.Bluetooth, _Mapping]] = ..., ble_beacon: _Optional[_Union[Chip.BleBeacon, _Mapping]] = ..., uwb: _Optional[_Union[Chip.Radio, _Mapping]] = ..., wifi: _Optional[_Union[Chip.Radio, _Mapping]] = ..., offset: _Optional[_Union[Position, _Mapping]] = ...) -> None: ...
156
+
157
+ class ChipCreate(_message.Message):
158
+ __slots__ = ("kind", "address", "name", "manufacturer", "product_name", "ble_beacon", "bt_properties")
159
+ class BleBeaconCreate(_message.Message):
160
+ __slots__ = ("address", "settings", "adv_data", "scan_response")
161
+ ADDRESS_FIELD_NUMBER: _ClassVar[int]
162
+ SETTINGS_FIELD_NUMBER: _ClassVar[int]
163
+ ADV_DATA_FIELD_NUMBER: _ClassVar[int]
164
+ SCAN_RESPONSE_FIELD_NUMBER: _ClassVar[int]
165
+ address: str
166
+ settings: Chip.BleBeacon.AdvertiseSettings
167
+ adv_data: Chip.BleBeacon.AdvertiseData
168
+ scan_response: Chip.BleBeacon.AdvertiseData
169
+ def __init__(self, address: _Optional[str] = ..., settings: _Optional[_Union[Chip.BleBeacon.AdvertiseSettings, _Mapping]] = ..., adv_data: _Optional[_Union[Chip.BleBeacon.AdvertiseData, _Mapping]] = ..., scan_response: _Optional[_Union[Chip.BleBeacon.AdvertiseData, _Mapping]] = ...) -> None: ...
170
+ KIND_FIELD_NUMBER: _ClassVar[int]
171
+ ADDRESS_FIELD_NUMBER: _ClassVar[int]
172
+ NAME_FIELD_NUMBER: _ClassVar[int]
173
+ MANUFACTURER_FIELD_NUMBER: _ClassVar[int]
174
+ PRODUCT_NAME_FIELD_NUMBER: _ClassVar[int]
175
+ BLE_BEACON_FIELD_NUMBER: _ClassVar[int]
176
+ BT_PROPERTIES_FIELD_NUMBER: _ClassVar[int]
177
+ kind: _common_pb2.ChipKind
178
+ address: str
179
+ name: str
180
+ manufacturer: str
181
+ product_name: str
182
+ ble_beacon: ChipCreate.BleBeaconCreate
183
+ bt_properties: _configuration_pb2.Controller
184
+ def __init__(self, kind: _Optional[_Union[_common_pb2.ChipKind, str]] = ..., address: _Optional[str] = ..., name: _Optional[str] = ..., manufacturer: _Optional[str] = ..., product_name: _Optional[str] = ..., ble_beacon: _Optional[_Union[ChipCreate.BleBeaconCreate, _Mapping]] = ..., bt_properties: _Optional[_Union[_configuration_pb2.Controller, _Mapping]] = ...) -> None: ...
185
+
186
+ class Device(_message.Message):
187
+ __slots__ = ("id", "name", "visible", "position", "orientation", "chips")
188
+ ID_FIELD_NUMBER: _ClassVar[int]
189
+ NAME_FIELD_NUMBER: _ClassVar[int]
190
+ VISIBLE_FIELD_NUMBER: _ClassVar[int]
191
+ POSITION_FIELD_NUMBER: _ClassVar[int]
192
+ ORIENTATION_FIELD_NUMBER: _ClassVar[int]
193
+ CHIPS_FIELD_NUMBER: _ClassVar[int]
194
+ id: int
195
+ name: str
196
+ visible: bool
197
+ position: Position
198
+ orientation: Orientation
199
+ chips: _containers.RepeatedCompositeFieldContainer[Chip]
200
+ def __init__(self, id: _Optional[int] = ..., name: _Optional[str] = ..., visible: bool = ..., position: _Optional[_Union[Position, _Mapping]] = ..., orientation: _Optional[_Union[Orientation, _Mapping]] = ..., chips: _Optional[_Iterable[_Union[Chip, _Mapping]]] = ...) -> None: ...
201
+
202
+ class DeviceCreate(_message.Message):
203
+ __slots__ = ("name", "position", "orientation", "chips")
204
+ NAME_FIELD_NUMBER: _ClassVar[int]
205
+ POSITION_FIELD_NUMBER: _ClassVar[int]
206
+ ORIENTATION_FIELD_NUMBER: _ClassVar[int]
207
+ CHIPS_FIELD_NUMBER: _ClassVar[int]
208
+ name: str
209
+ position: Position
210
+ orientation: Orientation
211
+ chips: _containers.RepeatedCompositeFieldContainer[ChipCreate]
212
+ def __init__(self, name: _Optional[str] = ..., position: _Optional[_Union[Position, _Mapping]] = ..., orientation: _Optional[_Union[Orientation, _Mapping]] = ..., chips: _Optional[_Iterable[_Union[ChipCreate, _Mapping]]] = ...) -> None: ...
213
+
214
+ class Scene(_message.Message):
215
+ __slots__ = ("devices",)
216
+ DEVICES_FIELD_NUMBER: _ClassVar[int]
217
+ devices: _containers.RepeatedCompositeFieldContainer[Device]
218
+ def __init__(self, devices: _Optional[_Iterable[_Union[Device, _Mapping]]] = ...) -> None: ...
219
+
220
+ class Capture(_message.Message):
221
+ __slots__ = ("id", "chip_kind", "device_name", "state", "size", "records", "timestamp", "valid")
222
+ ID_FIELD_NUMBER: _ClassVar[int]
223
+ CHIP_KIND_FIELD_NUMBER: _ClassVar[int]
224
+ DEVICE_NAME_FIELD_NUMBER: _ClassVar[int]
225
+ STATE_FIELD_NUMBER: _ClassVar[int]
226
+ SIZE_FIELD_NUMBER: _ClassVar[int]
227
+ RECORDS_FIELD_NUMBER: _ClassVar[int]
228
+ TIMESTAMP_FIELD_NUMBER: _ClassVar[int]
229
+ VALID_FIELD_NUMBER: _ClassVar[int]
230
+ id: int
231
+ chip_kind: _common_pb2.ChipKind
232
+ device_name: str
233
+ state: bool
234
+ size: int
235
+ records: int
236
+ timestamp: _timestamp_pb2.Timestamp
237
+ valid: bool
238
+ def __init__(self, id: _Optional[int] = ..., chip_kind: _Optional[_Union[_common_pb2.ChipKind, str]] = ..., device_name: _Optional[str] = ..., state: bool = ..., size: _Optional[int] = ..., records: _Optional[int] = ..., timestamp: _Optional[_Union[_timestamp_pb2.Timestamp, _Mapping]] = ..., valid: bool = ...) -> None: ...
@@ -0,0 +1,32 @@
1
+ # -*- coding: utf-8 -*-
2
+ # Generated by the protocol buffer compiler. DO NOT EDIT!
3
+ # source: netsim/packet_streamer.proto
4
+ # Protobuf Python Version: 4.25.1
5
+ """Generated protocol buffer code."""
6
+ from google.protobuf import descriptor as _descriptor
7
+ from google.protobuf import descriptor_pool as _descriptor_pool
8
+ from google.protobuf import symbol_database as _symbol_database
9
+ from google.protobuf.internal import builder as _builder
10
+ # @@protoc_insertion_point(imports)
11
+
12
+ _sym_db = _symbol_database.Default()
13
+
14
+
15
+ from bumble.transport.grpc_protobuf.netsim import hci_packet_pb2 as netsim_dot_hci__packet__pb2
16
+ from bumble.transport.grpc_protobuf.netsim import startup_pb2 as netsim_dot_startup__pb2
17
+
18
+
19
+ DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x1cnetsim/packet_streamer.proto\x12\rnetsim.packet\x1a\x17netsim/hci_packet.proto\x1a\x14netsim/startup.proto\"\x93\x01\n\rPacketRequest\x12\x30\n\x0cinitial_info\x18\x01 \x01(\x0b\x32\x18.netsim.startup.ChipInfoH\x00\x12.\n\nhci_packet\x18\x02 \x01(\x0b\x32\x18.netsim.packet.HCIPacketH\x00\x12\x10\n\x06packet\x18\x03 \x01(\x0cH\x00\x42\x0e\n\x0crequest_type\"t\n\x0ePacketResponse\x12\x0f\n\x05\x65rror\x18\x01 \x01(\tH\x00\x12.\n\nhci_packet\x18\x02 \x01(\x0b\x32\x18.netsim.packet.HCIPacketH\x00\x12\x10\n\x06packet\x18\x03 \x01(\x0cH\x00\x42\x0f\n\rresponse_type2b\n\x0ePacketStreamer\x12P\n\rStreamPackets\x12\x1c.netsim.packet.PacketRequest\x1a\x1d.netsim.packet.PacketResponse(\x01\x30\x01\x62\x06proto3')
20
+
21
+ _globals = globals()
22
+ _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
23
+ _builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'netsim.packet_streamer_pb2', _globals)
24
+ if _descriptor._USE_C_DESCRIPTORS == False:
25
+ DESCRIPTOR._options = None
26
+ _globals['_PACKETREQUEST']._serialized_start=95
27
+ _globals['_PACKETREQUEST']._serialized_end=242
28
+ _globals['_PACKETRESPONSE']._serialized_start=244
29
+ _globals['_PACKETRESPONSE']._serialized_end=360
30
+ _globals['_PACKETSTREAMER']._serialized_start=362
31
+ _globals['_PACKETSTREAMER']._serialized_end=460
32
+ # @@protoc_insertion_point(module_scope)
@@ -1,5 +1,5 @@
1
- from . import hci_packet_pb2 as _hci_packet_pb2
2
- from . import startup_pb2 as _startup_pb2
1
+ from bumble.transport.grpc_protobuf.netsim import hci_packet_pb2 as _hci_packet_pb2
2
+ from bumble.transport.grpc_protobuf.netsim import startup_pb2 as _startup_pb2
3
3
  from google.protobuf import descriptor as _descriptor
4
4
  from google.protobuf import message as _message
5
5
  from typing import ClassVar as _ClassVar, Mapping as _Mapping, Optional as _Optional, Union as _Union
@@ -7,17 +7,17 @@ from typing import ClassVar as _ClassVar, Mapping as _Mapping, Optional as _Opti
7
7
  DESCRIPTOR: _descriptor.FileDescriptor
8
8
 
9
9
  class PacketRequest(_message.Message):
10
- __slots__ = ["hci_packet", "initial_info", "packet"]
11
- HCI_PACKET_FIELD_NUMBER: _ClassVar[int]
10
+ __slots__ = ("initial_info", "hci_packet", "packet")
12
11
  INITIAL_INFO_FIELD_NUMBER: _ClassVar[int]
12
+ HCI_PACKET_FIELD_NUMBER: _ClassVar[int]
13
13
  PACKET_FIELD_NUMBER: _ClassVar[int]
14
- hci_packet: _hci_packet_pb2.HCIPacket
15
14
  initial_info: _startup_pb2.ChipInfo
15
+ hci_packet: _hci_packet_pb2.HCIPacket
16
16
  packet: bytes
17
17
  def __init__(self, initial_info: _Optional[_Union[_startup_pb2.ChipInfo, _Mapping]] = ..., hci_packet: _Optional[_Union[_hci_packet_pb2.HCIPacket, _Mapping]] = ..., packet: _Optional[bytes] = ...) -> None: ...
18
18
 
19
19
  class PacketResponse(_message.Message):
20
- __slots__ = ["error", "hci_packet", "packet"]
20
+ __slots__ = ("error", "hci_packet", "packet")
21
21
  ERROR_FIELD_NUMBER: _ClassVar[int]
22
22
  HCI_PACKET_FIELD_NUMBER: _ClassVar[int]
23
23
  PACKET_FIELD_NUMBER: _ClassVar[int]