Поделиться через


GattDeviceService.GetCharacteristics(Guid) Метод

Определение

Возвращает вектор характеристик, которые идентифицируются указанным UUID и принадлежат данному экземпляру GattDeviceService.

Важно!

API GetCharacteristics не рекомендуется использовать и может быть недоступен в будущих версиях Windows. Вместо этого используйте GetCharacteristicsForUuidAsync.

public:
 virtual IVectorView<GattCharacteristic ^> ^ GetCharacteristics(Platform::Guid characteristicUuid) = GetCharacteristics;
IVectorView<GattCharacteristic> GetCharacteristics(winrt::guid const& characteristicUuid);
/// [Windows.Foundation.Metadata.Deprecated("Use GetCharacteristicsForUuidAsync instead of GetCharacteristics.  For more information, see MSDN.", Windows.Foundation.Metadata.DeprecationType.Deprecate, 262144, "Windows.Foundation.UniversalApiContract")]
IVectorView<GattCharacteristic> GetCharacteristics(winrt::guid const& characteristicUuid);
public IReadOnlyList<GattCharacteristic> GetCharacteristics(Guid characteristicUuid);
[Windows.Foundation.Metadata.Deprecated("Use GetCharacteristicsForUuidAsync instead of GetCharacteristics.  For more information, see MSDN.", Windows.Foundation.Metadata.DeprecationType.Deprecate, 262144, "Windows.Foundation.UniversalApiContract")]
public IReadOnlyList<GattCharacteristic> GetCharacteristics(Guid characteristicUuid);
function getCharacteristics(characteristicUuid)
Public Function GetCharacteristics (characteristicUuid As Guid) As IReadOnlyList(Of GattCharacteristic)

Параметры

characteristicUuid
Guid

Platform::Guid

winrt::guid

UUID для извлекаемой характеристики.

Возвращаемое значение

Вектор объектов GattCharacteristic, UUID которых соответствуют свойствуUuid.

Атрибуты

Требования к Windows

Возможности приложения
bluetooth

Комментарии

Только одно приложение может получить доступ к одной службе. Если одно приложение зарегистрировало триггер уведомления GATT, этот метод вызовет исключение для всех остальных приложений, которые впоследствии вызывают этот API.

Применяется к