TwclGattClientConnection Class

The class represents a Bluetooth LE GATT client connection.

Namespace: wclBluetooth
TObject
  wclConnections.TwclCustomConnection
    wclConnections.TwclClientConnection
      wclBluetooth.TwclGattClientConnection
type
 TwclGattClientConnection = class(TwclClientConnection)
 end;

The TwclGattClientConnection type exposes the following members.

Show:
 NameDescription
Create(TwclBluetoothRadio)

Creates a new GATT client connection object.

Top
Show:
 NameDescription
Address

Gets a remote device MAC address.

ConnectOnRead

Gets connection mode.

ForceNotifications

Gets the notifications mode.

OnConnectionParamsChanged

The event fires when the connection parameters changed.

OnConnectionPhyChanged

The event fires when the connection PHY changed.

OnMaxPduSizeChanged

The event fires when the maximum PDU size changed.

Radio

Gets the connection owner.

Receiver

Gets the connection message receiver object. (Inherited from TwclCustomConnection.)

State

Gets the connection state. (Inherited from TwclClientConnection.)

ThreadId

Gets the connection's thread ID. (Inherited from TwclCustomConnection.)

Timeout

Gets the connect timeout value. (Inherited from TwclClientConnection.)

Top
Show:
 NameDescription
Connect(Int64,Boolean,Boolean)

Connects to a remote device.

Disconnect

Disconnects from the connected remote device. (Inherited from TwclClientConnection.)

DoCharacteristicChanged(Word,TwclGattCharacteristicValue)

Fires the OnCharacteristicChanged event.

DoConnect(Integer)

Fires the OnConnect event. (Inherited from TwclClientConnection.)

DoConnectionParamsChanged

Fires the OnConnectionParamsChanged event.

DoConnectionPhyChanged

Fires the OnConnectionPhyChanged event.

DoDisconnect(Integer)

Fires the OnDisconnect event. (Inherited from TwclClientConnection.)

DoMaxPduSizeChanged

Fires the OnPduMaxSizeChanged event.

Enter

Enters the connection's critical section. (Inherited from TwclCustomConnection.)

GetConnectionParams(TwclBluetoothLeConnectionParameters)

Gets the current connection parameters.

GetConnectionPhyInfo(TwclBluetoothLeConnectionPhy)

Reads the Bluetooth LE physical layer (PHY) information.

GetMaxPduSize(Word)

Reads the maximum PDU size for the current connection.

HalCommunicate(THandle)

Implements a hardware-dependent code that communicate with the connected remote device. (Inherited from TwclClientConnection.)

HalConnect(THandle)

Implements a hardware-dependent code that connects to a remote device. (Overrides TwclClientConnection.HalConnect(THandle).)

HalDisconnect

Implements a hardware-dependent code that disconnects from the connected remote device. (Overrides TwclClientConnection.HalDisconnect.)

HalGetConnectionParams(TwclBluetoothLeConnectionParameters)

Implements a hardware-dependent code to get the current connection parameters.

HalGetConnectionPhyInfo(TwclBluetoothLeConnectionPhy)

Implements a hardware-dependent code to reads the Bluetooth LE physical layer (PHY) information.

HalGetMaxPduSize(Word)

Implements a hardware-dependent code to reads the maximum PDU size for the current connection.

HalReadCharacteristics(TwclGattService,TwclGattOperationFlag,TwclGattCharacteristics)

Implements a hardware-dependent code for reading the characteristics available for the specified service.

HalReadCharacteristicValue(TwclGattCharacteristic,TwclGattOperationFlag,TwclGattProtectionLevel,TwclGattCharacteristicValue)

Implements a hardware-dependent code for reading the value of the specified characteristic.

HalReadDescriptors(TwclGattCharacteristic,TwclGattOperationFlag,TwclGattDescriptors)

The method reads all the descriptors available for the specified characteristic.

HalReadDescriptorValue(TwclGattDescriptor,TwclGattOperationFlag,TwclGattProtectionLevel,TwclGattDescriptorValue)

Implements a hardware-dependent code for reading the value of the specified descriptor.

HalReadIncludedServices(TwclGattService,TwclGattOperationFlag,TwclGattServices)

Implements a hardware-dependent code for reading the included services available for a given service.

