Exemplo n.º 1
0
        public void LinkOnDataReceived(object sender, EventArgs e)
        {
            byte[] dataBytes             = _asyncUdpLink.GetMessage();
            string messageFromController = Encoding.ASCII.GetString(dataBytes); // new byte array and feed it the input string

            _log.Info("Message from Remote {messageFromController}", messageFromController);
            IncomingMessage = messageFromController;
            WriteUDPDataToDataBase(string.Empty, false);
            IncomingMessage = string.Empty; // clear the prop
            UDPDataReceived?.Invoke(this, e);
        }
Exemplo n.º 2
0
 protected virtual void OnUDPDataReceived(UDPDataEventArgs e)
 {
     UDPDataReceived?.Invoke(this, e);
 }