Class ModbusFactory
Inheritance
System.Object
ModbusFactory
Inherited Members
System.Object.ToString()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
Assembly: NModbus.dll
Syntax
public class ModbusFactory : IModbusFactory
Constructors
|
Improve this Doc
View Source
ModbusFactory()
Create a factory which uses the built in standard slave function handlers.
Declaration
|
Improve this Doc
View Source
ModbusFactory(IEnumerable<IModbusFunctionService>, Boolean, IModbusLogger)
Create a factory which optionally uses the built in function services and allows custom services to be added.
Declaration
public ModbusFactory(IEnumerable<IModbusFunctionService> functionServices = null, bool includeBuiltIn = true, IModbusLogger logger = null)
Parameters
Type |
Name |
Description |
System.Collections.Generic.IEnumerable<IModbusFunctionService> |
functionServices |
User provided function services.
|
System.Boolean |
includeBuiltIn |
If true, the built in function services are included. Otherwise, all function services will come from the functionService parameter.
|
IModbusLogger |
logger |
Logger
|
Methods
|
Improve this Doc
View Source
CreateAsciiTransport(IStreamResource)
Declaration
public IModbusAsciiTransport CreateAsciiTransport(IStreamResource streamResource)
Parameters
Returns
|
Improve this Doc
View Source
CreateMaster(IModbusSerialTransport)
Declaration
public IModbusSerialMaster CreateMaster(IModbusSerialTransport transport)
Parameters
Returns
|
Improve this Doc
View Source
CreateMaster(TcpClient)
Declaration
public IModbusMaster CreateMaster(TcpClient client)
Parameters
Type |
Name |
Description |
System.Net.Sockets.TcpClient |
client |
|
Returns
|
Improve this Doc
View Source
CreateMaster(UdpClient)
Declaration
public IModbusMaster CreateMaster(UdpClient client)
Parameters
Type |
Name |
Description |
System.Net.Sockets.UdpClient |
client |
|
Returns
|
Improve this Doc
View Source
CreateRtuTransport(IStreamResource)
Declaration
public IModbusRtuTransport CreateRtuTransport(IStreamResource streamResource)
Parameters
Returns
|
Improve this Doc
View Source
CreateSlave(Byte, ISlaveDataStore)
Declaration
public IModbusSlave CreateSlave(byte unitId, ISlaveDataStore dataStore = null)
Parameters
Returns
|
Improve this Doc
View Source
CreateSlaveNetwork(IModbusAsciiTransport)
Declaration
public IModbusSlaveNetwork CreateSlaveNetwork(IModbusAsciiTransport transport)
Parameters
Returns
|
Improve this Doc
View Source
CreateSlaveNetwork(IModbusRtuTransport)
Declaration
public IModbusSlaveNetwork CreateSlaveNetwork(IModbusRtuTransport transport)
Parameters
Returns
|
Improve this Doc
View Source
CreateSlaveNetwork(TcpListener)
Declaration
public IModbusSlaveNetwork CreateSlaveNetwork(TcpListener tcpListener)
Parameters
Type |
Name |
Description |
System.Net.Sockets.TcpListener |
tcpListener |
|
Returns
|
Improve this Doc
View Source
CreateSlaveNetwork(UdpClient)
Declaration
public IModbusSlaveNetwork CreateSlaveNetwork(UdpClient client)
Parameters
Type |
Name |
Description |
System.Net.Sockets.UdpClient |
client |
|
Returns
|
Improve this Doc
View Source
GetAllFunctionServices()
Declaration
public IModbusFunctionService[] GetAllFunctionServices()
Returns
|
Improve this Doc
View Source
GetFunctionService(Byte)
Declaration
public IModbusFunctionService GetFunctionService(byte functionCode)
Parameters
Type |
Name |
Description |
System.Byte |
functionCode |
|
Returns
Implements
Extension Methods