rmodbus 1.0.0-java → 1.0.1-java

Sign up to get free protection for your applications and to get access to all the features.
data/NEWS.md CHANGED
@@ -1,4 +1,8 @@
1
- Release 1.0.0
1
+ 2011-06-30 Release 1.0.1
2
+
3
+ 1. Fixed issue #8
4
+
5
+ 2011-06-27 Release 1.0.0
2
6
  =====================================
3
7
  New API for client part of library
4
8
  ---------------------------------------
data/lib/rmodbus/rtu.rb CHANGED
@@ -20,7 +20,11 @@ module ModBus
20
20
  # We have to read specific amounts of numbers of bytes from the network depending on the function code and content
21
21
  def read_rtu_response(io)
22
22
  # Read the slave_id and function code
23
- msg = io.read(2)
23
+ msg = nil
24
+ while msg.nil?
25
+ msg = io.read(2)
26
+ end
27
+
24
28
  function_code = msg.getbyte(1)
25
29
  case function_code
26
30
  when 1,2,3,4 then
@@ -20,7 +20,7 @@ module ModBus
20
20
  # end
21
21
  # end
22
22
  #
23
- # @see RTUClient#open_connection
23
+ # @see SP#open_serial_port
24
24
  # @see Client#initialize
25
25
  class RTUClient < Client
26
26
  include RTU
@@ -28,12 +28,10 @@ module ModBus
28
28
 
29
29
  protected
30
30
  # Open serial port
31
- # @see SP#open_serial_port
32
31
  def open_connection(port, baud=9600, opts = {})
33
32
  open_serial_port(port, baud, opts)
34
33
  end
35
34
 
36
- # @private
37
35
  def get_slave(uid, io)
38
36
  RTUSlave.new(uid, io)
39
37
  end
@@ -21,7 +21,7 @@ module ModBus
21
21
  # end
22
22
  # end
23
23
  #
24
- # @see RTUViaTCPClient#open_connection
24
+ # @see TCP#open_tcp_connection
25
25
  # @see Client#initialize
26
26
  class RTUViaTCPClient < Client
27
27
  include RTU
@@ -29,7 +29,6 @@ module ModBus
29
29
 
30
30
  protected
31
31
  # Open TCP\IP connection
32
- # @see TCP#open_tcp_connection
33
32
  def open_connection(ipaddr, port = 10002, opts = {})
34
33
  io = open_tcp_connection(ipaddr, port, opts)
35
34
  end
data/lib/rmodbus/sp.rb CHANGED
@@ -35,7 +35,7 @@ module ModBus
35
35
  @data_bits = opts[:data_bits] unless opts[:data_bits].nil?
36
36
  @stop_bits = opts[:stop_bits] unless opts[:stop_bits].nil?
37
37
  @parity = opts[:parity] unless opts[:parity].nil?
38
- @read_timeout = options[:read_timeout] unless opts[:read_timeout].nil?
38
+ @read_timeout = opts[:read_timeout] unless opts[:read_timeout].nil?
39
39
 
40
40
  io = SerialPort.new(@port, @baud, @data_bits, @stop_bits, @parity)
41
41
  io.read_timeout = @read_timeout
data/lib/rmodbus/tcp.rb CHANGED
@@ -18,8 +18,6 @@ module ModBus
18
18
  module TCP
19
19
  include Timeout
20
20
  attr_reader :ipaddr, :port
21
-
22
- private
23
21
  # Open TCP socket
24
22
  #
25
23
  # @param [String] ipaddr IP address of remote server
@@ -21,13 +21,12 @@ module ModBus
21
21
  # end
22
22
  #
23
23
  # @see TCPClient#open_connection
24
- # @see Client#initialize
24
+ # @see TCP::open_connection
25
25
  class TCPClient < Client
26
26
  include TCP
27
27
 
28
28
  protected
29
29
  # Open TCP\IP connection
30
- # @see TCP::open_connection
31
30
  def open_connection(ipaddr, port = 502, opts = {})
32
31
  open_tcp_connection(ipaddr, port, opts)
33
32
  end
@@ -13,5 +13,5 @@
13
13
  # GNU General Public License for more details.
14
14
  module ModBus
15
15
  # Package version
16
- VERSION = '1.0.0'
16
+ VERSION = '1.0.1'
17
17
  end
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: rmodbus
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 1.0.0
5
+ version: 1.0.1
6
6
  platform: java
7
7
  authors:
8
8
  - A.Timin, J. Sanders, K. Reynolds
@@ -10,7 +10,7 @@ autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
12
 
13
- date: 2011-06-27 00:00:00 +06:00
13
+ date: 2011-07-01 00:00:00 +06:00
14
14
  default_executable:
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency