CyberCircuits / nmodbus

http://code.google.com/p/nmodbus
0 stars 0 forks source link

TCP Serial Patch #34

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
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

Attachments:

GoogleCodeExporter commented 9 years ago

Original comment by sja...@gmail.com on 19 Jun 2008 at 12:55