Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: nRF51_Vdd TextLCD BME280
Entry namespace for all BLE API definitions. More...
Data Structures | |
struct | ArrayView |
Immutable view to an array. More... | |
struct | ArrayView< T, ARRAY_VIEW_DYNAMIC_SIZE > |
ArrayView specialisation that handle dynamic array size. More... | |
struct | attribute_handle_range_t |
Inclusive range of GATT attributes handles. More... | |
struct | link_encryption_t |
Type that describes link's encryption state. More... | |
struct | pairing_failure_t |
Type that describe a pairing failure. More... | |
struct | io_capability_t |
Type that describe the IO capability of a device; it is used during Pairing Feature exchange. More... | |
class | PasskeyAscii |
Passkey stored as a string of digits. More... | |
struct | address_t |
MAC address data type. More... | |
struct | random_address_type_t |
Type that describes a random device address type. More... | |
struct | att_security_requirement_t |
Security requirement that can be attached to an attribute operation. More... | |
struct | peer_address_type_t |
Type that describes a peer device address type. More... | |
struct | phy_t |
Type that describes a bluetooth PHY(sical) transport. More... | |
class | phy_set_t |
Type that describe a set of PHY(sical) transports. More... | |
struct | coded_symbol_per_bit_t |
Type describing the number of symbols per bit in le coded PHY. More... | |
struct | SafeEnum |
Helper class used to define safe enumerations. More... | |
Typedefs | |
typedef uintptr_t | connection_handle_t |
Opaque reference to a connection. | |
typedef uint16_t | attribute_handle_t |
Reference to an attribute in a GATT database. | |
typedef uint32_t | passkey_num_t |
Passkey stored as a number. | |
typedef byte_array_t< 16 > | irk_t |
128 bit keys used by paired devices | |
typedef byte_array_t< 2 > | ediv_t |
Used to identify LTK for legacy pairing connections. | |
typedef byte_array_t< 16 > | oob_tk_t |
Out of band data exchanged during pairing. | |
typedef byte_array_t< 16 > | oob_lesc_value_t |
secure connections oob random 128 value | |
typedef byte_array_t< 16 > | oob_confirm_t |
secure connections oob confirmation value | |
typedef byte_array_t< 16 > | encryption_block_t |
data to be encrypted | |
typedef byte_array_t< 32 > | public_key_coord_t |
public key coordinate, two of which define the public key | |
typedef byte_array_t< 32 > | dhkey_t |
Diffie-Hellman key. | |
typedef uint32_t | sign_count_t |
counter for signed data writes done by GattClient | |
Functions | |
template<typename T , ptrdiff_t LhsSize, ptrdiff_t RhsSize> | |
bool | operator== (const ArrayView< T, LhsSize > &lhs, const ArrayView< T, LhsSize > &rhs) |
Equality operator. | |
template<typename T , ptrdiff_t LhsSize, ptrdiff_t RhsSize> | |
bool | operator!= (const ArrayView< T, LhsSize > &lhs, const ArrayView< T, LhsSize > &rhs) |
Not equal operator. | |
template<typename T , size_t Size> | |
ArrayView< T, Size > | make_ArrayView (T(&elements)[Size]) |
Generate an array view from a reference to a C/C++ array. | |
template<size_t Size, typename T > | |
ArrayView< T, Size > | make_ArrayView (T *elements) |
Generate an array view from a pointer to a C/C++ array. | |
template<typename T > | |
ArrayView< T > | make_ArrayView (T *array_ptr, size_t array_size) |
Generate an array view from a C/C++ pointer and the size of the array. | |
template<typename T , size_t Size> | |
ArrayView< const T, Size > | make_const_ArrayView (T(&elements)[Size]) |
Generate a const array view from a reference to a C/C++ array. | |
template<size_t Size, typename T > | |
ArrayView< const T, Size > | make_const_ArrayView (const T *elements) |
Generate a const array view from a pointer to a C/C++ array. | |
template<typename T > | |
ArrayView< const T > | make_const_ArrayView (T *array_ptr, size_t array_size) |
Generate a const array view from a C/C++ pointer and the size of the array. | |
static attribute_handle_range_t | attribute_handle_range (attribute_handle_t begin, attribute_handle_t end) |
Construct an attribute_handle_range_t from its first and last attribute handle. | |
template<class byte_array_class > | |
bool | is_all_zeros (byte_array_class &byte_array) |
Returns true if every byte is equal to zero. | |
template<class byte_array_class > | |
void | set_all_zeros (byte_array_class &byte_array) |
Zero out all bytes. | |
template<size_t Size> | |
ArrayView< uint8_t, Size > | make_ArrayView (byte_array_t< Size > &src) |
Construct a fixed size ArrayView from a byte_array_t. | |
template<size_t Size> | |
ArrayView< const uint8_t, Size > | make_const_ArrayView (const byte_array_t< Size > &src) |
Construct a fixed size ArrayView from a const byte_array_t. |
Detailed Description
Entry namespace for all BLE API definitions.
Typedef Documentation
typedef uint16_t attribute_handle_t |
Reference to an attribute in a GATT database.
Definition at line 49 of file BLETypes.h.
typedef uintptr_t connection_handle_t |
Opaque reference to a connection.
Internally a connection handle is an unsigned integer capable of holding a pointer.
The real type (either a pointer to an object or an integer) is opaque for users and platform dependent.
Definition at line 44 of file BLETypes.h.
typedef byte_array_t<32> dhkey_t |
Diffie-Hellman key.
Definition at line 420 of file BLETypes.h.
typedef byte_array_t<2> ediv_t |
Used to identify LTK for legacy pairing connections.
Definition at line 405 of file BLETypes.h.
typedef byte_array_t<16> encryption_block_t |
data to be encrypted
Definition at line 414 of file BLETypes.h.
typedef byte_array_t<16> irk_t |
128 bit keys used by paired devices
Definition at line 400 of file BLETypes.h.
typedef byte_array_t<16> oob_confirm_t |
secure connections oob confirmation value
Definition at line 411 of file BLETypes.h.
typedef byte_array_t<16> oob_lesc_value_t |
secure connections oob random 128 value
Definition at line 410 of file BLETypes.h.
typedef byte_array_t<16> oob_tk_t |
Out of band data exchanged during pairing.
legacy pairing TK
Definition at line 409 of file BLETypes.h.
typedef uint32_t passkey_num_t |
Passkey stored as a number.
Definition at line 193 of file BLETypes.h.
typedef byte_array_t<32> public_key_coord_t |
public key coordinate, two of which define the public key
Definition at line 417 of file BLETypes.h.
typedef uint32_t sign_count_t |
counter for signed data writes done by GattClient
Definition at line 423 of file BLETypes.h.
Function Documentation
static attribute_handle_range_t ble::attribute_handle_range | ( | attribute_handle_t | begin, |
attribute_handle_t | end | ||
) | [static] |
Construct an attribute_handle_range_t from its first and last attribute handle.
- Parameters:
-
[in] begin Handle at the beginning of the range. [in] end Handle at the end of the range.
- Returns:
- An instance of attribute_handle_range_t where attribute_handle_range_t::begin is equal to begin and attribute_handle_range_t::end is equal to end.
- Note:
- This function is defined instead of a constructor to keep "POD-ness" of attribute_handle_range_t.
Definition at line 112 of file BLETypes.h.
bool ble::is_all_zeros | ( | byte_array_class & | byte_array ) |
Returns true if every byte is equal to zero.
Definition at line 270 of file BLETypes.h.
ArrayView<T, Size> ble::make_ArrayView | ( | T * | elements ) |
Generate an array view from a pointer to a C/C++ array.
- Template Parameters:
-
Size Number of items held in elements. T Type of elements held in elements.
- Parameters:
-
elements The reference to the array viewed.
- Returns:
- The ArrayView to elements.
- Note:
- This helper avoids the typing of template parameter when ArrayView is created 'inline'.
Definition at line 355 of file ArrayView.h.
ArrayView<T, Size> ble::make_ArrayView | ( | T(&) | elements[Size] ) |
Generate an array view from a reference to a C/C++ array.
- Template Parameters:
-
T Type of elements held in elements. Size Number of items held in elements.
- Parameters:
-
elements The reference to the array viewed.
- Returns:
- The ArrayView to elements.
- Note:
- This helper avoids the typing of template parameter when ArrayView is created 'inline'.
Definition at line 336 of file ArrayView.h.
ArrayView<T> ble::make_ArrayView | ( | T * | array_ptr, |
size_t | array_size | ||
) |
Generate an array view from a C/C++ pointer and the size of the array.
- Template Parameters:
-
T Type of elements held in array_ptr.
- Parameters:
-
array_ptr The pointer to the array to viewed. array_size The number of T elements in the array.
- Returns:
- The ArrayView to array_ptr with a size of array_size.
- Note:
- This helper avoids the typing of template parameter when ArrayView is created 'inline'.
Definition at line 374 of file ArrayView.h.
ArrayView<uint8_t, Size> ble::make_ArrayView | ( | byte_array_t< Size > & | src ) |
Construct a fixed size ArrayView from a byte_array_t.
- Parameters:
-
src byte_array_t to create a view from.
- Returns:
- An ArrayView to
src
.
Definition at line 381 of file BLETypes.h.
ArrayView<const uint8_t, Size> ble::make_const_ArrayView | ( | const byte_array_t< Size > & | src ) |
Construct a fixed size ArrayView from a const byte_array_t.
- Parameters:
-
src byte_array_t to create a view from.
- Returns:
- An ArrayView to
src
.
Definition at line 394 of file BLETypes.h.
ArrayView<const T, Size> ble::make_const_ArrayView | ( | const T * | elements ) |
Generate a const array view from a pointer to a C/C++ array.
- Template Parameters:
-
Size Number of items held in elements. T Type of elements held in elements.
- Parameters:
-
elements The reference to the array viewed.
- Returns:
- The ArrayView to elements.
- Note:
- This helper avoids the typing of template parameter when ArrayView is created 'inline'.
Definition at line 411 of file ArrayView.h.
ArrayView<const T> ble::make_const_ArrayView | ( | T * | array_ptr, |
size_t | array_size | ||
) |
Generate a const array view from a C/C++ pointer and the size of the array.
- Template Parameters:
-
T Type of elements held in array_ptr.
- Parameters:
-
array_ptr The pointer to the array to viewed. array_size The number of T elements in the array.
- Returns:
- The ArrayView to array_ptr with a size of array_size.
- Note:
- This helper avoids the typing of template parameter when ArrayView is created 'inline'.
Definition at line 430 of file ArrayView.h.
ArrayView<const T, Size> ble::make_const_ArrayView | ( | T(&) | elements[Size] ) |
Generate a const array view from a reference to a C/C++ array.
- Template Parameters:
-
T Type of elements held in elements. Size Number of items held in elements.
- Parameters:
-
elements The array viewed.
- Returns:
- The ArrayView to elements.
- Note:
- This helper avoids the typing of template parameter when ArrayView is created 'inline'.
Definition at line 392 of file ArrayView.h.
bool ble::operator!= | ( | const ArrayView< T, LhsSize > & | lhs, |
const ArrayView< T, LhsSize > & | rhs | ||
) |
Not equal operator.
- Parameters:
-
lhs Left hand side of the binary operation. rhs Right hand side of the binary operation.
- Returns:
- True if arrays in input do not have the same size or the same content and false otherwise.
Definition at line 316 of file ArrayView.h.
bool ble::operator== | ( | const ArrayView< T, LhsSize > & | lhs, |
const ArrayView< T, LhsSize > & | rhs | ||
) |
Equality operator.
- Parameters:
-
lhs Left hand side of the binary operation. rhs Right hand side of the binary operation.
- Returns:
- True if arrays in input have the same size and the same content and false otherwise.
Definition at line 293 of file ArrayView.h.
void ble::set_all_zeros | ( | byte_array_class & | byte_array ) |
Zero out all bytes.
Definition at line 283 of file BLETypes.h.
Generated on Tue Jul 12 2022 15:16:17 by
