Esempio n. 1
0
		public static GKDriverProperty AddPlainEnumProprety(GKDriver driver, byte no, byte offset, string propertyName, string parameter1Name, string parameter2Name)
		{
			var property = new GKDriverProperty()
			{
				No = no,
				Name = propertyName,
				Caption = propertyName,
				Default = (ushort)(1 << offset),
				Mask = (short)((1 << offset) + (1 << (offset + 1)))
			};
			var parameter1 = new GKDriverPropertyParameter()
			{
				Name = parameter1Name,
				Value = (ushort)(1 << offset)
			};
			var parameter2 = new GKDriverPropertyParameter()
			{
				Name = parameter2Name,
				Value = (ushort)(2 << offset)
			};
			property.Parameters.Add(parameter1);
			property.Parameters.Add(parameter2);
			driver.Properties.Add(property);
			return property;
		}
Esempio n. 2
0
		public static GKDriverProperty AddPlainEnumProprety2(GKDriver driver, byte no, string propertyName, byte offset, string parameter1Name, string parameter2Name, int mask)
		{
			var property = new GKDriverProperty()
			{
				No = no,
				Name = propertyName,
				Caption = propertyName,
				Default = 0,
				Mask = (byte)mask
			};
			var parameter1 = new GKDriverPropertyParameter()
			{
				Name = parameter1Name,
				Value = (ushort)0
			};
			var parameter2 = new GKDriverPropertyParameter()
			{
				Name = parameter2Name,
				Value = (ushort)mask
			};
			property.Parameters.Add(parameter1);
			property.Parameters.Add(parameter2);
			driver.Properties.Add(property);
			return property;
		}
Esempio n. 3
0
		public static GKDriver Create()
		{
			var driver = new GKDriver()
			{
				DriverTypeNo = 0x13,
				DriverType = GKDriverType.RSR2_ABShS,
				UID = new Guid("7C464C3A-DDC5-496A-9747-4CA93B774DCA"),
				Name = "Адресный барьер шлейфа сигнализации",
				ShortName = "АБШС",
				HasZone = true,
				IsPlaceable = true,
				DriverClassification =GKDriver.DriverClassifications.Other
			};

			GKDriversHelper.AddAvailableStateBits(driver, GKStateBit.Test);
			GKDriversHelper.AddAvailableStateBits(driver, GKStateBit.Failure);
			GKDriversHelper.AddAvailableStateBits(driver, GKStateBit.Fire1);
			GKDriversHelper.AddAvailableStateBits(driver, GKStateBit.Fire2);
			GKDriversHelper.AddAvailableStateClasses(driver, XStateClass.Fire1);
			GKDriversHelper.AddAvailableStateClasses(driver, XStateClass.Fire2);
			GKDriversHelper.AddAvailableStateClasses(driver, XStateClass.Test);

			var property1 = new GKDriverProperty()
			{
				No = 0,
				Name = "Нагрузка",
				Caption = "Нагрузка",
				Default = 0
			};
			var property1Parameter1 = new GKDriverPropertyParameter()
			{
				Name = "Пассивная",
				Value = 0
			};
			var property1Parameter2 = new GKDriverPropertyParameter()
			{
				Name = "Активная",
				Value = 1
			};
			property1.Parameters.Add(property1Parameter1);
			property1.Parameters.Add(property1Parameter2);
			driver.Properties.Add(property1);
			return driver;
		}
