GattReliableWriteTransaction GattReliableWriteTransaction GattReliableWriteTransaction GattReliableWriteTransaction GattReliableWriteTransaction Class

Definition

Performs GATT reliable writes on the Bluetooth LE device, in the form of a transaction write operation.

public : sealed class GattReliableWriteTransaction : IGattReliableWriteTransaction, IGattReliableWriteTransaction2
struct winrt::Windows::Devices::Bluetooth::GenericAttributeProfile::GattReliableWriteTransaction : IGattReliableWriteTransaction, IGattReliableWriteTransaction2
public sealed class GattReliableWriteTransaction : IGattReliableWriteTransaction, IGattReliableWriteTransaction2
Public NotInheritable Class GattReliableWriteTransaction Implements IGattReliableWriteTransaction, IGattReliableWriteTransaction2
var gattReliableWriteTransaction = new gattReliableWriteTransaction();
Attributes
Windows 10 requirements
Device family
Windows 10 (introduced v10.0.10240.0 - for Xbox, see UWP features that aren't yet supported on Xbox)
API contract
Windows.Foundation.UniversalApiContract (introduced v1)
Capabilities
bluetooth

Constructors

GattReliableWriteTransaction() GattReliableWriteTransaction() GattReliableWriteTransaction() GattReliableWriteTransaction() GattReliableWriteTransaction()

Creates a new GattReliableWriteTransaction object.

public : GattReliableWriteTransaction()
GattReliableWriteTransaction() const;
public GattReliableWriteTransaction()
Public Sub New()
var gattReliableWriteTransaction = new gattReliableWriteTransaction();
Additional features and requirements
Device family
Windows 10 (introduced v10.0.10240.0 - for Xbox, see UWP features that aren't yet supported on Xbox)
API contract
Windows.Foundation.UniversalApiContract (introduced v1)
Capabilities
bluetooth

Methods

CommitAsync() CommitAsync() CommitAsync() CommitAsync() CommitAsync()

Performs all the queued writes, in sequence, writing the data to the device. Once a transaction object has been committed, no further operations are possible on the GattReliableWriteTransaction object.

public : IAsyncOperation<GattCommunicationStatus> CommitAsync()
IAsyncOperation<GattCommunicationStatus> CommitAsync() const;
public IAsyncOperation<GattCommunicationStatus> CommitAsync()
Public Function CommitAsync() As IAsyncOperation( Of GattCommunicationStatus )
Windows.Devices.Bluetooth.GenericAttributeProfile.GattReliableWriteTransaction.commitAsync().done( /* Your success and error handlers */ );
Returns

The object used to manage the asynchronous operation, which, upon completion, will return the status of the asynchronous operation.

Additional features and requirements
Device family
Windows 10 (introduced v10.0.10240.0 - for Xbox, see UWP features that aren't yet supported on Xbox)
API contract
Windows.Foundation.UniversalApiContract (introduced v1)
Capabilities
bluetooth

CommitWithResultAsync() CommitWithResultAsync() CommitWithResultAsync() CommitWithResultAsync() CommitWithResultAsync()

Performs all the queued writes, in sequence, writing the data to the device. Once a transaction object has been committed, no further operations are possible on the GattReliableWriteTransaction object.

public : IAsyncOperation<GattWriteResult> CommitWithResultAsync()
IAsyncOperation<GattWriteResult> CommitWithResultAsync() const;
public IAsyncOperation<GattWriteResult> CommitWithResultAsync()
Public Function CommitWithResultAsync() As IAsyncOperation( Of GattWriteResult )
Windows.Devices.Bluetooth.GenericAttributeProfile.GattReliableWriteTransaction.commitWithResultAsync().done( /* Your success and error handlers */ );
Returns

An asynchronous operation that completes with a GattWriteResult object.

Additional features and requirements
Device family
Windows 10 Creators Update (introduced v10.0.15063.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v4)
Capabilities
bluetooth

WriteValue(GattCharacteristic, IBuffer) WriteValue(GattCharacteristic, IBuffer) WriteValue(GattCharacteristic, IBuffer) WriteValue(GattCharacteristic, IBuffer) WriteValue(GattCharacteristic, IBuffer)

Adds a new write operation to the transaction object.

public : void WriteValue(GattCharacteristic characteristic, IBuffer value)
void WriteValue(GattCharacteristic characteristic, IBuffer value) const;
public void WriteValue(GattCharacteristic characteristic, IBuffer value)
Public Function WriteValue(characteristic As GattCharacteristic, value As IBuffer) As void
gattReliableWriteTransaction.writeValue(characteristic, value);
Parameters
characteristic
GattCharacteristic GattCharacteristic GattCharacteristic

The GattCharacteristic object on which to perform the write operation.

value
IBuffer IBuffer IBuffer

The Characteristic Value to be written to characteristic.

Additional features and requirements
Device family
Windows 10 (introduced v10.0.10240.0 - for Xbox, see UWP features that aren't yet supported on Xbox)
API contract
Windows.Foundation.UniversalApiContract (introduced v1)
Capabilities
bluetooth