Home
last modified time | relevance | path

Searched refs:ChipIdentifier (Results 1 – 22 of 22) sorted by relevance

/tools/netsim/rust/daemon/src/devices/
Dchip.rs36 pub struct ChipIdentifier(pub u32); struct
40 impl fmt::Display for ChipIdentifier { implementation
46 impl fmt::Debug for ChipIdentifier { implementation
68 chips: RwLock<HashMap<ChipIdentifier, Arc<Chip>>>,
88 pub id: ChipIdentifier,
109 fn next_id(&self) -> ChipIdentifier { in next_id() argument
110 ChipIdentifier(self.ids.fetch_add(1, Ordering::SeqCst)) in next_id()
116 id: ChipIdentifier, in new() argument
176 pub fn get_chip(chip_id: &ChipIdentifier) -> Option<Arc<Chip>> { in get_chip()
181 pub fn remove_chip(chip_id: &ChipIdentifier) -> Option<Arc<Chip>> { in remove_chip()
[all …]
Ddevice.rs19 use crate::devices::chip::ChipIdentifier;
51 pub chips: RwLock<BTreeMap<ChipIdentifier, Arc<Chip>>>,
75 pub chip_id: ChipIdentifier,
183 pub fn remove_chip(&self, chip_id: &ChipIdentifier) -> Result<Vec<ProtoRadioStats>, String> { in remove_chip()
200 chip_id: ChipIdentifier, in add_chip() argument
202 ) -> Result<(DeviceIdentifier, ChipIdentifier), String> { in add_chip() argument
240 let chip_id_1 = ChipIdentifier(IDS.fetch_add(1, Ordering::SeqCst)); in create_test_device()
241 let chip_id_2 = ChipIdentifier(IDS.fetch_add(1, Ordering::SeqCst)); in create_test_device()
Ddevices_handler.rs26 use super::chip::ChipIdentifier;
268 pub fn remove_chip(device_id: DeviceIdentifier, chip_id: ChipIdentifier) -> Result<(), String> { in remove_chip()
307 let chip_id = ChipIdentifier(request.id); in delete_chip()
568 fn get_distance(id: &ChipIdentifier, other_id: &ChipIdentifier) -> Result<f32, String> { in get_distance() argument
589 match get_distance(&ChipIdentifier(a), &ChipIdentifier(b)) { in get_distance_cxx()
599 pub fn get_device(chip_id: &ChipIdentifier) -> anyhow::Result<netsim_proto::model::Device> { in get_device()
1047 chip_id: ChipIdentifier(1), in test_spawn_shutdown_publisher_chip_removed_which_is_not_last_chip()
1057 chip_id: ChipIdentifier(0), in test_spawn_shutdown_publisher_chip_removed_which_is_not_last_chip()
1074 chip_id: ChipIdentifier(0), in test_spawn_shutdown_publisher_last_chip_removed_with_duplicate_event()
1089 chip_id: ChipIdentifier(0), in test_spawn_shutdown_publisher_last_chip_removed_with_duplicate_event()
[all …]
/tools/netsim/rust/daemon/src/wireless/
Dpacket.rs23 use crate::devices::{chip, chip::ChipIdentifier};
54 transports: RwLock<HashMap<ChipIdentifier, Sender<ResponsePacket>>>,
64 pub fn register_transport(chip_id: ChipIdentifier, responder: Box<dyn Response + Send>) { in register_transport() argument
69 pub fn unregister_transport(chip_id: ChipIdentifier) { in unregister_transport() argument
80 chip_id: ChipIdentifier, in register_transport() argument
99 pub fn unregister_transport(&self, chip_id: ChipIdentifier) { in unregister_transport() argument
112 let chip_id = ChipIdentifier(chip_id); in handle_response_cxx()
129 pub fn handle_response(chip_id: ChipIdentifier, packet: &Bytes) { in handle_response() argument
147 pub fn handle_request(chip_id: ChipIdentifier, packet: &Bytes, packet_type: u8) { in handle_request() argument
168 handle_request(ChipIdentifier(chip_id), &packet_bytes, packet_type); in handle_request_cxx()
[all …]
Dble_beacon.rs16 use crate::devices::chip::{ChipIdentifier, FacadeIdentifier};
37 chip_id: ChipIdentifier,
92 pub fn add_chip(params: &CreateParams, chip_id: ChipIdentifier) -> WirelessChipImpl { in add_chip()
102 chip_id: ChipIdentifier(u32::MAX), in add_chip()
Dmocked.rs15 use crate::devices::chip::ChipIdentifier;
61 pub fn add_chip(create_params: &CreateParams, _chip_id: ChipIdentifier) -> WirelessChipImpl { in add_chip()
Dwireless_manager.rs16 devices::chip::ChipIdentifier,
39 pub fn add_chip(create_param: &CreateParam, chip_id: ChipIdentifier) -> WirelessChipImpl { in add_chip()
Dwifi_chip.rs15 use crate::devices::chip::ChipIdentifier;
32 pub chip_id: ChipIdentifier,
Duwb.rs23 use crate::devices::chip::ChipIdentifier;
132 pub fn add_chip(_create_params: &CreateParams, chip_id: ChipIdentifier) -> WirelessChipImpl { in add_chip()
169 add_chip(&CreateParams { address: "test".to_string() }, ChipIdentifier(0)) in add_uwb_wireless_chip()
Dwifi_manager.rs15 use crate::devices::chip::ChipIdentifier;
81 handle_response(ChipIdentifier(id), packet); in medium_callback()
272 pub fn add_chip(_params: &CreateParams, chip_id: ChipIdentifier) -> WirelessChipImpl { in add_chip()
Dbluetooth.rs15 use crate::devices::chip::ChipIdentifier;
175 pub fn add_chip(create_params: &CreateParams, chip_id: ChipIdentifier) -> WirelessChipImpl { in add_chip()
/tools/netsim/rust/daemon/src/captures/
Dcapture.rs44 use crate::devices::chip::ChipIdentifier;
52 id: ChipIdentifier,
80 pub chip_id_to_capture: BTreeMap<ChipIdentifier, Arc<Mutex<CaptureInfo>>>,
86 pub fn new(chip_kind: ChipKind, chip_id: ChipIdentifier, device_name: String) -> Self { in new() argument
169 chip_id: ChipIdentifier,
187 chip_id_to_capture: BTreeMap::<ChipIdentifier, Arc<Mutex<CaptureInfo>>>::new(), in new()
195 chip_id: ChipIdentifier, in send() argument
209 pub fn contains(&self, key: ChipIdentifier) -> bool { in contains()
214 pub fn get(&mut self, key: ChipIdentifier) -> Option<&mut Arc<Mutex<CaptureInfo>>> { in get()
231 pub fn iter(&self) -> Iter<ChipIdentifier, Arc<Mutex<CaptureInfo>>> { in iter() argument
[all …]
Dcaptures_handler.rs40 use crate::devices::chip::ChipIdentifier;
60 fn get_file(id: ChipIdentifier, device_name: String, chip_kind: ChipKind) -> Result<File> { in get_file() argument
72 pub fn get_capture(id: ChipIdentifier) -> anyhow::Result<File> { in get_capture()
97 fn handle_capture_get(writer: ResponseWritable, id: ChipIdentifier) -> anyhow::Result<()> { in handle_capture_get()
166 pub fn patch_capture(id: ChipIdentifier, state: bool) -> anyhow::Result<()> { in patch_capture() argument
186 id: ChipIdentifier, in handle_capture_patch() argument
216 fn get_id(param: &str) -> anyhow::Result<ChipIdentifier> { in get_id() argument
220 .map(ChipIdentifier) in get_id()
253 chip_id: ChipIdentifier, in handle_packet() argument
304 pub fn host_to_controller(chip_id: ChipIdentifier, packet: &Bytes, packet_type: u32) { in host_to_controller() argument
[all …]
/tools/netsim/rust/daemon/src/uwb/
Dranging_estimator.rs19 use crate::devices::{chip::ChipIdentifier, devices_handler::get_device};
28 type State = HashMap<Handle, ChipIdentifier>;
42 pub fn get_chip_id(&self, pica_id: &Handle) -> anyhow::Result<ChipIdentifier> { in get_chip_id() argument
46 pub fn insert(&self, pica_id: Handle, chip_id: ChipIdentifier) { in insert() argument
67 fn handle_to_netsim_model(&self, handle: &Handle) -> Option<(ChipIdentifier, ProtoDevice)> { in handle_to_netsim_model() argument
103 fn is_uwb_state_on(device: &ProtoDevice, chip_id: &ChipIdentifier) -> bool { in is_uwb_state_on()
119 fn create_proto_device_with_uwb_chip(uwb_state: bool) -> (ProtoDevice, ChipIdentifier) { in create_proto_device_with_uwb_chip() argument
134 (proto_device, ChipIdentifier(chip_id)) in create_proto_device_with_uwb_chip()
140 assert!(!is_uwb_state_on(&ProtoDevice::new(), &ChipIdentifier(0))); in test_is_uwb_state_on()
/tools/netsim/rust/daemon/src/bluetooth/
Dbeacon.rs20 use crate::devices::chip::{ChipIdentifier, FacadeIdentifier};
56 RwLock<HashMap<ChipIdentifier, Mutex<UniquePtr<ffi_bluetooth::RustBluetoothChip>>>>,
60 ) -> &'static RwLock<HashMap<ChipIdentifier, Mutex<UniquePtr<ffi_bluetooth::RustBluetoothChip>>>> { in get_bt_chips() argument
65 static BEACON_CHIPS: OnceLock<RwLock<HashMap<ChipIdentifier, Mutex<BeaconChip>>>> = OnceLock::new();
67 pub(crate) fn get_beacon_chips() -> &'static RwLock<HashMap<ChipIdentifier, Mutex<BeaconChip>>> { in get_beacon_chips()
74 chip_id: ChipIdentifier,
86 chip_id: ChipIdentifier, in new() argument
107 chip_id: ChipIdentifier, in from_proto() argument
164 chip_id: ChipIdentifier,
250 chip_id: ChipIdentifier, in ble_beacon_add() argument
[all …]
Dmocked.rs16 use crate::devices::chip::{ChipIdentifier, FacadeIdentifier};
39 chip_id: ChipIdentifier, in ble_beacon_add() argument
61 chip_id: ChipIdentifier, in ble_beacon_remove() argument
Dchip.rs15 use crate::{devices::chip::ChipIdentifier, ffi::ffi_bluetooth::RustBluetoothChip};
47 chip_id: ChipIdentifier, in rust_bluetooth_add() argument
/tools/netsim/rust/daemon/src/
Devents.rs20 use crate::devices::chip::ChipIdentifier;
51 pub chip_id: ChipIdentifier,
59 pub chip_id: ChipIdentifier,
Dsession.rs211 use crate::devices::chip::ChipIdentifier;
395 chip_id: ChipIdentifier(0), in test_start_and_chip_add_and_remove()
405 chip_id: ChipIdentifier(0), in test_start_and_chip_add_and_remove()
/tools/netsim/rust/daemon/src/grpc_server/
Dfrontend.rs16 use crate::devices::chip::ChipIdentifier;
107 let response = match captures_handler::patch_capture(ChipIdentifier(id), state) { in patch_capture()
141 let mut file = match captures_handler::get_capture(ChipIdentifier(req.id)) { in get_capture()
/tools/netsim/rust/daemon/src/transport/
Dsocket.rs18 use crate::devices::chip::{self, ChipIdentifier};
139 fn reader(mut tcp_rx: TcpStream, kind: ChipKind, chip_id: ChipIdentifier) -> std::io::Result<()> { in reader()
Dfd.rs22 use crate::devices::chip::ChipIdentifier;
69 chip_id: ChipIdentifier, in fd_reader() argument
143 let mut fd_vec: Vec<(i32, i32, ChipKind, DeviceIdentifier, ChipIdentifier)> = Vec::new(); in run_fd_transport()