![]() |
rodbus (.NET API) 1.3.1
|
Abstract representation of a client communication channel. More...
Public Member Functions | |
| void | Shutdown () |
| Shutdown a ClientChannel and release all resources More... | |
| void | Enable () |
| Enable channel communications More... | |
| void | Disable () |
| Disable channel communications More... | |
| void | SetDecodeLevel (DecodeLevel level) |
| Set the decoding level for the channel More... | |
| Task< System.Collections.Generic.ICollection< BitValue > > | ReadCoils (RequestParam param, AddressRange range) |
| Start an asynchronous request to read coils More... | |
| Task< System.Collections.Generic.ICollection< BitValue > > | ReadDiscreteInputs (RequestParam param, AddressRange range) |
| Start an asynchronous request to read discrete inputs More... | |
| Task< System.Collections.Generic.ICollection< RegisterValue > > | ReadHoldingRegisters (RequestParam param, AddressRange range) |
| Start an asynchronous request to read holding registers More... | |
| Task< System.Collections.Generic.ICollection< RegisterValue > > | ReadInputRegisters (RequestParam param, AddressRange range) |
| Start an asynchronous request to read input registers More... | |
| Task< Nothing > | WriteSingleCoil (RequestParam param, BitValue value) |
| Write a single coil More... | |
| Task< Nothing > | WriteSingleRegister (RequestParam param, RegisterValue value) |
| Write a single register More... | |
| Task< Nothing > | WriteMultipleCoils (RequestParam param, ushort start, System.Collections.Generic.ICollection< bool > items) |
| Write multiple coils More... | |
| Task< Nothing > | WriteMultipleRegisters (RequestParam param, ushort start, System.Collections.Generic.ICollection< ushort > items) |
| Write multiple registers More... | |
Static Public Member Functions | |
| static ClientChannel | CreateTcp (Runtime runtime, string host, ushort port, ushort maxQueuedRequests, RetryStrategy retryStrategy, DecodeLevel decodeLevel, IClientStateListener listener) |
| Create a new TCP channel instance More... | |
| static ClientChannel | CreateRtu (Runtime runtime, string path, SerialPortSettings serialParams, ushort maxQueuedRequests, RetryStrategy retryStrategy, DecodeLevel decodeLevel, IPortStateListener listener) |
| Create a new RTU channel instance More... | |
| static ClientChannel | CreateTls (Runtime runtime, string host, ushort port, ushort maxQueuedRequests, RetryStrategy retryStrategy, TlsClientConfig tlsConfig, DecodeLevel decodeLevel, IClientStateListener listener) |
| Create a new TLS channel instance More... | |
Abstract representation of a client communication channel.
The underlying channel may be TCP, TLS, or serial.
|
inlinestatic |
Create a new RTU channel instance
| runtime | runtime on which to create the channel |
| path | Path to the serial device. Generally /dev/tty0 on Linux and COM1 on Windows. |
| serialParams | Serial port settings |
| maxQueuedRequests | Maximum number of requests to queue before failing the next request |
| retryStrategy | Strategy which controls how long to wait between attempts to open the serial port after failures |
| decodeLevel | Decode levels for this client |
| listener | Listener used to receive updates on the status of the serial port |
| ParamException |
|
inlinestatic |
Create a new TCP channel instance
| runtime | Runtime on which to create the channel |
| host | IP (v4/v6) or host name remote endpoint |
| port | remote port |
| maxQueuedRequests | Maximum number of requests to queue before failing the next request |
| retryStrategy | Reconnection timing strategy |
| decodeLevel | Decode levels for this client |
| listener | TCP connection listener used to receive updates on the status of the channel |
| ParamException |
|
inlinestatic |
Create a new TLS channel instance
| runtime | Runtime on which to create the channel |
| host | IP (v4/v6) or host name remote endpoint |
| port | remote port |
| maxQueuedRequests | Maximum number of requests to queue before failing the next request |
| retryStrategy | Reconnection timing strategy |
| tlsConfig | TLS client configuration |
| decodeLevel | Decode levels for this client |
| listener | TCP connection listener used to receive updates on the status of the channel |
null if an error occurred| ParamException |
|
inline |
Disable channel communications
Warning: May not be called from within the context of the runtime
| ParamException |
|
inline |
Enable channel communications
Warning: May not be called from within the context of the runtime
| ParamException |
|
inline |
Start an asynchronous request to read coils
| param | Parameters for the request |
| range | Range of addresses to read |
System.Threading.Tasks.Task containing: response
The returned Task may fail exceptionally with RequestException
| ParamException |
|
inline |
Start an asynchronous request to read discrete inputs
| param | Parameters for the request |
| range | Range of addresses to read |
System.Threading.Tasks.Task containing: response
The returned Task may fail exceptionally with RequestException
| ParamException |
|
inline |
Start an asynchronous request to read holding registers
| param | Parameters for the request |
| range | Range of addresses to read |
System.Threading.Tasks.Task containing: response
The returned Task may fail exceptionally with RequestException
| ParamException |
|
inline |
Start an asynchronous request to read input registers
| param | Parameters for the request |
| range | Range of addresses to read |
System.Threading.Tasks.Task containing: response
The returned Task may fail exceptionally with RequestException
| ParamException |
|
inline |
Set the decoding level for the channel
| level | Decoding level |
| ParamException |
|
inline |
Shutdown a ClientChannel and release all resources
|
inline |
Write multiple coils
| param | Parameters for the request |
| start | Starting address |
| items | List of items to write |
System.Threading.Tasks.Task containing: response
The returned Task may fail exceptionally with RequestException
| ParamException |
|
inline |
Write multiple registers
| param | Parameters for the request |
| start | Starting address |
| items | List of items to write |
System.Threading.Tasks.Task containing: response
The returned Task may fail exceptionally with RequestException
| ParamException |
|
inline |
Write a single coil
| param | Parameters for the request |
| value | Address and value to write |
System.Threading.Tasks.Task containing: response
The returned Task may fail exceptionally with RequestException
| ParamException |
|
inline |
Write a single register
| param | Parameters for the request |
| value | Address and value to write |
System.Threading.Tasks.Task containing: response
The returned Task may fail exceptionally with RequestException
| ParamException |