![]() |
nRF Connect SDK Bare Metal API 2.0.99
|
| uint32_t pm_peer_id_list | ( | uint16_t * | peer_list, |
| uint32_t *const | list_size, | ||
| uint16_t | first_peer_id, | ||
| enum pm_peer_id_list_skip | skip_id ) |
#include <peer_manager.h>
Retrieve a filtered list of peer IDs.
This function starts searching from first_peer_id. IDs ordering is the same as for pm_next_peer_id_get. If the first_peer_id is PM_PEER_ID_INVALID, the function starts searching from the first ID. The function looks for the ID's number specified by list_size. Only those IDs that match skip_id are added to the list. The number of returned elements is determined by list_size.
peer_list buffer must be equal or greater than list_size.| [out] | peer_list | Pointer to peer IDs list buffer. |
| [in,out] | list_size | The amount of IDs to return / The number of returned IDs. |
| [in] | first_peer_id | The first ID from which the search begins. IDs ordering is the same as for pm_next_peer_id_get. |
| [in] | skip_id | It determines which peer ID will be added to the list. |
| NRF_SUCCESS | If the ID list has been filled out. |
| NRF_ERROR_INVALID_PARAM | If skip_id was invalid. |
| NRF_ERROR_NULL | If peer_list or list_size were NULL. |
| NRF_ERROR_INVALID_STATE | If the Peer Manager is not initialized. |