change event names

pull/9537/head
paul-szczepanek-arm 2019-01-15 14:26:30 +00:00
parent 356ec39d02
commit b6df6d54a1
6 changed files with 18 additions and 14 deletions

View File

@ -500,7 +500,7 @@ public:
* @param connectionHandle The handle of the connection that changed the size.
* @param attMtuSize
*/
virtual void onAttMtuChanged(
virtual void onAttMtuChange(
connection_handle_t connectionHandle,
uint16_t attMtuSize
)
@ -509,13 +509,17 @@ public:
/**
* 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 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.
*/
virtual void onPacketPayloadSizeChanged(
virtual void onDataLengthChange(
connection_handle_t connectionHandle,
uint16_t txSize,
uint16_t rxSize

View File

@ -632,7 +632,7 @@ private:
uint16_t att_mtu_size
);
virtual void on_packet_payload_size_changed(
virtual void on_data_length_change(
connection_handle_t connection_handle,
uint16_t tx_size,
uint16_t rx_size

View File

@ -45,7 +45,7 @@ struct Gap {
) = 0;
/**
* @copydoc Gap::EventHandler::onAttMtuChanged
* @copydoc Gap::EventHandler::onAttMtuChange
*/
virtual void on_att_mtu_changed(
connection_handle_t connection_handle,
@ -53,9 +53,9 @@ struct Gap {
) = 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,
uint16_t tx_size,
uint16_t rx_size

View File

@ -866,18 +866,18 @@ void GenericGap::on_att_mtu_changed(
)
{
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,
uint16_t tx_size,
uint16_t rx_size
)
{
if (_eventHandler) {
_eventHandler->onPacketPayloadSizeChanged(connection_handle, tx_size, rx_size);
_eventHandler->onDataLengthChange(connection_handle, tx_size, rx_size);
}
}

View File

@ -291,7 +291,7 @@ void BLE::device_manager_cb(dmEvt_t* dm_event)
ble::pal::Gap::EventHandler *handler;
handler = ble::pal::vendor::cordio::Gap::get_gap().get_event_handler();
if (handler) {
handler->on_packet_payload_size_changed(
handler->on_data_length_change(
dm_event->hdr.param,
dm_event->dataLenChange.maxTxOctets,
dm_event->dataLenChange.maxRxOctets

View File

@ -380,7 +380,7 @@ void btle_handler(const ble_evt_t *p_ble_evt)
const ble_gap_evt_data_length_update_t &update =
p_ble_evt->evt.gap_evt.params.data_length_update;
gap._eventHandler->onPacketPayloadSizeChanged(
gap._eventHandler->onDataLengthChange(
connection,
update.effective_params.max_tx_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 =
p_ble_evt->evt.gatts_evt.params.exchange_mtu_request;
gap._eventHandler->onAttMtuChanged(
gap._eventHandler->onAttMtuChange(
connection,
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 =
p_ble_evt->evt.gattc_evt.params.exchange_mtu_rsp;
gap._eventHandler->onAttMtuChanged(
gap._eventHandler->onAttMtuChange(
connection,
std::min(NRF_SDH_BLE_GATT_MAX_MTU_SIZE, (int)(update.server_rx_mtu))
);