rmodbus 0.5.0 → 1.0.0
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/NEWS.md +52 -0
- data/README.md +87 -0
- data/Rakefile +22 -36
- data/examples/perfomance_rtu.rb +35 -37
- data/examples/perfomance_tcp.rb +36 -38
- data/examples/use_rtu_via_tcp_modbus.rb +8 -5
- data/examples/use_tcp_modbus.rb +10 -6
- data/lib/rmodbus/client.rb +52 -174
- data/lib/rmodbus/common.rb +45 -18
- data/lib/rmodbus/{exceptions.rb → errors.rb} +3 -0
- data/lib/rmodbus/ext.rb +25 -2
- data/lib/rmodbus/proxy.rb +54 -0
- data/lib/rmodbus/{crc16.rb → rtu.rb} +73 -2
- data/lib/rmodbus/rtu_client.rb +20 -116
- data/lib/rmodbus/rtu_server.rb +28 -57
- data/lib/rmodbus/rtu_slave.rb +59 -0
- data/lib/rmodbus/rtu_via_tcp_client.rb +22 -86
- data/lib/rmodbus/rtu_via_tcp_server.rb +31 -95
- data/lib/rmodbus/rtu_via_tcp_slave.rb +58 -0
- data/lib/rmodbus/{parsers.rb → server.rb} +24 -15
- data/lib/rmodbus/slave.rb +268 -0
- data/lib/rmodbus/sp.rb +45 -0
- data/lib/rmodbus/tcp.rb +49 -0
- data/lib/rmodbus/tcp_client.rb +19 -88
- data/lib/rmodbus/tcp_server.rb +16 -19
- data/lib/rmodbus/tcp_slave.rb +64 -0
- data/lib/rmodbus/version.rb +17 -0
- data/lib/rmodbus.rb +20 -4
- data/spec/client_spec.rb +19 -45
- data/spec/exception_spec.rb +26 -27
- data/spec/ext_spec.rb +24 -1
- data/spec/logging_spec.rb +31 -37
- data/spec/proxy_spec.rb +73 -0
- data/spec/read_rtu_response_spec.rb +2 -4
- data/spec/rtu_client_spec.rb +17 -19
- data/spec/rtu_server_spec.rb +1 -3
- data/spec/rtu_via_tcp_client_spec.rb +69 -63
- data/spec/slave_spec.rb +55 -0
- data/spec/tcp_client_spec.rb +77 -69
- data/spec/tcp_server_spec.rb +34 -49
- metadata +123 -37
- data/AUTHORS +0 -3
- data/ChangeLog +0 -82
- data/LICENSE +0 -675
- data/README +0 -53
- data/examples/add_new_function.rb +0 -19
metadata
CHANGED
@@ -1,22 +1,21 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rmodbus
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
5
|
-
prerelease:
|
4
|
+
hash: 23
|
5
|
+
prerelease:
|
6
6
|
segments:
|
7
|
+
- 1
|
7
8
|
- 0
|
8
|
-
- 5
|
9
9
|
- 0
|
10
|
-
version: 0.
|
10
|
+
version: 1.0.0
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- A.Timin, J. Sanders, K. Reynolds
|
14
|
-
autorequire:
|
14
|
+
autorequire:
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2011-
|
19
|
-
default_executable:
|
18
|
+
date: 2011-06-27 00:00:00 Z
|
20
19
|
dependencies:
|
21
20
|
- !ruby/object:Gem::Dependency
|
22
21
|
name: serialport
|
@@ -26,14 +25,96 @@ dependencies:
|
|
26
25
|
requirements:
|
27
26
|
- - ">="
|
28
27
|
- !ruby/object:Gem::Version
|
29
|
-
hash:
|
28
|
+
hash: 3
|
30
29
|
segments:
|
31
|
-
- 1
|
32
30
|
- 0
|
33
|
-
|
34
|
-
version: 1.0.4
|
31
|
+
version: "0"
|
35
32
|
type: :runtime
|
36
33
|
version_requirements: *id001
|
34
|
+
- !ruby/object:Gem::Dependency
|
35
|
+
name: rake
|
36
|
+
prerelease: false
|
37
|
+
requirement: &id002 !ruby/object:Gem::Requirement
|
38
|
+
none: false
|
39
|
+
requirements:
|
40
|
+
- - ">="
|
41
|
+
- !ruby/object:Gem::Version
|
42
|
+
hash: 3
|
43
|
+
segments:
|
44
|
+
- 0
|
45
|
+
version: "0"
|
46
|
+
type: :development
|
47
|
+
version_requirements: *id002
|
48
|
+
- !ruby/object:Gem::Dependency
|
49
|
+
name: bundler
|
50
|
+
prerelease: false
|
51
|
+
requirement: &id003 !ruby/object:Gem::Requirement
|
52
|
+
none: false
|
53
|
+
requirements:
|
54
|
+
- - ">="
|
55
|
+
- !ruby/object:Gem::Version
|
56
|
+
hash: 3
|
57
|
+
segments:
|
58
|
+
- 0
|
59
|
+
version: "0"
|
60
|
+
type: :development
|
61
|
+
version_requirements: *id003
|
62
|
+
- !ruby/object:Gem::Dependency
|
63
|
+
name: rspec
|
64
|
+
prerelease: false
|
65
|
+
requirement: &id004 !ruby/object:Gem::Requirement
|
66
|
+
none: false
|
67
|
+
requirements:
|
68
|
+
- - ">="
|
69
|
+
- !ruby/object:Gem::Version
|
70
|
+
hash: 3
|
71
|
+
segments:
|
72
|
+
- 0
|
73
|
+
version: "0"
|
74
|
+
type: :development
|
75
|
+
version_requirements: *id004
|
76
|
+
- !ruby/object:Gem::Dependency
|
77
|
+
name: rcov
|
78
|
+
prerelease: false
|
79
|
+
requirement: &id005 !ruby/object:Gem::Requirement
|
80
|
+
none: false
|
81
|
+
requirements:
|
82
|
+
- - ">="
|
83
|
+
- !ruby/object:Gem::Version
|
84
|
+
hash: 3
|
85
|
+
segments:
|
86
|
+
- 0
|
87
|
+
version: "0"
|
88
|
+
type: :development
|
89
|
+
version_requirements: *id005
|
90
|
+
- !ruby/object:Gem::Dependency
|
91
|
+
name: yard
|
92
|
+
prerelease: false
|
93
|
+
requirement: &id006 !ruby/object:Gem::Requirement
|
94
|
+
none: false
|
95
|
+
requirements:
|
96
|
+
- - ">="
|
97
|
+
- !ruby/object:Gem::Version
|
98
|
+
hash: 3
|
99
|
+
segments:
|
100
|
+
- 0
|
101
|
+
version: "0"
|
102
|
+
type: :development
|
103
|
+
version_requirements: *id006
|
104
|
+
- !ruby/object:Gem::Dependency
|
105
|
+
name: rdiscount
|
106
|
+
prerelease: false
|
107
|
+
requirement: &id007 !ruby/object:Gem::Requirement
|
108
|
+
none: false
|
109
|
+
requirements:
|
110
|
+
- - ">="
|
111
|
+
- !ruby/object:Gem::Version
|
112
|
+
hash: 3
|
113
|
+
segments:
|
114
|
+
- 0
|
115
|
+
version: "0"
|
116
|
+
type: :development
|
117
|
+
version_requirements: *id007
|
37
118
|
description:
|
38
119
|
email: atimin@gmail.com
|
39
120
|
executables: []
|
@@ -41,45 +122,49 @@ executables: []
|
|
41
122
|
extensions: []
|
42
123
|
|
43
124
|
extra_rdoc_files:
|
44
|
-
- README
|
45
|
-
-
|
46
|
-
- LICENSE
|
47
|
-
- ChangeLog
|
125
|
+
- README.md
|
126
|
+
- NEWS.md
|
48
127
|
files:
|
49
128
|
- lib/rmodbus.rb
|
50
|
-
- lib/rmodbus/
|
51
|
-
- lib/rmodbus/
|
52
|
-
- lib/rmodbus/parsers.rb
|
53
|
-
- lib/rmodbus/rtu_client.rb
|
129
|
+
- lib/rmodbus/version.rb
|
130
|
+
- lib/rmodbus/errors.rb
|
54
131
|
- lib/rmodbus/ext.rb
|
55
132
|
- lib/rmodbus/rtu_via_tcp_client.rb
|
133
|
+
- lib/rmodbus/sp.rb
|
134
|
+
- lib/rmodbus/tcp.rb
|
135
|
+
- lib/rmodbus/common.rb
|
136
|
+
- lib/rmodbus/client.rb
|
137
|
+
- lib/rmodbus/slave.rb
|
56
138
|
- lib/rmodbus/tcp_server.rb
|
57
|
-
- lib/rmodbus/
|
139
|
+
- lib/rmodbus/tcp_client.rb
|
140
|
+
- lib/rmodbus/proxy.rb
|
141
|
+
- lib/rmodbus/rtu_slave.rb
|
58
142
|
- lib/rmodbus/rtu_server.rb
|
143
|
+
- lib/rmodbus/rtu.rb
|
144
|
+
- lib/rmodbus/rtu_client.rb
|
59
145
|
- lib/rmodbus/rtu_via_tcp_server.rb
|
60
|
-
- lib/rmodbus/
|
61
|
-
- lib/rmodbus/
|
62
|
-
-
|
63
|
-
- examples/use_tcp_modbus.rb
|
146
|
+
- lib/rmodbus/server.rb
|
147
|
+
- lib/rmodbus/rtu_via_tcp_slave.rb
|
148
|
+
- lib/rmodbus/tcp_slave.rb
|
64
149
|
- examples/perfomance_tcp.rb
|
150
|
+
- examples/use_tcp_modbus.rb
|
65
151
|
- examples/use_rtu_via_tcp_modbus.rb
|
66
152
|
- examples/perfomance_rtu.rb
|
67
|
-
- spec/ext_spec.rb
|
68
|
-
- spec/exception_spec.rb
|
69
153
|
- spec/tcp_server_spec.rb
|
70
154
|
- spec/logging_spec.rb
|
71
|
-
- spec/
|
155
|
+
- spec/rtu_via_tcp_client_spec.rb
|
72
156
|
- spec/rtu_server_spec.rb
|
73
157
|
- spec/tcp_client_spec.rb
|
74
|
-
- spec/
|
75
|
-
- spec/read_rtu_response_spec.rb
|
158
|
+
- spec/exception_spec.rb
|
76
159
|
- spec/rtu_client_spec.rb
|
160
|
+
- spec/slave_spec.rb
|
161
|
+
- spec/client_spec.rb
|
162
|
+
- spec/read_rtu_response_spec.rb
|
163
|
+
- spec/proxy_spec.rb
|
164
|
+
- spec/ext_spec.rb
|
77
165
|
- Rakefile
|
78
|
-
- README
|
79
|
-
-
|
80
|
-
- LICENSE
|
81
|
-
- ChangeLog
|
82
|
-
has_rdoc: true
|
166
|
+
- README.md
|
167
|
+
- NEWS.md
|
83
168
|
homepage: http://rmodbus.heroku.com
|
84
169
|
licenses: []
|
85
170
|
|
@@ -89,7 +174,7 @@ rdoc_options:
|
|
89
174
|
- RModBus
|
90
175
|
- --inline-source
|
91
176
|
- --main
|
92
|
-
- README
|
177
|
+
- README.md
|
93
178
|
require_paths:
|
94
179
|
- lib
|
95
180
|
required_ruby_version: !ruby/object:Gem::Requirement
|
@@ -112,10 +197,11 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
112
197
|
version: "0"
|
113
198
|
requirements: []
|
114
199
|
|
115
|
-
rubyforge_project:
|
116
|
-
rubygems_version: 1.
|
200
|
+
rubyforge_project:
|
201
|
+
rubygems_version: 1.7.2
|
117
202
|
signing_key:
|
118
203
|
specification_version: 3
|
119
204
|
summary: RModBus - free implementation of protocol ModBus
|
120
205
|
test_files: []
|
121
206
|
|
207
|
+
has_rdoc:
|
data/AUTHORS
DELETED
data/ChangeLog
DELETED
@@ -1,82 +0,0 @@
|
|
1
|
-
# -*- coding: utf-8 -*-
|
2
|
-
|
3
|
-
2009-03-5 Timin Aleksey <atimin@gmail.com>
|
4
|
-
* lib/rmodbus/ext.rb: Added.
|
5
|
-
* lib/rmodbus/*.rb, spec/*_spec.rb: Have done
|
6
|
-
refactoring. Now using pack\unpack methods.
|
7
|
-
* CHANGES: Delete.
|
8
|
-
* ChageLog: Start new log of shanges.
|
9
|
-
|
10
|
-
2009-03-6 Timin Aleksey <atimin@gmail.com>
|
11
|
-
* lib/rmodbus/rtu_client.rb, spec/rtu_client_spec.rb: Have completed to
|
12
|
-
design of ModBus::RTUClient class.
|
13
|
-
|
14
|
-
2009-04-17 James Sanders <sanderjd@gmail.com>
|
15
|
-
* lib/rmodbus/exceptions.rb: Inherit from StandardError instead of
|
16
|
-
Exception
|
17
|
-
2010-01-7 Timin Aleksey <atimin@gmail.com>
|
18
|
-
* lib/rmodbus/tcp_client.rb: Fixed bug of overflow transaction counter (thanks
|
19
|
-
Tallak Tveide)
|
20
|
-
2010-01-8 Timin Aleksey <atimin@gmail.com>
|
21
|
-
* lib/rmodbus/tcp_client.rb: Added new method TCPClient::connect,
|
22
|
-
TCPClient#ipaddr, TCPClient#port, TCPClient#slave
|
23
|
-
* lib/rmodbus/rtu_client.rb: Added new methods RTUClient::connect,
|
24
|
-
RTUClient#close, RTUClient#port, RTUClient#baud, RTUClient#slave
|
25
|
-
2010-01-9 Timin Aleksey <atimin@gmail.com>
|
26
|
-
* rmodbus.gemspec: Added Rakefile into gem, dependencie on
|
27
|
-
serialport-0.8.0.gem
|
28
|
-
* spec/logging_spec.rb: Added specs for debug logging
|
29
|
-
* lib/rmodbus/client.rb, lib/rmodbus/tcp_client.rb,
|
30
|
-
lib/rmodbus/rtu_client.rb: Added debug logging functional
|
31
|
-
2010-01-12 Timin Aleksey <atimin@gmail.com>
|
32
|
-
* lib/rmodbus/rtu_client.rb: RTUClient is live!
|
33
|
-
2010-01-14 Timin Aleksey <atimin@gmail.com>
|
34
|
-
* lib/rmodbus/crc16.rb: Added module for calculation CRC16
|
35
|
-
* lib/rmodbus/parsers.rb: Added module for parsing requiest from clients
|
36
|
-
* lib/rmodbus/rtu_server.rb: Added RTUServer class
|
37
|
-
* rmodbus.gemspec: Update verison => 0.4.0
|
38
|
-
* README: Update information about project
|
39
|
-
2010-01-16 Timin Aleksey <atimin@gmail.com>
|
40
|
-
* lib/rmodbus/ext.rb, lib/rmodbus/client.rb: Fixed for ruby-1.8.6 compatibility
|
41
|
-
* lib/rmodbus/parsers.rb: Fixed bug for response on write requests
|
42
|
-
* lib/rmodbus/rtu_client.rb: Fixed bug in verifing CRC
|
43
|
-
* lib/rmodbus/rtu_server.rb: Reanimation RTUServer
|
44
|
-
* examples/perfomance_rtu.rb: Added test perfomance for ModBus RTU
|
45
|
-
2010-01-17 Timin Aleksey <atimin@gmail.com>
|
46
|
-
* lib/rmodbus/rtu_server, lib/rmodbus/tcp_server.rb: Fixed typo
|
47
|
-
discret_inputs -> discrete_inputs
|
48
|
-
* examples/perfomance_tcp.rb: Added test perfomance for ModBus TCP
|
49
|
-
* lib/rmodbus/tcp_client.rb: Added method TCPClient#closed?
|
50
|
-
* lib/rmodbus/rtu_client.rb: Added method RTUClient#closed?
|
51
|
-
2010-01-18 Timin Aleksey <atimin@gmail.com>
|
52
|
-
* lib/rmodbus/rtu_client.rb, lib/rmodbus/rtu_server.rb: Added support
|
53
|
-
modem parameters - :data_bits => 5..8, :stop_bits => 1 or 2, :parity =>
|
54
|
-
SerialPort::NONE, SerialPort::EVEN, SerialPort::ODD
|
55
|
-
2010-01-20 Timin Aleksey <atimin@gmail.com>
|
56
|
-
* lib/rmodbus/ext.rb: Fixed bug for divisible 8 data in Array#pack_to_word
|
57
|
-
2010-02-6 Timin Aleksey <atimin@gmail.com>
|
58
|
-
* lib/rmodbus/client.rb, lib/rmodbus/tcp_client.rb: Client#connection_retries don't use more
|
59
|
-
2010-07-16 Timin Aleksey <atimin@gmail.com>
|
60
|
-
* lib/rmodbus/rtu_client.rb: Added option read_timeout and accessor RTUClient#read_timeout
|
61
|
-
2010-07-28 Kelley Reynolds <kelley@insidesystems.net>
|
62
|
-
* lib/rmodbus/rtu_via_tcp_client.rb: Added the ability to send RTU commands via TCP Serial Gateway
|
63
|
-
2010-07-31 Kelley Reynolds <kelley@insidesystems.net>
|
64
|
-
* examples/use_rtu_via_tcp_modbus.rb: Added example for using RTUViaTCP client and server
|
65
|
-
* examples/use_tcp_modbus.rb: Misc cleanups
|
66
|
-
* lib/rmodbus.rb: Include the RTUViaTCPServer and Common files
|
67
|
-
* lib/rmodbus/client.rb: Move logging to Common
|
68
|
-
* lib/rmodbus/common.rb: File which houses common logging methods
|
69
|
-
* lib/rmodbus/rtu_client.rb: Logging updates
|
70
|
-
* lib/rmodbus/rtu_via_tcp_client.rb: Added RTUViaTCPClient#read_modbus_rtu_response() to abstract reading the correct number of bytes for RTU via TCP
|
71
|
-
* lib/rmodbus/rtu_via_tcp_server.rb: Added RTUViaTCPServer for use with testing RTUViaTCPClient
|
72
|
-
* lib/rmodbus/tcp_client.rb: Logging updates
|
73
|
-
* lib/rmodbus/tcp_server.rb: Logging updates
|
74
|
-
* spec/logging_spec.rb: Updated to new logging
|
75
|
-
2011-02-02 Timin Aleksey <atimin@gmail>
|
76
|
-
* lib/rmodbus/client.rb, lib/rmodbus/rtu_client.rb : Remove RTUViaTCPClient#read_mb_rtu_response -> Client#read_rtu_response. Added support for exception and mask sunction.
|
77
|
-
* lib/rmodbus/rtu_client.rb : use #read_rtu_response for read pdu
|
78
|
-
* spec/read_rtu_response_spec.rb : add test for Client#read_rtu_response method
|
79
|
-
* spec/rtu_via_tcp_client_spec.rb : add test for RTUViaTCP class
|
80
|
-
2011-02-10 Timin Aleksey <atimin@gmail.com>
|
81
|
-
* lib/rmodbus/client.rb : Fixed retry of request after end timeout. Added property #read_retry_timeout.
|
82
|
-
* rmodbus.gemspec : New 0.5.0 release
|