rsmp 0.17.2 → 0.17.4
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.
- checksums.yaml +4 -4
- data/Gemfile.lock +2 -2
- data/lib/rsmp/supervisor_proxy.rb +5 -2
- data/lib/rsmp/tlc/traffic_controller.rb +16 -1
- data/lib/rsmp/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 17b5f6f4b2a3b5c9280497906b2111d7739956f2fdb08b1052b919b77e9d093f
|
4
|
+
data.tar.gz: bab9a1e34d857fb60a15c8c1849dd0e6e24483753d9e5a3052f1ba9f162a0e96
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ba268e1647b9de5b401a285b462d4f83108266a14eab597bd3203f37a36118ee7952e6eb3ce6edf7bcdac61472337032efaf4073da3b7c7059284b5cd18b3fa8
|
7
|
+
data.tar.gz: 5ad8ba86f07b8159c33a47420875d29fecdd02684b16e7ea5c6bb7329f64b4a8b44928347438cef32dc51f2462ece94197ad95c5802d0118b2273d82d633bb86
|
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
rsmp (0.17.
|
4
|
+
rsmp (0.17.4)
|
5
5
|
async (~> 1.30.3)
|
6
6
|
async-io (~> 1.33.0)
|
7
7
|
colorize (~> 0.8.1)
|
@@ -79,7 +79,7 @@ GEM
|
|
79
79
|
multi_test (0.1.2)
|
80
80
|
nio4r (2.5.9)
|
81
81
|
rake (13.0.6)
|
82
|
-
regexp_parser (2.
|
82
|
+
regexp_parser (2.8.0)
|
83
83
|
rsmp_schema (0.4.0)
|
84
84
|
json_schemer (~> 0.2.21)
|
85
85
|
thor (~> 1.2.1)
|
@@ -70,10 +70,13 @@ module RSMP
|
|
70
70
|
# Async::IO::Endpoint#connect renames the current task. run in a subtask to avoid this see issue #22
|
71
71
|
@task.async do |task|
|
72
72
|
task.annotate 'socket task'
|
73
|
-
# this timeout is a workaround for
|
74
|
-
|
73
|
+
# this timeout is a workaround for connect hanging on windows if the other side is not present yet
|
74
|
+
timeout = @site_settings.dig('timeouts','connect') || 1.1
|
75
|
+
task.with_timeout timeout do
|
75
76
|
@socket = @endpoint.connect
|
76
77
|
end
|
78
|
+
delay = @site_settings.dig('intervals','after_connect')
|
79
|
+
task.sleep delay if delay
|
77
80
|
end.wait
|
78
81
|
|
79
82
|
@stream = Async::IO::Stream.new(@socket)
|
@@ -69,6 +69,7 @@ module RSMP
|
|
69
69
|
@time_int = nil
|
70
70
|
@inputs.reset
|
71
71
|
@signal_priorities = []
|
72
|
+
@dynamic_bands_timeout = 0
|
72
73
|
end
|
73
74
|
|
74
75
|
def dark?
|
@@ -239,7 +240,7 @@ module RSMP
|
|
239
240
|
case command_code
|
240
241
|
when 'M0001', 'M0002', 'M0003', 'M0004', 'M0005', 'M0006', 'M0007',
|
241
242
|
'M0012', 'M0013', 'M0014', 'M0015', 'M0016', 'M0017', 'M0018',
|
242
|
-
'M0019', 'M0020', 'M0021', 'M0022',
|
243
|
+
'M0019', 'M0020', 'M0021', 'M0022', 'M0023',
|
243
244
|
'M0103', 'M0104'
|
244
245
|
|
245
246
|
return send("handle_#{command_code.downcase}", arg, options)
|
@@ -474,6 +475,20 @@ module RSMP
|
|
474
475
|
end
|
475
476
|
end
|
476
477
|
|
478
|
+
def handle_m0023 arg, options={}
|
479
|
+
@node.verify_security_code 2, arg['securityCode']
|
480
|
+
timeout = arg['status'].to_i
|
481
|
+
unless timeout>=0 and timeout <= 65535
|
482
|
+
raise RSMP::MessageRejected.new "Timeout must be in the range 0-65535, got #{timeout}"
|
483
|
+
end
|
484
|
+
if timeout == 0
|
485
|
+
log "Dynamic bands timeout disabled", level: :info
|
486
|
+
else
|
487
|
+
log "Dynamic bands timeout set to #{timeout}min", level: :info
|
488
|
+
end
|
489
|
+
@dynamic_bands_timeout = timeout
|
490
|
+
end
|
491
|
+
|
477
492
|
def handle_m0103 arg, options={}
|
478
493
|
level = {'Level1'=>1,'Level2'=>2}[arg['status']]
|
479
494
|
@node.change_security_code level, arg['oldSecurityCode'], arg['newSecurityCode']
|
data/lib/rsmp/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rsmp
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.17.
|
4
|
+
version: 0.17.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Emil Tin
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-04-
|
11
|
+
date: 2023-04-25 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: async
|