Comments (2)
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.
- 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.
Oh forgot to add...these changes have been pushed to version 1.3.6 of the library.
from jserialcomm.
Related Issues (20)
- port in use? port owner? HOT 2
- Write throughput measurement ideas HOT 3
- does setDTR() make actual DTR pin LOW or HIGH? HOT 5
- support of "rfcomm" has been lost after #484 fix HOT 4
- This port appears to have been shutdown or disconnected. HOT 1
- This port appears to have been shutdown or disconnected. HOT 1
- Problem when a listener event HOT 1
- libjSerialComm.jnilib already loaded in another classloader HOT 9
- What does lastErrorCode 2 at lastErrorLocation 745 on version 2.10.4 mean? HOT 1
- Where can I find a freelancer for my project?
- Upgrade from 2.10.4 to 2.11 causes jvm to crash HOT 16
- SerialPort: isAndroid is always false HOT 2
- Cancel transmission HOT 1
- 2.10 quits on windows, works on linux HOT 8
- CH340 series USB devices show up as "unknown". (e.g. Arduino Nano) HOT 3
- [Re-opened] Random errors when opening ports.
- Raspberry Pi -> USB Serial -> D1 mini (ESP8266) setting baud rate to 74880 does not work.
- Cannot open port after upgrading from 2.10.2 to 2.11.0 HOT 2
- Can not do "getCommPorts" on version 2.11.0 HOT 2
- Crashed 'SerialPort.getCommPorts()' after running time 16 hours up
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from jserialcomm.