Esempio n. 4
0
		public static GKDriver Create()
		{
			var driver = new GKDriver()
			{
				DriverTypeNo = 0xF5,
				DriverType = GKDriverType.KD_KDK,
				UID = new Guid("FD24E2EA-B3CF-4F7F-B73A-D60F8749D685"),
				Name = "Концевик(кнопка) КД",
				ShortName = "КДК",
				IsPlaceable = true,
				IsAutoCreate = true,
				MinAddress = 2,
				MaxAddress = 3,
			};

			GKDriversHelper.AddAvailableStateBits(driver, GKStateBit.Fire1);
			GKDriversHelper.AddAvailableStateClasses(driver, XStateClass.Fire1);
			GKDriversHelper.AddAvailableStateClasses(driver, XStateClass.Test);

			var property1 = new GKDriverProperty()
			{
				No = 0,
				Name = "Конфигурация",
				Caption = "Конфигурация",
				Default = 1
			};
			var property1Parameter1 = new GKDriverPropertyParameter()
			{
				Name = "Нормально замкнутый",
				Value = 0
			};
			var property1Parameter2 = new GKDriverPropertyParameter()
			{
				Name = "Нормально разомкнутый",
				Value = 1
			};

			property1.Parameters.Add(property1Parameter1);
			property1.Parameters.Add(property1Parameter2);
			driver.Properties.Add(property1);

			return driver;
		}
Esempio n. 5
0
		public static GKDriver Create()
		{
			var driver = new GKDriver()
			{
				DriverTypeNo = 0xDC,
				DriverType = GKDriverType.RSR2_MDU,
				UID = new Guid("1BD3CDB3-7427-4FE8-9B56-22C14C9F5435"),
				Name = "Модуль автоматики дымоудаления",
				ShortName = "МДУ220",
				IsControlDevice = true,
				HasLogic = true,
				IsPlaceable = true,
				DriverClassification = GKDriver.DriverClassifications.ActuatingDevice
			};

			driver.AvailableStateBits.Add(GKStateBit.Norm);
			driver.AvailableStateBits.Add(GKStateBit.Off);
			driver.AvailableStateBits.Add(GKStateBit.TurningOn);
			driver.AvailableStateBits.Add(GKStateBit.TurningOff);
			driver.AvailableStateBits.Add(GKStateBit.Failure);
			GKDriversHelper.AddControlAvailableStates(driver);
			GKDriversHelper.AddAvailableStateClasses(driver, XStateClass.AutoOff);
			GKDriversHelper.AddAvailableStateClasses(driver, XStateClass.On);
			GKDriversHelper.AddAvailableStateClasses(driver, XStateClass.Off);
			GKDriversHelper.AddAvailableStateClasses(driver, XStateClass.TurningOn);
			GKDriversHelper.AddAvailableStateClasses(driver, XStateClass.TurningOff);
			GKDriversHelper.AddAvailableStateBits(driver, GKStateBit.Test);
			GKDriversHelper.AddAvailableStateClasses(driver, XStateClass.Test);

			driver.AvailableCommandBits.Add(GKStateBit.TurnOn_InManual);
			driver.AvailableCommandBits.Add(GKStateBit.TurnOnNow_InManual);
			driver.AvailableCommandBits.Add(GKStateBit.TurnOff_InManual);
			driver.AvailableCommandBits.Add(GKStateBit.Stop_InManual);

			var property1 = new GKDriverProperty()
			{
				No = 0,
				Name = "Задержка на включение, с",
				Caption = "Задержка на включение, с",
				Default = 0,
				DriverPropertyType = GKDriverPropertyTypeEnum.IntType,
				Min = 0,
				Max = 65535
			};
			driver.Properties.Add(property1);

			var property2 = new GKDriverProperty()
			{
				No = 1,
				Name = "Время включения, с",
				Caption = "Время включения, с",
				Default = 128,
				DriverPropertyType = GKDriverPropertyTypeEnum.IntType,
				Min = 1,
				Max = 65535
			};
			driver.Properties.Add(property2);

			var property3 = new GKDriverProperty()
			{
				No = 2,
				Name = "Время выключения, с",
				Caption = "Время выключения, с",
				Default = 128,
				DriverPropertyType = GKDriverPropertyTypeEnum.IntType,
				Min = 1,
				Max = 65535
			};
			driver.Properties.Add(property3);

			var property4 = new GKDriverProperty()
			{
				No = 3,
				Name = "Тип привода",
				Caption = "Тип привода",
				Default = 0
			};
			var property4Parameter1 = new GKDriverPropertyParameter()
			{
				Name = "Реверсивный",
				Value = 0
			};
			var property4Parameter2 = new GKDriverPropertyParameter()
			{
				Name = "Пружинный",
				Value = 1
			};
			property4.Parameters.Add(property4Parameter1);
			property4.Parameters.Add(property4Parameter2);
			driver.Properties.Add(property4);

			return driver;
		}
