rsmp 0.46.0 → 0.48.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/.github/workflows/copilot-setup-steps.yml +1 -1
- data/.github/workflows/rubocop.yaml +1 -1
- data/.github/workflows/sus.yaml +1 -1
- data/CHANGELOG.md +14 -0
- data/Gemfile.lock +5 -5
- data/README.md +3 -1
- data/documentation/cli.md +225 -0
- data/documentation/configuration.md +83 -0
- data/lib/rsmp/cli/configuration.rb +30 -0
- data/lib/rsmp/cli.rb +45 -45
- data/lib/rsmp/collect/command_matcher.rb +13 -4
- data/lib/rsmp/collect/status_matcher.rb +14 -4
- data/lib/rsmp/command_list.rb +1 -1
- data/lib/rsmp/config.rb +63 -0
- data/lib/rsmp/convert/export/json_schema/index.rb +64 -0
- data/lib/rsmp/convert/export/json_schema/items.rb +9 -1
- data/lib/rsmp/convert/export/json_schema/outputs.rb +65 -25
- data/lib/rsmp/convert/export/json_schema/values.rb +40 -11
- data/lib/rsmp/convert/export/json_schema.rb +3 -1
- data/lib/rsmp/message/sxl_codec.rb +194 -0
- data/lib/rsmp/message.rb +2 -0
- data/lib/rsmp/node/site/connections.rb +80 -0
- data/lib/rsmp/node/site/site.rb +21 -35
- data/lib/rsmp/node/supervisor/supervisor.rb +42 -0
- data/lib/rsmp/options/options.rb +21 -9
- data/lib/rsmp/options/schemas/config_common.json +129 -0
- data/lib/rsmp/options/schemas/log.json +71 -0
- data/lib/rsmp/options/schemas/site.json +12 -57
- data/lib/rsmp/options/schemas/supervisor.json +4 -29
- data/lib/rsmp/options/schemas/supervisor_site.json +19 -31
- data/lib/rsmp/options/schemas/traffic_controller_site.json +1 -2
- data/lib/rsmp/options/site_options.rb +31 -23
- data/lib/rsmp/options/supervisor_options.rb +1 -0
- data/lib/rsmp/proxy/modules/receive.rb +3 -1
- data/lib/rsmp/proxy/modules/send.rb +26 -14
- data/lib/rsmp/proxy/proxy.rb +17 -0
- data/lib/rsmp/proxy/site/connection.rb +79 -0
- data/lib/rsmp/proxy/site/modules/commands.rb +24 -1
- data/lib/rsmp/proxy/site/site_proxy.rb +6 -15
- data/lib/rsmp/proxy/supervisor/modules/commands.rb +55 -0
- data/lib/rsmp/proxy/supervisor/modules/message_buffer.rb +0 -5
- data/lib/rsmp/proxy/supervisor/modules/status.rb +13 -104
- data/lib/rsmp/proxy/supervisor/modules/status_updates.rb +148 -0
- data/lib/rsmp/proxy/supervisor/supervisor_proxy.rb +19 -0
- data/lib/rsmp/schema.rb +38 -1
- data/lib/rsmp/tlc/detector_logic.rb +2 -2
- data/lib/rsmp/tlc/modules/helpers.rb +0 -22
- data/lib/rsmp/tlc/modules/inputs.rb +4 -3
- data/lib/rsmp/tlc/modules/modes.rb +2 -2
- data/lib/rsmp/tlc/modules/plans.rb +7 -3
- data/lib/rsmp/tlc/modules/system.rb +1 -1
- data/lib/rsmp/tlc/proxy/control.rb +19 -19
- data/lib/rsmp/tlc/proxy/detectors.rb +3 -3
- data/lib/rsmp/tlc/proxy/io.rb +15 -12
- data/lib/rsmp/tlc/proxy/plans.rb +14 -14
- data/lib/rsmp/tlc/proxy/status.rb +9 -5
- data/lib/rsmp/tlc/proxy/system.rb +12 -6
- data/lib/rsmp/tlc/signal_group.rb +2 -2
- data/lib/rsmp/tlc/supervisor_interface.rb +42 -0
- data/lib/rsmp/tlc/traffic_controller_site.rb +1 -18
- data/lib/rsmp/version.rb +1 -1
- data/lib/rsmp.rb +5 -0
- data/schemas/core/3.1.4/command_response.json +11 -0
- data/schemas/core/3.1.5/command_response.json +11 -0
- data/schemas/core/3.2.0/command_response.json +11 -0
- data/schemas/core/3.2.1/command_response.json +11 -0
- data/schemas/core/3.2.2/command_response.json +11 -0
- data/schemas/core/3.3.0/command_response.json +11 -0
- data/schemas/tlc/1.0.10/alarms/A0008.json +21 -15
- data/schemas/tlc/1.0.10/alarms/A0201.json +26 -20
- data/schemas/tlc/1.0.10/alarms/A0202.json +26 -20
- data/schemas/tlc/1.0.10/alarms/A0301.json +69 -63
- data/schemas/tlc/1.0.10/alarms/A0302.json +87 -81
- data/schemas/tlc/1.0.10/commands/M0001.json +66 -60
- data/schemas/tlc/1.0.10/commands/M0002.json +48 -42
- data/schemas/tlc/1.0.10/commands/M0003.json +48 -42
- data/schemas/tlc/1.0.10/commands/M0004.json +35 -29
- data/schemas/tlc/1.0.10/commands/M0005.json +48 -42
- data/schemas/tlc/1.0.10/commands/M0006.json +48 -42
- data/schemas/tlc/1.0.10/commands/M0007.json +35 -29
- data/schemas/tlc/1.0.10/commands/M0008.json +48 -42
- data/schemas/tlc/1.0.10/commands/M0010.json +35 -29
- data/schemas/tlc/1.0.10/commands/M0011.json +35 -29
- data/schemas/tlc/1.0.10/commands/M0012.json +35 -29
- data/schemas/tlc/1.0.10/commands/M0013.json +35 -29
- data/schemas/tlc/1.0.10/commands/M0019.json +61 -55
- data/schemas/tlc/1.0.10/commands/M0103.json +51 -45
- data/schemas/tlc/1.0.10/commands/M0104.json +100 -94
- data/schemas/tlc/1.0.10/commands/command_requests.json +995 -1
- data/schemas/tlc/1.0.10/defs/guards.json +19 -0
- data/schemas/tlc/1.0.10/sxl.yaml +56 -56
- data/schemas/tlc/1.0.10/sxl_index.json +226 -244
- data/schemas/tlc/1.0.13/alarms/A0008.json +21 -15
- data/schemas/tlc/1.0.13/alarms/A0201.json +26 -20
- data/schemas/tlc/1.0.13/alarms/A0202.json +26 -20
- data/schemas/tlc/1.0.13/alarms/A0301.json +69 -63
- data/schemas/tlc/1.0.13/alarms/A0302.json +87 -81
- data/schemas/tlc/1.0.13/commands/M0001.json +66 -60
- data/schemas/tlc/1.0.13/commands/M0002.json +48 -42
- data/schemas/tlc/1.0.13/commands/M0003.json +48 -42
- data/schemas/tlc/1.0.13/commands/M0004.json +35 -29
- data/schemas/tlc/1.0.13/commands/M0005.json +48 -42
- data/schemas/tlc/1.0.13/commands/M0006.json +48 -42
- data/schemas/tlc/1.0.13/commands/M0007.json +35 -29
- data/schemas/tlc/1.0.13/commands/M0008.json +48 -42
- data/schemas/tlc/1.0.13/commands/M0010.json +35 -29
- data/schemas/tlc/1.0.13/commands/M0011.json +35 -29
- data/schemas/tlc/1.0.13/commands/M0012.json +35 -29
- data/schemas/tlc/1.0.13/commands/M0013.json +35 -29
- data/schemas/tlc/1.0.13/commands/M0014.json +48 -42
- data/schemas/tlc/1.0.13/commands/M0015.json +48 -42
- data/schemas/tlc/1.0.13/commands/M0016.json +35 -29
- data/schemas/tlc/1.0.13/commands/M0017.json +35 -29
- data/schemas/tlc/1.0.13/commands/M0018.json +48 -42
- data/schemas/tlc/1.0.13/commands/M0019.json +61 -55
- data/schemas/tlc/1.0.13/commands/M0103.json +51 -45
- data/schemas/tlc/1.0.13/commands/M0104.json +100 -94
- data/schemas/tlc/1.0.13/commands/command_requests.json +1293 -1
- data/schemas/tlc/1.0.13/defs/guards.json +19 -0
- data/schemas/tlc/1.0.13/sxl.yaml +63 -63
- data/schemas/tlc/1.0.13/sxl_index.json +280 -298
- data/schemas/tlc/1.0.14/alarms/A0008.json +21 -15
- data/schemas/tlc/1.0.14/alarms/A0201.json +26 -20
- data/schemas/tlc/1.0.14/alarms/A0202.json +26 -20
- data/schemas/tlc/1.0.14/alarms/A0301.json +69 -63
- data/schemas/tlc/1.0.14/alarms/A0302.json +87 -81
- data/schemas/tlc/1.0.14/commands/M0001.json +66 -60
- data/schemas/tlc/1.0.14/commands/M0002.json +48 -42
- data/schemas/tlc/1.0.14/commands/M0003.json +48 -42
- data/schemas/tlc/1.0.14/commands/M0004.json +35 -29
- data/schemas/tlc/1.0.14/commands/M0005.json +48 -42
- data/schemas/tlc/1.0.14/commands/M0006.json +48 -42
- data/schemas/tlc/1.0.14/commands/M0007.json +35 -29
- data/schemas/tlc/1.0.14/commands/M0008.json +48 -42
- data/schemas/tlc/1.0.14/commands/M0010.json +35 -29
- data/schemas/tlc/1.0.14/commands/M0011.json +35 -29
- data/schemas/tlc/1.0.14/commands/M0012.json +35 -29
- data/schemas/tlc/1.0.14/commands/M0013.json +35 -29
- data/schemas/tlc/1.0.14/commands/M0014.json +48 -42
- data/schemas/tlc/1.0.14/commands/M0015.json +48 -42
- data/schemas/tlc/1.0.14/commands/M0016.json +35 -29
- data/schemas/tlc/1.0.14/commands/M0017.json +35 -29
- data/schemas/tlc/1.0.14/commands/M0018.json +48 -42
- data/schemas/tlc/1.0.14/commands/M0019.json +61 -55
- data/schemas/tlc/1.0.14/commands/M0103.json +51 -45
- data/schemas/tlc/1.0.14/commands/M0104.json +100 -94
- data/schemas/tlc/1.0.14/commands/command_requests.json +1293 -1
- data/schemas/tlc/1.0.14/defs/guards.json +19 -0
- data/schemas/tlc/1.0.14/sxl.yaml +63 -63
- data/schemas/tlc/1.0.14/sxl_index.json +304 -322
- data/schemas/tlc/1.0.15/alarms/A0008.json +21 -15
- data/schemas/tlc/1.0.15/alarms/A0201.json +26 -20
- data/schemas/tlc/1.0.15/alarms/A0202.json +26 -20
- data/schemas/tlc/1.0.15/alarms/A0301.json +69 -63
- data/schemas/tlc/1.0.15/alarms/A0302.json +87 -81
- data/schemas/tlc/1.0.15/commands/M0001.json +66 -60
- data/schemas/tlc/1.0.15/commands/M0002.json +48 -42
- data/schemas/tlc/1.0.15/commands/M0003.json +48 -42
- data/schemas/tlc/1.0.15/commands/M0004.json +35 -29
- data/schemas/tlc/1.0.15/commands/M0005.json +48 -42
- data/schemas/tlc/1.0.15/commands/M0006.json +48 -42
- data/schemas/tlc/1.0.15/commands/M0007.json +35 -29
- data/schemas/tlc/1.0.15/commands/M0008.json +48 -42
- data/schemas/tlc/1.0.15/commands/M0010.json +35 -29
- data/schemas/tlc/1.0.15/commands/M0011.json +35 -29
- data/schemas/tlc/1.0.15/commands/M0012.json +35 -29
- data/schemas/tlc/1.0.15/commands/M0013.json +35 -29
- data/schemas/tlc/1.0.15/commands/M0014.json +48 -42
- data/schemas/tlc/1.0.15/commands/M0015.json +48 -42
- data/schemas/tlc/1.0.15/commands/M0016.json +35 -29
- data/schemas/tlc/1.0.15/commands/M0017.json +35 -29
- data/schemas/tlc/1.0.15/commands/M0018.json +48 -42
- data/schemas/tlc/1.0.15/commands/M0019.json +61 -55
- data/schemas/tlc/1.0.15/commands/M0020.json +61 -55
- data/schemas/tlc/1.0.15/commands/M0021.json +35 -29
- data/schemas/tlc/1.0.15/commands/M0103.json +51 -45
- data/schemas/tlc/1.0.15/commands/M0104.json +100 -94
- data/schemas/tlc/1.0.15/commands/command_requests.json +1425 -1
- data/schemas/tlc/1.0.15/defs/guards.json +19 -0
- data/schemas/tlc/1.0.15/sxl.yaml +66 -66
- data/schemas/tlc/1.0.15/sxl_index.json +330 -350
- data/schemas/tlc/1.0.7/alarms/A0008.json +21 -15
- data/schemas/tlc/1.0.7/alarms/A0201.json +26 -20
- data/schemas/tlc/1.0.7/alarms/A0202.json +26 -20
- data/schemas/tlc/1.0.7/alarms/A0301.json +69 -63
- data/schemas/tlc/1.0.7/alarms/A0302.json +87 -81
- data/schemas/tlc/1.0.7/commands/M0001.json +66 -60
- data/schemas/tlc/1.0.7/commands/M0002.json +48 -42
- data/schemas/tlc/1.0.7/commands/M0003.json +48 -42
- data/schemas/tlc/1.0.7/commands/M0004.json +35 -29
- data/schemas/tlc/1.0.7/commands/M0005.json +48 -42
- data/schemas/tlc/1.0.7/commands/M0006.json +48 -42
- data/schemas/tlc/1.0.7/commands/M0007.json +35 -29
- data/schemas/tlc/1.0.7/commands/M0008.json +48 -42
- data/schemas/tlc/1.0.7/commands/M0010.json +35 -29
- data/schemas/tlc/1.0.7/commands/M0011.json +35 -29
- data/schemas/tlc/1.0.7/commands/M0019.json +61 -55
- data/schemas/tlc/1.0.7/commands/M0103.json +51 -45
- data/schemas/tlc/1.0.7/commands/M0104.json +100 -94
- data/schemas/tlc/1.0.7/commands/command_requests.json +895 -1
- data/schemas/tlc/1.0.7/defs/guards.json +19 -0
- data/schemas/tlc/1.0.7/sxl.yaml +58 -58
- data/schemas/tlc/1.0.7/sxl_index.json +228 -246
- data/schemas/tlc/1.0.8/alarms/A0008.json +21 -15
- data/schemas/tlc/1.0.8/alarms/A0201.json +26 -20
- data/schemas/tlc/1.0.8/alarms/A0202.json +26 -20
- data/schemas/tlc/1.0.8/alarms/A0301.json +69 -63
- data/schemas/tlc/1.0.8/alarms/A0302.json +87 -81
- data/schemas/tlc/1.0.8/commands/M0001.json +66 -60
- data/schemas/tlc/1.0.8/commands/M0002.json +48 -42
- data/schemas/tlc/1.0.8/commands/M0003.json +48 -42
- data/schemas/tlc/1.0.8/commands/M0004.json +35 -29
- data/schemas/tlc/1.0.8/commands/M0005.json +48 -42
- data/schemas/tlc/1.0.8/commands/M0006.json +48 -42
- data/schemas/tlc/1.0.8/commands/M0007.json +35 -29
- data/schemas/tlc/1.0.8/commands/M0008.json +48 -42
- data/schemas/tlc/1.0.8/commands/M0010.json +35 -29
- data/schemas/tlc/1.0.8/commands/M0011.json +35 -29
- data/schemas/tlc/1.0.8/commands/M0012.json +35 -29
- data/schemas/tlc/1.0.8/commands/M0013.json +35 -29
- data/schemas/tlc/1.0.8/commands/M0019.json +61 -55
- data/schemas/tlc/1.0.8/commands/M0103.json +51 -45
- data/schemas/tlc/1.0.8/commands/M0104.json +100 -94
- data/schemas/tlc/1.0.8/commands/command_requests.json +995 -1
- data/schemas/tlc/1.0.8/defs/guards.json +19 -0
- data/schemas/tlc/1.0.8/sxl.yaml +56 -56
- data/schemas/tlc/1.0.8/sxl_index.json +226 -244
- data/schemas/tlc/1.0.9/alarms/A0008.json +21 -15
- data/schemas/tlc/1.0.9/alarms/A0201.json +26 -20
- data/schemas/tlc/1.0.9/alarms/A0202.json +26 -20
- data/schemas/tlc/1.0.9/alarms/A0301.json +69 -63
- data/schemas/tlc/1.0.9/alarms/A0302.json +87 -81
- data/schemas/tlc/1.0.9/commands/M0001.json +66 -60
- data/schemas/tlc/1.0.9/commands/M0002.json +48 -42
- data/schemas/tlc/1.0.9/commands/M0003.json +48 -42
- data/schemas/tlc/1.0.9/commands/M0004.json +35 -29
- data/schemas/tlc/1.0.9/commands/M0005.json +48 -42
- data/schemas/tlc/1.0.9/commands/M0006.json +48 -42
- data/schemas/tlc/1.0.9/commands/M0007.json +35 -29
- data/schemas/tlc/1.0.9/commands/M0008.json +48 -42
- data/schemas/tlc/1.0.9/commands/M0010.json +35 -29
- data/schemas/tlc/1.0.9/commands/M0011.json +35 -29
- data/schemas/tlc/1.0.9/commands/M0012.json +35 -29
- data/schemas/tlc/1.0.9/commands/M0013.json +35 -29
- data/schemas/tlc/1.0.9/commands/M0019.json +61 -55
- data/schemas/tlc/1.0.9/commands/M0103.json +51 -45
- data/schemas/tlc/1.0.9/commands/M0104.json +100 -94
- data/schemas/tlc/1.0.9/commands/command_requests.json +995 -1
- data/schemas/tlc/1.0.9/defs/guards.json +19 -0
- data/schemas/tlc/1.0.9/sxl.yaml +56 -56
- data/schemas/tlc/1.0.9/sxl_index.json +226 -244
- data/schemas/tlc/1.1.0/alarms/A0007.json +25 -19
- data/schemas/tlc/1.1.0/alarms/A0008.json +21 -15
- data/schemas/tlc/1.1.0/alarms/A0201.json +26 -20
- data/schemas/tlc/1.1.0/alarms/A0202.json +26 -20
- data/schemas/tlc/1.1.0/alarms/A0301.json +69 -63
- data/schemas/tlc/1.1.0/alarms/A0302.json +87 -81
- data/schemas/tlc/1.1.0/alarms/A0303.json +69 -63
- data/schemas/tlc/1.1.0/alarms/A0304.json +87 -81
- data/schemas/tlc/1.1.0/commands/M0001.json +66 -60
- data/schemas/tlc/1.1.0/commands/M0002.json +48 -42
- data/schemas/tlc/1.1.0/commands/M0003.json +48 -42
- data/schemas/tlc/1.1.0/commands/M0004.json +35 -29
- data/schemas/tlc/1.1.0/commands/M0005.json +48 -42
- data/schemas/tlc/1.1.0/commands/M0006.json +48 -42
- data/schemas/tlc/1.1.0/commands/M0007.json +35 -29
- data/schemas/tlc/1.1.0/commands/M0008.json +48 -42
- data/schemas/tlc/1.1.0/commands/M0010.json +35 -29
- data/schemas/tlc/1.1.0/commands/M0011.json +35 -29
- data/schemas/tlc/1.1.0/commands/M0012.json +35 -29
- data/schemas/tlc/1.1.0/commands/M0013.json +35 -29
- data/schemas/tlc/1.1.0/commands/M0014.json +48 -42
- data/schemas/tlc/1.1.0/commands/M0015.json +48 -42
- data/schemas/tlc/1.1.0/commands/M0016.json +35 -29
- data/schemas/tlc/1.1.0/commands/M0017.json +35 -29
- data/schemas/tlc/1.1.0/commands/M0018.json +48 -42
- data/schemas/tlc/1.1.0/commands/M0019.json +61 -55
- data/schemas/tlc/1.1.0/commands/M0020.json +61 -55
- data/schemas/tlc/1.1.0/commands/M0021.json +35 -29
- data/schemas/tlc/1.1.0/commands/M0022.json +194 -188
- data/schemas/tlc/1.1.0/commands/M0023.json +35 -29
- data/schemas/tlc/1.1.0/commands/M0103.json +51 -45
- data/schemas/tlc/1.1.0/commands/M0104.json +100 -94
- data/schemas/tlc/1.1.0/commands/command_requests.json +1525 -1
- data/schemas/tlc/1.1.0/defs/guards.json +19 -0
- data/schemas/tlc/1.1.0/statuses/S0033.json +2 -2
- data/schemas/tlc/1.1.0/sxl.yaml +75 -74
- data/schemas/tlc/1.1.0/sxl_index.json +391 -398
- data/schemas/tlc/1.2.0/alarms/A0007.json +25 -19
- data/schemas/tlc/1.2.0/alarms/A0008.json +21 -15
- data/schemas/tlc/1.2.0/alarms/A0201.json +26 -20
- data/schemas/tlc/1.2.0/alarms/A0202.json +26 -20
- data/schemas/tlc/1.2.0/alarms/A0301.json +69 -63
- data/schemas/tlc/1.2.0/alarms/A0302.json +87 -81
- data/schemas/tlc/1.2.0/alarms/A0303.json +69 -63
- data/schemas/tlc/1.2.0/alarms/A0304.json +87 -81
- data/schemas/tlc/1.2.0/commands/M0001.json +66 -60
- data/schemas/tlc/1.2.0/commands/M0002.json +48 -42
- data/schemas/tlc/1.2.0/commands/M0003.json +48 -42
- data/schemas/tlc/1.2.0/commands/M0004.json +35 -29
- data/schemas/tlc/1.2.0/commands/M0005.json +48 -42
- data/schemas/tlc/1.2.0/commands/M0006.json +48 -42
- data/schemas/tlc/1.2.0/commands/M0007.json +35 -29
- data/schemas/tlc/1.2.0/commands/M0008.json +48 -42
- data/schemas/tlc/1.2.0/commands/M0010.json +35 -29
- data/schemas/tlc/1.2.0/commands/M0011.json +35 -29
- data/schemas/tlc/1.2.0/commands/M0012.json +35 -29
- data/schemas/tlc/1.2.0/commands/M0013.json +35 -29
- data/schemas/tlc/1.2.0/commands/M0014.json +48 -42
- data/schemas/tlc/1.2.0/commands/M0015.json +48 -42
- data/schemas/tlc/1.2.0/commands/M0016.json +35 -29
- data/schemas/tlc/1.2.0/commands/M0017.json +35 -29
- data/schemas/tlc/1.2.0/commands/M0018.json +48 -42
- data/schemas/tlc/1.2.0/commands/M0019.json +61 -55
- data/schemas/tlc/1.2.0/commands/M0020.json +61 -55
- data/schemas/tlc/1.2.0/commands/M0021.json +35 -29
- data/schemas/tlc/1.2.0/commands/M0022.json +194 -188
- data/schemas/tlc/1.2.0/commands/M0023.json +35 -29
- data/schemas/tlc/1.2.0/commands/M0103.json +51 -45
- data/schemas/tlc/1.2.0/commands/M0104.json +100 -94
- data/schemas/tlc/1.2.0/commands/command_requests.json +1525 -1
- data/schemas/tlc/1.2.0/defs/guards.json +19 -0
- data/schemas/tlc/1.2.0/statuses/S0033.json +2 -2
- data/schemas/tlc/1.2.0/sxl.yaml +77 -76
- data/schemas/tlc/1.2.0/sxl_index.json +401 -397
- data/schemas/tlc/1.2.1/alarms/A0007.json +25 -19
- data/schemas/tlc/1.2.1/alarms/A0008.json +21 -15
- data/schemas/tlc/1.2.1/alarms/A0201.json +26 -20
- data/schemas/tlc/1.2.1/alarms/A0202.json +26 -20
- data/schemas/tlc/1.2.1/alarms/A0301.json +69 -63
- data/schemas/tlc/1.2.1/alarms/A0302.json +87 -81
- data/schemas/tlc/1.2.1/alarms/A0303.json +69 -63
- data/schemas/tlc/1.2.1/alarms/A0304.json +87 -81
- data/schemas/tlc/1.2.1/commands/M0001.json +66 -60
- data/schemas/tlc/1.2.1/commands/M0002.json +48 -42
- data/schemas/tlc/1.2.1/commands/M0003.json +48 -42
- data/schemas/tlc/1.2.1/commands/M0004.json +35 -29
- data/schemas/tlc/1.2.1/commands/M0005.json +48 -42
- data/schemas/tlc/1.2.1/commands/M0006.json +48 -42
- data/schemas/tlc/1.2.1/commands/M0007.json +35 -29
- data/schemas/tlc/1.2.1/commands/M0008.json +48 -42
- data/schemas/tlc/1.2.1/commands/M0010.json +35 -29
- data/schemas/tlc/1.2.1/commands/M0011.json +35 -29
- data/schemas/tlc/1.2.1/commands/M0012.json +35 -29
- data/schemas/tlc/1.2.1/commands/M0013.json +35 -29
- data/schemas/tlc/1.2.1/commands/M0014.json +48 -42
- data/schemas/tlc/1.2.1/commands/M0015.json +48 -42
- data/schemas/tlc/1.2.1/commands/M0016.json +35 -29
- data/schemas/tlc/1.2.1/commands/M0017.json +35 -29
- data/schemas/tlc/1.2.1/commands/M0018.json +48 -42
- data/schemas/tlc/1.2.1/commands/M0019.json +61 -55
- data/schemas/tlc/1.2.1/commands/M0020.json +61 -55
- data/schemas/tlc/1.2.1/commands/M0021.json +35 -29
- data/schemas/tlc/1.2.1/commands/M0022.json +194 -188
- data/schemas/tlc/1.2.1/commands/M0023.json +35 -29
- data/schemas/tlc/1.2.1/commands/M0103.json +51 -45
- data/schemas/tlc/1.2.1/commands/M0104.json +100 -94
- data/schemas/tlc/1.2.1/commands/command_requests.json +1525 -1
- data/schemas/tlc/1.2.1/defs/guards.json +19 -0
- data/schemas/tlc/1.2.1/statuses/S0033.json +2 -2
- data/schemas/tlc/1.2.1/sxl.yaml +77 -76
- data/schemas/tlc/1.2.1/sxl_index.json +401 -397
- data/schemas/tlc/1.3.0/alarms/A0007.json +25 -19
- data/schemas/tlc/1.3.0/alarms/A0008.json +21 -15
- data/schemas/tlc/1.3.0/alarms/A0201.json +26 -20
- data/schemas/tlc/1.3.0/alarms/A0202.json +26 -20
- data/schemas/tlc/1.3.0/alarms/A0301.json +69 -63
- data/schemas/tlc/1.3.0/alarms/A0302.json +87 -81
- data/schemas/tlc/1.3.0/alarms/A0303.json +70 -64
- data/schemas/tlc/1.3.0/alarms/A0304.json +88 -82
- data/schemas/tlc/1.3.0/commands/M0001.json +66 -60
- data/schemas/tlc/1.3.0/commands/M0002.json +48 -42
- data/schemas/tlc/1.3.0/commands/M0003.json +48 -42
- data/schemas/tlc/1.3.0/commands/M0004.json +35 -29
- data/schemas/tlc/1.3.0/commands/M0005.json +48 -42
- data/schemas/tlc/1.3.0/commands/M0006.json +48 -42
- data/schemas/tlc/1.3.0/commands/M0007.json +35 -29
- data/schemas/tlc/1.3.0/commands/M0008.json +61 -55
- data/schemas/tlc/1.3.0/commands/M0010.json +35 -29
- data/schemas/tlc/1.3.0/commands/M0011.json +35 -29
- data/schemas/tlc/1.3.0/commands/M0012.json +35 -29
- data/schemas/tlc/1.3.0/commands/M0013.json +36 -30
- data/schemas/tlc/1.3.0/commands/M0014.json +48 -42
- data/schemas/tlc/1.3.0/commands/M0015.json +48 -42
- data/schemas/tlc/1.3.0/commands/M0016.json +35 -29
- data/schemas/tlc/1.3.0/commands/M0017.json +35 -29
- data/schemas/tlc/1.3.0/commands/M0018.json +48 -42
- data/schemas/tlc/1.3.0/commands/M0019.json +61 -55
- data/schemas/tlc/1.3.0/commands/M0020.json +61 -55
- data/schemas/tlc/1.3.0/commands/M0021.json +35 -29
- data/schemas/tlc/1.3.0/commands/M0022.json +195 -189
- data/schemas/tlc/1.3.0/commands/M0023.json +35 -29
- data/schemas/tlc/1.3.0/commands/M0024.json +21 -15
- data/schemas/tlc/1.3.0/commands/M0103.json +51 -45
- data/schemas/tlc/1.3.0/commands/M0104.json +100 -94
- data/schemas/tlc/1.3.0/commands/command_requests.json +1559 -1
- data/schemas/tlc/1.3.0/defs/guards.json +19 -0
- data/schemas/tlc/1.3.0/statuses/S0001.json +4 -4
- data/schemas/tlc/1.3.0/statuses/S0005.json +3 -3
- data/schemas/tlc/1.3.0/statuses/S0006.json +2 -2
- data/schemas/tlc/1.3.0/statuses/S0007.json +1 -1
- data/schemas/tlc/1.3.0/statuses/S0008.json +1 -1
- data/schemas/tlc/1.3.0/statuses/S0009.json +1 -1
- data/schemas/tlc/1.3.0/statuses/S0010.json +1 -1
- data/schemas/tlc/1.3.0/statuses/S0011.json +1 -1
- data/schemas/tlc/1.3.0/statuses/S0012.json +1 -1
- data/schemas/tlc/1.3.0/statuses/S0013.json +1 -1
- data/schemas/tlc/1.3.0/statuses/S0014.json +1 -1
- data/schemas/tlc/1.3.0/statuses/S0015.json +1 -1
- data/schemas/tlc/1.3.0/statuses/S0016.json +1 -1
- data/schemas/tlc/1.3.0/statuses/S0017.json +1 -1
- data/schemas/tlc/1.3.0/statuses/S0019.json +1 -1
- data/schemas/tlc/1.3.0/statuses/S0020.json +1 -1
- data/schemas/tlc/1.3.0/statuses/S0025.json +2 -2
- data/schemas/tlc/1.3.0/statuses/S0027.json +1 -1
- data/schemas/tlc/1.3.0/statuses/S0032.json +2 -2
- data/schemas/tlc/1.3.0/statuses/S0033.json +5 -5
- data/schemas/tlc/1.3.0/statuses/S0034.json +1 -1
- data/schemas/tlc/1.3.0/statuses/S0035.json +1 -1
- data/schemas/tlc/1.3.0/statuses/S0091.json +1 -1
- data/schemas/tlc/1.3.0/statuses/S0092.json +1 -1
- data/schemas/tlc/1.3.0/statuses/S0096.json +6 -6
- data/schemas/tlc/1.3.0/statuses/S0201.json +1 -1
- data/schemas/tlc/1.3.0/statuses/S0202.json +1 -1
- data/schemas/tlc/1.3.0/statuses/S0203.json +1 -1
- data/schemas/tlc/1.3.0/statuses/S0204.json +9 -9
- data/schemas/tlc/1.3.0/statuses/S0205.json +1 -1
- data/schemas/tlc/1.3.0/statuses/S0206.json +1 -1
- data/schemas/tlc/1.3.0/statuses/S0207.json +1 -1
- data/schemas/tlc/1.3.0/statuses/S0208.json +9 -9
- data/schemas/tlc/1.3.0/sxl_index.json +408 -402
- metadata +11 -1
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
module RSMP
|
|
2
|
+
# Connection handling for site instances.
|
|
3
|
+
module SiteConnections
|
|
4
|
+
def build_proxies
|
|
5
|
+
return if server_role?
|
|
6
|
+
|
|
7
|
+
@site_settings['supervisors'].each do |supervisor_settings|
|
|
8
|
+
@proxies << SupervisorProxy.new(supervisor_proxy_options(supervisor_settings))
|
|
9
|
+
end
|
|
10
|
+
end
|
|
11
|
+
|
|
12
|
+
def listen_for_supervisors
|
|
13
|
+
ip = @site_settings['ip'] || '0.0.0.0'
|
|
14
|
+
port = @site_settings['port']
|
|
15
|
+
log "Starting #{site_type_name} listener on #{ip}:#{port}", level: :info, timestamp: @clock.now
|
|
16
|
+
@endpoint = IO::Endpoint.tcp(ip, port)
|
|
17
|
+
@accept_task = Async::Task.current.async do |task|
|
|
18
|
+
task.annotate 'site accept loop'
|
|
19
|
+
accept_supervisor_connections
|
|
20
|
+
end
|
|
21
|
+
|
|
22
|
+
@ready_condition.signal
|
|
23
|
+
@accept_task.wait
|
|
24
|
+
end
|
|
25
|
+
|
|
26
|
+
def accept_supervisor_connections
|
|
27
|
+
@endpoint.accept do |socket|
|
|
28
|
+
accept_supervisor_connection socket
|
|
29
|
+
rescue StandardError => e
|
|
30
|
+
distribute_error e, level: :internal
|
|
31
|
+
end
|
|
32
|
+
rescue Async::Stop
|
|
33
|
+
# Expected during shutdown - no action needed
|
|
34
|
+
rescue StandardError => e
|
|
35
|
+
distribute_error e, level: :internal
|
|
36
|
+
end
|
|
37
|
+
|
|
38
|
+
def accept_supervisor_connection(socket)
|
|
39
|
+
remote_port = socket.remote_address.ip_port
|
|
40
|
+
remote_ip = socket.remote_address.ip_address
|
|
41
|
+
proxy = SupervisorProxy.new(accepted_supervisor_options(socket, remote_ip, remote_port))
|
|
42
|
+
@proxies << proxy
|
|
43
|
+
@proxies_condition.signal
|
|
44
|
+
proxy.start
|
|
45
|
+
proxy.wait
|
|
46
|
+
end
|
|
47
|
+
|
|
48
|
+
def connect_to_supervisor(_task, supervisor_settings)
|
|
49
|
+
proxy = build_proxy(supervisor_proxy_options(supervisor_settings))
|
|
50
|
+
@proxies << proxy
|
|
51
|
+
proxy.start
|
|
52
|
+
@proxies_condition.signal
|
|
53
|
+
end
|
|
54
|
+
|
|
55
|
+
private
|
|
56
|
+
|
|
57
|
+
def supervisor_proxy_options(supervisor_settings)
|
|
58
|
+
{
|
|
59
|
+
site: self,
|
|
60
|
+
task: @task,
|
|
61
|
+
settings: @site_settings,
|
|
62
|
+
ip: supervisor_settings['ip'],
|
|
63
|
+
port: supervisor_settings['port'],
|
|
64
|
+
logger: @logger,
|
|
65
|
+
archive: @archive,
|
|
66
|
+
collect: @collect
|
|
67
|
+
}
|
|
68
|
+
end
|
|
69
|
+
|
|
70
|
+
def accepted_supervisor_options(socket, remote_ip, remote_port)
|
|
71
|
+
stream = IO::Stream::Buffered.new(socket)
|
|
72
|
+
supervisor_proxy_options('ip' => remote_ip, 'port' => remote_port).merge(
|
|
73
|
+
socket: socket,
|
|
74
|
+
stream: stream,
|
|
75
|
+
protocol: RSMP::Protocol.new(stream),
|
|
76
|
+
info: { ip: remote_ip, port: remote_port, hostname: remote_ip, now: Clock.now }
|
|
77
|
+
)
|
|
78
|
+
end
|
|
79
|
+
end
|
|
80
|
+
end
|
data/lib/rsmp/node/site/site.rb
CHANGED
|
@@ -2,8 +2,9 @@ module RSMP
|
|
|
2
2
|
# RSMP site implementation that manages proxies and components.
|
|
3
3
|
class Site < Node
|
|
4
4
|
include Components
|
|
5
|
+
include SiteConnections
|
|
5
6
|
|
|
6
|
-
attr_reader :core_version, :site_settings, :logger, :proxies
|
|
7
|
+
attr_reader :core_version, :site_settings, :logger, :proxies, :ready_condition
|
|
7
8
|
|
|
8
9
|
def self.options_class
|
|
9
10
|
RSMP::Site::Options
|
|
@@ -16,6 +17,7 @@ module RSMP
|
|
|
16
17
|
@proxies = []
|
|
17
18
|
@sleep_condition = Async::Notification.new
|
|
18
19
|
@proxies_condition = Async::Notification.new
|
|
20
|
+
@ready_condition = Async::Notification.new
|
|
19
21
|
build_proxies
|
|
20
22
|
end
|
|
21
23
|
|
|
@@ -35,6 +37,14 @@ module RSMP
|
|
|
35
37
|
@site_settings['site_id']
|
|
36
38
|
end
|
|
37
39
|
|
|
40
|
+
def client_role?
|
|
41
|
+
@site_settings['connection_role'] != 'server'
|
|
42
|
+
end
|
|
43
|
+
|
|
44
|
+
def server_role?
|
|
45
|
+
@site_settings['connection_role'] == 'server'
|
|
46
|
+
end
|
|
47
|
+
|
|
38
48
|
def handle_site_settings(options = {})
|
|
39
49
|
options_class = self.class.options_class
|
|
40
50
|
settings = options[:site_settings] || {}
|
|
@@ -97,22 +107,11 @@ module RSMP
|
|
|
97
107
|
def run
|
|
98
108
|
log_site_starting
|
|
99
109
|
start_status_timer
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
@site_settings['supervisors'].each do |supervisor_settings|
|
|
106
|
-
@proxies << SupervisorProxy.new({
|
|
107
|
-
site: self,
|
|
108
|
-
task: @task,
|
|
109
|
-
settings: @site_settings,
|
|
110
|
-
ip: supervisor_settings['ip'],
|
|
111
|
-
port: supervisor_settings['port'],
|
|
112
|
-
logger: @logger,
|
|
113
|
-
archive: @archive,
|
|
114
|
-
collect: @collect
|
|
115
|
-
})
|
|
110
|
+
if server_role?
|
|
111
|
+
listen_for_supervisors
|
|
112
|
+
else
|
|
113
|
+
@proxies.each(&:start)
|
|
114
|
+
@proxies.each(&:wait)
|
|
116
115
|
end
|
|
117
116
|
end
|
|
118
117
|
|
|
@@ -177,36 +176,23 @@ module RSMP
|
|
|
177
176
|
|
|
178
177
|
def stop_subtasks
|
|
179
178
|
stop_status_timer
|
|
179
|
+
@accept_task&.stop
|
|
180
|
+
@accept_task = nil
|
|
181
|
+
@endpoint = nil
|
|
180
182
|
super
|
|
181
183
|
end
|
|
182
184
|
|
|
183
|
-
def connect_to_supervisor(_task, supervisor_settings)
|
|
184
|
-
proxy = build_proxy({
|
|
185
|
-
site: self,
|
|
186
|
-
task: @task,
|
|
187
|
-
settings: @site_settings,
|
|
188
|
-
ip: supervisor_settings['ip'],
|
|
189
|
-
port: supervisor_settings['port'],
|
|
190
|
-
logger: @logger,
|
|
191
|
-
archive: @archive,
|
|
192
|
-
collect: @collect
|
|
193
|
-
})
|
|
194
|
-
@proxies << proxy
|
|
195
|
-
proxy.start
|
|
196
|
-
@proxies_condition.signal
|
|
197
|
-
end
|
|
198
|
-
|
|
199
185
|
# stop
|
|
200
186
|
def stop
|
|
201
187
|
log "Stopping site #{@site_settings['site_id']}", level: :info
|
|
202
188
|
super
|
|
203
189
|
end
|
|
204
190
|
|
|
205
|
-
def wait_for_supervisor(ip, timeout)
|
|
191
|
+
def wait_for_supervisor(ip, timeout:)
|
|
206
192
|
supervisor = find_supervisor ip
|
|
207
193
|
return supervisor if supervisor
|
|
208
194
|
|
|
209
|
-
wait_for_condition(@
|
|
195
|
+
wait_for_condition(@proxies_condition, timeout: timeout) { find_supervisor ip }
|
|
210
196
|
rescue Async::TimeoutError
|
|
211
197
|
raise RSMP::TimeoutError, "Supervisor '#{ip}' did not connect within #{timeout}s"
|
|
212
198
|
end
|
|
@@ -21,8 +21,18 @@ module RSMP
|
|
|
21
21
|
@supervisor_settings['site_id']
|
|
22
22
|
end
|
|
23
23
|
|
|
24
|
+
def client_role?
|
|
25
|
+
@supervisor_settings['connection_role'] == 'client'
|
|
26
|
+
end
|
|
27
|
+
|
|
28
|
+
def server_role?
|
|
29
|
+
!client_role?
|
|
30
|
+
end
|
|
31
|
+
|
|
24
32
|
# listen for connections
|
|
25
33
|
def run
|
|
34
|
+
return connect_to_sites if client_role?
|
|
35
|
+
|
|
26
36
|
log "Starting supervisor on port #{@supervisor_settings['port']}",
|
|
27
37
|
level: :info,
|
|
28
38
|
timestamp: @clock.now
|
|
@@ -47,6 +57,38 @@ module RSMP
|
|
|
47
57
|
distribute_error e, level: :internal
|
|
48
58
|
end
|
|
49
59
|
|
|
60
|
+
def connect_to_sites
|
|
61
|
+
log 'Starting supervisor in client connection role',
|
|
62
|
+
level: :info,
|
|
63
|
+
timestamp: @clock.now
|
|
64
|
+
build_outbound_proxies
|
|
65
|
+
@ready_condition.signal
|
|
66
|
+
@proxies.each(&:start)
|
|
67
|
+
@proxies.each(&:wait)
|
|
68
|
+
end
|
|
69
|
+
|
|
70
|
+
def build_outbound_proxies
|
|
71
|
+
site_entries = (@supervisor_settings['sites'] || {}).except('default')
|
|
72
|
+
site_entries.each_pair do |site_id, site_settings|
|
|
73
|
+
endpoints = site_settings['supervisors'] || []
|
|
74
|
+
merged_settings = site_id_to_site_setting site_id
|
|
75
|
+
endpoints.each do |endpoint|
|
|
76
|
+
@proxies << SiteProxy.new({
|
|
77
|
+
supervisor: self,
|
|
78
|
+
task: @task,
|
|
79
|
+
settings: @supervisor_settings,
|
|
80
|
+
site_id: site_id,
|
|
81
|
+
site_settings: merged_settings,
|
|
82
|
+
ip: endpoint['ip'],
|
|
83
|
+
port: endpoint['port'],
|
|
84
|
+
logger: @logger,
|
|
85
|
+
archive: @archive,
|
|
86
|
+
collect: @collect
|
|
87
|
+
})
|
|
88
|
+
end
|
|
89
|
+
end
|
|
90
|
+
end
|
|
91
|
+
|
|
50
92
|
# stop
|
|
51
93
|
def stop
|
|
52
94
|
log "Stopping supervisor #{@supervisor_settings['site_id']}", level: :info
|
data/lib/rsmp/options/options.rb
CHANGED
|
@@ -10,6 +10,8 @@ module RSMP
|
|
|
10
10
|
|
|
11
11
|
def self.load_file(path, validate: true)
|
|
12
12
|
raise RSMP::ConfigurationError, "Config #{path} not found" unless File.exist?(path)
|
|
13
|
+
raise RSMP::ConfigurationError, "Config #{path} is not a file" unless File.file?(path)
|
|
14
|
+
raise RSMP::ConfigurationError, "Config #{path} must be a YAML file (.yml or .yaml)" unless yaml_file?(path)
|
|
13
15
|
|
|
14
16
|
raw = YAML.load_file(path)
|
|
15
17
|
raise RSMP::ConfigurationError, "Config #{path} must be a hash" unless raw.is_a?(Hash) || raw.nil?
|
|
@@ -21,27 +23,37 @@ module RSMP
|
|
|
21
23
|
raise RSMP::ConfigurationError, "Cannot read config file #{path}: #{e}"
|
|
22
24
|
end
|
|
23
25
|
|
|
26
|
+
def self.yaml_file?(path)
|
|
27
|
+
%w[.yml .yaml].include?(File.extname(path).downcase)
|
|
28
|
+
end
|
|
29
|
+
|
|
24
30
|
def initialize(options = nil, source: nil, log_settings: nil, validate: true, **extra)
|
|
25
31
|
options = extra if options.nil? && extra.any?
|
|
26
32
|
@source = source
|
|
27
33
|
@log_settings = normalize(log_settings || {})
|
|
34
|
+
validate_log_settings! if validate
|
|
28
35
|
config = normalize_config(options || {})
|
|
29
36
|
validate!(config) if validate
|
|
30
37
|
@data = normalize(apply_defaults(config))
|
|
31
38
|
end
|
|
32
39
|
|
|
33
|
-
def defaults
|
|
34
|
-
{}
|
|
35
|
-
end
|
|
40
|
+
def defaults = {}
|
|
36
41
|
|
|
37
|
-
def schema_file
|
|
38
|
-
|
|
39
|
-
|
|
42
|
+
def schema_file = nil
|
|
43
|
+
|
|
44
|
+
def schema_path = schema_file && File.join(SCHEMAS_PATH, schema_file)
|
|
40
45
|
|
|
41
|
-
def
|
|
42
|
-
return unless schema_file
|
|
46
|
+
def log_schema_path = File.join(SCHEMAS_PATH, 'log.json')
|
|
43
47
|
|
|
44
|
-
|
|
48
|
+
def validate_log_settings!
|
|
49
|
+
return unless File.exist?(log_schema_path)
|
|
50
|
+
|
|
51
|
+
schemer = JSONSchemer.schema(Pathname.new(log_schema_path))
|
|
52
|
+
errors = schemer.validate(@log_settings).to_a
|
|
53
|
+
return if errors.empty?
|
|
54
|
+
|
|
55
|
+
message = errors.map { |error| format_error(error) }.join("\n")
|
|
56
|
+
raise RSMP::ConfigurationError, "Invalid log configuration#{source_suffix}:\n#{message}"
|
|
45
57
|
end
|
|
46
58
|
|
|
47
59
|
def validate!(data = @data)
|
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "config_common.json",
|
|
4
|
+
"$defs": {
|
|
5
|
+
"endpoint": {
|
|
6
|
+
"type": "object",
|
|
7
|
+
"properties": {
|
|
8
|
+
"ip": { "type": "string" },
|
|
9
|
+
"port": { "type": ["integer", "string"] }
|
|
10
|
+
},
|
|
11
|
+
"required": ["ip", "port"],
|
|
12
|
+
"additionalProperties": false
|
|
13
|
+
},
|
|
14
|
+
"intervals": {
|
|
15
|
+
"type": "object",
|
|
16
|
+
"properties": {
|
|
17
|
+
"timer": { "type": "number" },
|
|
18
|
+
"watchdog": { "type": "number" },
|
|
19
|
+
"reconnect": { "type": "number" },
|
|
20
|
+
"after_connect": { "type": "number" }
|
|
21
|
+
},
|
|
22
|
+
"additionalProperties": false
|
|
23
|
+
},
|
|
24
|
+
"timeouts": {
|
|
25
|
+
"type": "object",
|
|
26
|
+
"properties": {
|
|
27
|
+
"connect": { "type": "number" },
|
|
28
|
+
"ready": { "type": "number" },
|
|
29
|
+
"watchdog": { "type": "number" },
|
|
30
|
+
"acknowledgement": { "type": "number" },
|
|
31
|
+
"command": { "type": "number" },
|
|
32
|
+
"command_timeout": { "type": "number" },
|
|
33
|
+
"status_response": { "type": "number" }
|
|
34
|
+
},
|
|
35
|
+
"additionalProperties": false
|
|
36
|
+
},
|
|
37
|
+
"component_settings": {
|
|
38
|
+
"type": ["object", "null"],
|
|
39
|
+
"properties": {
|
|
40
|
+
"name": { "type": "string" },
|
|
41
|
+
"ntsOId": { "type": "string" },
|
|
42
|
+
"xNId": { "type": "string" },
|
|
43
|
+
"type": { "type": "string" }
|
|
44
|
+
},
|
|
45
|
+
"additionalProperties": false
|
|
46
|
+
},
|
|
47
|
+
"components": {
|
|
48
|
+
"type": "object",
|
|
49
|
+
"additionalProperties": {
|
|
50
|
+
"type": ["object", "null"],
|
|
51
|
+
"additionalProperties": { "$ref": "#/$defs/component_settings" }
|
|
52
|
+
}
|
|
53
|
+
},
|
|
54
|
+
"security_codes": {
|
|
55
|
+
"type": "object",
|
|
56
|
+
"additionalProperties": { "type": "string" }
|
|
57
|
+
},
|
|
58
|
+
"signal_plans": {
|
|
59
|
+
"type": "object",
|
|
60
|
+
"additionalProperties": {
|
|
61
|
+
"type": "object",
|
|
62
|
+
"properties": {
|
|
63
|
+
"cycle_time": { "type": "number" },
|
|
64
|
+
"states": {
|
|
65
|
+
"type": "object",
|
|
66
|
+
"additionalProperties": { "type": "string" }
|
|
67
|
+
},
|
|
68
|
+
"dynamic_bands": {
|
|
69
|
+
"type": "object",
|
|
70
|
+
"additionalProperties": { "type": "integer" }
|
|
71
|
+
}
|
|
72
|
+
},
|
|
73
|
+
"additionalProperties": false
|
|
74
|
+
}
|
|
75
|
+
},
|
|
76
|
+
"input_programming_action": {
|
|
77
|
+
"type": ["object", "null"],
|
|
78
|
+
"properties": {
|
|
79
|
+
"raise_alarm": { "type": "string" },
|
|
80
|
+
"component": { "type": "string" }
|
|
81
|
+
},
|
|
82
|
+
"additionalProperties": false
|
|
83
|
+
},
|
|
84
|
+
"inputs": {
|
|
85
|
+
"type": "object",
|
|
86
|
+
"properties": {
|
|
87
|
+
"total": { "type": "integer", "minimum": 1 },
|
|
88
|
+
"programming": {
|
|
89
|
+
"oneOf": [
|
|
90
|
+
{
|
|
91
|
+
"type": "object",
|
|
92
|
+
"additionalProperties": { "$ref": "#/$defs/input_programming_action" }
|
|
93
|
+
},
|
|
94
|
+
{
|
|
95
|
+
"type": "array",
|
|
96
|
+
"items": { "$ref": "#/$defs/input_programming_action" }
|
|
97
|
+
}
|
|
98
|
+
]
|
|
99
|
+
}
|
|
100
|
+
},
|
|
101
|
+
"additionalProperties": false
|
|
102
|
+
},
|
|
103
|
+
"message_buffer": {
|
|
104
|
+
"type": "object",
|
|
105
|
+
"properties": {
|
|
106
|
+
"max_messages": { "type": "integer", "minimum": 1 },
|
|
107
|
+
"statuses": {
|
|
108
|
+
"oneOf": [
|
|
109
|
+
{ "type": "boolean" },
|
|
110
|
+
{
|
|
111
|
+
"type": "array",
|
|
112
|
+
"items": {
|
|
113
|
+
"type": "object",
|
|
114
|
+
"properties": {
|
|
115
|
+
"cId": { "type": "string" },
|
|
116
|
+
"sCI": { "type": "string" },
|
|
117
|
+
"n": { "type": "string" }
|
|
118
|
+
},
|
|
119
|
+
"required": ["sCI"],
|
|
120
|
+
"additionalProperties": false
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
]
|
|
124
|
+
}
|
|
125
|
+
},
|
|
126
|
+
"additionalProperties": false
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
}
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "log.json",
|
|
4
|
+
"$defs": {
|
|
5
|
+
"display_field": {
|
|
6
|
+
"oneOf": [
|
|
7
|
+
{ "type": "boolean" },
|
|
8
|
+
{ "type": "integer", "minimum": 0 },
|
|
9
|
+
{ "type": "string" }
|
|
10
|
+
]
|
|
11
|
+
},
|
|
12
|
+
"message_filter": { "type": "boolean" },
|
|
13
|
+
"style_item": {
|
|
14
|
+
"oneOf": [
|
|
15
|
+
{ "type": "string" },
|
|
16
|
+
{
|
|
17
|
+
"type": "object",
|
|
18
|
+
"properties": {
|
|
19
|
+
"color": { "type": "string" },
|
|
20
|
+
"mode": { "type": "string" }
|
|
21
|
+
},
|
|
22
|
+
"additionalProperties": false
|
|
23
|
+
}
|
|
24
|
+
]
|
|
25
|
+
},
|
|
26
|
+
"style": {
|
|
27
|
+
"oneOf": [
|
|
28
|
+
{ "type": "boolean" },
|
|
29
|
+
{ "type": "string" },
|
|
30
|
+
{
|
|
31
|
+
"type": "object",
|
|
32
|
+
"additionalProperties": { "$ref": "#/$defs/style_item" }
|
|
33
|
+
}
|
|
34
|
+
]
|
|
35
|
+
}
|
|
36
|
+
},
|
|
37
|
+
"type": "object",
|
|
38
|
+
"properties": {
|
|
39
|
+
"active": { "type": "boolean" },
|
|
40
|
+
"path": { "type": ["string", "null"] },
|
|
41
|
+
"stream": {},
|
|
42
|
+
"style": { "$ref": "#/$defs/style" },
|
|
43
|
+
"debug": { "type": "boolean" },
|
|
44
|
+
"info": { "type": "boolean" },
|
|
45
|
+
"statistics": { "type": "boolean" },
|
|
46
|
+
"hide_ip_and_port": { "type": "boolean" },
|
|
47
|
+
"acknowledgements": { "type": "boolean" },
|
|
48
|
+
"watchdogs": { "$ref": "#/$defs/message_filter" },
|
|
49
|
+
"alarms": { "$ref": "#/$defs/message_filter" },
|
|
50
|
+
"versions": { "$ref": "#/$defs/message_filter" },
|
|
51
|
+
"statuses": { "$ref": "#/$defs/message_filter" },
|
|
52
|
+
"commands": { "$ref": "#/$defs/message_filter" },
|
|
53
|
+
"aggregated_status": { "$ref": "#/$defs/message_filter" },
|
|
54
|
+
"tabs": { "type": ["string", "boolean", "null"] },
|
|
55
|
+
"prefix": { "$ref": "#/$defs/display_field" },
|
|
56
|
+
"index": { "$ref": "#/$defs/display_field" },
|
|
57
|
+
"author": { "$ref": "#/$defs/display_field" },
|
|
58
|
+
"timestamp": { "$ref": "#/$defs/display_field" },
|
|
59
|
+
"ip": { "$ref": "#/$defs/display_field" },
|
|
60
|
+
"port": { "$ref": "#/$defs/display_field" },
|
|
61
|
+
"site_id": { "$ref": "#/$defs/display_field" },
|
|
62
|
+
"component": { "$ref": "#/$defs/display_field" },
|
|
63
|
+
"direction": { "$ref": "#/$defs/display_field" },
|
|
64
|
+
"level": { "$ref": "#/$defs/display_field" },
|
|
65
|
+
"id": { "$ref": "#/$defs/display_field" },
|
|
66
|
+
"text": { "$ref": "#/$defs/display_field" },
|
|
67
|
+
"json": { "$ref": "#/$defs/display_field" },
|
|
68
|
+
"exception": { "$ref": "#/$defs/display_field" }
|
|
69
|
+
},
|
|
70
|
+
"additionalProperties": false
|
|
71
|
+
}
|
|
@@ -5,17 +5,12 @@
|
|
|
5
5
|
"properties": {
|
|
6
6
|
"site_id": { "type": "string" },
|
|
7
7
|
"type": { "type": "string" },
|
|
8
|
+
"connection_role": { "enum": ["client", "server"] },
|
|
9
|
+
"ip": { "type": "string" },
|
|
10
|
+
"port": { "type": ["integer", "string"] },
|
|
8
11
|
"supervisors": {
|
|
9
12
|
"type": "array",
|
|
10
|
-
"items": {
|
|
11
|
-
"type": "object",
|
|
12
|
-
"properties": {
|
|
13
|
-
"ip": { "type": "string" },
|
|
14
|
-
"port": { "type": ["integer", "string"] }
|
|
15
|
-
},
|
|
16
|
-
"required": ["ip", "port"],
|
|
17
|
-
"additionalProperties": true
|
|
18
|
-
}
|
|
13
|
+
"items": { "$ref": "config_common.json#/$defs/endpoint" }
|
|
19
14
|
},
|
|
20
15
|
"sxls": {
|
|
21
16
|
"type": "object",
|
|
@@ -23,56 +18,16 @@
|
|
|
23
18
|
"additionalProperties": { "type": "string" }
|
|
24
19
|
},
|
|
25
20
|
"core_version": { "type": "string" },
|
|
26
|
-
"intervals": {
|
|
27
|
-
|
|
28
|
-
"properties": {
|
|
29
|
-
"timer": { "type": "number" },
|
|
30
|
-
"watchdog": { "type": "number" },
|
|
31
|
-
"reconnect": { "type": "number" }
|
|
32
|
-
},
|
|
33
|
-
"additionalProperties": true
|
|
34
|
-
},
|
|
35
|
-
"timeouts": {
|
|
36
|
-
"type": "object",
|
|
37
|
-
"properties": {
|
|
38
|
-
"watchdog": { "type": "number" },
|
|
39
|
-
"acknowledgement": { "type": "number" }
|
|
40
|
-
},
|
|
41
|
-
"additionalProperties": true
|
|
42
|
-
},
|
|
21
|
+
"intervals": { "$ref": "config_common.json#/$defs/intervals" },
|
|
22
|
+
"timeouts": { "$ref": "config_common.json#/$defs/timeouts" },
|
|
43
23
|
"send_after_connect": { "type": "boolean" },
|
|
44
|
-
"message_buffer": {
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
"enabled": { "type": "boolean" },
|
|
48
|
-
"max_messages": { "type": "integer", "minimum": 1 },
|
|
49
|
-
"statuses": {
|
|
50
|
-
"oneOf": [
|
|
51
|
-
{ "type": "boolean" },
|
|
52
|
-
{
|
|
53
|
-
"type": "array",
|
|
54
|
-
"items": {
|
|
55
|
-
"type": "object",
|
|
56
|
-
"properties": {
|
|
57
|
-
"cId": { "type": "string" },
|
|
58
|
-
"sCI": { "type": "string" },
|
|
59
|
-
"n": { "type": "string" }
|
|
60
|
-
},
|
|
61
|
-
"required": ["sCI"],
|
|
62
|
-
"additionalProperties": false
|
|
63
|
-
}
|
|
64
|
-
}
|
|
65
|
-
]
|
|
66
|
-
}
|
|
67
|
-
},
|
|
68
|
-
"additionalProperties": false
|
|
69
|
-
},
|
|
70
|
-
"components": { "type": "object" },
|
|
71
|
-
"security_codes": { "type": "object" },
|
|
24
|
+
"message_buffer": { "$ref": "config_common.json#/$defs/message_buffer" },
|
|
25
|
+
"components": { "$ref": "config_common.json#/$defs/components" },
|
|
26
|
+
"security_codes": { "$ref": "config_common.json#/$defs/security_codes" },
|
|
72
27
|
"startup_sequence": { "type": "string" },
|
|
73
|
-
"signal_plans": { "
|
|
74
|
-
"inputs": { "
|
|
28
|
+
"signal_plans": { "$ref": "config_common.json#/$defs/signal_plans" },
|
|
29
|
+
"inputs": { "$ref": "config_common.json#/$defs/inputs" },
|
|
75
30
|
"live_output": { "type": ["string", "null"] }
|
|
76
31
|
},
|
|
77
|
-
"additionalProperties":
|
|
32
|
+
"additionalProperties": false
|
|
78
33
|
}
|
|
@@ -4,6 +4,8 @@
|
|
|
4
4
|
"properties": {
|
|
5
5
|
"port": { "type": ["integer", "string"] },
|
|
6
6
|
"ip": { "type": "string" },
|
|
7
|
+
"connection_role": { "enum": ["client", "server"] },
|
|
8
|
+
"proxy_type": { "type": "string" },
|
|
7
9
|
"ips": {
|
|
8
10
|
"oneOf": [
|
|
9
11
|
{ "type": "string" },
|
|
@@ -12,38 +14,11 @@
|
|
|
12
14
|
},
|
|
13
15
|
"site_id": { "type": "string" },
|
|
14
16
|
"max_sites": { "type": "integer" },
|
|
15
|
-
"default": {
|
|
16
|
-
"type": "object",
|
|
17
|
-
"properties": {
|
|
18
|
-
"sxls": {
|
|
19
|
-
"type": "object",
|
|
20
|
-
"propertyNames": { "not": { "const": "core" } },
|
|
21
|
-
"additionalProperties": { "type": "string" }
|
|
22
|
-
},
|
|
23
|
-
"core_version": { "type": "string" },
|
|
24
|
-
"intervals": {
|
|
25
|
-
"type": "object",
|
|
26
|
-
"properties": {
|
|
27
|
-
"timer": { "type": "number" },
|
|
28
|
-
"watchdog": { "type": "number" }
|
|
29
|
-
},
|
|
30
|
-
"additionalProperties": true
|
|
31
|
-
},
|
|
32
|
-
"timeouts": {
|
|
33
|
-
"type": "object",
|
|
34
|
-
"properties": {
|
|
35
|
-
"watchdog": { "type": "number" },
|
|
36
|
-
"acknowledgement": { "type": "number" }
|
|
37
|
-
},
|
|
38
|
-
"additionalProperties": true
|
|
39
|
-
}
|
|
40
|
-
},
|
|
41
|
-
"additionalProperties": true
|
|
42
|
-
},
|
|
17
|
+
"default": { "$ref": "supervisor_site.json" },
|
|
43
18
|
"sites": {
|
|
44
19
|
"type": "object",
|
|
45
20
|
"additionalProperties": { "$ref": "supervisor_site.json" }
|
|
46
21
|
}
|
|
47
22
|
},
|
|
48
|
-
"additionalProperties":
|
|
23
|
+
"additionalProperties": false
|
|
49
24
|
}
|