address PR comments

This commit is contained in:
Gilles Boccon-Gibod
2024-10-28 10:13:55 -07:00
parent 2bed50b353
commit fcd6bd7136
16 changed files with 23 additions and 23 deletions
+8 -8
View File
@@ -83,19 +83,19 @@ using the ``--peripheral`` option. The address will be printed by the Peripheral
it starts.
Independently of whether the device is the Central or Peripheral, each device selects a
``mode`` and and ``role`` to run as. The ``mode`` and ``role`` of the Central and Peripheral
``mode`` and and ``scenario`` to run as. The ``mode`` and ``scenario`` of the Central and Peripheral
must be compatible.
Device 1 mode | Device 2 mode
Device 1 scenario | Device 2 scenario
------------------|------------------
``gatt-client`` | ``gatt-server``
``l2cap-client`` | ``l2cap-server``
``rfcomm-client`` | ``rfcomm-server``
Device 1 role | Device 2 role
--------------|--------------
``send`` | ``receive``
``ping`` | ``pong``
Device 1 scenario | Device 2 scenario
------------------|--------------
``send`` | ``receive``
``ping`` | ``pong``
# Examples
@@ -104,7 +104,7 @@ In the following examples, we have two USB Bluetooth controllers, one on `usb:0`
the other on `usb:1`, and two consoles/terminals. We will run a command in each.
!!! example "GATT Throughput"
Using the default mode and role for the Central and Peripheral.
Using the default mode and scenario for the Central and Peripheral.
In the first console/terminal:
```
@@ -179,7 +179,7 @@ the other on `usb:1`, and two consoles/terminals. We will run a command in each.
$ bumble-bench --mode l2cap-server central --phy 2m usb:1
```
!!! example "Reversed roles with L2CAP"
!!! example "Reversed scenarios with L2CAP"
In the first console/terminal:
```
$ bumble-bench --mode l2cap-client --scenario send peripheral usb:0
@@ -41,4 +41,4 @@
<instrumentation
android:name="com.google.android.mobly.snippet.SnippetRunner"
android:targetPackage="com.github.google.bumble.btbench" />
</manifest>
</manifest>
@@ -286,4 +286,4 @@ public class AutomationSnippet implements Snippet {
@Override
public void shutdown() {
}
}
}
@@ -17,4 +17,4 @@ package com.github.google.bumble.btbench
interface IoClient {
fun run()
fun abort()
}
}
@@ -106,4 +106,4 @@ class L2capClient(
override fun waitForCompletion() {
socketClient?.waitForCompletion()
}
}
}
@@ -71,4 +71,4 @@ class L2capServer(
override fun waitForCompletion() {
socketServer?.waitForCompletion()
}
}
}
@@ -471,4 +471,4 @@ fun ActionButton(text: String, onClick: () -> Unit, enabled: Boolean) {
Button(onClick = onClick, enabled = enabled) {
Text(text = text)
}
}
}
@@ -17,4 +17,4 @@ package com.github.google.bumble.btbench
interface Mode {
fun run()
fun waitForCompletion()
}
}
@@ -175,4 +175,4 @@ class SocketDataSource(
} while (true)
Log.info("end of stream")
}
}
}
@@ -1,4 +1,4 @@
// Copyright 2023 Google LLC
// Copyright 2024 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
@@ -1,4 +1,4 @@
// Copyright 2023 Google LLC
// Copyright 2024 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
@@ -39,4 +39,4 @@ class RfcommServer(
override fun waitForCompletion() {
socketServer?.waitForCompletion()
}
}
}
@@ -35,4 +35,4 @@ class Scan(val bluetoothAdapter: BluetoothAdapter) {
bluetoothLeScanner?.stopScan(scanCallback)
}
}
}
}
@@ -86,4 +86,4 @@ class Sender(private val viewModel: AppViewModel, private val packetIO: PacketIO
override fun onSequencePacket(packet: SequencePacket) {
}
}
}
@@ -86,4 +86,4 @@ class SocketClient(
fun waitForCompletion() {
clientThread?.join()
}
}
}
@@ -83,4 +83,4 @@ class SocketServer(
fun waitForCompletion() {
serverThread?.join()
}
}
}