rsmp_schema 0.9.0 → 0.9.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/copilot-instructions.md +20 -19
- data/.github/workflows/copilot-setup-steps.yml +34 -0
- data/.github/workflows/rspec.yaml +1 -1
- data/.gitignore +0 -1
- data/Gemfile.lock +7 -7
- data/lib/rsmp_schema/version.rb +1 -1
- data/rsmp_schema.gemspec +3 -3
- metadata +8 -20
- data/schemas/core/3.3.0/aggregated_status.json +0 -90
- data/schemas/core/3.3.0/aggregated_status_request.json +0 -9
- data/schemas/core/3.3.0/alarm.json +0 -75
- data/schemas/core/3.3.0/alarm_request.json +0 -3
- data/schemas/core/3.3.0/command_request.json +0 -26
- data/schemas/core/3.3.0/command_response.json +0 -35
- data/schemas/core/3.3.0/core.json +0 -39
- data/schemas/core/3.3.0/definitions.json +0 -35
- data/schemas/core/3.3.0/rsmp.json +0 -133
- data/schemas/core/3.3.0/status.json +0 -21
- data/schemas/core/3.3.0/status_request.json +0 -23
- data/schemas/core/3.3.0/status_subscribe.json +0 -31
- data/schemas/core/3.3.0/version.json +0 -57
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8fc20cc1d05617986e855941274ff5b84d631f563802dbfd9640d00bf02bc4a6
|
4
|
+
data.tar.gz: a341f9ad7a2d57311b4328d673af2cbbadd2db102c97995a1701af2b3036abd5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4e22ab72a7fb96ce53dc2a950d3b1fa53144da6b7d25c684127640eec7a8f1d6e90bf24c79abc49113bbcdc1ca815b27d9c0aa3eedcfddd9fa26c410142dc21d
|
7
|
+
data.tar.gz: f5606e2da1e282ffef489d546587be20a26d28e3b7332478c638d66173809bb36d63f3287696341e2e8c9b05905e3cd62bbb42d66b820b8137f9c522818b66bd
|
@@ -5,28 +5,38 @@ RSMP Schema is a Ruby gem that provides JSON Schema validation for RSMP (Road Si
|
|
5
5
|
Always reference these instructions first, and fall back to search or bash commands only when you encounter unexpected information that does not match the info here.
|
6
6
|
|
7
7
|
## Environment Setup
|
8
|
+
Copilot Agent runs in a minimal Docker container, NOT the devcontainer specified in .devcontainer.
|
8
9
|
|
9
|
-
|
10
|
+
Ruby will be available, but bundler and gems must be installed.
|
11
|
+
The Ruby version migh not match what's specified in .tool-versions, but it should still be possible to work in the repo
|
10
12
|
|
11
|
-
|
12
|
-
|
13
|
-
|
13
|
+
## Installing bundler
|
14
|
+
The bundler gem itself is usually included in modern Ruby distributions, but it's NOT included in the copilot agent container, so always install with:
|
15
|
+
|
16
|
+
```sh
|
17
|
+
gem install bundler --install-dir ~/.local/share/gem
|
18
|
+
```
|
14
19
|
|
15
|
-
|
16
|
-
|
20
|
+
Add gem executables to the PATH so they can be found:
|
21
|
+
```sh
|
22
|
+
export PATH="$HOME/.local/share/gem/bin:$PATH"
|
23
|
+
```
|
17
24
|
|
18
|
-
|
19
|
-
|
25
|
+
## Installing Gems
|
26
|
+
Always use the bundler `path` config to install gems in the user’s local directory:
|
27
|
+
```sh
|
28
|
+
bundle config set --local path ~/.local/share/gem
|
20
29
|
bundle install
|
21
30
|
```
|
22
31
|
|
23
|
-
##
|
32
|
+
## Using Gem Executables
|
33
|
+
Always use 'bundle exec' to run executable from gems.
|
24
34
|
|
35
|
+
## Running Tests
|
25
36
|
The test suite includes comprehensive RSpec tests covering:
|
26
37
|
- Core RSMP message validation
|
27
38
|
- Traffic Light Controller SXL validation
|
28
39
|
|
29
|
-
|
30
40
|
Run the complete test suite:
|
31
41
|
```bash
|
32
42
|
# Test command takes approximately 2 seconds
|
@@ -36,7 +46,6 @@ bundle exec rspec
|
|
36
46
|
All tests should pass on a clean repository.
|
37
47
|
|
38
48
|
## CLI Tool Usage
|
39
|
-
|
40
49
|
The gem provides a CLI tool for converting YAML SXL files to JSON Schema:
|
41
50
|
|
42
51
|
```bash
|
@@ -51,7 +60,6 @@ bundle exec exe/rsmp_schema convert -i schemas/tlc/1.2.1/sxl.yaml -o tmp/sxl_1.2
|
|
51
60
|
```
|
52
61
|
|
53
62
|
## Schema Regeneration
|
54
|
-
|
55
63
|
Regenerate all TLC JSON schemas from their YAML sources:
|
56
64
|
|
57
65
|
```bash
|
@@ -77,7 +85,6 @@ bundle exec ruby examples/validate.rb
|
|
77
85
|
Expected output: `ok` (indicates successful validation)
|
78
86
|
|
79
87
|
## Repository Structure
|
80
|
-
|
81
88
|
Key directories and files:
|
82
89
|
- `lib/rsmp_schema/` - Main gem code
|
83
90
|
- `lib/rsmp_schema/cli.rb` - CLI tool implementation
|
@@ -107,7 +114,6 @@ Key directories and files:
|
|
107
114
|
- Helper: `spec/schemer_helper.rb`
|
108
115
|
|
109
116
|
## CI Pipeline Validation
|
110
|
-
|
111
117
|
The repository uses GitHub Actions with the following requirements:
|
112
118
|
- Runs on Ubuntu, macOS, and Windows
|
113
119
|
- Tests with different Ruby versions
|
@@ -120,7 +126,6 @@ Before committing changes, ensure:
|
|
120
126
|
- Ruby syntax is valid for modified files
|
121
127
|
|
122
128
|
## Validation Scenarios
|
123
|
-
|
124
129
|
After making changes, always test these scenarios:
|
125
130
|
|
126
131
|
1. **Schema regeneration**: Run `bundle exec rake regenerate` and verify no unexpected changes.
|
@@ -156,15 +161,12 @@ git status
|
|
156
161
|
```
|
157
162
|
|
158
163
|
|
159
|
-
|
160
164
|
## Dependencies and Versions
|
161
|
-
|
162
165
|
See `rsmp_schema.gemspec` for current runtime and development dependencies.
|
163
166
|
|
164
167
|
Requires the Ruby version specified in .tool-versions.
|
165
168
|
|
166
169
|
## Common Issues and Solutions
|
167
|
-
|
168
170
|
**Ruby version or environment issues**:
|
169
171
|
- Use mise for automatic Ruby management: `mise install`
|
170
172
|
|
@@ -184,7 +186,6 @@ Requires the Ruby version specified in .tool-versions.
|
|
184
186
|
- Check Ruby version compatibility (see .tool-versions)
|
185
187
|
|
186
188
|
## Timing Expectations
|
187
|
-
|
188
189
|
- **NEVER CANCEL**: Bundle install takes 10-15 seconds normally - wait for completion
|
189
190
|
- **NEVER CANCEL**: Test suite takes 2 seconds - use 30+ second timeout
|
190
191
|
- **NEVER CANCEL**: Schema regeneration takes 0.75 seconds - very fast but allow buffer
|
@@ -0,0 +1,34 @@
|
|
1
|
+
name: "Copilot Setup Steps"
|
2
|
+
|
3
|
+
# Automatically run the setup steps when they are changed to allow for easy validation, and
|
4
|
+
# allow manual testing through the repository's "Actions" tab
|
5
|
+
on:
|
6
|
+
workflow_dispatch:
|
7
|
+
push:
|
8
|
+
paths:
|
9
|
+
- .github/workflows/copilot-setup-steps.yml
|
10
|
+
pull_request:
|
11
|
+
paths:
|
12
|
+
- .github/workflows/copilot-setup-steps.yml
|
13
|
+
|
14
|
+
jobs:
|
15
|
+
# The job MUST be called `copilot-setup-steps` or it will not be picked up by Copilot.
|
16
|
+
copilot-setup-steps:
|
17
|
+
runs-on: ubuntu-latest
|
18
|
+
|
19
|
+
# Set the permissions to the lowest permissions possible needed for your steps.
|
20
|
+
# Copilot will be given its own token for its operations.
|
21
|
+
permissions:
|
22
|
+
# If you want to clone the repository as part of your setup steps, for example to install dependencies, you'll need the `contents: read` permission. If you don't clone the repository in your setup steps, Copilot will do this for you automatically after the steps complete.
|
23
|
+
contents: read
|
24
|
+
|
25
|
+
# You can define any steps you want, and they will run before the agent starts.
|
26
|
+
# If you do not check out your code, Copilot will do this for you.
|
27
|
+
steps:
|
28
|
+
- name: Checkout code
|
29
|
+
uses: actions/checkout@v4
|
30
|
+
|
31
|
+
- uses: ruby/setup-ruby@v1
|
32
|
+
with:
|
33
|
+
ruby-version: 3.4
|
34
|
+
bundler-cache: true
|
data/.gitignore
CHANGED
data/Gemfile.lock
CHANGED
@@ -1,9 +1,9 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
rsmp_schema (0.9.
|
5
|
-
json_schemer (~> 2.
|
6
|
-
thor (~> 1.
|
4
|
+
rsmp_schema (0.9.1)
|
5
|
+
json_schemer (~> 2.4.0)
|
6
|
+
thor (~> 1.4.0)
|
7
7
|
|
8
8
|
GEM
|
9
9
|
remote: https://rubygems.org/
|
@@ -11,12 +11,12 @@ GEM
|
|
11
11
|
bigdecimal (3.2.3)
|
12
12
|
diff-lcs (1.6.2)
|
13
13
|
hana (1.3.7)
|
14
|
-
json_schemer (2.
|
14
|
+
json_schemer (2.4.0)
|
15
15
|
bigdecimal
|
16
16
|
hana (~> 1.3)
|
17
17
|
regexp_parser (~> 2.0)
|
18
18
|
simpleidn (~> 0.2)
|
19
|
-
rake (13.
|
19
|
+
rake (13.3.0)
|
20
20
|
regexp_parser (2.11.3)
|
21
21
|
rspec (3.13.1)
|
22
22
|
rspec-core (~> 3.13.0)
|
@@ -32,13 +32,13 @@ GEM
|
|
32
32
|
rspec-support (~> 3.13.0)
|
33
33
|
rspec-support (3.13.6)
|
34
34
|
simpleidn (0.2.3)
|
35
|
-
thor (1.
|
35
|
+
thor (1.4.0)
|
36
36
|
|
37
37
|
PLATFORMS
|
38
38
|
ruby
|
39
39
|
|
40
40
|
DEPENDENCIES
|
41
|
-
rake (~> 13.
|
41
|
+
rake (~> 13.3.0)
|
42
42
|
rsmp_schema!
|
43
43
|
rspec (~> 3.13.0)
|
44
44
|
rspec-expectations (~> 3.13.0)
|
data/lib/rsmp_schema/version.rb
CHANGED
data/rsmp_schema.gemspec
CHANGED
@@ -30,10 +30,10 @@ Gem::Specification.new do |spec|
|
|
30
30
|
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
31
31
|
spec.require_paths = ["lib"]
|
32
32
|
|
33
|
-
spec.add_dependency "json_schemer", "~> 2.
|
34
|
-
spec.add_dependency "thor", "~> 1.
|
33
|
+
spec.add_dependency "json_schemer", "~> 2.4.0"
|
34
|
+
spec.add_dependency "thor", "~> 1.4.0"
|
35
35
|
|
36
|
-
spec.add_development_dependency "rake", "~> 13.
|
36
|
+
spec.add_development_dependency "rake", "~> 13.3.0"
|
37
37
|
spec.add_development_dependency "rspec", "~> 3.13.0"
|
38
38
|
spec.add_development_dependency "rspec-expectations", "~> 3.13.0"
|
39
39
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rsmp_schema
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.9.
|
4
|
+
version: 0.9.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Emil Tin
|
@@ -15,42 +15,42 @@ dependencies:
|
|
15
15
|
requirements:
|
16
16
|
- - "~>"
|
17
17
|
- !ruby/object:Gem::Version
|
18
|
-
version: 2.
|
18
|
+
version: 2.4.0
|
19
19
|
type: :runtime
|
20
20
|
prerelease: false
|
21
21
|
version_requirements: !ruby/object:Gem::Requirement
|
22
22
|
requirements:
|
23
23
|
- - "~>"
|
24
24
|
- !ruby/object:Gem::Version
|
25
|
-
version: 2.
|
25
|
+
version: 2.4.0
|
26
26
|
- !ruby/object:Gem::Dependency
|
27
27
|
name: thor
|
28
28
|
requirement: !ruby/object:Gem::Requirement
|
29
29
|
requirements:
|
30
30
|
- - "~>"
|
31
31
|
- !ruby/object:Gem::Version
|
32
|
-
version: 1.
|
32
|
+
version: 1.4.0
|
33
33
|
type: :runtime
|
34
34
|
prerelease: false
|
35
35
|
version_requirements: !ruby/object:Gem::Requirement
|
36
36
|
requirements:
|
37
37
|
- - "~>"
|
38
38
|
- !ruby/object:Gem::Version
|
39
|
-
version: 1.
|
39
|
+
version: 1.4.0
|
40
40
|
- !ruby/object:Gem::Dependency
|
41
41
|
name: rake
|
42
42
|
requirement: !ruby/object:Gem::Requirement
|
43
43
|
requirements:
|
44
44
|
- - "~>"
|
45
45
|
- !ruby/object:Gem::Version
|
46
|
-
version: 13.
|
46
|
+
version: 13.3.0
|
47
47
|
type: :development
|
48
48
|
prerelease: false
|
49
49
|
version_requirements: !ruby/object:Gem::Requirement
|
50
50
|
requirements:
|
51
51
|
- - "~>"
|
52
52
|
- !ruby/object:Gem::Version
|
53
|
-
version: 13.
|
53
|
+
version: 13.3.0
|
54
54
|
- !ruby/object:Gem::Dependency
|
55
55
|
name: rspec
|
56
56
|
requirement: !ruby/object:Gem::Requirement
|
@@ -90,6 +90,7 @@ extra_rdoc_files: []
|
|
90
90
|
files:
|
91
91
|
- ".devcontainer/devcontainer.json"
|
92
92
|
- ".github/copilot-instructions.md"
|
93
|
+
- ".github/workflows/copilot-setup-steps.yml"
|
93
94
|
- ".github/workflows/rspec.yaml"
|
94
95
|
- ".gitignore"
|
95
96
|
- ".rspec"
|
@@ -155,19 +156,6 @@ files:
|
|
155
156
|
- schemas/core/3.2.1/rsmp.json
|
156
157
|
- schemas/core/3.2.2/core.json
|
157
158
|
- schemas/core/3.2.2/rsmp.json
|
158
|
-
- schemas/core/3.3.0/aggregated_status.json
|
159
|
-
- schemas/core/3.3.0/aggregated_status_request.json
|
160
|
-
- schemas/core/3.3.0/alarm.json
|
161
|
-
- schemas/core/3.3.0/alarm_request.json
|
162
|
-
- schemas/core/3.3.0/command_request.json
|
163
|
-
- schemas/core/3.3.0/command_response.json
|
164
|
-
- schemas/core/3.3.0/core.json
|
165
|
-
- schemas/core/3.3.0/definitions.json
|
166
|
-
- schemas/core/3.3.0/rsmp.json
|
167
|
-
- schemas/core/3.3.0/status.json
|
168
|
-
- schemas/core/3.3.0/status_request.json
|
169
|
-
- schemas/core/3.3.0/status_subscribe.json
|
170
|
-
- schemas/core/3.3.0/version.json
|
171
159
|
- schemas/tlc/1.0.10/alarms/A0001.json
|
172
160
|
- schemas/tlc/1.0.10/alarms/A0002.json
|
173
161
|
- schemas/tlc/1.0.10/alarms/A0003.json
|
@@ -1,90 +0,0 @@
|
|
1
|
-
{
|
2
|
-
"title" : "Aggregated Status",
|
3
|
-
"description" : "Aggregated status message (bits 2 and 8 are unused and must be false in 3.3.0)",
|
4
|
-
"properties" : {
|
5
|
-
"mId" : { "$ref": "../3.1.2/definitions.json#/message_id" },
|
6
|
-
"aSTS" : { "$ref": "../3.1.2/definitions.json#/timestamp" },
|
7
|
-
"fP" : {
|
8
|
-
"description" : "Functional position",
|
9
|
-
"type" : ["string","null"]
|
10
|
-
},
|
11
|
-
"fS" : {
|
12
|
-
"description" : "Functional state",
|
13
|
-
"type" : ["string","null"]
|
14
|
-
},
|
15
|
-
"se" : {
|
16
|
-
"description" : "Aggregated status bits (2 and 8 unused -> always false)",
|
17
|
-
"type" : "array",
|
18
|
-
"minItems": 8,
|
19
|
-
"maxItems": 8,
|
20
|
-
"items": { "type": "boolean" },
|
21
|
-
"enum": [
|
22
|
-
[false,false,false,false,false,false,false,false],
|
23
|
-
[false,false,false,false,false,false,true,false],
|
24
|
-
[false,false,false,false,false,true,false,false],
|
25
|
-
[false,false,false,false,false,true,true,false],
|
26
|
-
[false,false,false,false,true,false,false,false],
|
27
|
-
[false,false,false,false,true,false,true,false],
|
28
|
-
[false,false,false,false,true,true,false,false],
|
29
|
-
[false,false,false,false,true,true,true,false],
|
30
|
-
[false,false,false,true,false,false,false,false],
|
31
|
-
[false,false,false,true,false,false,true,false],
|
32
|
-
[false,false,false,true,false,true,false,false],
|
33
|
-
[false,false,false,true,false,true,true,false],
|
34
|
-
[false,false,false,true,true,false,false,false],
|
35
|
-
[false,false,false,true,true,false,true,false],
|
36
|
-
[false,false,false,true,true,true,false,false],
|
37
|
-
[false,false,false,true,true,true,true,false],
|
38
|
-
[false,false,true,false,false,false,false,false],
|
39
|
-
[false,false,true,false,false,false,true,false],
|
40
|
-
[false,false,true,false,false,true,false,false],
|
41
|
-
[false,false,true,false,false,true,true,false],
|
42
|
-
[false,false,true,false,true,false,false,false],
|
43
|
-
[false,false,true,false,true,false,true,false],
|
44
|
-
[false,false,true,false,true,true,false,false],
|
45
|
-
[false,false,true,false,true,true,true,false],
|
46
|
-
[false,false,true,true,false,false,false,false],
|
47
|
-
[false,false,true,true,false,false,true,false],
|
48
|
-
[false,false,true,true,false,true,false,false],
|
49
|
-
[false,false,true,true,false,true,true,false],
|
50
|
-
[false,false,true,true,true,false,false,false],
|
51
|
-
[false,false,true,true,true,false,true,false],
|
52
|
-
[false,false,true,true,true,true,false,false],
|
53
|
-
[false,false,true,true,true,true,true,false],
|
54
|
-
[true,false,false,false,false,false,false,false],
|
55
|
-
[true,false,false,false,false,false,true,false],
|
56
|
-
[true,false,false,false,false,true,false,false],
|
57
|
-
[true,false,false,false,false,true,true,false],
|
58
|
-
[true,false,false,false,true,false,false,false],
|
59
|
-
[true,false,false,false,true,false,true,false],
|
60
|
-
[true,false,false,false,true,true,false,false],
|
61
|
-
[true,false,false,false,true,true,true,false],
|
62
|
-
[true,false,false,true,false,false,false,false],
|
63
|
-
[true,false,false,true,false,false,true,false],
|
64
|
-
[true,false,false,true,false,true,false,false],
|
65
|
-
[true,false,false,true,false,true,true,false],
|
66
|
-
[true,false,false,true,true,false,false,false],
|
67
|
-
[true,false,false,true,true,false,true,false],
|
68
|
-
[true,false,false,true,true,true,false,false],
|
69
|
-
[true,false,false,true,true,true,true,false],
|
70
|
-
[true,false,true,false,false,false,false,false],
|
71
|
-
[true,false,true,false,false,false,true,false],
|
72
|
-
[true,false,true,false,false,true,false,false],
|
73
|
-
[true,false,true,false,false,true,true,false],
|
74
|
-
[true,false,true,false,true,false,false,false],
|
75
|
-
[true,false,true,false,true,false,true,false],
|
76
|
-
[true,false,true,false,true,true,false,false],
|
77
|
-
[true,false,true,false,true,true,true,false],
|
78
|
-
[true,false,true,true,false,false,false,false],
|
79
|
-
[true,false,true,true,false,false,true,false],
|
80
|
-
[true,false,true,true,false,true,false,false],
|
81
|
-
[true,false,true,true,false,true,true,false],
|
82
|
-
[true,false,true,true,true,false,false,false],
|
83
|
-
[true,false,true,true,true,false,true,false],
|
84
|
-
[true,false,true,true,true,true,false,false],
|
85
|
-
[true,false,true,true,true,true,true,false]
|
86
|
-
]
|
87
|
-
}
|
88
|
-
},
|
89
|
-
"required" : [ "mId", "aSTS", "fP", "fS", "se" ]
|
90
|
-
}
|
@@ -1,9 +0,0 @@
|
|
1
|
-
{
|
2
|
-
"title" : "Aggregated Status Request",
|
3
|
-
"description" : "Aggregated status request message",
|
4
|
-
"properties" : {
|
5
|
-
"mId" : { "$ref": "../3.1.2/definitions.json#/message_id" },
|
6
|
-
"cId" : { "$ref": "definitions.json#/component_id" }
|
7
|
-
},
|
8
|
-
"required" : [ "mId", "cId" ]
|
9
|
-
}
|
@@ -1,75 +0,0 @@
|
|
1
|
-
{
|
2
|
-
"title" : "Alarm",
|
3
|
-
"description" : "Alarm messsage",
|
4
|
-
"properties" : {
|
5
|
-
"mId" : { "$ref": "../3.1.2/definitions.json#/message_id" },
|
6
|
-
"cId" : { "$ref": "definitions.json#/component_id" },
|
7
|
-
"aCId" : { "$ref": "../3.1.2/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
|
-
"issue", "acknowledge", "request" ]
|
14
|
-
}
|
15
|
-
},
|
16
|
-
"required" : [ "aSp"],
|
17
|
-
"allOf" : [
|
18
|
-
{
|
19
|
-
"if": {
|
20
|
-
"required" : [ "aSp" ],
|
21
|
-
"properties" : {
|
22
|
-
"aSp" : { "enum" : [ "Issue",
|
23
|
-
"issue"] }
|
24
|
-
}
|
25
|
-
},
|
26
|
-
"then": { "$ref": "../3.1.2/alarm_issue.json" }
|
27
|
-
},
|
28
|
-
{
|
29
|
-
"if": {
|
30
|
-
"allOf" : [
|
31
|
-
{
|
32
|
-
"required" : [ "aSp" ],
|
33
|
-
"properties" : {
|
34
|
-
"aSp" : { "enum" : [ "Suspend", "Resume"] }
|
35
|
-
}
|
36
|
-
},
|
37
|
-
{
|
38
|
-
"not": { "required" : [ "sS" ] }
|
39
|
-
}
|
40
|
-
]
|
41
|
-
},
|
42
|
-
"then": { "$ref": "../3.1.2/alarm_suspend_resume.json" }
|
43
|
-
},
|
44
|
-
{
|
45
|
-
"if": {
|
46
|
-
"required" : [ "aSp", "sS" ],
|
47
|
-
"properties" : {
|
48
|
-
"aSp" : { "enum" : [ "Suspend", "Resume"] },
|
49
|
-
"sS" : { "enum" : [ "suspended", "notSuspended",
|
50
|
-
"Suspended", "NotSuspended" ] }
|
51
|
-
}
|
52
|
-
},
|
53
|
-
"then": { "$ref": "../3.1.2/alarm_suspended_resumed.json" }
|
54
|
-
},
|
55
|
-
{
|
56
|
-
"if": {
|
57
|
-
"required" : [ "aSp" ],
|
58
|
-
"properties" : {
|
59
|
-
"aSp" : { "enum" : [ "Acknowledge"] }
|
60
|
-
}
|
61
|
-
},
|
62
|
-
"then": { "$ref": "../3.1.2/alarm_acknowledge.json" }
|
63
|
-
},
|
64
|
-
{
|
65
|
-
"if": {
|
66
|
-
"required" : [ "aSp" ],
|
67
|
-
"properties" : {
|
68
|
-
"aSp" : { "enum" : [ "Request",
|
69
|
-
"request"] }
|
70
|
-
}
|
71
|
-
},
|
72
|
-
"then": { "$ref": "alarm_request.json" }
|
73
|
-
}
|
74
|
-
]
|
75
|
-
}
|
@@ -1,26 +0,0 @@
|
|
1
|
-
{
|
2
|
-
"title" : "CommandRequest",
|
3
|
-
"description" : "Command request",
|
4
|
-
"properties" : {
|
5
|
-
"mId" : { "$ref": "../3.1.2/definitions.json#/message_id" },
|
6
|
-
"cId" : { "$ref": "definitions.json#/component_id" },
|
7
|
-
"arg" : {
|
8
|
-
"description" : "Command arguments",
|
9
|
-
"type" : "array",
|
10
|
-
"minItems": 1,
|
11
|
-
"maxItems": 1,
|
12
|
-
"items" : {
|
13
|
-
"type" : "object",
|
14
|
-
"properties": {
|
15
|
-
"cCI" : { "$ref": "../3.1.2/definitions.json#/command_code" },
|
16
|
-
"n" : { "description" : "Unique reference of the value", "type" : "string" },
|
17
|
-
"cO" : { "description" : "Command", "type" : "string" },
|
18
|
-
"v" : { "description" : "Value" }
|
19
|
-
},
|
20
|
-
"required" : [ "cCI", "n", "cO", "v" ],
|
21
|
-
"additionalProperties": false
|
22
|
-
}
|
23
|
-
}
|
24
|
-
},
|
25
|
-
"required" : [ "mId", "cId", "arg"]
|
26
|
-
}
|
@@ -1,35 +0,0 @@
|
|
1
|
-
{
|
2
|
-
"title" : "CommandResponse",
|
3
|
-
"description" : "Command response",
|
4
|
-
"properties" : {
|
5
|
-
"mId" : { "$ref": "../3.1.2/definitions.json#/message_id" },
|
6
|
-
"cId" : { "$ref": "definitions.json#/component_id" },
|
7
|
-
"cTS" : { "$ref": "../3.1.2/definitions.json#/timestamp" },
|
8
|
-
"rvs" : {
|
9
|
-
"description" : "Command arguments",
|
10
|
-
"type" : "array",
|
11
|
-
"maxItems": 1,
|
12
|
-
"items" : {
|
13
|
-
"type" : "object",
|
14
|
-
"properties": {
|
15
|
-
"cCI" : { "$ref": "../3.1.2/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
|
-
}
|
@@ -1,39 +0,0 @@
|
|
1
|
-
{
|
2
|
-
"$schema" : "http://json-schema.org/draft-07/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
|
-
"AggregatedStatus",
|
23
|
-
"AggregatedStatusRequest",
|
24
|
-
"Watchdog",
|
25
|
-
"Alarm",
|
26
|
-
"CommandRequest",
|
27
|
-
"CommandResponse",
|
28
|
-
"StatusRequest",
|
29
|
-
"StatusResponse",
|
30
|
-
"StatusSubscribe",
|
31
|
-
"StatusUnsubscribe",
|
32
|
-
"StatusUpdate"
|
33
|
-
]
|
34
|
-
}
|
35
|
-
},
|
36
|
-
"required" : [ "mType", "type" ]
|
37
|
-
}
|
38
|
-
]
|
39
|
-
}
|
@@ -1,35 +0,0 @@
|
|
1
|
-
{
|
2
|
-
"number_as_string" : {
|
3
|
-
"description" : "Number as string",
|
4
|
-
"type": "string",
|
5
|
-
"$comment" : "Example: 123, -123, 0.5, -2.4",
|
6
|
-
"pattern": "^-?[0-9]+(\.[0-9]+)?$"
|
7
|
-
},
|
8
|
-
"component_id": {
|
9
|
-
"description" : "Component id - supports both format A (AA+BBCDD=EEEFFGGG) and format B (/component/path)",
|
10
|
-
"anyOf": [
|
11
|
-
{
|
12
|
-
"$comment": "Format A: Traditional component id like KK+AG0503=001DL001",
|
13
|
-
"type": "string",
|
14
|
-
"pattern": "^[A-Za-z0-9]+\\+[A-Za-z0-9]+=.+$"
|
15
|
-
},
|
16
|
-
{
|
17
|
-
"$comment": "Format B: Hierarchical component id like /sg/1 or /dl/radar/1",
|
18
|
-
"type": "string",
|
19
|
-
"pattern": "^(/[^/]+)+$",
|
20
|
-
"not": {
|
21
|
-
"pattern": "/$"
|
22
|
-
}
|
23
|
-
},
|
24
|
-
{
|
25
|
-
"$comment": "Empty string refers to main component",
|
26
|
-
"type": "string",
|
27
|
-
"enum": [""]
|
28
|
-
},
|
29
|
-
{
|
30
|
-
"$comment": "Null refers to main component",
|
31
|
-
"type": "null"
|
32
|
-
}
|
33
|
-
]
|
34
|
-
}
|
35
|
-
}
|
@@ -1,133 +0,0 @@
|
|
1
|
-
{
|
2
|
-
"allOf": [
|
3
|
-
{
|
4
|
-
"$ref": "core.json"
|
5
|
-
},
|
6
|
-
{
|
7
|
-
"if": {
|
8
|
-
"required" : ["type"],
|
9
|
-
"properties": { "type": { "const": "MessageAck" } }
|
10
|
-
},
|
11
|
-
"then": {
|
12
|
-
"$ref": "../3.1.2/message_ack.json"
|
13
|
-
}
|
14
|
-
},
|
15
|
-
{
|
16
|
-
"if": {
|
17
|
-
"required" : ["type"],
|
18
|
-
"properties": { "type": { "const": "MessageNotAck" } }
|
19
|
-
},
|
20
|
-
"then": {
|
21
|
-
"$ref": "../3.1.2/message_not_ack.json"
|
22
|
-
}
|
23
|
-
},
|
24
|
-
{
|
25
|
-
"if": {
|
26
|
-
"required" : ["type"],
|
27
|
-
"properties": { "type": { "const": "Version" } }
|
28
|
-
},
|
29
|
-
"then": {
|
30
|
-
"$ref": "version.json"
|
31
|
-
}
|
32
|
-
},
|
33
|
-
{
|
34
|
-
"if": {
|
35
|
-
"required" : ["type"],
|
36
|
-
"properties": { "type": { "const": "AggregatedStatus" } }
|
37
|
-
},
|
38
|
-
"then": {
|
39
|
-
"$ref": "aggregated_status.json"
|
40
|
-
}
|
41
|
-
},
|
42
|
-
{
|
43
|
-
"if": {
|
44
|
-
"required" : ["type"],
|
45
|
-
"properties": { "type": { "const": "AggregatedStatusRequest" } }
|
46
|
-
},
|
47
|
-
"then": {
|
48
|
-
"$ref": "aggregated_status_request.json"
|
49
|
-
}
|
50
|
-
},
|
51
|
-
{
|
52
|
-
"if": {
|
53
|
-
"required" : ["type"],
|
54
|
-
"properties": { "type": { "const": "Watchdog" } }
|
55
|
-
},
|
56
|
-
"then": {
|
57
|
-
"$ref": "../3.1.2/watchdog.json"
|
58
|
-
}
|
59
|
-
},
|
60
|
-
{
|
61
|
-
"if": {
|
62
|
-
"required" : ["type"],
|
63
|
-
"properties": { "type": { "const": "Alarm" } }
|
64
|
-
},
|
65
|
-
"then": {
|
66
|
-
"$ref": "../3.2.0/alarm.json"
|
67
|
-
}
|
68
|
-
},
|
69
|
-
{
|
70
|
-
"if": {
|
71
|
-
"required" : ["type"],
|
72
|
-
"properties": { "type": { "const": "CommandRequest" } }
|
73
|
-
},
|
74
|
-
"then": {
|
75
|
-
"$ref": "command_request.json"
|
76
|
-
}
|
77
|
-
},
|
78
|
-
{
|
79
|
-
"if": {
|
80
|
-
"required" : ["type"],
|
81
|
-
"properties": { "type": { "const": "CommandResponse" } }
|
82
|
-
},
|
83
|
-
"then": {
|
84
|
-
"$ref": "command_response.json"
|
85
|
-
}
|
86
|
-
},
|
87
|
-
{
|
88
|
-
"if": {
|
89
|
-
"required" : ["type"],
|
90
|
-
"properties": { "type": { "const": "StatusRequest" } }
|
91
|
-
},
|
92
|
-
"then": {
|
93
|
-
"$ref": "status_request.json"
|
94
|
-
}
|
95
|
-
},
|
96
|
-
{
|
97
|
-
"if": {
|
98
|
-
"required" : ["type"],
|
99
|
-
"properties": { "type": { "const": "StatusResponse" } }
|
100
|
-
},
|
101
|
-
"then": {
|
102
|
-
"$ref": "../3.2.0/status_response.json"
|
103
|
-
}
|
104
|
-
},
|
105
|
-
{
|
106
|
-
"if": {
|
107
|
-
"required" : ["type"],
|
108
|
-
"properties": { "type": { "const": "StatusSubscribe" } }
|
109
|
-
},
|
110
|
-
"then": {
|
111
|
-
"$ref": "status_subscribe.json"
|
112
|
-
}
|
113
|
-
},
|
114
|
-
{
|
115
|
-
"if": {
|
116
|
-
"required" : ["type"],
|
117
|
-
"properties": { "type": { "const": "StatusUnsubscribe" } }
|
118
|
-
},
|
119
|
-
"then": {
|
120
|
-
"$ref": "../3.1.2/status_unsubscribe.json"
|
121
|
-
}
|
122
|
-
},
|
123
|
-
{
|
124
|
-
"if": {
|
125
|
-
"required" : ["type"],
|
126
|
-
"properties": { "type": { "const": "StatusUpdate" } }
|
127
|
-
},
|
128
|
-
"then": {
|
129
|
-
"$ref": "../3.2.0/status_update.json"
|
130
|
-
}
|
131
|
-
}
|
132
|
-
]
|
133
|
-
}
|
@@ -1,21 +0,0 @@
|
|
1
|
-
{
|
2
|
-
"properties" : {
|
3
|
-
"mId" : { "$ref": "../3.1.2/definitions.json#/message_id" },
|
4
|
-
"cId" : { "$ref": "definitions.json#/component_id" },
|
5
|
-
"sS" : {
|
6
|
-
"description" : "Status request arguments",
|
7
|
-
"type" : "array",
|
8
|
-
"minItems": 1,
|
9
|
-
"items" : {
|
10
|
-
"type" : "object",
|
11
|
-
"properties": {
|
12
|
-
"sCI" : { "$ref": "../3.1.2/definitions.json#/status_code" },
|
13
|
-
"n" : { "description" : "Unique reference of the value", "type" : "string" }
|
14
|
-
},
|
15
|
-
"required" : [ "sCI", "n" ],
|
16
|
-
"additionalProperties": false
|
17
|
-
}
|
18
|
-
}
|
19
|
-
},
|
20
|
-
"required" : [ "mId", "cId", "sS"]
|
21
|
-
}
|
@@ -1,23 +0,0 @@
|
|
1
|
-
{
|
2
|
-
"title" : "StatusRequest",
|
3
|
-
"description" : "Status request",
|
4
|
-
"properties" : {
|
5
|
-
"mId" : { "$ref": "../3.1.2/definitions.json#/message_id" },
|
6
|
-
"cId" : { "$ref": "definitions.json#/component_id" },
|
7
|
-
"sS" : {
|
8
|
-
"description" : "Status request list",
|
9
|
-
"type" : "array",
|
10
|
-
"minItems": 1,
|
11
|
-
"items" : {
|
12
|
-
"type" : "object",
|
13
|
-
"properties": {
|
14
|
-
"sCI" : { "$ref": "../3.1.2/definitions.json#/status_code" },
|
15
|
-
"n" : { "description" : "Unique reference of the value", "type" : "string" }
|
16
|
-
},
|
17
|
-
"required" : [ "sCI", "n" ],
|
18
|
-
"additionalProperties": false
|
19
|
-
}
|
20
|
-
}
|
21
|
-
},
|
22
|
-
"required" : [ "mId", "cId", "sS"]
|
23
|
-
}
|
@@ -1,31 +0,0 @@
|
|
1
|
-
{
|
2
|
-
"title" : "StatusSubscribe",
|
3
|
-
"description" : "Status subscribe",
|
4
|
-
"properties" : {
|
5
|
-
"mId" : { "$ref": "../3.1.2/definitions.json#/message_id" },
|
6
|
-
"cId" : { "$ref": "definitions.json#/component_id" },
|
7
|
-
"sS" : {
|
8
|
-
"description" : "Status request arguments",
|
9
|
-
"type" : "array",
|
10
|
-
"minItems": 1,
|
11
|
-
"items" : {
|
12
|
-
"type" : "object",
|
13
|
-
"properties": {
|
14
|
-
"sCI" : { "$ref": "../3.1.2/definitions.json#/status_code" },
|
15
|
-
"n" : { "description" : "Unique reference of the value", "type" : "string" },
|
16
|
-
"uRt" : {
|
17
|
-
"$ref": "definitions.json#/number_as_string",
|
18
|
-
"description" : "Update interval in seconds, 0 means send when value changes"
|
19
|
-
},
|
20
|
-
"sOc" : {
|
21
|
-
"type": "boolean",
|
22
|
-
"description" : "Whether to send an update as soon as the value changes"
|
23
|
-
}
|
24
|
-
},
|
25
|
-
"required" : [ "sCI", "n", "uRt", "sOc" ],
|
26
|
-
"additionalProperties": false
|
27
|
-
}
|
28
|
-
}
|
29
|
-
},
|
30
|
-
"required" : [ "mId", "cId", "sS"]
|
31
|
-
}
|
@@ -1,57 +0,0 @@
|
|
1
|
-
{
|
2
|
-
"title" : "Version",
|
3
|
-
"description" : "Version message",
|
4
|
-
"properties" : {
|
5
|
-
"mId" : { "$ref": "../3.1.2/definitions.json#/message_id" },
|
6
|
-
"step" : {
|
7
|
-
"description" : "Message step - Request for initial messages from sites, Response for supervisor replies",
|
8
|
-
"type" : "string",
|
9
|
-
"enum" : [ "Request", "Response" ]
|
10
|
-
},
|
11
|
-
"receiveAlarms" : {
|
12
|
-
"description" : "Whether supervisor wants to receive alarms (optional, only in Response messages)",
|
13
|
-
"type" : "boolean"
|
14
|
-
},
|
15
|
-
"RSMP" : {
|
16
|
-
"description" : "Supported RSMP versions",
|
17
|
-
"type" : "array",
|
18
|
-
"items" : {
|
19
|
-
"type" : "object",
|
20
|
-
"properties" : {
|
21
|
-
"vers" : {
|
22
|
-
"$ref": "../3.1.2/definitions.json#/version",
|
23
|
-
"description" : "RSMP version"
|
24
|
-
}
|
25
|
-
},
|
26
|
-
"required" : ["vers"],
|
27
|
-
"additionalProperties" : false
|
28
|
-
},
|
29
|
-
"minItems" : 1,
|
30
|
-
"uniqueItems" : true
|
31
|
-
},
|
32
|
-
"SXL" : {
|
33
|
-
"$ref": "../3.1.2/definitions.json#/version",
|
34
|
-
"description" : "SXL version"
|
35
|
-
},
|
36
|
-
"siteId" : {
|
37
|
-
"description" : "Site ids",
|
38
|
-
"type" : "array",
|
39
|
-
"items" : {
|
40
|
-
"type" : "object",
|
41
|
-
"properties" : {
|
42
|
-
"sId" : {
|
43
|
-
"type" : "string",
|
44
|
-
"minLength": 1
|
45
|
-
}
|
46
|
-
},
|
47
|
-
"required" : [ "sId" ],
|
48
|
-
"additionalProperties" : false
|
49
|
-
},
|
50
|
-
"minItems" : 1,
|
51
|
-
"uniqueItems" : true,
|
52
|
-
"additionalProperties" : false
|
53
|
-
}
|
54
|
-
},
|
55
|
-
"required" : [ "mId", "step", "RSMP", "SXL", "siteId" ],
|
56
|
-
"additionalProperties": true
|
57
|
-
}
|