Ejemplo n.º 1
0
        private void TelemetryTimer_Tick(object sender)
        {
            try
            {
                _telemetryTimer.Change(-1, -1);

                if (_lmNetDmx != null)
                {
                    AvgBitRate = _lmNetDmx.BitRate;
                    string message = null;
                    do
                    {
                        message = _lmNetDmx.ReadMessage();
                        if (message != null)
                        {
                            Debug.WriteLine("DSGraph TelemetryTick_Tick got LMNetDmx Message");
                            Debug.WriteLine(message);
                            NotifyTelemetryUpdate(message);
                        }
                    } while (message != null);
                }

                _telemetryTimer.Change(5000, -1);
            }
            catch (Exception ex)
            {
                ErrorLogger.DumpToDebug(ex);
            }
        }
Ejemplo n.º 2
0
        private void TelemetryTimer_Tick(object sender)
        {
            try
            {
                _telemetryTimer.Change(-1, -1);

                if (_lmNetDmx != null)
                {
                    AvgBitRate = _lmNetDmx.BitRate;
                    if (TelemetryUpdate != null)
                    {
                        string message = null;
                        do
                        {
                            message = _lmNetDmx.ReadMessage();
                            if (message != null)
                            {
                                Debug.WriteLine("DSGraph TelemetryTick_Tick got LMNetDmx Message");
                                Debug.WriteLine(message);
                                TelemetryUpdate(this, new XmlTelemetryEventArgs(XmlReader.Create(new StringReader(message))));
                            }
                        } while (message != null);
                    }
                }

                _telemetryTimer.Change(5000, -1);
            }
            catch (Exception ex)
            {
                ErrorLogger.DumpToDebug(ex);
            }
        }
Ejemplo n.º 3
0
        /// <summary>
        /// Does the updates for telemetry data
        /// </summary>
        private void dmxMsgReceiveTimer_Elapsed(object sender, ElapsedEventArgs e)
        {
            dmxMsgReceiveTimer.Stop();

            if (_netDmxCtl == null)
            {
                return;
            }

            string message = null;

            do
            {
                message = _netDmxCtl.ReadMessage();

                /*    if (message != null)
                 *  {
                 *      XmlReader xml = null;
                 *      try
                 *      {
                 *          Debug.WriteLine("TVGraphs.LTNetSource got LMNetDmx Message");
                 *          Debug.WriteLine(message);
                 *
                 *          xml = XmlReader.Create(new StringReader(message));
                 *          if (xml.Read())
                 *          {
                 *              if (xml.Read())
                 *              {
                 *                  if (xml.Name.Equals("Channel") && xml.IsStartElement())
                 *                  {
                 *                      Channel ch = Client.InBandData.Parser.ReadTVChannel(xml);
                 *                      if (!ch.Equals(lastReportedChannel))
                 *                      {
                 *                          lastReportedChannel = ch;
                 *                          NotifyPropertyChanged("Channel");
                 *                      }
                 *                  }
                 *              }
                 *          }
                 *      }
                 *      catch (Exception ex)
                 *      {
                 *          ErrorLogger.DumpToDebug(ex);
                 *      }
                 *      finally
                 *      {
                 *          if (xml != null)
                 *          {
                 *              xml.Close();
                 *          }
                 *      }
                 *  } */
            } while (message != null);

            if (this.State == GraphState.Running)
            {
                dmxMsgReceiveTimer.Start();
            }
        }
Ejemplo n.º 4
0
        public void readMsgTimer_Elapsed(object sender, ElapsedEventArgs e)
        {
            string msg = _netDmxCtl.ReadMessage();

            if (msg != null && msg.Length > 0)
            {
                Console.WriteLine("Demux Received Message: " + msg);
            }
        }