pub struct SimulatedNetwork { /* private fields */ }Expand description
Shared simulated radio topology and frame queues.
Implementations§
Source§impl SimulatedNetwork
impl SimulatedNetwork
Sourcepub fn add_radio(&self) -> SimulatedRadio
pub fn add_radio(&self) -> SimulatedRadio
Add a radio with default limits.
Sourcepub fn add_radio_with_config(
&self,
max_frame_size: usize,
t_frame_ms: u32,
) -> SimulatedRadio
pub fn add_radio_with_config( &self, max_frame_size: usize, t_frame_ms: u32, ) -> SimulatedRadio
Add a radio with explicit frame-size and airtime limits.
Sourcepub fn connect_bidirectional(&self, a: usize, b: usize)
pub fn connect_bidirectional(&self, a: usize, b: usize)
Connect two radios in both directions.
Sourcepub fn disconnect(&self, from: usize, to: usize)
pub fn disconnect(&self, from: usize, to: usize)
Remove the directed link from from to to.
Sourcepub fn set_link(
&self,
from: usize,
to: usize,
connected: bool,
rssi: i16,
snr: Snr,
)
pub fn set_link( &self, from: usize, to: usize, connected: bool, rssi: i16, snr: Snr, )
Configure one directed link with explicit signal values.
Sourcepub fn inject_frame(&self, to: usize, frame: &[u8])
pub fn inject_frame(&self, to: usize, frame: &[u8])
Inject a frame directly into one radio’s receive queue.
Trait Implementations§
Source§impl Clone for SimulatedNetwork
impl Clone for SimulatedNetwork
Source§fn clone(&self) -> SimulatedNetwork
fn clone(&self) -> SimulatedNetwork
Returns a duplicate of the value. Read more
1.0.0§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for SimulatedNetwork
impl !RefUnwindSafe for SimulatedNetwork
impl !Send for SimulatedNetwork
impl !Sync for SimulatedNetwork
impl Unpin for SimulatedNetwork
impl !UnwindSafe for SimulatedNetwork
Blanket Implementations§
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§unsafe fn clone_to_uninit(&self, dest: *mut u8)
unsafe fn clone_to_uninit(&self, dest: *mut u8)
🔬This is a nightly-only experimental API. (
clone_to_uninit)