sgr_commhandler.driver.modbus ============================= .. py:module:: sgr_commhandler.driver.modbus .. autoapi-nested-parse:: Provides the Modbus RTU/TCP interface driver. Submodules ---------- .. toctree:: :maxdepth: 1 /autoapi/sgr_commhandler/driver/modbus/modbus_client_async/index /autoapi/sgr_commhandler/driver/modbus/modbus_interface_async/index /autoapi/sgr_commhandler/driver/modbus/payload_decoder/index /autoapi/sgr_commhandler/driver/modbus/shared_client/index Classes ------- .. autoapisummary:: sgr_commhandler.driver.modbus.ModbusDataPoint sgr_commhandler.driver.modbus.ModbusFunctionalProfile sgr_commhandler.driver.modbus.SGrModbusInterface Package Contents ---------------- .. py:class:: ModbusDataPoint(dp_spec, fp_spec, interface) Bases: :py:obj:`sgr_commhandler.api.data_point_api.DataPointProtocol`\ [\ :py:obj:`sgr_specification.v0.product.ModbusFunctionalProfile`\ , :py:obj:`sgr_specification.v0.product.ModbusDataPoint`\ ] Implements a data point of a Modbus interface. .. py:attribute:: _interface .. py:attribute:: _address :type: int :value: -1 .. py:attribute:: _data_type :type: sgr_specification.v0.product.modbus_types.ModbusDataType .. py:attribute:: _size :value: 0 .. py:attribute:: _register_type :type: sgr_specification.v0.product.modbus_types.RegisterType .. py:method:: set_val(value) :async: .. py:method:: get_val(parameters = None, skip_cache = False) :async: .. py:class:: ModbusFunctionalProfile(fp_spec, interface) Bases: :py:obj:`sgr_commhandler.api.functional_profile_api.FunctionalProfile`\ [\ :py:obj:`sgr_specification.v0.product.ModbusFunctionalProfile`\ ] Implements a functional profile of a Modbus interface. .. py:attribute:: _interface .. py:attribute:: _data_points .. py:method:: get_data_points() .. py:class:: SGrModbusInterface(frame, sharedRTU = False) Bases: :py:obj:`sgr_commhandler.api.device_api.SGrBaseInterface` Implements a Modbus device interface. .. py:attribute:: _client_wrapper :type: sgr_commhandler.driver.modbus.shared_client.ModbusClientWrapper :value: None .. py:attribute:: byte_order .. py:attribute:: address_offset :value: -1 .. py:attribute:: functional_profiles .. py:attribute:: _device_id :value: '' .. py:method:: __del__() .. py:method:: is_connected() .. py:method:: connect_async() :async: .. py:method:: disconnect_async() :async: .. py:method:: read_data(reg_type, address, size, data_type) :async: Reads data from the given Modbus address(es). .. py:method:: write_data(reg_type, address, data_type, value) :async: Writes data to the given Modbus address(es). .. py:method:: set_slave_id(slave_id)