Mistake on this page?
Report an issue in GitHub or email us
Data Structures | Typedefs | Functions | Variables
ble Namespace Reference

Entry namespace for all BLE API definitions. More...

Data Structures

struct  address_t
 MAC address data type. More...
 
struct  adv_data_appearance_t
 Enumeration of values for the adv_data_type_t::APPEARANCE. More...
 
struct  adv_data_flags_t
 Set of advertising flags. More...
 
struct  adv_data_type_t
 
struct  advertising_data_status_t
 Used to indicate if the packet is complete and if it's truncated. More...
 
struct  advertising_event_t
 Properties of an advertising event. More...
 
struct  advertising_filter_policy_t
 Advertising policy filter modes. More...
 
struct  advertising_type_t
 Encapsulates the peripheral advertising modes. More...
 
class  AdvertisingDataBuilder
 Build advertising data. More...
 
class  AdvertisingDataParser
 Parse and iterate over advertising data. More...
 
class  AdvertisingDataSimpleBuilder
 Build advertising data. More...
 
struct  AdvertisingEndEvent
 Event produced when advertising ends. More...
 
class  AdvertisingParameters
 Parameters defining the advertising process. More...
 
struct  AdvertisingReportEvent
 Event generated when an advertising packet is seen during passive scanning or a scan response is received during active scanning. More...
 
struct  ArrayView
 Immutable view to an array. More...
 
struct  ArrayView< T,-1 >
 ArrayView specialisation that handle dynamic array size. More...
 
struct  att_security_requirement_t
 Security requirement that can be attached to an attribute operation. More...
 
struct  attribute_handle_range_t
 Inclusive range of GATT attributes handles. More...
 
struct  Bounded
 Restrict values of an integer type to a defined range. More...
 
struct  byte_array_t
 Model fixed size array values. More...
 
struct  central_privay_configuration_t
 Privacy configuration of the central role. More...
 
struct  clock_accuracy_t
 Accuracy of the master clock. More...
 
struct  coded_symbol_per_bit_t
 Type describing the number of symbols per bit in le coded PHY. More...
 
struct  connection_role_t
 Enumeration of GAP roles. More...
 
struct  ConnectionCompleteEvent
 Event generated when a connection initiation ends (successfully or not). More...
 
class  ConnectionParameters
 Parameters defining the connection initiation process. More...
 
struct  ConnectionParametersUpdateCompleteEvent
 Event received when connection parameters have been updated. More...
 
struct  controller_supported_features_t
 Features supported by the controller. More...
 
struct  disconnection_reason_t
 Enumeration of disconnection reasons received in a disconnection event. More...
 
struct  DisconnectionCompleteEvent
 Event produced when a disconnection is complete. More...
 
struct  duplicates_filter_t
 Scanning policy filter mode. More...
 
struct  Duration
 Model BLE durations. More...
 
class  Gap
 Define device discovery, connection and link management procedures. More...
 
struct  initiator_filter_policy_t
 Filter policy that you can use during connection initiation. More...
 
struct  io_capability_t
 Type that describe the IO capability of a device; it is used during Pairing Feature exchange. More...
 
struct  link_encryption_t
 Type that describes link's encryption state. More...
 
struct  local_disconnection_reason_t
 Enumeration of disconnection reasons that should be transmited to the peer. More...
 
struct  own_address_type_t
 Type used to model the own address used during the following GAP operations: advertising, scanning and initiating. More...
 
struct  pairing_failure_t
 Type that describe a pairing failure. More...
 
class  PasskeyAscii
 Passkey stored as a string of digits. More...
 
struct  peer_address_type_t
 Type that describes a peer device address type. More...
 
struct  PeriodicAdvertisingReportEvent
 Event generated when periodic advertising packet is received. More...
 
struct  PeriodicAdvertisingSyncEstablishedEvent
 Event generated when you first receive a periodic advertisement. More...
 
struct  PeriodicAdvertisingSyncLoss
 Event generated when periodic advertising sync is lost. More...
 
struct  peripheral_privacy_configuration_t
 Privacy Configuration of the peripheral role. More...
 
class  phy_set_t
 Type that describe a set of PHY(sical) transports. More...
 
struct  phy_t
 Type that describes a bluetooth PHY(sical) transport. More...
 
struct  random_address_type_t
 Type that describes a random device address type. More...
 
struct  SafeEnum
 Helper class used to define safe enumerations. More...
 
struct  scanning_filter_policy_t
 Scanning policy filter mode. More...
 
class  ScanParameters
 Parameters defining the scan process. More...
 
struct  ScanRequestEvent
 Event produced when a peer requests a scan response from the advertiser. More...
 
