Show / Hide Table of Contents

Interface IModbusFactory

Container for modbus function services.

Namespace: NModbus
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
Type Name Description
IStreamResource streamResource
Returns
Type Description
IModbusAsciiTransport
| Improve this Doc View Source

CreateMaster(IModbusSerialTransport)

Create an rtu master.

Declaration
IModbusSerialMaster CreateMaster(IModbusSerialTransport transport)
Parameters
Type Name Description
IModbusSerialTransport transport
Returns
Type Description
IModbusSerialMaster
| Improve this Doc View Source

CreateMaster(TcpClient)

Declaration
IModbusMaster CreateMaster(TcpClient client)
Parameters
Type Name Description
System.Net.Sockets.TcpClient client
Returns
Type Description
IModbusMaster
| Improve this Doc View Source

CreateMaster(UdpClient)

Create a TCP master.

Declaration
IModbusMaster CreateMaster(UdpClient client)
Parameters
Type Name Description
System.Net.Sockets.UdpClient client
Returns
Type Description
IModbusMaster
| Improve this Doc View Source

CreateRtuTransport(IStreamResource)

Creates an RTU transpoort.

Declaration
IModbusRtuTransport CreateRtuTransport(IStreamResource streamResource)
Parameters
Type Name Description
IStreamResource streamResource
Returns
Type Description
IModbusRtuTransport
| Improve this Doc View Source

CreateSlave(Byte, ISlaveDataStore)

Creates a Modbus Slave.

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
Type Description
IModbusSlave
| Improve this Doc View Source

CreateSlaveNetwork(IModbusAsciiTransport)

Creates an ascii slave network.

Declaration
IModbusSlaveNetwork CreateSlaveNetwork(IModbusAsciiTransport transport)
Parameters
Type Name Description
IModbusAsciiTransport transport

The ascii transport to base this on.

Returns
Type Description
IModbusSlaveNetwork
| Improve this Doc View Source

CreateSlaveNetwork(IModbusRtuTransport)

Creates a slave network based on the RTU transport.

Declaration
IModbusSlaveNetwork CreateSlaveNetwork(IModbusRtuTransport transport)
Parameters
Type Name Description
IModbusRtuTransport transport
Returns
Type Description
IModbusSlaveNetwork
| 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
Type Description
IModbusSlaveNetwork
| 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
Type Description
IModbusSlaveNetwork
| Improve this Doc View Source

GetAllFunctionServices()

Gets all of the services.

Declaration
IModbusFunctionService[] GetAllFunctionServices()
Returns
Type Description
IModbusFunctionService[]
| 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
Type Description
IModbusFunctionService

Extension Methods

FactoryExtensions.CreateRtuMaster(IModbusFactory, IStreamResource)
FactoryExtensions.CreateAsciiMaster(IModbusFactory, IStreamResource)
FactoryExtensions.CreateRtuSlaveNetwork(IModbusFactory, IStreamResource)
FactoryExtensions.CreateAsciiSlaveNetwork(IModbusFactory, IStreamResource)
  • Improve this Doc
  • View Source
Back to top Copyright © 2015-2017 Microsoft
Generated by DocFX