Esempio n. 6
0
		public static GKDriver Create()
		{
			var driver = new GKDriver()
			{
				DriverTypeNo = 0xDB,
				DriverType = GKDriverType.RSR2_AM_1,
				UID = new Guid("860F3F6A-9EE9-437B-8220-B66AFDDBD285"),
				Name = "Метка адресная",
				ShortName = "АМ",
				HasGuardZone = true,
				HasZone = true,
				IsPlaceable = true,
				DriverClassification = GKDriver.DriverClassifications.Other,
			};

			GKDriversHelper.AddAvailableStateBits(driver, GKStateBit.Fire1);
			GKDriversHelper.AddAvailableStateBits(driver, GKStateBit.Fire2);
			GKDriversHelper.AddAvailableStateClasses(driver, XStateClass.Fire1);
			GKDriversHelper.AddAvailableStateClasses(driver, XStateClass.Fire2);
			GKDriversHelper.AddAvailableStateClasses(driver, XStateClass.Test);

			var property1 = new GKDriverProperty()
			{
				No = 0,
				Name = "Конфигурация",
				Caption = "Конфигурация",
				Default = 1
			};
			var property1Parameter1 = new GKDriverPropertyParameter()
			{
				Name = "Один контакт, нормально замкнутый",
				Value = 0
			};
			var property1Parameter2 = new GKDriverPropertyParameter()
			{
				Name = "Один контакт, нормально разомкнутый",
				Value = 1
			};
			var property1Parameter3 = new GKDriverPropertyParameter()
			{
				Name = "Два контакта, нормально замкнутые",
				Value = 2
			};
			var property1Parameter4 = new GKDriverPropertyParameter()
			{
				Name = "Два контакта, нормально разомкнутые",
				Value = 3
			};
			property1.Parameters.Add(property1Parameter1);
			property1.Parameters.Add(property1Parameter2);
			property1.Parameters.Add(property1Parameter3);
			property1.Parameters.Add(property1Parameter4);
			driver.Properties.Add(property1);

			var property2 = new GKDriverProperty()
			{
				IsAUParameter = false,
				DriverPropertyType = GKDriverPropertyTypeEnum.StringType,
				Name = "Сообщение для нормы",
				Caption = "Сообщение для нормы",
				StringDefault = "Сообщение для нормы"
			};
			driver.Properties.Add(property2);

			var property3 = new GKDriverProperty()
			{
				IsAUParameter = false,
				DriverPropertyType = GKDriverPropertyTypeEnum.StringType,
				Name = "Сообщение для сработки 1",
				Caption = "Сообщение для сработки 1",
				StringDefault = "Сообщение для сработки 1"
			};
			driver.Properties.Add(property3);

			var property4 = new GKDriverProperty()
			{
				IsAUParameter = false,
				DriverPropertyType = GKDriverPropertyTypeEnum.StringType,
				Name = "Сообщение для сработки 2",
				Caption = "Сообщение для сработки 2",
				StringDefault = "Сообщение для сработки 2"
			};
			driver.Properties.Add(property4);

			driver.MeasureParameters.Add(new GKMeasureParameter() { No = 1, Name = "Сопротивление, Ом", InternalName = "Resistance" });

			return driver;
		}