struct  ScanTimeoutEvent
 Event generated when scan times out. More...
 
struct  target_peer_address_type_t
 Type of an address to connect to. More...
 
struct  UpdateConnectionParametersRequestEvent
 Event received when a peer wants to change the connection parameters. More...
 

Typedefs

typedef uintptr_t connection_handle_t
 Opaque reference to a connection. More...
 
typedef uint16_t attribute_handle_t
 Reference to an attribute in a GATT database. More...
 
typedef uint32_t passkey_num_t
 Passkey stored as a number. More...
 
typedef byte_array_t< 16 > irk_t
 128 bit keys used by paired devices More...
 
typedef byte_array_t< 2 > ediv_t
 Used to identify LTK for legacy pairing connections. More...
 
typedef byte_array_t< 16 > oob_tk_t
 Out of band data exchanged during pairing. More...
 
typedef byte_array_t< 16 > oob_lesc_value_t
 secure connections oob random 128 value More...
 
typedef byte_array_t< 16 > oob_confirm_t
 secure connections oob confirmation value More...
 
typedef byte_array_t< 16 > encryption_block_t
 data to be encrypted More...
 
typedef byte_array_t< 32 > public_key_coord_t
 public key coordinate, two of which define the public key More...
 
typedef byte_array_t< 32 > dhkey_t
 Diffie-Hellman key. More...
 
typedef uint32_t sign_count_t
 counter for signed data writes done by GattClient More...
 
typedef Duration< uint32_t, 1 > microsecond_t
 Type that represents micro seconds. More...
 
typedef Duration< uint32_t, 1000 *microsecond_t::TIME_BASEmillisecond_t
 Type that represents milliseconds. More...
 
typedef Duration< uint32_t, 1000 *millisecond_t::TIME_BASEsecond_t
 Type that represents seconds. More...
 
typedef Duration< uint32_t, 625, Range< 0x20, 0xFFFFFF > > adv_interval_t
 Time interval between two advertisements. More...
 
typedef Duration< uint16_t, 10000, Range< 0x00, 0xFFFF >, Value< uint16_t, 0x0000 > > adv_duration_t
 Advertising process duration. More...
 
typedef Duration< uint16_t, 10000, Range< 0x00, 0xFFFF >, Value< uint16_t, 0x0000 > > scan_duration_t
 Scan process duration. More...
 
typedef Duration< uint16_t, 1280000, Range< 0x00, 0xFFFF > > scan_period_t
 Time interval between two scan processes. More...
 
typedef Duration< uint16_t, 625, Range< 0x04, 0xFFFF > > scan_interval_t
 Time interval between two scans. More...
 
typedef Duration< uint16_t, 625, Range< 0x04, 0xFFFF > > scan_window_t
 Duration of a scan. More...
 
typedef Duration< uint16_t, 1250, Range< 0x06, 0x0C80 > > conn_interval_t
 Time interval between two connection events. More...
 
typedef Duration< uint16_t, 10000, Range< 0x0A, 0x0C80 > > supervision_timeout_t
 Time after which a connection is loss of devices have not exchanged data. More...
 
typedef Duration< uint16_t, 625, Range< 0, 0xFFFF > > conn_event_length_t
 Duration of a connection event. More...
 
typedef Duration< uint16_t, 10000, Range< 0x0A, 0x4000 > > sync_timeout_t
 Time after which a periodic sync link is considered lost if the receiver hasn't received anything from the advertiser. More...
 
typedef Duration< uint16_t, 1250, Range< 0x06, 0xFFFF > > periodic_interval_t
 Interval between two periodic advertising events. More...
 
typedef Bounded< uint16_t, 0, 0x01F3 > slave_latency_t
 Number of connection events that can be skipped by the slave. More...
 
typedef uint8_t advertising_handle_t
 Handle of an advertising set. More...
 
typedef uint16_t periodic_sync_handle_t
 Handle of a sync representing a periodic advertiser. More...
 
typedef uint8_t advertising_sid_t
 Identify an advertising SID. More...
 
typedef int8_t rssi_t
 Received signal strength. More...
 
typedef int8_t advertising_power_t
 Describe the advertising power. More...
 

Functions

template<typename T , ptrdiff_t LhsSize, ptrdiff_t RhsSize>
bool operator== (const ArrayView< T, LhsSize > &lhs, const ArrayView< T, LhsSize > &rhs)
 Equality operator. More...
 
template<typename T , ptrdiff_t LhsSize, ptrdiff_t RhsSize>
bool operator!= (const ArrayView< T, LhsSize > &lhs, const ArrayView< T, LhsSize > &rhs)
 Not equal operator. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
