Files
PRD_TU_MP550/scripts/constants.gd
2024-12-13 09:01:01 +03:00

139 lines
6.1 KiB
GDScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

extends Node
const UNICAST_PORT: int = 50003
const UNICAST_ADDRESS: String = '10.1.1.3'
const BROADCAST_PORT: int = 50000
const DEFAULT_ADDRESS: String = '10.1.1.11'
const DEFAULT_PORT: String = '50011'
const CONST_MIN_TEMP: int = -25
const MAXIMUM_CODE_ADC: int = 3796
const MINIMUM_CODE_AD: int = 2660
const TEMP: float = 115.0 / (MAXIMUM_CODE_ADC - MINIMUM_CODE_AD)
const TableNode = preload("res://table/node.tscn")
const TableList = preload("res://table/node_list.tscn")
const Switch = preload("res://table/switch.tscn")
const SocketStatus = preload("res://table/socket_status.tscn")
const SELECT_DEVICE: Array = [[TableNode, TableList]]
const CONTROL_DEVICE: Array = ['ЯЧЕЙКА ЯУ-07Б', 'ФС', 'ЯЧЕЙКА ЭМС-Г', 'ЯЧЕЙКА УГ', 'ЯЧЕЙКА УКП №1', 'ЯЧЕЙКА УКП №2', 'ИП МАА №1', 'ИП МАА №2', 'ИП9-50 №1', 'ИП9-50 №2', 'ИП12-50 №1', '-', '-','ИП5-25', 'Х3:2(СЗИ2 от УФ)', 'Х3:19(СИ2 от ФС)', 'Х3:11(СИ2 в УФ)', 'Х3:14(Модуляция)', 'Х3:27(ФГОЗ)']
const ROWS_REGS_DATA: Array = [
[TableNode, TableNode],
[TableNode, TableNode],
[TableNode, TableNode],
[TableNode, TableNode],
[TableNode, TableNode],
[TableNode, TableNode],
[TableNode, TableNode],
[TableNode, TableNode],
[TableNode, TableNode]]
const ROWS_UKP2_DATA: Array = [
[TableNode, TableNode],
[TableNode, TableNode],
[TableNode, TableNode],
[TableNode, TableNode],
[TableNode, TableNode],
[TableNode, TableNode],
[TableNode, TableNode],
[TableNode, TableNode],
[TableNode, TableNode]]
const ADDRESSES: Array = [
['ПРД-Н1', '10.1.1.11', 50011, MODE.PRD_H],
['ПРД-Н2', '10.1.1.21', 50021, MODE.PRD_H],
['ПРД-Н3', '10.1.1.31', 50031, MODE.PRD_H],
['ПРД-Н4', '10.1.1.41', 50041, MODE.PRD_H],
['ПРД-В1', '10.1.1.12', 50012, MODE.PRD_B],
['ПРД-В2', '10.1.1.22', 50022, MODE.PRD_B],
['ПРД-В3', '10.1.1.32', 50032, MODE.PRD_B],
['ПРД-В4', '10.1.1.42', 50042, MODE.PRD_B],
['ПРД-К1', '10.1.1.13', 50013, MODE.PRD_K],
['ПРД-К2', '10.1.1.23', 50023, MODE.PRD_K],
['ПРД-К3', '10.1.1.33', 50033, MODE.PRD_K],
['ПРД-К4', '10.1.1.43', 50043, MODE.PRD_K]]
var CONTROL_BOARD: Array = [
['ЯЧЕЙКА ЭМС-Г НА СВЯЗИ', 'ЯЧЕЙКИ ЭМС-Г НЕТ НА СВЯЗИ'],
['ЯЧЕЙКА УГ НА СВЯЗИ','ЯЧЕЙКИ УГ НЕТ НА СВЯЗИ'],
['ЯЧЕЙКА УКП №1 НА СВЯЗИ', 'ЯЧЕЙКИ УКП №1 НЕТ НА СВЯЗИ'],
['ЯЧЕЙКА УКП №2 НА СВЯЗИ', 'ЯЧЕЙКИ УКП №2 НЕТ НА СВЯЗИ']]
var CONTROL_POWER_SUPPLY: Array = [
['ИП МАА №1', 'ОШИБКА. КОНТРОЛЬ ИП МАА №1'],
['ИП МАА №2', 'ОШИБКА. КОНТРОЛЬ ИП МАА №2'],
['ИП9-50 №1', 'ОШИБКА. КОНТРОЛЬ ИП9-50 №1'],
['ИП9-50 №2', 'ОШИБКА. КОНТРОЛЬ ИП9-50 №2'],
['ИП12-50 №1', 'ОШИБКА. КОНТРОЛЬ ИП12-50 №1'],
['ИП9-50 №3', 'ОШИБКА. КОНТРОЛЬ ИП9-50 №3'],
['ИП12-50 №2', 'ОШИБКА. КОНТРОЛЬ ИП12-50 №2'],
['ИП5-25', 'ОШИБКА. КОНТРОЛЬ ИП5-25']]
const EMS_G: Array = [
['Нет Х3:2(СЗИ2 от УФ)', 'Есть Х3:2(СЗИ2 от УФ)'],
['Нет Х3:19(СИ2 от ФС)', 'Есть Х3:19(СИ2 от ФС)'],
['Нет Х3:11(СИ2 в УФ)', 'Есть Х3:11(СИ2 в УФ)'],
['Нет Х3:14(Модуляция)', 'Есть Х3:14(Модуляция)'],
['Нет Х3:27(ФГОЗ)', 'Есть Х3:27(ФГОЗ)']]
const INPUT_EMS_G: Array = [
'01/:34',
'02/:35',
'03/:36',
'04/:37',
'05/:38',
'06/:39',
'07/:40',
'08/:41',
'18/:42',
'19/:43',
'20/:44',
'21/:45',
'22/:46',
'23/:47',
'24/:48',
'25/:49',]
const OUT_EMS_G: Array = [
'10/:34',
'11/:35',
'12/:36',
'13/:37',
'14/:38',
'15/:39',
'16/:40',
'17/:41',
'26/:42',
'27/:43',
'28/:44',
'29/:45',
'30/:46',
'31/:47',
'32/:48',
'33/:49',]
const OUT_x128 = [
'Р',
'К',
'0',
'1',]
enum MODE {
PRD_K,
PRD_B,
PRD_H,
}
enum Frame {
WORK, ## В работе
CONSTANT, ## Постоянный сигнал
VARIABLE, ## Переменный сигнал
NULL,
}
enum DataIndices {
STATUS_BOARD = 0,
IN_BLANK_PRD = 1,
IN_IMPULS_PRD = 7,
OUT_BLANK_PRD = 13,
OUT_IMPULS_PRD = 19,
DRY_CONTACT = 27,
DKM = 29,
POWER_UKP_1 = 31,
TEMPERATURE_UKP_1 = 47,
POWER_UKP_2 = 63,
TEMPERATURE_UKP_2 = 79,
}
enum STATE {
WAIT,
READ_ISA,
WRITE_ISA,
}