Runtime configuration for Mesh core functionality. More...
Data Structures | |
| struct | mesh_opt_core_adv_t |
Functions | |
| uint32_t | mesh_opt_core_adv_set (core_tx_role_t role, const mesh_opt_core_adv_t *p_entry) |
| Sets the advertisement options for the given role. More... | |
| uint32_t | mesh_opt_core_adv_get (core_tx_role_t role, mesh_opt_core_adv_t *p_entry) |
| Gets the advertisement options for the given role. More... | |
| uint32_t | mesh_opt_core_tx_power_set (core_tx_role_t role, radio_tx_power_t tx_power) |
| Sets the TX power level for the given role. More... | |
| uint32_t | mesh_opt_core_tx_power_get (core_tx_role_t role, radio_tx_power_t *p_tx_power) |
| Gets the TX power level for the given role. More... | |
| uint32_t | mesh_opt_core_adv_addr_set (core_tx_role_t role, const ble_gap_addr_t *p_adv_addr) |
| Sets the advertisement address for the given role. More... | |
| uint32_t | mesh_opt_core_adv_addr_get (core_tx_role_t role, ble_gap_addr_t *p_adv_addr) |
| Gets the advertisement address for the given role. More... | |
| enum | { MESH_OPT_CORE_ADV_RECORD_START = MESH_OPT_CORE_ID_START, MESH_OPT_CORE_ADV_RECORD_END = MESH_OPT_CORE_ADV_RECORD_START + MESH_OPT_CORE_ADV_COUNT - 1, MESH_OPT_CORE_TX_POWER_RECORD_START, MESH_OPT_CORE_TX_POWER_RECORD_END = MESH_OPT_CORE_TX_POWER_RECORD_START + MESH_OPT_CORE_ADV_COUNT - 1, MESH_OPT_CORE_ADV_ADDR_RECORD_START, MESH_OPT_CORE_ADV_ADDR_RECORD_END = MESH_OPT_CORE_ADV_ADDR_RECORD_START + MESH_OPT_CORE_ADV_COUNT - 1, MESH_OPT_CORE_SEC_NWK_BCN_RECORD, MESH_OPT_CORE_HB_PUBLICATION_RECORD, MESH_OPT_CORE_RECORDS_COUNT } |
| #define | MESH_OPT_CORE_ADV_COUNT 1 |
| #define | MESH_OPT_CORE_ADV_EID MESH_OPT_CORE_ID(MESH_OPT_CORE_ADV_RECORD_START) |
| Advertiser entry id. | |
| #define | MESH_OPT_CORE_TX_POWER_EID MESH_OPT_CORE_ID(MESH_OPT_CORE_TX_POWER_RECORD_START) |
| TX power entry id. | |
| #define | MESH_OPT_CORE_ADV_ADDR_EID MESH_OPT_CORE_ID(MESH_OPT_CORE_ADV_ADDR_RECORD_START) |
| Advertiser address entry id. | |
| #define | MESH_OPT_CORE_SEC_NWK_BCN_EID MESH_OPT_CORE_ID(MESH_OPT_CORE_SEC_NWK_BCN_RECORD) |
| Current secure network beacon state. | |
| #define | MESH_OPT_CORE_HB_PUBLICATION_EID MESH_OPT_CORE_ID(MESH_OPT_CORE_HB_PUBLICATION_RECORD) |
| Heartbeat publication state. | |
| #define | MESH_OPT_CORE_ADV_ENTRY_ID_TO_ROLE(ID) ((core_tx_role_t) ((ID).record - MESH_OPT_CORE_ADV_RECORD_START)) |
| #define | MESH_OPT_CORE_ADV_ROLE_TO_ENTRY_ID(ROLE) (MESH_OPT_CORE_ID(MESH_OPT_CORE_ADV_RECORD_START + (ROLE))) |
Detailed Description
Runtime configuration for Mesh core functionality.
Function Documentation
◆ mesh_opt_core_adv_set()
| uint32_t mesh_opt_core_adv_set | ( | core_tx_role_t | role, |
| const mesh_opt_core_adv_t * | p_entry | ||
| ) |
Sets the advertisement options for the given role.
- Parameters
-
[in] role Advertiser role [in] p_entry Options
- Return values
-
NRF_SUCCESS The options were successfully set. NRF_ERROR_NULL The p_entrypointer was NULL.NRF_ERROR_INVALID_PARAMS Invalid options parameters NRF_ERROR_NOT_FOUND Unknown role.
◆ mesh_opt_core_adv_get()
| uint32_t mesh_opt_core_adv_get | ( | core_tx_role_t | role, |
| mesh_opt_core_adv_t * | p_entry | ||
| ) |
Gets the advertisement options for the given role.
- Parameters
-
[in] role Advertiser role. [in,out] p_entry Returns the options for the given role.
- Return values
-
NRF_SUCCESS The options were successfully returned. NRF_ERROR_NULL The p_entrypointer was NULL.NRF_ERROR_NOT_FOUND Unknown role.
◆ mesh_opt_core_tx_power_set()
| uint32_t mesh_opt_core_tx_power_set | ( | core_tx_role_t | role, |
| radio_tx_power_t | tx_power | ||
| ) |
Sets the TX power level for the given role.
- Parameters
-
[in] role Advertiser role [in] tx_power TX power to set.
- Return values
-
NRF_SUCCESS The TX power was successfully set. NRF_ERROR_INVALID_PARAMS Invalid options parameters NRF_ERROR_NOT_FOUND Unknown role.
◆ mesh_opt_core_tx_power_get()
| uint32_t mesh_opt_core_tx_power_get | ( | core_tx_role_t | role, |
| radio_tx_power_t * | p_tx_power | ||
| ) |
Gets the TX power level for the given role.
- Parameters
-
[in] role Advertiser role [in,out] p_tx_power Returns the current TX power setting
- Return values
-
NRF_SUCCESS The TX power was successfully returned. NRF_ERROR_NULL The p_tx_powerpointer was NULL.NRF_ERROR_NOT_FOUND Unknown role.
◆ mesh_opt_core_adv_addr_set()
| uint32_t mesh_opt_core_adv_addr_set | ( | core_tx_role_t | role, |
| const ble_gap_addr_t * | p_adv_addr | ||
| ) |
Sets the advertisement address for the given role.
- Parameters
-
[in] role Advertiser role [in] p_adv_addr The new advertisement address
- Return values
-
NRF_SUCCESS The advertisement address was successfully set. NRF_ERROR_NULL The p_adv_addrpointer was NULL.NRF_ERROR_INVALID_PARAMS Invalid options parameters NRF_ERROR_NOT_FOUND Unknown role.
◆ mesh_opt_core_adv_addr_get()
| uint32_t mesh_opt_core_adv_addr_get | ( | core_tx_role_t | role, |
| ble_gap_addr_t * | p_adv_addr | ||
| ) |
Gets the advertisement address for the given role.
- Parameters
-
[in] role Advertiser role [in,out] p_adv_addr Returns the current advertisement address
- Return values
-
NRF_SUCCESS The advertisement address was successfully returned. NRF_ERROR_NULL The p_adv_addrpointer was NULL.NRF_ERROR_NOT_FOUND Unknown role.