Giter Site home page Giter Site logo

Comments (2)

hedgecrw avatar hedgecrw commented on June 25, 2024

1 & 3) Agreed the OS-specific differences need to be documented. I went ahead and added documentation changes to various OS-specific differences (including write timeouts, read timeout granularity, flow control modes, etc) in the Javadocs themselves. Additionally, I added a check in the Java-side code to automatically round the timeout values to the correct decisecond granularity as allowed by the OS (and documented this behavior). That way, if the user then calls getReadTimeout(), it will return the actual correct read timeout value for their OS.

I don't want to throw an exception is the user sets a non-decisecond timeout on Linux because that breaks the cross-platform transparency of the library. (The user should be able to specify a value achievable on Windows without worrying about the library throwing exceptions due to granularity issues if they switch over to Linux). If they really really really need millisecond level consistency across platforms, I added a Javadoc line to encourage them to only use timeout values that are multiples of 100, otherwise, just let the library handle the granularity problems transparently.

  1. I think you are probably right here that VMIN and VTIME are "separate changes"; however, it is my understanding that tcsetattr() will only fail to succeed in making a change if either 1) the requested change is not supported on the given system or 2) the requested change conflicts with another setting/mode/configuration already in place. Since VMIN/VTIME have the exact same requirements and are, in fact, used together to make decisions about the behavior of read() calls, I don't think that one can fail without the other also failing. (If that's ever proven wrong, it's a bug report for another day. Being able to set one without the other would require some "interesting" workaround logic that I'd like to avoid if not strictly necessary!)

Again, thanks for your contributions to the library. These are great suggestions, and every issue you find will be one less headache for someone else down the road!

from jserialcomm.

hedgecrw avatar hedgecrw commented on June 25, 2024

Oh forgot to add...these changes have been pushed to version 1.3.6 of the library.

from jserialcomm.

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.