mirror of https://github.com/ARMmbed/mbed-os.git
change event names
parent
356ec39d02
commit
b6df6d54a1
|
@ -500,7 +500,7 @@ public:
|
||||||
* @param connectionHandle The handle of the connection that changed the size.
|
* @param connectionHandle The handle of the connection that changed the size.
|
||||||
* @param attMtuSize
|
* @param attMtuSize
|
||||||
*/
|
*/
|
||||||
virtual void onAttMtuChanged(
|
virtual void onAttMtuChange(
|
||||||
connection_handle_t connectionHandle,
|
connection_handle_t connectionHandle,
|
||||||
uint16_t attMtuSize
|
uint16_t attMtuSize
|
||||||
)
|
)
|
||||||
|
@ -509,13 +509,17 @@ public:
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Function invoked when the connections changes the maximum number of octets
|
* Function invoked when the connections changes the maximum number of octets
|
||||||
* that can be sent or received by the controller in a single packet.
|
* that can be sent or received by the controller in a single packet. A single
|
||||||
|
* L2CAP packet can be fragmented across many such packets.
|
||||||
|
*
|
||||||
|
* @note This only triggers if controller supports data length extension and
|
||||||
|
* negotiated data length is longer than the default 23.
|
||||||
*
|
*
|
||||||
* @param connectionHandle The handle of the connection that changed the size.
|
* @param connectionHandle The handle of the connection that changed the size.
|
||||||
* @param txSize Number of octets we can send on this connection in a single packet.
|
* @param txSize Number of octets we can send on this connection in a single packet.
|
||||||
* @param rxSize Number of octets we can receive on this connection in a single packet.
|
* @param rxSize Number of octets we can receive on this connection in a single packet.
|
||||||
*/
|
*/
|
||||||
virtual void onPacketPayloadSizeChanged(
|
virtual void onDataLengthChange(
|
||||||
connection_handle_t connectionHandle,
|
connection_handle_t connectionHandle,
|
||||||
uint16_t txSize,
|
uint16_t txSize,
|
||||||
uint16_t rxSize
|
uint16_t rxSize
|
||||||
|
|
|
@ -632,7 +632,7 @@ private:
|
||||||
uint16_t att_mtu_size
|
uint16_t att_mtu_size
|
||||||
);
|
);
|
||||||
|
|
||||||
virtual void on_packet_payload_size_changed(
|
virtual void on_data_length_change(
|
||||||
connection_handle_t connection_handle,
|
connection_handle_t connection_handle,
|
||||||
uint16_t tx_size,
|
uint16_t tx_size,
|
||||||
uint16_t rx_size
|
uint16_t rx_size
|
||||||
|
|
|
@ -45,7 +45,7 @@ struct Gap {
|
||||||
) = 0;
|
) = 0;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @copydoc Gap::EventHandler::onAttMtuChanged
|
* @copydoc Gap::EventHandler::onAttMtuChange
|
||||||
*/
|
*/
|
||||||
virtual void on_att_mtu_changed(
|
virtual void on_att_mtu_changed(
|
||||||
connection_handle_t connection_handle,
|
connection_handle_t connection_handle,
|
||||||
|
@ -53,9 +53,9 @@ struct Gap {
|
||||||
) = 0;
|
) = 0;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @copydoc Gap::EventHandler::onPacketPayloadSizeChanged
|
* @copydoc Gap::EventHandler::onDataLengthChange
|
||||||
*/
|
*/
|
||||||
virtual void on_packet_payload_size_changed(
|
virtual void on_data_length_change(
|
||||||
connection_handle_t connection_handle,
|
connection_handle_t connection_handle,
|
||||||
uint16_t tx_size,
|
uint16_t tx_size,
|
||||||
uint16_t rx_size
|
uint16_t rx_size
|
||||||
|
|
|
@ -866,18 +866,18 @@ void GenericGap::on_att_mtu_changed(
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
if (_eventHandler) {
|
if (_eventHandler) {
|
||||||
_eventHandler->onAttMtuChanged(connection_handle, att_mtu_size);
|
_eventHandler->onAttMtuChange(connection_handle, att_mtu_size);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void GenericGap::on_packet_payload_size_changed(
|
void GenericGap::on_data_length_change(
|
||||||
Handle_t connection_handle,
|
Handle_t connection_handle,
|
||||||
uint16_t tx_size,
|
uint16_t tx_size,
|
||||||
uint16_t rx_size
|
uint16_t rx_size
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
if (_eventHandler) {
|
if (_eventHandler) {
|
||||||
_eventHandler->onPacketPayloadSizeChanged(connection_handle, tx_size, rx_size);
|
_eventHandler->onDataLengthChange(connection_handle, tx_size, rx_size);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -291,7 +291,7 @@ void BLE::device_manager_cb(dmEvt_t* dm_event)
|
||||||
ble::pal::Gap::EventHandler *handler;
|
ble::pal::Gap::EventHandler *handler;
|
||||||
handler = ble::pal::vendor::cordio::Gap::get_gap().get_event_handler();
|
handler = ble::pal::vendor::cordio::Gap::get_gap().get_event_handler();
|
||||||
if (handler) {
|
if (handler) {
|
||||||
handler->on_packet_payload_size_changed(
|
handler->on_data_length_change(
|
||||||
dm_event->hdr.param,
|
dm_event->hdr.param,
|
||||||
dm_event->dataLenChange.maxTxOctets,
|
dm_event->dataLenChange.maxTxOctets,
|
||||||
dm_event->dataLenChange.maxRxOctets
|
dm_event->dataLenChange.maxRxOctets
|
||||||
|
|
|
@ -380,7 +380,7 @@ void btle_handler(const ble_evt_t *p_ble_evt)
|
||||||
const ble_gap_evt_data_length_update_t &update =
|
const ble_gap_evt_data_length_update_t &update =
|
||||||
p_ble_evt->evt.gap_evt.params.data_length_update;
|
p_ble_evt->evt.gap_evt.params.data_length_update;
|
||||||
|
|
||||||
gap._eventHandler->onPacketPayloadSizeChanged(
|
gap._eventHandler->onDataLengthChange(
|
||||||
connection,
|
connection,
|
||||||
update.effective_params.max_tx_octets,
|
update.effective_params.max_tx_octets,
|
||||||
update.effective_params.max_rx_octets
|
update.effective_params.max_rx_octets
|
||||||
|
@ -400,7 +400,7 @@ void btle_handler(const ble_evt_t *p_ble_evt)
|
||||||
const ble_gatts_evt_exchange_mtu_request_t &update =
|
const ble_gatts_evt_exchange_mtu_request_t &update =
|
||||||
p_ble_evt->evt.gatts_evt.params.exchange_mtu_request;
|
p_ble_evt->evt.gatts_evt.params.exchange_mtu_request;
|
||||||
|
|
||||||
gap._eventHandler->onAttMtuChanged(
|
gap._eventHandler->onAttMtuChange(
|
||||||
connection,
|
connection,
|
||||||
std::min(NRF_SDH_BLE_GATT_MAX_MTU_SIZE, (int)(update.client_rx_mtu))
|
std::min(NRF_SDH_BLE_GATT_MAX_MTU_SIZE, (int)(update.client_rx_mtu))
|
||||||
);
|
);
|
||||||
|
@ -415,7 +415,7 @@ void btle_handler(const ble_evt_t *p_ble_evt)
|
||||||
const ble_gattc_evt_exchange_mtu_rsp_t &update =
|
const ble_gattc_evt_exchange_mtu_rsp_t &update =
|
||||||
p_ble_evt->evt.gattc_evt.params.exchange_mtu_rsp;
|
p_ble_evt->evt.gattc_evt.params.exchange_mtu_rsp;
|
||||||
|
|
||||||
gap._eventHandler->onAttMtuChanged(
|
gap._eventHandler->onAttMtuChange(
|
||||||
connection,
|
connection,
|
||||||
std::min(NRF_SDH_BLE_GATT_MAX_MTU_SIZE, (int)(update.server_rx_mtu))
|
std::min(NRF_SDH_BLE_GATT_MAX_MTU_SIZE, (int)(update.server_rx_mtu))
|
||||||
);
|
);
|
||||||
|
|
Loading…
Reference in New Issue