/// <summary> /// Creates an ASCII slave network. /// </summary> /// <param name="factory"></param> /// <param name="streamResource"></param> /// <returns></returns> public static IModbusSlaveNetwork CreateAsciiSlaveNetwork(this IModbusFactory factory, IStreamResource streamResource) { IModbusAsciiTransport transport = factory.CreateAsciiTransport(streamResource); return(factory.CreateSlaveNetwork(transport)); }
public IModbusSlaveNetwork CreateSlaveNetwork(IModbusAsciiTransport transport) { return(new ModbusSerialSlaveNetwork(transport, this, Logger)); }
/// <summary> /// Creates an ASCII master. /// </summary> /// <param name="factory"></param> /// <param name="streamResource"></param> /// <returns></returns> public static IModbusSerialMaster CreateAsciiMaster(this IModbusFactory factory, IStreamResource streamResource) { IModbusAsciiTransport transport = factory.CreateAsciiTransport(streamResource); return(new ModbusSerialMaster(transport)); }