pymodbus.client.async.factory package

Submodules

pymodbus.client.async.factory.serial module

Factory to create async serial clients based on twisted/tornado/asyncio

pymodbus.client.async.factory.serial.async_io_factory(port=None, framer=None, **kwargs)

Factory to create asyncio based async serial clients :param port: Serial port :param framer: Modbus Framer :param kwargs: Serial port options :return: asyncio event loop and serial client

pymodbus.client.async.factory.serial.get_factory(scheduler)

Gets protocol factory based on the backend scheduler being used :param scheduler: REACTOR/IO_LOOP/ASYNC_IO :return:

pymodbus.client.async.factory.serial.io_loop_factory(port=None, framer=None, **kwargs)

Factory to create Tornado based async serial clients :param port: Serial port :param framer: Modbus Framer :param kwargs: :return: event_loop_thread and tornado future

pymodbus.client.async.factory.serial.reactor_factory(port, framer, **kwargs)

Factory to create twisted serial async client :param port: Serial port :param framer: Modbus Framer :param kwargs: :return: event_loop_thread and twisted serial client

pymodbus.client.async.factory.tcp module

Factory to create async tcp clients based on twisted/tornado/asyncio

pymodbus.client.async.factory.tcp.async_io_factory(host='127.0.0.1', port=502, framer=None, source_address=None, timeout=None, **kwargs)

Factory to create asyncio based async tcp clients :param host: Host IP address :param port: Port :param framer: Modbus Framer :param source_address: Bind address :param timeout: Timeout in seconds :param kwargs: :return: asyncio event loop and tcp client

pymodbus.client.async.factory.tcp.get_factory(scheduler)

Gets protocol factory based on the backend scheduler being used :param scheduler: REACTOR/IO_LOOP/ASYNC_IO :return

pymodbus.client.async.factory.tcp.io_loop_factory(host='127.0.0.1', port=502, framer=None, source_address=None, timeout=None, **kwargs)

Factory to create Tornado based async tcp clients :param host: Host IP address :param port: Port :param framer: Modbus Framer :param source_address: Bind address :param timeout: Timeout in seconds :param kwargs: :return: event_loop_thread and tornado future

pymodbus.client.async.factory.tcp.reactor_factory(host='127.0.0.1', port=502, framer=None, source_address=None, timeout=None, **kwargs)

Factory to create twisted tcp async client :param host: Host IP address :param port: Port :param framer: Modbus Framer :param source_address: Bind address :param timeout: Timeout in seconds :param kwargs: :return: event_loop_thread and twisted_deferred

pymodbus.client.async.factory.udp module

pymodbus.client.async.factory.udp.async_io_factory(host='127.0.0.1', port=502, framer=None, source_address=None, timeout=None, **kwargs)

Factory to create asyncio based async udp clients :param host: Host IP address :param port: Port :param framer: Modbus Framer :param source_address: Bind address :param timeout: Timeout in seconds :param kwargs: :return: asyncio event loop and udp client

pymodbus.client.async.factory.udp.get_factory(scheduler)

Gets protocol factory based on the backend scheduler being used :param scheduler: REACTOR/IO_LOOP/ASYNC_IO :return

pymodbus.client.async.factory.udp.io_loop_factory(host='127.0.0.1', port=502, framer=None, source_address=None, timeout=None, **kwargs)

Factory to create Tornado based async udp clients :param host: Host IP address :param port: Port :param framer: Modbus Framer :param source_address: Bind address :param timeout: Timeout in seconds :param kwargs: :return: event_loop_thread and tornado future

pymodbus.client.async.factory.udp.reactor_factory(host='127.0.0.1', port=502, framer=None, source_address=None, timeout=None, **kwargs)

Factory to create twisted udp async client :param host: Host IP address :param port: Port :param framer: Modbus Framer :param source_address: Bind address :param timeout: Timeout in seconds :param kwargs: :return: event_loop_thread and twisted_deferred