wotpy.protocols.ws.client

Classes that contain the client logic for the Websocket protocol.

Classes

WebsocketClient([receive_timeout_secs, …]) Implementation of the protocol client interface for the Websocket protocol.
class wotpy.protocols.ws.client.WebsocketClient(receive_timeout_secs=1.0, ping_interval=2000)

Bases: wotpy.protocols.client.BaseProtocolClient

Implementation of the protocol client interface for the Websocket protocol.

RECEIVE_LOOP_TERMINATE_SLEEP_SECS = 0.1
SLEEP_AFTER_ERR_SECS = 1.0
invoke_action(td, name, input_value, timeout=None)

Invokes an Action on a remote Thing. Returns a Future.

is_supported_interaction(td, name)

Returns True if the any of the Forms for the Interaction with the given name is supported in this Protocol Binding client.

on_event(td, name)

Subscribes to an event on a remote Thing. Returns an Observable.

on_property_change(td, name)

Subscribes to property changes on a remote Thing. Returns an Observable.

on_td_change(url)

Subscribes to Thing Description changes on a remote Thing. Returns an Observable.

protocol

Protocol of this client instance. A member of the Protocols enum.

read_property(td, name, timeout=None)

Reads the value of a Property on a remote Thing. Returns a Future.

write_property(td, name, value, timeout=None)

Updates the value of a Property on a remote Thing. Returns a Future.