wotpy.protocols.zenoh.runner

Base class for Zenoh handlers.

Classes

ZenohHandlerRunner(router_url, zenoh_handler)

Class that wraps a Zenoh handler.

class wotpy.protocols.zenoh.runner.ZenohHandlerRunner(router_url, zenoh_handler, messages_buffer_size=500, timeout_loops=0.1, sleep_error_reconnect=2.0)

Bases: object

Class that wraps a Zenoh handler. It handles connections to the Zenoh broker, delivers messages, and runs the handler in a loop.

DEFAULT_MSGS_BUF_SIZE = 500
DEFAULT_SLEEP_ERR_RECONN = 2.0
DEFAULT_TIMEOUT_LOOPS_SECS = 0.1
async start()

Starts listening for published messages.

async stop()

Stops listening for published messages.