Esempio n. 7
0
		public static GKDriver Create()
		{
			var driver = new GKDriver()
			{
				DriverTypeNo = 0x1B,
				DriverType = GKDriverType.RK_AM,
				UID = new Guid("FE25BE41-EBE9-4469-A176-47F3F4EF7D05"),
				Name = "Метка адресная радиоканальная",
				ShortName = "АМ-РК",
				HasGuardZone = true,
				HasZone = true,
				IsPlaceable = true
			};

			GKDriversHelper.AddAvailableStateBits(driver, GKStateBit.Fire1);
			GKDriversHelper.AddAvailableStateBits(driver, GKStateBit.Fire2);
			GKDriversHelper.AddAvailableStateClasses(driver, XStateClass.Fire1);
			GKDriversHelper.AddAvailableStateClasses(driver, XStateClass.Fire2);
			GKDriversHelper.AddAvailableStateClasses(driver, XStateClass.Test);
			GKDriversHelper.AddRadioChanelProperties(driver);

			var property1 = new GKDriverProperty()
			{
				No = 3,
				Name = "Конфигурация",
				Caption = "Конфигурация",
				Default = 1
			};
			var property1Parameter1 = new GKDriverPropertyParameter()
			{
				Name = "Один контакт, нормально замкнутый",
				Value = 0
			};
			var property1Parameter2 = new GKDriverPropertyParameter()
			{
				Name = "Один контакт, нормально разомкнутый",
				Value = 1
			};
			var property1Parameter3 = new GKDriverPropertyParameter()
			{
				Name = "Два контакта, нормально замкнутые",
				Value = 2
			};
			var property1Parameter4 = new GKDriverPropertyParameter()
			{
				Name = "Два контакта, нормально разомкнутые",
				Value = 3
			};
			property1.Parameters.Add(property1Parameter1);
			property1.Parameters.Add(property1Parameter2);
			property1.Parameters.Add(property1Parameter3);
			property1.Parameters.Add(property1Parameter4);
			driver.Properties.Add(property1);

			var property2 = new GKDriverProperty()
			{
				IsAUParameter = false,
				DriverPropertyType = GKDriverPropertyTypeEnum.StringType,
				Name = "Сообщение для нормы",
				Caption = "Сообщение для нормы",
				StringDefault = "Сообщение для нормы"
			};
			driver.Properties.Add(property2);

			var property3 = new GKDriverProperty()
			{
				IsAUParameter = false,
				DriverPropertyType = GKDriverPropertyTypeEnum.StringType,
				Name = "Сообщение для сработки 1",
				Caption = "Сообщение для сработки 1",
				StringDefault = "Сообщение для сработки 1"
			};
			driver.Properties.Add(property3);

			var property4 = new GKDriverProperty()
			{
				IsAUParameter = false,
				DriverPropertyType = GKDriverPropertyTypeEnum.StringType,
				Name = "Сообщение для сработки 2",
				Caption = "Сообщение для сработки 2",
				StringDefault = "Сообщение для сработки 2"
			};
			driver.Properties.Add(property4);

			driver.MeasureParameters.Add(new GKMeasureParameter() { No = 1, Name = "Сопротивление, Ом", InternalName = "Resistance" });

			return driver;
		}
