rsmp 0.12.0 → 0.12.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +3 -3
- data/lib/rsmp/alarm_state.rb +8 -0
- data/lib/rsmp/component.rb +23 -19
- data/lib/rsmp/site.rb +1 -1
- data/lib/rsmp/site_proxy.rb +0 -1
- data/lib/rsmp/tlc/traffic_controller.rb +2 -2
- 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: d97c24017cb23ab7159bebda96f262f50813d902365e2fa1fabeb90d4771df01
|
4
|
+
data.tar.gz: fde070792556ef05d68ebfe5d7757d696f81921d75e64ced80f2a1c4878d39ef
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2b58d0ed3307893fdd43fcd361b5da63e541baf199ac21860fa11cca756fe4339a63b4bf3420164232c248667e3cf75fe0b467928642e9fcd99f951308fa6e67
|
7
|
+
data.tar.gz: 3c5cb9a04f22a56a16f51c41faff55a5d587fe51dd2774e6a018846da40b5bf066f08bbbfc7848382ec2a76c64a0b17cad372972b0357d7182359e934864b771
|
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
rsmp (0.12.
|
4
|
+
rsmp (0.12.3)
|
5
5
|
async (~> 1.29.1)
|
6
6
|
async-io (~> 1.32.2)
|
7
7
|
colorize (~> 0.8.1)
|
@@ -68,7 +68,7 @@ GEM
|
|
68
68
|
ffi (1.15.5-x64-mingw32)
|
69
69
|
fiber-local (1.0.0)
|
70
70
|
hana (1.3.7)
|
71
|
-
json_schemer (0.2.
|
71
|
+
json_schemer (0.2.20)
|
72
72
|
ecma-re-validator (~> 0.3)
|
73
73
|
hana (~> 1.3)
|
74
74
|
regexp_parser (~> 2.0)
|
@@ -80,7 +80,7 @@ GEM
|
|
80
80
|
nio4r (2.5.8)
|
81
81
|
rake (13.0.6)
|
82
82
|
regexp_parser (2.2.1)
|
83
|
-
rsmp_schemer (0.
|
83
|
+
rsmp_schemer (0.4.0)
|
84
84
|
json_schemer (~> 0.2.18)
|
85
85
|
rspec (3.10.0)
|
86
86
|
rspec-core (~> 3.10.0)
|
data/lib/rsmp/alarm_state.rb
CHANGED
data/lib/rsmp/component.rb
CHANGED
@@ -20,31 +20,35 @@ module RSMP
|
|
20
20
|
end
|
21
21
|
|
22
22
|
def suspend_alarm alarm_code
|
23
|
-
|
24
|
-
if alarm.suspended
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
else
|
29
|
-
log "Alarm #{alarm_code} already suspended", level: :info
|
30
|
-
end
|
23
|
+
alarm = get_alarm_state alarm_code
|
24
|
+
return if alarm.suspended
|
25
|
+
log "Suspending alarm #{alarm_code}", level: :info
|
26
|
+
alarm.suspend
|
27
|
+
@node.alarm_changed alarm
|
31
28
|
end
|
32
29
|
|
33
30
|
def resume_alarm alarm_code
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
else
|
40
|
-
log "Alarm #{alarm_code} not suspended", level: :info
|
41
|
-
end
|
31
|
+
alarm = get_alarm_state alarm_code
|
32
|
+
return unless alarm.suspended
|
33
|
+
log "Resuming alarm #{alarm_code}", level: :info
|
34
|
+
alarm.resume
|
35
|
+
@node.alarm_changed alarm
|
42
36
|
end
|
43
37
|
|
44
|
-
|
45
|
-
|
46
|
-
|
38
|
+
def activate_alarm alarm_code
|
39
|
+
alarm = get_alarm_state alarm_code
|
40
|
+
return if alarm.active
|
41
|
+
log "Activating alarm #{alarm_code}", level: :info
|
42
|
+
alarm.activate
|
43
|
+
@node.alarm_changed alarm
|
47
44
|
end
|
48
45
|
|
46
|
+
def deactivate_alarm alarm_code
|
47
|
+
alarm = get_alarm_state alarm_code
|
48
|
+
return unless alarm.active
|
49
|
+
log "Deactivating alarm #{alarm_code}", level: :info
|
50
|
+
alarm.deactivate
|
51
|
+
@node.alarm_changed alarm
|
52
|
+
end
|
49
53
|
end
|
50
54
|
end
|
data/lib/rsmp/site.rb
CHANGED
data/lib/rsmp/site_proxy.rb
CHANGED
@@ -264,10 +264,10 @@ module RSMP
|
|
264
264
|
alarm_code = actions['raise']
|
265
265
|
if change
|
266
266
|
log "Activating alarm #{alarm_code}, because input #{input} was activated", level: :info
|
267
|
-
|
267
|
+
activate_alarm alarm_code
|
268
268
|
else
|
269
269
|
log "Deactivating alarm #{alarm_code}, because input #{input} was deactivated", level: :info
|
270
|
-
|
270
|
+
deactivate_alarm alarm_code
|
271
271
|
end
|
272
272
|
end
|
273
273
|
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.12.
|
4
|
+
version: 0.12.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Emil Tin
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-04-
|
11
|
+
date: 2022-04-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: async
|