Example #1
0
 protected bool BroadMessage(byte [] message)
 {
     if (TxEnabled)
     {
         if ((DateTime.Now - LastActivityOnLan1) < TimeSpan.FromSeconds(Cfg.SactaProtocol.TimeoutAlive))
         {
             Logger.Trace <ScvManager>($"On {Id} Sending Data on LAN1 ...");
             Listener1.Send(Lan1Sendto, message);
         }
         else
         {
             Logger.Trace <ScvManager>($"On {Id} Discarding data on LAN1 ...");
         }
         if ((DateTime.Now - LastActivityOnLan2) < TimeSpan.FromSeconds(Cfg.SactaProtocol.TimeoutAlive))
         {
             Logger.Trace <ScvManager>($"On {Id} Sending Data on LAN2 ...");
             if (Version == 0)
             {
                 Listener2.Send(Lan2Sendto, message);
             }
             else
             {
                 Listener1.Send(Lan2Sendto, message);
             }
         }
         else
         {
             Logger.Trace <ScvManager>($"On {Id} Discarding data on LAN2 ...");
         }
         return(true);
     }
     Logger.Trace <ScvManager>($"On {Id} Discarding data on LAN1/LAN2 (TxDisabled) ...");
     return(false);
 }
Example #2
0
 protected bool BroadMessage(byte[] message)
 {
     if (TxEnabled)
     {
         Logger.Trace <PsiManager>("On PSI Sending Data on LAN1 ...");
         Listener1.Send(Lan1Sendto, message);
         Logger.Trace <PsiManager>($"On PSI Sending Data on LAN2 ...");
         Listener2.Send(Lan2Sendto, message);
         return(true);
     }
     Logger.Trace <PsiManager>($"On PSI Discarding data on LAN1/LAN2 (TxDisabled) ...");
     return(false);
 }