Comments (8)
The name SerialPorts.jl could also be reserved for a future native Julia serial-port library, which might be needed to fully integrate non-blocking serial-port communication with the multi-threading and asynchronous I/O capabilities of libuv and Julia. However, that's a non-trivial piece of work, because POSIX and Win32 have completely different serial-port APIs.
from serialports.jl.
As discussed in JuliaIO/Roadmap#3 (comment) renaming SerialPorts.jl
to PySerialPorts.jl
should be considered
A first step could be to create PySerialPorts
with exactly same code as SerialPorts
and publish it
Then deprecating SerialPorts
to ask to use either PySerialPorts
if looking at a Python implementation of serial port or LibSerialPort
for a Julia wrapper to C library libserialport.
Pinging @KronosTheLate @andrewadare @sjkelly
from serialports.jl.
I was recently looking for Serial comunications packages for Julia, and found the naming confusing. SerialPorts.jl sounds very straightforward, but requires a Python installation I don't have. Whereas LibSerialPorts sounded more specific and I did not know what the "Lib" ment, but it seems that it is the more straightforward solution for what I have in mind. This renaming would have made it faster and easier for me to orient myself in the package options.
from serialports.jl.
SerialPorts.jl could first use PySerialPorts.jl and later LibSerialPorts.jl
PS : JuliaIO/Roadmap#3
from serialports.jl.
A @JuliaIO owner https://github.com/JuliaIO should create PySerialPorts.jl repository under JuliaIO
Pinging @andreasnoack @ararslan @tanmaykm @sjkelly and all...
from serialports.jl.
I don't really have the time to champion a package rename. Happy to let someone else do it.
When I created this package 6 years ago the name made sense as it was the only general package with this functionality. Apologies for confusion. In the interim I will cross reference libserialport in the readme.
from serialports.jl.
It might also be useful to point out in the README that on Linux you can just open the serial port using Base.open
run(`stty -F /dev/ttyS0 38400 raw`)
serial_in = open("/dev/ttyS0", read=true, write=false)
serial_out = open("/dev/ttyS0", read=false, write=true)
from serialports.jl.
@notinaboat That's essentially what a native serial-port package would do on Linux, such that the async I/O facilities of libuv become available. However, it would also have to offer portable wrappers for the POSIX termios.h
API, i.e.
speed_t cfgetispeed(const struct termios *);
speed_t cfgetospeed(const struct termios *);
int cfsetispeed(struct termios *, speed_t);
int cfsetospeed(struct termios *, speed_t);
int tcdrain(int);
int tcflow(int, int);
int tcflush(int, int);
int tcgetattr(int, struct termios *);
pid_t tcgetsid(int);
int tcsendbreak(int, int);
int tcsetattr(int, int, struct termios *);
instead of calling the stty
command-line tool, and some care would have to be taken with concurrency and task safety for calling these, so they play along well with libuv (especially the drain/flush functions for managing UART buffers).
But Julia also aims to be a multi-platform environment, and while other Unices, such as macOS, are likely to work quite similarly to Linux, Win32 has a rather different serial-port API. And ideally, much of that should be hidden from the user, such that they can move their Julia code between the platforms with ease. That's what the currently used C and Python libraries do, but they bypass libuv.
from serialports.jl.
Related Issues (18)
- Problems with Python 3.5 write calling to_bytes(data) HOT 3
- use pyimport_conda HOT 1
- ERROR: PyError (:PyObject_Call) <type 'exceptions.OSError'>
- libserialport Migration HOT 5
- SerialPorts error when writing an UInt8 HOT 2
- write function seems to have some bug!
- Julia code using SerialPorts doesn't behave like Python code using serial HOT 3
- JuliaCIBot Fails HOT 1
- julia 0.7.0 is using code of `05compat` branch HOT 4
- pycall api updates HOT 1
- Error tagging new release HOT 1
- Cannot run the Listener.jl example HOT 1
- IO subtyping
- Flow Control HOT 2
- Enable AppVeyor
- Make next tag 0.1.0 HOT 2
- SerialPort("/dev/ttyACM1", 9600) generates error on Julia 0.4.1 HOT 2
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 serialports.jl.