private void ProcessAvailability(string[] response)
 {
     if (response != null && response.Length > 1)
     {
         adapter.mAvail.Value = "AVAILABLE";
     }
     else
     {
         adapter.mAvail.Value = "UNAVAILABLE";
     }
     adapter.SendChanged();
 }
Ejemplo n.º 2
0
        private void ProcessAvailability(string response)
        {
            var pattern = "^>SERIAL NUMBER, (.*)$";
            var match   = new Regex(pattern).Match(response);

            if (match.Success)
            {
                adapter.mAvail.Value = "AVAILABLE";
            }
            else
            {
                adapter.mAvail.Value = "UNAVAILABLE";
            }

            adapter.SendChanged();
        }