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.
Fork of nrf51-sdk by
Peer IDs
[Peer_manager]
An internal module of Peer_manager. More...
Functions | |
void | peer_id_init (void) |
Function for initializing the module. | |
pm_peer_id_t | peer_id_allocate (pm_peer_id_t peer_id) |
Function for claiming an unused peer ID. | |
void | peer_id_free (pm_peer_id_t peer_id) |
Function for freeing a peer ID and clearing all data associated with it in persistent storage. | |
bool | peer_id_is_allocated (pm_peer_id_t peer_id) |
Function for finding out whether a peer ID is in use. | |
pm_peer_id_t | peer_id_next_id_get (pm_peer_id_t prev_peer_id) |
Function for getting the next peer ID in the sequence of all used peer IDs. | |
uint32_t | peer_id_n_ids (void) |
Function for querying the number of valid peer IDs available. |
Detailed Description
An internal module of Peer_manager.
This module keeps track of which peer IDs are in use and which are free.
Function Documentation
pm_peer_id_t peer_id_allocate | ( | pm_peer_id_t | peer_id ) |
Function for claiming an unused peer ID.
- Parameters:
-
peer_id The peer ID to allocate. If this is PM_PEER_ID_INVALID, the first available will be allocated.
- Returns:
- The allocated peer ID.
- Return values:
-
PM_PEER_ID_INVALID If no peer ID could be allocated or module is not initialized.
void peer_id_free | ( | pm_peer_id_t | peer_id ) |
void peer_id_init | ( | void | ) |
bool peer_id_is_allocated | ( | pm_peer_id_t | peer_id ) |
uint32_t peer_id_n_ids | ( | void | ) |
pm_peer_id_t peer_id_next_id_get | ( | pm_peer_id_t | prev_peer_id ) |
Function for getting the next peer ID in the sequence of all used peer IDs.
Can be used to loop through all used peer IDs.
- Note:
- PM_PEER_ID_INVALID is considered to be before the first and after the last ordinary peer ID.
- Parameters:
-
[in] prev_peer_id The previous peer ID.
- Returns:
- The next peer ID.
- The first used peer ID if prev_peer_id was PM_PEER_ID_INVALID.
- Return values:
-
PM_PEER_ID_INVALID if prev_peer_id was the last ordinary peer ID or the module is not initialized.
Generated on Tue Jul 12 2022 14:11:21 by
