rsmp 0.47.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 +10 -0
- data/Gemfile.lock +5 -5
- data/README.md +3 -1
- data/documentation/cli.md +225 -0
- data/documentation/configuration.md +57 -0
- data/lib/rsmp/cli/configuration.rb +30 -0
- data/lib/rsmp/cli.rb +18 -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/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/schemas/site.json +3 -0
- data/lib/rsmp/options/schemas/supervisor.json +1 -0
- data/lib/rsmp/options/site_options.rb +30 -21
- 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/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 +4 -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 +8 -1
data/lib/rsmp/tlc/proxy/io.rb
CHANGED
|
@@ -15,7 +15,7 @@ module RSMP
|
|
|
15
15
|
'cCI' => 'M0006',
|
|
16
16
|
'cO' => 'setInput',
|
|
17
17
|
'n' => 'status',
|
|
18
|
-
'v' => status
|
|
18
|
+
'v' => command_value('M0006', 'status', status)
|
|
19
19
|
}, {
|
|
20
20
|
'cCI' => 'M0006',
|
|
21
21
|
'cO' => 'setInput',
|
|
@@ -25,7 +25,7 @@ module RSMP
|
|
|
25
25
|
'cCI' => 'M0006',
|
|
26
26
|
'cO' => 'setInput',
|
|
27
27
|
'n' => 'input',
|
|
28
|
-
'v' => input
|
|
28
|
+
'v' => command_value('M0006', 'input', input)
|
|
29
29
|
}]
|
|
30
30
|
send_command_and_collect(command_list, within: within).ok!
|
|
31
31
|
end
|
|
@@ -41,7 +41,7 @@ module RSMP
|
|
|
41
41
|
'cCI' => 'M0013',
|
|
42
42
|
'cO' => 'setInput',
|
|
43
43
|
'n' => 'status',
|
|
44
|
-
'v' => status
|
|
44
|
+
'v' => command_value('M0013', 'status', status)
|
|
45
45
|
}, {
|
|
46
46
|
'cCI' => 'M0013',
|
|
47
47
|
'cO' => 'setInput',
|
|
@@ -73,7 +73,7 @@ module RSMP
|
|
|
73
73
|
'cCI' => 'M0020',
|
|
74
74
|
'cO' => 'setOutput',
|
|
75
75
|
'n' => 'status',
|
|
76
|
-
'v' => status
|
|
76
|
+
'v' => command_value('M0020', 'status', status)
|
|
77
77
|
}, {
|
|
78
78
|
'cCI' => 'M0020',
|
|
79
79
|
'cO' => 'setOutput',
|
|
@@ -83,12 +83,12 @@ module RSMP
|
|
|
83
83
|
'cCI' => 'M0020',
|
|
84
84
|
'cO' => 'setOutput',
|
|
85
85
|
'n' => 'output',
|
|
86
|
-
'v' => output
|
|
86
|
+
'v' => command_value('M0020', 'output', output)
|
|
87
87
|
}, {
|
|
88
88
|
'cCI' => 'M0020',
|
|
89
89
|
'cO' => 'setOutput',
|
|
90
90
|
'n' => 'outputValue',
|
|
91
|
-
'v' => value
|
|
91
|
+
'v' => command_value('M0020', 'outputValue', value)
|
|
92
92
|
}]
|
|
93
93
|
send_command_and_collect(command_list, within: within).ok!
|
|
94
94
|
end
|
|
@@ -98,10 +98,13 @@ module RSMP
|
|
|
98
98
|
def force_input_command_list(input, status, value)
|
|
99
99
|
security_code = security_code_for(2)
|
|
100
100
|
[
|
|
101
|
-
{ 'cCI' => 'M0019', 'cO' => 'setInput', 'n' => 'status',
|
|
101
|
+
{ 'cCI' => 'M0019', 'cO' => 'setInput', 'n' => 'status',
|
|
102
|
+
'v' => command_value('M0019', 'status', status) },
|
|
102
103
|
{ 'cCI' => 'M0019', 'cO' => 'setInput', 'n' => 'securityCode', 'v' => security_code.to_s },
|
|
103
|
-
{ 'cCI' => 'M0019', 'cO' => 'setInput', 'n' => 'input',
|
|
104
|
-
|
|
104
|
+
{ 'cCI' => 'M0019', 'cO' => 'setInput', 'n' => 'input',
|
|
105
|
+
'v' => command_value('M0019', 'input', input) },
|
|
106
|
+
{ 'cCI' => 'M0019', 'cO' => 'setInput', 'n' => 'inputValue',
|
|
107
|
+
'v' => command_value('M0019', 'inputValue', value) }
|
|
105
108
|
]
|
|
106
109
|
end
|
|
107
110
|
|
|
@@ -110,11 +113,11 @@ module RSMP
|
|
|
110
113
|
# S0029 is used to check the forced status, but is only available from sxl 1.0.13
|
|
111
114
|
if RSMP::Proxy.version_meets_requirement?(sxl_version, '>=1.0.13')
|
|
112
115
|
result << { 'sCI' => 'S0029', 'n' => 'status',
|
|
113
|
-
's' => /^.{#{input.to_i - 1}}#{status
|
|
116
|
+
's' => /^.{#{input.to_i - 1}}#{boolean_value(status) ? '1' : '0'}/ }
|
|
114
117
|
end
|
|
115
|
-
if status
|
|
118
|
+
if boolean_value(status)
|
|
116
119
|
result << { 'sCI' => 'S0003', 'n' => 'inputstatus',
|
|
117
|
-
's' => /^.{#{input.to_i - 1}}#{value
|
|
120
|
+
's' => /^.{#{input.to_i - 1}}#{boolean_value(value) ? '1' : '0'}/ }
|
|
118
121
|
end
|
|
119
122
|
result
|
|
120
123
|
end
|
data/lib/rsmp/tlc/proxy/plans.rb
CHANGED
|
@@ -15,7 +15,7 @@ module RSMP
|
|
|
15
15
|
'cCI' => 'M0014',
|
|
16
16
|
'cO' => 'setCommands',
|
|
17
17
|
'n' => 'status',
|
|
18
|
-
'v' => status
|
|
18
|
+
'v' => command_value('M0014', 'status', status)
|
|
19
19
|
}, {
|
|
20
20
|
'cCI' => 'M0014',
|
|
21
21
|
'cO' => 'setCommands',
|
|
@@ -25,7 +25,7 @@ module RSMP
|
|
|
25
25
|
'cCI' => 'M0014',
|
|
26
26
|
'cO' => 'setCommands',
|
|
27
27
|
'n' => 'plan',
|
|
28
|
-
'v' => plan
|
|
28
|
+
'v' => command_value('M0014', 'plan', plan)
|
|
29
29
|
}]
|
|
30
30
|
send_command_and_collect(command_list, within: within).ok!
|
|
31
31
|
end
|
|
@@ -41,7 +41,7 @@ module RSMP
|
|
|
41
41
|
'cCI' => 'M0023',
|
|
42
42
|
'cO' => 'setTimeout',
|
|
43
43
|
'n' => 'status',
|
|
44
|
-
'v' => status
|
|
44
|
+
'v' => command_value('M0023', 'status', status)
|
|
45
45
|
}, {
|
|
46
46
|
'cCI' => 'M0023',
|
|
47
47
|
'cO' => 'setTimeout',
|
|
@@ -62,7 +62,7 @@ module RSMP
|
|
|
62
62
|
'cCI' => 'M0015',
|
|
63
63
|
'cO' => 'setOffset',
|
|
64
64
|
'n' => 'status',
|
|
65
|
-
'v' => offset
|
|
65
|
+
'v' => command_value('M0015', 'status', offset)
|
|
66
66
|
}, {
|
|
67
67
|
'cCI' => 'M0015',
|
|
68
68
|
'cO' => 'setOffset',
|
|
@@ -72,7 +72,7 @@ module RSMP
|
|
|
72
72
|
'cCI' => 'M0015',
|
|
73
73
|
'cO' => 'setOffset',
|
|
74
74
|
'n' => 'plan',
|
|
75
|
-
'v' => plan
|
|
75
|
+
'v' => command_value('M0015', 'plan', plan)
|
|
76
76
|
}]
|
|
77
77
|
send_command_and_collect(command_list, within: within).ok!
|
|
78
78
|
end
|
|
@@ -88,7 +88,7 @@ module RSMP
|
|
|
88
88
|
'cCI' => 'M0002',
|
|
89
89
|
'cO' => 'setPlan',
|
|
90
90
|
'n' => 'status',
|
|
91
|
-
'v' => '
|
|
91
|
+
'v' => command_value('M0002', 'status', true)
|
|
92
92
|
}, {
|
|
93
93
|
'cCI' => 'M0002',
|
|
94
94
|
'cO' => 'setPlan',
|
|
@@ -98,9 +98,9 @@ module RSMP
|
|
|
98
98
|
'cCI' => 'M0002',
|
|
99
99
|
'cO' => 'setPlan',
|
|
100
100
|
'n' => 'timeplan',
|
|
101
|
-
'v' => plan_nr
|
|
101
|
+
'v' => command_value('M0002', 'timeplan', plan_nr)
|
|
102
102
|
}]
|
|
103
|
-
confirm_status = [{ 'sCI' => 'S0014', 'n' => 'status', 's' => plan_nr
|
|
103
|
+
confirm_status = [{ 'sCI' => 'S0014', 'n' => 'status', 's' => integer_value(plan_nr) }]
|
|
104
104
|
send_command_and_collect(command_list, within: within).ok!
|
|
105
105
|
wait_for_status("timeplan #{plan_nr}", confirm_status, timeout: within)
|
|
106
106
|
end
|
|
@@ -116,7 +116,7 @@ module RSMP
|
|
|
116
116
|
'cCI' => 'M0016',
|
|
117
117
|
'cO' => 'setWeekTable',
|
|
118
118
|
'n' => 'status',
|
|
119
|
-
'v' => status
|
|
119
|
+
'v' => command_value('M0016', 'status', status)
|
|
120
120
|
}, {
|
|
121
121
|
'cCI' => 'M0016',
|
|
122
122
|
'cO' => 'setWeekTable',
|
|
@@ -137,7 +137,7 @@ module RSMP
|
|
|
137
137
|
'cCI' => 'M0017',
|
|
138
138
|
'cO' => 'setTimeTable',
|
|
139
139
|
'n' => 'status',
|
|
140
|
-
'v' => status
|
|
140
|
+
'v' => command_value('M0017', 'status', status)
|
|
141
141
|
}, {
|
|
142
142
|
'cCI' => 'M0017',
|
|
143
143
|
'cO' => 'setTimeTable',
|
|
@@ -158,7 +158,7 @@ module RSMP
|
|
|
158
158
|
'cCI' => 'M0018',
|
|
159
159
|
'cO' => 'setCycleTime',
|
|
160
160
|
'n' => 'status',
|
|
161
|
-
'v' => cycle_time
|
|
161
|
+
'v' => command_value('M0018', 'status', cycle_time)
|
|
162
162
|
}, {
|
|
163
163
|
'cCI' => 'M0018',
|
|
164
164
|
'cO' => 'setCycleTime',
|
|
@@ -168,7 +168,7 @@ module RSMP
|
|
|
168
168
|
'cCI' => 'M0018',
|
|
169
169
|
'cO' => 'setCycleTime',
|
|
170
170
|
'n' => 'plan',
|
|
171
|
-
'v' => plan
|
|
171
|
+
'v' => command_value('M0018', 'plan', plan)
|
|
172
172
|
}]
|
|
173
173
|
send_command_and_collect(command_list, within:).ok!
|
|
174
174
|
end
|
|
@@ -183,7 +183,7 @@ module RSMP
|
|
|
183
183
|
'cCI' => 'M0010',
|
|
184
184
|
'cO' => 'setStart',
|
|
185
185
|
'n' => 'status',
|
|
186
|
-
'v' => '
|
|
186
|
+
'v' => command_value('M0010', 'status', true)
|
|
187
187
|
}, {
|
|
188
188
|
'cCI' => 'M0010',
|
|
189
189
|
'cO' => 'setStart',
|
|
@@ -203,7 +203,7 @@ module RSMP
|
|
|
203
203
|
'cCI' => 'M0011',
|
|
204
204
|
'cO' => 'setStop',
|
|
205
205
|
'n' => 'status',
|
|
206
|
-
'v' => '
|
|
206
|
+
'v' => command_value('M0011', 'status', true)
|
|
207
207
|
}, {
|
|
208
208
|
'cCI' => 'M0011',
|
|
209
209
|
'cO' => 'setStop',
|
|
@@ -58,9 +58,9 @@ module RSMP
|
|
|
58
58
|
wait_for_status(
|
|
59
59
|
'normal control on, yellow flash off, startup mode off',
|
|
60
60
|
[
|
|
61
|
-
{ 'sCI' => 'S0007', 'n' => 'status', 's' =>
|
|
62
|
-
{ 'sCI' => 'S0011', 'n' => 'status', 's' =>
|
|
63
|
-
{ 'sCI' => 'S0005', 'n' => 'status', 's' =>
|
|
61
|
+
{ 'sCI' => 'S0007', 'n' => 'status', 's' => [true] },
|
|
62
|
+
{ 'sCI' => 'S0011', 'n' => 'status', 's' => [false] },
|
|
63
|
+
{ 'sCI' => 'S0005', 'n' => 'status', 's' => false }
|
|
64
64
|
],
|
|
65
65
|
timeout: timeout
|
|
66
66
|
)
|
|
@@ -73,7 +73,7 @@ module RSMP
|
|
|
73
73
|
timeout = options[:timeout] || @timeouts['status_response']
|
|
74
74
|
collector = request_status_and_collect({ S0028: [:status] }, within: timeout)
|
|
75
75
|
collector.ok!
|
|
76
|
-
collector.messages.first.attributes['sS'].first['s']
|
|
76
|
+
status_items(collector.messages.first.attributes['sS'].first['s']).to_h do |item|
|
|
77
77
|
item.split('-').map(&:to_i)
|
|
78
78
|
end
|
|
79
79
|
end
|
|
@@ -101,12 +101,16 @@ module RSMP
|
|
|
101
101
|
private
|
|
102
102
|
|
|
103
103
|
def extract_band_value(collector, plan, band)
|
|
104
|
-
collector.messages.first.attributes['sS'].first['s']
|
|
104
|
+
status_items(collector.messages.first.attributes['sS'].first['s']).each do |item|
|
|
105
105
|
some_plan, some_band, value = item.split('-')
|
|
106
106
|
return value.to_i if some_plan.to_i == plan.to_i && some_band.to_i == band.to_i
|
|
107
107
|
end
|
|
108
108
|
nil
|
|
109
109
|
end
|
|
110
|
+
|
|
111
|
+
def status_items(status)
|
|
112
|
+
status.is_a?(Array) ? status : status.split(',')
|
|
113
|
+
end
|
|
110
114
|
end
|
|
111
115
|
end
|
|
112
116
|
end
|
|
@@ -43,12 +43,18 @@ module RSMP
|
|
|
43
43
|
security_code = security_code_for(1)
|
|
44
44
|
[
|
|
45
45
|
{ 'cCI' => 'M0104', 'cO' => 'setDate', 'n' => 'securityCode', 'v' => security_code.to_s },
|
|
46
|
-
{ 'cCI' => 'M0104', 'cO' => 'setDate', 'n' => 'year',
|
|
47
|
-
|
|
48
|
-
{ 'cCI' => 'M0104', 'cO' => 'setDate', 'n' => '
|
|
49
|
-
|
|
50
|
-
{ 'cCI' => 'M0104', 'cO' => 'setDate', 'n' => '
|
|
51
|
-
|
|
46
|
+
{ 'cCI' => 'M0104', 'cO' => 'setDate', 'n' => 'year',
|
|
47
|
+
'v' => command_value('M0104', 'year', clock.year) },
|
|
48
|
+
{ 'cCI' => 'M0104', 'cO' => 'setDate', 'n' => 'month',
|
|
49
|
+
'v' => command_value('M0104', 'month', clock.month) },
|
|
50
|
+
{ 'cCI' => 'M0104', 'cO' => 'setDate', 'n' => 'day',
|
|
51
|
+
'v' => command_value('M0104', 'day', clock.day) },
|
|
52
|
+
{ 'cCI' => 'M0104', 'cO' => 'setDate', 'n' => 'hour',
|
|
53
|
+
'v' => command_value('M0104', 'hour', clock.hour) },
|
|
54
|
+
{ 'cCI' => 'M0104', 'cO' => 'setDate', 'n' => 'minute',
|
|
55
|
+
'v' => command_value('M0104', 'minute', clock.min) },
|
|
56
|
+
{ 'cCI' => 'M0104', 'cO' => 'setDate', 'n' => 'second',
|
|
57
|
+
'v' => command_value('M0104', 'second', clock.sec) }
|
|
52
58
|
]
|
|
53
59
|
end
|
|
54
60
|
end
|
|
@@ -56,7 +56,7 @@ module RSMP
|
|
|
56
56
|
# Start of signal group. Orders a signal group to green
|
|
57
57
|
def handle_m0010(arg, _options = {})
|
|
58
58
|
@node.verify_security_code 2, arg['securityCode']
|
|
59
|
-
return unless
|
|
59
|
+
return unless arg['status']
|
|
60
60
|
|
|
61
61
|
log "Start signal group #{c_id}, go to green", level: :info
|
|
62
62
|
end
|
|
@@ -64,7 +64,7 @@ module RSMP
|
|
|
64
64
|
# Stop of signal group. Orders a signal group to red
|
|
65
65
|
def handle_m0011(arg, _options = {})
|
|
66
66
|
@node.verify_security_code 2, arg['securityCode']
|
|
67
|
-
return unless
|
|
67
|
+
return unless arg['status']
|
|
68
68
|
|
|
69
69
|
log "Stop signal group #{c_id}, go to red", level: :info
|
|
70
70
|
end
|
|
@@ -77,6 +77,48 @@ module RSMP
|
|
|
77
77
|
code
|
|
78
78
|
end
|
|
79
79
|
|
|
80
|
+
def boolean_value(value)
|
|
81
|
+
case value
|
|
82
|
+
when true, 'True'
|
|
83
|
+
true
|
|
84
|
+
when false, 'False'
|
|
85
|
+
false
|
|
86
|
+
else
|
|
87
|
+
value
|
|
88
|
+
end
|
|
89
|
+
end
|
|
90
|
+
|
|
91
|
+
def integer_value(value)
|
|
92
|
+
return value.to_i if value.is_a?(String) && value.match?(/\A[+-]?\d+\z/)
|
|
93
|
+
|
|
94
|
+
value
|
|
95
|
+
end
|
|
96
|
+
|
|
97
|
+
def list_value(value)
|
|
98
|
+
value.is_a?(Array) ? value : value.to_s.split(',')
|
|
99
|
+
end
|
|
100
|
+
|
|
101
|
+
def command_value(command_code, argument_name, value)
|
|
102
|
+
descriptor = RSMP::Schema.sxl_argument_descriptor(name, sxl_version, :commands, command_code, argument_name)
|
|
103
|
+
normalize_command_value(value, descriptor)
|
|
104
|
+
end
|
|
105
|
+
|
|
106
|
+
def normalize_command_value(value, descriptor)
|
|
107
|
+
type = descriptor.is_a?(Hash) ? descriptor['type'] : descriptor.to_s
|
|
108
|
+
case type
|
|
109
|
+
when 'boolean', 'boolean_as_string'
|
|
110
|
+
boolean_value(value)
|
|
111
|
+
when 'integer', 'integer_as_string', 'long_as_string'
|
|
112
|
+
integer_value(value)
|
|
113
|
+
when /_list(_as_string)?\z/
|
|
114
|
+
list_value(value)
|
|
115
|
+
when 'string', 'base64', 'timestamp'
|
|
116
|
+
value.to_s
|
|
117
|
+
else
|
|
118
|
+
value
|
|
119
|
+
end
|
|
120
|
+
end
|
|
121
|
+
|
|
80
122
|
def cache_status_item(item)
|
|
81
123
|
case item['sCI']
|
|
82
124
|
when 'S0007' then @functional_position = item['s'] if item['n'] == 'status'
|
|
@@ -147,25 +147,8 @@ module RSMP
|
|
|
147
147
|
@security_codes[level] = new_code
|
|
148
148
|
end
|
|
149
149
|
|
|
150
|
-
def self.to_rmsp_bool(bool)
|
|
151
|
-
if bool
|
|
152
|
-
'True'
|
|
153
|
-
else
|
|
154
|
-
'False'
|
|
155
|
-
end
|
|
156
|
-
end
|
|
157
|
-
|
|
158
|
-
def self.from_rsmp_bool?(str)
|
|
159
|
-
str == 'True'
|
|
160
|
-
end
|
|
161
|
-
|
|
162
150
|
def self.make_status(value, quality = 'recent')
|
|
163
|
-
|
|
164
|
-
when true, false
|
|
165
|
-
[to_rmsp_bool(value), quality]
|
|
166
|
-
else
|
|
167
|
-
[value, quality]
|
|
168
|
-
end
|
|
151
|
+
[value, quality]
|
|
169
152
|
end
|
|
170
153
|
|
|
171
154
|
def do_deferred(key, _item = nil)
|
data/lib/rsmp/version.rb
CHANGED
data/lib/rsmp.rb
CHANGED
|
@@ -25,6 +25,7 @@ require_relative 'rsmp/log/archive'
|
|
|
25
25
|
require_relative 'rsmp/log/filtering'
|
|
26
26
|
require_relative 'rsmp/log/colorization'
|
|
27
27
|
require_relative 'rsmp/log/logger'
|
|
28
|
+
require_relative 'rsmp/message/sxl_codec'
|
|
28
29
|
require_relative 'rsmp/message'
|
|
29
30
|
require_relative 'rsmp/component/components'
|
|
30
31
|
require_relative 'rsmp/component/alarm_state'
|
|
@@ -52,6 +53,7 @@ require_relative 'rsmp/collect/ack_collector'
|
|
|
52
53
|
require_relative 'rsmp/node/protocol'
|
|
53
54
|
require_relative 'rsmp/node/task'
|
|
54
55
|
require_relative 'rsmp/node/node'
|
|
56
|
+
require_relative 'rsmp/node/site/connections'
|
|
55
57
|
require_relative 'rsmp/node/site/site'
|
|
56
58
|
require_relative 'rsmp/node/supervisor/modules/configuration'
|
|
57
59
|
require_relative 'rsmp/node/supervisor/modules/connection'
|
|
@@ -74,6 +76,7 @@ require_relative 'rsmp/sxl/interface'
|
|
|
74
76
|
require_relative 'rsmp/sxl/supervisor_interface'
|
|
75
77
|
require_relative 'rsmp/sxl/site_interface'
|
|
76
78
|
require_relative 'rsmp/sxl/registry'
|
|
79
|
+
require_relative 'rsmp/proxy/supervisor/modules/status_updates'
|
|
77
80
|
require_relative 'rsmp/proxy/supervisor/modules/status'
|
|
78
81
|
require_relative 'rsmp/proxy/supervisor/modules/commands'
|
|
79
82
|
require_relative 'rsmp/proxy/supervisor/modules/alarms'
|
|
@@ -84,6 +87,7 @@ require_relative 'rsmp/proxy/site/modules/status'
|
|
|
84
87
|
require_relative 'rsmp/proxy/site/modules/aggregated_status'
|
|
85
88
|
require_relative 'rsmp/proxy/site/modules/alarms'
|
|
86
89
|
require_relative 'rsmp/proxy/site/modules/commands'
|
|
90
|
+
require_relative 'rsmp/proxy/site/connection'
|
|
87
91
|
require_relative 'rsmp/proxy/site/sxl_selection'
|
|
88
92
|
require_relative 'rsmp/proxy/site/site_proxy'
|
|
89
93
|
require_relative 'rsmp/tlc'
|
|
@@ -25,6 +25,17 @@
|
|
|
25
25
|
"enum" : [ "recent", "old", "undefined", "unknown" ]
|
|
26
26
|
}
|
|
27
27
|
},
|
|
28
|
+
"if": {
|
|
29
|
+
"required": [ "age" ],
|
|
30
|
+
"properties": {
|
|
31
|
+
"age" : { "enum" : [ "unknown", "undefined" ] }
|
|
32
|
+
}
|
|
33
|
+
},
|
|
34
|
+
"then": {
|
|
35
|
+
"properties": {
|
|
36
|
+
"v" : { "type" : "null" }
|
|
37
|
+
}
|
|
38
|
+
},
|
|
28
39
|
"required" : [ "cCI", "n", "v", "age" ],
|
|
29
40
|
"additionalProperties": false
|
|
30
41
|
}
|
|
@@ -25,6 +25,17 @@
|
|
|
25
25
|
"enum" : [ "recent", "old", "undefined", "unknown" ]
|
|
26
26
|
}
|
|
27
27
|
},
|
|
28
|
+
"if": {
|
|
29
|
+
"required": [ "age" ],
|
|
30
|
+
"properties": {
|
|
31
|
+
"age" : { "enum" : [ "unknown", "undefined" ] }
|
|
32
|
+
}
|
|
33
|
+
},
|
|
34
|
+
"then": {
|
|
35
|
+
"properties": {
|
|
36
|
+
"v" : { "type" : "null" }
|
|
37
|
+
}
|
|
38
|
+
},
|
|
28
39
|
"required" : [ "cCI", "n", "v", "age" ],
|
|
29
40
|
"additionalProperties": false
|
|
30
41
|
}
|
|
@@ -25,6 +25,17 @@
|
|
|
25
25
|
"enum" : [ "recent", "old", "undefined", "unknown" ]
|
|
26
26
|
}
|
|
27
27
|
},
|
|
28
|
+
"if": {
|
|
29
|
+
"required": [ "age" ],
|
|
30
|
+
"properties": {
|
|
31
|
+
"age" : { "enum" : [ "unknown", "undefined" ] }
|
|
32
|
+
}
|
|
33
|
+
},
|
|
34
|
+
"then": {
|
|
35
|
+
"properties": {
|
|
36
|
+
"v" : { "type" : "null" }
|
|
37
|
+
}
|
|
38
|
+
},
|
|
28
39
|
"required" : [ "cCI", "n", "v", "age" ],
|
|
29
40
|
"additionalProperties": false
|
|
30
41
|
}
|
|
@@ -25,6 +25,17 @@
|
|
|
25
25
|
"enum" : [ "recent", "old", "undefined", "unknown" ]
|
|
26
26
|
}
|
|
27
27
|
},
|
|
28
|
+
"if": {
|
|
29
|
+
"required": [ "age" ],
|
|
30
|
+
"properties": {
|
|
31
|
+
"age" : { "enum" : [ "unknown", "undefined" ] }
|
|
32
|
+
}
|
|
33
|
+
},
|
|
34
|
+
"then": {
|
|
35
|
+
"properties": {
|
|
36
|
+
"v" : { "type" : "null" }
|
|
37
|
+
}
|
|
38
|
+
},
|
|
28
39
|
"required" : [ "cCI", "n", "v", "age" ],
|
|
29
40
|
"additionalProperties": false
|
|
30
41
|
}
|
|
@@ -26,6 +26,17 @@
|
|
|
26
26
|
"enum" : [ "recent", "old", "undefined", "unknown" ]
|
|
27
27
|
}
|
|
28
28
|
},
|
|
29
|
+
"if": {
|
|
30
|
+
"required": [ "age" ],
|
|
31
|
+
"properties": {
|
|
32
|
+
"age" : { "enum" : [ "unknown", "undefined" ] }
|
|
33
|
+
}
|
|
34
|
+
},
|
|
35
|
+
"then": {
|
|
36
|
+
"properties": {
|
|
37
|
+
"v" : { "type" : "null" }
|
|
38
|
+
}
|
|
39
|
+
},
|
|
29
40
|
"required" : [ "cCI", "n", "v", "age" ],
|
|
30
41
|
"additionalProperties": false
|
|
31
42
|
}
|
|
@@ -26,6 +26,17 @@
|
|
|
26
26
|
"enum" : [ "recent", "old", "undefined", "unknown" ]
|
|
27
27
|
}
|
|
28
28
|
},
|
|
29
|
+
"if": {
|
|
30
|
+
"required": [ "age" ],
|
|
31
|
+
"properties": {
|
|
32
|
+
"age" : { "enum" : [ "unknown", "undefined" ] }
|
|
33
|
+
}
|
|
34
|
+
},
|
|
35
|
+
"then": {
|
|
36
|
+
"properties": {
|
|
37
|
+
"v" : { "type" : "null" }
|
|
38
|
+
}
|
|
39
|
+
},
|
|
29
40
|
"required" : [ "cCI", "n", "v", "age" ],
|
|
30
41
|
"additionalProperties": false
|
|
31
42
|
}
|
|
@@ -8,23 +8,29 @@
|
|
|
8
8
|
]
|
|
9
9
|
}
|
|
10
10
|
},
|
|
11
|
-
"
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
11
|
+
"if" : {
|
|
12
|
+
"$ref" : "../defs/guards.json#/$defs/age_unknown_or_undefined"
|
|
13
|
+
},
|
|
14
|
+
"then" : {},
|
|
15
|
+
"else" : {
|
|
16
|
+
"allOf" : [
|
|
17
|
+
{
|
|
18
|
+
"if" : {
|
|
19
|
+
"properties" : {
|
|
20
|
+
"n" : {
|
|
21
|
+
"const" : "timeplan"
|
|
22
|
+
}
|
|
17
23
|
}
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
24
|
+
},
|
|
25
|
+
"then" : {
|
|
26
|
+
"properties" : {
|
|
27
|
+
"v" : {
|
|
28
|
+
"description" : "Current time plan",
|
|
29
|
+
"$ref" : "../defs/definitions.json#/integer"
|
|
30
|
+
}
|
|
25
31
|
}
|
|
26
32
|
}
|
|
27
33
|
}
|
|
28
|
-
|
|
29
|
-
|
|
34
|
+
]
|
|
35
|
+
}
|
|
30
36
|
}
|
|
@@ -8,28 +8,34 @@
|
|
|
8
8
|
]
|
|
9
9
|
}
|
|
10
10
|
},
|
|
11
|
-
"
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
11
|
+
"if" : {
|
|
12
|
+
"$ref" : "../defs/guards.json#/$defs/age_unknown_or_undefined"
|
|
13
|
+
},
|
|
14
|
+
"then" : {},
|
|
15
|
+
"else" : {
|
|
16
|
+
"allOf" : [
|
|
17
|
+
{
|
|
18
|
+
"if" : {
|
|
19
|
+
"properties" : {
|
|
20
|
+
"n" : {
|
|
21
|
+
"const" : "color"
|
|
22
|
+
}
|
|
17
23
|
}
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
24
|
+
},
|
|
25
|
+
"then" : {
|
|
26
|
+
"properties" : {
|
|
27
|
+
"v" : {
|
|
28
|
+
"description" : "Color of lamp",
|
|
29
|
+
"type" : "string",
|
|
30
|
+
"enum" : [
|
|
31
|
+
"green",
|
|
32
|
+
"red",
|
|
33
|
+
"yellow"
|
|
34
|
+
]
|
|
35
|
+
}
|
|
30
36
|
}
|
|
31
37
|
}
|
|
32
38
|
}
|
|
33
|
-
|
|
34
|
-
|
|
39
|
+
]
|
|
40
|
+
}
|
|
35
41
|
}
|