Giter Club home page Giter Club logo

Comments (7)

GoogleCodeExporter avatar GoogleCodeExporter commented on August 29, 2024
Yeah, this was a change that I regretfully had to make to support the .NET 
Compact Framework. Several implementations of the CF do not support timeouts; 
the 
properties exist but accessing them causes an exception to occur.

A little more background - The 1.10 behavior was to initialize the read/write 
timeout values to a 1 second if the provided transport object’s (SerialPort, 
TcpClient) timeout was equal to Timeout.Infinte (-1). Obviously this won’t 
work 
for implementations of the CF which don’t support timeouts. I thought about 
using 
a preprocessor directive to only initialize default values when targeting the 
CF 
but by that time the default value initialization strategy started to bother me.

All other settings specific to the underlying transport are controllable by the 
underlying object (e.g. SerialPort BaudRate). A user should expect to be able 
to 
create a SerialPort object, set a timeout value to Timeout.Infinite (-1), pass 
it 
to a ModbusMaster factory method and have those timeout values preserved.

Therefore I ended up deciding to make the change to put the onus of timeout 
initialization on the user.

I should have been more up front about the breaking change. Hope this didn’t 
cause you too much trouble.

Scott

Original comment by [email protected] on 12 May 2009 at 11:46

from nmodbus.

GoogleCodeExporter avatar GoogleCodeExporter commented on August 29, 2024

Original comment by [email protected] on 12 May 2009 at 11:47

  • Changed state: WontFix

from nmodbus.

GoogleCodeExporter avatar GoogleCodeExporter commented on August 29, 2024
Thanks for the explanation.  I was able to find the problem by browsing the 
source
code.  This is an excellent project.  Thanks again.

Original comment by [email protected] on 13 May 2009 at 12:45

from nmodbus.

GoogleCodeExporter avatar GoogleCodeExporter commented on August 29, 2024
Should Modbus.Modbus.DefaultTimeout be marked as obsolete as it is not used 
anywhere?
This caused me some confusion until I read this posting.

Original comment by [email protected] on 23 Oct 2009 at 5:26

from nmodbus.

GoogleCodeExporter avatar GoogleCodeExporter commented on August 29, 2024
Good idea, I will reactivate and fix.

Original comment by [email protected] on 23 Oct 2009 at 8:34

  • Changed state: Accepted

from nmodbus.

GoogleCodeExporter avatar GoogleCodeExporter commented on August 29, 2024

Original comment by [email protected] on 15 Nov 2009 at 6:24

  • Changed state: Fixed

from nmodbus.

GoogleCodeExporter avatar GoogleCodeExporter commented on August 29, 2024
So what exactly happened to this? Modbus.Modbus.DefaultTimeout is still 
present... is this deprecated or did you continue using it? The obsolete 
decorator is there but these  comments are unclear...

Original comment by [email protected] on 2 Jul 2014 at 8:35

from nmodbus.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.