ble/protocol/address.h header reference
[Bluetooth Low Energy library module]
The source code of this header can be browsed online.
Description [link]
Device addresses are defined as a 48-bit address + 1 bit type (Random / Public). There are various tools provided to generate and resolve random addresses.
ble_stack_context_address_resolvable_generate and ble_stack_context_address_non_resolvable_generate can generate addresses,
ble_addr_random_type_set can override address type,
BLE_ADDR_FMT and BLE_ADDR_ARG can help printing addresses with printf-like functions,
ble_addr_cmp can compare addresses,
ble_addr_net_parse and ble_addr_net_set can convert from/to libnetwork addresses.
Members [link]
Types [link]
- enum ble_addr_random_type_e
- struct ble_addr_s
- enum ble_addr_type_e
Functions [link]
- int_fast8_t ble_addr_cmp(const struct ble_addr_s *a, const struct ble_addr_s *b)
- void ble_addr_net_parse(struct ble_addr_s *addr, const struct net_addr_s *naddr)
- void ble_addr_net_set(const struct ble_addr_s *addr, struct net_addr_s *naddr)
- enum ble_addr_random_type_e ble_addr_random_type(const struct ble_addr_s *a)
- void ble_addr_random_type_set(struct ble_addr_s *a, enum ble_addr_random_type_e t)
Variable [link]
- const char *const ble_addr_rand_name[4]
Macros [link]
Members detail [link]
#define BLE_ADDRESS_H_ [link]
This macro is declared in ble/protocol/address.h source file, line 21.
#define BLE_ADDR_ARG(x) [link]
This macro is declared in ble/protocol/address.h source file, line 97.
this macro can be used to print a BLE address
See also BLE_ADDR_FMT.
#define BLE_ADDR_FMT [link]
This macro is declared in ble/protocol/address.h source file, line 91.
this macro can be used to print a BLE address
See also BLE_ADDR_ARG.
int_fast8_t ble_addr_cmp(const struct ble_addr_s *a, const struct ble_addr_s *b) [link]
This function is declared in ble/protocol/address.h source file, line 133.
this function compares two BLE addresses and returns a difference between them, if any. This can be used to sort addresses.
void ble_addr_net_parse(struct ble_addr_s *addr, const struct net_addr_s *naddr) [link]
This function is declared in ble/protocol/address.h source file, line 145.
this function fills in BLE address from libnetwork's address type.
void ble_addr_net_set(const struct ble_addr_s *addr, struct net_addr_s *naddr) [link]
This function is declared in ble/protocol/address.h source file, line 150.
this function fills in libnetwork's address from BLE address type.
enum ble_addr_random_type_e ble_addr_random_type(const struct ble_addr_s *a) [link]
This function is declared in ble/protocol/address.h source file, line 109.
this function retrieves random address type from a random address.
enum ble_addr_random_type_e [link]
This enum is declared in ble/protocol/address.h source file, line 69.
this enum defines BLE random address types.
Identifier | Description |
---|---|
BLE_ADDR_RANDOM_NON_RESOLVABLE | |
BLE_ADDR_RANDOM_RESOLVABLE | |
BLE_ADDR_RANDOM_INVALID | |
BLE_ADDR_RANDOM_STATIC |
void ble_addr_random_type_set(struct ble_addr_s *a, enum ble_addr_random_type_e t) [link]
This function is declared in ble/protocol/address.h source file, line 120.
this function sets address as random with a given random type.
struct ble_addr_s [link]
This struct is declared in ble/protocol/address.h source file, line 81.
this struct defines a BLE address.
Field | Description |
---|---|
uint8_t addr[6]; | 48-bit address looking like a MAC address |
enum ble_addr_type_e type:1; | BLE address type |
enum ble_addr_type_e [link]
This enum is declared in ble/protocol/address.h source file, line 58.
this enum defines BLE address types.
Identifier | Description |
---|---|
BLE_ADDR_PUBLIC | Public IEEE-allocated address |
BLE_ADDR_RANDOM | Random address |
const char *const ble_addr_rand_name[4] [link]
This constant is declared in ble/protocol/address.h source file, line 52.
This constant is for internal use only.