コード例 #1
0
 /// <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);
 }
コード例 #2
0
ファイル: X10.cs プロジェクト: nyasara/mig-service-dotnet
 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);
 }
コード例 #3
0
ファイル: X10.cs プロジェクト: guytpetj/HomeGenie
 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);
     }
 }