Exemplo n.º 1
0
		private void TransciverOnRecived(Tcp.Connection connection, Transciver transciver, TcRxArgs args)
		{
			BaseConnection.Statistic.IsResponsive = true;
			_heartbeatTimer.Stop();
			if (BaseConnection.IsOpened)
				_heartbeatTimer.Start();
		}
Exemplo n.º 2
0
			internal void Log(Transciver c, string message, [CallerMemberName] string methodName = default(string))
			{
				string rv = ("" + DateTime.Now.ToString("HH:mm:ss.fff") + " "
					+ "->TCP".Erweitern(6)
					+ Td() + ("[C " + c.Base.ID + "]").Erweitern(6)
					+ "TRANSCIVER:".Erweitern(12) + "'"
					+ message + "'").Erweitern(100) 
					+ " (" + methodName + ")";

				if (Application.Current != null)
				{
					Application.Current.Dispatcher.BeginInvoke(DispatcherPriority.ApplicationIdle, new Action(() =>
					{
						Statistic.Log = Statistic.Log + rv + "\r\n";
					}));
				}


				Tcp.Write(rv);
			}