IdentifiantMot de passe
Loading...
Mot de passe oublié ?Je m'inscris ! (gratuit)

QLowEnergyServiceData Class

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

This class was introduced in Qt 5.7.

Article lu   fois.

L'auteur

Liens sociaux

Viadeo Twitter Facebook Share on Google+   

QLowEnergyServiceData Class▲

  • Header: QLowEnergyServiceData

  • Since: Qt 5.7

  • qmake: QT += bluetooth

  • Group: QLowEnergyServiceData is part of shared

Detailed Description▲

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

Member Type Documentation▲

 

enum QLowEnergyServiceData::ServiceType▲

The type of GATT service.

Constant

Value

Description

QLowEnergyServiceData::ServiceTypePrimary

0x2800

The service is a primary service.

QLowEnergyServiceData::ServiceTypeSecondary

0x2801

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

Member Function Documentation▲

 

QLowEnergyServiceData::QLowEnergyServiceData()▲

Creates a new invalid object of this class.

QLowEnergyServiceData::QLowEnergyServiceData(const QLowEnergyServiceData &other)▲

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

QLowEnergyServiceData::~QLowEnergyServiceData()▲

Destroys this object.

void QLowEnergyServiceData::addCharacteristic(const QLowEnergyCharacteristicData &characteristic)▲

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

See Also▲

See also setCharacteristics()

void QLowEnergyServiceData::addIncludedService(QLowEnergyService *service)▲

Adds service to the list of included services. The service object must have been returned from a call to QLowEnergyController::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▲

See also setIncludedServices()

QList<QLowEnergyCharacteristicData> QLowEnergyServiceData::characteristics() const▲

Returns the list of characteristics.

See Also▲

See also setCharacteristics()

QList<QLowEnergyService *> QLowEnergyServiceData::includedServices() const▲

Returns the list of included services.

See Also▲

See also setIncludedServices()

bool QLowEnergyServiceData::isValid() const▲

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

void QLowEnergyServiceData::setCharacteristics(const QList<QLowEnergyCharacteristicData> &characteristics)▲

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

See Also▲

void QLowEnergyServiceData::setIncludedServices(const QList<QLowEnergyService *> &services)▲

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

See Also▲

void QLowEnergyServiceData::setType(QLowEnergyServiceData::ServiceType type)▲

Sets the type of this service to type.

See Also▲

See also type()

void QLowEnergyServiceData::setUuid(const QBluetoothUuid &uuid)▲

Sets the UUID of this service to uuid.

See Also▲

See also uuid()

void QLowEnergyServiceData::swap(QLowEnergyServiceData &other)▲

Swaps this object with other.

QLowEnergyServiceData::ServiceType QLowEnergyServiceData::type() const▲

Returns the type of this service.

See Also▲

See also setType()

QBluetoothUuid QLowEnergyServiceData::uuid() const▲

Returns the UUID of this service.

See Also▲

See also setUuid()

QLowEnergyServiceData &QLowEnergyServiceData::operator=(const QLowEnergyServiceData &other)▲

Makes this object a copy of other and returns the new value of this object.

Related Non-Members▲

 

bool operator!=(const QLowEnergyServiceData &a, const QLowEnergyServiceData &b)▲

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

bool operator==(const QLowEnergyServiceData &a, const QLowEnergyServiceData &b)▲

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

Vous avez aimé ce tutoriel ? Alors partagez-le en cliquant sur les boutons suivants : Viadeo Twitter Facebook Share on Google+