platform_driver.interfaces.modbus module¶
-
class
platform_driver.interfaces.modbus.Interface(**kwargs)[source]¶ Bases:
platform_driver.interfaces.BasicRevert,platform_driver.interfaces.BaseInterface-
configure(config_dict, registry_config_str)[source]¶ Configures the
Interfacefor the specific instance of a device.- Parameters
This method must setup register representations of all points on a device by creating instances of
BaseRegister(or a subclass) and adding them to the Interface withBaseInterface.insert_register().
-
get_point(point_name)[source]¶ Get the current value for the point name given.
- Parameters
point_name (str) – Name of the point to retrieve.
kwargs – Any interface specific parameters.
- Returns
Point value
-
insert_register(register)[source]¶ Inserts a register into the
Interface.- Parameters
register (
BaseRegister) – Register to add to the interface.
-
-
class
platform_driver.interfaces.modbus.ModbusBitRegister(address, type_string, pointName, units, read_only, mixed_endian=False, description='', slave_id=0)[source]¶
-
class
platform_driver.interfaces.modbus.ModbusByteRegister(address, type_string, pointName, units, read_only, mixed_endian=False, description='', slave_id=0)[source]¶
-
exception
platform_driver.interfaces.modbus.ModbusInterfaceException(string)[source]¶ Bases:
pymodbus.exceptions.ModbusException