aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/hci/bluetooth_chip_emulator.cc3
-rw-r--r--src/proto/startup.proto8
2 files changed, 6 insertions, 5 deletions
diff --git a/src/hci/bluetooth_chip_emulator.cc b/src/hci/bluetooth_chip_emulator.cc
index 2432e846..bc90f93c 100644
--- a/src/hci/bluetooth_chip_emulator.cc
+++ b/src/hci/bluetooth_chip_emulator.cc
@@ -18,6 +18,7 @@
#include <filesystem>
#include <iostream>
#include <memory>
+#include <unordered_map>
#include <utility>
#include "controller/chip.h"
@@ -158,7 +159,7 @@ class BluetoothChipEmulatorImpl : public BluetoothChipEmulator {
}
private:
- std::vector<std::shared_ptr<controller::Chip>> id_to_chip_;
+ std::unordered_map<size_t, std::shared_ptr<controller::Chip>> id_to_chip_;
size_t phy_low_energy_index_;
size_t phy_classic_index_;
diff --git a/src/proto/startup.proto b/src/proto/startup.proto
index e5d3aa50..6840a9a0 100644
--- a/src/proto/startup.proto
+++ b/src/proto/startup.proto
@@ -27,12 +27,12 @@ package netsim.startup;
* netsim -s '
* {"devices": [
* {serial: "emulator-5554",
- * chips: [{type: "WIFI", fdIn: 1, fdOut: 2},
- * {type: "BLUETOOTH", fdIn: 20, fdOut:21}]
+ * chips: [{kind: "WIFI", fdIn: 1, fdOut: 2},
+ * {kind: "BLUETOOTH", fdIn: 20, fdOut:21}]
* },
* {serial: "emulator-5555",
- * chips: [{type: "BLUETOOTH", fdIn: 3, fdOut: 4},
- * {type: "UWB", fdIn: 5, fdOut: 6, model: "DW300"}]
+ * chips: [{kind: "BLUETOOTH", fdIn: 3, fdOut: 4},
+ * {kind: "UWB", fdIn: 5, fdOut: 6, model: "DW300"}]
* }
* ]
* }'