Esempio n. 8
0
		public static GKDriver Create()
		{
			var driver = new GKDriver()
			{
				DriverTypeNo = 0xE1,
				DriverType = GKDriverType.RSR2_MAP4,
				UID = new Guid("42B3C448-2FDD-43D4-AEE0-F173CB8D6CF8"),
				Name = "Метка адресная пожарная",
				ShortName = "АМП",
				HasGuardZone = true,
				HasZone = true,
				IsPlaceable = true,
				DriverClassification = GKDriver.DriverClassifications.Other
			};

			GKDriversHelper.AddAvailableStateBits(driver, GKStateBit.Test);
			GKDriversHelper.AddAvailableStateBits(driver, GKStateBit.Failure);
			GKDriversHelper.AddAvailableStateBits(driver, GKStateBit.Fire1);
			GKDriversHelper.AddAvailableStateBits(driver, GKStateBit.Fire2);
			GKDriversHelper.AddAvailableStateClasses(driver, XStateClass.Fire1);
			GKDriversHelper.AddAvailableStateClasses(driver, XStateClass.Fire2);
			GKDriversHelper.AddAvailableStateClasses(driver, XStateClass.Test);

			var property1 = new GKDriverProperty()
			{
				No = 0,
				Name = "Конфигурация",
				Caption = "Конфигурация",
				Default = 0
			};
			var property1Parameter1 = new GKDriverPropertyParameter()
			{
				Name = "Шлейф дымовых датчиков",
				Value = 0
			};
			var property1Parameter2 = new GKDriverPropertyParameter()
			{
				Name = "Комбинированный шлейф",
				Value = 1
			};
			var property1Parameter3 = new GKDriverPropertyParameter()
			{
				Name = "Шлейф тепловых датчиков",
				Value = 2
			};
			property1.Parameters.Add(property1Parameter1);
			property1.Parameters.Add(property1Parameter2);
			property1.Parameters.Add(property1Parameter3);
			driver.Properties.Add(property1);

			GKDriversHelper.AddIntProprety(driver, 1, "Порог питания, В", 80, 0, 280).Multiplier = 10;
			GKDriversHelper.AddIntProprety(driver, 2, "Порог 1", 250, 1, 10000);
			GKDriversHelper.AddIntProprety(driver, 3, "Порог 2", 750, 1, 10000);
			GKDriversHelper.AddIntProprety(driver, 4, "Порог 3", 1500, 1, 10000);
			GKDriversHelper.AddIntProprety(driver, 5, "Порог 4", 4500, 1, 10000);
			GKDriversHelper.AddIntProprety(driver, 6, "Порог 5", 6000, 1, 10000);

			var property2 = new GKDriverProperty()
			{
				IsAUParameter = false,
				DriverPropertyType = GKDriverPropertyTypeEnum.StringType,
				Name = "Сообщение для нормы",
				Caption = "Сообщение для нормы",
				StringDefault = "Сообщение для нормы"
			};
			driver.Properties.Add(property2);

			var property3 = new GKDriverProperty()
			{
				IsAUParameter = false,
				DriverPropertyType = GKDriverPropertyTypeEnum.StringType,
				Name = "Сообщение для сработки 1",
				Caption = "Сообщение для сработки 1",
				StringDefault = "Сообщение для сработки 1"
			};
			driver.Properties.Add(property3);

			var property4 = new GKDriverProperty()
			{
				IsAUParameter = false,
				DriverPropertyType = GKDriverPropertyTypeEnum.StringType,
				Name = "Сообщение для сработки 2",
				Caption = "Сообщение для сработки 2",
				StringDefault = "Сообщение для сработки 2"
			};
			driver.Properties.Add(property4);

			driver.MeasureParameters.Add(new GKMeasureParameter { No = 1, Name = "Сопротивление, Ом", InternalName = "Resistance" });
			driver.MeasureParameters.Add(new GKMeasureParameter { No = 2, Name = "Питание, В", Multiplier = 10 });


			return driver;
		}
Esempio n. 9
0
		public static void AddPropertyParameter(GKDriverProperty property, string name, int value)
		{
			var parameter = new GKDriverPropertyParameter()
			{
				Name = name,
				Value = (ushort)value
			};
			property.Parameters.Add(parameter);
		}
