pub struct Simulator { /* private fields */ }Expand description
An NCP simulator. State (the stored network, joined devices, bindings) survives host reconnects, as an NCP’s non-volatile memory survives resets.
Implementations§
Source§impl Simulator
impl Simulator
Sourcepub fn snapshot(&self) -> SimSnapshot
pub fn snapshot(&self) -> SimSnapshot
Everything the simulator holds, for assertions.
Sourcepub fn set_attribute(
&self,
ieee: Ieee,
endpoint: u8,
cluster: u16,
attribute: u16,
value: Value,
) -> usize
pub fn set_attribute( &self, ieee: Ieee, endpoint: u8, cluster: u16, attribute: u16, value: Value, ) -> usize
Set a device attribute, reporting it if the device was configured to. Returns how many reports were sent.
Sourcepub fn send_from(&self, ieee: Ieee, out: Outgoing)
pub fn send_from(&self, ieee: Ieee, out: Outgoing)
A device sends a cluster command frame (a button press, an alarm).
Sourcepub fn add_device(&self, device: SimDevice)
pub fn add_device(&self, device: SimDevice)
Add a device (it joins the next time the network opens).
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Simulator
impl RefUnwindSafe for Simulator
impl Send for Simulator
impl Sync for Simulator
impl Unpin for Simulator
impl UnsafeUnpin for Simulator
impl UnwindSafe for Simulator
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more