Exemple #1
0
 private void Phy_DataRecieved(object sender, string e)
 {
     DataRecieved?.Invoke(this, e);
     if (e.StartsWith("E"))
     {
         EventRecieved?.Invoke(this, e);
     }
     else
     {
         result = e;
         signal.Release();
     }
 }
        public void OnEvent(EventData eventData)
        {
            var rawMessageData = new RawMessageData(eventData.Code, eventData.Parameters[0] as byte[]);

            if (NetworkTrafficState == NetworkTrafficState.Paused)
            {
                optionsBuffer.Enqueue(BufferOption.Event);
                eventsBuffer.Enqueue(rawMessageData);
            }
            else
            {
                EventRecieved?.Invoke(rawMessageData);
            }
        }