[gd_scene load_steps=6 format=3 uid="uid://5uv1idl3lqea"]

[ext_resource type="Script" uid="uid://d0jwv5opi3mrk" path="res://scenes/pribor-afsp/pribor-bpo.gd" id="1_bhc4e"]
[ext_resource type="PackedScene" uid="uid://d3iqb5e4g81m5" path="res://scenes/контроль/элемент-г.tscn" id="2_jp6m0"]
[ext_resource type="PackedScene" uid="uid://p2suppildvq0" path="res://scenes/контроль/элемент-в.tscn" id="3_jcpjs"]
[ext_resource type="Script" uid="uid://bux47vkw71w1t" path="res://scenes/контроль/request.gd" id="4_crej3"]

[sub_resource type="GDScript" id="GDScript_bhc4e"]
script/source = "extends Timer

func _ready(): wait_time = ProjectSettings.get_setting('application/config/unit_bpo_request_period')
"

[node name="pribor_bpo" type="Control"]
layout_mode = 3
anchors_preset = 0
offset_left = 115.0
offset_top = 150.0
offset_right = 115.0
offset_bottom = 150.0
script = ExtResource("1_bhc4e")

[node name="mod_pit_g1" parent="." instance=ExtResource("2_jp6m0")]
layout_mode = 2
offset_left = 40.0
offset_top = 535.0
offset_right = 560.0
offset_bottom = 605.0
size_flags_horizontal = 7
size_flags_vertical = 7
fname = "Модуль электропитания"
rname = "G1"

[node name="blok_bpo_a1" parent="." instance=ExtResource("2_jp6m0")]
layout_mode = 0
offset_left = 40.0
offset_top = 135.0
offset_right = 560.0
offset_bottom = 330.0
show_state = false
fname = "Блок БПО левого борта"
rname = "А1"

[node name="grid_bpo_a1" type="GridContainer" parent="."]
layout_mode = 0
offset_left = 50.0
offset_top = 175.0
offset_right = 498.0
offset_bottom = 320.0
columns = 4

[node name="kanal1" parent="grid_bpo_a1" groups=["потребитель-питания"] instance=ExtResource("2_jp6m0")]
layout_mode = 2
size_flags_horizontal = 7
size_flags_vertical = 7
fname = "Канал 1"
metadata/state = "SelfTest[0].SystemList[0].DevList[0]['TestPassed']"

[node name="kanal2" parent="grid_bpo_a1" groups=["потребитель-питания", "управляется-по-шине-1"] instance=ExtResource("2_jp6m0")]
layout_mode = 2
size_flags_horizontal = 7
size_flags_vertical = 7
fname = "Канал 2"
metadata/state = "SelfTest[0].SystemList[0].DevList[1]['TestPassed']"

[node name="kanal3" parent="grid_bpo_a1" groups=["потребитель-питания", "управляется-по-шине-1"] instance=ExtResource("2_jp6m0")]
layout_mode = 2
size_flags_horizontal = 7
size_flags_vertical = 7
fname = "Канал 3"
metadata/state = "SelfTest[0].SystemList[0].DevList[2]['TestPassed']"

[node name="kanal4" parent="grid_bpo_a1" groups=["потребитель-питания", "управляется-по-шине-1"] instance=ExtResource("2_jp6m0")]
layout_mode = 2
size_flags_horizontal = 7
size_flags_vertical = 7
fname = "Канал 4"
metadata/state = "SelfTest[0].SystemList[0].DevList[3]['TestPassed']"

[node name="kanal5" parent="grid_bpo_a1" groups=["потребитель-питания", "управляется-по-шине-1"] instance=ExtResource("2_jp6m0")]
layout_mode = 2
size_flags_horizontal = 7
size_flags_vertical = 7
fname = "Канал 5"
metadata/state = "SelfTest[0].SystemList[0].DevList[4]['TestPassed']"

[node name="kanal6" parent="grid_bpo_a1" groups=["потребитель-питания", "управляется-по-шине-1"] instance=ExtResource("2_jp6m0")]
layout_mode = 2
size_flags_horizontal = 7
size_flags_vertical = 7
fname = "Канал 6"
metadata/state = "SelfTest[0].SystemList[0].DevList[5]['TestPassed']"

[node name="kanal7" parent="grid_bpo_a1" groups=["потребитель-питания", "управляется-по-шине-1"] instance=ExtResource("2_jp6m0")]
layout_mode = 2
size_flags_horizontal = 7
size_flags_vertical = 7
fname = "Канал 7"
metadata/state = "SelfTest[0].SystemList[0].DevList[6]['TestPassed']"

[node name="kanal8" parent="grid_bpo_a1" groups=["потребитель-питания", "управляется-по-шине-1"] instance=ExtResource("2_jp6m0")]
layout_mode = 2
size_flags_horizontal = 7
size_flags_vertical = 7
fname = "Канал 8"
metadata/state = "SelfTest[0].SystemList[0].DevList[7]['TestPassed']"

