Struct wemo::DeviceSearch
[−]
[src]
pub struct DeviceSearch { /* fields omitted */ }
Uses UPNP SSDP to discover WeMo devices on the local network.
Methods
impl DeviceSearch
[src]
fn new() -> DeviceSearch
DeviceSearch CTOR.
fn search(&mut self, timeout_ms: u64) -> &HashMap<String, SsdpResponse>
Search for all devices on the network.
fn search_for_serial(
&mut self,
target: &String,
timeout_ms: u64
) -> Option<&SsdpResponse>
&mut self,
target: &String,
timeout_ms: u64
) -> Option<&SsdpResponse>
Search for a particular device by serial number. Exits early when the target device is found.
fn search_for_ip(
&mut self,
target: &IpAddr,
timeout_ms: u64
) -> Option<&SsdpResponse>
&mut self,
target: &IpAddr,
timeout_ms: u64
) -> Option<&SsdpResponse>
Search for a particular device by IP address. Exits early when the target device is found.
fn has_results(&self) -> bool
Whether search results were found.
fn get_results(&self) -> &HashMap<String, SsdpResponse>
Get the results.
fn reset(&mut self)
Reset the search results and search target, if set.
Trait Implementations
impl Handler for DeviceSearch
[src]
type Timeout = Token
type Message = u32
fn ready(
&mut self,
event_loop: &mut EventLoop<DeviceSearch>,
_token: Token,
events: EventSet
)
&mut self,
event_loop: &mut EventLoop<DeviceSearch>,
_token: Token,
events: EventSet
)
Handle events on the socket.
fn timeout(&mut self, event_loop: &mut EventLoop<DeviceSearch>, token: Token)
Manages timeouts: reenqueuing search and overall search timeout.
fn notify(&mut self, event_loop: &mut EventLoop<Self>, msg: Self::Message)
Invoked when a message has been received via the event loop's channel.
fn interrupted(&mut self, event_loop: &mut EventLoop<Self>)
Invoked when EventLoop
has been interrupted by a signal interrupt.
fn tick(&mut self, event_loop: &mut EventLoop<Self>)
Invoked at the end of an event loop tick.