rsmp 0.43.2 → 0.45.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.
Files changed (177) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile.lock +11 -11
  3. data/README.md +19 -3
  4. data/Rakefile +2 -2
  5. data/config/supervisor.yaml +2 -1
  6. data/config/tlc.yaml +2 -2
  7. data/lib/rsmp/cli.rb +29 -5
  8. data/lib/rsmp/component/component.rb +0 -4
  9. data/lib/rsmp/component/component_base.rb +15 -2
  10. data/lib/rsmp/component/component_proxy.rb +1 -1
  11. data/lib/rsmp/component/components.rb +22 -1
  12. data/lib/rsmp/convert/export/json_schema/outputs.rb +1 -0
  13. data/lib/rsmp/convert/export/json_schema/values.rb +6 -4
  14. data/lib/rsmp/convert/export/json_schema.rb +7 -3
  15. data/lib/rsmp/helpers/deep_merge.rb +2 -2
  16. data/lib/rsmp/message.rb +32 -0
  17. data/lib/rsmp/node/site/site.rb +34 -10
  18. data/lib/rsmp/node/supervisor/modules/configuration.rb +32 -5
  19. data/lib/rsmp/node/supervisor/modules/connection.rb +0 -2
  20. data/lib/rsmp/node/supervisor/supervisor.rb +0 -7
  21. data/lib/rsmp/options/options.rb +55 -6
  22. data/lib/rsmp/options/schemas/site.json +6 -3
  23. data/lib/rsmp/options/schemas/supervisor.json +5 -2
  24. data/lib/rsmp/options/schemas/supervisor_site.json +5 -2
  25. data/lib/rsmp/options/site_options.rb +3 -2
  26. data/lib/rsmp/options/supervisor_options.rb +3 -1
  27. data/lib/rsmp/proxy/modules/acknowledgements.rb +2 -0
  28. data/lib/rsmp/proxy/modules/receive.rb +5 -2
  29. data/lib/rsmp/proxy/modules/state.rb +1 -0
  30. data/lib/rsmp/proxy/modules/versions.rb +90 -15
  31. data/lib/rsmp/proxy/proxy.rb +52 -3
  32. data/lib/rsmp/proxy/site/modules/status.rb +5 -3
  33. data/lib/rsmp/proxy/site/site_proxy.rb +68 -35
  34. data/lib/rsmp/proxy/site/sxl_selection.rb +54 -0
  35. data/lib/rsmp/proxy/supervisor/supervisor_proxy.rb +54 -18
  36. data/lib/rsmp/schema/message_resolution.rb +104 -0
  37. data/lib/rsmp/schema.rb +104 -22
  38. data/lib/rsmp/schema_error.rb +7 -1
  39. data/lib/rsmp/sxl/interface.rb +48 -0
  40. data/lib/rsmp/sxl/registry.rb +55 -0
  41. data/lib/rsmp/sxl/site_interface.rb +10 -0
  42. data/lib/rsmp/sxl/supervisor_interface.rb +21 -0
  43. data/lib/rsmp/tlc/detector_logic.rb +2 -2
  44. data/lib/rsmp/tlc/signal_group.rb +2 -2
  45. data/lib/rsmp/tlc/site_interface.rb +10 -0
  46. data/lib/rsmp/tlc/{traffic_controller_proxy.rb → supervisor_interface.rb} +19 -34
  47. data/lib/rsmp/tlc/traffic_controller.rb +10 -2
  48. data/lib/rsmp/tlc/traffic_controller_site.rb +4 -2
  49. data/lib/rsmp/tlc.rb +10 -0
  50. data/lib/rsmp/version.rb +1 -1
  51. data/lib/rsmp.rb +8 -1
  52. data/rsmp.gemspec +5 -5
  53. data/schemas/core/3.3.0/aggregated_status.json +25 -0
  54. data/schemas/core/3.3.0/aggregated_status_request.json +9 -0
  55. data/schemas/core/3.3.0/alarm.json +71 -0
  56. data/schemas/core/3.3.0/alarm_acknowledge.json +11 -0
  57. data/schemas/core/3.3.0/alarm_issue.json +44 -0
  58. data/schemas/core/3.3.0/alarm_request.json +3 -0
  59. data/schemas/core/3.3.0/alarm_suspend_resume.json +3 -0
  60. data/schemas/core/3.3.0/alarm_suspended_resumed.json +44 -0
  61. data/schemas/core/3.3.0/command_request.json +24 -0
  62. data/schemas/core/3.3.0/command_response.json +35 -0
  63. data/schemas/core/3.3.0/component_list.json +24 -0
  64. data/schemas/core/3.3.0/core.json +40 -0
  65. data/schemas/core/3.3.0/definitions.json +133 -0
  66. data/schemas/core/3.3.0/message_ack.json +11 -0
  67. data/schemas/core/3.3.0/message_not_ack.json +15 -0
  68. data/schemas/core/3.3.0/rsmp.json +142 -0
  69. data/schemas/core/3.3.0/status.json +21 -0
  70. data/schemas/core/3.3.0/status_request.json +5 -0
  71. data/schemas/core/3.3.0/status_response.json +41 -0
  72. data/schemas/core/3.3.0/status_subscribe.json +31 -0
  73. data/schemas/core/3.3.0/status_unsubscribe.json +5 -0
  74. data/schemas/core/3.3.0/status_update.json +41 -0
  75. data/schemas/core/3.3.0/version.json +144 -0
  76. data/schemas/core/3.3.0/watchdog.json +9 -0
  77. data/schemas/tlc/1.3.0/alarms/A0001.json +4 -0
  78. data/schemas/tlc/1.3.0/alarms/A0002.json +4 -0
  79. data/schemas/tlc/1.3.0/alarms/A0003.json +4 -0
  80. data/schemas/tlc/1.3.0/alarms/A0004.json +4 -0
  81. data/schemas/tlc/1.3.0/alarms/A0005.json +4 -0
  82. data/schemas/tlc/1.3.0/alarms/A0006.json +4 -0
  83. data/schemas/tlc/1.3.0/alarms/A0007.json +34 -0
  84. data/schemas/tlc/1.3.0/alarms/A0008.json +30 -0
  85. data/schemas/tlc/1.3.0/alarms/A0009.json +4 -0
  86. data/schemas/tlc/1.3.0/alarms/A0010.json +4 -0
  87. data/schemas/tlc/1.3.0/alarms/A0101.json +4 -0
  88. data/schemas/tlc/1.3.0/alarms/A0201.json +35 -0
  89. data/schemas/tlc/1.3.0/alarms/A0202.json +35 -0
  90. data/schemas/tlc/1.3.0/alarms/A0301.json +92 -0
  91. data/schemas/tlc/1.3.0/alarms/A0302.json +115 -0
  92. data/schemas/tlc/1.3.0/alarms/A0303.json +92 -0
  93. data/schemas/tlc/1.3.0/alarms/A0304.json +115 -0
  94. data/schemas/tlc/1.3.0/alarms/alarms.json +287 -0
  95. data/schemas/tlc/1.3.0/commands/M0001.json +92 -0
  96. data/schemas/tlc/1.3.0/commands/M0002.json +69 -0
  97. data/schemas/tlc/1.3.0/commands/M0003.json +69 -0
  98. data/schemas/tlc/1.3.0/commands/M0004.json +51 -0
  99. data/schemas/tlc/1.3.0/commands/M0005.json +69 -0
  100. data/schemas/tlc/1.3.0/commands/M0006.json +69 -0
  101. data/schemas/tlc/1.3.0/commands/M0007.json +51 -0
  102. data/schemas/tlc/1.3.0/commands/M0008.json +87 -0
  103. data/schemas/tlc/1.3.0/commands/M0010.json +51 -0
  104. data/schemas/tlc/1.3.0/commands/M0011.json +51 -0
  105. data/schemas/tlc/1.3.0/commands/M0012.json +51 -0
  106. data/schemas/tlc/1.3.0/commands/M0013.json +51 -0
  107. data/schemas/tlc/1.3.0/commands/M0014.json +69 -0
  108. data/schemas/tlc/1.3.0/commands/M0015.json +69 -0
  109. data/schemas/tlc/1.3.0/commands/M0016.json +51 -0
  110. data/schemas/tlc/1.3.0/commands/M0017.json +51 -0
  111. data/schemas/tlc/1.3.0/commands/M0018.json +69 -0
  112. data/schemas/tlc/1.3.0/commands/M0019.json +87 -0
  113. data/schemas/tlc/1.3.0/commands/M0020.json +87 -0
  114. data/schemas/tlc/1.3.0/commands/M0021.json +51 -0
  115. data/schemas/tlc/1.3.0/commands/M0022.json +249 -0
  116. data/schemas/tlc/1.3.0/commands/M0023.json +51 -0
  117. data/schemas/tlc/1.3.0/commands/M0024.json +33 -0
  118. data/schemas/tlc/1.3.0/commands/M0103.json +72 -0
  119. data/schemas/tlc/1.3.0/commands/M0104.json +141 -0
  120. data/schemas/tlc/1.3.0/commands/command_requests.json +8 -0
  121. data/schemas/tlc/1.3.0/commands/command_responses.json +8 -0
  122. data/schemas/tlc/1.3.0/commands/commands.json +415 -0
  123. data/schemas/tlc/1.3.0/defs/definitions.json +72 -0
  124. data/schemas/tlc/1.3.0/defs/guards.json +24 -0
  125. data/schemas/tlc/1.3.0/rsmp.json +74 -0
  126. data/schemas/tlc/1.3.0/statuses/S0001.json +109 -0
  127. data/schemas/tlc/1.3.0/statuses/S0002.json +36 -0
  128. data/schemas/tlc/1.3.0/statuses/S0003.json +36 -0
  129. data/schemas/tlc/1.3.0/statuses/S0004.json +36 -0
  130. data/schemas/tlc/1.3.0/statuses/S0005.json +72 -0
  131. data/schemas/tlc/1.3.0/statuses/S0006.json +54 -0
  132. data/schemas/tlc/1.3.0/statuses/S0007.json +73 -0
  133. data/schemas/tlc/1.3.0/statuses/S0008.json +73 -0
  134. data/schemas/tlc/1.3.0/statuses/S0009.json +73 -0
  135. data/schemas/tlc/1.3.0/statuses/S0010.json +73 -0
  136. data/schemas/tlc/1.3.0/statuses/S0011.json +73 -0
  137. data/schemas/tlc/1.3.0/statuses/S0012.json +73 -0
  138. data/schemas/tlc/1.3.0/statuses/S0013.json +54 -0
  139. data/schemas/tlc/1.3.0/statuses/S0014.json +55 -0
  140. data/schemas/tlc/1.3.0/statuses/S0015.json +55 -0
  141. data/schemas/tlc/1.3.0/statuses/S0016.json +36 -0
  142. data/schemas/tlc/1.3.0/statuses/S0017.json +36 -0
  143. data/schemas/tlc/1.3.0/statuses/S0018.json +61 -0
  144. data/schemas/tlc/1.3.0/statuses/S0019.json +36 -0
  145. data/schemas/tlc/1.3.0/statuses/S0020.json +54 -0
  146. data/schemas/tlc/1.3.0/statuses/S0021.json +37 -0
  147. data/schemas/tlc/1.3.0/statuses/S0022.json +36 -0
  148. data/schemas/tlc/1.3.0/statuses/S0023.json +37 -0
  149. data/schemas/tlc/1.3.0/statuses/S0024.json +36 -0
  150. data/schemas/tlc/1.3.0/statuses/S0025.json +162 -0
  151. data/schemas/tlc/1.3.0/statuses/S0026.json +36 -0
  152. data/schemas/tlc/1.3.0/statuses/S0027.json +36 -0
  153. data/schemas/tlc/1.3.0/statuses/S0028.json +36 -0
  154. data/schemas/tlc/1.3.0/statuses/S0029.json +36 -0
  155. data/schemas/tlc/1.3.0/statuses/S0030.json +36 -0
  156. data/schemas/tlc/1.3.0/statuses/S0031.json +36 -0
  157. data/schemas/tlc/1.3.0/statuses/S0032.json +73 -0
  158. data/schemas/tlc/1.3.0/statuses/S0033.json +77 -0
  159. data/schemas/tlc/1.3.0/statuses/S0034.json +36 -0
  160. data/schemas/tlc/1.3.0/statuses/S0035.json +49 -0
  161. data/schemas/tlc/1.3.0/statuses/S0091.json +40 -0
  162. data/schemas/tlc/1.3.0/statuses/S0092.json +40 -0
  163. data/schemas/tlc/1.3.0/statuses/S0095.json +36 -0
  164. data/schemas/tlc/1.3.0/statuses/S0096.json +126 -0
  165. data/schemas/tlc/1.3.0/statuses/S0097.json +54 -0
  166. data/schemas/tlc/1.3.0/statuses/S0098.json +72 -0
  167. data/schemas/tlc/1.3.0/statuses/S0201.json +54 -0
  168. data/schemas/tlc/1.3.0/statuses/S0202.json +54 -0
  169. data/schemas/tlc/1.3.0/statuses/S0203.json +54 -0
  170. data/schemas/tlc/1.3.0/statuses/S0204.json +198 -0
  171. data/schemas/tlc/1.3.0/statuses/S0205.json +54 -0
  172. data/schemas/tlc/1.3.0/statuses/S0206.json +54 -0
  173. data/schemas/tlc/1.3.0/statuses/S0207.json +54 -0
  174. data/schemas/tlc/1.3.0/statuses/S0208.json +198 -0
  175. data/schemas/tlc/1.3.0/statuses/statuses.json +787 -0
  176. data/schemas/tlc/1.3.0/sxl.yaml +2296 -0
  177. metadata +144 -12
