serial-port
所属分类:工具库
开发工具:D
文件大小:0KB
下载次数:0
上传日期:2017-02-03 14:50:56
上 传 者:
sh-1993
说明: 用于在D编程语言中操作串行端口的跨平台库。,
(Crossplatform library for operating with serial ports in D programming language.,)
文件列表:
LICENSE (1337, 2017-02-03)
dub.json (576, 2017-02-03)
index.d (633, 2017-02-03)
makefile (816, 2017-02-03)
makefile.dmd (2703, 2017-02-03)
makefile.win32 (2700, 2017-02-03)
source/ (0, 2017-02-03)
source/serial/ (0, 2017-02-03)
source/serial/device.d (32586, 2017-02-03)
source/serial_integration_test.d (2487, 2017-02-03)
tests/ (0, 2017-02-03)
tests/app.d (200, 2017-02-03)
tests/integration.d (1816, 2017-02-03)
serial-port
===========
Crossplatform library for operating with serial ports in D programming language.
[Documentation](http://ncrashed.github.io/serial-port/index.html).
## Compilation
With [dub](http://code.dlang.org/download):
```
dub build
```
with make
```
make
```
Or, put in your dub.json dependencies:
```
"dependencies": {
"serial-port": "~>1.2"
},
```
To compile tests with dub:
```
dub build --build=unittest --config=unittest
./serial-port
```
with make
```
make test
./serial-port
```
You should have two serial ports linked to each other (com0com on Windows, socat in linux). For instance, writing to 'COM1' and reading from 'COM2'.
On posix you can use [socat](http://linux.die.net/man/1/socat) to create serial port pipe:
```
socat /dev/ttyS0,raw,echo=0,crnl /dev/ttyS1,raw,echo=0,crnl
```
## References
* [Termios man page](http://linux.die.net/man/3/termios)
* [librs232] (https://github.com/ynezz/librs232)
* [D termios header file](https://github.com/D-Programming-Language/druntime/blob/v2.065.0/src/core/sys/linux/termios.d)
* [Termbits header file](https://github.com/torvalds/linux/blob/9a3c4145af32125c5ee39c0272662b47307a8323/include/uapi/asm-generic/termbits.h)
* [Some useful socat commands](http://technostuff.blogspot.it/2008/10/some-useful-socat-commands.html)
近期下载者:
相关文件:
收藏者: