GattCharacteristic 클래스

정의

GATT 서비스의 특성을 나타냅니다. GattCharacteristic 개체는 특정 서비스의 GATT 특성을 나타내며 GattDeviceService 개체의 Characteristics 속성에서 가져옵니다.

public ref class GattCharacteristic sealed
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Foundation.UniversalApiContract, 65536)]
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
class GattCharacteristic final
/// [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 GattCharacteristic final
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.UniversalApiContract), 65536)]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
public sealed class GattCharacteristic
[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 GattCharacteristic
Public NotInheritable Class GattCharacteristic
상속
Object Platform::Object IInspectable GattCharacteristic
특성

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 GetDescriptorsAsync
1703 15063 GetDescriptorsAsync(BluetoothCacheMode)
1703 15063 GetDescriptorsForUuidAsync(Guid)
1703 15063 GetDescriptorsForUuidAsync(Guid,BluetoothCacheMode)
1703 15063 WriteClientCharacteristicConfigurationDescriptorWithResultAsync
1703 15063 WriteValueWithResultAsync(IBuffer)
1703 15063 WriteValueWithResultAsync(IBuffer,GattWriteOption)

속성

AttributeHandle

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

CharacteristicProperties

GATT 프로필에 정의된 GATT 특성 속성을 가져옵니다.

ExtendedProperties 플래그가 있으면 확장 특성 속성 설명자의 속성도 나타냅니다.

PresentationFormats

집계 형식 설명자로 지정된 순서대로 이 GattCharacteristic과 연결된 프레젠테이션 형식 설명자 목록을 가져옵니다.

PresentationFormat 또는 집계 형식 설명자가 없으면 목록이 비어 있어야 합니다.

ProtectionLevel

디바이스와의 무선 통신에 대해 원하는 GATT 보안 옵션을 가져오거나 설정합니다.

Windows는 페어링 프로세스의 일부로 디바이스와 가능한 최대 보안을 협상하며, 더 낮은 수준의 보안을 지정해도 기존 보안 수준이 저하되지 않습니다.

Service

이 특성이 멤버인 GattDeviceService 를 가져옵니다.

UserDescription

이 GattCharacteristic에 대한 사용자에게 친숙한 설명을 가져옵니다. 사용자 설명 설명자가 있는 경우 빈 문자열이 됩니다.

Uuid

이 GattCharacteristic에 대한 GATT 특성 UUID를 가져옵니다.

메서드

ConvertShortIdToUuid(UInt16)

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

중요

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

GetAllDescriptors()

이 GattCharacteristic instance 속하는 모든 설명자의 컬렉션을 가져옵니다.

중요

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

GetDescriptors(Guid)

지정된 UUID로 식별되고 이 GattCharacteristic instance 속하는 설명자의 벡터를 반환합니다.

중요

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

GetDescriptorsAsync()

이 GattCharacteristic instance 대한 설명자를 반환합니다.

GetDescriptorsAsync(BluetoothCacheMode)

이 GattCharacteristic instance 대해 지정된 캐시 모드의 설명자를 반환합니다.

GetDescriptorsForUuidAsync(Guid)

UUID가 descriptorUuid와 일치하는 설명자를 반환합니다.

GetDescriptorsForUuidAsync(Guid, BluetoothCacheMode)

UUID가 descriptorUuid와 지정된 cacheMode와 일치하는 설명자를 반환합니다.

ReadClientCharacteristicConfigurationDescriptorAsync()

ClientCharacteristicConfigurationDescriptor의 현재 값을 읽습니다.

ReadValueAsync()

Windows에서 유지 관리하는 값 캐시에서 특성 값을 읽습니다.

ReadValueAsync(BluetoothCacheMode)

Windows에서 유지 관리하는 값 캐시에서 또는 디바이스에서 직접 특성 값을 읽습니다.

WriteClientCharacteristicConfigurationDescriptorAsync(GattClientCharacteristicConfigurationDescriptorValue)

ClientCharacteristicConfigurationDescriptor를 Bluetooth LE 디바이스에 쓰고 쓸 값이 표시 또는 알림을 나타내고 ValueChanged 이벤트 처리기가 등록된 경우 디바이스에서 ValueChanged 이벤트를 수신할 수 있습니다.

WriteClientCharacteristicConfigurationDescriptorWithResultAsync(GattClientCharacteristicConfigurationDescriptorValue)

ClientCharacteristicConfigurationDescriptor를 Bluetooth LE 디바이스에 쓰고 쓸 값이 표시 또는 알림을 나타내고 ValueChanged 이벤트 처리기가 등록된 경우 디바이스에서 ValueChanged 이벤트를 수신할 수 있습니다.

WriteValueAsync(IBuffer)

Bluetooth LE 디바이스에 특성 값 쓰기를 수행합니다.

WriteValueAsync(IBuffer, GattWriteOption)

Bluetooth LE 디바이스에 특성 값 쓰기를 수행합니다.

WriteValueWithResultAsync(IBuffer)

Bluetooth LE 디바이스에 특성 값 쓰기를 수행합니다.

WriteValueWithResultAsync(IBuffer, GattWriteOption)

Bluetooth LE 디바이스에 특성 값 쓰기를 수행합니다.

이벤트

ValueChanged

앱은 클라이언트 특성 구성 설명자를 설정한 후 디바이스에서 알림 또는 표시가 수신될 때 이벤트를 수신하기 위해 이벤트 처리기를 등록할 수 있습니다.

적용 대상