@@ -37,175 +37,54 @@ class ChainableGapEventHandler : public ble::Gap::EventHandler,
3737
3838 virtual ~ChainableGapEventHandler () { }
3939
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- */
4940 void onScanRequestReceived (const ble::ScanRequestEvent &event) override {
5041 execute_on_all (&ble::Gap::EventHandler::onScanRequestReceived, event);
5142 }
5243
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- */
6544 void onAdvertisingEnd (const ble::AdvertisingEndEvent &event) override {
6645 execute_on_all (&ble::Gap::EventHandler::onAdvertisingEnd, event);
6746 }
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+
7648 void onAdvertisingReport (const ble::AdvertisingReportEvent &event) override {
7749 execute_on_all (&ble::Gap::EventHandler::onAdvertisingReport, event);
7850 }
7951
80- /* *
81- * Called when scan times out.
82- *
83- * @param event Associated event.
84- *
85- * @see startScan()
86- */
8752 void onScanTimeout (const ble::ScanTimeoutEvent &event) override {
8853 execute_on_all (&ble::Gap::EventHandler::onScanTimeout, event);
8954 }
9055
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- */
10056 void onPeriodicAdvertisingSyncEstablished (
10157 const ble::PeriodicAdvertisingSyncEstablishedEvent &event) override {
10258 execute_on_all (&ble::Gap::EventHandler::onPeriodicAdvertisingSyncEstablished, event);
10359 }
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+
11461 void onPeriodicAdvertisingReport (
11562 const ble::PeriodicAdvertisingReportEvent &event) override {
11663 execute_on_all (&ble::Gap::EventHandler::onPeriodicAdvertisingReport, event);
11764 }
11865
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- */
12866 void onPeriodicAdvertisingSyncLoss (
12967 const ble::PeriodicAdvertisingSyncLoss &event) override {
13068 execute_on_all (&ble::Gap::EventHandler::onPeriodicAdvertisingSyncLoss, event);
13169 }
13270
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- */
14271 void onConnectionComplete (const ble::ConnectionCompleteEvent &event) override {
14372 execute_on_all (&ble::Gap::EventHandler::onConnectionComplete, event);
14473 }
14574
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- */
16375 void onUpdateConnectionParametersRequest (
16476 const ble::UpdateConnectionParametersRequestEvent &event) override {
16577 execute_on_all (&ble::Gap::EventHandler::onUpdateConnectionParametersRequest, event);
16678 }
16779
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- */
17680 void onConnectionParametersUpdateComplete (
17781 const ble::ConnectionParametersUpdateCompleteEvent &event) override {
17882 execute_on_all (&ble::Gap::EventHandler::onConnectionParametersUpdateComplete, event);
17983 }
18084
181- /* *
182- * Called when a connection has been disconnected.
183- *
184- * @param event Details of the event.
185- *
186- * @see disconnect()
187- */
18885 void onDisconnectionComplete (const ble::DisconnectionCompleteEvent &event) override {
18986 }
19087
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- */
20988 void onReadPhy (
21089 ble_error_t status,
21190 ble::connection_handle_t connectionHandle,
@@ -215,31 +94,6 @@ class ChainableGapEventHandler : public ble::Gap::EventHandler,
21594 connectionHandle, txPhy, rxPhy);
21695 }
21796
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- */
24397 void onPhyUpdateComplete (
24498 ble_error_t status,
24599 ble::connection_handle_t connectionHandle,
@@ -249,18 +103,6 @@ class ChainableGapEventHandler : public ble::Gap::EventHandler,
249103 connectionHandle, txPhy, rxPhy);
250104 }
251105
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- */
264106 void onDataLengthChange (
265107 ble::connection_handle_t connectionHandle,
266108 uint16_t txSize,
0 commit comments