Esempio n. 10
0
		public static GKDriver Create()
		{
			var driver = new GKDriver()
			{
				DriverTypeNo = 0xEA,
				DriverType = GKDriverType.RSR2_MDU24,
				UID = new Guid("2C149B68-FFE9-4680-B3CB-BE4CD37BF646"),
				Name = "Модуль автоматики дымоудаления 24В",
				ShortName = "МДУ24",
				IsControlDevice = true,
				HasLogic = true,
				IsPlaceable = true,
				DriverClassification = GKDriver.DriverClassifications.ActuatingDevice
			};

			driver.AvailableStateBits.Add(GKStateBit.Norm);
			driver.AvailableStateBits.Add(GKStateBit.Off);
			driver.AvailableStateBits.Add(GKStateBit.TurningOn);
			driver.AvailableStateBits.Add(GKStateBit.TurningOff);
			driver.AvailableStateBits.Add(GKStateBit.Failure);
			GKDriversHelper.AddControlAvailableStates(driver);
			GKDriversHelper.AddAvailableStateClasses(driver, XStateClass.AutoOff);
			GKDriversHelper.AddAvailableStateClasses(driver, XStateClass.On);
			GKDriversHelper.AddAvailableStateClasses(driver, XStateClass.Off);
			GKDriversHelper.AddAvailableStateClasses(driver, XStateClass.TurningOn);
			GKDriversHelper.AddAvailableStateClasses(driver, XStateClass.TurningOff);
			GKDriversHelper.AddAvailableStateBits(driver, GKStateBit.Test);
			GKDriversHelper.AddAvailableStateClasses(driver, XStateClass.Test);

			driver.AvailableCommandBits.Add(GKStateBit.TurnOn_InManual);
			driver.AvailableCommandBits.Add(GKStateBit.TurnOnNow_InManual);
			driver.AvailableCommandBits.Add(GKStateBit.TurnOff_InManual);
			driver.AvailableCommandBits.Add(GKStateBit.Stop_InManual);

			var property1 = new GKDriverProperty()
			{
				No = 0,
				Name = "Задержка на включение, с",
				Caption = "Задержка на включение, с",
				Default = 0,
				DriverPropertyType = GKDriverPropertyTypeEnum.IntType,
				Min = 0,
				Max = 65535
			};
			driver.Properties.Add(property1);

			var property2 = new GKDriverProperty()
			{
				No = 1,
				Name = "Время включения, с",
				Caption = "Время включения, с",
				Default = 128,
				DriverPropertyType = GKDriverPropertyTypeEnum.IntType,
				Min = 1,
				Max = 65535
			};
			driver.Properties.Add(property2);

			var property3 = new GKDriverProperty()
			{
				No = 2,
				Name = "Время выключения, с",
				Caption = "Время выключения, с",
				Default = 128,
				DriverPropertyType = GKDriverPropertyTypeEnum.IntType,
				Min = 1,
				Max = 65535
			};
			driver.Properties.Add(property3);

			var property4 = new GKDriverProperty()
			{
				No = 3,
				Name = "Тип привода",
				Caption = "Тип привода",
				Default = 0
			};
			var property4Parameter1 = new GKDriverPropertyParameter()
			{
				Name = "Реверсивный",
				Value = 0
			};
			var property4Parameter2 = new GKDriverPropertyParameter()
			{
				Name = "Пружинный",
				Value = 1
			};
			property4.Parameters.Add(property4Parameter1);
			property4.Parameters.Add(property4Parameter2);
			driver.Properties.Add(property4);

			var property5 = new GKDriverProperty()
			{
				No = 4,
				Name = "Питание, В",
				Caption = "Питание, В",
				Default = 200,
				DriverPropertyType = GKDriverPropertyTypeEnum.IntType,
				Min = 200,
				Multiplier = 10,
				Max = 300
			};
			driver.Properties.Add(property5);

			driver.MeasureParameters.Add(new GKMeasureParameter { No = 1, Name = "Задержка", IsDelay = true, IsNotVisible = true });
			driver.MeasureParameters.Add(new GKMeasureParameter { No = 2, Name = "Тип задержки", IsNotVisible = true }); // 1 - Задержка, 2 - Время хода
			driver.MeasureParameters.Add(new GKMeasureParameter { No = 3, Name = "Напряжение, В", Multiplier = 10 });

			return driver;
		}