rsmp 0.6.5 → 0.7.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 +1 -1
- data/config/supervisor.yaml +0 -2
- data/config/tlc.yaml +0 -2
- data/lib/rsmp/component.rb +1 -1
- data/lib/rsmp/logger.rb +18 -5
- data/lib/rsmp/site_proxy.rb +1 -1
- data/lib/rsmp/tlc/traffic_controller_site.rb +6 -1
- data/lib/rsmp/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c9f08828abc4896fcc6a40da66ed96db50f1c7ba8d2b819ae7f7771930920bd4
|
4
|
+
data.tar.gz: 618100d9e2bf8ace347274a791740b094cf690be3e00e12d35f491e7a717b58e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: fe9ce63eae79b1145e0bce329a5c2ed723075293d1811402d65349bc368f9246bfbe4823dddb33d3dead0e74bf113937f8aac1b1c39680af81cd313637c05d71
|
7
|
+
data.tar.gz: e2451b14a8a9889de965a1e67b5e42e0dcfb6d28cbeb1d9bbfd962b324c8087502a93b1095edaf80fdae1c0721c38912d78d48154a8d359b2fd3846bd69063f7
|
data/Gemfile.lock
CHANGED
data/config/supervisor.yaml
CHANGED
data/config/tlc.yaml
CHANGED
data/lib/rsmp/component.rb
CHANGED
@@ -85,7 +85,7 @@ module RSMP
|
|
85
85
|
raise RepeatedAlarmError.new("no changes from previous alarm #{previous.m_id_short}")
|
86
86
|
end
|
87
87
|
if Time.parse(message.attribute('aTs')) < Time.parse(previous.attribute('aTs'))
|
88
|
-
raise
|
88
|
+
raise TimestampError.new("timestamp is earlier than previous alarm #{previous.m_id_short}")
|
89
89
|
end
|
90
90
|
end
|
91
91
|
ensure
|
data/lib/rsmp/logger.rb
CHANGED
@@ -14,6 +14,7 @@ module RSMP
|
|
14
14
|
'hide_ip_and_port' => false,
|
15
15
|
'acknowledgements' => false,
|
16
16
|
'watchdogs' => false,
|
17
|
+
'alarms' => true,
|
17
18
|
'json'=>false,
|
18
19
|
'tabs'=>'-',
|
19
20
|
|
@@ -44,6 +45,15 @@ module RSMP
|
|
44
45
|
'id'=>4,
|
45
46
|
}
|
46
47
|
|
48
|
+
@ignorable = {
|
49
|
+
'versions' => ['Version'],
|
50
|
+
'statuses' => ['StatusRequest','StatusSubscribe','StatusUnsubscribe','StatusResponse','StatusUpdate'],
|
51
|
+
'commands' => ['CommandRequest','CommandResponse'],
|
52
|
+
'watchdogs' => 'Watchdog',
|
53
|
+
'alarms' => ['Alarm'],
|
54
|
+
'aggregated_status' => ['AggregatedStatus','AggregatedStatusRequest']
|
55
|
+
}
|
56
|
+
|
47
57
|
if settings
|
48
58
|
@settings = defaults.merge settings
|
49
59
|
else
|
@@ -95,11 +105,14 @@ module RSMP
|
|
95
105
|
|
96
106
|
if item[:message]
|
97
107
|
type = item[:message].type
|
98
|
-
ack = type == "MessageAck" || type == "MessageNotAck"
|
99
|
-
|
100
|
-
|
101
|
-
if
|
102
|
-
return false if
|
108
|
+
ack = (type == "MessageAck" || type == "MessageNotAck")
|
109
|
+
@ignorable.each_pair do |key,types|
|
110
|
+
ignore = [types].flatten
|
111
|
+
if @settings[key] == false
|
112
|
+
return false if ignore.include?(type)
|
113
|
+
if ack
|
114
|
+
return false if item[:message].original && ignore.include?(item[:message].original.type)
|
115
|
+
end
|
103
116
|
end
|
104
117
|
end
|
105
118
|
return false if ack && @settings["acknowledgements"] == false &&
|
data/lib/rsmp/site_proxy.rb
CHANGED
@@ -68,7 +68,7 @@ module RSMP
|
|
68
68
|
else
|
69
69
|
super message
|
70
70
|
end
|
71
|
-
rescue RSMP::RepeatedAlarmError, RSMP::RepeatedStatusError => e
|
71
|
+
rescue RSMP::RepeatedAlarmError, RSMP::RepeatedStatusError, TimestampError => e
|
72
72
|
str = "Rejected #{message.type} message,"
|
73
73
|
dont_acknowledge message, str, "#{e}"
|
74
74
|
notify_error e.exception("#{str}#{e.message} #{message.json}")
|
@@ -19,7 +19,12 @@ module RSMP
|
|
19
19
|
@signal_plans = {}
|
20
20
|
return unless signal_plans
|
21
21
|
signal_plans.each_pair do |id,settings|
|
22
|
-
|
22
|
+
states = nil
|
23
|
+
bands = nil
|
24
|
+
states = settings['states'] if settings
|
25
|
+
dynamic_bands = settings['dynamic_bands'] if settings
|
26
|
+
|
27
|
+
@signal_plans[id.to_i] = SignalPlan.new(nr: id.to_i, states:states,dynamic_bands:dynamic_bands)
|
23
28
|
end
|
24
29
|
end
|
25
30
|
|
data/lib/rsmp/version.rb
CHANGED