Interface IModbusFactory
Container for modbus function services.
Assembly: NModbus.dll
Syntax
public interface IModbusFactory
Methods
|
Improve this Doc
View Source
CreateAsciiTransport(IStreamResource)
Creates an Ascii Transport.
Declaration
IModbusAsciiTransport CreateAsciiTransport(IStreamResource streamResource)
Parameters
Returns
|
Improve this Doc
View Source
CreateMaster(IModbusSerialTransport)
Declaration
IModbusSerialMaster CreateMaster(IModbusSerialTransport transport)
Parameters
Returns
|
Improve this Doc
View Source
CreateMaster(TcpClient)
Declaration
IModbusMaster CreateMaster(TcpClient client)
Parameters
Type |
Name |
Description |
System.Net.Sockets.TcpClient |
client |
|
Returns
|
Improve this Doc
View Source
CreateMaster(UdpClient)
Declaration
IModbusMaster CreateMaster(UdpClient client)
Parameters
Type |
Name |
Description |
System.Net.Sockets.UdpClient |
client |
|
Returns
|
Improve this Doc
View Source
CreateRtuTransport(IStreamResource)
Creates an RTU transpoort.
Declaration
IModbusRtuTransport CreateRtuTransport(IStreamResource streamResource)
Parameters
Returns
|
Improve this Doc
View Source
CreateSlave(Byte, ISlaveDataStore)
Declaration
IModbusSlave CreateSlave(byte unitId, ISlaveDataStore dataStore = null)
Parameters
Type |
Name |
Description |
System.Byte |
unitId |
The address of this slave on the Modbus network.
|
ISlaveDataStore |
dataStore |
Optionally specify a custom data store for the created slave.
|
Returns
|
Improve this Doc
View Source
CreateSlaveNetwork(IModbusAsciiTransport)
Creates an ascii slave network.
Declaration
IModbusSlaveNetwork CreateSlaveNetwork(IModbusAsciiTransport transport)
Parameters
Returns
|
Improve this Doc
View Source
CreateSlaveNetwork(IModbusRtuTransport)
Creates a slave network based on the RTU transport.
Declaration
IModbusSlaveNetwork CreateSlaveNetwork(IModbusRtuTransport transport)
Parameters
Returns
|
Improve this Doc
View Source
CreateSlaveNetwork(TcpListener)
Create a slave network based on TCP.
Declaration
IModbusSlaveNetwork CreateSlaveNetwork(TcpListener tcpListener)
Parameters
Type |
Name |
Description |
System.Net.Sockets.TcpListener |
tcpListener |
|
Returns
|
Improve this Doc
View Source
CreateSlaveNetwork(UdpClient)
Creates a UDP modbus slave network.
Declaration
IModbusSlaveNetwork CreateSlaveNetwork(UdpClient client)
Parameters
Type |
Name |
Description |
System.Net.Sockets.UdpClient |
client |
|
Returns
|
Improve this Doc
View Source
GetAllFunctionServices()
Gets all of the services.
Declaration
IModbusFunctionService[] GetAllFunctionServices()
Returns
|
Improve this Doc
View Source
GetFunctionService(Byte)
Get the service for a given function code.
Declaration
IModbusFunctionService GetFunctionService(byte functionCode)
Parameters
Type |
Name |
Description |
System.Byte |
functionCode |
|
Returns
Extension Methods