Exemplo n.º 1
0
        public async Task UpdateDescriptors()
        {
            var descriptors = (await m_gattServer.ListCharacteristicDescriptors(m_serviceGuid, m_characteristicGuid)).ToList();
            var vals        = "";

            foreach (var desc in descriptors)
            {
                vals += desc + ": " + await m_gattServer.ReadDescriptorValue(m_serviceGuid, m_characteristicGuid, desc) +
                        "\n";
            }
            DescriptorValues = vals;
        }
Exemplo n.º 2
0
 public async Task UpdateDescriptors()
 {
     try
     {
         var descriptors = (await m_gattServer.ListCharacteristicDescriptors(m_serviceGuid, m_characteristicGuid))
                           .ToList();
         var vals = "";
         foreach (var desc in descriptors)
         {
             vals += desc + ": " +
                     await m_gattServer.ReadDescriptorValue(m_serviceGuid, m_characteristicGuid, desc) + "\n";
         }
         DescriptorValues = vals;
     }
     catch (GattException ex)
     {
         Log.Warn(ex);
         m_dialogManager.Toast(ex.Message, TimeSpan.FromSeconds(3));
     }
 }