@@ -37,175 +37,54 @@ class ChainableGapEventHandler : public ble::Gap::EventHandler,
37
37
38
38
virtual ~ChainableGapEventHandler () { }
39
39
40
- /* *
41
- * Called when an advertising device receive a scan response.
42
- *
43
- * @param event Scan request event.
44
- *
45
- * @version: 5+.
46
- *
47
- * @see AdvertisingParameters::setScanRequestNotification().
48
- */
49
40
void onScanRequestReceived (const ble::ScanRequestEvent &event) override {
50
41
execute_on_all (&ble::Gap::EventHandler::onScanRequestReceived, event);
51
42
}
52
43
53
- /* *
54
- * Called when advertising ends.
55
- *
56
- * Advertising ends when the process timeout or if it is stopped by the
57
- * application or if the local device accepts a connection request.
58
- *
59
- * @param event Advertising end event.
60
- *
61
- * @see startAdvertising()
62
- * @see stopAdvertising()
63
- * @see onConnectionComplete()
64
- */
65
44
void onAdvertisingEnd (const ble::AdvertisingEndEvent &event) override {
66
45
execute_on_all (&ble::Gap::EventHandler::onAdvertisingEnd, event);
67
46
}
68
-
69
- /* *
70
- * Called when a scanner receives an advertising or a scan response packet.
71
- *
72
- * @param event Advertising report.
73
- *
74
- * @see startScan()
75
- */
47
+
76
48
void onAdvertisingReport (const ble::AdvertisingReportEvent &event) override {
77
49
execute_on_all (&ble::Gap::EventHandler::onAdvertisingReport, event);
78
50
}
79
51
80
- /* *
81
- * Called when scan times out.
82
- *
83
- * @param event Associated event.
84
- *
85
- * @see startScan()
86
- */
87
52
void onScanTimeout (const ble::ScanTimeoutEvent &event) override {
88
53
execute_on_all (&ble::Gap::EventHandler::onScanTimeout, event);
89
54
}
90
55
91
- /* *
92
- * Called when first advertising packet in periodic advertising is received.
93
- *
94
- * @param event Periodic advertising sync event.
95
- *
96
- * @version: 5+.
97
- *
98
- * @see createSync()
99
- */
100
56
void onPeriodicAdvertisingSyncEstablished (
101
57
const ble::PeriodicAdvertisingSyncEstablishedEvent &event) override {
102
58
execute_on_all (&ble::Gap::EventHandler::onPeriodicAdvertisingSyncEstablished, event);
103
59
}
104
-
105
- /* *
106
- * Called when a periodic advertising packet is received.
107
- *
108
- * @param event Periodic advertisement event.
109
- *
110
- * @version: 5+.
111
- *
112
- * @see createSync()
113
- */
60
+
114
61
void onPeriodicAdvertisingReport (
115
62
const ble::PeriodicAdvertisingReportEvent &event) override {
116
63
execute_on_all (&ble::Gap::EventHandler::onPeriodicAdvertisingReport, event);
117
64
}
118
65
119
- /* *
120
- * Called when a periodic advertising sync has been lost.
121
- *
122
- * @param event Details of the event.
123
- *
124
- * @version: 5+.
125
- *
126
- * @see createSync()
127
- */
128
66
void onPeriodicAdvertisingSyncLoss (
129
67
const ble::PeriodicAdvertisingSyncLoss &event) override {
130
68
execute_on_all (&ble::Gap::EventHandler::onPeriodicAdvertisingSyncLoss, event);
131
69
}
132
70
133
- /* *
134
- * Called when connection attempt ends or an advertising device has been
135
- * connected.
136
- *
137
- * @see startAdvertising()
138
- * @see connect()
139
- *
140
- * @param event Connection event.
141
- */
142
71
void onConnectionComplete (const ble::ConnectionCompleteEvent &event) override {
143
72
execute_on_all (&ble::Gap::EventHandler::onConnectionComplete, event);
144
73
}
145
74
146
- /* *
147
- * Called when the peer request connection parameters updates.
148
- *
149
- * Application must accept the update with acceptConnectionParametersUpdate()
150
- * or reject it with rejectConnectionParametersUpdate().
151
- *
152
- * @param event The connection parameters requested by the peer.
153
- *
154
- * @version 4.1+.
155
- *
156
- * @note This event is not generated if connection parameters update
157
- * is managed by the middleware.
158
- *
159
- * @see manageConnectionParametersUpdateRequest()
160
- * @see acceptConnectionParametersUpdate()
161
- * @see rejectConnectionParametersUpdate()
162
- */
163
75
void onUpdateConnectionParametersRequest (
164
76
const ble::UpdateConnectionParametersRequestEvent &event) override {
165
77
execute_on_all (&ble::Gap::EventHandler::onUpdateConnectionParametersRequest, event);
166
78
}
167
79
168
- /* *
169
- * Called when connection parameters have been updated.
170
- *
171
- * @param event The new connection parameters.
172
- *
173
- * @see updateConnectionParameters()
174
- * @see acceptConnectionParametersUpdate()
175
- */
176
80
void onConnectionParametersUpdateComplete (
177
81
const ble::ConnectionParametersUpdateCompleteEvent &event) override {
178
82
execute_on_all (&ble::Gap::EventHandler::onConnectionParametersUpdateComplete, event);
179
83
}
180
84
181
- /* *
182
- * Called when a connection has been disconnected.
183
- *
184
- * @param event Details of the event.
185
- *
186
- * @see disconnect()
187
- */
188
85
void onDisconnectionComplete (const ble::DisconnectionCompleteEvent &event) override {
189
86
}
190
87
191
- /* *
192
- * Function invoked when the current transmitter and receiver PHY have
193
- * been read for a given connection.
194
- *
195
- * @param status Status of the operation: BLE_ERROR_NONE in case of
196
- * success or an appropriate error code.
197
- *
198
- * @param connectionHandle: The handle of the connection for which the
199
- * PHYs have been read.
200
- *
201
- * @param txPhy PHY used by the transmitter.
202
- *
203
- * @param rxPhy PHY used by the receiver.
204
- *
205
- * @see readPhy().
206
- *
207
- * @version: 5+.
208
- */
209
88
void onReadPhy (
210
89
ble_error_t status,
211
90
ble::connection_handle_t connectionHandle,
@@ -215,31 +94,6 @@ class ChainableGapEventHandler : public ble::Gap::EventHandler,
215
94
connectionHandle, txPhy, rxPhy);
216
95
}
217
96
218
- /* *
219
- * Function invoked when the update process of the PHY has been completed.
220
- *
221
- * The process can be initiated by a call to the function setPhy, the
222
- * local bluetooth subsystem or the peer.
223
- *
224
- * @param status Status of the operation: BLE_ERROR_NONE in case of
225
- * success or an appropriate error code.
226
- *
227
- * @param connectionHandle: The handle of the connection on which the
228
- * operation was made.
229
- *
230
- * @param txPhy PHY used by the transmitter.
231
- *
232
- * @param rxPhy PHY used by the receiver.
233
- *
234
- * @note Success doesn't mean the PHY has been updated it means both
235
- * ends have negotiated the best PHY according to their configuration and
236
- * capabilities. The PHY currently used are present in the txPhy and
237
- * rxPhy parameters.
238
- *
239
- * @see setPhy()
240
- *
241
- * @version: 5+.
242
- */
243
97
void onPhyUpdateComplete (
244
98
ble_error_t status,
245
99
ble::connection_handle_t connectionHandle,
@@ -249,18 +103,6 @@ class ChainableGapEventHandler : public ble::Gap::EventHandler,
249
103
connectionHandle, txPhy, rxPhy);
250
104
}
251
105
252
- /* *
253
- * Function invoked when the connections changes the maximum number of octets
254
- * that can be sent or received by the controller in a single packet. A single
255
- * L2CAP packet can be fragmented across many such packets.
256
- *
257
- * @note This only triggers if controller supports data length extension and
258
- * negotiated data length is longer than the default 23.
259
- *
260
- * @param connectionHandle The handle of the connection that changed the size.
261
- * @param txSize Number of octets we can send on this connection in a single packet.
262
- * @param rxSize Number of octets we can receive on this connection in a single packet.
263
- */
264
106
void onDataLengthChange (
265
107
ble::connection_handle_t connectionHandle,
266
108
uint16_t txSize,
0 commit comments