rsmp 0.18.0 → 0.18.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/lib/rsmp/alarm_state.rb +4 -1
- data/lib/rsmp/collect/alarm_collector.rb +1 -1
- data/lib/rsmp/tlc/traffic_controller.rb +13 -8
- 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: 83dbe8238263a30a4bc752d457cf3983bf2e330ed3dcf7d3268816d0cc90004d
|
4
|
+
data.tar.gz: 8af75efe50283c758bf86daa86748734a0383f380810da295b4db9fa7dfa259f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a90d43cfd4dc1ef13470d49c069275db44b27525f5a6479482faa485ed2b73303be8eac51f8ca7f392faa8db527d18282554ca76fb10f59126f745551af4d41f
|
7
|
+
data.tar.gz: 260b864955ed33d5991149957286108e2260017ff9b434aeb68321dd265cc52bad8e5b902d707941e666cb0d4bbef54455478dddab7cd0e9a0c88c609154b383
|
data/Gemfile.lock
CHANGED
data/lib/rsmp/alarm_state.rb
CHANGED
@@ -49,8 +49,11 @@ module RSMP
|
|
49
49
|
change
|
50
50
|
end
|
51
51
|
|
52
|
+
# according to the rsmp core spec, the only time an alarm changes to unanknowledged,
|
53
|
+
# is when it's activated. See:
|
54
|
+
# https://rsmp-nordic.org/rsmp_specifications/core/3.2/applicability/basic_structure.html#alarm-status
|
52
55
|
def activate
|
53
|
-
change, @active = !@active, true
|
56
|
+
change, @active, @acknowledged = !@active, true, false
|
54
57
|
update_timestamp if change
|
55
58
|
change
|
56
59
|
end
|
@@ -298,16 +298,21 @@ module RSMP
|
|
298
298
|
|
299
299
|
def input_logic input, change
|
300
300
|
return unless @input_programming && change != nil
|
301
|
-
|
302
|
-
return unless
|
303
|
-
if
|
304
|
-
|
301
|
+
action = @input_programming[input]
|
302
|
+
return unless action
|
303
|
+
if action['raise_alarm']
|
304
|
+
if action['component']
|
305
|
+
component = node.find_component action['component']
|
306
|
+
else
|
307
|
+
component = node.main
|
308
|
+
end
|
309
|
+
alarm_code = action['raise_alarm']
|
305
310
|
if change
|
306
|
-
log "Activating input #{input} is programmed to
|
307
|
-
activate_alarm alarm_code
|
311
|
+
log "Activating input #{input} is programmed to raise alarm #{alarm_code} on #{component.c_id}", level: :info
|
312
|
+
component.activate_alarm alarm_code
|
308
313
|
else
|
309
|
-
log "Deactivating input #{input} is programmed to
|
310
|
-
deactivate_alarm alarm_code
|
314
|
+
log "Deactivating input #{input} is programmed to clear alarm #{alarm_code} on #{component.c_id}", level: :info
|
315
|
+
component.deactivate_alarm alarm_code
|
311
316
|
end
|
312
317
|
end
|
313
318
|
end
|
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.18.
|
4
|
+
version: 0.18.2
|
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-
|
11
|
+
date: 2023-05-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: async
|