GattCharacteristic.ReadValueAsync 方法

定义

重载

ReadValueAsync()

执行从 Windows 维护的值缓存中读取的特征值。

ReadValueAsync(BluetoothCacheMode)

从 Windows 维护的值缓存或直接从设备执行特征值读取。

ReadValueAsync()

执行从 Windows 维护的值缓存中读取的特征值。

public:
 virtual IAsyncOperation<GattReadResult ^> ^ ReadValueAsync() = ReadValueAsync;
/// [Windows.Foundation.Metadata.Overload("ReadValueAsync")]
/// [Windows.Foundation.Metadata.RemoteAsync]
IAsyncOperation<GattReadResult> ReadValueAsync();
[Windows.Foundation.Metadata.Overload("ReadValueAsync")]
[Windows.Foundation.Metadata.RemoteAsync]
public IAsyncOperation<GattReadResult> ReadValueAsync();
function readValueAsync()
Public Function ReadValueAsync () As IAsyncOperation(Of GattReadResult)

返回

管理异步操作所需的 对象,该对象在完成后返回 GattReadResult 对象,该对象又包含异步操作的完成状态,如果成功,则包含从设备读取的数据。

属性

Windows 要求

应用功能
bluetooth

另请参阅

适用于

ReadValueAsync(BluetoothCacheMode)

从 Windows 维护的值缓存或直接从设备执行特征值读取。

public:
 virtual IAsyncOperation<GattReadResult ^> ^ ReadValueAsync(BluetoothCacheMode cacheMode) = ReadValueAsync;
/// [Windows.Foundation.Metadata.Overload("ReadValueWithCacheModeAsync")]
/// [Windows.Foundation.Metadata.RemoteAsync]
IAsyncOperation<GattReadResult> ReadValueAsync(BluetoothCacheMode const& cacheMode);
[Windows.Foundation.Metadata.Overload("ReadValueWithCacheModeAsync")]
[Windows.Foundation.Metadata.RemoteAsync]
public IAsyncOperation<GattReadResult> ReadValueAsync(BluetoothCacheMode cacheMode);
function readValueAsync(cacheMode)
Public Function ReadValueAsync (cacheMode As BluetoothCacheMode) As IAsyncOperation(Of GattReadResult)

参数

cacheMode
BluetoothCacheMode

指定是直接从设备读取值,还是从 Windows 维护的值缓存中读取值。

返回

管理异步操作所需的 对象,该对象在完成后返回 GattReadResult 对象,该对象又包含异步操作的完成状态,如果成功,则包含从设备读取的数据。

属性

Windows 要求

应用功能
bluetooth

另请参阅

适用于