/// <summary> /// Raises the rf data received event. /// </summary> /// <param name="args">Arguments.</param> protected virtual void OnRfDataReceived(RfDataReceivedEventArgs args) { if (RfDataReceived != null) RfDataReceived(this, args); }
private void X10lib_RfDataReceived(object sender, RfDataReceivedEventArgs args) { var code = BitConverter.ToString(args.Data).Replace("-", " "); OnInterfacePropertyChanged(this.GetDomain(), "RF", "X10 RF Receiver", ModuleEvents.Receiver_RawData, code); if (rfPulseTimer == null) { rfPulseTimer = new Timer(delegate(object target) { OnInterfacePropertyChanged(this.GetDomain(), "RF", "X10 RF Receiver", ModuleEvents.Receiver_RawData, ""); }); } rfPulseTimer.Change(1000, Timeout.Infinite); }
private void X10lib_RfDataReceived(object sender, RfDataReceivedEventArgs args) { if (InterfacePropertyChangedAction != null) { try { InterfacePropertyChangedAction(new InterfacePropertyChangedAction() { Domain = this.Domain, SourceId = "RF", SourceType = "X10 RF Receiver", Path = "Receiver.RawData", Value = BitConverter.ToString(args.Data).Replace("-", " ") }); } catch { // TODO: add error logging } // if (rfPulseTimer == null) { rfPulseTimer = new Timer(delegate(object target) { try { InterfacePropertyChangedAction(new InterfacePropertyChangedAction() { Domain = this.Domain, SourceId = "RF", SourceType = "X10 RF Receiver", Path = "Receiver.RawData", Value = "" }); } catch { // TODO: add error logging } }); } rfPulseTimer.Change(1000, Timeout.Infinite); } }