Rtos API example
Entry namespace for all BLE API definitions. More...
Data Structures | |
struct | ArrayView |
Immutable view to an array. More... | |
struct | attribute_handle_range_t |
Inclusive range of GATT attributes handles. 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. | |
Functions | |
template<typename T , size_t Size> | |
ArrayView< T > | make_ArrayView (T(&elements)[Size]) |
Generate an array view from a reference 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 > | make_const_ArrayView (T(&elements)[Size]) |
Generate a const array view from a reference 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. |
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 46 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 41 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:
-
begin Handle at the begining of the range. 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 109 of file BLETypes.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 222 of file ArrayView.h.
ArrayView<T> 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 203 of file ArrayView.h.
ArrayView<const T> 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 240 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 259 of file ArrayView.h.
Generated on Sun Jul 17 2022 08:25:42 by 1.7.2