public void ControlMPT(Guid uid, MPTCommandType commandType)
		{
			ControlMPT(RubezhServiceFactory.UID, uid, commandType);
		}
		public void ControlMPT(Guid clientUID, Guid uid, MPTCommandType commandType)
		{
			SafeOperationCall(() =>
			{
				var rubezhService = RubezhServiceFactory.Create(TimeSpan.FromMinutes(10));
				using (rubezhService as IDisposable)
					rubezhService.ControlMPT(clientUID, uid, commandType);
			}, "ControlMPT");
		}
Example #3
0
		public static void ControlMPT(Guid clientUID, Guid uid, MPTCommandType commandType)
		{
			if (commandType == MPTCommandType.Automatic)
				RubezhServiceManager.SafeRubezhService.GKSetAutomaticRegime(clientUID, uid, GKBaseObjectType.MPT);
			if (commandType == MPTCommandType.Ignore)
				RubezhServiceManager.SafeRubezhService.GKSetIgnoreRegime(clientUID, uid, GKBaseObjectType.MPT);
			if (commandType == MPTCommandType.Manual)
				RubezhServiceManager.SafeRubezhService.GKSetManualRegime(clientUID, uid, GKBaseObjectType.MPT);
			if (commandType == MPTCommandType.TurnOn)
				RubezhServiceManager.SafeRubezhService.GKTurnOn(clientUID, uid, GKBaseObjectType.MPT);
			if (commandType == MPTCommandType.TurnOff)
				RubezhServiceManager.SafeRubezhService.GKTurnOff(clientUID, uid, GKBaseObjectType.MPT);
			if (commandType == MPTCommandType.TurnOnNow)
				RubezhServiceManager.SafeRubezhService.GKTurnOnNow(clientUID, uid, GKBaseObjectType.MPT);
			if (commandType == MPTCommandType.TurnOn_InAutomatic)
				RubezhServiceManager.SafeRubezhService.GKTurnOnInAutomatic(clientUID, uid, GKBaseObjectType.MPT);
			if (commandType == MPTCommandType.TurnOff_InAutomatic)
				RubezhServiceManager.SafeRubezhService.GKTurnOffInAutomatic(clientUID, uid, GKBaseObjectType.MPT);
			if (commandType == MPTCommandType.TurnOnNow_InAutomatic)
				RubezhServiceManager.SafeRubezhService.GKTurnOnNowInAutomatic(clientUID, uid, GKBaseObjectType.MPT);
			if (commandType == MPTCommandType.ForbidStart)
				RubezhServiceManager.SafeRubezhService.GKStop(clientUID, uid, GKBaseObjectType.MPT);
		}
		public void ControlMPT(Guid clientUID, Guid uid, MPTCommandType commandType)
		{
			ProcedureHelper.ControlMPT(clientUID, uid, commandType);
		}
		public static void ControlMPT(Guid clientUID, Guid uid, MPTCommandType commandType)
		{
			if (OnControlMPT != null)
				OnControlMPT(clientUID, uid, commandType);
		}