@@ -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,11 @@
1
+ {
2
+ "title" : "MessageAck",
3
+ "description" : "Message acknowledged",
4
+ "properties" : {
5
+ "oMId" : {
6
+ "$ref": "definitions.json#/message_id",
7
+ "description" : "Old message id"
8
+ }
9
+ },
10
+ "required" : [ "oMId" ]
11
+ }
@@ -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
+ }
@@ -0,0 +1,142 @@
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": "message_ack.json"
13
+ }
14
+ },
15
+ {
16
+ "if": {
17
+ "required" : ["type"],
18
+ "properties": { "type": { "const": "MessageNotAck" } }
19
+ },
20
+ "then": {
21
+ "$ref": "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": "ComponentList" } }
37
+ },
38
+ "then": {
39
+ "$ref": "component_list.json"
40
+ }
41
+ },
42
+ {
43
+ "if": {
44
+ "required" : ["type"],
45
+ "properties": { "type": { "const": "AggregatedStatus" } }
46
+ },
47
+ "then": {
48
+ "$ref": "aggregated_status.json"
49
+ }
50
+ },
51
+ {
52
+ "if": {
53
+ "required" : ["type"],
54
+ "properties": { "type": { "const": "AggregatedStatusRequest" } }
55
+ },
56
+ "then": {
57
+ "$ref": "aggregated_status_request.json"
58
+ }
59
+ },
60
+ {
61
+ "if": {
62
+ "required" : ["type"],
63
+ "properties": { "type": { "const": "Watchdog" } }
64
+ },
65
+ "then": {
66
+ "$ref": "watchdog.json"
67
+ }
68
+ },
69
+ {
70
+ "if": {
71
+ "required" : ["type"],
72
+ "properties": { "type": { "const": "Alarm" } }
73
+ },
74
+ "then": {
75
+ "$ref": "alarm.json"
76
+ }
77
+ },
78
+ {
79
+ "if": {
80
+ "required" : ["type"],
81
+ "properties": { "type": { "const": "CommandRequest" } }
82
+ },
83
+ "then": {
84
+ "$ref": "command_request.json"
85
+ }
86
+ },
87
+ {
88
+ "if": {
89
+ "required" : ["type"],
90
+ "properties": { "type": { "const": "CommandResponse" } }
91
+ },
92
+ "then": {
93
+ "$ref": "command_response.json"
94
+ }
95
+ },
96
+ {
97
+ "if": {
98
+ "required" : ["type"],
99
+ "properties": { "type": { "const": "StatusRequest" } }
100
+ },
101
+ "then": {
102
+ "$ref": "status_request.json"
103
+ }
104
+ },
105
+ {
106
+ "if": {
107
+ "required" : ["type"],
108
+ "properties": { "type": { "const": "StatusResponse" } }
109
+ },
110
+ "then": {
111
+ "$ref": "status_response.json"
112
+ }
113
+ },
114
+ {
115
+ "if": {
116
+ "required" : ["type"],
117
+ "properties": { "type": { "const": "StatusSubscribe" } }
118
+ },
119
+ "then": {
120
+ "$ref": "status_subscribe.json"
121
+ }
122
+ },
123
+ {
124
+ "if": {
125
+ "required" : ["type"],
126
+ "properties": { "type": { "const": "StatusUnsubscribe" } }
127
+ },
128
+ "then": {
129
+ "$ref": "status_unsubscribe.json"
130
+ }
131
+ },
132
+ {
133
+ "if": {
134
+ "required" : ["type"],
135
+ "properties": { "type": { "const": "StatusUpdate" } }
136
+ },
137
+ "then": {
138
+ "$ref": "status_update.json"
139
+ }
140
+ }
141
+ ]
142
+ }
@@ -0,0 +1,21 @@
1
+ {
2
+ "properties" : {
3
+ "mId" : { "$ref": "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": "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
+ }
@@ -0,0 +1,5 @@
1
+ {
2
+ "title" : "StatusRequest",
3
+ "description" : "Status request",
4
+ "$ref": "status.json"
5
+ }
@@ -0,0 +1,41 @@
1
+ {
2
+ "title" : "StatusResponse",
3
+ "description" : "Status response",
4
+ "properties" : {
5
+ "mId" : { "$ref": "definitions.json#/message_id" },
6
+ "cId" : { "$ref": "definitions.json#/component_id" },
7
+ "sTs" : { "$ref": "definitions.json#/timestamp" },
8
+ "sS" : {
9
+ "description" : "Status response arguments",
10
+ "type" : "array",
11
+ "minItems": 1,
12
+ "items" : {
13
+ "type" : "object",
14
+ "properties": {
15
+ "sCI" : { "$ref": "definitions.json#/status_code" },
16
+ "n" : { "description" : "Unique reference of the value", "type" : "string" },
17
+ "s" : { "description" : "Value"},
18
+ "q" : { "description" : "Quality", "type" : "string", "enum" : [ "recent", "old", "undefined", "unknown"] }
19
+ },
20
+ "if": {
21
+ "properties": {
22
+ "q" : { "enum" : ["unknown","undefined"] }
23
+ }
24
+ },
25
+ "then": {
26
+ "properties": {
27
+ "s" : { "type" : "null" }
28
+ }
29
+ },
30
+ "else": {
31
+ "properties": {
32
+ "s" : { "type" : ["string","array"] }
33
+ }
34
+ },
35
+ "required" : [ "sCI", "n", "s", "q" ],
36
+ "additionalProperties": false
37
+ }
38
+ }
39
+ },
40
+ "required" : [ "mId", "cId", "sTs", "sS" ]
41
+ }
@@ -0,0 +1,31 @@
1
+ {
2
+ "title" : "StatusSubscribe",
3
+ "description" : "Status subscribe",
4
+ "properties" : {
5
+ "mId" : { "$ref": "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": "definitions.json#/status_code" },
15
+ "n" : { "description" : "Unique reference of the value", "type" : "string" },
16
+ "uRt" : {
17
+ "$ref": "definitions.json#/integer",
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
+ }
@@ -0,0 +1,5 @@
1
+ {
2
+ "title" : "StatusUnsubscribe",
3
+ "description" : "Status unsubscribe",
4
+ "$ref": "status.json"
5
+ }
@@ -0,0 +1,41 @@
1
+ {
2
+ "title" : "StatusUpdate",
3
+ "description" : "Status update",
4
+ "properties" : {
5
+ "mId" : { "$ref": "definitions.json#/message_id" },
6
+ "cId" : { "$ref": "definitions.json#/component_id" },
7
+ "sTs" : { "$ref": "definitions.json#/timestamp" },
8
+ "sS" : {
9
+ "description" : "Status update arguments",
10
+ "type" : "array",
11
+ "minItems": 1,
12
+ "items" : {
13
+ "type" : "object",
14
+ "properties": {
15
+ "sCI" : { "$ref": "definitions.json#/status_code" },
16
+ "n" : { "description" : "Unique reference of the value", "type" : "string" },
17
+ "s" : { "description" : "Value"},
18
+ "q" : { "description" : "Quality", "type" : "string", "enum" : [ "recent", "old", "undefined", "unknown"] }
19
+ },
20
+ "if": {
21
+ "properties": {
22
+ "q" : { "enum" : ["unknown","undefined"] }
23
+ }
24
+ },
25
+ "then": {
26
+ "properties": {
27
+ "s" : { "type" : "null" }
28
+ }
29
+ },
30
+ "else": {
31
+ "properties": {
32
+ "s" : { "type" : ["string","array"] }
33
+ }
34
+ },
35
+ "required" : [ "sCI", "n", "s", "q" ],
36
+ "additionalProperties": false
37
+ }
38
+ }
39
+ },
40
+ "required" : [ "mId", "cId", "sTs", "sS" ]
41
+ }
@@ -0,0 +1,144 @@
1
+ {
2
+ "title" : "Version",
3
+ "description" : "Version message",
4
+ "oneOf" : [
5
+ {
6
+ "description" : "Version request",
7
+ "properties" : {
8
+ "mId" : { "$ref": "definitions.json#/message_id" },
9
+ "step" : {
10
+ "type" : "string",
11
+ "const" : "Request"
12
+ },
13
+ "RSMP" : {
14
+ "$ref" : "#/$defs/rsmp_versions",
15
+ "description" : "Supported RSMP versions"
16
+ },
17
+ "SXL" : {
18
+ "$ref": "definitions.json#/version",
19
+ "description" : "Primary SXL version, for backward compatibility"
20
+ },
21
+ "SXLS" : {
22
+ "description" : "Supported SXLs",
23
+ "type" : "array",
24
+ "items" : { "$ref" : "#/$defs/sxl_request" },
25
+ "minItems" : 0,
26
+ "uniqueItems" : true
27
+ },
28
+ "siteId" : {
29
+ "description" : "Site ids",
30
+ "type" : "array",
31
+ "items" : { "$ref" : "#/$defs/site_id" },
32
+ "minItems" : 1,
33
+ "maxItems" : 1,
34
+ "uniqueItems" : true
35
+ }
36
+ },
37
+ "required" : [ "mId", "RSMP", "SXLS", "siteId" ]
38
+ },
39
+ {
40
+ "description" : "Version response",
41
+ "properties" : {
42
+ "mId" : { "$ref": "definitions.json#/message_id" },
43
+ "step" : {
44
+ "type" : "string",
45
+ "const" : "Response"
46
+ },
47
+ "RSMP" : {
48
+ "description" : "Selected RSMP version",
49
+ "allOf" : [
50
+ { "$ref" : "#/$defs/rsmp_versions" },
51
+ {
52
+ "minItems" : 1,
53
+ "maxItems" : 1
54
+ }
55
+ ]
56
+ },
57
+ "supervisorId" : {
58
+ "description" : "Supervisor id",
59
+ "type" : "string",
60
+ "minLength" : 1
61
+ },
62
+ "SXLS" : {
63
+ "description" : "SXLs to use, or not use",
64
+ "type" : "array",
65
+ "items" : { "$ref" : "#/$defs/sxl_response" },
66
+ "minItems" : 0,
67
+ "uniqueItems" : true
68
+ },
69
+ "receiveAlarms" : {
70
+ "description" : "Whether the supervisor wants to receive alarms",
71
+ "type" : "boolean"
72
+ }
73
+ },
74
+ "required" : [ "mId", "step", "RSMP", "supervisorId", "SXLS" ]
75
+ }
76
+ ],
77
+ "$defs" : {
78
+ "rsmp_versions" : {
79
+ "type" : "array",
80
+ "items" : {
81
+ "type" : "object",
82
+ "properties" : {
83
+ "vers" : {
84
+ "$ref": "definitions.json#/version",
85
+ "description" : "RSMP version"
86
+ }
87
+ },
88
+ "required" : [ "vers" ],
89
+ "additionalProperties" : false
90
+ },
91
+ "minItems" : 1,
92
+ "uniqueItems" : true
93
+ },
94
+ "site_id" : {
95
+ "type" : "object",
96
+ "properties" : {
97
+ "sId" : {
98
+ "type" : "string",
99
+ "minLength": 1
100
+ }
101
+ },
102
+ "required" : [ "sId" ],
103
+ "additionalProperties" : false
104
+ },
105
+ "sxl_request" : {
106
+ "type" : "object",
107
+ "properties" : {
108
+ "name" : { "$ref" : "definitions.json#/sxl_name" },
109
+ "version" : { "$ref" : "definitions.json#/version" },
110
+ "prefix" : { "$ref" : "definitions.json#/sxl_prefix" }
111
+ },
112
+ "required" : [ "name", "version" ],
113
+ "additionalProperties" : false
114
+ },
115
+ "sxl_response" : {
116
+ "type" : "object",
117
+ "oneOf" : [
118
+ {
119
+ "properties" : {
120
+ "name" : { "$ref" : "definitions.json#/sxl_name" },
121
+ "version" : { "$ref" : "definitions.json#/version" }
122
+ },
123
+ "required" : [ "name", "version" ],
124
+ "additionalProperties" : false
125
+ },
126
+ {
127
+ "properties" : {
128
+ "name" : { "$ref" : "definitions.json#/sxl_name" },
129
+ "version" : { "$ref" : "definitions.json#/version" },
130
+ "rejected" : {
131
+ "type" : "integer",
132
+ "enum" : [ 1, 2, 3 ]
133
+ },
134
+ "reason" : {
135
+ "type" : "string"
136
+ }
137
+ },
138
+ "required" : [ "name", "rejected" ],
139
+ "additionalProperties" : false
140
+ }
141
+ ]
142
+ }
143
+ }
144
+ }
@@ -0,0 +1,9 @@
1
+ {
2
+ "title" : "Watchdog",
3
+ "description" : "Watchdog message",
4
+ "properties" : {
5
+ "mId" : { "$ref": "definitions.json#/message_id" },
6
+ "wTs" : { "$ref": "definitions.json#/timestamp" }
7
+ },
8
+ "required" : [ "mId", "wTs" ]
9
+ }
@@ -0,0 +1,4 @@
1
+ {
2
+ "$schema" : "https://json-schema.org/draft/2020-12/schema",
3
+ "description" : "Serious hardware error.\nIs a \"major fault\" defined according to 3.8 in EN12675 which causes the controller to switch to a \"failure mode\" according to 3.6 in EN12675."
4
+ }
@@ -0,0 +1,4 @@
1
+ {
2
+ "$schema" : "https://json-schema.org/draft/2020-12/schema",
3
+ "description" : "Less serious hardware error.\nIs a \"minor fault\" defined according to 3.11 in EN12675."
4
+ }
@@ -0,0 +1,4 @@
1
+ {
2
+ "$schema" : "https://json-schema.org/draft/2020-12/schema",
3
+ "description" : "Serious configuration error.\nIs a \"major fault\" defined according to 3.8 in EN12675 which causes the controller to switch to a \"failure mode\" according to 3.6 in EN12675."
4
+ }
@@ -0,0 +1,4 @@
1
+ {
2
+ "$schema" : "https://json-schema.org/draft/2020-12/schema",
3
+ "description" : "Less serious configuration error.\nIs a \"minor fault\" defined according to 3.11 in EN12675."
4
+ }
@@ -0,0 +1,4 @@
1
+ {
2
+ "$schema" : "https://json-schema.org/draft/2020-12/schema",
3
+ "description" : "Synchronisation error (coordination).\nIs a \"minor fault\" defined according to 3.11 in EN12675."
4
+ }
@@ -0,0 +1,4 @@
1
+ {
2
+ "$schema" : "https://json-schema.org/draft/2020-12/schema",
3
+ "description" : "Safety error\nIs a \"major fault\" defined according to 3.8 in EN12675 which causes the controller to switch to a \"failure mode\" according to 3.6 in EN12675."
4
+ }
@@ -0,0 +1,34 @@
1
+ {
2
+ "$schema" : "https://json-schema.org/draft/2020-12/schema",
3
+ "description" : "Communication error.\nUsed for communication errors with the central system. Includes NTP connection loss if the TLC is configured to use NTP.\nIs a \"minor fault\" defined according to 3.11 in EN12675.",
4
+ "properties" : {
5
+ "n" : {
6
+ "enum" : [
7
+ "protocol"
8
+ ]
9
+ }
10
+ },
11
+ "allOf" : [
12
+ {
13
+ "if" : {
14
+ "properties" : {
15
+ "n" : {
16
+ "const" : "protocol"
17
+ }
18
+ }
19
+ },
20
+ "then" : {
21
+ "properties" : {
22
+ "v" : {
23
+ "description" : "Type of communication error, e.g. NTP or RSMP",
24
+ "type" : "string",
25
+ "enum" : [
26
+ "ntp",
27
+ "rsmp"
28
+ ]
29
+ }
30
+ }
31
+ }
32
+ }
33
+ ]
34
+ }