rsmp 0.38.0 → 0.40.0
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/.rubocop.yml +5 -16
- data/.tool-versions +1 -1
- data/Gemfile +2 -1
- data/Gemfile.lock +40 -38
- data/README.md +4 -3
- data/documentation/configuration.md +76 -0
- data/lib/rsmp/cli.rb +15 -12
- data/lib/rsmp/collect/alarm_matcher.rb +4 -4
- data/lib/rsmp/collect/collector/logging.rb +1 -0
- data/lib/rsmp/collect/command_matcher.rb +3 -3
- data/lib/rsmp/collect/matcher.rb +3 -3
- data/lib/rsmp/collect/queue.rb +3 -3
- data/lib/rsmp/collect/receiver.rb +2 -4
- data/lib/rsmp/collect/status_matcher.rb +7 -6
- data/lib/rsmp/component/alarm_state.rb +3 -4
- data/lib/rsmp/component/component_base.rb +0 -1
- data/lib/rsmp/component/components.rb +1 -2
- data/lib/rsmp/convert/export/json_schema.rb +2 -0
- data/lib/rsmp/convert/import/yaml.rb +1 -0
- data/lib/rsmp/helpers/clock.rb +3 -5
- data/lib/rsmp/helpers/deep_merge.rb +1 -0
- data/lib/rsmp/helpers/error.rb +1 -0
- data/lib/rsmp/helpers/inspect.rb +11 -12
- data/lib/rsmp/log/archive.rb +2 -3
- data/lib/rsmp/log/logger.rb +1 -0
- data/lib/rsmp/log/logging.rb +1 -0
- data/lib/rsmp/message.rb +26 -0
- data/lib/rsmp/node/node.rb +1 -2
- data/lib/rsmp/node/protocol.rb +1 -0
- data/lib/rsmp/node/site/site.rb +9 -36
- data/lib/rsmp/node/supervisor/modules/configuration.rb +3 -19
- data/lib/rsmp/node/supervisor/supervisor.rb +1 -4
- data/lib/rsmp/node/task.rb +1 -0
- data/lib/rsmp/options/options.rb +185 -0
- data/lib/rsmp/options/schemas/site.json +49 -0
- data/lib/rsmp/options/schemas/supervisor.json +43 -0
- data/lib/rsmp/options/schemas/traffic_controller_site.json +18 -0
- data/lib/rsmp/options/site_options.rb +44 -0
- data/lib/rsmp/options/supervisor_options.rb +28 -0
- data/lib/rsmp/options/traffic_controller_site_options.rb +12 -0
- data/lib/rsmp/proxy/proxy.rb +2 -4
- data/lib/rsmp/proxy/site/site_proxy.rb +1 -2
- data/lib/rsmp/proxy/supervisor/supervisor_proxy.rb +1 -2
- data/lib/rsmp/tlc/detector_logic.rb +1 -0
- data/lib/rsmp/tlc/signal_group.rb +1 -0
- data/lib/rsmp/tlc/signal_priority.rb +1 -0
- data/lib/rsmp/tlc/traffic_controller_site.rb +4 -0
- data/lib/rsmp/version.rb +1 -1
- data/lib/rsmp.rb +4 -0
- metadata +10 -2
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
module RSMP
|
|
2
|
+
class Supervisor < Node
|
|
3
|
+
# Configuration options for supervisors.
|
|
4
|
+
class Options < RSMP::Options
|
|
5
|
+
def defaults
|
|
6
|
+
{
|
|
7
|
+
'port' => 12_111,
|
|
8
|
+
'ips' => 'all',
|
|
9
|
+
'guest' => {
|
|
10
|
+
'sxl' => 'tlc',
|
|
11
|
+
'intervals' => {
|
|
12
|
+
'timer' => 1,
|
|
13
|
+
'watchdog' => 1
|
|
14
|
+
},
|
|
15
|
+
'timeouts' => {
|
|
16
|
+
'watchdog' => 2,
|
|
17
|
+
'acknowledgement' => 2
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
end
|
|
22
|
+
|
|
23
|
+
def schema_file
|
|
24
|
+
'supervisor.json'
|
|
25
|
+
end
|
|
26
|
+
end
|
|
27
|
+
end
|
|
28
|
+
end
|
data/lib/rsmp/proxy/proxy.rb
CHANGED
|
@@ -1,10 +1,8 @@
|
|
|
1
|
-
# A connection to a remote site or supervisor.
|
|
2
|
-
# Uses the Task module to handle asyncronous work, but adds
|
|
3
|
-
# the concept of a connection that can be connected or disconnected.
|
|
4
|
-
|
|
5
1
|
require 'rubygems'
|
|
6
2
|
|
|
7
3
|
module RSMP
|
|
4
|
+
# Represents a connection to a remote site or supervisor.
|
|
5
|
+
# Provides common connection lifecycle and message handling.
|
|
8
6
|
class Proxy
|
|
9
7
|
WRAPPING_DELIMITER = "\f".freeze
|
|
10
8
|
|
|
@@ -4,6 +4,10 @@ module RSMP
|
|
|
4
4
|
class TrafficControllerSite < Site
|
|
5
5
|
attr_accessor :main, :signal_plans
|
|
6
6
|
|
|
7
|
+
def self.options_class
|
|
8
|
+
RSMP::TLC::TrafficControllerSite::Options
|
|
9
|
+
end
|
|
10
|
+
|
|
7
11
|
def initialize(options = {})
|
|
8
12
|
# setup options before calling super initializer,
|
|
9
13
|
# since build of components depend on options
|
data/lib/rsmp/version.rb
CHANGED
data/lib/rsmp.rb
CHANGED
|
@@ -53,6 +53,10 @@ require_relative 'rsmp/node/supervisor/modules/configuration'
|
|
|
53
53
|
require_relative 'rsmp/node/supervisor/modules/connection'
|
|
54
54
|
require_relative 'rsmp/node/supervisor/modules/sites'
|
|
55
55
|
require_relative 'rsmp/node/supervisor/supervisor'
|
|
56
|
+
require_relative 'rsmp/options/options'
|
|
57
|
+
require_relative 'rsmp/options/site_options'
|
|
58
|
+
require_relative 'rsmp/options/supervisor_options'
|
|
59
|
+
require_relative 'rsmp/options/traffic_controller_site_options'
|
|
56
60
|
require_relative 'rsmp/proxy/modules/state'
|
|
57
61
|
require_relative 'rsmp/proxy/modules/watchdogs'
|
|
58
62
|
require_relative 'rsmp/proxy/modules/acknowledgements'
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: rsmp
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 0.40.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Emil Tin
|
|
@@ -138,6 +138,7 @@ files:
|
|
|
138
138
|
- cucumber.yml
|
|
139
139
|
- documentation/classes_and_modules.md
|
|
140
140
|
- documentation/collecting_message.md
|
|
141
|
+
- documentation/configuration.md
|
|
141
142
|
- documentation/message_distribution.md
|
|
142
143
|
- documentation/tasks.md
|
|
143
144
|
- exe/rsmp
|
|
@@ -186,6 +187,13 @@ files:
|
|
|
186
187
|
- lib/rsmp/node/supervisor/modules/sites.rb
|
|
187
188
|
- lib/rsmp/node/supervisor/supervisor.rb
|
|
188
189
|
- lib/rsmp/node/task.rb
|
|
190
|
+
- lib/rsmp/options/options.rb
|
|
191
|
+
- lib/rsmp/options/schemas/site.json
|
|
192
|
+
- lib/rsmp/options/schemas/supervisor.json
|
|
193
|
+
- lib/rsmp/options/schemas/traffic_controller_site.json
|
|
194
|
+
- lib/rsmp/options/site_options.rb
|
|
195
|
+
- lib/rsmp/options/supervisor_options.rb
|
|
196
|
+
- lib/rsmp/options/traffic_controller_site_options.rb
|
|
189
197
|
- lib/rsmp/proxy/modules/acknowledgements.rb
|
|
190
198
|
- lib/rsmp/proxy/modules/receive.rb
|
|
191
199
|
- lib/rsmp/proxy/modules/send.rb
|
|
@@ -248,7 +256,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
248
256
|
- !ruby/object:Gem::Version
|
|
249
257
|
version: '0'
|
|
250
258
|
requirements: []
|
|
251
|
-
rubygems_version:
|
|
259
|
+
rubygems_version: 4.0.3
|
|
252
260
|
specification_version: 4
|
|
253
261
|
summary: RoadSide Message Protocol (RSMP) library.
|
|
254
262
|
test_files: []
|