File tree Expand file tree Collapse file tree 4 files changed +76
-0
lines changed Expand file tree Collapse file tree 4 files changed +76
-0
lines changed Original file line number Diff line number Diff line change @@ -492,6 +492,37 @@ class Gap {
492
492
{
493
493
}
494
494
495
+ /* *
496
+ * Function invoked when the connections changes the ATT_MTU which controls
497
+ * the maximum size of an attribute that can be read in a single L2CAP packet
498
+ * which might be fragmented across multiple packets.
499
+ *
500
+ * @param connectionHandle The handle of the connection that changed the size.
501
+ * @param attMtuSize
502
+ */
503
+ virtual void onAttMtuChanged (
504
+ connection_handle_t connectionHandle,
505
+ uint16_t attMtuSize
506
+ )
507
+ {
508
+ }
509
+
510
+ /* *
511
+ * Function invoked when the connections changes the maximum number of octets
512
+ * that can be sent or received by the controller in a single packet.
513
+ *
514
+ * @param connectionHandle The handle of the connection that changed the size.
515
+ * @param txSize Number of octets we can send on this connection in a single packet.
516
+ * @param rxSize Number of octets we can receive on this connection in a single packet.
517
+ */
518
+ virtual void onPacketPaylodSizeChanged (
519
+ connection_handle_t connectionHandle,
520
+ uint16_t txSize,
521
+ uint16_t rxSize
522
+ )
523
+ {
524
+ }
525
+
495
526
protected:
496
527
/* *
497
528
* Prevent polymorphic deletion and avoid unnecessary virtual destructor
Original file line number Diff line number Diff line change @@ -627,6 +627,17 @@ class GenericGap :
627
627
phy_t rx_phy
628
628
);
629
629
630
+ virtual void on_att_mtu_changed (
631
+ Handle_t connection_handle,
632
+ uint16_t att_mtu_size
633
+ );
634
+
635
+ virtual void on_packet_paylod_size_changed (
636
+ Handle_t connection_handle,
637
+ uint16_t tx_size,
638
+ uint16_t rx_size
639
+ );
640
+
630
641
virtual void on_phy_update_complete (
631
642
pal::hci_error_code_t hci_status,
632
643
Handle_t connection_handle,
Original file line number Diff line number Diff line change @@ -44,6 +44,23 @@ struct Gap {
44
44
ble::phy_t rx_phy
45
45
) = 0;
46
46
47
+ /* *
48
+ * @copydoc Gap::EventHandler::onAttMtuChanged
49
+ */
50
+ virtual void on_att_mtu_changed (
51
+ Handle_t connection_handle,
52
+ uint16_t att_mtu_size
53
+ ) = 0;
54
+
55
+ /* *
56
+ * @copydoc Gap::EventHandler::onPacketPaylodSizeChanged
57
+ */
58
+ virtual void on_packet_paylod_size_changed (
59
+ Handle_t connection_handle,
60
+ uint16_t tx_size,
61
+ uint16_t rx_size
62
+ ) = 0;
63
+
47
64
/* *
48
65
* @copydoc Gap::EventHandler::onPhyUpdateComplete
49
66
*/
Original file line number Diff line number Diff line change @@ -860,6 +860,23 @@ void GenericGap::on_read_phy(
860
860
}
861
861
}
862
862
863
+ void GenericGap::on_att_mtu_changed (
864
+ Handle_t connection_handle,
865
+ uint16_t att_mtu_size
866
+ )
867
+ {
868
+ onAttMtuChanged (connectionHandle, attMtuSize);
869
+ }
870
+
871
+ void GenericGap::on_packet_paylod_size_changed (
872
+ Handle_t connection_handle,
873
+ uint16_t tx_size,
874
+ uint16_t rx_size
875
+ )
876
+ {
877
+ onPacketPaylodSizeChanged (connectionHandle, txSize, rxSize);
878
+ }
879
+
863
880
void GenericGap::on_phy_update_complete (
864
881
pal::hci_error_code_t hci_status,
865
882
Handle_t connection_handle,
You can’t perform that action at this time.
0 commit comments