共用方式為


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

另請參閱

適用於