GattDeviceService 클래스

정의

Bluetooth 디바이스의 GATT 기본 서비스를 나타냅니다. GattDeviceService 클래스는 Bluetooth LE 디바이스의 GATT 서비스를 나타냅니다. API를 사용하여 디바이스를 찾아 얻은 디바이스 서비스 인스턴스 경로를 사용하여 Windows.Devices.Enumeration 인스턴스화됩니다.

public ref class GattDeviceService sealed : IClosable
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Foundation.UniversalApiContract, 65536)]
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
class GattDeviceService final : IClosable
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Foundation.UniversalApiContract, 65536)]
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
/// [Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
class GattDeviceService final : IClosable
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.UniversalApiContract), 65536)]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
public sealed class GattDeviceService : System.IDisposable
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.UniversalApiContract), 65536)]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
[Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
public sealed class GattDeviceService : System.IDisposable
Public NotInheritable Class GattDeviceService
Implements IDisposable
상속
Object IInspectable GattDeviceService
특성
구현

Windows 요구 사항

디바이스 패밀리
Windows 10 (10.0.10240.0 - for Xbox, see UWP features that aren't yet supported on Xbox에서 도입되었습니다.)
API contract
Windows.Foundation.UniversalApiContract (v1.0에서 도입되었습니다.)
앱 기능
bluetooth

설명

버전 기록

Windows 버전 SDK 버전 추가된 값
1703 15063 DeviceAccessInformation
1703 15063 FromIdAsync(String,GattSharingMode)
1703 15063 GetCharacteristicsAsync
1703 15063 GetCharacteristicsAsync(BluetoothCacheMode)
1703 15063 GetCharacteristicsForUuidAsync(Guid)
1703 15063 GetCharacteristicsForUuidAsync(Guid,BluetoothCacheMode)
1703 15063 GetDeviceSelectorForBluetoothDeviceId(BluetoothDeviceId)
1703 15063 GetDeviceSelectorForBluetoothDeviceId(BluetoothDeviceId,BluetoothCacheMode)
1703 15063 GetDeviceSelectorForBluetoothDeviceIdAndUuid(BluetoothDeviceId,Guid)
1703 15063 GetDeviceSelectorForBluetoothDeviceIdAndUuid(BluetoothDeviceId,Guid,BluetoothCacheMode)
1703 15063 GetIncludedServicesAsync
1703 15063 GetIncludedServicesAsync(BluetoothCacheMode)
1703 15063 GetIncludedServicesForUuidAsync(Guid)
1703 15063 GetIncludedServicesForUuidAsync(Guid,BluetoothCacheMode)
1703 15063 OpenAsync
1703 15063 RequestAccessAsync
1703 15063 세션
1703 15063 SharingMode

속성

AttributeHandle

Bluetooth LE 디바이스에 선언된 GATT 기반 서비스 특성을 고유하게 식별하는 데 사용되는 핸들을 가져옵니다.

Device

BluetoothLEDevice 현재 GattDeviceService 개체와 연결된 디바이스를 설명하는 개체를 가져옵니다.

중요

디바이스 API는 더 이상 사용되지 않으며 이후 버전의 Windows에서는 사용할 수 없습니다. 대신 세션을 사용합니다.

DeviceAccessInformation

현재 GattDeviceService 개체와 연결된 디바이스 액세스 정보를 가져옵니다.

DeviceId

GattDeviceService를 인스턴스화하는 데 사용되는 GATT 서비스 인스턴스 경로를 나타내는 문자열을 가져옵니다.

ParentServices

이 서비스에 대한 부모 서비스의 읽기 전용 목록을 가져옵니다.

중요

ParentServices API는 더 이상 사용되지 않으며 이후 버전의 Windows에서는 사용할 수 없습니다.

Session

이 GATT 디바이스 서비스 인스턴스에 대한 세션을 가져옵니다.

SharingMode

이 GATT 디바이스 서비스 인스턴스에 대한 공유 모드를 가져옵니다.

Uuid

GattDeviceService와 연결된 GATT 서비스 UUID를 가져옵니다.

메서드

Close()

GattDeviceService 클래스와 연결된 리소스를 해제합니다. 이렇게 하면 다른 앱이 해당 GattDeviceService의 리소스에 액세스할 수 있습니다. Close가 호출된 후에는 GattDeviceService 개체를 사용하면 안 됩니다. 대신 FromIdAsync 메서드를 사용하여 새 GattDeviceService 개체를 인스턴스화해야 합니다.

ConvertShortIdToUuid(UInt16)

Bluetooth SIG 정의 짧은 ID를 전체 GATT UUID로 변환합니다.

중요

ConvertShortIdToUuid API는 더 이상 사용되지 않으며 이후 버전의 Windows에서는 사용할 수 없습니다. 대신 BluetoothUuidHelper.FromShortId를 사용합니다.

FromIdAsync(String)

디바이스 ID에서 새 GattDeviceService를 인스턴스화합니다.

FromIdAsync(String, GattSharingMode)

디바이스 ID에서 새 GattDeviceService 개체를 인스턴스화합니다.

GetAllCharacteristics()

이 GattDeviceService 인스턴스에 속하는 모든 특성의 컬렉션을 가져옵니다.

중요

GetAllCharacteristics API는 더 이상 사용되지 않으며 이후 버전의 Windows에서는 사용할 수 없습니다. 대신 GetCharacteristicsAsync를 사용합니다.

GetAllIncludedServices()

이 GattDeviceService 인스턴스에 속하는 모든 포함된 서비스의 컬렉션을 가져옵니다.

중요

GetAllCharacteristics API는 더 이상 사용되지 않으며 이후 버전의 Windows에서는 사용할 수 없습니다. 대신 GetIncludedServicesAsync를 사용합니다.

GetCharacteristics(Guid)

지정된 UUID로 식별되고 이 GattDeviceService 인스턴스에 속하는 특성의 벡터를 반환합니다.

중요

GetCharacteristics API는 더 이상 사용되지 않으며 이후 버전의 Windows에서는 사용할 수 없습니다. 대신 GetCharacteristicsForUuidAsync를 사용합니다.

GetCharacteristicsAsync()

이 GattDeviceService 인스턴스의 일부인 특성을 가져옵니다.

GetCharacteristicsAsync(BluetoothCacheMode)

이 GattDeviceService 인스턴스의 일부인 특성을 가져옵니다.

GetCharacteristicsForUuidAsync(Guid)

이 GattDeviceService 인스턴스의 일부이며 characteristicUuid와 연결된 문자 값을 가져옵니다.

GetCharacteristicsForUuidAsync(Guid, BluetoothCacheMode)

이 GattDeviceService 인스턴스의 일부이며 characteristicUuid와 연결된 문자 값을 가져옵니다.

GetDeviceSelectorForBluetoothDeviceId(BluetoothDeviceId)

BluetoothDeviceId에서 메서드와 함께 CreateWatcher 사용하기에 적합한 AQS 필터 문자열을 만듭니다.

GetDeviceSelectorForBluetoothDeviceId(BluetoothDeviceId, BluetoothCacheMode)

BluetoothDeviceId에서 메서드와 함께 CreateWatcher 사용하기에 적합한 AQS 필터 문자열을 만듭니다.

GetDeviceSelectorForBluetoothDeviceIdAndUuid(BluetoothDeviceId, Guid)

BluetoothDeviceId 및 serviceUuid에서 메서드와 함께 CreateWatcher 사용하기에 적합한 AQS 필터 문자열을 만듭니다.

GetDeviceSelectorForBluetoothDeviceIdAndUuid(BluetoothDeviceId, Guid, BluetoothCacheMode)

BluetoothDeviceId 및 serviceUuid에서 메서드와 함께 CreateWatcher 사용하기에 적합한 AQS 필터 문자열을 만듭니다.

GetDeviceSelectorFromShortId(UInt16)

16비트 Bluetooth GATT 서비스 UUID에서 메서드와 함께 CreateWatcher 사용하기에 적합한 AQS 필터 문자열을 만듭니다.

중요

GetDeviceSelectorFromShortId API는 더 이상 사용되지 않으며 이후 버전의 Windows에서는 사용할 수 없습니다. 대신 GetDeviceSelectorFromUuid를 사용합니다.

GetDeviceSelectorFromUuid(Guid)

Bluetooth 서비스 UUID에서 메서드와 함께 CreateWatcher 사용하기에 적합한 AQS 필터 문자열을 만듭니다.

GetIncludedServices(Guid)

지정된 UUID로 식별되고 이 GattDeviceService 인스턴스에 속하는 포함된 서비스의 벡터를 반환합니다.

중요

GetIncludedServices API는 더 이상 사용되지 않으며 이후 버전의 Windows에서는 사용할 수 없습니다. 대신 GetIncludedServicesForUuidAsync를 사용합니다.

GetIncludedServicesAsync()

이 GattDeviceService 인스턴스와 연결된 포함된 서비스를 가져옵니다.

GetIncludedServicesAsync(BluetoothCacheMode)

이 GattDeviceService 인스턴스와 연결된 포함된 서비스를 가져옵니다.

GetIncludedServicesForUuidAsync(Guid)

이 GattDeviceService 인스턴스와 연결된 serviceUuid에서 포함된 서비스를 가져옵니다.

GetIncludedServicesForUuidAsync(Guid, BluetoothCacheMode)

이 GattDeviceService 인스턴스와 연결된 serviceUuid에서 포함된 서비스를 가져옵니다.

OpenAsync(GattSharingMode)

지정된 sharingMode를 사용하여 GATT 디바이스 서비스를 엽니다.

RequestAccessAsync()

GattDeviceService에 대한 액세스를 요청합니다.

적용 대상

추가 정보