rmodbus 1.1.4 → 1.1.5
Sign up to get free protection for your applications and to get access to all the features.
- data/NEWS.md +4 -0
- data/Rakefile +4 -0
- data/lib/rmodbus/sp.rb +1 -0
- data/lib/rmodbus/version.rb +2 -2
- data/spec/logging_spec.rb +1 -1
- data/spec/rtu_client_spec.rb +2 -1
- data/spec/rtu_server_spec.rb +1 -0
- metadata +2 -2
data/NEWS.md
CHANGED
data/Rakefile
CHANGED
data/lib/rmodbus/sp.rb
CHANGED
data/lib/rmodbus/version.rb
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# RModBus - free implementation of ModBus protocol on Ruby.
|
2
2
|
#
|
3
|
-
# Copyright (C)
|
3
|
+
# Copyright (C) 2012 Timin Aleksey
|
4
4
|
#
|
5
5
|
# This program is free software: you can redistribute it and/or modify
|
6
6
|
# it under the terms of the GNU General Public License as published by
|
@@ -13,5 +13,5 @@
|
|
13
13
|
# GNU General Public License for more details.
|
14
14
|
module ModBus
|
15
15
|
# Package version
|
16
|
-
VERSION = '1.1.
|
16
|
+
VERSION = '1.1.5'
|
17
17
|
end
|
data/spec/logging_spec.rb
CHANGED
@@ -42,7 +42,7 @@ begin
|
|
42
42
|
@sp = mock('Serial port')
|
43
43
|
SerialPort.should_receive(:new).with("/dev/port1", 9600, 7, 2, SerialPort::ODD).and_return(@sp)
|
44
44
|
|
45
|
-
@sp.
|
45
|
+
@sp.should_receive(:flow_control=).with(SerialPort::NONE)
|
46
46
|
@sp.stub!(:read_timeout=)
|
47
47
|
|
48
48
|
@slave = ModBus::RTUClient.new("/dev/port1", 9600, :data_bits => 7, :stop_bits => 2, :parity => SerialPort::ODD).with_slave(1)
|
data/spec/rtu_client_spec.rb
CHANGED
@@ -5,7 +5,7 @@ describe ModBus::RTUClient do
|
|
5
5
|
@sp = mock('Serial port')
|
6
6
|
SerialPort.should_receive(:new).with("/dev/port1", 9600, 8, 1, 0).and_return(@sp)
|
7
7
|
@sp.stub!(:read_timeout=)
|
8
|
-
@sp.
|
8
|
+
@sp.should_receive(:flow_control=).with(SerialPort::NONE)
|
9
9
|
@sp.stub!(:read_nonblock)
|
10
10
|
|
11
11
|
@cl = ModBus::RTUClient.new("/dev/port1", 9600, :data_bits => 8, :stop_bits => 1, :parity => SerialPort::NONE)
|
@@ -43,6 +43,7 @@ describe ModBus::RTUClient do
|
|
43
43
|
SerialPort.should_receive(:new).with(port, baud, 8, 1, SerialPort::NONE).and_return(@sp)
|
44
44
|
@sp.should_receive(:closed?).and_return(false)
|
45
45
|
@sp.should_receive(:close)
|
46
|
+
@sp.should_receive(:flow_control=).with(SerialPort::NONE)
|
46
47
|
ModBus::RTUClient.connect(port, baud) do |cl|
|
47
48
|
cl.port.should == port
|
48
49
|
cl.baud.should == baud
|
data/spec/rtu_server_spec.rb
CHANGED
@@ -5,6 +5,7 @@ describe ModBus::RTUServer do
|
|
5
5
|
@sp = mock "SerialPort"
|
6
6
|
SerialPort.should_receive(:new).with('/dev/ttyS0', 4800, 7, 2, SerialPort::NONE).and_return(@sp)
|
7
7
|
@sp.stub!(:read_timeout=)
|
8
|
+
@sp.should_receive(:flow_control=).with(SerialPort::NONE)
|
8
9
|
|
9
10
|
@server = ModBus::RTUServer.new('/dev/ttyS0', 4800, 1, :data_bits => 7, :stop_bits => 2)
|
10
11
|
@server.coils = [1,0,1,1]
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rmodbus
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.1.
|
4
|
+
version: 1.1.5
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-
|
12
|
+
date: 2012-07-17 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rake
|