Beispiel #1
0
 public void SetCommunicatorLayer(ICommunicationLayer c)
 {
     if (m_communicator != null)
     {
         m_communicator.RemoveListener(this);
     }
     m_communicator = c;
     if (m_communicator != null)
     {
         m_communicator.AddListener(this);
     }
 }
Beispiel #2
0
 public void OnDataArrived(ICommunicationLayer layer, CommunicationData d)
 {
     foreach (var m in m_motorConnectors)
     {
         if (!m.Value.IsConnected())
         {
             continue;
         }
         foreach (var data in d.Data)
         {
             if (m.Value.GetSourceJoint() == data.name)
             {
                 _listeners.ForEach(p => p.OnDataReceived(this, d.TargetName, m.Value.GetTargetJoint(), data.values));
             }
         }
     }
 }
Beispiel #3
0
 public void OnClosed(ICommunicationLayer l)
 {
 }
Beispiel #4
0
 public void OnSchemeChanged(ICommunicationLayer layer, List <string> names)
 {
 }