Interface IModbusSlaveNetwork
A network of slave devices on a single transport.
Inherited Members
System.IDisposable.Dispose()
Namespace: NModbus
Assembly: NModbus.dll
Syntax
public interface IModbusSlaveNetwork : IDisposable
Methods
| Improve this Doc View SourceAddSlave(IModbusSlave)
Add a slave to the network.
Declaration
void AddSlave(IModbusSlave slave)
Parameters
Type | Name | Description |
---|---|---|
IModbusSlave | slave |
GetSlave(Byte)
Get a slave from the network.
Declaration
IModbusSlave GetSlave(byte unitId)
Parameters
Type | Name | Description |
---|---|---|
System.Byte | unitId | The slave address |
Returns
Type | Description |
---|---|
IModbusSlave | The specified slave, or null if one can't be found. |
ListenAsync(CancellationToken)
Listen for incoming requests.
Declaration
Task ListenAsync(CancellationToken cancellationToken = default (CancellationToken))
Parameters
Type | Name | Description |
---|---|---|
System.Threading.CancellationToken | cancellationToken |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task |
RemoveSlave(Byte)
Removes a slave from the network.
Declaration
void RemoveSlave(byte unitId)
Parameters
Type | Name | Description |
---|---|---|
System.Byte | unitId |