Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
qlowenergyconnectionparameters.h
Go to the documentation of this file.
1// Copyright (C) 2016 The Qt Company Ltd.
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
3
4#ifndef QLOWENERGYCONNECTIONPARAMETERS_H
5#define QLOWENERGYCONNECTIONPARAMETERS_H
6
7#include <QtBluetooth/qtbluetoothglobal.h>
8#include <QtCore/qmetatype.h>
9#include <QtCore/qshareddata.h>
10
12
13class QLowEnergyConnectionParametersPrivate;
14
15class Q_BLUETOOTH_EXPORT QLowEnergyConnectionParameters
16{
17public:
18 QLowEnergyConnectionParameters();
19 QLowEnergyConnectionParameters(const QLowEnergyConnectionParameters &other);
20 ~QLowEnergyConnectionParameters();
21
22 QLowEnergyConnectionParameters &operator=(const QLowEnergyConnectionParameters &other);
23 friend bool operator==(const QLowEnergyConnectionParameters &a,
24 const QLowEnergyConnectionParameters &b)
25 {
26 return equals(a, b);
27 }
28 friend bool operator!=(const QLowEnergyConnectionParameters &a,
29 const QLowEnergyConnectionParameters &b)
30 {
31 return !equals(a, b);
32 }
33
34 void setIntervalRange(double minimum, double maximum);
35 double minimumInterval() const;
36 double maximumInterval() const;
37
38 void setLatency(int latency);
39 int latency() const;
40
41 void setSupervisionTimeout(int timeout);
42 int supervisionTimeout() const;
43
44 void swap(QLowEnergyConnectionParameters &other) noexcept { d.swap(other.d); }
45
46private:
47 static bool equals(const QLowEnergyConnectionParameters &a,
48 const QLowEnergyConnectionParameters &b);
49 QSharedDataPointer<QLowEnergyConnectionParametersPrivate> d;
50};
51
53
54QT_END_NAMESPACE
55
56QT_DECL_METATYPE_EXTERN(QLowEnergyConnectionParameters, Q_BLUETOOTH_EXPORT)
57
58#endif // Include guard
#define HCI_EVENT_PKT
static void hci_filter_all_events(struct hci_filter *f)
#define HCIGETDEVLIST
#define SIGNALING_CHANNEL_ID
#define SOL_HCI
static void hci_filter_set_ptype(int t, struct hci_filter *f)
#define HCI_FILTER
#define LE_LINK
#define ACL_LINK
QUuid::Id128Bytes BluezUint128
#define HCIGETCONNLIST
#define HCI_MAX_DEV
#define BTPROTO_HCI
#define HCI_EVENT_HDR_SIZE
#define ESCO_LINK
static void hci_filter_clear(struct hci_filter *f)
#define HCI_COMMAND_PKT
#define HCI_ACL_PKT
#define SCO_LINK
#define HCIGETDEVINFO
#define SECURITY_CHANNEL_ID
#define opCodePack(ogf, ocf)
#define HCI_MAX_EVENT_SIZE
bool sendConnectionUpdateCommand(quint16 handle, const QLowEnergyConnectionParameters &params)
bool sendCommand(QBluezConst::OpCodeGroupField ogf, QBluezConst::OpCodeCommandField ocf, const QByteArray &parameters)
void stopEvents()
Q_ENUM(HciEvent)
QList< quint16 > activeLowEnergyConnections() const
bool isValid() const
HciManager(const QBluetoothAddress &deviceAdapter)
bool sendConnectionParameterUpdateRequest(quint16 handle, const QLowEnergyConnectionParameters &params)
bool monitorEvent(HciManager::HciEvent event)
void commandCompleted(quint16 opCode, quint8 status, const QByteArray &data)
QBluetoothAddress addressForConnectionHandle(quint16 handle) const
bool monitorAclPackets()
void connectionUpdate(quint16 handle, const QLowEnergyConnectionParameters &parameters)
void connectionComplete(quint16 handle)
void signatureResolvingKeyReceived(quint16 connHandle, bool remoteKey, BluezUint128 csrk)
The QLowEnergyConnectionParameters class is used when requesting or reporting an update of the parame...
quint16 forceIntervalIntoRange(double connectionInterval)
ConnectionUpdateData connectionUpdateData(const QLowEnergyConnectionParameters &params)
QT_BEGIN_NAMESPACE Q_DECLARE_LOGGING_CATEGORY(lcEventDispatcher)