BlueToe
an alternative GATT/BLE implementation
|
#include <bluetoe/ll_meta_types.hpp>
#include <bluetoe/connection_events.hpp>
Go to the source code of this file.
Classes | |
struct | bluetoe::link_layer::peripheral_latency_configuration< Options > |
defines a peripheral configuration to be used by the link layer More... | |
class | bluetoe::link_layer::peripheral_latency_configuration_set< Configurations > |
allows the peripheral latency configuration to be changed at runtime between a given set of configurations. More... | |
Typedefs | |
using | bluetoe::link_layer::peripheral_latency_ignored = peripheral_latency_configuration< peripheral_latency::listen_always > |
Instructs the link layer to ignore peripheral latency. | |
using | bluetoe::link_layer::peripheral_latency_strict = peripheral_latency_configuration< peripheral_latency::listen_if_pending_transmit_data, peripheral_latency::listen_if_last_received_had_more_data > |
Configure the link layer to only listen every configured connection event. | |
using | bluetoe::link_layer::peripheral_latency_strict_plus = peripheral_latency_configuration< peripheral_latency::listen_if_last_received_not_empty, peripheral_latency::listen_if_last_received_had_more_data > |
Configure the link layer to just listen every configured connection event and on the next connection events if the previous connection event contained data from the central. | |
using | bluetoe::link_layer::periperal_latency_default_configuration = peripheral_latency_configuration< peripheral_latency::listen_if_pending_transmit_data, peripheral_latency::listen_if_unacknowledged_data, peripheral_latency::listen_if_last_received_not_empty, peripheral_latency::listen_if_last_transmitted_not_empty, peripheral_latency::listen_if_last_received_had_more_data > |
Default peripheral latency configuration. | |
Enumerations | |
enum class | bluetoe::link_layer::peripheral_latency { listen_if_pending_transmit_data , listen_if_unacknowledged_data , listen_if_last_received_not_empty , listen_if_last_transmitted_not_empty , listen_if_last_received_had_more_data , listen_always } |
detailed options for the peripheral latency behavior More... | |
This file provides several options, that allow users to configure Bluetoe's support for peripheral latency. Peripheral latency allows a link layer peripheral to ignore some connection events (do not respond to the central) to conserve power.
Each option is a compromise between latency and power consumption.
using bluetoe::link_layer::periperal_latency_default_configuration = typedef peripheral_latency_configuration< peripheral_latency::listen_if_pending_transmit_data, peripheral_latency::listen_if_unacknowledged_data, peripheral_latency::listen_if_last_received_not_empty, peripheral_latency::listen_if_last_transmitted_not_empty, peripheral_latency::listen_if_last_received_had_more_data > |
Default peripheral latency configuration.
This configuration is used by bluetoe::link_layer::link_layer.
using bluetoe::link_layer::peripheral_latency_ignored = typedef peripheral_latency_configuration< peripheral_latency::listen_always > |
Instructs the link layer to ignore peripheral latency.
The link layer will listen at every connection event and will respond at every connection event.
This option will provide lowest latency without any chance to conserve power.
using bluetoe::link_layer::peripheral_latency_strict = typedef peripheral_latency_configuration< peripheral_latency::listen_if_pending_transmit_data, peripheral_latency::listen_if_last_received_had_more_data > |
Configure the link layer to only listen every configured connection event.
The link layer will only listen to the central every "peripheral latency" + 1 connection events. If for example, the peripheral latency of the current connection is 4, the link layer will just listen to every 5th connection event.
If there is pending, outgoing data, the link layer will start to listen on the next possible connection event to be able to reply with the pending data. Also, if a received PDU has the more data (MD) flag beeing set, the link layer will start listening at the next connection event and transmit the pending data.
This option provided lowest power consumption while providing better transmitting latency compared to having a connection interval equal to peripheral latency + 1 * interval.
using bluetoe::link_layer::peripheral_latency_strict_plus = typedef peripheral_latency_configuration< peripheral_latency::listen_if_last_received_not_empty, peripheral_latency::listen_if_last_received_had_more_data > |
Configure the link layer to just listen every configured connection event and on the next connection events if the previous connection event contained data from the central.
This option extends the peripheral_latency_strict option by listening on subsequent events, if there was data received at the previous event.
This option provided lowest power consumption while providing better transmitting latency compared to having a connection interval equal to peripheral latency + 1 * interval. Compared to peripheral_latency_strict, this might increase the receiving bandwidth.
|
strong |
detailed options for the peripheral latency behavior
Every option defines a set of events / circumstances under which the link layer should listen at the very next connection event. Regardless of the selected options, the link layer always listens for incoming PDU at each peripheral latency anchor points, which were negotiated as part of the current connection parameters.