public ProgramHelper RaiseEvent(ModuleHelper module, string parameter, string value, string description) { MIG.InterfacePropertyChangedAction mact = new MIG.InterfacePropertyChangedAction(); mact.Domain = module.Instance.Domain; mact.Path = parameter; mact.Value = value; mact.SourceId = module.Instance.Address; mact.SourceType = "Virtual Module"; try { _homegenie.SignalModulePropertyChange(this, module.Instance, mact); } catch (Exception ex) { HomeGenieService.LogEvent(_programmodule.Domain, _programmodule.Address, ex.Message, "Exception.StackTrace", ex.StackTrace); } return(this); }
/// <summary> /// Raise a parameter event and set the parameter with the specified value. /// </summary> /// <returns>ProgramHelper.</returns> /// <param name="parameter">Parameter name.</param> /// <param name="value">The new parameter value to set.</param> /// <param name="description">Event description.</param> public ProgramHelper RaiseEvent(string parameter, string value, string description) { try { var actionEvent = new MIG.InterfacePropertyChangedAction(); actionEvent.Domain = programModule.Domain; actionEvent.Path = parameter; actionEvent.Value = value; actionEvent.SourceId = programModule.Address; actionEvent.SourceType = "Automation Program"; homegenie.SignalModulePropertyChange(this, programModule, actionEvent); } catch (Exception ex) { HomeGenieService.LogEvent( programModule.Domain, programModule.Address, ex.Message, "Exception.StackTrace", ex.StackTrace ); } return(this); }
public ProgramHelper RaiseEvent(ModuleHelper module, string parameter, string value, string description) { try { var actionEvent = new MIG.InterfacePropertyChangedAction(); actionEvent.Domain = module.Instance.Domain; actionEvent.Path = parameter; actionEvent.Value = value; actionEvent.SourceId = module.Instance.Address; actionEvent.SourceType = "Virtual Module"; homegenie.SignalModulePropertyChange(this, module.Instance, actionEvent); } catch (Exception ex) { HomeGenieService.LogEvent(programModule.Domain, programModule.Address, ex.Message, "Exception.StackTrace", ex.StackTrace); } return this; }