Ejemplo n.º 1
0
		public GKDoor()
		{
			PlanElementUIDs = new List<Guid>();
			OpenRegimeLogic = new GKLogic();
			NormRegimeLogic = new GKLogic();
			CloseRegimeLogic = new GKLogic();
			Delay = 15;
			Hold = 20;
			PimEnter = new GKPim
			{
				IsAutoGenerated = true,
				DoorUID = UID,
				UID = GuidHelper.CreateOn(UID, 0)
			};
			PimExit = new GKPim
			{
				IsAutoGenerated = true,
				DoorUID = UID,
				UID = GuidHelper.CreateOn(UID, 1)
			};

			PimCrossing = new GKPim
			{
				IsAutoGenerated = true,
				DoorUID = UID,
				UID = GuidHelper.CreateOn(UID, 2)
			};
		}
Ejemplo n.º 2
0
		public PumpStationDescriptor(GKPim globalPim, GKPumpStation pumpStation)
			: base(pumpStation)
		{
			GlobalPim = globalPim;
			DescriptorType = DescriptorType.PumpStation;
			PumpStation = pumpStation;
		}
Ejemplo n.º 3
0
		public MPTDescriptor(GKPim globalPim, GKMPT mpt)
			: base(mpt)
		{
			GlobalPim = globalPim;
			DescriptorType = DescriptorType.MPT;
			MPT = mpt;
			MPT.DelayRegime = DelayRegime.On;
		}
Ejemplo n.º 4
0
		public PimViewModel(GKPim pim)
		{
			ShowJournalCommand = new RelayCommand(OnShowJournal);
			ShowPropertiesCommand = new RelayCommand(OnShowProperties);
			Pim = pim;
			State.StateChanged += new System.Action(OnStateChanged);
			OnStateChanged();
		}
Ejemplo n.º 5
0
		public KauDatabase(GKDevice kauDevice)
		{
			DatabaseType = kauDevice.DriverType == GKDriverType.GKMirror ? DatabaseType.Mirror : DatabaseType.Kau;
			RootDevice = kauDevice;

			AddChild(RootDevice);
			Devices.ForEach(x => x.KauDatabaseParent = RootDevice);

			GlobalPim = new GKPim { Name = "Автоматика" + "(" + kauDevice.PresentationName + ")", IsGlobalPim = true };
			GlobalPim.DeviceUid = kauDevice.UID;
			GlobalPimDescriptor = new PimDescriptor(GlobalPim);
		}
Ejemplo n.º 6
0
		public GkDatabase(GKDevice gkControllerDevice)
		{
			KauDatabases = new List<KauDatabase>();
			DatabaseType = DatabaseType.Gk;
			RootDevice = gkControllerDevice;

			AddDevice(gkControllerDevice);
			gkControllerDevice.AllChildren.FindAll(x => (x.DriverType == GKDriverType.GKIndicator || x.DriverType == GKDriverType.GKRele) && x.AllParents.All(y => y.DriverType != GKDriverType.GKMirror)).ForEach(AddDevice);
			Devices.ForEach(x => x.GkDatabaseParent = RootDevice);

			GlobalPim = new GKPim { Name = "Автоматика" + "(" + gkControllerDevice.PresentationName + ")", IsGlobalPim = true };
			GlobalPim.DeviceUid = gkControllerDevice.UID;
			GlobalPimDescriptor = new PimDescriptor(GlobalPim);
		}
Ejemplo n.º 7
0
		public PimDetailsViewModel(GKPim pim)
		{
			Pim = pim;
			Title = Pim.Name;
			State.StateChanged += new Action(OnStateChanged);

			ShowCommand = new RelayCommand(OnShow);
			ShowJournalCommand = new RelayCommand(OnShowJournal);
			SetAutomaticStateCommand = new RelayCommand(OnSetAutomaticState, CanSetAutomaticState);
			SetManualStateCommand = new RelayCommand(OnSetManualState, CanSetManualState);
			SetIgnoreStateCommand = new RelayCommand(OnSetIgnoreState, CanSetIgnoreState);
			TurnOnCommand = new RelayCommand(OnTurnOn);
			TurnOnNowCommand = new RelayCommand(OnTurnOnNow);
			TurnOffCommand = new RelayCommand(OnTurnOff);
		}
Ejemplo n.º 8
0
		public GKGuardZone()
		{
			PlanElementUIDs = new List<Guid>();
			GuardZoneDevices = new List<GKGuardZoneDevice>();
			Pim = new GKPim()
			{
				IsAutoGenerated = true,
				GuardZoneUID = UID,
				UID = GuidHelper.CreateOn(UID, 0)
			};
			ChangePim = new GKPim()
			{
				IsAutoGenerated = true,
				GuardZoneUID = UID,
				UID = GuidHelper.CreateOn(UID, 1)
			};
			AlarmDelay = 1;
		}
Ejemplo n.º 9
0
		public GKPumpStation()
		{
			Delay = 30;
			Hold = 600;
			DelayRegime = DelayRegime.Off;
			NSPumpsCount = 1;
			NSDeltaTime = 5;
			StartLogic = new GKLogic();
			StopLogic = new GKLogic();
			AutomaticOffLogic = new GKLogic();
			this.PlanElementUIDs = new List<Guid>();

			NSDevices = new List<GKDevice>();
			NSDeviceUIDs = new List<Guid>();

			Pim = new GKPim()
			{
				IsAutoGenerated = true,
				PumpStationUID = UID,
				UID = GuidHelper.CreateOn(UID, 0)
			};
		}
Ejemplo n.º 10
0
		public GKState(GKPim pim)
			: this()
		{
			Pim = pim;
			UID = pim.UID;
			ReferenceUid = pim.DeviceUid;
			BaseObjectType = GKBaseObjectType.Pim;
		}
Ejemplo n.º 11
0
		public PimDescriptor(GKPim pim)
			: base(pim)
		{
			DescriptorType = DescriptorType.Pim;
			Pim = pim;
		}