[node name="yas_bpo_a1" parent="." groups=["потребитель-питания"] instance=ExtResource("3_jcpjs")]
offset_left = 500.0
offset_top = 175.0
offset_right = 550.0
offset_bottom = 320.0
show_rname = false
self_size = Vector2i(50, 145)
fname = "Яч. связи"

[node name="blok_bpo_a2" parent="." instance=ExtResource("2_jp6m0")]
layout_mode = 0
offset_left = 40.0
offset_top = 335.0
offset_right = 560.0
offset_bottom = 530.0
show_state = false
fname = "Блок БПО правого борта"
rname = "А2"

[node name="grid_bpo_a2" type="GridContainer" parent="."]
layout_mode = 0
offset_left = 50.0
offset_top = 375.0
offset_right = 498.0
offset_bottom = 520.0
columns = 4

[node name="kanal1" parent="grid_bpo_a2" groups=["потребитель-питания", "управляется-по-шине-2"] instance=ExtResource("2_jp6m0")]
layout_mode = 2
size_flags_horizontal = 7
size_flags_vertical = 7
fname = "Канал 1"
metadata/state = "SelfTest[0].SystemList[0].DevList[0]['TestPassed']"

[node name="kanal2" parent="grid_bpo_a2" groups=["потребитель-питания", "управляется-по-шине-2"] instance=ExtResource("2_jp6m0")]
layout_mode = 2
size_flags_horizontal = 7
size_flags_vertical = 7
fname = "Канал 2"
metadata/state = "SelfTest[0].SystemList[0].DevList[1]['TestPassed']"

[node name="kanal3" parent="grid_bpo_a2" groups=["потребитель-питания", "управляется-по-шине-2"] instance=ExtResource("2_jp6m0")]
layout_mode = 2
size_flags_horizontal = 7
size_flags_vertical = 7
fname = "Канал 3"
metadata/state = "SelfTest[0].SystemList[0].DevList[2]['TestPassed']"

[node name="kanal4" parent="grid_bpo_a2" groups=["потребитель-питания", "управляется-по-шине-2"] instance=ExtResource("2_jp6m0")]
layout_mode = 2
size_flags_horizontal = 7
size_flags_vertical = 7
fname = "Канал 4"
metadata/state = "SelfTest[0].SystemList[0].DevList[3]['TestPassed']"

[node name="kanal5" parent="grid_bpo_a2" groups=["потребитель-питания", "управляется-по-шине-2"] instance=ExtResource("2_jp6m0")]
layout_mode = 2
size_flags_horizontal = 7
size_flags_vertical = 7
fname = "Канал 5"
metadata/state = "SelfTest[0].SystemList[0].DevList[4]['TestPassed']"

[node name="kanal6" parent="grid_bpo_a2" groups=["потребитель-питания", "управляется-по-шине-2"] instance=ExtResource("2_jp6m0")]
layout_mode = 2
size_flags_horizontal = 7
size_flags_vertical = 7
fname = "Канал 6"
metadata/state = "SelfTest[0].SystemList[0].DevList[5]['TestPassed']"

[node name="kanal7" parent="grid_bpo_a2" groups=["потребитель-питания", "управляется-по-шине-2"] instance=ExtResource("2_jp6m0")]
layout_mode = 2
size_flags_horizontal = 7
size_flags_vertical = 7
fname = "Канал 7"
metadata/state = "SelfTest[0].SystemList[0].DevList[6]['TestPassed']"

[node name="kanal8" parent="grid_bpo_a2" groups=["потребитель-питания", "управляется-по-шине-2"] instance=ExtResource("2_jp6m0")]
layout_mode = 2
size_flags_horizontal = 7
size_flags_vertical = 7
fname = "Канал 8"
metadata/state = "SelfTest[0].SystemList[0].DevList[7]['TestPassed']"

[node name="yas_bpo_a2" parent="." groups=["потребитель-питания"] instance=ExtResource("3_jcpjs")]
offset_left = 500.0
offset_top = 375.0
offset_right = 550.0
offset_bottom = 520.0
show_rname = false
self_size = Vector2i(50, 145)
fname = "Яч. связи"

[node name="request" type="HTTPRequest" parent="."]
use_threads = true
script = ExtResource("4_crej3")
projsettings_path_left = "application/config/Адрес БПО левого борта"
projsettings_path_right = "application/config/Адрес БПО правого борта"
projsettings_path_wait_time = "application/config/Период опроса состояния БПО, секунды"

[node name="timer" type="Timer" parent="request"]
wait_time = 30.0
autostart = true
script = SubResource("GDScript_bhc4e")

[connection signal="request_completed" from="request" to="." method="_on_request_completed"]
[connection signal="timeout" from="request/timer" to="request" method="_on_request_timer"]
