Bluetooth Framework C++ Edition
|
Bluetooth Low Energy GATT server. More...
#include <wclBluetooth.h>
Public Member Functions | |
CwclGattServer () | |
Creates new component. | |
virtual | ~CwclGattServer () |
Frees the component. | |
int | Initialize (CwclBluetoothRadio *const Radio) |
Initializes Bluetooth LE GATT Server. | |
int | Uninitialize () |
Uninitializes the Bluetooth LE GATT Server. | |
int | Start () |
Starts the GATT server. | |
int | Stop () |
Stops the GATT server. | |
int | AddService (const wclGattUuid &Uuid, CwclGattLocalService *&Service) |
Creates new local GATT service and adds it to the services list. | |
int | ClearServices () |
Clears the local services list. | |
int | DeleteService (const size_t Index) |
Deletes the service with given index. | |
bool | GetInitialized () const |
Gets the server's state. | |
__declspec (property(get=GetInitialized)) bool Initialized | |
Gets the server's state. | |
CwclBluetoothRadio * | GetRadio () const |
Gets the server's owner. | |
__declspec (property(get=GetRadio)) CwclBluetoothRadio *Radio | |
Gets the server's owner. | |
bool | GetStarted () const |
Gets the server running status. | |
__declspec (property(get=GetStarted)) bool Started | |
Gets the server running status. | |
CwclGattLocalService * | GetServices (const size_t Index) const |
Gets the local GATT service by its index. | |
__declspec (property(get=GetServices)) CwclGattLocalService *Services[] | |
Gets the local GATT service by its index. | |
size_t | GetServicesCount () const |
Gets the services count. | |
__declspec (property(get=GetServicesCount)) size_t ServicesCount | |
Gets the services count. | |
CwclGattServerClient * | GetClients (const size_t Index) const |
Gets the GATT server client by its index. | |
__declspec (property(get=GetClients)) CwclGattServerClient *Clients[] | |
Gets the GATT server client by its index. | |
size_t | GetClientsCount () const |
Gets the clients count. | |
__declspec (property(get=GetClientsCount)) size_t ClientsCount | |
Gets the clients count. | |
__event void | OnClientConnected (void *Sender, CwclGattServerClient *const Client) |
The event fires when a client connected to the server. | |
__event void | OnClientDisconnected (void *Sender, CwclGattServerClient *const Client) |
The event fires when a client disconnected from the server. | |
__event void | OnConnectionParamsChanged (void *Sender, CwclGattServerClient *const Client) |
The event fires when the connection parameters changed. | |
__event void | OnConnectionPhyChanged (void *Sender, CwclGattServerClient *const Client) |
The event fires when the connection PHY changed. | |
__event void | OnMaxPduSizeChanged (void *Sender, CwclGattServerClient *const Client) |
The event fires when maximum PDU size changed for the connected client. | |
__event void | OnNotificationSizeChanged (void *Sender, CwclGattServerClient *const Client) |
The event fires when a maximum notification size of a subscribed client has been changed. | |
__event void | OnRead (void *Sender, CwclGattServerClient *const Client, CwclGattLocalCharacteristic *const Characteristic, CwclGattLocalCharacteristicReadRequest *const Request) |
The event fires when a remote GATT client requests characteristic's data read. | |
__event void | OnStarted (void *Sender) |
The event fires when the Bluetooth LE GATT Server has been successfully started. | |
__event void | OnStopped (void *Sender) |
The event fires when the Bluetooth LE GATT Server has been stopped. | |
__event void | OnSubscribed (void *Sender, CwclGattServerClient *const Client, CwclGattLocalCharacteristic *const Characteristic) |
The event fires when a remote GATT client subscribes to the characteristic changes notifications or indications. | |
__event void | OnUnsubscribed (void *Sender, CwclGattServerClient *const Client, CwclGattLocalCharacteristic *const Characteristic) |
The event fires when a remote GATT client unsubscribes from the characteristic changes notifications or indications. | |
__event void | OnWrite (void *Sender, CwclGattServerClient *const Client, CwclGattLocalCharacteristic *const Characteristic, CwclGattLocalCharacteristicWriteRequest *const Request) |
The event fires when a remote device writes data to the characteristic. | |
Public Member Functions inherited from CwclBluetoothComponent | |
CwclBluetoothComponent () | |
Creates a new component. | |
virtual | ~CwclBluetoothComponent () |
Frees the component. | |
Protected Member Functions | |
virtual void | DoClientConnected (CwclGattServerClient *const Client) |
Fires the OnClientConnected event. | |
virtual void | DoClientDisconnected (CwclGattServerClient *const Client) |
Fires the OnClientDisconnected event. | |
virtual void | DoConnectionParamsChanged (CwclGattServerClient *const Client) |
Fires the OnConnectionParamsChanged event. | |
virtual void | DoConnectionPhyChanged (CwclGattServerClient *const Client) |
Fires the OnConnectionPhyChanged event. | |
virtual void | DoMaxPduSizeChanged (CwclGattServerClient *const Client) |
Fires the OnMaxPduSizeChanged event. | |
virtual void | DoNotificationSizeChanged (CwclGattServerClient *const Client) |
Fires the OnNotificationSizeChanged event. | |
virtual void | DoRead (CwclGattServerClient *const Client, CwclGattLocalCharacteristic *const Characteristic, CwclGattLocalCharacteristicReadRequest *const Request) |
Fires the OnRead event. | |
virtual void | DoStarted () |
Fires the OnStarted event. | |
virtual void | DoStopped () |
Fires the OnStopped event. | |
virtual void | DoSubscribed (CwclGattServerClient *const Client, CwclGattLocalCharacteristic *const Characteristic) |
Fires the OnSubscribed event. | |
virtual void | DoUnsubscribed (CwclGattServerClient *const Client, CwclGattLocalCharacteristic *const Characteristic) |
Fires the OnUnsubscribed event. | |
virtual void | DoWrite (CwclGattServerClient *const Client, CwclGattLocalCharacteristic *const Characteristic, CwclGattLocalCharacteristicWriteRequest *const Request) |
Fires the OnWrite event. | |
Protected Member Functions inherited from CwclBluetoothComponent | |
void | SetCopy (CwclCustomConnection *const NewConnection) |
The method sets new copy of the current connection. | |
void | Enter () const |
Enters the Bluetooth component protection critical section. | |
void | Leave () const |
Leaves the Bluetooth component protection critical section. | |
Bluetooth Low Energy GATT server.
The TwclGattServer
component enables an application to act as GATT peripheral device.