monoxit-serialport 1.2.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/CHANGELOG +46 -0
- data/CHECKLIST +11 -0
- data/LICENSE +339 -0
- data/MANIFEST +14 -0
- data/README +155 -0
- data/Rakefile +51 -0
- data/VERSION +1 -0
- data/ext/native/extconf.rb +13 -0
- data/ext/native/posix_serialport_impl.c +733 -0
- data/ext/native/serialport.c +532 -0
- data/ext/native/serialport.h +103 -0
- data/ext/native/win_serialport_impl.c +665 -0
- data/lib/oscheck.rb +5 -0
- data/lib/serialport.rb +53 -0
- data/monoxit-serialport.gemspec +54 -0
- data/test/miniterm.rb +25 -0
- data/test/set_readtimeout.rb +7 -0
- metadata +75 -0
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
# Generated by jeweler
|
|
2
|
+
# DO NOT EDIT THIS FILE DIRECTLY
|
|
3
|
+
# Instead, edit Jeweler::Tasks in rakefile, and run 'rake gemspec'
|
|
4
|
+
# -*- encoding: utf-8 -*-
|
|
5
|
+
|
|
6
|
+
Gem::Specification.new do |s|
|
|
7
|
+
s.name = %q{monoxit-serialport}
|
|
8
|
+
s.version = "1.2.1.1"
|
|
9
|
+
|
|
10
|
+
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
|
11
|
+
s.authors = ["Guillaume Pierronnet", "Alan Stern", "Daniel E. Shipton", "Tobin Richard", "Hector Parra", "Ryan C. Payne", "Adrian Zankich", "Ron Evans", "Masami Yamakawa"]
|
|
12
|
+
s.date = %q{2013-11-17}
|
|
13
|
+
s.description = %q{Ruby/SerialPort is a Ruby library that provides a class for using RS-232 serial ports.}
|
|
14
|
+
s.email = %q{myamakawa@monoxit.com}
|
|
15
|
+
s.extensions = ["ext/native/extconf.rb", "ext/native/extconf.rb"]
|
|
16
|
+
s.extra_rdoc_files = [
|
|
17
|
+
"CHANGELOG",
|
|
18
|
+
"LICENSE",
|
|
19
|
+
"README"
|
|
20
|
+
]
|
|
21
|
+
s.files = [
|
|
22
|
+
"CHANGELOG",
|
|
23
|
+
"CHECKLIST",
|
|
24
|
+
"LICENSE",
|
|
25
|
+
"MANIFEST",
|
|
26
|
+
"README",
|
|
27
|
+
"Rakefile",
|
|
28
|
+
"VERSION",
|
|
29
|
+
"ext/native/extconf.rb",
|
|
30
|
+
"ext/native/posix_serialport_impl.c",
|
|
31
|
+
"ext/native/serialport.c",
|
|
32
|
+
"ext/native/serialport.h",
|
|
33
|
+
"ext/native/win_serialport_impl.c",
|
|
34
|
+
"lib/oscheck.rb",
|
|
35
|
+
"lib/serialport.rb",
|
|
36
|
+
"monoxit-serialport.gemspec",
|
|
37
|
+
"test/miniterm.rb",
|
|
38
|
+
"test/set_readtimeout.rb"
|
|
39
|
+
]
|
|
40
|
+
s.homepage = %q{http://github.com/MONOXIT/ruby-serialport/}
|
|
41
|
+
s.require_paths = ["lib"]
|
|
42
|
+
s.rubygems_version = %q{1.7.2}
|
|
43
|
+
s.summary = %q{Library for using RS-232 serial ports.}
|
|
44
|
+
|
|
45
|
+
if s.respond_to? :specification_version then
|
|
46
|
+
s.specification_version = 3
|
|
47
|
+
|
|
48
|
+
if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
|
|
49
|
+
else
|
|
50
|
+
end
|
|
51
|
+
else
|
|
52
|
+
end
|
|
53
|
+
end
|
|
54
|
+
|
data/test/miniterm.rb
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
require "../serialport.so"
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
if ARGV.size < 4
|
|
5
|
+
STDERR.print <<EOF
|
|
6
|
+
Usage: ruby #{$0} num_port bps nbits stopb
|
|
7
|
+
EOF
|
|
8
|
+
exit(1)
|
|
9
|
+
end
|
|
10
|
+
|
|
11
|
+
sp = SerialPort.new(ARGV[0].to_i, ARGV[1].to_i, ARGV[2].to_i, ARGV[3].to_i, SerialPort::NONE)
|
|
12
|
+
|
|
13
|
+
open("/dev/tty", "r+") { |tty|
|
|
14
|
+
tty.sync = true
|
|
15
|
+
Thread.new {
|
|
16
|
+
while true do
|
|
17
|
+
tty.printf("%c", sp.getc)
|
|
18
|
+
end
|
|
19
|
+
}
|
|
20
|
+
while (l = tty.gets) do
|
|
21
|
+
sp.write(l.sub("\n", "\r"))
|
|
22
|
+
end
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
sp.close
|
metadata
ADDED
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
|
2
|
+
name: monoxit-serialport
|
|
3
|
+
version: !ruby/object:Gem::Version
|
|
4
|
+
version: 1.2.1.1
|
|
5
|
+
prerelease:
|
|
6
|
+
platform: ruby
|
|
7
|
+
authors:
|
|
8
|
+
- Guillaume Pierronnet
|
|
9
|
+
- Alan Stern
|
|
10
|
+
- Daniel E. Shipton
|
|
11
|
+
- Tobin Richard
|
|
12
|
+
- Hector Parra
|
|
13
|
+
- Ryan C. Payne
|
|
14
|
+
- Adrian Zankich
|
|
15
|
+
- Ron Evans
|
|
16
|
+
- Masami Yamakawa
|
|
17
|
+
autorequire:
|
|
18
|
+
bindir: bin
|
|
19
|
+
cert_chain: []
|
|
20
|
+
date: 2013-11-18 00:00:00.000000000Z
|
|
21
|
+
dependencies: []
|
|
22
|
+
description: Ruby/SerialPort is a Ruby library that provides a class for using RS-232
|
|
23
|
+
serial ports.
|
|
24
|
+
email: myamakawa@monoxit.com
|
|
25
|
+
executables: []
|
|
26
|
+
extensions:
|
|
27
|
+
- ext/native/extconf.rb
|
|
28
|
+
- ext/native/extconf.rb
|
|
29
|
+
extra_rdoc_files:
|
|
30
|
+
- CHANGELOG
|
|
31
|
+
- LICENSE
|
|
32
|
+
- README
|
|
33
|
+
files:
|
|
34
|
+
- CHANGELOG
|
|
35
|
+
- CHECKLIST
|
|
36
|
+
- LICENSE
|
|
37
|
+
- MANIFEST
|
|
38
|
+
- README
|
|
39
|
+
- Rakefile
|
|
40
|
+
- VERSION
|
|
41
|
+
- ext/native/extconf.rb
|
|
42
|
+
- ext/native/posix_serialport_impl.c
|
|
43
|
+
- ext/native/serialport.c
|
|
44
|
+
- ext/native/serialport.h
|
|
45
|
+
- ext/native/win_serialport_impl.c
|
|
46
|
+
- lib/oscheck.rb
|
|
47
|
+
- lib/serialport.rb
|
|
48
|
+
- monoxit-serialport.gemspec
|
|
49
|
+
- test/miniterm.rb
|
|
50
|
+
- test/set_readtimeout.rb
|
|
51
|
+
homepage: http://github.com/MONOXIT/ruby-serialport/
|
|
52
|
+
licenses: []
|
|
53
|
+
post_install_message:
|
|
54
|
+
rdoc_options: []
|
|
55
|
+
require_paths:
|
|
56
|
+
- lib
|
|
57
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
|
58
|
+
none: false
|
|
59
|
+
requirements:
|
|
60
|
+
- - ! '>='
|
|
61
|
+
- !ruby/object:Gem::Version
|
|
62
|
+
version: '0'
|
|
63
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
64
|
+
none: false
|
|
65
|
+
requirements:
|
|
66
|
+
- - ! '>='
|
|
67
|
+
- !ruby/object:Gem::Version
|
|
68
|
+
version: '0'
|
|
69
|
+
requirements: []
|
|
70
|
+
rubyforge_project:
|
|
71
|
+
rubygems_version: 1.7.2
|
|
72
|
+
signing_key:
|
|
73
|
+
specification_version: 3
|
|
74
|
+
summary: Library for using RS-232 serial ports.
|
|
75
|
+
test_files: []
|