template<class byte_array_class >
bool is_all_zeros (byte_array_class &byte_array)
 Returns true if every byte is equal to zero. More...
 
template<class byte_array_class >
void set_all_zeros (byte_array_class &byte_array)
 Zero out all bytes. More...
 
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. More...
 
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. More...
 

Variables

static const advertising_handle_t LEGACY_ADVERTISING_HANDLE = 0x00
 Special advertising set handle used for the legacy advertising set. More...
 
static const advertising_handle_t INVALID_ADVERTISING_HANDLE = 0xFF
 Special advertising set handle used as return or parameter to signify an invalid handle. More...
 
static const uint8_t LEGACY_ADVERTISING_MAX_SIZE = 0x1F
 Maximum advertising data length that can fit in a legacy PDU. More...
 

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 87 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 82 of file BLETypes.h.

typedef byte_array_t<32> dhkey_t

Diffie-Hellman key.

Definition at line 461 of file BLETypes.h.

typedef byte_array_t<2> ediv_t

Used to identify LTK for legacy pairing connections.

Definition at line 446 of file BLETypes.h.

data to be encrypted

Definition at line 455 of file BLETypes.h.

typedef byte_array_t<16> irk_t

128 bit keys used by paired devices

Definition at line 441 of file BLETypes.h.

typedef Duration<uint32_t, 1> microsecond_t

Type that represents micro seconds.

Definition at line 252 of file Duration.h.

typedef Duration<uint32_t, 1000 * microsecond_t::TIME_BASE> millisecond_t

Type that represents milliseconds.

Definition at line 257 of file Duration.h.

secure connections oob confirmation value

Definition at line 452 of file BLETypes.h.

secure connections oob random 128 value

Definition at line 451 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 450 of file BLETypes.h.

typedef uint32_t passkey_num_t

Passkey stored as a number.

Definition at line 230 of file BLETypes.h.

public key coordinate, two of which define the public key

Definition at line 458 of file BLETypes.h.

typedef Duration<uint32_t, 1000 * millisecond_t::TIME_BASE> second_t

Type that represents seconds.

Definition at line 262 of file Duration.h.

typedef uint32_t sign_count_t

counter for signed data writes done by GattClient

Definition at line 464 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]beginHandle at the beginning of the range.
[in]endHandle 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 149 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 307 of file BLETypes.h.

ArrayView<T, Size> ble::make_ArrayView ( T(&)  elements[Size])

Generate an array view from a reference to a C/C++ array.

Template Parameters
TType of elements held in elements.
SizeNumber of items held in elements.
Parameters
elementsThe 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, Size> ble::make_ArrayView ( T *  elements)

Generate an array view from a pointer to a C/C++ array.

Template Parameters
SizeNumber of items held in elements.
TType of elements held in elements.
Parameters
elementsThe 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> 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
TType of elements held in array_ptr.
Parameters
array_ptrThe pointer to the array to viewed.
array_sizeThe 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
srcbyte_array_t to create a view from.
Returns
An ArrayView to src.

Definition at line 422 of file BLETypes.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
TType of elements held in elements.
SizeNumber of items held in elements.
Parameters
elementsThe 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.

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
SizeNumber of items held in elements.
TType of elements held in elements.
Parameters
elementsThe 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
TType of elements held in array_ptr.
Parameters
array_ptrThe pointer to the array to viewed.
array_sizeThe 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 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
srcbyte_array_t to create a view from.
Returns
An ArrayView to src.

Definition at line 435 of file BLETypes.h.

bool ble::operator!= ( const ArrayView< T, LhsSize > &  lhs,
const ArrayView< T, LhsSize > &  rhs 
)

Not equal operator.

Parameters
lhsLeft hand side of the binary operation.
rhsRight 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
lhsLeft hand side of the binary operation.
rhsRight 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 320 of file BLETypes.h.

Variable Documentation

const advertising_handle_t INVALID_ADVERTISING_HANDLE = 0xFF
static

Special advertising set handle used as return or parameter to signify an invalid handle.

Definition at line 40 of file BLETypes.h.

const advertising_handle_t LEGACY_ADVERTISING_HANDLE = 0x00
static

Special advertising set handle used for the legacy advertising set.

Definition at line 37 of file BLETypes.h.

const uint8_t LEGACY_ADVERTISING_MAX_SIZE = 0x1F
static

Maximum advertising data length that can fit in a legacy PDU.

Definition at line 43 of file BLETypes.h.

Important Information for this Arm website

This site uses cookies to store information on your computer. By continuing to use our site, you consent to our cookies. If you are not happy with the use of these cookies, please review our Cookie Policy to learn how they can be disabled. By disabling cookies, some features of the site will not work.