esp-nimble-cpp 2.0.2
Loading...
Searching...
No Matches
NimBLERemoteDescriptor.h
1/*
2 * Copyright 2020-2024 Ryan Powell <ryan@nable-embedded.io> and
3 * esp-nimble-cpp, NimBLE-Arduino contributors.
4 *
5 * Licensed under the Apache License, Version 2.0 (the "License");
6 * you may not use this file except in compliance with the License.
7 * You may obtain a copy of the License at
8 *
9 * http://www.apache.org/licenses/LICENSE-2.0
10 *
11 * Unless required by applicable law or agreed to in writing, software
12 * distributed under the License is distributed on an "AS IS" BASIS,
13 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 * See the License for the specific language governing permissions and
15 * limitations under the License.
16 */
17
18#ifndef NIMBLE_CPP_REMOTE_DESCRIPTOR_H_
19#define NIMBLE_CPP_REMOTE_DESCRIPTOR_H_
20
21#include "nimconfig.h"
22#if defined(CONFIG_BT_ENABLED) && defined(CONFIG_BT_NIMBLE_ROLE_CENTRAL)
23
24# include "NimBLERemoteValueAttribute.h"
25
27class NimBLEClient;
28
32class NimBLERemoteDescriptor : public NimBLERemoteValueAttribute {
33 public:
35 std::string toString(void) const;
36 NimBLEClient* getClient() const override;
37
38 private:
39 friend class NimBLERemoteCharacteristic;
40
41 NimBLERemoteDescriptor(const NimBLERemoteCharacteristic* pRemoteCharacteristic, const ble_gatt_dsc* dsc);
42 ~NimBLERemoteDescriptor() = default;
43
44 const NimBLERemoteCharacteristic* m_pRemoteCharacteristic;
45};
46
47#endif /* CONFIG_BT_ENABLED && CONFIG_BT_NIMBLE_ROLE_CENTRAL */
48#endif /* NIMBLE_CPP_REMOTE_DESCRIPTOR_H_ */
A model of a BLE client.
Definition NimBLEClient.h:49
A model of a remote BLE characteristic.
Definition NimBLERemoteCharacteristic.h:34
A model of remote BLE descriptor.
Definition NimBLERemoteDescriptor.h:32
NimBLERemoteCharacteristic * getRemoteCharacteristic() const
Get the characteristic that owns this descriptor.
Definition NimBLERemoteDescriptor.cpp:38
std::string toString(void) const
Return a string representation of this Remote Descriptor.
Definition NimBLERemoteDescriptor.cpp:46