TwclGattServer Class

Bluetooth Low Energy GATT server.

Namespace: wclBluetooth
TComponent
  wclBluetooth.TwclBluetoothComponent
    wclBluetooth.TwclGattServer
type
 TwclGattServer = class(TwclBluetoothComponent)
 end;

The TwclGattServer type exposes the following members.

Show:
 NameDescription
Create(TComponent)

Creates new component. (Overrides TwclBluetoothComponent.Create(TComponent).)

Destroy

Frees the component. (Overrides TwclBluetoothComponent.Destroy.)

Top
Show:
 NameDescription
ClientsCount

Gets the clients count.

Clients[Integer]

Gets the GATT server client by its index.

Initialized

Gets the server's state.

OnStarted

The event fires when the Bluetooth LE GATT Server has been successfully started.

OnStopped

The event fires when the Bluetooth LE GATT Server has been stopped.

Radio

Gets the server's owner.

ServicesCount

Gets the services count.

Services[Integer]

Gets the local GATT service by its index.

Started

Gets the server running status.

Top
Show:
 NameDescription
AddService(TwclGattUuid,TwclGattLocalService)

Creates new local GATT service and adds it to the services list.

ClearServices

Clears the local services list.

DeleteService(Integer)

Deletes the service with given index.

DoClientConnected(TwclGattServerClient)

Fires the OnClientConnected event.

DoClientDisconnected(TwclGattServerClient)

Fires the OnClientDisconnected event.

DoConnectionParamsChanged(TwclGattServerClient)

Fires the OnConnectionParamsChanged event.

DoConnectionPhyChanged(TwclGattServerClient)

Fires the OnConnectionPhyChanged event.

DoMaxPduSizeChanged(TwclGattServerClient)

Fires the OnMaxPduSizeChanged event.

DoNotificationSizeChanged(TwclGattServerClient)

Fires the OnNotificationSizeChanged event.

DoRead(TwclGattServerClient,TwclGattLocalCharacteristic,TwclGattLocalCharacteristicReadRequest)

Fires the OnRead event.

DoStarted

Fires the OnStarted event.

DoStopped

Fires the OnStopped event.

DoSubscribed(TwclGattServerClient,TwclGattLocalCharacteristic)

Fires the OnSubscribed event.

DoUnsubscribed(TwclGattServerClient,TwclGattLocalCharacteristic)

Fires the OnUnsubscribed event.

DoWrite(TwclGattServerClient,TwclGattLocalCharacteristic,TwclGattLocalCharacteristicWriteRequest)

Fires the OnWrite event.

Enter

Enters the Bluetooth component protection critical section. (Inherited from TwclBluetoothComponent.)

Initialize(TwclBluetoothRadio)

Initializes Bluetooth LE GATT Server.

Leave

Leaves the Bluetooth component protection critical section. (Inherited from TwclBluetoothComponent.)

SetCopy(TwclCustomConnection)

The method sets new copy of the current connection. (Inherited from TwclBluetoothComponent.)

Start

Starts the GATT server.

Stop

Stops the GATT server.

Uninitialize

Unintializes the Bluetooth LE GATT Server.

Top
Show:
 NameDescription
OnClientConnected

The event fires when a client connected to the server.

OnClientDisconnected

The event fires when a client disconnected from the server.

OnConnectionParamsChanged

The event fires when the connection parameters changed.

OnConnectionPhyChanged

The event fires when the connection PHY changed.

OnMaxPduSizeChanged

The event fires when maximum PDU size changed for the connected client.

OnNotificationSizeChanged

The event fires when a maximum notification size of a subscribed client has been changed.

OnRead

The event fires when a remote GATT client requests characteristic's data read.

OnSubscribed

The event fires when a remote GATT client subscribes to the characteristic changes notifications or indications.

OnUnsubscribed

The event fires when a remote GATT client unsubscribes from the characteristic changes notifications or indications.

OnWrite

The event fires when a remote device writes data to the characteristic.

Top

The TwclGattServer component enables an application to act as GATT peripheral device.