QLowEnergyServiceData#

The QLowEnergyServiceData class is used to set up GATT service data. More

Synopsis#

Functions#

Detailed Description#

An Object of this class provides a service to be added to a GATT server via addService() .

class PySide6.QtBluetooth.QLowEnergyServiceData#

PySide6.QtBluetooth.QLowEnergyServiceData(other)

Parameters

otherPySide6.QtBluetooth.QLowEnergyServiceData

Creates a new invalid object of this class.

Constructs a new object of this class that is a copy of other.

PySide6.QtBluetooth.QLowEnergyServiceData.ServiceType#

The type of GATT service.

Constant

Description

QLowEnergyServiceData.ServiceTypePrimary

The service is a primary service.

QLowEnergyServiceData.ServiceTypeSecondary

The service is a secondary service. Secondary services are included by other services to implement some higher-level functionality.

PySide6.QtBluetooth.QLowEnergyServiceData.addCharacteristic(characteristic)#
Parameters

characteristicPySide6.QtBluetooth.QLowEnergyCharacteristicData

Adds characteristic to the list of characteristics, if it is valid.

PySide6.QtBluetooth.QLowEnergyServiceData.addIncludedService(service)#
Parameters

servicePySide6.QtBluetooth.QLowEnergyService

Adds service to the list of included services. The service object must have been returned from a call to addService . This requirement prevents circular includes (which are forbidden by the Bluetooth specification), and also helps to support the use case of including more than one service of the same type.

PySide6.QtBluetooth.QLowEnergyServiceData.characteristics()#
Return type

Returns the list of characteristics.

PySide6.QtBluetooth.QLowEnergyServiceData.includedServices()#
Return type

Returns the list of included services.

PySide6.QtBluetooth.QLowEnergyServiceData.isValid()#
Return type

bool

Returns true if this service is has a non-null UUID.

PySide6.QtBluetooth.QLowEnergyServiceData.__ne__(b)#
Parameters

bPySide6.QtBluetooth.QLowEnergyServiceData

Return type

bool

Returns true if a and b are unequal with respect to their public state, otherwise returns false.

PySide6.QtBluetooth.QLowEnergyServiceData.__eq__(b)#
Parameters

bPySide6.QtBluetooth.QLowEnergyServiceData

Return type

bool

Returns true if a and b are equal with respect to their public state, otherwise returns false.

PySide6.QtBluetooth.QLowEnergyServiceData.setCharacteristics(characteristics)#
Parameters

characteristics

Sets the list of characteristics to characteristics. Only valid characteristics are considered.

PySide6.QtBluetooth.QLowEnergyServiceData.setIncludedServices(services)#
Parameters

services

Sets the list of included services to services. All objects in this list must have been returned from a call to addService .

PySide6.QtBluetooth.QLowEnergyServiceData.setType(type)#
Parameters

typeServiceType

Sets the type of this service to type.

See also

type()

PySide6.QtBluetooth.QLowEnergyServiceData.setUuid(uuid)#
Parameters

uuidPySide6.QtBluetooth.QBluetoothUuid

Sets the UUID of this service to uuid.

See also

uuid()

PySide6.QtBluetooth.QLowEnergyServiceData.swap(other)#
Parameters

otherPySide6.QtBluetooth.QLowEnergyServiceData

Swaps this object with other.

PySide6.QtBluetooth.QLowEnergyServiceData.type()#
Return type

ServiceType

Returns the type of this service.

See also

setType()

PySide6.QtBluetooth.QLowEnergyServiceData.uuid()#
Return type

PySide6.QtBluetooth.QBluetoothUuid

Returns the UUID of this service.

See also

setUuid()