QLowEnergyServiceData#
The QLowEnergyServiceData
class is used to set up GATT service data. More…
Synopsis#
Functions#
def
addCharacteristic
(characteristic)def
addIncludedService
(service)def
characteristics
()def
includedServices
()def
isValid
()def
__ne__
(b)def
__eq__
(b)def
setCharacteristics
(characteristics)def
setIncludedServices
(services)def
setType
(type)def
setUuid
(uuid)def
swap
(other)def
type
()def
uuid
()
Note
This documentation may contain snippets that were automatically translated from C++ to Python. We always welcome contributions to the snippet translation. If you see an issue with the translation, you can also let us know by creating a ticket on https:/bugreports.qt.io/projects/PYSIDE
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:
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:
characteristic –
PySide6.QtBluetooth.QLowEnergyCharacteristicData
Adds characteristic
to the list of characteristics, if it is valid.
See also
- PySide6.QtBluetooth.QLowEnergyServiceData.addIncludedService(service)#
- Parameters:
service –
PySide6.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.
See also
- PySide6.QtBluetooth.QLowEnergyServiceData.characteristics()#
- Return type:
Returns the list of characteristics.
See also
- PySide6.QtBluetooth.QLowEnergyServiceData.includedServices()#
- Return type:
Returns the list of included services.
See also
- PySide6.QtBluetooth.QLowEnergyServiceData.isValid()#
- Return type:
bool
Returns true
if this service is has a non-null UUID.
- PySide6.QtBluetooth.QLowEnergyServiceData.__ne__(b)#
- Parameters:
- 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:
- 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.
See also
- 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
.
See also
- PySide6.QtBluetooth.QLowEnergyServiceData.setType(type)#
- Parameters:
type –
ServiceType
Sets the type of this service to type
.
See also
- PySide6.QtBluetooth.QLowEnergyServiceData.setUuid(uuid)#
- Parameters:
Sets the UUID of this service to uuid
.
See also
- PySide6.QtBluetooth.QLowEnergyServiceData.swap(other)#
- Parameters:
Swaps this object with other
.
- PySide6.QtBluetooth.QLowEnergyServiceData.type()#
- Return type:
Returns the type of this service.
See also
- PySide6.QtBluetooth.QLowEnergyServiceData.uuid()#
- Return type:
Returns the UUID of this service.
See also