Mistake on this page?
Report an issue in GitHub or email us
Namespaces | Data Structures | Enumerations | Functions | Variables
Common

Namespaces

 ble
 Entry namespace for all BLE API definitions.
 
 SafeBool_
 Private namespace used to host details of the SafeBool implementation.
 

Data Structures

class  CallChainOfFunctionPointersWithContext< ContextType >
 Function like object hosting a list of FunctionPointerWithContext. More...
 
class  FunctionPointerWithContext< ContextType >
 Function like object adapter over freestanding and member functions. More...
 
class  SafeBool< T >
 Safe conversion of objects in boolean context. More...
 
class  UUID
 Representation of a Universally Unique Identifier (UUID). More...
 

Enumerations

Functions

template<typename T , typename ContextType >
FunctionPointerWithContext< ContextType > makeFunctionPointer (T *object, void(T::*member)(ContextType context))
 Factory of adapted member function pointers. More...
 
template<typename T , typename U >
void operator== (const SafeBool< T > &lhs, const SafeBool< U > &rhs)
 Avoid conversion to bool between different classes. More...
 
template<typename T , typename U >
void operator!= (const SafeBool< T > &lhs, const SafeBool< U > &rhs)
 Avoid conversion to bool between different classes. More...
 
static uint8_t char2int (char c)
 Convert a character containing an hexadecimal digit into an unsigned integer. More...
 

Variables

static const unsigned BLE_GATT_MTU_SIZE_DEFAULT = 23
 Default MTU size. More...
 

Detailed Description

Enumeration Type Documentation

anonymous enum

Assigned values for BLE UUIDs.

Enumerator
BLE_UUID_UNKNOWN 

Reserved UUID.

BLE_UUID_SERVICE_PRIMARY 

Primary Service.

BLE_UUID_SERVICE_SECONDARY 

Secondary Service.

BLE_UUID_SERVICE_INCLUDE 

Included service.

BLE_UUID_CHARACTERISTIC 

Characteristic.

BLE_UUID_DESCRIPTOR_CHAR_EXT_PROP 

Characteristic Extended Properties Descriptor.

BLE_UUID_DESCRIPTOR_CHAR_USER_DESC 

Characteristic User Description Descriptor.

BLE_UUID_DESCRIPTOR_CLIENT_CHAR_CONFIG 

Client Characteristic Configuration Descriptor.

BLE_UUID_DESCRIPTOR_SERVER_CHAR_CONFIG 

Server Characteristic Configuration Descriptor.

BLE_UUID_DESCRIPTOR_CHAR_PRESENTATION_FORMAT 

Characteristic Presentation Format Descriptor.

BLE_UUID_DESCRIPTOR_CHAR_AGGREGATE_FORMAT 

Characteristic Aggregate Format Descriptor.

BLE_UUID_GATT 

Generic Attribute Profile.

BLE_UUID_GATT_CHARACTERISTIC_SERVICE_CHANGED 

Service Changed Characteristic.

BLE_UUID_GAP 

Generic Access Profile.

BLE_UUID_GAP_CHARACTERISTIC_DEVICE_NAME 

Device Name Characteristic.

BLE_UUID_GAP_CHARACTERISTIC_APPEARANCE 

Appearance Characteristic.

BLE_UUID_GAP_CHARACTERISTIC_PPF 

Peripheral Privacy Flag Characteristic.

BLE_UUID_GAP_CHARACTERISTIC_RECONN_ADDR 

Reconnection Address Characteristic.

BLE_UUID_GAP_CHARACTERISTIC_PPCP 

Peripheral Preferred Connection Parameters Characteristic.

Definition at line 36 of file common/blecommon.h.

Error codes for the BLE API.

The value 0 means that no error was reported; therefore, it allows an API user to cleanly test for errors.

1 ble_error_t error = some_ble_api_function();
2 if (error) {
3  // handle the error
4 }
Enumerator
BLE_ERROR_NONE 

No error.

BLE_ERROR_BUFFER_OVERFLOW 

The requested action would cause a buffer overflow and has been aborted.

BLE_ERROR_NOT_IMPLEMENTED 

Requested a feature that isn't yet implemented or isn't supported by the target HW.

BLE_ERROR_PARAM_OUT_OF_RANGE 

One of the supplied parameters is outside the valid range.

BLE_ERROR_INVALID_PARAM 

One of the supplied parameters is invalid.

BLE_STACK_BUSY 

The stack is busy.

BLE_ERROR_INVALID_STATE 

Invalid state.

BLE_ERROR_NO_MEM 

Out of memory.

BLE_ERROR_OPERATION_NOT_PERMITTED 

The operation requested is not permitted.

BLE_ERROR_INITIALIZATION_INCOMPLETE 

The BLE subsystem has not completed its initialization.

BLE_ERROR_ALREADY_INITIALIZED 

The BLE system has already been initialized.

BLE_ERROR_UNSPECIFIED 

Unknown error.

BLE_ERROR_INTERNAL_STACK_FAILURE 

The platform-specific stack failed.

BLE_ERROR_NOT_FOUND 

Data not found or there is nothing to return.

Definition at line 149 of file common/blecommon.h.

enum HVXType_t

Handle Value Notification/Indication event.

Emmitted when a notification or indication has been received from a GATT server.

Enumerator
BLE_HVX_NOTIFICATION 

Handle Value Notification.

BLE_HVX_INDICATION 

Handle Value Indication.

Definition at line 233 of file common/blecommon.h.

Function Documentation

static uint8_t char2int ( char  c)
static

Convert a character containing an hexadecimal digit into an unsigned integer.

Parameters
[in]cHexadecimal digit in a character representation.
Returns
The corresponding value as unsigned integer.

Definition at line 44 of file common/UUID.h.

FunctionPointerWithContext<ContextType> makeFunctionPointer ( T *  object,
void(T::*)(ContextType context)  member 
)

Factory of adapted member function pointers.

This factory eliminates the need to invoke the qualified constructor of FunctionPointerWithContext by using automatic type deduction of function templates.

1 struct ReadHandler {
2  void on_data_read(const GattReadCallbackParams*);
3 };
4 
5 ReadHandler read_handler;
6 
7 PalGattClient& client;
8 
9 client.onDataRead(
10  makeFunctionPointer(&read_handler, &ReadHandler::on_data_read)
11 );
12 
13 // instead of
14 
15 client.onDataRead(
16  FunctionPointerWithContext<const GattReadCallbackParams*>(
17  &read_handler,
18  &ReadHandler::on_data_read
19  )
20 );
Parameters
[in]objectInstance to bound with member.
memberThe member being adapted.
Returns
Adaptation of the parameters in a FunctionPointerWithContext instance.

Definition at line 355 of file common/FunctionPointerWithContext.h.

void operator!= ( const SafeBool< T > &  lhs,
const SafeBool< U > &  rhs 
)

Avoid conversion to bool between different classes.

Attention
Will generate a compile time error if instantiated.

Definition at line 144 of file common/SafeBool.h.

void operator== ( const SafeBool< T > &  lhs,
const SafeBool< U > &  rhs 
)

Avoid conversion to bool between different classes.

Attention
Will generate a compile time error if instantiated.

Definition at line 132 of file common/SafeBool.h.

Variable Documentation

const unsigned BLE_GATT_MTU_SIZE_DEFAULT = 23
static

Default MTU size.

Definition at line 225 of file common/blecommon.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.