expliot.core.protocols.internet.mdns¶
Support for discovery on the local network with mDNS.
Submodules¶
Attributes¶
Classes¶
Representation of a discovery entity. |
|
Listener for the detection of zero-configuration devices. |
|
Discover local mDNS devices. |
Package Contents¶
- class expliot.core.protocols.internet.mdns.Discovery¶
Representation of a discovery entity.
- abstractmethod devices()¶
Return the found devices. This should be called after scan().
- Args:
Nothing
- Returns:
list: List of all devices discovered in scan()
- abstractmethod services()¶
Return the found services. This should be called after scan().
- Args:
Nothing
Returns: list: List of all devices discovered in scan()
- abstractmethod scan()¶
Scan for devices or services depending on the Discovery type.
- Args:
Nothing
- Returns:
Nothing
- expliot.core.protocols.internet.mdns.MDNS_SERVICE_TYPES¶
- expliot.core.protocols.internet.mdns.DEFAULT_MDNS_TIMEOUT = 1.0¶
- class expliot.core.protocols.internet.mdns.DeviceDetails¶
Bases:
tuple- name¶
- type¶
- address¶
- port¶
- weight¶
- priority¶
- server¶
- properties¶
- class expliot.core.protocols.internet.mdns.MdnsListener¶
Listener for the detection of zero-configuration devices.
- data = []¶
- remove_service(zeroconf, service_type, name)¶
Callback to remove a service from the Listener.
No action if a device is disappearing.
- Args:
zeroconf(Zeroconf): The Zeroconf Object that has the scanning data. service_type(str): The device service type to be removed. name(str): The device name to be removed.
- Returns:
Nothing
- add_service(zeroconf, service_type, name)¶
Callback to add the service found, in the listener.
- Args:
zeroconf(Zeroconf): The Zeroconf Object that has the scanning data. service_type(str): The device service type. name(str): The device name.
- Returns:
Nothing
- update_service(zeroconf, service_type, name)¶
Callback to update the service.
- get_data()¶
Get all collected announcements.
- Returns (list):
List of the found devices.
- class expliot.core.protocols.internet.mdns.MdnsDiscovery(service_type, scan_timeout=1)¶
Bases:
expliot.core.discovery.DiscoveryDiscover local mDNS devices.
- _service_type¶
- device_list = []¶
- scan_timeout = 1¶
- devices()¶
Returns the found devices.
- Returns:
list: List of devices found
- scan()¶
Scan the network for devices.