HalReadServices(TwclGattOperationFlag,TwclGattServices)

Implements a hardware-dependent code for reading available services from a remote Bluetooth LE device.

HalSetConnectionParams(TwclBluetoothLeConnectionParametersType)

Overloaded. Implements a hardware-dependent code to request the connection parameters change to the specified preferred connection parameters.

HalSetConnectionParams(TwclBluetoothLeConnectionParametersValue)

Overloaded. Implements a hardware-dependent code to request the connection parameters change to the specified preferred connection parameters.

HalSubscribe(TwclGattCharacteristic,THandle)

Implements a hardware-dependent code to subscribes for the characteristic changes notifications.

HalUnsubscribe(THandle)

Implements a hardware-dependent code to unsubscribes from the characteristic changes notifications.

HalWriteCharacteristicValue(TwclGattCharacteristic,TwclGattProtectionLevel,TwclGattCharacteristicValue)

Implements a hardware-dependent code to write the specified characteristic value to the Bluetooth device.

HalWriteDescriptorValue(TwclGattDescriptor,TwclGattProtectionLevel,TwclGattDescriptorValue)

Implements a hardware-dependent code to write the specified descriptor value to the Bluetooth device.

InternalDisconnect(Integer)

The internal disconnect method. Disconnects from a connected remote device. (Inherited from TwclClientConnection.)

Leave

Exists *leaves) the connection's critical section. (Inherited from TwclCustomConnection.)

MessageReceived(TwclMessage)

The method called when a new notification message received. (Overrides TwclClientConnection.MessageReceived(TwclMessage).)

NotifyClosed(Integer)

Send a Disconnect notification message. (Inherited from TwclClientConnection.)

PrepareForConnection

The method called internally before connection.

ReadCharacteristics(TwclGattService,TwclGattOperationFlag,TwclGattCharacteristics)

The method reads all the characteristics available for the specified service.

ReadCharacteristicValue(TwclGattCharacteristic,TwclGattOperationFlag,TwclGattProtectionLevel,TwclGattCharacteristicValue)

The method reads the value of the specified characteristic.

ReadDescriptors(TwclGattCharacteristic,TwclGattOperationFlag,TwclGattDescriptors)

The method reads all the descriptors available for the specified characteristic.

ReadDescriptorValue(TwclGattDescriptor,TwclGattOperationFlag,TwclGattProtectionLevel,TwclGattDescriptorValue)

The method reads the value of the specified descriptor.

ReadIncludedServices(TwclGattService,TwclGattOperationFlag,TwclGattServices)

The method reads all the included services available for a given service.

ReadServices(TwclGattOperationFlag,TwclGattServices)

Reads available services from a remote Bluetooth LE device.

SetConnectionParams(TwclBluetoothLeConnectionParametersType)

Overloaded. Request the connection parameters change to the specified preferred connection parameters.

SetConnectionParams(TwclBluetoothLeConnectionParametersValue)

Overloaded. Request the connection parameters change to the specified preferred connection parameters.

Subscribe(TwclGattCharacteristic)

Subscribes for the characteristic changes notifications.

Unsubscribe(TwclGattCharacteristic)

Unsubscribes from the characteristic changes notifications.

WriteCharacteristicValue(TwclGattCharacteristic,TwclGattProtectionLevel,TwclGattCharacteristicValue,TwclGattWriteKind)

The method writes the specified characteristic value to the Bluetooth device.

WriteClientConfiguration(TwclGattCharacteristic,Boolean,TwclGattOperationFlag,TwclGattProtectionLevel)

Writes the client configuration descriptor to the device.

WriteDescriptorValue(TwclGattDescriptor,TwclGattProtectionLevel,TwclGattDescriptorValue)

The method writes the specified descriptor value to the Bluetooth device.

Top
Show:
 NameDescription
OnCharacteristicChanged

The event fires when a subscribed characteristic value has been changed.

OnConnect

The event fires when a connection to a remote device has been completed (with or without success). (Inherited from TwclClientConnection.)

OnDisconnect

The event fires when the remote connected device has been disconnected. (Inherited from TwclClientConnection.)

Top

An application must never create instances of this class directly. Instead of that an application must use related methods from the TwclBluetoothRadio object.