View Source Onvif.Discovery (Onvif v0.3.0)
Module for discovering devices on a local network via WS Discovery protocol
Link to this section Summary
Functions
Returns a list of Probe.t()
that have responded via a UDP multicast call
on the local network. Devices on subnets / attached routers won't respond.
Returns a single Probe.t()
or an error based on filter criteria provided.
Link to this section Functions
@spec probe(Keyword.t()) :: [Onvif.Discovery.Probe.t()]
Returns a list of Probe.t()
that have responded via a UDP multicast call
on the local network. Devices on subnets / attached routers won't respond.
Duplicate probes may be returned and it is up to the calling application to choose how to filter out a duplicate.
opts
are a keyword list of options, currently just :probe_timeout
which is
how long the probe will wait between new probe responses before closing out the
listener. There currently is no forced duration so if the network continuously
generates probe messages this has the possibility to hang.
@spec probe_by(Keyword.t() | String.t() | [String.t()]) :: {:error, :invalid_filter | :invalid_mac | :not_found} | {:ok, Onvif.Discovery.Probe.t()}
Returns a single Probe.t()
or an error based on filter criteria provided.
Duplicate matches to the criteria will only return the first probe that responded
to the UDP multicast message. As this uses probe/0
under the hood it is subject to
the same limitations and the default probe timeout.
filter
can be a keyword list containing one of:
serial
- device serial number, not guaranteed to be present
ip_address
- device ip that responded to the onvif multicast
mac_address
- device mac address, not guaranteed to be present. Accepts colon separated, dash separated, and only digits
name
- device name, usually the model number or something manufacturer determined
filter
can also be:
an onvif scope - "onvif://www.onvif.org/scope_name/scope_value"
, not guaranteed to be present
a list of onvif scopes - matches the first one to succeed linking to a probe