Attached is a patch which modifies the TcpStreamAdapter to implement the
ISerialResource interface as discussed at
http://groups.google.com/group/NModbus-discuss/browse_thread/thread/4850e0db3b99
dad4
This provides the following features:
* Ability to use RTU or ASCII over a TCP socket via the now public
TcpStreamAdapter.
* RTU, ASCII and TCP masters now all support ISerialInterface, meaning
that the physical interface and protocol can be chosen independently
without a series of if/else checks with is or as operators.
Further suggestions:
* Rename ISerialResource to IStreamResource
* Remove NewLine and ReadLine() from the ISerialResource interface, and
instead implement the required functionality in the AsciiTransport class,
since this the only place where it is actually required.
Original issue reported on code.google.com by mccle...@googlemail.com on 12 Jun 2008 at 10:54
Original issue reported on code.google.com by
mccle...@googlemail.com
on 12 Jun 2008 at 10:54Attachments: