rsmp 0.43.2 → 0.45.1
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/.github/workflows/rubocop.yaml +1 -1
- data/.github/workflows/sus.yaml +1 -1
- data/.gitignore +0 -1
- data/CHANGELOG.md +12 -1
- data/Gemfile +0 -2
- data/Gemfile.lock +10 -88
- data/README.md +30 -35
- data/Rakefile +2 -2
- data/config/supervisor.yaml +2 -1
- data/config/tlc.yaml +2 -2
- data/documentation/configuration.md +12 -11
- data/documentation/message_distribution.md +1 -2
- data/documentation/tasks.md +1 -2
- data/exe/rsmp +1 -2
- data/lib/rsmp/cli.rb +62 -8
- data/lib/rsmp/component/component.rb +0 -4
- data/lib/rsmp/component/component_base.rb +15 -2
- data/lib/rsmp/component/component_proxy.rb +1 -1
- data/lib/rsmp/component/components.rb +22 -1
- data/lib/rsmp/convert/export/json_schema/outputs.rb +19 -0
- data/lib/rsmp/convert/export/json_schema/values.rb +7 -5
- data/lib/rsmp/convert/export/json_schema.rb +15 -3
- data/lib/rsmp/helpers/deep_merge.rb +2 -2
- data/lib/rsmp/message.rb +32 -0
- data/lib/rsmp/node/site/site.rb +34 -10
- data/lib/rsmp/node/supervisor/modules/configuration.rb +32 -5
- data/lib/rsmp/node/supervisor/modules/connection.rb +0 -2
- data/lib/rsmp/node/supervisor/supervisor.rb +0 -7
- data/lib/rsmp/options/options.rb +55 -6
- data/lib/rsmp/options/schemas/site.json +6 -3
- data/lib/rsmp/options/schemas/supervisor.json +5 -2
- data/lib/rsmp/options/schemas/supervisor_site.json +5 -2
- data/lib/rsmp/options/site_options.rb +3 -2
- data/lib/rsmp/options/supervisor_options.rb +3 -1
- data/lib/rsmp/proxy/modules/acknowledgements.rb +2 -0
- data/lib/rsmp/proxy/modules/receive.rb +5 -2
- data/lib/rsmp/proxy/modules/state.rb +1 -0
- data/lib/rsmp/proxy/modules/versions.rb +90 -15
- data/lib/rsmp/proxy/proxy.rb +52 -3
- data/lib/rsmp/proxy/site/modules/status.rb +5 -3
- data/lib/rsmp/proxy/site/site_proxy.rb +68 -35
- data/lib/rsmp/proxy/site/sxl_selection.rb +54 -0
- data/lib/rsmp/proxy/supervisor/supervisor_proxy.rb +54 -18
- data/lib/rsmp/schema/core_sxl_resolution.rb +69 -0
- data/lib/rsmp/schema/message_resolution.rb +104 -0
- data/lib/rsmp/schema/validation.rb +57 -0
- data/lib/rsmp/schema.rb +87 -32
- data/lib/rsmp/schema_error.rb +7 -1
- data/lib/rsmp/sxl/interface.rb +48 -0
- data/lib/rsmp/sxl/registry.rb +55 -0
- data/lib/rsmp/sxl/site_interface.rb +10 -0
- data/lib/rsmp/sxl/supervisor_interface.rb +21 -0
- data/lib/rsmp/tlc/detector_logic.rb +2 -2
- data/lib/rsmp/tlc/signal_group.rb +2 -2
- data/lib/rsmp/tlc/site_interface.rb +10 -0
- data/lib/rsmp/tlc/{traffic_controller_proxy.rb → supervisor_interface.rb} +19 -34
- data/lib/rsmp/tlc/traffic_controller.rb +10 -2
- data/lib/rsmp/tlc/traffic_controller_site.rb +4 -2
- data/lib/rsmp/tlc.rb +10 -0
- data/lib/rsmp/version.rb +1 -1
- data/lib/rsmp.rb +8 -1
- data/rsmp.gemspec +5 -5
- data/schemas/core/3.3.0/aggregated_status.json +25 -0
- data/schemas/core/3.3.0/aggregated_status_request.json +9 -0
- data/schemas/core/3.3.0/alarm.json +71 -0
- data/schemas/core/3.3.0/alarm_acknowledge.json +11 -0
- data/schemas/core/3.3.0/alarm_issue.json +44 -0
- data/schemas/core/3.3.0/alarm_request.json +3 -0
- data/schemas/core/3.3.0/alarm_suspend_resume.json +3 -0
- data/schemas/core/3.3.0/alarm_suspended_resumed.json +44 -0
- data/schemas/core/3.3.0/command_request.json +24 -0
- data/schemas/core/3.3.0/command_response.json +35 -0
- data/schemas/core/3.3.0/component_list.json +24 -0
- data/schemas/core/3.3.0/core.json +40 -0
- data/schemas/core/3.3.0/definitions.json +133 -0
- data/schemas/core/3.3.0/message_ack.json +11 -0
- data/schemas/core/3.3.0/message_not_ack.json +15 -0
- data/schemas/core/3.3.0/rsmp.json +142 -0
- data/schemas/core/3.3.0/status.json +21 -0
- data/schemas/core/3.3.0/status_request.json +5 -0
- data/schemas/core/3.3.0/status_response.json +41 -0
- data/schemas/core/3.3.0/status_subscribe.json +31 -0
- data/schemas/core/3.3.0/status_unsubscribe.json +5 -0
- data/schemas/core/3.3.0/status_update.json +41 -0
- data/schemas/core/3.3.0/version.json +144 -0
- data/schemas/core/3.3.0/watchdog.json +9 -0
- data/schemas/tlc/1.0.10/rsmp.json +2 -1
- data/schemas/tlc/1.0.10/sxl.yaml +1 -0
- data/schemas/tlc/1.0.10/sxl_index.json +356 -0
- data/schemas/tlc/1.0.13/rsmp.json +2 -1
- data/schemas/tlc/1.0.13/sxl.yaml +1 -0
- data/schemas/tlc/1.0.13/sxl_index.json +436 -0
- data/schemas/tlc/1.0.14/rsmp.json +2 -1
- data/schemas/tlc/1.0.14/sxl.yaml +1 -0
- data/schemas/tlc/1.0.14/sxl_index.json +468 -0
- data/schemas/tlc/1.0.15/rsmp.json +2 -1
- data/schemas/tlc/1.0.15/sxl.yaml +1 -0
- data/schemas/tlc/1.0.15/sxl_index.json +508 -0
- data/schemas/tlc/1.0.7/rsmp.json +2 -1
- data/schemas/tlc/1.0.7/sxl.yaml +1 -0
- data/schemas/tlc/1.0.7/sxl_index.json +356 -0
- data/schemas/tlc/1.0.8/rsmp.json +2 -1
- data/schemas/tlc/1.0.8/sxl.yaml +1 -0
- data/schemas/tlc/1.0.8/sxl_index.json +356 -0
- data/schemas/tlc/1.0.9/rsmp.json +2 -1
- data/schemas/tlc/1.0.9/sxl.yaml +1 -0
- data/schemas/tlc/1.0.9/sxl_index.json +356 -0
- data/schemas/tlc/1.1.0/rsmp.json +2 -1
- data/schemas/tlc/1.1.0/sxl.yaml +1 -0
- data/schemas/tlc/1.1.0/sxl_index.json +572 -0
- data/schemas/tlc/1.2.0/rsmp.json +2 -1
- data/schemas/tlc/1.2.0/sxl.yaml +1 -0
- data/schemas/tlc/1.2.0/sxl_index.json +571 -0
- data/schemas/tlc/1.2.1/rsmp.json +2 -1
- data/schemas/tlc/1.2.1/sxl.yaml +1 -0
- data/schemas/tlc/1.2.1/sxl_index.json +571 -0
- data/schemas/tlc/1.3.0/alarms/A0001.json +4 -0
- data/schemas/tlc/1.3.0/alarms/A0002.json +4 -0
- data/schemas/tlc/1.3.0/alarms/A0003.json +4 -0
- data/schemas/tlc/1.3.0/alarms/A0004.json +4 -0
- data/schemas/tlc/1.3.0/alarms/A0005.json +4 -0
- data/schemas/tlc/1.3.0/alarms/A0006.json +4 -0
- data/schemas/tlc/1.3.0/alarms/A0007.json +34 -0
- data/schemas/tlc/1.3.0/alarms/A0008.json +30 -0
- data/schemas/tlc/1.3.0/alarms/A0009.json +4 -0
- data/schemas/tlc/1.3.0/alarms/A0010.json +4 -0
- data/schemas/tlc/1.3.0/alarms/A0101.json +4 -0
- data/schemas/tlc/1.3.0/alarms/A0201.json +35 -0
- data/schemas/tlc/1.3.0/alarms/A0202.json +35 -0
- data/schemas/tlc/1.3.0/alarms/A0301.json +92 -0
- data/schemas/tlc/1.3.0/alarms/A0302.json +115 -0
- data/schemas/tlc/1.3.0/alarms/A0303.json +92 -0
- data/schemas/tlc/1.3.0/alarms/A0304.json +115 -0
- data/schemas/tlc/1.3.0/alarms/alarms.json +287 -0
- data/schemas/tlc/1.3.0/commands/M0001.json +92 -0
- data/schemas/tlc/1.3.0/commands/M0002.json +69 -0
- data/schemas/tlc/1.3.0/commands/M0003.json +69 -0
- data/schemas/tlc/1.3.0/commands/M0004.json +51 -0
- data/schemas/tlc/1.3.0/commands/M0005.json +69 -0
- data/schemas/tlc/1.3.0/commands/M0006.json +69 -0
- data/schemas/tlc/1.3.0/commands/M0007.json +51 -0
- data/schemas/tlc/1.3.0/commands/M0008.json +87 -0
- data/schemas/tlc/1.3.0/commands/M0010.json +51 -0
- data/schemas/tlc/1.3.0/commands/M0011.json +51 -0
- data/schemas/tlc/1.3.0/commands/M0012.json +51 -0
- data/schemas/tlc/1.3.0/commands/M0013.json +51 -0
- data/schemas/tlc/1.3.0/commands/M0014.json +69 -0
- data/schemas/tlc/1.3.0/commands/M0015.json +69 -0
- data/schemas/tlc/1.3.0/commands/M0016.json +51 -0
- data/schemas/tlc/1.3.0/commands/M0017.json +51 -0
- data/schemas/tlc/1.3.0/commands/M0018.json +69 -0
- data/schemas/tlc/1.3.0/commands/M0019.json +87 -0
- data/schemas/tlc/1.3.0/commands/M0020.json +87 -0
- data/schemas/tlc/1.3.0/commands/M0021.json +51 -0
- data/schemas/tlc/1.3.0/commands/M0022.json +249 -0
- data/schemas/tlc/1.3.0/commands/M0023.json +51 -0
- data/schemas/tlc/1.3.0/commands/M0024.json +33 -0
- data/schemas/tlc/1.3.0/commands/M0103.json +72 -0
- data/schemas/tlc/1.3.0/commands/M0104.json +141 -0
- data/schemas/tlc/1.3.0/commands/command_requests.json +8 -0
- data/schemas/tlc/1.3.0/commands/command_responses.json +8 -0
- data/schemas/tlc/1.3.0/commands/commands.json +415 -0
- data/schemas/tlc/1.3.0/defs/definitions.json +133 -0
- data/schemas/tlc/1.3.0/defs/guards.json +24 -0
- data/schemas/tlc/1.3.0/rsmp.json +75 -0
- data/schemas/tlc/1.3.0/statuses/S0001.json +109 -0
- data/schemas/tlc/1.3.0/statuses/S0002.json +36 -0
- data/schemas/tlc/1.3.0/statuses/S0003.json +36 -0
- data/schemas/tlc/1.3.0/statuses/S0004.json +36 -0
- data/schemas/tlc/1.3.0/statuses/S0005.json +72 -0
- data/schemas/tlc/1.3.0/statuses/S0006.json +54 -0
- data/schemas/tlc/1.3.0/statuses/S0007.json +73 -0
- data/schemas/tlc/1.3.0/statuses/S0008.json +73 -0
- data/schemas/tlc/1.3.0/statuses/S0009.json +73 -0
- data/schemas/tlc/1.3.0/statuses/S0010.json +73 -0
- data/schemas/tlc/1.3.0/statuses/S0011.json +73 -0
- data/schemas/tlc/1.3.0/statuses/S0012.json +73 -0
- data/schemas/tlc/1.3.0/statuses/S0013.json +54 -0
- data/schemas/tlc/1.3.0/statuses/S0014.json +55 -0
- data/schemas/tlc/1.3.0/statuses/S0015.json +55 -0
- data/schemas/tlc/1.3.0/statuses/S0016.json +36 -0
- data/schemas/tlc/1.3.0/statuses/S0017.json +36 -0
- data/schemas/tlc/1.3.0/statuses/S0018.json +61 -0
- data/schemas/tlc/1.3.0/statuses/S0019.json +36 -0
- data/schemas/tlc/1.3.0/statuses/S0020.json +54 -0
- data/schemas/tlc/1.3.0/statuses/S0021.json +37 -0
- data/schemas/tlc/1.3.0/statuses/S0022.json +36 -0
- data/schemas/tlc/1.3.0/statuses/S0023.json +37 -0
- data/schemas/tlc/1.3.0/statuses/S0024.json +37 -0
- data/schemas/tlc/1.3.0/statuses/S0025.json +162 -0
- data/schemas/tlc/1.3.0/statuses/S0026.json +36 -0
- data/schemas/tlc/1.3.0/statuses/S0027.json +36 -0
- data/schemas/tlc/1.3.0/statuses/S0028.json +36 -0
- data/schemas/tlc/1.3.0/statuses/S0029.json +36 -0
- data/schemas/tlc/1.3.0/statuses/S0030.json +36 -0
- data/schemas/tlc/1.3.0/statuses/S0031.json +36 -0
- data/schemas/tlc/1.3.0/statuses/S0032.json +73 -0
- data/schemas/tlc/1.3.0/statuses/S0033.json +77 -0
- data/schemas/tlc/1.3.0/statuses/S0034.json +36 -0
- data/schemas/tlc/1.3.0/statuses/S0035.json +49 -0
- data/schemas/tlc/1.3.0/statuses/S0091.json +40 -0
- data/schemas/tlc/1.3.0/statuses/S0092.json +40 -0
- data/schemas/tlc/1.3.0/statuses/S0095.json +36 -0
- data/schemas/tlc/1.3.0/statuses/S0096.json +126 -0
- data/schemas/tlc/1.3.0/statuses/S0097.json +54 -0
- data/schemas/tlc/1.3.0/statuses/S0098.json +72 -0
- data/schemas/tlc/1.3.0/statuses/S0201.json +54 -0
- data/schemas/tlc/1.3.0/statuses/S0202.json +54 -0
- data/schemas/tlc/1.3.0/statuses/S0203.json +54 -0
- data/schemas/tlc/1.3.0/statuses/S0204.json +198 -0
- data/schemas/tlc/1.3.0/statuses/S0205.json +54 -0
- data/schemas/tlc/1.3.0/statuses/S0206.json +54 -0
- data/schemas/tlc/1.3.0/statuses/S0207.json +54 -0
- data/schemas/tlc/1.3.0/statuses/S0208.json +198 -0
- data/schemas/tlc/1.3.0/statuses/statuses.json +787 -0
- data/schemas/tlc/1.3.0/sxl.yaml +2297 -0
- data/schemas/tlc/1.3.0/sxl_index.json +578 -0
- metadata +157 -15
- data/.github/copilot-instructions.md +0 -33
- data/.rspec +0 -1
- data/cucumber.yml +0 -1
data/lib/rsmp/tlc.rb
ADDED
data/lib/rsmp/version.rb
CHANGED
data/lib/rsmp.rb
CHANGED
|
@@ -69,6 +69,10 @@ require_relative 'rsmp/proxy/modules/receive'
|
|
|
69
69
|
require_relative 'rsmp/proxy/modules/versions'
|
|
70
70
|
require_relative 'rsmp/proxy/modules/tasks'
|
|
71
71
|
require_relative 'rsmp/proxy/proxy'
|
|
72
|
+
require_relative 'rsmp/sxl/interface'
|
|
73
|
+
require_relative 'rsmp/sxl/supervisor_interface'
|
|
74
|
+
require_relative 'rsmp/sxl/site_interface'
|
|
75
|
+
require_relative 'rsmp/sxl/registry'
|
|
72
76
|
require_relative 'rsmp/proxy/supervisor/modules/status'
|
|
73
77
|
require_relative 'rsmp/proxy/supervisor/modules/commands'
|
|
74
78
|
require_relative 'rsmp/proxy/supervisor/modules/alarms'
|
|
@@ -78,7 +82,9 @@ require_relative 'rsmp/proxy/site/modules/status'
|
|
|
78
82
|
require_relative 'rsmp/proxy/site/modules/aggregated_status'
|
|
79
83
|
require_relative 'rsmp/proxy/site/modules/alarms'
|
|
80
84
|
require_relative 'rsmp/proxy/site/modules/commands'
|
|
85
|
+
require_relative 'rsmp/proxy/site/sxl_selection'
|
|
81
86
|
require_relative 'rsmp/proxy/site/site_proxy'
|
|
87
|
+
require_relative 'rsmp/tlc'
|
|
82
88
|
require_relative 'rsmp/tlc/modules/system'
|
|
83
89
|
require_relative 'rsmp/tlc/modules/modes'
|
|
84
90
|
require_relative 'rsmp/tlc/modules/plans'
|
|
@@ -98,7 +104,8 @@ require_relative 'rsmp/tlc/proxy/io'
|
|
|
98
104
|
require_relative 'rsmp/tlc/proxy/plans'
|
|
99
105
|
require_relative 'rsmp/tlc/proxy/status'
|
|
100
106
|
require_relative 'rsmp/tlc/proxy/system'
|
|
101
|
-
require_relative 'rsmp/tlc/
|
|
107
|
+
require_relative 'rsmp/tlc/supervisor_interface'
|
|
108
|
+
require_relative 'rsmp/tlc/site_interface'
|
|
102
109
|
require_relative 'rsmp/tlc/traffic_controller'
|
|
103
110
|
require_relative 'rsmp/tlc/detector_logic'
|
|
104
111
|
|
data/rsmp.gemspec
CHANGED
|
@@ -13,7 +13,7 @@ Gem::Specification.new do |spec|
|
|
|
13
13
|
spec.description = 'Easy RSMP site and supervisor communication.'
|
|
14
14
|
spec.homepage = 'https://github.com/rsmp-nordic/rsmp'
|
|
15
15
|
spec.licenses = ['MIT']
|
|
16
|
-
spec.required_ruby_version = '>= 3.4
|
|
16
|
+
spec.required_ruby_version = '>= 3.4'
|
|
17
17
|
|
|
18
18
|
spec.metadata['homepage_uri'] = spec.homepage
|
|
19
19
|
spec.metadata['source_code_uri'] = 'https://github.com/rsmp-nordic/rsmp'
|
|
@@ -31,12 +31,12 @@ Gem::Specification.new do |spec|
|
|
|
31
31
|
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
|
32
32
|
spec.require_paths = ['lib']
|
|
33
33
|
|
|
34
|
-
spec.add_dependency 'async', '~> 2.
|
|
34
|
+
spec.add_dependency 'async', '~> 2.39'
|
|
35
35
|
spec.add_dependency 'colorize', '~> 1.1'
|
|
36
|
-
spec.add_dependency 'io-endpoint', '~> 0.
|
|
37
|
-
spec.add_dependency 'io-stream', '~> 0.
|
|
36
|
+
spec.add_dependency 'io-endpoint', '~> 0.17'
|
|
37
|
+
spec.add_dependency 'io-stream', '~> 0.13'
|
|
38
38
|
spec.add_dependency 'json_schemer', '~> 2.5'
|
|
39
|
-
spec.add_dependency 'logger', '~> 1.
|
|
39
|
+
spec.add_dependency 'logger', '~> 1.7'
|
|
40
40
|
spec.add_dependency 'ostruct', '~> 0.6'
|
|
41
41
|
spec.add_dependency 'thor', '~> 1.5'
|
|
42
42
|
end
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
{
|
|
2
|
+
"title" : "Aggregated Status",
|
|
3
|
+
"description" : "Aggregated status message",
|
|
4
|
+
"properties" : {
|
|
5
|
+
"mId" : { "$ref": "definitions.json#/message_id" },
|
|
6
|
+
"aSTS" : { "$ref": "definitions.json#/timestamp" },
|
|
7
|
+
"fP" : {
|
|
8
|
+
"description" : "Functional position",
|
|
9
|
+
"type" : ["string", "null"]
|
|
10
|
+
},
|
|
11
|
+
"fS" : {
|
|
12
|
+
"description" : "Functional position",
|
|
13
|
+
"type" : ["string", "null"]
|
|
14
|
+
},
|
|
15
|
+
"se" : {
|
|
16
|
+
"type" : "array",
|
|
17
|
+
"minItems": 8,
|
|
18
|
+
"maxItems": 8,
|
|
19
|
+
"items" : {
|
|
20
|
+
"type" : "boolean"
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
},
|
|
24
|
+
"required" : [ "mId", "aSTS", "fP", "fS", "se" ]
|
|
25
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
{
|
|
2
|
+
"title" : "Aggregated Status Request",
|
|
3
|
+
"description" : "Aggregated status request message",
|
|
4
|
+
"properties" : {
|
|
5
|
+
"mId" : { "$ref": "definitions.json#/message_id" },
|
|
6
|
+
"cId" : { "$ref": "definitions.json#/component_id" }
|
|
7
|
+
},
|
|
8
|
+
"required" : [ "mId", "cId" ]
|
|
9
|
+
}
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
{
|
|
2
|
+
"title" : "Alarm",
|
|
3
|
+
"description" : "Alarm messsage",
|
|
4
|
+
"properties" : {
|
|
5
|
+
"mId" : { "$ref": "definitions.json#/message_id" },
|
|
6
|
+
"cId" : { "$ref": "definitions.json#/component_id" },
|
|
7
|
+
"aCId" : { "$ref": "definitions.json#/alarm_code" },
|
|
8
|
+
"xACId" : { "description" : "External alarm code id", "type" : "string" },
|
|
9
|
+
"aSp" : {
|
|
10
|
+
"description" : "Alarm specialization",
|
|
11
|
+
"type" : "string",
|
|
12
|
+
"enum" : [ "Issue", "Acknowledge", "Suspend", "Resume", "Request" ]
|
|
13
|
+
}
|
|
14
|
+
},
|
|
15
|
+
"required" : [ "aSp"],
|
|
16
|
+
"allOf" : [
|
|
17
|
+
{
|
|
18
|
+
"if": {
|
|
19
|
+
"required" : [ "aSp" ],
|
|
20
|
+
"properties" : {
|
|
21
|
+
"aSp" : { "enum" : [ "Issue"] }
|
|
22
|
+
}
|
|
23
|
+
},
|
|
24
|
+
"then": { "$ref": "alarm_issue.json" }
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
"if": {
|
|
28
|
+
"allOf" : [
|
|
29
|
+
{
|
|
30
|
+
"required" : [ "aSp" ],
|
|
31
|
+
"properties" : {
|
|
32
|
+
"aSp" : { "enum" : [ "Suspend", "Resume"] }
|
|
33
|
+
}
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
"not": { "required" : [ "sS" ] }
|
|
37
|
+
}
|
|
38
|
+
]
|
|
39
|
+
},
|
|
40
|
+
"then": { "$ref": "alarm_suspend_resume.json" }
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
"if": {
|
|
44
|
+
"required" : [ "aSp", "sS" ],
|
|
45
|
+
"properties" : {
|
|
46
|
+
"aSp" : { "enum" : [ "Suspend", "Resume"] },
|
|
47
|
+
"sS" : { "enum" : [ "Suspended", "notSuspended"] }
|
|
48
|
+
}
|
|
49
|
+
},
|
|
50
|
+
"then": { "$ref": "alarm_suspended_resumed.json" }
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
"if": {
|
|
54
|
+
"required" : [ "aSp" ],
|
|
55
|
+
"properties" : {
|
|
56
|
+
"aSp" : { "enum" : [ "Request"] }
|
|
57
|
+
}
|
|
58
|
+
},
|
|
59
|
+
"then": { "$ref": "alarm_request.json" }
|
|
60
|
+
},
|
|
61
|
+
{
|
|
62
|
+
"if": {
|
|
63
|
+
"required" : [ "aSp" ],
|
|
64
|
+
"properties" : {
|
|
65
|
+
"aSp" : { "enum" : [ "Acknowledge"] }
|
|
66
|
+
}
|
|
67
|
+
},
|
|
68
|
+
"then": { "$ref": "alarm_acknowledge.json" }
|
|
69
|
+
}
|
|
70
|
+
]
|
|
71
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
{
|
|
2
|
+
"properties" : {
|
|
3
|
+
"ack" : {
|
|
4
|
+
"description" : "Acknowledgement",
|
|
5
|
+
"type" : "string",
|
|
6
|
+
"enum" : [ "Acknowledged", "notAcknowledged" ]
|
|
7
|
+
},
|
|
8
|
+
"aTs" : { "$ref": "definitions.json#/timestamp" }
|
|
9
|
+
},
|
|
10
|
+
"required" : [ "mId", "cId", "aCId", "xACId", "aSp", "aTs" ]
|
|
11
|
+
}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
{
|
|
2
|
+
"properties" : {
|
|
3
|
+
"ack" : {
|
|
4
|
+
"description" : "Acknowledgement",
|
|
5
|
+
"type" : "string",
|
|
6
|
+
"enum" : [ "Acknowledged", "notAcknowledged" ]
|
|
7
|
+
},
|
|
8
|
+
"aS" : {
|
|
9
|
+
"description" : "Active status",
|
|
10
|
+
"type" : "string",
|
|
11
|
+
"enum" : [ "inActive", "Active" ]
|
|
12
|
+
},
|
|
13
|
+
"sS" : {
|
|
14
|
+
"description" : "Suspend status",
|
|
15
|
+
"type" : "string",
|
|
16
|
+
"enum" : [ "suspended", "notSuspended" ]
|
|
17
|
+
},
|
|
18
|
+
"aTs" : { "$ref": "definitions.json#/timestamp" },
|
|
19
|
+
"cat" : {
|
|
20
|
+
"description" : "Category",
|
|
21
|
+
"type" : "string",
|
|
22
|
+
"enum" : [ "T", "D" ]
|
|
23
|
+
},
|
|
24
|
+
"pri" : {
|
|
25
|
+
"description" : "Priority",
|
|
26
|
+
"type" : "string",
|
|
27
|
+
"enum" : [ "1", "2", "3" ]
|
|
28
|
+
},
|
|
29
|
+
"rvs" : {
|
|
30
|
+
"description" : "Return values",
|
|
31
|
+
"type" : "array",
|
|
32
|
+
"items" : {
|
|
33
|
+
"type" : "object",
|
|
34
|
+
"properties": {
|
|
35
|
+
"n" : { "description" : "Unique reference of the value", "type" : "string" },
|
|
36
|
+
"v" : { "description" : "Value", "type" : "string" }
|
|
37
|
+
},
|
|
38
|
+
"required" : [ "n", "v" ],
|
|
39
|
+
"additionalProperties": false
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
},
|
|
43
|
+
"required" : [ "mId", "cId", "aCId", "xACId", "aSp", "ack", "aS", "aTs", "sS", "cat", "pri", "rvs" ]
|
|
44
|
+
}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
{
|
|
2
|
+
"properties" : {
|
|
3
|
+
"ack" : {
|
|
4
|
+
"description" : "Acknowledgement",
|
|
5
|
+
"type" : "string",
|
|
6
|
+
"enum" : [ "Acknowledged", "notAcknowledged" ]
|
|
7
|
+
},
|
|
8
|
+
"aS" : {
|
|
9
|
+
"description" : "Active status",
|
|
10
|
+
"type" : "string",
|
|
11
|
+
"enum" : [ "inActive", "Active" ]
|
|
12
|
+
},
|
|
13
|
+
"sS" : {
|
|
14
|
+
"description" : "Suspend status",
|
|
15
|
+
"type" : "string",
|
|
16
|
+
"enum" : [ "Suspended", "notSuspended" ]
|
|
17
|
+
},
|
|
18
|
+
"aTs" : { "$ref": "definitions.json#/timestamp" },
|
|
19
|
+
"cat" : {
|
|
20
|
+
"description" : "Category",
|
|
21
|
+
"type" : "string",
|
|
22
|
+
"enum" : [ "T", "D" ]
|
|
23
|
+
},
|
|
24
|
+
"pri" : {
|
|
25
|
+
"description" : "Priority",
|
|
26
|
+
"type" : "string",
|
|
27
|
+
"enum" : [ "1", "2", "3" ]
|
|
28
|
+
},
|
|
29
|
+
"rvs" : {
|
|
30
|
+
"description" : "Return values",
|
|
31
|
+
"type" : "array",
|
|
32
|
+
"items" : {
|
|
33
|
+
"type" : "object",
|
|
34
|
+
"properties": {
|
|
35
|
+
"n" : { "description" : "Unique reference of the value", "type" : "string" },
|
|
36
|
+
"v" : { "description" : "Value", "type" : "string" }
|
|
37
|
+
},
|
|
38
|
+
"required" : [ "n", "v" ],
|
|
39
|
+
"additionalProperties": false
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
},
|
|
43
|
+
"required" : [ "mId", "cId", "aCId", "xACId", "aSp", "ack", "aS", "aTs", "sS", "cat", "pri", "rvs" ]
|
|
44
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
{
|
|
2
|
+
"title" : "CommandRequest",
|
|
3
|
+
"description" : "Command request",
|
|
4
|
+
"properties" : {
|
|
5
|
+
"mId" : { "$ref": "definitions.json#/message_id" },
|
|
6
|
+
"cId" : { "$ref": "definitions.json#/component_id" },
|
|
7
|
+
"arg" : {
|
|
8
|
+
"description" : "Command arguments",
|
|
9
|
+
"type" : "array",
|
|
10
|
+
"minItems": 1,
|
|
11
|
+
"items" : {
|
|
12
|
+
"type" : "object",
|
|
13
|
+
"properties": {
|
|
14
|
+
"cCI" : { "$ref": "definitions.json#/command_code" },
|
|
15
|
+
"n" : { "description" : "Unique reference of the value", "type" : "string" },
|
|
16
|
+
"cO" : { "description" : "Command", "type" : "string" },
|
|
17
|
+
"v" : { "description" : "Value" }
|
|
18
|
+
},
|
|
19
|
+
"required" : [ "cCI", "n", "cO", "v" ]
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
},
|
|
23
|
+
"required" : [ "mId", "cId", "arg"]
|
|
24
|
+
}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
{
|
|
2
|
+
"title" : "CommandRequest",
|
|
3
|
+
"description" : "Command request",
|
|
4
|
+
"properties" : {
|
|
5
|
+
"mId" : { "$ref": "definitions.json#/message_id" },
|
|
6
|
+
"cId" : { "$ref": "definitions.json#/component_id" },
|
|
7
|
+
"cTS" : { "$ref": "definitions.json#/timestamp" },
|
|
8
|
+
"rvs" : {
|
|
9
|
+
"description" : "Command arguments",
|
|
10
|
+
"type" : "array",
|
|
11
|
+
"minItems" : 1,
|
|
12
|
+
"items" : {
|
|
13
|
+
"type" : "object",
|
|
14
|
+
"properties": {
|
|
15
|
+
"cCI" : { "$ref": "definitions.json#/command_code" },
|
|
16
|
+
"n" : {
|
|
17
|
+
"description" : "Unique reference of the value",
|
|
18
|
+
"type" : "string"
|
|
19
|
+
},
|
|
20
|
+
"v" : {
|
|
21
|
+
"description" : "Value"
|
|
22
|
+
},
|
|
23
|
+
"age" : {
|
|
24
|
+
"description" : "Age of the value",
|
|
25
|
+
"type" : "string",
|
|
26
|
+
"enum" : [ "recent", "old", "undefined", "unknown" ]
|
|
27
|
+
}
|
|
28
|
+
},
|
|
29
|
+
"required" : [ "cCI", "n", "v", "age" ],
|
|
30
|
+
"additionalProperties": false
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
},
|
|
34
|
+
"required" : [ "mId", "cId", "cTS", "rvs" ]
|
|
35
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
{
|
|
2
|
+
"title" : "ComponentList",
|
|
3
|
+
"description" : "Component list message",
|
|
4
|
+
"properties" : {
|
|
5
|
+
"mId" : { "$ref": "definitions.json#/message_id" },
|
|
6
|
+
"components" : {
|
|
7
|
+
"description" : "Components on the site",
|
|
8
|
+
"type" : "array",
|
|
9
|
+
"minItems" : 1,
|
|
10
|
+
"items" : {
|
|
11
|
+
"type" : "object",
|
|
12
|
+
"properties" : {
|
|
13
|
+
"id" : { "$ref": "definitions.json#/component_id" },
|
|
14
|
+
"type" : { "$ref": "definitions.json#/component_type" },
|
|
15
|
+
"name" : { "$ref": "definitions.json#/component_name" }
|
|
16
|
+
},
|
|
17
|
+
"required" : [ "id", "type", "name" ],
|
|
18
|
+
"additionalProperties" : false
|
|
19
|
+
},
|
|
20
|
+
"uniqueItems" : true
|
|
21
|
+
}
|
|
22
|
+
},
|
|
23
|
+
"required" : [ "mId", "components" ]
|
|
24
|
+
}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema" : "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"name" : "core",
|
|
4
|
+
"description" : "Core",
|
|
5
|
+
"version" : "3.3.0",
|
|
6
|
+
"type" : "object",
|
|
7
|
+
"allOf" : [
|
|
8
|
+
{
|
|
9
|
+
"properties" : {
|
|
10
|
+
"mType" : {
|
|
11
|
+
"description" : "Supported RSMP versions",
|
|
12
|
+
"type" : "string",
|
|
13
|
+
"const" : "rSMsg"
|
|
14
|
+
},
|
|
15
|
+
"type" : {
|
|
16
|
+
"description" : "Type of RMSP message",
|
|
17
|
+
"type" : "string",
|
|
18
|
+
"enum" : [
|
|
19
|
+
"MessageAck",
|
|
20
|
+
"MessageNotAck",
|
|
21
|
+
"Version",
|
|
22
|
+
"ComponentList",
|
|
23
|
+
"AggregatedStatus",
|
|
24
|
+
"AggregatedStatusRequest",
|
|
25
|
+
"Watchdog",
|
|
26
|
+
"Alarm",
|
|
27
|
+
"CommandRequest",
|
|
28
|
+
"CommandResponse",
|
|
29
|
+
"StatusRequest",
|
|
30
|
+
"StatusResponse",
|
|
31
|
+
"StatusSubscribe",
|
|
32
|
+
"StatusUnsubscribe",
|
|
33
|
+
"StatusUpdate"
|
|
34
|
+
]
|
|
35
|
+
}
|
|
36
|
+
},
|
|
37
|
+
"required" : [ "mType", "type" ]
|
|
38
|
+
}
|
|
39
|
+
]
|
|
40
|
+
}
|
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
{
|
|
2
|
+
"rsmp_string": {
|
|
3
|
+
"type" : "string",
|
|
4
|
+
"not" : {
|
|
5
|
+
"$comment" : "A unicode string, excluding ASCII control characters and Unicode line/paragraph separators",
|
|
6
|
+
"type" : "string",
|
|
7
|
+
"pattern" : "[\\u0000-\\u001F\\u007F\\u2028\\u2029]"
|
|
8
|
+
}
|
|
9
|
+
},
|
|
10
|
+
"message_id": {
|
|
11
|
+
"description" : "Message Id",
|
|
12
|
+
"$comment" : "Example: 1.2.3 or 1.2",
|
|
13
|
+
"allOf" : [
|
|
14
|
+
{ "$ref" : "#/rsmp_string" },
|
|
15
|
+
{ "pattern": "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-4[a-fA-F0-9]{3}-[89abAB][a-fA-F0-9]{3}-[a-fA-F0-9]{12}$" }
|
|
16
|
+
]
|
|
17
|
+
},
|
|
18
|
+
"timestamp" : {
|
|
19
|
+
"description" : "Timestamp",
|
|
20
|
+
"$comment" : "Example: 2015-06-08T11:49:03.293Z",
|
|
21
|
+
"allOf" : [
|
|
22
|
+
{ "$ref" : "#/rsmp_string" },
|
|
23
|
+
{ "pattern": "^[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}\\.[0-9]{3}Z$" }
|
|
24
|
+
]
|
|
25
|
+
},
|
|
26
|
+
"integer" : {
|
|
27
|
+
"description" : "Integer as string",
|
|
28
|
+
"$comment" : "Example: 123 or -123",
|
|
29
|
+
"allOf" : [
|
|
30
|
+
{ "$ref" : "#/rsmp_string" },
|
|
31
|
+
{ "pattern": "^\\-?[0-9]+$" }
|
|
32
|
+
]
|
|
33
|
+
},
|
|
34
|
+
"version": {
|
|
35
|
+
"description" : "Version",
|
|
36
|
+
"$comment" : "Example: 1.2.3 or 1.2",
|
|
37
|
+
"allOf" : [
|
|
38
|
+
{ "$ref" : "#/rsmp_string" },
|
|
39
|
+
{ "pattern" : "^[0-9]{1,2}\\.[0-9]{1,2}(\\.[0-9]{1,2})?" }
|
|
40
|
+
]
|
|
41
|
+
},
|
|
42
|
+
"command_code": {
|
|
43
|
+
"description" : "Command code id",
|
|
44
|
+
"allOf" : [
|
|
45
|
+
{ "$ref" : "#/rsmp_string" },
|
|
46
|
+
{ "pattern" : "^M" }
|
|
47
|
+
]
|
|
48
|
+
},
|
|
49
|
+
"status_code": {
|
|
50
|
+
"description" : "Status code id",
|
|
51
|
+
"allOf" : [
|
|
52
|
+
{ "$ref" : "#/rsmp_string" },
|
|
53
|
+
{ "pattern" : "^S" }
|
|
54
|
+
]
|
|
55
|
+
},
|
|
56
|
+
"alarm_code": {
|
|
57
|
+
"description" : "Alarm code id",
|
|
58
|
+
"allOf" : [
|
|
59
|
+
{ "$ref" : "#/rsmp_string" },
|
|
60
|
+
{ "pattern" : "^A" }
|
|
61
|
+
]
|
|
62
|
+
},
|
|
63
|
+
"component_id": {
|
|
64
|
+
"description" : "Compoment id",
|
|
65
|
+
"allOf" : [
|
|
66
|
+
{ "$ref" : "#/rsmp_string" }
|
|
67
|
+
]
|
|
68
|
+
},
|
|
69
|
+
"component_type": {
|
|
70
|
+
"description" : "Component type",
|
|
71
|
+
"allOf" : [
|
|
72
|
+
{ "$ref" : "#/rsmp_string" },
|
|
73
|
+
{ "pattern" : "^[A-Za-z0-9_-]+(?:/[A-Za-z0-9_-]+)*$" }
|
|
74
|
+
]
|
|
75
|
+
},
|
|
76
|
+
"component_name": {
|
|
77
|
+
"description" : "Component name",
|
|
78
|
+
"minLength" : 1,
|
|
79
|
+
"allOf" : [
|
|
80
|
+
{ "$ref" : "#/rsmp_string" }
|
|
81
|
+
]
|
|
82
|
+
},
|
|
83
|
+
"sxl_name": {
|
|
84
|
+
"description" : "SXL name",
|
|
85
|
+
"allOf" : [
|
|
86
|
+
{ "$ref" : "#/rsmp_string" },
|
|
87
|
+
{ "pattern" : "^[A-Za-z0-9_-]+(?:/[A-Za-z0-9_-]+)*$" }
|
|
88
|
+
]
|
|
89
|
+
},
|
|
90
|
+
"sxl_prefix": {
|
|
91
|
+
"description" : "SXL prefix",
|
|
92
|
+
"allOf" : [
|
|
93
|
+
{ "$ref" : "#/rsmp_string" },
|
|
94
|
+
{ "pattern" : "^[A-Za-z0-9_-]+/$" }
|
|
95
|
+
]
|
|
96
|
+
},
|
|
97
|
+
"boolean": {
|
|
98
|
+
"description" : "Boolean as string",
|
|
99
|
+
"allOf" : [
|
|
100
|
+
{ "$ref" : "#/rsmp_string" },
|
|
101
|
+
{ "enum" : [ "True", "False" ] }
|
|
102
|
+
]
|
|
103
|
+
},
|
|
104
|
+
"integer_list": {
|
|
105
|
+
"description" : "Comma-separated list of integers as strings",
|
|
106
|
+
"allOf" : [
|
|
107
|
+
{ "$ref" : "#/rsmp_string" },
|
|
108
|
+
{ "pattern" : "^(\\-?\\d+)(?:,(\\-?\\d+))*$" }
|
|
109
|
+
]
|
|
110
|
+
},
|
|
111
|
+
"number_list": {
|
|
112
|
+
"description" : "Comma-separated list of numbers as strings",
|
|
113
|
+
"allOf" : [
|
|
114
|
+
{ "$ref" : "#/rsmp_string" },
|
|
115
|
+
{ "pattern" : "^(\\-?\\d+(\\.\\d+)?)(?:,(\\-?\\d+(\\.\\d+)?))*$" }
|
|
116
|
+
]
|
|
117
|
+
},
|
|
118
|
+
"boolean_list": {
|
|
119
|
+
"description" : "Comma-separated list of booleans as strings",
|
|
120
|
+
"allOf" : [
|
|
121
|
+
{ "$ref" : "#/rsmp_string" },
|
|
122
|
+
{ "pattern" : "^(True|False)(?:,(True|False))*$" }
|
|
123
|
+
]
|
|
124
|
+
},
|
|
125
|
+
"string_list": {
|
|
126
|
+
"description" : "Comma-separated list of strings",
|
|
127
|
+
"allOf" : [
|
|
128
|
+
{ "$ref" : "#/rsmp_string" }
|
|
129
|
+
]
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
{
|
|
2
|
+
"title" : "MessageNotAck",
|
|
3
|
+
"description" : "Message not acknowledgeded",
|
|
4
|
+
"properties" : {
|
|
5
|
+
"oMId" : {
|
|
6
|
+
"$ref": "definitions.json#/message_id",
|
|
7
|
+
"description" : "Old message id"
|
|
8
|
+
},
|
|
9
|
+
"rea" : {
|
|
10
|
+
"description" : "Reason / Error message",
|
|
11
|
+
"type" : "string"
|
|
12
|
+
}
|
|
13
|
+
},
|
|
14
|
+
"required" : [ "oMId" ]
|
|
15
|
+
}
|