Skip to content

4.1 Rules of using Modbus.Net

parallelbgls edited this page Jun 29, 2017 · 2 revisions

For Utility, both below four ways are permitted.

ModbusUtility modbusUtility = new ModbusUtility(...);

BaseUtility modbusUtility = new ModbusUtility(...);

IUtilityProperty modbusUtility = new ModbusUtility(...);

var modbusUtility = new ModbusUtility(...);

This is because for protocol target using, different users have different focus. Somes want to communicate and others want to define other APIs.

But for machine, only one way is allowed.

IMachineProperty modbusMachine = new ModbusMachine(...);

For Machine, we need to unified all interfaces for easy using and quick shifting, and make our code easy to change. So only interface methods are allowed in high level APIs.

Home

Clone this wiki locally